query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Gets query for [[RubricNews]].
Получает запрос для [[RubricNews]].
public function getRubricNews() { return $this->hasMany(RubricNews::className(), ['rubric_id' => 'id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNews();", "public function get_news() {\n $where = array(\n 'news_status' => 1\n );\n $get_news = $this->get_all_rows(TBL_NEWS, '*', $where);\n\n return $get_news;\n }", "public function getNews()\n {\n return $this->hasMany(Image::className(), ['id' => 'model_id'])->viaTable('{{%category_relation}}', [\n 'category_id' => 'id'\n ], function ($query) {\n /* @var $query ActiveQuery */\n $query->andWhere(['type' => 'News']);\n });\n }", "public function getNews()\n {\n\n return \\DB::table($this->table)\n ->leftjoin('rel_news_categories', 'news.id', '=', 'rel_news_categories.news_id')\n ->leftjoin('categories', 'rel_news_categories.category_id', '=', 'categories.id')\n ->leftjoin('rel_news_sources', 'news.id', '=', 'rel_news_sources.news_id')\n ->leftjoin('sources', 'rel_news_sources.source_id', '=', 'sources.id')\n ->select(['news.id as id', 'news.title as title', 'slug', 'news.description as description',\n 'news.created_at as created_at', 'image', 'status',\n 'categories.title as categoryTitle', 'sources.title as sourceTitle'])\n ->orderBy('id')\n ->get();\n }", "public function getNews()\n {\n $limit=3;\n $config['limit']=$limit;\n $config['total_rows']= $this->rowCount();\n $offset=pagination::initialize($config);\n $this->pagination=pagination::createLinks();\n\n\n $sql=\"SELECT news.id,news.title,news.image,news.priority,users.uname,GROUP_CONCAT(categories.name SEPARATOR ',') cat\n FROM news \n JOIN news_categories \n ON news.id=news_categories.news_id\n JOIN categories\n ON news_categories.category_id=categories.id\n JOIN users\n ON news.user_id=users.id\n GROUP BY news.id LIMIT {$limit} OFFSET {$offset}\";\n return $this->dbRaw($sql,[]);\n\n }", "public function retrieveAllNews()\n {\n $news = R::getAll('select * from news');\n\n return $news;\n }", "public function homepageNewsQuery($params)\n {\n $now = date('Y-m-d');\n $tableName = $this->tableName();\n $query = $this->baseSearch($params)\n ->andWhere([\n $tableName . '.status' => News::NEWS_WORKFLOW_STATUS_VALIDATO,\n $tableName . '.primo_piano' => 1\n ])\n ->andWhere(['<=', 'data_pubblicazione', $now])\n ->andWhere(['or',\n ['>=', 'data_rimozione', $now],\n ['data_rimozione' => null]]\n );\n\n return $query;\n }", "public function GetSliderNews() {\n return $this->database->queryGet(\"SELECT n.id_news, n.title_news, n.desc_news, n.created_at_news, n.big_photo, u.email FROM news n JOIN users u ON n.id_user = u.id_user ORDER BY n.created_at_news DESC LIMIT 3\");\n }", "public function getAll()\n\t{\n\t\treturn $this->news->orderBy('order', 'DESC')->where('lang','en')->paginate(10);\n\t}", "public function searchNews()\n {\n $dataProvider = $this->search();\n\n // Filter out system news.\n $dataProvider->criteria->addCondition('t.category IS NOT NULL');\n\n return $dataProvider;\n }", "public function getNews() {\n $limit= $this->getData('news_count');\n \n // get collection\n $this->_news = $this->_newsFactory->create(); \n $this->_news->addFieldToFilter('news_visible',1)\n ->setOrder('news_date','desc') \n ->setPageSize($limit);\n \n return $this->_news; \n \n }", "public function getCurrentNews()\n {\n $now = new DateTime;\n $thirtyDaysAgo = new DateTime(\"-30 days\");\n\n $qb = $this->em->createQueryBuilder();\n $qb->select(\"n\")\n ->from(News::class, \"n\")\n ->add(\"where\", $qb->expr()->between(\"n.date\", \":from\", \":to\"))\n ->orderBy(\"n.date\", \"DESC\")\n ->setParameters(array(\"from\" => $thirtyDaysAgo, \"to\" => $now));\n\n return $qb->getQuery()->getResult();\n }", "public function searchNews() {\n\t\t$this->moduleOff();\n\n\t\tif (!isset($this->params['searchText'])) {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$game = $this->getGame();\n\t\t$search = new Search();\n\t\t$list = array();\n\t\t$list['CategoryType'] = GAME_NEWS;\n\t\t$list['infoBox'] = MainHelper::loadInfoBox('Games', 'index', true);\n\t\t$p = User::getUser();\n\t\t$list['game'] = $game;\n\t\t$list['isAdmin'] = $p ? $p->canAccess('Edit News') : false;;\n\t\t$list['searchText'] = urldecode($this->params['searchText']);\n\t\t$newsTotal = $search->getSearchTotal(urldecode($this->params['searchText']), SEARCH_NEWS, SEARCH_GAME, $game->ID_GAME);\n\t\t$pager = $this->appendPagination($list, $game, $newsTotal, $game->GAME_URL . '/news/search/' . urlencode($list['searchText']) . '/page');\n\t\t$list['newsList'] = $search->getSearch(urldecode($this->params['searchText']), SEARCH_NEWS, $pager->limit, SEARCH_GAME, $game->ID_GAME);\n\t\t$list['searchTotal'] = $newsTotal;\n\n\t\t$data['title'] = $this->__('Search results');\n\t\t$data['body_class'] = 'search_games';\n\t\t$data['selected_menu'] = 'games';\n\t\t$data['left'] = MainHelper::gamesLeftSide($game);\n\t\t$data['right'] = PlayerHelper::playerRightSide();\n\t\t$data['content'] = $this->renderBlock('games/newsView', $list);\n\n\t\t$data['footer'] = MainHelper::bottomMenu();\n\t\t$data['header'] = MainHelper::topMenu();\n\t\t$this->render3Cols($data);\n\t}", "public static function news()\n {\n return ForumTopic::where('news',1)\n ->where(function ($q){\n $q->whereNull('start_on')\n ->orWhere('start_on', '<=', Carbon::now()->format('Y-M-d'));\n })\n ->whereHas('section', function($q){\n $q->where('is_active', 1)->where('is_general', 1);\n })->orderBy('created_at', 'desc');\n }", "public function highlightedAndHomepageNewsQuery($params)\n {\n $now = date('Y-m-d');\n $tableName = $this->tableName();\n $query = $this->baseSearch($params)\n ->andWhere([\n $tableName . '.status' => News::NEWS_WORKFLOW_STATUS_VALIDATO,\n $tableName . '.in_evidenza' => 1,\n $tableName . '.primo_piano' => 1\n ])\n ->andWhere(['<=', 'data_pubblicazione', $now])\n ->andWhere(['or',\n ['>=', 'data_rimozione', $now],\n ['data_rimozione' => null]]\n );\n\n return $query;\n }", "public function getNews()\n {\n // var_dump($this->connexion);\n $requete = \"SELECT news.*,\n category.id as id_category,\n category.nom as name_category,\n category.description as description_category\n FROM news\n LEFT JOIN category\n ON news.category = category.id\";\n // $requete = \"SELECT * FROM news\";\n $result = $this->connexion->query($requete);\n\n $listNews = $result->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($listNews);\n return $listNews;\n }", "public function GetNews()\n {\n require ('../phpQuery/phpQuery.php');\n\t $motrinfo = file_get_contents('http://motr-online.com/news');\n $document = phpQuery::newDocument($motrinfo);\n $res = [];\n\n $hentry = $document->find('table.tbl1');\n \n foreach (pq($hentry) as $tab){\n $newsentry = new NewsEntry();\n $newsentry->caption = pq($tab)->find(\"tr\")->eq(0)->text();\n $newsentry->post_date = pq($tab)->find(\"tr\")->eq(1)->text();\n $newsentry->content = pq($tab)->find(\"tr\")->eq(2)->find(\"td\")->html();\n array_push($res, $newsentry);\n }\n\n /*$pqm=pq($hentry)->eq(0);\n $trarr=array();\n\n foreach ($pqm->find('tr') as $el1)\n {\n $pq1 = pq($el1);\n $tdarr[] = $pq1;\n }*/ \n\n\t return $res;\n }", "public function GetPopularNews() {\n return $this->database->queryGet(\"SELECT title_news, sidebard_photo, created_at_news, views, id_news FROM news ORDER BY views DESC LIMIT 5\");\n }", "public function getRelatedNews() {\n\t\treturn $this->relatedNews;\n\t}", "public function getNews(): array;", "public static function search($options)\n {\n $solr = LsSolr::getSolr('news');\n\n $q = self::createQuery($options);\n\n $q->setRows(isset($options['rows']) ? $options['rows'] : 10);\n $q->setStart(isset($options['start']) ? $options['start'] : 0);\n\n if (isset($options['return_propel_result']) && $options['return_propel_result']) {\n $q->addField('id');\n }\n\n $result = $solr->query($q)->getResponse()->response;\n\n if (isset($options['return_propel_result']) && $options['return_propel_result']) {\n return LsSolr::getPropelResult($result['docs'], 'News');\n }\n\n if (isset($options['return_ids']) && !$options['return_ids']) {\n return $result;\n }\n\n if (!$result['numFound']) {\n return array();\n }\n $ids = array();\n foreach ($result['docs'] as $doc) {\n $ids[] = self::getNewsId($doc['id']);\n }\n\n return $ids;\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('news_title',$this->news_title,true);\n\t\t$criteria->compare('news_author',$this->news_author);\n\t\t$criteria->compare('news_type',$this->news_type);\n\t\t$criteria->compare('news_modified',$this->news_modified,true);\n\t\t$criteria->compare('news_date',$this->news_date, true);\n\t\t\n\t\t$status = $this->news_status;\n\t\t\n\t\tif(isset($status) && $status== 3){ // If Trash\n\t\t\t$criteria->compare('news_status',3,true);\n\t\t}\n\t\telseif(isset($status) && $status== 2){ // If Draft\n\t\t\t$criteria->compare('news_status',2,true);\n\t\t}\n\t\telse{ // if default & publish\n\t\t\t$criteria->compare('news_status',1,true);\n\t\t}\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'news_date DESC',\n\t\t\t),\n\t\t));\n\t}", "public function get_news_content(){ \n $newsId = $this->db->escape($_GET['id']); \n $slider = $this->db->query(\"SELECT * FROM news WHERE link='\".$newsId.\"' AND status=1\")or die(mysql_error());\n return $slider->row; \n }", "public function getNewsById($id);", "function getnews()\n\t{\n\t\t//query memanggil data\n\t\t$query = \"SELECT news.id_news, news.judul, news.author, news.posted, news.gambar, news.brief, user.username from news, user where news.author = user.idUser && news.status = 1 limit 5\";\n\t\t//pr($query);\n\t\t//memanggil semua data. Jika hanya memanggil 1 data ->fetch($query,0,0)\n\t\t$result = $this->fetch($query,1,0);\n\t\treturn $result;\n\t}", "public function readAll(){\n\t\t\t$req = \"SELECT *\n\t\t\t\t\tFROM news \n\t\t\t\t\tORDER BY id DESC\";\n\t\t\t$curseur=$this->cx->query($req);\n\t\t\treturn $curseur;\n\t\t}", "function get_all_news()\n {\n $currentPage = $_GET[\"page\"];\n $Limit = $_GET[\"limit\"];\n $args = array(\n 'post_type' => 'news',\n \"posts_per_page\" => $Limit,\n \"paged\" => $currentPage,\n\n );\n ob_start();\n $customQuery = new WP_Query($args);\n echo $getPostsFromDB = wp_json_encode($customQuery);\n return ob_get_clean();\n wp_die();\n }", "public function search()\n {\n $search_string = $this->app['request']->query->get('search_string');\n $results = $this->app['pomm']\n ->getDefaultSession()\n ->getModel('Model\\PommProject\\PommSchema\\NewsModel')\n ->search($search_string, 15)\n ;\n\n return $this\n ->app['twig']\n ->render('blog_search_results.html.twig', ['news' => $results, 'search_string' => $search_string])\n ;\n }", "function getReadNews(){\r\n \t$query = \"SELECT * FROM news Where status=1 ORDER BY id DESC LIMIT 6\";\r\n \t$result = mysql_query($query) or trigger_error(mysql_error().\" \".$query);\r\n\r\n \treturn $result;\r\n }", "protected function getNews() \n {\n $sql = \"SELECT * FROM articles WHERE Type = 'News' ORDER BY Timestamp DESC\";\n\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n\n return $stmt->fetchAll();\n }", "public function searchRiwayat() {\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = new CdbCriteria();\r\n\t\tif (!empty($this->pasien_id)) {\r\n\t\t\t$criteria->addCondition('pasien_id = ' . $this->pasien_id);\r\n\t\t}\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function getNews() {\n\t\treturn $this->news;\n\t}", "function allAdminNews(){\n\n $news = DB::table('noticias')\n ->where('active', '=', 1)->get();\n\n return $news;\n }", "function news_detail_get()\n {\n $language_code = !empty($this->input->request_headers()['Language']) ? $this->input->request_headers()['Language'] : LANGUAGE_DEFAULT;\n\n $last = $this->uri->total_segments();\n $news_id = $this->uri->segment($last);\n\n $check_verify_params = checkVerifyParams(array(\n $news_id\n ));\n if(!empty($check_verify_params)){\n $this->response($check_verify_params, BAD_REQUEST_CODE);\n }\n\n $select = array(\n '_id',\n 'title',\n '_description',\n 'img_src',\n 'link_url',\n 'count_view',\n 'create_time_mi'\n );\n $where = ['_id' => $news_id];\n $news = $this->news_model->findOne($where, $select);\n if(empty($news)){\n $this->response(RestNotFound(), NOT_FOUND_CODE);\n }\n\n $this->data['news'] = $news;\n $this->load->view('front/webview/news_detail', $this->data);\n }", "public function searchRJ()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->tabularlist_id)){\n\t\t\t$criteria->addCondition(\"tabularlist_id = \".$this->tabularlist_id); \t\n\t\t}\n\t\t$criteria->compare('LOWER(tabularlist_chapter)',strtolower($this->tabularlist_chapter),true);\n\t\t$criteria->compare('LOWER(tabularlist_block)',strtolower($this->tabularlist_block),true);\n\t\t$criteria->compare('LOWER(tabularlist_title)',strtolower($this->tabularlist_title),true);\n\t\t$criteria->compare('LOWER(tabularlist_revisi)',strtolower($this->tabularlist_revisi),true);\n\t\t$criteria->compare('LOWER(tabularlist_versi)',strtolower($this->tabularlist_versi),true);\n\t\t$criteria->compare('tabularlist_aktif',TRUE);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>array(\n\t 'pageSize'=>10,\n\t ),\n\t\t));\n\t}", "protected function newsSourceQuery(): Query\n {\n return $this->publishedQuery();\n }", "public function get_all_news() {\n $query = $this->_bdd->prepare(\"select * from NEWS ORDER BY Id desc\");\n $query->execute();\n if($query->rowCount() != 0) {\n $this->_nb = 0;\n while($d = $query->fetch()) {\n //$photo = Photo::s_search_byId($this->_bdd, $d['IdPhoto']);\n $this->_data[$this->_nb] = $d;\n //$this->_data[$this->_nb]['img'] = $photo['Fichier'];\n $this->_nb++;\n }\n }\n }", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function createQuery() {\n\t\t$query = parent::createQuery();\n\n\t\t//filter by doktype\n\t\t$extConf = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['in_news'];\n\t\tif($extConf !== null) {\n\t\t\t$settings = unserialize($extConf);\n\t\t\tif($settings['newsDoktype']) {\n\t\t\t\t$query->matching(\n\t\t\t\t\t$query->equals('doktype', $settings['newsDoktype'])\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $query;\n\t}", "function getNewsAll() {\r\n\t\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"news` WHERE published = '1' ORDER BY id DESC\");\r\n\t\t\t if(empty($data)) { \r\n\t\t\t \treturn false;\r\n\t\t\t } else {\r\n\t\t\t\t return $data;\r\n\t\t\t }\r\n\t\t}", "public function getNewsDetails()\n {\n return $this->hasMany(NewsDetail::className(), ['news_id' => 'news_id']);\n }", "public function get_related_news( $category = \"\") {\n\t\tif( qtranxf_getLanguage() == \"kh\")\n\t\t\t$language = \"khmer\";\n\t\telse $language = \"\";\n\n $args=array(\n 'post_type' => 'post',\n 'post_status' => 'publish',\n 'category_name' => $category,\n 'language'=> $language,\n 'numberposts' => 10\n );\n\n $rel_news_query = get_posts( $args );\n if( !empty($rel_news_query) ) {\n $news = \"<ul>\";\n foreach( $rel_news_query as $rel_post ) :\n $news .= \"<li>\";\n /* if(has_post_thumbnail()) :\n\t\t\t\t $news .= '<a href=\"'.get_permalink($rel_post->ID).'\" title=\"'.$rel_post->post_title.'\">';\n $news .= get_the_post_thumbnail($rel_post->ID, array(50,50), array('class' => 'align-left'));\n $news .=\"</a>\";\n\t\t\t endif; */\n\t\t\t $related_post_title = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($rel_post->post_title);\n $news .= '<a href=\"'.get_permalink($rel_post->ID).'\" rel=\"bookmark\" title=\"Click to view '.$related_post_title.'\">'.$related_post_title.'</a></li>';\n endforeach;\n $news .= '</ul>';\n //wp_reset_query();\n return $news;\n }\n }", "function getNews()\r\n{\r\n $bdd = getBDD();\r\n $news = $bdd->query('select * from T_NEWS N JOIN T_CATEGORIE C ON N.CAT_ID=C.CAT_ID order by NEWS_ID desc');\r\n return $news;\r\n}", "public function getAllNews() : Response\n {\n $bind = [];\n $conditions = 'is_deleted = 0';\n\n $i = 0;\n foreach ($this->searchFields as $field) {\n if ($this->request->hasQuery($field)) {\n $conditions .= \" AND {$field} LIKE ?\" . $i++;\n $bind[] = '%' . $this->request->getQuery($field, 'string') . '%';\n }\n }\n \n $order = 'created_at DESC';\n if ($this->request->hasQuery('sort')) {\n $sort = $this->request->getQuery('sort', 'string');\n if (in_array(trim($sort, '-'), $this->orderByFields)) {\n $order = trim($sort, '-');\n if (substr($sort, 0, 1) === '-') {\n $order .= ' DESC';\n }\n }\n }\n \n $currentPage = $this->request->getQuery('page', 'int', 1);\n $limit = $this->request->getQuery('limit', 'int', 10);\n\n $news = News::find([\n 'conditions' => $conditions,\n 'bind' => $bind,\n 'order' => $order\n ]);\n\n $paginator = new PaginatorModel(\n [\n 'data' => $news,\n 'limit' => $limit,\n 'page' => $currentPage,\n ]\n );\n\n $page = $paginator->getPaginate();\n\n $response = [\n \n \"first\" => $page->first,\n \"before\" => $page->before,\n \"current\" => $page->current,\n \"last\" => $page->last,\n \"next\" => $page->next,\n \"total_pages\" => $page->total_pages,\n \"total_items\" => $page->total_items,\n \"limit\" => $page->limit\n ];\n\n foreach ($page->items as $item) {\n $response['items'][] = [\n \"id\" => $item->id,\n \"title\" => $item->title,\n \"content\" => $item->content,\n \"user_id\" => $item->user_id,\n 'users' => [\n 'id' => $item->users->id,\n 'name' => $item->users->name,\n 'lastName' => $item->users->lastName,\n 'email' => $item->users->email\n ],\n \"views\" => $item->views,\n \"created_at\" => $item->created_at,\n \"updated_at\" => $item->updated_at\n ];\n }\n\n return $this->response($response);\n }", "function getnews2()\n\t{\n\t\t//query memanggil home\n\t\t$query = \"SELECT news.id_news, news.judul, news.author, news.posted, news.gambar, news.brief, user.username from news, user where news.author = user.idUser && news.status = 1 limit 6\";\n\t\t// pr($query);\n\t\t//memanggil semua data. Jika hanya memanggil 1 data ->fetch($query,0,0)\n\t\t$result = $this->fetch($query,1,0);\n\t\treturn $result;\n\t}", "static public function listNewsByRubrics($id) {\n\n $in = ArrayHelper::merge(ArrayHelper::getColumn(rubrics::listСhildren($id), 'id'), [$id]);\n $result = self::find()->where(['rubrics_id' => $in])->with('news')->groupBy(['news_id'])->all();\n $result = ArrayHelper::getColumn($result, 'news');\n\n /* Простите, здесь может не очень елегантный foreach :) */\n $i = 0;\n foreach ($result as $value) {\n $return[$i]['news_id'] = $value->id;\n $return[$i]['title'] = $value->title;\n $return[$i]['body'] = $value->body;\n\n $i++;\n }\n\n return $return ?? null;\n }", "public function getNews()\n {\n return $this->hasOne(News::className(), ['id' => 'news_id']);\n }", "public function searchOwnNews($params, $limit = null, $only_drafts = false)\n {\n return $this->search($params, \"created-by\", $limit, $only_drafts);\n }", "public function index(GameNewsQuery $request, GameNewsModel $GameNewsModel)\n {\n $query = $GameNewsModel::paginate($request->length);\n $data = new GameNewsResources($query);\n return $data;\n }", "public static function getMovieNews($conn){\n \n //get all news sql query and inner join \n $sql = \"select * from news \";\n\n //binding\n $query = $conn->prepare($sql);\n\n $query->execute();\n $result = array();\n\n while($row = $query->fetch(PDO::FETCH_ASSOC)) {\n $result[] = new News($conn, $row);\n }\n\n\n return $result;\n\n }", "public function index() {\n\t\trequire_once 'GetRssNewsController.php';\n\t\t$getRssNews = new GetRssNewsController ();\n\t\t$paraNews = $this->request->query;\n\t\tif(!isset($paraNews['id'])){\n\t\t\treturn $this->redirect('/');\n\t\t}\n\t\t\n\t\t$type = 0;\n\t\t$news = $this->TNews->find('first', array(\n\t\t\t'fields' => array('TNews.*, TRssNews.*'),\n\t\t\t'conditions' => array(\n\t\t\t\t\t'TNews.DELETE_YMD IS NULL',\n\t\t\t\t\t'TNews.ID' => $paraNews['id']\n\t\t\t\t),\n\t\t\t'joins' =>array(\n\t\t\t\tarray (\n\t\t\t\t\t\t'table' => 'T_RSS_NEWS',\n\t\t\t\t\t\t'alias' => 'TRssNews',\n\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t'TRssNews.ID = TNews.RSS_NEWS_ID'\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\tif($news != null){\n\t\t\tif($news['TNews']['CONTENT'] == ''){\n\t\t\t\t$this->TNews->begin();\n\t\t\t\t// get rss news list\n\t\t\t\tif($news['TRssNews']['LANGUAGE'] == 'vn'){\n\t\t\t\t\t$getRssNews->updateContentDetail($news);\n\t\t\t\t}\n\t\t\t\telse if($news['TRssNews']['LANGUAGE'] == 'en'){\n\t\t\t\t\tif($news['TRssNews']['HOME'] == 'http://abcnews.go.com'){\n\t\t\t\t\t\t$getRssNews->updateContentDetailForAbcNews($news);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$getRssNews->updateContentDetail($news);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($news['TRssNews']['LANGUAGE'] == 'ja'){\n\t\t\t\t\tif($news['TRssNews']['HOME'] == 'http://www.asahi.com'){\n\t\t\t\t\t\t$getRssNews->updateContentDetailForJAAsahi($news);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$getRssNews->updateContentDetail($news);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->TNews->commit();\n\t\t\t\t$news = $this->TNews->find('first', array(\n\t\t\t\t\t'fields' => array('TNews.*, TRssNews.TYPE, TRssNews.HOME, TRssNews.URL, TRssNews.LANGUAGE'),\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'TNews.DELETE_YMD IS NULL',\n\t\t\t\t\t\t\t'TNews.ID' => $paraNews['id']\n\t\t\t\t\t\t),\n\t\t\t\t\t'joins' =>array(\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t'table' => 'T_RSS_NEWS',\n\t\t\t\t\t\t\t\t'alias' => 'TRssNews',\n\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t\t\t'TRssNews.ID = TNews.RSS_NEWS_ID'\n\t\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} //else {\n\t\t\t//\trequire_once 'GetRssNewsController.php';\n\t\t\t//\t$getRssNews = new GetRssNewsController ();\n\t\t\t//\t$getRssNews->getRssNewsUser();\t\t\t\t\n\t\t\t//}\n\t\t\t\n\t\t\t$this->set('news', $news);\n\t\t\t$this->title = $news['TNews']['TITLE'];\n\t\t\t$this->urlHistories = array('News', $this->title);\n\t\t\t$type = $news['TRssNews']['TYPE'];\n\n\t\t\tif($this->language != $news['TRssNews']['LANGUAGE']){\n\t\t\t\t$this->language = $news['TRssNews']['LANGUAGE'];\n\t\t\t\t$this->Cookie->write(RwsConstant::COOKIE_KEY_LANGUAGE, $this->language);\n\t\t\t\t$this->applyLanguage();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isset($this->language)){\n\t\t\t$this->language = RwsConstant::LANGUAGE;// Default language\n\t\t\t$this->Cookie->write(RwsConstant::COOKIE_KEY_LANGUAGE, $this->language);\n\t\t\t$this->applyLanguage();\n\t\t}\n\t\t\n\t\t$newsList = $this->TNews->find('all', array(\n\t\t\t\t'fields' => array('TNews.*, TRssNews.TYPE, TRssNews.HOME, TRssNews.URL'),\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'TNews.DELETE_YMD IS NULL',\n\t\t\t\t\t\t'TNews.ID < ' . $paraNews[\"id\"],\n\t\t\t\t\t\t'TRssNews.LANGUAGE' => $this->language\n\t\t\t\t),\n\t\t\t\t'joins' =>array(\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t'table' => 'T_RSS_NEWS',\n\t\t\t\t\t\t\t\t'alias' => 'TRssNews',\n\t\t\t\t\t\t\t\t'type' => 'inner',\n\t\t\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t\t\t'TRssNews.ID = TNews.RSS_NEWS_ID',\n\t\t\t\t\t\t\t\t\t\t'TRssNews.TYPE' => $type\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'limit' => 15,\n\t\t\t\t'order' => array('TNews.ID DESC')\n\t\t));\n\t\tif($newsList != null){\n\t\t\t$this->set('newsList', $newsList);\n\t\t}\n\t\t//$getRssNews->getRssNewsUser();\n\t\t\t$videos = $this->TManage->find('all',array(\n\t\t\t\t\t'fields' => 'TVideo.*',\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'TManage.DELETE_YMD is null',\n\t\t\t\t\t\t\t'TManage.TYPE' => 2\n\t\t\t\t\t),\n\t\t\t\t\t'joins' =>array(\n\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t'table' => 'T_VIDEO',\n\t\t\t\t\t\t\t\t\t'alias' => 'TVideo',\n\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t\t\t\t'TVideo.VIDEO_ID = TManage.VIDEO_ID'\n\t\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\t'limit' => 8,\n\t\t\t\t\t'order' =>array('PUBLISHED_AT'=>'DESC')\n\t\t\t));\n\t\t\t\n\t\t\tif(sizeof($videos) > 0){\n\t\t\t\t$this->set('videos', $videos);\n\t\t\t}\n\t\t\t\n\t\treturn $this->render('/news');\n\t}", "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('news_id',$this->news_id);\n\n\t\t$criteria->compare('news_title',$this->news_title,true);\n\n\t\t$criteria->compare('news_content',$this->news_content,true);\n\n\t\t$criteria->compare('news_author',$this->news_author,true);\n\n\t\t$criteria->compare('news_readtimes',$this->news_readtimes);\n\n\t\t$criteria->compare('news_createat',$this->news_createat,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function news()\n {\n return $this->hasMany(News::class);\n }", "public function news()\n {\n return $this->morphedByMany('TypiCMS\\Modules\\News\\Models\\News');\n }", "public static function findLatestNews()\n {\n $db = new \\App\\Dbconnect\\Db;\n $sql = 'SELECT * FROM '.static::TABLE.' ORDER BY id DESC LIMIT 3';\n return $db->query($sql, static::class);\n }", "public function index()\n {\n $category = request()->input(\"category\", \"\");\n $models = $category == \"\" ? News::all() : News::where(\"category\", $category);\n return new NewsCollection($models);\n }", "public function getNews() {\n return $this->hasOne(News::className(), ['id' => 'news_id']);\n }", "public function showNews(): array\n {\n $db = Db::init();\n return $db->row('SELECT title, text, author, post_date FROM news');\n }", "public static function findAllForNews($newsid) {\r\n\r\n\t\tif (!is_numeric($newsid)) die();\r\n\t\t$sql = \"SELECT *\r\n\t\t\tFROM `\". DB_PREFIX. self::$tablename. \"`\r\n\t\t\tWHERE `newsid` = ?\r\n\t\t\tORDER BY `id`;\";\r\n\t\t$params[] = $newsid;\r\n\t\treturn self::findBySQL($sql, $params);\r\n\t}", "abstract public function getQuery();", "abstract public function getQuery();", "public function getNewsList()\n {\n return $this->newsList;\n }", "abstract protected function getNewsPage();", "public function getById(int $id) : NewsInterface;", "public function getNewsFull($newsid) {\n }", "public function searchMycollection(Request $request)\n {\n $search = $request->search;\n $newsItems = auth()->user()->news()\n ->where('status','LIKE', '%'.$search.'%')\n ->orWhere('author','LIKE', '%'.$search.'%')\n ->orWhere('title','LIKE', '%'.$search.'%')\n ->orWhere('description','LIKE', '%'.$search.'%')\n ->orWhere('source','LIKE', '%'.$search.'%')\n ->orWhere('country','LIKE', '%'.$search.'%')\n ->get();\n \n return view('mycollection', compact('newsItems'));\n }", "function get_news_related($news_related){\n\t\tif(!$news_related)\n\t\t\t\treturn;\n\t\t$query = \" SELECT id, title \n\t\t\t\t\tFROM fs_news\n\t\t\t\t\tWHERE id IN (0\".$news_related.\"0) \n\t\t\t\t\t ORDER BY POSITION(','+id+',' IN '0\".$news_related.\"0')\n\t\t\t\t\t\";\n\t\tglobal $db;\n\t\t$sql = $db->query($query);\n\t\t$result = $db->getObjectList();\n\t\treturn $result;\n\t}", "public function rundschreibenNews(Request $request)\n {\n $docs = $request->get('documents');\n $sort = $request->get('sort');\n $docType = $this->newsId;\n $myRundCoauthorArr = DocumentCoauthor::where('user_id', Auth::user()->id)->pluck('document_id')->toArray();\n $myRundCoauthor = Document::whereIn('id', $myRundCoauthorArr)->where('document_type_id', $docType)->pluck('id')->toArray();\n\n $highRole = false;\n if (ViewHelper::universalHasPermission(array(10)) == true) {\n $highRole = true;\n }\n // status entwurf\n $newsEntwurfPaginated = Document::where('document_type_id', $docType)\n ->where(function ($query) use ($highRole, $myRundCoauthor) {\n if ($highRole == false) {\n $query->where('owner_user_id', Auth::user()->id)\n ->orWhere('user_id', Auth::user()->id);\n $query->orWhereIn('documents.id', $myRundCoauthor);\n }\n })\n ->where('document_status_id', 1);\n // ->orderBy('id', 'desc')->paginate(10, ['*'], 'news-entwurf')\n if ($docs == 'entwurf' && $sort == 'asc') {\n $newsEntwurfPaginated = $newsEntwurfPaginated->orderBy('date_published', 'asc')->paginate(10, ['*'], 'news-entwurf');\n } else {\n $newsEntwurfPaginated = $newsEntwurfPaginated->orderBy('date_published', 'desc')->paginate(10, ['*'], 'news-entwurf');\n }\n\n $newsEntwurfTree = $this->document->generateTreeview($newsEntwurfPaginated, array('pageDocuments' => true));\n\n // dd($newsEntwurfPaginated);\n\n // status im freigabe prozess\n $newsFreigabePaginated = Document::where('document_type_id', $docType)\n ->where(function ($query) use ($highRole, $myRundCoauthor) {\n if ($highRole == false) {\n $query->where('owner_user_id', Auth::user()->id)\n ->orWhere('user_id', Auth::user()->id);\n $query->orWhereIn('documents.id', $myRundCoauthor);\n }\n })\n ->whereIn('document_status_id', [2, 6]);\n // ->orderBy('id', 'desc')->paginate(10, ['*'], 'news-freigabe');\n if ($docs == 'freigabe' && $sort == 'asc') {\n $newsFreigabePaginated = $newsFreigabePaginated->orderBy('date_published', 'asc')->paginate(10, ['*'], 'news-freigabe');\n } else {\n $newsFreigabePaginated = $newsFreigabePaginated->orderBy('date_published', 'desc')->paginate(10, ['*'], 'news-freigabe');\n }\n\n $newsFreigabeTree = $this->document->generateTreeview($newsFreigabePaginated, array('pageDocuments' => true));\n\n // all status aktuell/published\n $newsAllPaginated = Document::where('document_type_id', $docType)\n ->where('document_status_id', 3)\n ->where('active', 1)->get();\n \n // Hide documents that have publish date higher than today\n $newsAllPaginated = $newsAllPaginated->reject(function($document, $key){\n return Carbon::parse($document->date_published)->gt(Carbon::today());\n });\n \n if ($docs == 'alle' && $sort == 'asc') {\n $newsAllPaginated = $this->document->getUserPermissionedDocuments($newsAllPaginated, 'alle-news', array('field' => 'date_published', 'sort' => 'asc'));\n } else {\n $newsAllPaginated = $this->document->getUserPermissionedDocuments($newsAllPaginated, 'alle-news', array('field' => 'date_published', 'sort' => 'desc'));\n }\n\n $newsAllTree = $this->document->generateTreeview($newsAllPaginated, array('pageDocuments' => true, 'showHistory' => true));\n\n $docType = DocumentType::find($docType);\n\n return view('dokumente.rundschreibenNews', compact('newsEntwurfPaginated', 'newsEntwurfTree',\n 'newsFreigabePaginated', 'newsFreigabeTree', 'newsAllPaginated', 'newsAllTree', 'docType', 'docs', 'sort'));\n }", "public function transferNewsQuery(): string;", "public function buscarrevista($input) {\n\t\t$this->conexion();\n\t\t$response = $this->mostrar(\"select a.rn, a. rrevista from revista a where a.rrevista like '\".\n\t\t $input->revista.\"%' limit 10\");\n\t\t$this->desconexion();\n\t\treturn $response;\n\t}", "public function getRss();", "public function GetSearchNews($valueSearch) {\n $params = [$valueSearch];\n $query = \"SELECT id_news, title_news, sidebard_photo, views, created_at_news FROM news WHERE LOWER(title_news) LIKE ? ORDER BY views DESC LIMIT 4\";\n\n return $this->database->executeAll($query, $params);\n }", "public function getRecursos(){\n $columnas = \"r.*\";\n $join = \"INNER JOIN roles_recursos as rr ON rr.roles_id = roles.id \";\n $join .= \"INNER JOIN recursos as r ON rr.recursos_id = r.id \";\n $where = \"roles.id = '$this->id'\";\n return $this->find($where, \"columns: $columnas\" , \"join: $join\");\n }", "public function get_news()\n\t\t{\n \t\t\t//$query=$this->db->query($q);\n\n \t\t\t$query = $this->db->get('user');\n // $query=$this->db->select\n return $query->result();\n /* $count=0;\n foreach ($query->result() as $key) {\n $count=$count+1;\n }\n \n if($count>0)return true;\n else return false;\n //return $query->num_rows;*/\n\t\t}", "function get_all_news(){\n include(\"./models/cms_model.php\");\n\t $cms = new cms_Model;\n\t $this->model=$cms->get_all_news($json=true);\n\t}", "public function ultimeNews($params, $limit = null)\n {\n return $this->searchAll($params, $limit);\n }", "public function getNews(){\n\t\t$news \t\t\t\t= News::latest()->get(); // globaal + not hidden+ published \n\t\t$albums \t\t\t= Album::all();\n\t\treturn view(\"front.news\",compact('news','albums'));\n\t}", "public function listNews($limit = 0, $is_top = false)\n {\n $model = $this->model->active()\n ->requiredTranslation()\n ->with('category')\n ->whereHas('category', function ($q){\n $q->where('code', '<>', 'LEGAL-DOCUMENTS'); //khac voi tai-lieu-phap-ly\n })\n ->withTranslation();\n if ($is_top) {\n $model->orderBy('is_top', 'desc');\n }\n $model->orderBy('is_top', 'desc')\n ->orderBy('publish_at', 'desc');\n\n if ($limit) {\n return $model->limit($limit)\n ->get();\n }\n return $model->paginate(15);\n }", "public function getQuery() {}", "public function getQuery() {}", "public function getQuery() {}", "public function getQuery() {}", "public function getQuery() {}", "protected function getListQuery()\n\t{\n // prendiamo l'id del torneo\n $id_torneo_file = fopen('ID_TORNEO.txt', 'r');\n $id_torneo = fscanf($id_torneo_file,'%u');\n fclose($id_torneo_file);\n \n /*$id_torneo_file = fopen('ID_TORNEO_array.txt', 'w+');\n //fscanf($id_torneo_file,'%u');\n fprintf($id_torneo_file, print_r($id_torneo, true));\n fclose($id_torneo_file);*/\n \n \n \n\t\t// Create a new query object.\t\t\n\t\t$db = JFactory::getDBO();\n\t\t$query = $db->getQuery(true);\n\t\t// Select some fields\n\t\t$query->select('*');\n\t\t$query->from('#__sm_giornate');\n $query->where('id_torneo = '.$id_torneo[0]);\n\t\treturn $query;\n\t}", "public function news()\n {\n return $this->hasMany('App\\Models\\News');\n }", "public function listRelatedNews(\\Lelesys\\Plugin\\News\\Domain\\Model\\News $news) {\n\t\t$allRelatedNews = $this->newsRepository->getEnabledNews();\n\t\t$listRelatedNews = array();\n\t\tforeach ($allRelatedNews as $singleNews) {\n\t\t\tif ($news != $singleNews) {\n\t\t\t\t$listRelatedNews[] = $singleNews;\n\t\t\t}\n\t\t}\n\t\treturn $listRelatedNews;\n\t}", "function get_news($atts) {\n\t//if there are single quotes in the query, let's remove them. They'll break things, and they aren't necessary for performing a search\n\t$atts['query'] = str_replace(\"'\", \"\", $atts['query']);\n\t//we also need to replace any spaces with proper word separators\n\t$atts['query'] = str_replace(\" \", \"+\", $atts['query']);\n\t//call the build_feed_url function to construct the feed URL for us\n\t$newsUrl = build_feed_url($atts);\n\t\n\t//call the build_feed function to parse the feed and return the results to us\n\t$output = build_feed($atts, $newsUrl, $iswidget);\n\t\n\treturn $output;\n}", "public function fetchLastNews($quantity) {\n return $this->getEntityManager()\n ->createQueryBuilder()\n ->select('p')\n ->from('WebsiteNewsBundle:News', 'p')\n ->where('p.isPublished = 1')\n ->orderBy('p.newsDate', 'DESC')\n ->setFirstResult(0)\n ->setMaxResults($quantity)\n ->getQuery()\n ->getResult();\n }", "abstract protected function getQuery();", "abstract protected function getQuery();", "public function get_all_news()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('news');\n\t\t$this->db->order_by(\"published\", \"desc\");\n\n\t\t$query = $this->db->get();\n\n\t\treturn $query->result_array();\n\t}", "public function search($params)\n {\n $query = SCNewsTable::find()->orderBy(\"NID DESC\");\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'NID' => $this->NID,\n 'add_stamp' => $this->add_stamp,\n 'priority' => $this->priority,\n 'emailed' => $this->emailed,\n 'brand' => $this->brand,\n ]);\n\n $query->andFilterWhere(['like', 'add_date', $this->add_date])\n ->andFilterWhere(['like', 'title_en', $this->title_en])\n ->andFilterWhere(['like', 'title_ru', $this->title_ru])\n ->andFilterWhere(['like', 'picture', $this->picture])\n ->andFilterWhere(['like', 'textToPublication_en', $this->textToPublication_en])\n ->andFilterWhere(['like', 'textToPublication_ru', $this->textToPublication_ru])\n ->andFilterWhere(['like', 'textToMail', $this->textToMail])\n ->andFilterWhere(['like', 'textMini', $this->textMini])\n ->andFilterWhere(['like', 'textPreview', $this->textPreview]);\n\n return $dataProvider;\n }", "public function get_resources()\r\r\n\t{\r\r\n\t\t$this->db->where('show_in = 1');\r\r\n\t\t// $this->db->table(''); \r\r\n\t\t// $this->db->order_by('blog_category_name');\r\r\n\t\t$query = $this->db->get('kb_article');\r\r\n\t\t\r\r\n\t\treturn $query;\r\r\n\t}" ]
[ "0.59144926", "0.58300173", "0.5808574", "0.578682", "0.5731679", "0.5720944", "0.5679905", "0.56308436", "0.5527579", "0.552185", "0.5491797", "0.54669344", "0.54014945", "0.5399787", "0.5398178", "0.53744465", "0.5344901", "0.5337645", "0.53365135", "0.53306764", "0.5327086", "0.53196096", "0.53160846", "0.5307619", "0.52681774", "0.52634597", "0.52606773", "0.5259832", "0.5247987", "0.52442366", "0.5204065", "0.5199732", "0.51805586", "0.5177037", "0.51455516", "0.51246476", "0.51043653", "0.50955385", "0.50955385", "0.50955385", "0.50955385", "0.50955385", "0.50955385", "0.50955385", "0.50955385", "0.50928986", "0.5083555", "0.5065944", "0.5053275", "0.50502694", "0.503355", "0.50265", "0.50176066", "0.49970302", "0.49941093", "0.49877575", "0.49787253", "0.49771821", "0.4975928", "0.497148", "0.49593592", "0.49568227", "0.49553686", "0.4938761", "0.49154174", "0.48992944", "0.4896774", "0.4896774", "0.48932993", "0.48925045", "0.48881024", "0.48852035", "0.4884809", "0.48816502", "0.48804253", "0.48614827", "0.48599645", "0.48586625", "0.48435524", "0.48411724", "0.48156148", "0.48134148", "0.48106214", "0.4806767", "0.48063588", "0.4805762", "0.4805762", "0.4805762", "0.4805762", "0.4805346", "0.47937214", "0.4792415", "0.47839847", "0.47727537", "0.4772302", "0.47698197", "0.47698197", "0.4764909", "0.47611487", "0.4759639" ]
0.72167176
0
Determines if a given entity type has bundles.
Определяет, имеет ли заданный тип сущности пакеты.
public function entityTypeHasBundles($entity_type) { return !empty($this->getBundleInfo($entity_type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function entity_get_bundles($entity_type) {\n return entity_toolbox_controller($entity_type)->getBundles();\n}", "public function entityTypeBundleCount($entity_type) {\n return count($this->getBundleInfo($entity_type));\n }", "public function testIsBundle()\n {\n $oOrderArticle = new oxOrderArticle();\n $oOrderArticle->oxorderarticles__oxisbundle = new oxField( false );\n $this->assertFalse( $oOrderArticle->isBundle() );\n\n $oOrderArticle = new oxOrderArticle();\n $oOrderArticle->oxorderarticles__oxisbundle = new oxField( true );\n $this->assertTrue( $oOrderArticle->isBundle() );\n }", "private function hasBundle(string $class, ContainerBuilder $container): bool\n {\n if (\\in_array($class, $bundles = $container->getParameter('kernel.bundles'), true)) {\n return true;\n }\n\n if (array_key_exists($class, $bundles) && $bundles[$class] === ContaoModuleBundle::class) {\n return true;\n }\n\n return false;\n }", "public function getAllBundles()\n {\n return $this->entityTypeBundleInfo->getBundleInfo($this->getEntityType());\n }", "public function hasEntity($type, $id) {\n return (isset($this->entities[$type][$id]));\n }", "public function getEntityTypeBundleInfo();", "protected function validateEntityType(array $allowed_bundles = [\n 'publication',\n 'publication_page',\n ]) {\n $entity = $this->getEntity();\n return ($entity->getEntityTypeId() == 'node') && in_array($entity->bundle(), $allowed_bundles) && !$entity->isNew();\n }", "public function bundleExists($bundle)\n {\n $bundles = $this->container->getParameter('kernel.bundles');\n\n return array_key_exists($bundle, $bundles);\n }", "public function hasBlockType(){\n return $this->_has(4);\n }", "public function isEntityModule()\n\t{\n\t\treturn '1' == $this->isentitytype;\n\t}", "public function testGetEntityTypeBundles() {\n\n // First test of ->getEntityTypeBundles('node').\n $this->assertEquals(\n $this->testdata['comparisondata']['entity_bundles']['node'],\n $this->entityServices->getEntityTypeBundles('node'),\n 'Method ->getEntityTypeBundles(\"node\") did not return the expected result.'\n );\n\n // First test of ->getEntityTypeBundles('taxonomy_term').\n $this->assertEquals(\n $this->testdata['comparisondata']['entity_bundles']['taxonomy_term'],\n $this->entityServices->getEntityTypeBundles('taxonomy_term'),\n 'Method ->getEntityTypeBundles(\"taxonomy_term\") did not return the expected result.'\n );\n\n // First test of ->getEntityTypeBundles('media').\n $this->assertEquals(\n $this->testdata['comparisondata']['entity_bundles']['media'],\n $this->entityServices->getEntityTypeBundles('media'),\n 'Method ->getEntityTypeBundles(\"media\") did not return the expected result.'\n );\n\n // Does caching work? Re-test of ->getEntityTypeBundles('node').\n $this->assertEquals(\n $this->testdata['comparisondata']['entity_bundles']['node'],\n $this->entityServices->getEntityTypeBundles('node'),\n 'Method ->getEntityTypeBundles(\"node\") did not return the expected result.'\n );\n\n }", "public static function getBundleFromID($entity_type, $entity_id)\n\t{\n\t\t$info = entity_get_info($entity_type);\n\t\tif (!$info) return null;\n\n\t\t// If the entity type doesn't support bundles, return null.\n\t\tif (empty($info['entity keys']['bundle'])) return null;\n\n\t\t$query = db_select($info['base table'], 'e')\n\t\t\t->condition($info['entity keys']['id'], $entity_id);\n\t\t$query->addField('e', $info['entity keys']['bundle'], 'bundle');\n\t\t$query->range(0, 1);\n\t\t$bundles = $query->execute()->fetchCol();\n\n\t\treturn count($bundles) > 0 ? reset($bundles) : null;\n\t}", "public function isAllowedEntityType(/*string*/ $type)\n {\n $type = strtolower($type);\n\n return isset($this->allowed_entities[$type]);\n }", "static public function isBundleEnabled(Kernel $kernel, $name)\n {\n try {\n $kernel->getBundle($name);\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "public function testIsSaleableOnBundleWithoutSelections()\n {\n $bundleProduct = $this->productRepository->get('bundle-product', true, null, true);\n $bundleType = $bundleProduct->getTypeInstance();\n /** @var \\Magento\\Bundle\\Model\\LinkManagement $linkManager */\n $linkManager = $this->objectManager->create(\\Magento\\Bundle\\Model\\LinkManagement::class);\n\n /** @var \\Magento\\Bundle\\Model\\Product\\Type $bundleType */\n $options = $bundleType->getOptionsCollection($bundleProduct);\n $selections = $bundleType->getSelectionsCollection($options->getAllIds(), $bundleProduct);\n\n foreach ($selections as $link) {\n /** @var \\Magento\\Bundle\\Model\\Selection $link */\n $linkManager->removeChild('bundle-product', $link->getOptionId(), $link->getSku());\n }\n\n $bundleProduct = $this->productRepository->get('bundle-product', false, null, true);\n $this->assertFalse(\n $bundleProduct->isSalable(),\n 'Bundle product supposed to be non saleable'\n . ' if it has no selections'\n );\n }", "public function hasEntity()\n {\n return isset($this->entity);\n }", "public function getNbBundles()\n {\n return $this->bundles->count();\n }", "public function getContentEntityTypeBundleInfo() {\n\n $bundleInfo = $this->helperBaseService->getEntityTypeBundleInfo()->getAllBundleInfo();\n $results = [];\n try {\n foreach ($bundleInfo as $entityType => $bundles) {\n if ($this->helperBaseService->getEntityTypeDefinition($entityType)->entityClassImplements(FieldableEntityInterface::class)) {\n if ($this->helperBaseService->getEntityTypeDefinition($entityType)->entityClassImplements(ContentEntityInterface::class)) {\n $results[$entityType] = $bundles;\n }\n }\n }\n }\n catch (\\Exception $exception) {\n $this->helperBaseService->catchException($exception);\n }\n\n return $results;\n }", "function drush_behat_op_is_field($is_field_info) {\n list($entity_type, $field_name) = $is_field_info;\n $map = field_info_field_map();\n return !empty($map[$field_name]) && array_key_exists($entity_type, $map[$field_name]['bundles']);\n}", "public function getEntityTypeBundlesList($entity_type_id) {\n $entity_type = $this->entityTypeManager\n ->getDefinition($entity_type_id);\n\n $bundle_entity_type = $entity_type\n ->getBundleEntityType();\n\n $bundles = [];\n\n if (is_null($bundle_entity_type)) {\n return $bundles;\n }\n\n $entity_bundles = $this->entityTypeManager\n ->getStorage($bundle_entity_type)\n ->loadMultiple();\n\n foreach ($entity_bundles as $entity_bundle_id => $entity_bundle) {\n $bundles[$entity_bundle_id] = $entity_bundle->label();\n }\n\n return $bundles;\n }", "public function testDefault() {\n $product_bundle_type = ProductBundleType::load('default');\n $this->assertNotEmpty($product_bundle_type);\n\n $this->drupalGet('admin/commerce/config/product-bundle-types');\n $rows = $this->getSession()->getPage()->findAll('css', 'table tbody tr');\n $this->assertCount(1, $rows);\n }", "public function is_type( $type ) {\n\t\treturn ( $this->entity_type == $type || ( is_array( $type ) && in_array( $this->entity_type, $type ) ) ) ? true : false;\n\t}", "public function hasForEntity($entity);", "public function getAllBundles()\n\t{\n\t\t$res = $this->get(\"$this->_api_bundles/all\");\n\t\tif ($res == false) {\n\t\t\treturn(false);\n\t\t}\n\t\treturn($this->xml2array($res));\n\t}", "public function hasHandler($entity_type_id, $handler_type);", "public function applies($entity_type_id, $bundle);", "public function testAdd() {\n $user = $this->drupalCreateUser(['administer commerce_product_bundle_type']);\n $this->drupalLogin($user);\n $this->drupalGet('admin/commerce/config/product-bundle-types/add');\n\n $bundle_item_type_field = $this->getSession()\n ->getPage()\n ->findField('bundleItemType');\n $this->assertFalse($bundle_item_type_field->hasAttribute('disabled'));\n $order_item_type_field = $this->getSession()\n ->getPage()\n ->findField('orderItemType');\n $this->assertTrue($order_item_type_field->hasAttribute('disabled'));\n\n $edit = [\n 'id' => 'foo',\n 'label' => 'Foo',\n 'description' => 'My even more random product bundle type',\n 'bundleItemType' => 'default',\n 'orderItemType' => 'commerce_product_bundle_default',\n ];\n $this->submitForm($edit, t('Save'));\n $this->assertSession()\n ->pageTextContains('The product bundle type Foo has been successfully saved.');\n\n $product_bundle_type = ProductBundleType::load($edit['id']);\n $this->assertNotEmpty($product_bundle_type);\n $this->assertEquals($edit['label'], $product_bundle_type->label());\n $this->assertEquals($edit['description'], $product_bundle_type->getDescription());\n $this->assertEquals($edit['bundleItemType'], $product_bundle_type->getBundleItemTypeId());\n $this->assertEquals($edit['orderItemType'], $product_bundle_type->getOrderItemTypeId());\n $form_display = commerce_get_entity_display('commerce_product', $edit['id'], 'form');\n $this->assertEmpty($form_display->getComponent('variations'));\n\n // Automatic variation type creation option, single variation mode.\n $this->drupalGet('admin/commerce/config/product-bundle-types/add');\n $edit = [\n 'id' => 'foo2',\n 'label' => 'Foo2',\n 'description' => 'My even more random product type',\n 'bundleItemType' => '',\n 'orderItemType' => 'commerce_product_bundle_default',\n ];\n $this->submitForm($edit, t('Save'));\n $product_bundle_type = ProductBundleType::load($edit['id']);\n $this->assertNotEmpty($product_bundle_type);\n $this->assertEquals($edit['label'], $product_bundle_type->label());\n $this->assertEquals($edit['description'], $product_bundle_type->getDescription());\n $this->assertEquals($edit['id'], $product_bundle_type->getBundleItemTypeId());\n $bundle_item_type = ProductBundleItemType::load($edit['id']);\n $this->assertNotEmpty($bundle_item_type);\n $this->assertEquals($bundle_item_type->label(), $edit['label']);\n\n // Confirm that a conflicting product bundle item type ID is detected.\n $product_bundle_type_id = $product_bundle_type->id();\n $product_bundle_type->delete();\n $this->drupalGet('admin/commerce/config/product-bundle-types/add');\n $edit = [\n 'id' => $product_bundle_type_id,\n 'label' => $this->randomMachineName(),\n 'description' => 'My even more random product bundle type',\n 'bundleItemType' => '',\n ];\n $this->submitForm($edit, t('Save'));\n $this->assertSession()\n ->pageTextContains(t('A product bundle item type with the machine name @name already exists. Select an existing product bundle item type or change the machine name for this product bundle type.', ['@name' => $product_bundle_type_id]));\n\n // Confirm that the form can't be submitted with no order item types.\n $default_order_item_type = OrderItemType::load('commerce_product_bundle_default');\n $this->assertNotEmpty($default_order_item_type);\n $default_order_item_type->delete();\n\n $this->drupalGet('admin/commerce/config/product-bundle-types/add');\n $edit = [\n 'id' => 'foo3',\n 'label' => 'Foo3',\n 'description' => 'Another random product type',\n 'bundleItemType' => '',\n ];\n $this->submitForm($edit, t('Save'));\n $this->assertSession()->pageTextContains(t('A new product bundle type cannot be created, because no order item types were found. Select an existing product bundle type or retry after creating a new order item type.'));\n\n // Confirm that a non-default order item type can be selected.\n $default_order_item_type->delete();\n OrderItemType::create([\n 'id' => 'test',\n 'label' => 'Test',\n 'orderType' => 'default',\n 'purchasableEntityType' => 'commerce_product_bundle',\n ])->save();\n\n $this->drupalGet('admin/commerce/config/product-bundle-types/add');\n $edit = [\n 'id' => 'foo4',\n 'label' => 'Foo4',\n 'description' => 'My even more random product bundle type',\n 'bundleItemType' => '',\n ];\n $this->submitForm($edit, t('Save'));\n $product_bundle_type = ProductBundleType::load($edit['id']);\n $this->assertNotEmpty($product_bundle_type);\n $this->assertEquals('test', $product_bundle_type->getOrderItemTypeId());\n $this->assertEquals($edit['label'], $product_bundle_type->label());\n $this->assertEquals($edit['description'], $product_bundle_type->getDescription());\n $this->assertEquals($edit['id'], $product_bundle_type->getBundleItemTypeId());\n $bundle_item_type = ProductBundleItemType::load($edit['id']);\n $this->assertNotEmpty($bundle_item_type);\n $this->assertEquals($edit['label'], $bundle_item_type->label());\n\n }", "protected function loadEntities($entity_type, $bundle_type) {\n $definition = $this->entityTypeManager->getDefinition($entity_type);\n\n $properties = [];\n\n // Get the key used for the bundle on this entity and set it to the query\n // properties if it exists.\n if ($bundle_key = $definition->getKey('bundle')) {\n $properties[$bundle_key] = $bundle_type;\n }\n\n return $this->entityTypeManager\n ->getStorage($entity_type)\n ->loadByProperties($properties);\n }", "protected function isBundle($path)\n {\n $is_bundle = false;\n\n //DIRECTORY_SEPARATOR\n $bundle = $path;\n\n /* What more can we do? Verify compression integrity?? */\n if (is_file($bundle) ) {\n $is_bundle = true;\n }\n\n return $is_bundle;\n }", "public function bundles()\n\t{\n\t\treturn $this->has_and_belongs_to_many('Listing', 'listing_tags', null, 'listing_id');\n\t}", "public function onBundleCreate($bundle, $entity_type_id);", "public function GetBundles()\n\t{\t$bundles = array();\n\t\t$sql = 'SELECT bundles.* FROM bundles, bundleproducts WHERE bundles.bid=bundleproducts.bid AND pid=' . (int)$this->id . ' AND bundleproducts.ptype=\"store\" ORDER BY bundles.bid';\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$bundles[$row['bid']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $bundles;\n\t}", "protected function getBundleOptions(string $entity_type_value) {\n if ($entity_type_value == 'user') {\n // User entities don't have bundle.\n return [$entity_type_value => $this->t('User')];\n }\n $bundles = $this->entityTypeManager->getStorage($entity_type_value . '_type')->loadMultiple();\n\n $bundles_options = [];\n foreach ($bundles as $bundle_id => $bundle_type) {\n $bundles_options[$bundle_id] = $bundle_type->get('name') ?? $bundle_id;\n }\n\n return $bundles_options;\n }", "public function has($type);", "public function has($type);", "public function isEntity()\n {\n $payload = $this->getPayload();\n return ($payload instanceof HalEntity);\n }", "public function testDisabledBundle() {\n // Create a bundle that does not have translation enabled.\n $disabledBundle = $this->randomMachineName();\n $this->drupalCreateContentType(['type' => $disabledBundle, 'name' => $disabledBundle]);\n\n // Create a node for each bundle.\n $node = $this->drupalCreateNode([\n 'type' => $this->bundle,\n 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,\n ]);\n\n // Make sure that nothing was inserted into the {content_translation} table.\n $nids = \\Drupal::entityQueryAggregate('node')\n ->aggregate('nid', 'COUNT')\n ->accessCheck(FALSE)\n ->condition('type', $this->bundle)\n ->conditionAggregate('nid', 'COUNT', 2, '>=')\n ->groupBy('nid')\n ->execute();\n $this->assertCount(0, $nids);\n\n // Ensure the translation tab is not accessible.\n $this->drupalGet('node/' . $node->id() . '/translations');\n $this->assertSession()->statusCodeEquals(403);\n }", "private function getBundles() {\n $bundles = array();\n #get all bundles with an entity folder:\n $kernel = $this->get('kernel');\n foreach ($kernel->getBundles() as $bundle) {\n $dir = $bundle->getPath() . '/Entity';\n if (is_dir($dir)) {\n $bundles[]= $bundle->getName();\n }\n }\n return $bundles;\n }", "public function hasVariants(): bool;", "protected function loadBundleDescriptions(array $bundles, EntityTypeInterface $bundle_entity_type) {\n if (!$bundle_entity_type->entityClassImplements(EntityDescriptionInterface::class)) {\n return $bundles;\n }\n $bundle_names = array_keys($bundles);\n $storage = $this->entityTypeManager->getStorage($bundle_entity_type->id());\n /** @var \\Drupal\\Core\\Entity\\EntityDescriptionInterface[] $bundle_entities */\n $bundle_entities = $storage->loadMultiple($bundle_names);\n foreach ($bundles as $bundle_name => &$bundle_info) {\n if (isset($bundle_entities[$bundle_name])) {\n $bundle_info['description'] = $bundle_entities[$bundle_name]->getDescription();\n }\n }\n\n return $bundles;\n }", "public function GetBundles($ptype = '')\n\t{\t$bundles = array();\n\t\t$sql = 'SELECT bundles.* FROM bundles, bundleproducts WHERE bundles.bid=bundleproducts.bid AND pid=' . (int)$this->id . ' AND bundleproducts.ptype=\"' . $this->SQLSafe($ptype) . '\" AND bundles.live=1';\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$bundles[$row['bid']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $bundles;\n\t}", "public function get($entity_type_id, $bundle);", "public function itemtype($type) {\n\t\treturn array_key_exists($type, ItemMasterItem::ITEMTYPE_DESCRIPTIONS);\n\t}", "function findBundlesOfSimple($id_to_find)\n {\n $bundles = array();\n $products = Mage::getModel('catalog/product')\n ->getCollection()\n ->addFieldToFilter('type_id','bundle');\n\n //loop over bundled products\n foreach($products as $product)\n {\n\n\n //get child product IDs\n $children_ids_by_option = $product\n ->getTypeInstance($product)\n ->getChildrenIds($product->getId(),false); //second boolean \"true\" will return only\n //required child products instead of all\n\n //flatten arrays (which are grouped by option)\n $ids = array();\n foreach($children_ids_by_option as $array)\n {\n $ids = array_merge($ids, $array);\n }\n\n //perform test and add to return value\n if(in_array($id_to_find, $ids))\n {\n if(strpos($product->getSku(), 'bundle') == false)\n $bundles[] = $product->getId();\n }\n\n\n }\n\n return $bundles;\n }", "public function hasType(){\n return $this->_has(1);\n }", "public function hasType(){\n return $this->_has(1);\n }", "public function hasType(){\n return $this->_has(1);\n }", "public function hasType(){\n return $this->_has(1);\n }", "public function hasType(){\n return $this->_has(1);\n }", "public function hasType(){\n return $this->_has(1);\n }", "public function hasType(){\n return $this->_has(1);\n }", "function _drush_behat_get_entity_field_types($entity_type) {\n $return = array();\n $fields = field_info_field_map();\n foreach ($fields as $field_name => $field) {\n if (array_key_exists($entity_type, $field['bundles'])) {\n $return[$field_name] = $field['type'];\n }\n }\n return $return;\n}", "public function hasType(){\n return $this->_has(2);\n }", "public function hasType(){\n return $this->_has(2);\n }", "public function hasType()\n {\n return $this->get(self::TYPE) !== null;\n }", "public function hasType()\n {\n return $this->get(self::TYPE) !== null;\n }", "public function contain($type)\n {\n return isset($this->types[$type]);\n }", "public function get($entity_type_id, $bundle_id);", "protected function getBundleInfo($entity_type_id, $bundle_name) {\n // @todo Load entity type in route system?\n if (!$this->entityTypeManager->hasDefinition($entity_type_id)) {\n throw new NotFoundHttpException($this->t('No entity type found: @type', ['@type' => $entity_type_id]));\n }\n $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);\n if ($bundle_entity_type_id = $entity_type->getBundleEntityType()) {\n $bundle = $this->entityTypeManager->getStorage($bundle_entity_type_id)->load($bundle_name);\n $bundle_info['label'] = $bundle->label();\n $bundle_info['fields'] = $this->getBundleFields($entity_type_id, $bundle_name);\n return $bundle_info;\n }\n else {\n $bundle_info['label'] = $entity_type->getLabel();\n $bundle_info['fields'] = $this->getBundleFields($entity_type_id, $bundle_name);\n return $bundle_info;\n }\n }", "public function isValidType($type)\n {\n // return class_exists('Jamesi\\\\NotificationBundle\\\\Notification\\\\'.$type.'Notification');\n return true;\n }", "function registration_type_load($type) {\n $types = registration_entity_types();\n $type = str_replace('-', '_', $type);\n return isset($types[$type]) ? $types[$type] : FALSE;\n}", "public function testIsSaleableOnBundleWithoutOptions()\n {\n $optionRepository = $this->objectManager->create(\\Magento\\Bundle\\Api\\ProductOptionRepositoryInterface::class);\n $bundleProduct = $this->productRepository->get('bundle-product');\n\n // TODO: make cleaner option deletion after fix MAGETWO-59465\n $ea = $bundleProduct->getExtensionAttributes();\n foreach ($ea->getBundleProductOptions() as $option) {\n $optionRepository->delete($option);\n }\n $ea->setBundleProductOptions([]);\n $bundleProduct->setExtensionAttributes($ea);\n\n $bundleProduct = $this->productRepository->save($bundleProduct);\n\n $this->assertFalse(\n $bundleProduct->isSalable(),\n 'Bundle product supposed to be non saleable'\n . ' if it has no options'\n );\n }", "public function isUsed(string $entityName): bool;", "public function hasType()\n {\n return $this->type !== null;\n }", "public function has($type=null);", "function entity_detect_init_version($entity_type, $module) {\n // Scans the module for persistent versions.\n $scanned_versions = entity_type_scan_versions($entity_type, $module);\n\n return in_array(INIT_VERSION, $scanned_versions);\n}", "public function getBundles()\n {\n return $this->bundles;\n }", "public function getBundles()\n {\n return $this->bundles;\n }", "function bundleSelectionList($entity_type) {\n $entity_info = entity_get_info($this->entityType);\n\n // Get the base path. We will probably be on ENTITYBASE/add, though of\n // course the declaration for this operation could have set a different\n // operation path. We create links with the bundle name appended to that,\n // which will also be handled by this operation.\n $base_path = $entity_info['operations ui']['path'] . '/' . $this->path;\n\n $items = array();\n foreach ($entity_info['bundles'] as $bundle_name => $bundle_info) {\n // Check access for each item.\n // Create a minimal entity with just the bundle for entity_access():\n // this always needs an entity, even for 'create' op.\n $values = array(\n $entity_info['entity keys']['bundle'] => $bundle_name,\n );\n $new_entity = entity_create($entity_type, $values);\n\n $verb = $this->getAccessVerb();\n $access = entity_access($verb, $entity_type, $new_entity);\n if ($access) {\n $items[] = l(t('Add @bundle', array('@bundle' => $bundle_info['label'])), \"$base_path/$bundle_name\");\n }\n }\n\n $build['links'][$bundle_name] = array(\n '#theme' => 'item_list',\n '#items' => $items,\n );\n\n return $build;\n }", "public function testIsSaleableOnBundleWithoutSaleableSelections()\n {\n $productsSku = ['simple1', 'simple2', 'simple3', 'simple4', 'simple5'];\n foreach ($productsSku as $productSku) {\n $product = $this->productRepository->get($productSku);\n $product->setStatus(\\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_DISABLED);\n $this->productRepository->save($product);\n }\n\n $bundleProduct = $this->productRepository->get('bundle-product');\n\n $this->assertFalse(\n $bundleProduct->isSalable(),\n 'Bundle product supposed to be non saleable'\n . ' if all his selections are not saleable'\n );\n }", "public function has(string $type): bool;", "public function hasEntity ()\n {\n return (boolean) $this->_entity;\n }", "function is_embeddable_type($entity = null, $type = '', $subtype = '') {\r\n\r\n\tif (elgg_instanceof($entity)) {\r\n\t\t$type = $entity->getType();\r\n\t\t$subtype = $entity->getSubtype();\r\n\t\t$subtype = ($subtype) ? $subtype : 'default';\r\n\t}\r\n\r\n\tif (!in_array(\"$type::$subtype\", elgg_get_config('discovery_embed_type_subtype_pairs'))) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn true;\r\n}", "protected function isValidEntity($entity_type) {\n return $this->entityTypes[$entity_type]->get('field_ui_base_route') && $this->entityTypes[$entity_type]->hasViewBuilderClass();\n }", "public function getType() {\n return $this->bundle();\n }", "public function testGetAllBundleInfo() {\n $return = ['node' => ['article' => ['label' => 'Article']]];\n $this->entityTypeBundleInfo->getAllBundleInfo()->shouldBeCalled()->willReturn($return);\n $this->assertEquals($return, $this->entityManager->getAllBundleInfo());\n }", "public function has($type = 'all')\n\t{\n return ! empty($this->get($type));\n\t}", "public function getEnabledBundles() : array {}", "protected function getAllEntities(string $type, string $bundle) : array {\n $values = [\n 'type' => $bundle,\n ];\n $nodes = \\Drupal::entityTypeManager()\n ->getListBuilder($type)\n ->getStorage()\n ->loadByProperties($values);\n $return = [];\n foreach ($nodes as $node) {\n $return[] = new Entity($node);\n }\n return $return;\n }", "public function hasType()\n {\n return isset($this->type);\n }", "public function hasType()\n {\n return isset($this->type);\n }", "protected function entityHasProperty($entity_type, $property) {\n $entity_info = entity_get_info($entity_type);\n $entity_fields = $entity_info['schema_fields_sql']['base table'];\n\n return (is_null($entity_fields) ? FALSE : (array_search($property, $entity_fields) ? TRUE : FALSE));\n }", "public function getAvailableBundles() : array {}", "function drush_multilingual_audit_check_wb_mod() {\n $result = array();\n\n $entity_info = entity_get_info('node');\n foreach (array_keys($entity_info['bundles']) as $content_type) {\n $options = variable_get('node_options_' . $content_type, array());\n\n if (in_array('revision', $options) && in_array('moderation', $options)) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', $content_type);\n $count = $query->count()->execute();\n\n $result[] = array(\n 'node-type' => $content_type,\n 'count' => $count,\n );\n }\n }\n\n if (empty($result)) {\n drush_print('Workbench Moderation is not enabled on this site.');\n }\n\n return $result;\n\n}", "public function addPage($entity_type_id) {\n $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id);\n $bundle_key = $entity_type->getKey('bundle');\n $bundle_entity_type_id = $entity_type->getBundleEntityType();\n $build = [\n '#theme' => 'entity_add_list',\n '#bundles' => [],\n ];\n if ($bundle_entity_type_id) {\n $bundle_argument = $bundle_entity_type_id;\n $bundle_entity_type = $this->entityTypeManager->getDefinition($bundle_entity_type_id);\n $bundle_entity_type_label = $bundle_entity_type->getSingularLabel();\n $build['#cache']['tags'] = $bundle_entity_type->getListCacheTags();\n\n // Build the message shown when there are no bundles.\n /*$link_text = $this->t('Add a new @entity_type.', ['@entity_type' => $bundle_entity_type_label]);\n $link_route_name = 'entity.' . $bundle_entity_type->id() . '.add_form';\n $build['#add_bundle_message'] = $this->t('There is no @entity_type yet. @add_link', [\n '@entity_type' => $bundle_entity_type_label,\n '@add_link' => Link::createFromRoute($link_text, $link_route_name)->toString(),\n ]);*/\n // Filter out the bundles the user doesn't have access to.\n $access_control_handler = $this->entityTypeManager->getAccessControlHandler($entity_type_id);\n foreach ($bundles as $bundle_name => $bundle_info) {\n $access = $access_control_handler->createAccess($bundle_name, NULL, [], TRUE);\n if (!$access->isAllowed()) {\n unset($bundles[$bundle_name]);\n }\n $this->renderer->addCacheableDependency($build, $access);\n }\n // Add descriptions from the bundle entities.\n $bundles = $this->loadBundleDescriptions($bundles, $bundle_entity_type);\n }\n else {\n $bundle_argument = $bundle_key;\n }\n\n $form_route_name = 'entity.' . $entity_type_id . '.add_form';\n // Redirect if there's only one bundle available.\n if (count($bundles) == 1) {\n $bundle_names = array_keys($bundles);\n $bundle_name = reset($bundle_names);\n return $this->redirect($form_route_name, [$bundle_argument => $bundle_name]);\n }\n // Prepare the #bundles array for the template.\n foreach ($bundles as $bundle_name => $bundle_info) {\n // 将路由参数传递下去.\n $parameters = \\Drupal::routeMatch()->getParameters();\n $route_parameters = [];\n foreach ($parameters->all() as $key => $value) {\n if (!in_array($key, ['entity_type_id', 'target_entity_type'])) {\n $route_parameters[$key] = $value;\n }\n }\n $route_parameters[$bundle_argument] = $bundle_name;\n $build['#bundles'][$bundle_name] = [\n 'label' => $bundle_info['label'],\n 'description' => isset($bundle_info['description']) ? $bundle_info['description'] : '',\n 'add_link' => Link::createFromRoute($bundle_info['label'], $form_route_name, $route_parameters),\n ];\n }\n\n return $build;\n }", "protected function getBundleProperty() {\n return \"type\";\n }", "public function getParseableBundles()\n {\n if (null === $this->settings) {\n $this->loadSettings();\n }\n\n if (null === $this->bundles) {\n $this->bundles = array();\n\n foreach ($this->settings['bundles'] as $properties) {\n\n if ( isset($properties['active']) && (true === $properties['active']) ) {\n\n if ('' !== $properties['namespace']) {\n $this->bundles[] = $properties['namespace'];\n }\n }\n }\n }\n\n return $this->bundles;\n }", "public function bundleLabel() {\n return backshop_entity_bundle_label($this->entityType(), $this->bundle());\n }", "public function bitlyGetBundlesByUser() {\n $url = sprintf('%s%s?%s',\n $this->bitly_url,\n '/v3/bundle/bundles_by_user',\n http_build_query(array(\n 'access_token' => $this->access_token,\n 'user' => $this->login_name,\n ))\n );\n if (false === ($result = $this->get($url))) return false;\n\n $result = json_decode($result, true);\n if ($result['status_code'] == 200)\n return $result['data']['bundles'];\n // something went wrong, return the status code and text\n $this->setError(sprintf('[%s - %s] Error code: %d - %s', __METHOD__, __LINE__,\n $result['status_code'], $result['status_txt']));\n return false;\n }", "function entity_is_up2date($entity_type) {\n $registry = etbx_registry_get_info($entity_type);\n $registered = entity_registered_versions($entity_type);\n\n return $registry['version'] == end($registered);\n}", "public function hasBrands()\n {\n return count($this->getBrandCollection()) > 0;\n }", "function isModuleBundle($zipfile = null) {\n\t\t// If data is not yet available\n\t\tif(!empty($zipfile)) {\n\t\t\tif(!$this->checkZip($zipfile)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn (boolean)$this->_modulexml->modulebundle;\n\t}", "public function isArray() {\n\t\treturn $this->subType !== null;\n\t}", "public function addPage($entity_type_id) {\n $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id);\n $bundle_key = $entity_type->getKey('bundle');\n $bundle_entity_type_id = $entity_type->getBundleEntityType();\n $build = [\n '#theme' => 'entity_add_list',\n '#bundles' => [],\n ];\n if ($bundle_entity_type_id) {\n $bundle_argument = $bundle_entity_type_id;\n $bundle_entity_type = $this->entityTypeManager->getDefinition($bundle_entity_type_id);\n $bundle_entity_type_label = $bundle_entity_type->getSingularLabel();\n $build['#cache']['tags'] = $bundle_entity_type->getListCacheTags();\n\n // Build the message shown when there are no bundles.\n $link_text = $this->t('Add a new @entity_type.', ['@entity_type' => $bundle_entity_type_label]);\n $link_route_name = 'entity.' . $bundle_entity_type->id() . '.add_form';\n $build['#add_bundle_message'] = $this->t('There is no @entity_type yet. @add_link', [\n '@entity_type' => $bundle_entity_type_label,\n '@add_link' => Link::createFromRoute($link_text, $link_route_name)->toString(),\n ]);\n // Filter out the bundles the user doesn't have access to.\n $access_control_handler = $this->entityTypeManager->getAccessControlHandler($entity_type_id);\n foreach ($bundles as $bundle_name => $bundle_info) {\n $access = $access_control_handler->createAccess($bundle_name, NULL, [], TRUE);\n if (!$access->isAllowed()) {\n unset($bundles[$bundle_name]);\n }\n $this->renderer->addCacheableDependency($build, $access);\n }\n // Add descriptions from the bundle entities.\n $bundles = $this->loadBundleDescriptions($bundles, $bundle_entity_type);\n }\n else {\n $bundle_argument = $bundle_key;\n }\n\n $form_route_name = 'entity.' . $entity_type_id . '.add_form';\n // Redirect if there's only one bundle available.\n if (count($bundles) == 1) {\n $bundle_names = array_keys($bundles);\n $bundle_name = reset($bundle_names);\n return $this->redirect($form_route_name, [$bundle_argument => $bundle_name]);\n }\n // Prepare the #bundles array for the template.\n foreach ($bundles as $bundle_name => $bundle_info) {\n $build['#bundles'][$bundle_name] = [\n 'label' => $bundle_info['label'],\n 'description' => $bundle_info['description'] ?? '',\n 'add_link' => Link::createFromRoute($bundle_info['label'], $form_route_name, [$bundle_argument => $bundle_name]),\n ];\n }\n\n return $build;\n }", "public static function IsDefined($entityTypeId): bool\n\t{\n\t\t$entityTypeId = (int)$entityTypeId;\n\n\t\t$isStatic = $entityTypeId === self::System\n\t\t\t|| ($entityTypeId >= self::FirstOwnerType && $entityTypeId <= self::LastOwnerType);\n\n\t\tif ($isStatic)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!static::isPossibleDynamicTypeId($entityTypeId) && !static::isPossibleSuspendedDynamicTypeId($entityTypeId))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (\n\t\t\tContainer::getInstance()->getTypeByEntityTypeId(static::getRealDynamicTypeId($entityTypeId)) !== null\n\t\t);\n\t}", "public function getBundleBlock()\n {\n return $this->blockFactory->create(\n 'Magento\\Bundle\\Test\\Block\\Catalog\\Product\\View\\Type\\Bundle',\n ['element' => $this->_rootElement->find($this->bundleBlock, Locator::SELECTOR_XPATH)]\n );\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function entityTypeChosenAjax(array $form, FormStateInterface $form_state) {\n return $form['entity_bundle'];\n }", "public function installBundles(EntityTypeInterface $entity_type, array $modules);" ]
[ "0.6858517", "0.66971356", "0.6285285", "0.6135993", "0.60852104", "0.59380966", "0.5885564", "0.58103913", "0.5778621", "0.562564", "0.5581612", "0.5549324", "0.5541011", "0.5535102", "0.5477555", "0.54487175", "0.5432886", "0.5431019", "0.5428822", "0.5413484", "0.5412272", "0.5409517", "0.5406078", "0.5369446", "0.5367517", "0.53638035", "0.533381", "0.53017855", "0.5295795", "0.52884555", "0.52852756", "0.52840465", "0.52566534", "0.525029", "0.5247641", "0.5247641", "0.5246115", "0.523045", "0.52252436", "0.52130514", "0.5180377", "0.5172935", "0.51715297", "0.5167382", "0.51656383", "0.51646733", "0.51646733", "0.51646733", "0.51646733", "0.51646733", "0.51646733", "0.51646733", "0.51584166", "0.5153381", "0.5153381", "0.5149535", "0.5149535", "0.51493794", "0.51417553", "0.5136929", "0.5096128", "0.50953907", "0.5089621", "0.5070739", "0.5070513", "0.5068513", "0.50635743", "0.5059409", "0.5059409", "0.50583464", "0.50582194", "0.50533104", "0.5050879", "0.5047362", "0.5035455", "0.5032016", "0.50282055", "0.50279826", "0.50208306", "0.5012795", "0.50089115", "0.50089115", "0.5004655", "0.50046086", "0.49888536", "0.4985216", "0.49774027", "0.49737808", "0.49641234", "0.4960045", "0.49595624", "0.4948605", "0.4937588", "0.49288285", "0.49269316", "0.4925193", "0.49247375", "0.49176797", "0.48936525", "0.48913455" ]
0.8739903
0
Retrieves the entity type bundle machine names.
Получает машинные имена пакетов типов сущностей.
public function getEntityTypeBundleMachineNames($entity_type) { return array_keys($this->getBundleInfo($entity_type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEntityTypeBundleInfo();", "function entity_get_bundles($entity_type) {\n return entity_toolbox_controller($entity_type)->getBundles();\n}", "protected function getEntityTypes(){\r\n $entity_types = $this->entityTypeManager->getDefinitions();\r\n \r\n return array_combine(array_keys($entity_types), array_map(function($definition){\r\n return $definition->getLabel();\r\n },$entity_types));\r\n }", "public function getContentEntityTypeBundleInfo() {\n\n $bundleInfo = $this->helperBaseService->getEntityTypeBundleInfo()->getAllBundleInfo();\n $results = [];\n try {\n foreach ($bundleInfo as $entityType => $bundles) {\n if ($this->helperBaseService->getEntityTypeDefinition($entityType)->entityClassImplements(FieldableEntityInterface::class)) {\n if ($this->helperBaseService->getEntityTypeDefinition($entityType)->entityClassImplements(ContentEntityInterface::class)) {\n $results[$entityType] = $bundles;\n }\n }\n }\n }\n catch (\\Exception $exception) {\n $this->helperBaseService->catchException($exception);\n }\n\n return $results;\n }", "public function getAllBundles()\n {\n return $this->entityTypeBundleInfo->getBundleInfo($this->getEntityType());\n }", "public function getEntityTypes()\n {\n return $this->entity_types;\n }", "private function getEntities()\n {\n return [\n 'catalog_category_entity' => 'CatalogCategoryEntity',\n 'catalog_category_entity_int' => 'CatalogCategoryEntityInt',\n 'catalog_category_entity_varchar' => 'CatalogCategoryEntityVarchar',\n 'catalog_category_product' => 'CatalogCategoryProduct',\n 'catalog_product_entity' => 'CatalogProductEntity',\n 'catalog_product_entity_int' => 'CatalogProductEntityInt',\n 'catalog_product_entity_text' => 'CatalogProductEntityText',\n 'catalog_product_entity_varchar' => 'CatalogProductEntityVarchar',\n 'catalog_product_index_price' => 'CatalogProductIndexPrice',\n 'catalog_product_website' => 'CatalogProductWebsite',\n 'cms_page' => 'CmsPage',\n 'cms_page_store' => 'CmsPageStore',\n 'eav_attribute' => 'EavAttribute',\n ];\n }", "private function getBundles() {\n $bundles = array();\n #get all bundles with an entity folder:\n $kernel = $this->get('kernel');\n foreach ($kernel->getBundles() as $bundle) {\n $dir = $bundle->getPath() . '/Entity';\n if (is_dir($dir)) {\n $bundles[]= $bundle->getName();\n }\n }\n return $bundles;\n }", "private function getI18nsEntities()\n {\n $entities = [];\n $metaData = $this->entityManager->getMetadataFactory()->getAllMetadata();\n\n foreach ($metaData as $data) {\n\n if ($data->getReflectionClass()->getModifiers() === 0) {\n\n $classname = $data->getName();\n $entity = new $classname();\n\n $interface = method_exists($entity, 'getInterface') ? $entity::getInterface() : [];\n $hasI18n = method_exists($entity, 'getI18ns') || method_exists($entity, 'getI18n');\n $inSearch = !empty($interface['search']) && $interface['search'];\n\n if ($hasI18n && $inSearch) {\n\n $interfaceName = method_exists($entity, 'getInterface') && !empty($entity::getInterface()['name'])\n ? $entity::getInterface()['name'] : NULL;\n $translation = $interfaceName\n ? $this->translator->trans('singular', [], 'entity_' . $entity::getInterface()['name'])\n : $classname;\n $label = $interfaceName && $translation !== 'singular' ? $translation : $classname;\n $entities[$label] = $classname;\n }\n }\n }\n\n $entities['PDF'] = 'pdf';\n\n return $entities;\n }", "protected function getEntityTypes() {\n if (!isset($this->entityTypes)) {\n $this->entityTypes = $this->entityTypeManager->getDefinitions();\n }\n return $this->entityTypes;\n }", "public function getMappedEntities() {\r\n $entities = [];\r\n array_map(function (Type $type) use(&$entities) {\r\n $entities[$type->getModel()] = $type->getName();\r\n }, $this->types);\r\n return $entities;\r\n }", "public function getEntityTypes(): array;", "public function getEntitySetName()\n\t\t{\n\t\t\treturn $this->entitySetName;\n\t\t}", "public function getEntityTypeDefinitions();", "public function getAllEntityNames()\n {\n if (empty($this->_entityNames)) {\n $this->_entityNames = $this->loadAllEntityNames();\n }\n return $this->_entityNames;\n }", "public function getEntityTypeBundlesList($entity_type_id) {\n $entity_type = $this->entityTypeManager\n ->getDefinition($entity_type_id);\n\n $bundle_entity_type = $entity_type\n ->getBundleEntityType();\n\n $bundles = [];\n\n if (is_null($bundle_entity_type)) {\n return $bundles;\n }\n\n $entity_bundles = $this->entityTypeManager\n ->getStorage($bundle_entity_type)\n ->loadMultiple();\n\n foreach ($entity_bundles as $entity_bundle_id => $entity_bundle) {\n $bundles[$entity_bundle_id] = $entity_bundle->label();\n }\n\n return $bundles;\n }", "protected function getEntityTypeData() {\n $data_sets = [];\n $sitemap_entity_types = $this->entityHelper->getSitemapEntityTypes();\n $entity_types = $this->generator->getBundleSettings();\n foreach ($entity_types as $entity_type_name => $bundles) {\n if (isset($sitemap_entity_types[$entity_type_name])) {\n $keys = $sitemap_entity_types[$entity_type_name]->getKeys();\n\n // Menu fix.\n $keys['bundle'] = $entity_type_name == 'menu_link_content' ? 'menu_name' : $keys['bundle'];\n\n foreach ($bundles as $bundle_name => $bundle_settings) {\n if ($bundle_settings['index']) {\n $data_sets[] = [\n 'bundle_settings' => $bundle_settings,\n 'bundle_name' => $bundle_name,\n 'entity_type_name' => $entity_type_name,\n 'keys' => $keys,\n ];\n }\n }\n }\n }\n return $data_sets;\n }", "public function getEntityTypeManager() {\n return \\Drupal::entityTypeManager();\n }", "function registration_entity_types() {\n $types = &drupal_static(__FUNCTION__);\n if (empty($types)) {\n // types array is empty, so lets load it\n $types = array();\n \n $tq = db_select('registration_type', 'rt')->fields('rt')->execute();\n foreach ($tq as $row) {\n $types[$row->type] = $row;\n }\n }\n return $types;\n}", "protected function getBundleOptions(string $entity_type_value) {\n if ($entity_type_value == 'user') {\n // User entities don't have bundle.\n return [$entity_type_value => $this->t('User')];\n }\n $bundles = $this->entityTypeManager->getStorage($entity_type_value . '_type')->loadMultiple();\n\n $bundles_options = [];\n foreach ($bundles as $bundle_id => $bundle_type) {\n $bundles_options[$bundle_id] = $bundle_type->get('name') ?? $bundle_id;\n }\n\n return $bundles_options;\n }", "private function getOptionsFromEntity(ContentEntityType $content_entity_type) {\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($content_entity_type->id());\n $options = [];\n foreach ($bundles as $key => $bundle) {\n $options[$key] = $bundle['label'];\n }\n return $options;\n }", "public function getEntityType() : string\n {\n return $this->fullObjectSet->getEntityType();\n }", "public function getGermplasmTypes() {\n $model = new YiiGermplasmModel();\n \n $germplasmTypes = [];\n $model->page = 0;\n $model->pageSize = Yii::$app->params['webServicePageSizeMax'];\n $germplasmTypesConcepts = $model->getGermplasmTypes(Yii::$app->session[WSConstants::ACCESS_TOKEN]);\n if ($germplasmTypesConcepts === WSConstants::TOKEN_INVALID) {\n return WSConstants::TOKEN_INVALID;\n } else {\n foreach ($germplasmTypesConcepts[WSConstants::DATA] as $germplasmType) {\n $germplasmTypes[$germplasmType->uri] = $germplasmType->uri;\n }\n } \n return $germplasmTypes;\n }", "function getPluralTypeFromMachineName($machine_name) {\n return getMachineNames()[$machine_name]['plural'];\n}", "public static function getEntityTypes() {\n\t\treturn ['group', 'object', 'site', 'user'];\n\t}", "function _drush_behat_get_entity_field_types($entity_type) {\n $return = array();\n $fields = field_info_field_map();\n foreach ($fields as $field_name => $field) {\n if (array_key_exists($entity_type, $field['bundles'])) {\n $return[$field_name] = $field['type'];\n }\n }\n return $return;\n}", "public function getVocabularyMachineName() {\n return $this->vocabulary_machine_name;\n }", "function entity_get_types($entity_type, $type = NULL) {\n return entity_toolbox_controller($entity_type)->types($type);\n}", "public function getLabelEntities()\n\t{\n\t\treturn array(\n\t\t\t'labels_organizations' => 'DeskPRO:LabelOrganization',\n\t\t\t'labels_people' => 'DeskPRO:LabelPerson',\n\t\t\t'labels_tickets' => 'DeskPRO:LabelTicket',\n\t\t\t'labels_articles' => 'DeskPRO:LabelArticle',\n\t\t\t'labels_feedback' => 'DeskPRO:LabelFeedback',\n\t\t\t'labels_downloads' => 'DeskPRO:LabelDownload',\n\t\t\t'labels_news' => 'DeskPRO:LabelNews',\n\t\t);\n\t}", "function entity_registered_versions($entity_type, $module = NULL) {\n // Loads the registered versions, if any.\n $registry_versions = etbx_registry_version_load($entity_type);\n\n return $registry_versions;\n}", "function entity_tools_get_supported_entity_types(): array {\n\tstatic $result;\n\t\n\tif (isset($result)) {\n\t\treturn $result;\n\t}\n\t\n\t$defaults = [];\n\tif (elgg_is_active_plugin('blog')) {\n\t\t$defaults['blog'] = Blog::class;\n\t}\n\t\n\tif (elgg_is_active_plugin('discussions')) {\n\t\t$defaults['discussion'] = Discussion::class;\n\t}\n\t\n\tif (elgg_is_active_plugin('thewire')) {\n\t\t$defaults['thewire'] = TheWire::class;\n\t}\n\t\n\tif (elgg_is_active_plugin('pages')) {\n\t\t$defaults['page'] = Pages::class;\n\t}\n\t\n\t$result = (array) elgg_trigger_event_results('supported_types', 'entity_tools', [], $defaults);\n\t\n\t// make sure we have valid classes\n\tforeach ($result as $subtype => $class) {\n\t\tif (is_subclass_of($class, Migrate::class)) {\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\telgg_log(\"{$class} needs to implement \" . Migrate::class, 'ERROR');\n\t\tunset($result[$subtype]);\n\t}\n\t\n\treturn $result;\n}", "private function getContainerNames($entityType, $bundle) {\n // Lists field instances that use Glazed Builder as default field formatter, used in Glazed Container element\n\n // Get the display for the bundle\n $display = $this->entityTypeManager\n ->getStorage('entity_view_display')\n ->load($entityType . '.' . $bundle . '.default');\n\n $fields = $this->entityFieldManager->getFieldDefinitions($entityType, $bundle);\n // Loop through each of the fields\n foreach ($fields as $field) {\n // Get the formatter for the field\n $renderer = $display->getRenderer($field->getName());\n if ($renderer) {\n // Check to see if the formatter is glazed_builder_text\n if ($renderer->getBaseId() == 'glazed_builder_text') {\n $glazed_fields[$field->getName()] = $field->getLabel();\n }\n }\n }\n\n $query = $this->entityTypeManager->getStorage($entityType)->getQuery();\n $entity_ids = $query->condition('type', $bundle)\n ->execute();\n $entities = $this->entityTypeManager->getStorage($entityType)->loadMultiple($entity_ids);\n foreach ($entities as $entity_id => $entity) {\n // return the translated entites if exist.\n if ($entity->isTranslatable()) {\n foreach ($glazed_fields as $field_name => $field_label) {\n $languages = $entity->getTranslationLanguages();\n foreach ($languages as $langcode => $language) {\n $translatedEntity = $entity->getTranslation($langcode);\n $container_names[$translatedEntity->id() . '|' . $field_name . '|' . $langcode] = $translatedEntity->label() . '|' . $field_label;\n }\n }\n } else {\n foreach ($glazed_fields as $field_name => $field_label) {\n $container_names[$entity_id . '|' . $field_name] = $entity->label() . '|' . $field_label;\n }\n }\n }\n\n return new JsonResponse($container_names);\n }", "public function listEntities()\n {\n return array_keys($this->_ENTITIES);\n }", "protected function getAllEntities(string $type, string $bundle) : array {\n $values = [\n 'type' => $bundle,\n ];\n $nodes = \\Drupal::entityTypeManager()\n ->getListBuilder($type)\n ->getStorage()\n ->loadByProperties($values);\n $return = [];\n foreach ($nodes as $node) {\n $return[] = new Entity($node);\n }\n return $return;\n }", "public function getEnabledBundleNames() : array {}", "public function getEnabledBundleNames() : array {}", "public function getEntityTypeCode(): string\n {\n return self::ENTITY_CODE;\n }", "public function getMachineType()\n {\n return $this->machine_type;\n }", "public function getEntityNamespaces()\n {\n return $this->entityNamespaces;\n }", "public function indexServerTypes()\n {\n return $this->serverService->getServerTypes();\n }", "public function getBundleNames()\n {\n $names = array();\n foreach ($this->bundles as $bundle) {\n $names[] = $bundle->getName();\n }\n\n return $names;\n }", "protected function findContent($content_type) {\n $names = [\n '' => $this->t('- Select -'),\n ];\n // For a given entity type, load all entities.\n if ($content_type) {\n $entity_storage = $this->entityBundleManager->getBundleInfo($content_type);\n foreach ($entity_storage as $entityKey => $entity) {\n $entity_id = $entityKey;\n if ($label = $entity['label']) {\n $names[$entity_id] = new TranslatableMarkup('@label (@id)', ['@label' => $label, '@id' => $entity_id]);\n }\n else {\n $names[$entity_id] = $entity_id;\n }\n }\n }\n return $names;\n }", "private function buildEntityNameList()\n {\n $classNameList = array(\n 'IC\\Bundle\\Core\\FieldBundle\\Entity\\Field',\n 'IC\\Bundle\\Core\\FieldBundle\\Entity\\FieldChoice',\n );\n\n $entityNameList = new ArrayCollection($classNameList);\n\n return $entityNameList;\n }", "function getEntitytype() {\n\t\tAPP::import('Model','Entity');\n\t\t$this->Entity = new Entity(); \n\t\treturn $this->Entity->find('list',array('conditions'=>array('publish'=>'yes'),'fields'=>array('id','entity_name')));\n\t}", "protected function entityName()\n {\n return static::ENTITY_CLASSNAME;\n }", "public function getEntityType()\n {\n if (empty($this->_type)) {\n /* equals to eav_entity_type.entity_type_code */\n /* which further equals to /app/code/Foggyline/Office/Setup/EmployeeSetup.php, key value under the return array of getDefaultEntities method */\n $this->setType(\\Foggyline\\Office\\Model\\Employee::ENTITY); /* Here we assigned full, sor of name-spaced value for entity type */\n }\n return parent::getEntityType();\n }", "public function getEducationalMaterialTypes() {\n\n // Initialize list of types, separate languages\n $types = array();\n try {\n\t\t\t$host_db_link = new PDO( OPAL_DB_DSN, OPAL_DB_USERNAME, OPAL_DB_PASSWORD );\n $host_db_link->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n $sql = \"\n SELECT DISTINCT\n em.EducationalMaterialType_EN,\n em.EducationalMaterialType_FR\n FROM\n EducationalMaterialControl em\n \";\n\t\t\t$query = $host_db_link->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t$query->execute();\n\n\t\t\twhile ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n $typeDetails = array(\n 'EN' => $data[0],\n 'FR' => $data[1]\n );\n array_push($types, $typeDetails);\n }\n\n return $types;\n\n\t } catch (PDOException $e) {\n\t\t\techo $e->getMessage();\n\t\t\treturn $types;\n\t\t}\n }", "function entity_type_get_versions($entity_type, $module) {\n $registered = entity_registered_versions($entity_type, $module);\n $unregistered = entity_unregistered_versions($entity_type, $module);\n\n return $registered + $unregistered;\n}", "public static function getManagerNames()\n {\n /** @var \\LaravelDoctrine\\ORM\\IlluminateRegistry $instance */\n return $instance->getManagerNames();\n }", "public function getEntityManagers()\n {\n return $this->entityManagers;\n }", "public function getEntityType()\n {\n return $this->entityType;\n }", "public function getEntityType()\n {\n return $this->entityType;\n }", "public function getEntityTypeCode()\n {\n return isset($this->_data['entity_type_code']) ? $this->_data['entity_type_code'] : null;\n }", "public function getNamedEntities()\n {\n return array(\n array('type1', '&ldquo;', '&rdquo;', '&ldquo; &rdquo;'),\n array('type2', '&bdquo;', '&ldquo;', '&bdquo; &ldquo;'),\n array('type3', '&bdquo;', '&rdquo;', '&bdquo; &rdquo;'),\n array('type4', '&rdquo;', '&rdquo;', '&rdquo; &rdquo;'),\n array('type5', '&ldquo;', '&bdquo;', '&ldquo; &bdquo;'),\n array('type6', '&#171;&#160;', '&#160;&#187;', '&laquo;&nbsp; &nbsp;&raquo;'),\n array('type7', '&#187;', '&#171;', '&raquo; &laquo;'),\n array('type8', '&#187;', '&#187;', '&raquo; &raquo;'),\n );\n }", "public function getEntities()\n {\n // Get tables data\n return $this->database->fetch(\n 'SELECT\n `TABLES`.`TABLE_NAME` as `Table`,\n `COLUMNS`.`COLUMN_NAME` as `Field`,\n `COLUMNS`.`DATA_TYPE` as `Type`,\n `COLUMNS`.`IS_NULLABLE` as `Null`,\n `COLUMNS`.`COLUMN_KEY` as `Key`,\n `COLUMNS`.`COLUMN_DEFAULT` as `Default`,\n `COLUMNS`.`EXTRA` as `Extra`\n FROM `information_schema`.`TABLES` as `TABLES`\n LEFT JOIN `information_schema`.`COLUMNS` as `COLUMNS`\n ON `TABLES`.`TABLE_NAME`=`COLUMNS`.`TABLE_NAME`\n WHERE `TABLES`.`TABLE_SCHEMA`=\"' . $this->database->database() . '\"\n AND `COLUMNS`.`TABLE_SCHEMA`=\"' . $this->database->database() . '\"\n AND `TABLES`.`TABLE_NAME` != \"cms_version\"\n ');\n }", "public function getEntityType() {\n return $this->entityType;\n }", "public function getEntityType() {\n return $this->entityType;\n }", "private function __getMachine(&$m) {\r\n\r\n\t\t$version = $this->getVersion();\r\n\r\n\t\treturn array(\r\n\t\t\t'name' => $m->name,\r\n\t\t\t'description' => $m->description,\r\n\t\t\t'id' => $m->id,\r\n\t\t\t'OSTypeId' => $m->OSTypeId,\r\n\t\t\t'CPUCount' => $m->CPUCount,\r\n\t\t\t'memorySize' => $m->memorySize,\r\n\t\t\t'VRAMSize' => $m->VRAMSize,\r\n\t\t\t'accelerate3DEnabled' => $m->accelerate3DEnabled,\r\n\t\t\t'accelerate2DVideoEnabled' => $m->accelerate2DVideoEnabled,\r\n\t\t\t'BIOSSettings' => array(\r\n\t\t\t\t'ACPIEnabled' => $m->BIOSSettings->ACPIEnabled,\r\n\t\t\t\t'IOAPICEnabled' => $m->BIOSSettings->IOAPICEnabled,\r\n\t\t\t\t'timeOffset' => $m->BIOSSettings->timeOffset\r\n\t\t\t\t),\r\n\t\t\t'firmwareType' => (string)$m->firmwareType,\r\n\t\t\t'snapshotFolder' => $m->snapshotFolder,\r\n\t\t\t'monitorCount' => $m->monitorCount,\r\n\t\t\t'VRDPServer' => ($version['ose'] ? null : array(\r\n\t\t\t\t'enabled' => $m->VRDPServer->enabled,\r\n\t\t\t\t'ports' => $m->VRDPServer->ports,\r\n\t\t\t\t'netAddress' => $m->VRDPServer->netAddress,\r\n\t\t\t\t'authType' => (string)$m->VRDPServer->authType,\r\n\t\t\t\t'authTimeout' => $m->VRDPServer->authTimeout\r\n\t\t\t\t)),\r\n\t\t\t'audioAdapter' => array(\r\n\t\t\t\t'enabled' => $m->audioAdapter->enabled,\r\n\t\t\t\t'audioController' => (string)$m->audioAdapter->audioController,\r\n\t\t\t\t'audioDriver' => (string)$m->audioAdapter->audioDriver,\r\n\t\t\t\t),\r\n\t\t\t'clipboardMode' => (string)$m->clipboardMode,\r\n\t\t\t'RTCUseUTC' => $m->RTCUseUTC,\r\n\t\t\t'HWVirtExProperties' => array(\r\n\t\t\t\t'Enabled' => $m->getHWVirtExProperty('Enabled'),\r\n\t\t\t\t'NestedPaging' => $m->getHWVirtExProperty('NestedPaging')\r\n\t\t\t\t),\r\n\t\t\t'CpuProperties' => array(\r\n\t\t\t\t'PAE' => $m->getCpuProperty('PAE')\r\n\t\t\t\t),\r\n\t\t\t'bootOrder' => $this->__getBootOrder($m),\r\n\t\t\t'GUI' => array('SaveMountedAtRuntime' => $m->getExtraData('GUI/SaveMountedAtRuntime')),\r\n\r\n\t\t);\r\n\r\n\t}", "public function bundleLabel() {\n return backshop_entity_bundle_label($this->entityType(), $this->bundle());\n }", "public static function getEntities(): array\n {\n return [];\n }", "public function getBundles() {\n\t\trequire_once 'NimbusecAPI.php';\n\t\t$api = new NimbusecAPI($this->key, $this->secret, $this->server);\n\t\t$bundles = $api->findBundles();\n\t\t\n\n\t\treturn $bundles;\n\t}", "public static function getEntityType()\n {\n return kebab_case(class_basename(static::class));\n }", "public function GetBundles()\n\t{\t$bundles = array();\n\t\t$sql = 'SELECT bundles.* FROM bundles, bundleproducts WHERE bundles.bid=bundleproducts.bid AND pid=' . (int)$this->id . ' AND bundleproducts.ptype=\"store\" ORDER BY bundles.bid';\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$bundles[$row['bid']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $bundles;\n\t}", "function method_not_in_entityTypeManager() {\n $group = FALSE;\n\n $entity_manager = \\Drupal::service('entity_type.repository')->getEntityTypeLabels($group);\n}", "abstract public function get_the_job_type_names();", "public function getSpecies() {\n $model = new YiiGermplasmModel();\n $speciesList = $model->getGermplasmURIAndLabelList(Yii::$app->session[WSConstants::ACCESS_TOKEN],null, Yii::$app->params['Species'], null, null, null, null);\n\n return $speciesList;\n }", "public function getMegaplanEntities()\n {\n return [\n 'deals' => [\n 'listFields' => Entity\\Deal\\Fields::class,\n 'filterField' => [\n 'Program' => 13,\n ],\n 'requestedFields' => [],\n 'extraFields' => [],\n ],\n 'contractors' => [\n 'listFields' => Entity\\Contractor\\Fields::class,\n 'filterField' => [\n 'Program' => 13,\n ],\n 'requestedFields' => [],\n 'extraFields' => [],\n ],\n ];\n }", "public function getEngineNames() {\n $query = 'engine';\n return $this->restRequest('GET', $query, null);\n }", "public function getSupportedEntityTypesList() {\n $definitions = $this->entityTypeManager->getDefinitions();\n\n $supported = [];\n\n foreach ($definitions as $definition) {\n // Only support fieldable entity types.\n if (!$definition->get('field_ui_base_route')) {\n continue;\n }\n\n $supported[$definition->id()] = $definition->getLabel();\n }\n\n return $supported;\n }", "public function getEntityTypeCode()\n {\n return static::ENTITY_CODE;\n }", "public function get_machines() {\n\t\t//$q = \"SELECT machine FROM machine\";\n $q = \"SELECT m.*, r.name from machine m, room r where m.room_id = r.room_id\";\n\t\t$result = $this->db->query($q);\n\t\treturn $result->result_array();\n\t}", "abstract public function getEntityTypeCode();", "public function getEntityFormTypeName()\n {\n return str_replace('Entity', 'Form', $this->getEntityName()).'Type';\n }", "private function getSerializedEntityBundle($serialized_entity) {\n $data = $this->serializer->decode($serialized_entity, 'hal_json');\n $parts = explode('/', $data['_links']['type']['href']);\n return array_pop($parts);\n }", "public function getEntityName()\n {\n return $this->entityName;\n }", "public function getEntityName()\n {\n return $this->entityName;\n }", "public function get_entity_type() {\n\t\treturn $this->entity_type;\n\t}", "public function getDemoEntities($entity_type_id = NULL, $bundle = NULL) {\n if ($entity_type_id) {\n if (isset($this->entities[$entity_type_id])) {\n if ($bundle) {\n if (isset($this->entities[$entity_type_id][$bundle])) {\n return $this->entities[$entity_type_id][$bundle];\n }\n return [];\n }\n return $this->entities[$entity_type_id];\n }\n return [];\n }\n\n return $this->entities;\n }", "abstract public function getEntityType();", "public static function getListME() {\n return [\n self::ME_STD => 'Stunden',\n self::ME_STUECK => 'Stück',\n self::ME_PAKET => 'Paket',\n self::ME_KURSE => 'Kurse',\n self::ME_TAGE => 'Tage',\n ];\n }", "public static function getEntityClassNames(): array\n {\n return [Serie::class];\n }", "static public function getMultiFieldNames(): array\n {\n $names = [];\n\n foreach (\\CCrmFieldMulti::GetEntityTypes() as $typeId => $type) {\n foreach (array_keys($type) as $valueType) {\n $names[] = $typeId . '_' . $valueType;\n }\n }\n\n return $names;\n }", "public function getEntityName(){\n return $this->entityName;\n }", "public function getModuleMachineName()\n {\n return isset($this->ModuleMachineName) ? $this->ModuleMachineName : null;\n }", "function entity_unregistered_versions($entity_type, $module = NULL) {\n // Scans the module for persistent versions.\n $scanned_versions = entity_type_scan_versions($entity_type, $module);\n // Loads the registered versions, if any.\n $registry_versions = etbx_registry_version_load($entity_type);\n $unregistered_versions = array_diff_key($scanned_versions, $registry_versions);\n\n return $unregistered_versions;\n}", "protected function getEntityName()\n {\n return 'Pdx\\DatasetBundle\\Entity\\DataSet';\n }", "public function getTypes()\n {\n try {\n $res = $this->OsModel->getTypes();\n eee(\"200\", $res);\n\n } catch (Exception $e) {\n eee(\"400\", $e);\n }\n\n\n }", "function provideI18nEntities() {\n\t\t$entities = parent::provideI18nEntities();\n\t\t\n\t\tif(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = 'sapphire';\n\t\tif(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = 'sapphire';\t\t\n\n\t\treturn $entities;\n\t}", "protected function entityTypeManager() {\n if (!isset($this->entityTypeManager)) {\n $this->entityTypeManager = \\Drupal::entityTypeManager();\n }\n return $this->entityTypeManager;\n }", "protected function typeMachineName(): string {\n return preg_replace('/\\W+/', '', strtolower(strip_tags($this->type)));\n }", "public function getAllBundles()\n\t{\n\t\t$res = $this->get(\"$this->_api_bundles/all\");\n\t\tif ($res == false) {\n\t\t\treturn(false);\n\t\t}\n\t\treturn($this->xml2array($res));\n\t}", "function entity_status_get_info($entity_type) {\n $etbx_entities = &drupal_static(__FUNCTION__, array());\n if (empty($etbx_entities[$entity_type])) {\n\n }\n\n return $etbx_entities[$entity_type];\n}", "public function registerBundles()\n\t{\n\t\t$instances = [];\n\t\tforeach ($this->bundlesToRegister as $className) {\n\t\t\t$instances[] = new $className();\n\t\t}\n\n\t\treturn $instances;\n\n\t}", "public function getEntitiesOverrides()\n {\n return [\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\CountryInterface' => 'elcodi.core.geo.entity.country.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\StateInterface' => 'elcodi.core.geo.entity.state.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ProvinceInterface' => 'elcodi.core.geo.entity.province.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\CityInterface' => 'elcodi.core.geo.entity.city.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\PostalCodeInterface' => 'elcodi.core.geo.entity.postal_code.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\AddressInterface' => 'elcodi.core.geo.entity.address.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneInterface' => 'elcodi.core.geo.entity.zone.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneMemberInterface' => 'elcodi.core.geo.entity.zone_member.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneCountryMemberInterface' => 'elcodi.core.geo.entity.zone_country_member.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneStateMemberInterface' => 'elcodi.core.geo.entity.zone_state_member.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneProvinceMemberInterface' => 'elcodi.core.geo.entity.zone_province_member.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZoneCityMemberInterface' => 'elcodi.core.geo.entity.zone_city_member.class',\n 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\ZonePostalCodeMemberInterface' => 'elcodi.core.geo.entity.zone_postal_code_member.class',\n ];\n }", "protected function getManagedType()\n {\n $matches = [];\n if (preg_match('#DoctrineORM(Entity|Document)Manager_\\w{64}#', get_class($this->om), $matches)) {\n return $matches[1];\n }\n \n $type = substr(get_class($this->om), strrpos(get_class($this->om), '\\\\') + 1);\n $type = str_replace('Manager', '', $type);\n\n return $type;\n }", "public function getAvailableModelNames(): array;", "public function entityType() {}", "public function entityType() {}", "public function entityType() {\n return $this->decorated->entityType();\n }", "public function get_admin_bundles()\n\t{\n \t$bundles = Jelly::select('product')\n\t\t ->where('type', '=', 'bundle')\n\t\t\t\t\t\t->order_by('name')\n\t\t\t\t\t\t->execute()->as_array();\n\t\t\t\t\t\t\n\t\treturn $bundles;\n\t}" ]
[ "0.6574566", "0.62750477", "0.62625617", "0.60874945", "0.59945714", "0.5804808", "0.57502425", "0.5730544", "0.571129", "0.5668714", "0.56622237", "0.56596893", "0.5486182", "0.54171914", "0.5379359", "0.5369396", "0.53215724", "0.5312184", "0.52991897", "0.5281905", "0.5280133", "0.5277784", "0.52697504", "0.52669984", "0.5264217", "0.523811", "0.52268946", "0.5194783", "0.51923245", "0.5176212", "0.5166913", "0.5137878", "0.5119047", "0.510506", "0.51045865", "0.51045865", "0.50979096", "0.5072143", "0.50664973", "0.5058062", "0.50531137", "0.5044883", "0.50413746", "0.5024365", "0.5023715", "0.5022278", "0.50218004", "0.50207555", "0.50123745", "0.50030935", "0.500275", "0.500275", "0.49831757", "0.49816567", "0.49811321", "0.49545035", "0.49545035", "0.49373883", "0.49307483", "0.49305412", "0.49269345", "0.4920587", "0.49161276", "0.49105334", "0.48967433", "0.48934576", "0.48863232", "0.48861045", "0.48844925", "0.4880616", "0.4872147", "0.48621053", "0.48462763", "0.4839908", "0.4834677", "0.4834677", "0.48335195", "0.48319", "0.48257667", "0.48248407", "0.4820613", "0.48199287", "0.48165897", "0.481601", "0.4807837", "0.47967002", "0.4796555", "0.47897986", "0.47897458", "0.47782314", "0.47750905", "0.47731748", "0.47646707", "0.4755214", "0.47536376", "0.47525007", "0.47499606", "0.47499606", "0.47496322", "0.47493142" ]
0.78320533
0
The entity type bundle count.
Счетчик типа сущности.
public function entityTypeBundleCount($entity_type) { return count($this->getBundleInfo($entity_type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNbBundles()\n {\n return $this->bundles->count();\n }", "public function count() {\n\t\treturn count( $this->_aEntities );\n\t}", "public function count() : int\n {\n return (int)$this->db->query(\"\n SELECT COUNT(*) AS total\n FROM bundles\n \")->fetch()['total'];\n }", "public function count(){\n\t\treturn $this->_entity_list->count();\n\t}", "public static function getEntityDataCount($entity_type, $bundle = NULL) {\n if ($entity_type === 'comment' && !empty($bundle)) {\n return 'Unavailable';\n }\n\n $query = new \\EntityFieldQuery();\n $query->entityCondition('entity_type', $entity_type);\n\n if (!empty($bundle)) {\n $query->entityCondition('bundle', $bundle);\n }\n\n $query->addMetaData('account', user_load(1));\n try {\n return (int) $query->count()->execute();\n }\n catch (\\Exception $e) {\n // Use dt() with \"!\" instead of \"@\" placeholders, to avoid html in cli\n // output.\n // @todo Is this the recommended way to do this?\n drush_log(dt('Exception while counting @type entities: !message', [\n '@type' => ($bundle === NULL) ? $entity_type : \"$entity_type:$bundle\",\n '!message' => $e->getMessage(),\n ]), LogLevel::WARNING);\n return -1;\n }\n }", "public function countTypes(): int\n {\n return count($this->types);\n }", "public function getNumberOfTypes(): int;", "public function getResTypeExtCount()\n {\n return $this->count(self::RES_TYPE_EXT);\n }", "public function count()\n {\n $query = $this->em->createQueryBuilder();\n $query->select(array('p.id'))\n ->from($this->options->getProtoEntityClass(), 'p');\n $result = $query->getQuery()->getResult();\n return count($result);\n }", "public function count(): int\n {\n $count = 0;\n foreach ($this->types as $annotations) {\n $count += count($annotations);\n }\n\n return $count;\n }", "public function getCount()\n {\n\t\t$product = new Product();\n\t\t$count = $product->count();\n return $count;\n }", "public function getResTypeCount()\n {\n return $this->count(self::RES_TYPE);\n }", "public function getResTypeCount()\n {\n return $this->count(self::RES_TYPE);\n }", "public function countTagged($tagentity, $type)\r\n {\r\n $tagtype = $this->getType($tagentity);\r\n \r\n return $this->_em->createQuery('\r\n \tSELECT COUNT(DISTINCT hse)\r\n \tFROM \\Dodici\\Fansworld\\WebBundle\\Entity\\Has'.ucfirst($tagtype).' hs\r\n \tINNER JOIN hs.'.$type.' hse\r\n \tWHERE hse.active = true\r\n \tAND hs.'.$tagtype.' = :tagentity\r\n \t')\r\n ->setParameter('tagentity', $tagentity->getId())\r\n ->getSingleScalarResult();\r\n }", "public function getProductCount();", "protected function getEntityCount( $type, $filter = '' ) {\n\t\t$client = $this->get( 'client' );\n\t\t$result = $client->api( 'entity' )->count( $type, $filter );\n\n\t\t$total_count = 0;\n\t\tif ( 'ok' === strtolower( $result['stat'] ) && ! empty( $result['total_count'] ) ) {\n\t\t\t$total_count = intval( $result['total_count'] );\n\t\t}\n\n\t\treturn $total_count;\n\t}", "public function count($entityType, $filter = '')\n\t{\n\t\t$params = array('type_name' => $entityType);\n\t\tif (!empty($filter)) {\n\t\t\t$params['filter'] = $filter;\n\t\t}\n\t\treturn $this->post('entity.count', $params);\n\t}", "public function count()\n {\n return count($this->objects);\n }", "public function getProcessedEntitiesCount()\n {\n return $this->_processedEntitiesCount;\n }", "public static function getCount() {\n\t\tif (self::$_count === null) {\n\t\t\t$result = DataBase::query(\n\t\t\t\t\"SELECT COUNT(language.id) AS count \".\n\t\t\t\t\"FROM \".DataBase::formTableName('Premanager', 'Languages').\" AS language\");\n\t\t\tself::$_count = $result->get('count');\n\t\t}\n\t\treturn self::$_count;\n\t}", "public function getEntityTypeBundleInfo();", "public function getCountAll()\n {\n $query = $this->em->createQuery('SELECT COUNT(p.id) FROM entities\\Product p');\n \n return $query->getSingleScalarResult();\n }", "public function count(): int\n {\n return count($this->jsonLd);\n }", "public function count()\n{\n\treturn count($this->registry);\n}", "public function count() : int\n {\n return count($this->objects);\n }", "public function count(): int\n {\n return count($this->objects);\n }", "function getNbOfProductsLines()\n {\n $nb=0;\n foreach($this->lines as $line)\n {\n if ($line->product_type == 0) $nb++;\n }\n return $nb;\n }", "function entity_get_bundles($entity_type) {\n return entity_toolbox_controller($entity_type)->getBundles();\n}", "function getArticleTypeCount($article_type_uid) {\n \t\t\n \t\t$Count=0;\n \t\tforeach ($this->basket_items as $oneuid => $one_item)\t{\n\t\t \tif ($one_item->article->article_type_uid == $article_type_uid)\t\t{\n\t\t\t \t$Count++;\n \t\t\t}\n \t\t}\n \t\treturn $Count;\n \t\n\t\t\n\t}", "public function getTypeItemCount($type){\n\n\t\t// get database\n\t\t$db = $this->database;\n\n\t\t$group = $type->getApplication()->getGroup();\n \t\t$query = \"SELECT count(a.id) AS item_count\"\n\t\t .\" FROM \".$this->name.\" AS a\"\n\t\t .\" JOIN \".ZOO_TABLE_APPLICATION.\" AS b ON a.application_id = b.id\"\n\t\t .\" WHERE a.type = \".$db->Quote($type->id)\n \t\t\t.\" AND b.application_group = \".$db->Quote($group);\n\n\t\treturn (int) $this->_queryResult($query);\n\n\t}", "public function getCount()\n {\n return count($this->getFields());\n }", "public function count()\n\t{\n\t\treturn count($this->Parts);\n\t}", "public function count () {\n return $this->getContainer()->count();\n }", "public function countSpecimens()\n {\n $q = Doctrine_Query::create()\n ->select(\"count(*) as count \")\n ->from('Specimens s')\n ->where('s.ig_ref = ?', $this->getId());\n $row= $q->fetchOne();\n return $row[\"count\"];\n }", "public function getStoreTypeListCount()\n {\n return $this->count(self::store_type_list);\n }", "public function itemCount()\n {\n return $this->manager->getItemCount();\n }", "public function entityTypeId(): int\n {\n return (int) $this->entitytypeid;\n }", "public static function getCount() {\n\t\tif (self::$_count === null) {\n\t\t\t$result = DataBase::query(\n\t\t\t\t\"SELECT COUNT(tree.treeID) AS count \".\n\t\t\t\t\"FROM \".DataBase::formTableName('Premanager', 'Trees').\" AS tree\");\n\t\t\tself::$_count = $result->get('count');\n\t\t}\n\t\treturn self::$_count;\n\t}", "function getItemCount( $type ) {\n\t\t$menus = &JMenu::getInstance();\n\t\treturn count($menus->getItems('type', $type));\n\t}", "public function itemCount() {\n return $this->importer->processor->itemCount($this);\n }", "public function count()\n {\n return count($this->parts);\n }", "function getCount() {\n\t\t$ret_val = 0;\n\t\tif(is_object($this->getResultResource())) {\n\t\t\t$ret_val = $this->getResultResource()->count();\n\t\t}\n\t\treturn $ret_val;\n\t}", "public function countItems(): int {\n\t\treturn elgg_call(ELGG_SHOW_DISABLED_ENTITIES, function () {\n\t\t\treturn elgg_count_entities([\n\t\t\t\t'type' => 'object',\n\t\t\t\t'subtype' => 'file',\n\t\t\t\t'metadata_name_value_pairs' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'origin',\n\t\t\t\t\t\t'value' => 'market',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]);\n\t\t});\n }", "public static function getCount() {\n\t\tif (self::$_count === null) {\n\t\t\t$result = DataBase::query(\n\t\t\t\t\"SELECT COUNT(plugin.pluginID) AS count \".\n\t\t\t\t\"FROM \".DataBase::formTableName('Premanager', 'Plugins').\" AS plugin\");\n\t\t\tself::$_count = $result->get('count');\n\t\t}\n\t\treturn self::$_count;\n\t}", "public function count()\n {\n return count($this->structure);\n }", "public function getMltCount(): int {}", "public function getMltCount(): int {}", "public function countEntries() {\n\t\treturn sizeof($this->earray);\n\t}", "public function count() {\n\t\treturn count($this->toArray());\n\t}", "public function count()\n\t{\n\t\treturn count($this->parts);\n\t}", "public function getCountExtensions()\n {\n return count($this->getExtensions());\n }", "public function count()\n {\n if ($this->total === null) {\n $this->total = count($this->dictionary->getAll());\n }\n return $this->total;\n }", "public function get_post_type_counts()\n {\n }", "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "public function getCartridgeCount()\n {\n return count($this->cartridges);\n }", "public function count()\n {\n return $this\n ->em\n ->getRepository('MainBundle:Guide')\n ->count();\n }", "public function count() {\n\n return count($this->container);\n }", "public function getExtensionCount() {}", "public function count()\n {\n return count($this->toArray());\n }", "public function count()\n {\n $this->load();\n return count($this->_items);\n }", "public function getLoadedClassCount() {\n\t\t\t$data = $this->doCall($this->getUrl().'/mbean?objectname=java.lang%3Atype%3DClassLoading&template=identity');\n\t\t\t\n\t\t\treturn $this->extractProperty($data,1,'TotalLoadedClassCount');\n\t\t}", "protected function totalCount()\n {\n return $this->getModelConfiguration()->getRepository()->getQuery()->count();\n }", "public function count()\n {\n return count($this->aStorage);\n }", "public function count()\n {\n return count($this->hashToKeyObjectMap);\n }", "public function count()\n {\n return count(Arr::dot($this->all()));\n }", "protected function getOfferCount() {\n\t\treturn count( $this->product->get_available_variations( 'objects' ) );\n\t}", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "public function count()\n {\n return count($this->collectItems());\n }", "private function get_count( $type ) {\n\n\t\tswitch ( $type ) {\n\n\t\t\tcase 'plugins' :\n\n\t\t\t\tif ( ! function_exists( 'get_plugins' ) ) {\n\n\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\n\t\t\t\t}\n\n\t\t\t\t$data = get_plugins();\n\t\t\t\t$count = count( $data );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'themes' :\n\n\t\t\t\t$data = wp_get_themes();\n\t\t\t\t$count = count( $data );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'uploads' :\n\n\t\t\t\t$data = (array) wp_count_attachments();\n\t\t\t\t$count = array_sum( $data );\n\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\n\t\t\t\t$data = [];\n\t\t\t\t$count = 0;\n\n\t\t}\n\n\t\t/**\n\t\t * Filter the item count for a given type.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param array $data\n\t\t *\n\t\t * @var int\n\t\t */\n\t\treturn (int) apply_filters( \"mwp_system_rest_checksums_{$type}_count\", $count, $data );\n\n\t}", "function _get_count($bundle, $lang, $category = FALSE) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', $bundle)\n ->propertyCondition('status', NODE_PUBLISHED)\n ->propertyCondition('language', array($lang, LANGUAGE_NONE), 'IN');\n if ($category) {\n $query->fieldCondition('field_kategorie', 'tid', $category);\n }\n $result = $query->count()->execute();\n\n return $result ? ' (' . $result . ')' : ' (0)';\n}", "public static function getCountByType() \n {\n $types = \\Yii::$app->db->createCommand('\n SELECT t.id, t.name, COUNT(*) count \n FROM realty r\n INNER JOIN realty_type t ON t.id = r.realty_type_id\n GROUP BY t.id, t.name\n ORDER BY t.id\n ')->queryAll();\n\n return $types;\n }", "function getNbOfServicesLines()\n {\n $nb=0;\n foreach($this->lines as $line)\n {\n if ($line->product_type == 1) $nb++;\n }\n return $nb;\n }", "public function count()\n {\n return count($this->classes);\n }", "public function count()\n {\n return count($this->_entries);\n }", "public function count() {\n\t\treturn count($this->storage);\n\t}", "public function count() {\n\t\treturn count($this->storage);\n\t}", "public function countEm()\n {\n $qb = $this->createQueryBuilder('l');\n $qb->select('count(l.id) AS counter');\n $query = $qb->getQuery();\n return $query->getSingleScalarResult();\n }", "public function getCount()\r\n\t{\r\n\t\treturn count($this->invoice);\r\n\t}", "public function getItemsCount();", "public function count(): int\n {\n return count($this->container);\n }", "public function count(): int\n {\n return $this->entryCount;\n }", "public function count()\n {\n return count($this->resources);\n }", "public function count()\n {\n return count($this->_storage);\n }", "public function size():int{\n\t\treturn $this->moduleCount;\n\t}", "public function count()\n {\n return count($this->getChildren());\n }", "public function count()\n {\n return count($this->getChildren());\n }", "function countClasses() {\n\t\treturn count($this->_AutoloadArray);\n\t}", "public function count()\n {\n return count( $this->properties );\n }", "public function itemCount();", "public function count(): int {\r\n return sizeof($this->items);\r\n }", "public function getArCount(): int;", "public function getCount()\n {\n return Table\\Views::findAll()->count();\n }", "public function count()\n {\n return count((array) $this->data);\n }", "public function getEntriesCount()\n {\n return $this->count(self::ENTRIES);\n }", "public function count()\n {\n return $this->size();\n }", "#[ReturnTypeWillChange]\n\t\tpublic function count() {\n\t\t\treturn count( $this->_data );\n\t\t}", "public function count()\n {\n return (int) $this->engine()->count($this);\n }", "public function count()\n {\n return count($this->data());\n }", "public function count() {\n\t\treturn $this->getCount();\n\t}", "public function getCount(): int {\n return $this->count;\n }" ]
[ "0.724436", "0.70132387", "0.6890517", "0.6792766", "0.67802083", "0.6597525", "0.65088445", "0.63819903", "0.63543195", "0.6291706", "0.62867707", "0.6258445", "0.6258445", "0.6238697", "0.6202598", "0.6178826", "0.6178081", "0.6158575", "0.61392", "0.61199194", "0.61198145", "0.6091164", "0.60518014", "0.60396415", "0.6035089", "0.6029557", "0.60289776", "0.6023919", "0.60058796", "0.6002949", "0.6002098", "0.59997946", "0.5996916", "0.59954613", "0.5994637", "0.59941214", "0.59872", "0.5986705", "0.5986103", "0.5983804", "0.59836054", "0.59811145", "0.597563", "0.5947616", "0.59369755", "0.59328824", "0.59328824", "0.5927127", "0.59229004", "0.591956", "0.59119695", "0.58998525", "0.58952373", "0.58722943", "0.5863629", "0.5861922", "0.58568525", "0.58560216", "0.5853644", "0.5845568", "0.58432907", "0.5840004", "0.583885", "0.5837074", "0.5833861", "0.5830891", "0.5830547", "0.5828609", "0.58222747", "0.5817283", "0.5815312", "0.5811478", "0.5811087", "0.5808362", "0.5803549", "0.5803549", "0.5802621", "0.58012736", "0.57999635", "0.5798289", "0.5797709", "0.57941014", "0.579122", "0.5785886", "0.5782005", "0.5782005", "0.57812726", "0.57665193", "0.57641816", "0.5762791", "0.57606393", "0.57555765", "0.57529026", "0.5752293", "0.57453394", "0.5739896", "0.57398355", "0.5738539", "0.5737908", "0.5735993" ]
0.8428196
0
Lists all employee entities.
Список всех сущностей сотрудников.
public function employeesAction() { $em = $this->getDoctrine()->getManager(); $employees = $em->getRepository('AppBundle:Employee')->showEmployees(); return $this->render('employee/employee-all.html.twig', array( 'employees' => $employees, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $ec = new EmployeeClass;\n return $ec->getAll();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('RocketSellerTwoPickBundle:Employee')->findAll();\n\n return $this->render('RocketSellerTwoPickBundle:Employee:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $searchModel = new EmployeeSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel\n ]);\n }", "public function all()\n {\n \treturn Employees::all();\n }", "public function actionGetAllEmployees(){\n\t\t$getAllEmployeeSQL = \"\n\t\t\tSELECT \n\t\t\t\temp.empno as empid\n\t\t\tFROM \n\t\t\tmst_employees emp \n\t\t\tLEFT JOIN designations desg ON (desg.id = emp.mst_designation_id)\n\t\t\tWHERE emp.status=1\n\t\t\";\n\t\t\n\t\t$command = Yii::$app->ehms->createCommand($getAllEmployeeSQL);\n\t\t\n\t\t//Query Execute\n\t\t$empdetails = $command->queryAll();\n\t\t\n\t\treturn [\n\t\t\t'data'=>$empdetails,\n\t\t];\n\t}", "public function actionIndex()\n {\n $searchModel = new EmployeeSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function showAllEmployees()\n {\n\n $employees = Employee::with(['company' => function ($query) {\n $query->select('id', 'name');\n }])->get();\n\n return response()->json($employees);\n\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $employees = $em->getRepository('AppBundle:Employees')->findAll();\n\n return $this->render('employees/index.html.twig', array(\n 'employees' => $employees,\n ));\n }", "public function index()\n {\n return Employees::all();\n //\n }", "public function actionIndex()\n {\n $searchModel = new SearchEmployee();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function get_employees() {\n\n (new MidrubBaseUserAppsCollectionAchieveHelpers\\Employees)->get_employees();\n \n }", "public function actionIndex()\n {\n $searchModel = new EmployeeManagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n\n ]);\n }", "public function index()\n {\n $employee = Employee::all();\n return $employee;\n }", "public static function GetEmployeeList() {\n $db = new DBConnect();\n $db = $db->DBObject;\n $all_employees_array = self::Query_GetEmployeeList($db);\n $db = null;\n return $all_employees_array;\n }", "public function all_employee()\n {\n $employees = Employee::all();\n return view('Employees.all-employee',compact('employees'));\n }", "public function actionIndex(): string\n {\n $filters = new EmployeeFilter();\n $filters->load(Yii::$app->request->get());\n\n if ($sort = Yii::$app->request->get('sort')) {\n $sortDirection = [$sort => (Yii::$app->request->get('direction') === 'asc') ? SORT_ASC : SORT_DESC];\n }\n\n $employees = Employee::getEmployees($filters, $sortDirection ?? null);\n\n $pagination = new Pagination(\n [\n 'defaultPageSize' => self::DEFAULT_POSITIONS_PAGINATION,\n 'totalCount' => $employees->count(),\n ]\n );\n\n $employees->offset($pagination->offset);\n $employees->limit($pagination->limit);\n\n return $this->render(\n 'index',\n [\n 'employees' => $employees->all(),\n 'pagination' => $pagination,\n 'filters' => $filters,\n ]\n );\n }", "public function show(Employees $employees)\n {\n //\n }", "public static function allEmployees()\n\t{\n\t\treturn self::$employees;\n\t}", "public function index()\n {\n //\n $employees=Employee::all();\n return $employees;\n }", "public function index()\n {\n \n return Employee::latest()->with(['department','employeeType','employmentType','schedules'])->paginate(10);\n }", "public function show(employees $employees)\n {\n //\n }", "public function show(Employees $employee)\n {\n //\n }", "public function index()\n {\n return EmployeeResource::collection(Employee::with('user')->get());\n }", "public function getAllEmployeeNames()\n {\n $this->recursive = -1;\n return $this->find(\"list\", array('fields' => array('id', 'name'), 'order' => array('name' => 'asc')));\n }", "public function getEmployees();", "public function index()\n {\n //echo 'hello';\n \n return Employee::All();\n }", "public function index()\n {\n return response()\n ->json(\n [\n 'employeeList' => $this->queryEmployee(null)\n ],\n 200\n );\n }", "public function index()\n {\n $emps = Employee::all();\n return view('admin.employees.index',compact('emps'));\n }", "public function index()\n {\n $employees = $this->employee->all();\n\n return view('employee::admin.employees.index', compact('employees'));\n }", "public function index() {\n $employees = $this->employeeModel->findAll();\n return view('employees.index', ['employees' => $employees]);\n }", "public function index()\n {\n $employees = Employee::all();\n return view('Admin.employees.index', compact('employees'));\n }", "public function index()\n {\n // Get employees\n $employees = Employee::latest()->paginate(5);\n\n // Return employees\n return EmployeeResource::collection($employees);\n }", "public function index()\n {\n $employees=$this->employee->getAll(true,true);\n return view(\"web.employees.index\",compact(\"employees\"));\n }", "public function showAll(){\n $sql = \"SELECT * FROM \" . employerTable::TABLE_NAME;\n \n $stmt = $this->mConnection->prepare($sql);\n $status = $stmt->execute();\n\n if ($status != true) {\n $errorInfo = $stmt->errorInfo();\n throw new Exception(\"Could not display employers: \" . $errorInfo[2]);\n }\n \n $employers = array();\n $row = $stmt->fetch();\n while ($row != null) {\n $id = $row[employerTable::COLUMN_ID];\n $fName = $row[employerTable::COLUMN_FNAME];\n $lName = $row[employerTable::COLUMN_LNAME];\n $company = $row[employerTable::COLUMN_COMPANY];\n $email = $row[employerTable::COLUMN_EMAIL];\n $location = $row[employerTable::COLUMN_LOCATION];\n $bio = $row[employerTable::COLUMN_BIO];\n $photo = $row[employerTable::COLUMN_PHOTO];\n $password = $row[employerTable::COLUMN_PASSWORD];\n\n $employer = new Employer($id, $fName, $lName, $company, $email, $location, $bio, $photo, $password);\n $employers[$id] = $employer;\n\n $row = $stmt->fetch();\n }\n \n return $employers;\n }", "public function index(Request $request)\n {\n return view('employee.list')->with([\n 'employees' => $this->employeeRepository->all()\n ]);\n }", "public function index()\n {\n return Employee::paginate(10);\n }", "public function index()\n {\n return view('employee.list', [\n 'employee' => Employee::all()\n ]);\n }", "public function allemployees() {\n $this->set('users', $this->User->find('all', array('conditions' => array('User.type' => 'Employee'))));\n }", "public function employeeList(Request $request)\n {\n $query = Employee::query();\n\n if(!isSuperAdmin()) {\n $query->whereCompanyId($request->user()->company_id);\n\n if(isDepartmentAdmin()) {\n $query->whereDepartmentId($request->user()->employee->department_id);\n }\n }\n\n $employees = $query->where(function($query) use ($request) {\n if($request->has('company_id')) {\n $query->whereCompanyId($request->company_id);\n }\n if($request->has('branch_id')) {\n $query->whereBranchId($request->branch_id);\n }\n if($request->has('department_id')) {\n $query->whereDepartmentId($request->department_id);\n }\n })->latest('id')->get();\n // $employees->paginationSummery = getPaginationSummery($employees->total(), $employees->perPage(), $employees->currentPage());\n $companies = Company::getDropDownList();\n $branches = Branch::getDropDownList();\n $departments = Department::getDropDownList();\n\n return view('employees.index', compact('employees', 'companies', 'branches', 'departments'));\n }", "public function allEmployees()\n {\n $self='employees';\n if (\\Auth::user()->user_name!=='admin'){\n $get_perm=permission::permitted($self);\n\n if ($get_perm=='access denied'){\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important'=>true\n ]);\n }\n }\n\n $check_status=Employee::where('status','active')->where('user_name','!=','admin')->get();\n if ($check_status){\n foreach ($check_status as $cs){\n $leave_date=$cs->dol;\n if ($leave_date){\n if (strtotime($leave_date) < strtotime('now')){\n $cs->status='inactive';\n $cs->save();\n }\n }\n\n }\n }\n\n $employees = Employee::where('user_name', '!=', 'admin')->get();\n return view('admin.employees', compact('employees'));\n }", "public function index()\n {\n $employee = employee::all();\n \n\n return view('pages.admin.employee.adminEmployee')->with('employee', $employee);\n }", "public function index()\n {\n $employees = Employee::all();\n\n return view('employees.index', compact('employees'));\n }", "public function index()\n {\n $employees = $this->employee->get();\n return view('employees.index')->withEmployees($employees); \n }", "public function findAll() {\n $sql = \"SELECT employee.*, shift_start, shift_end, break_start, break_end FROM employee LEFT JOIN working_time ON employee.employee_id = working_time.employee_id LEFT JOIN break_time ON employee.employee_id = break_time.employee_id\";\n $employees = $this->mapper->find([], $sql, $this->detailQueries);\n return $employees;\n }", "public function index()\n {\n return view('employees.list', compact('employees'));\n }", "public function index()\n {\n $employees = $this->employee->model->paginate(25);\n return compact('employees');\n }", "public function employees()\n {\n $paginated_employees = Employee::simplePaginate(10);\n\n $employees = collect($paginated_employees->items())->map(function($employee) {\n\n return [\n 'id' => $employee->id,\n 'name' => $employee->first_name. ' ' .$employee->last_name,\n 'email' => $employee->email,\n 'phone_number' => $employee->phone_number,\n ];\n });\n\n return response()->json([\n 'employees' => $employees,\n 'next_page' => $paginated_employees->nextPageUrl(),\n 'previous_page' => $paginated_employees->previousPageUrl(),\n ]);\n // return $this->showAll($employees, 200);\n }", "public function index()\n {\n $employees = Employee::all()->toArray();\n return response()->json($employees);\n }", "public function index()\n {\n $data = $this->employees->getEmployees();\n \n return response()->json($data);\n }", "public function index()\n {\n $employees = Employee::all();\n return view('employees.index', compact('employees'));\n }", "public function listEmployee()\n\n {\n\n\t\t$EmployeeDetail = DB::table('employees')\n\n\t\t\t\t\t\t\t\t->join('divisions', 'employees.division', '=', 'divisions.id')\n\n ->join('positions', 'employees.position', '=', 'positions.id')\n\n ->orderBy('employees.lastname', 'asc')\n\n ->where('employees.status', '!=', 'removed')\n\n\t\t\t\t\t\t\t\t->select(\n\n 'employees.id',\n\n 'employees.employee_id',\n\n 'employees.firstname',\n\n 'employees.middlename',\n\n 'employees.lastname',\n\n 'employees.birthday',\n\n 'employees.contact_number',\n\n 'employees.date_hired',\n\n 'employees.status',\n\n 'divisions.division',\n\n 'positions.position'\n\n\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t->get();\n\n\t\t\n\n \treturn view('employee/list-employee', [\n\n \t\t'EmployeeDetail' => $EmployeeDetail\n\n \t]); \n\n }", "public static function getEmployees()\n\t{\n\t\treturn Db::getInstance()->executeS('\n\t\t\tSELECT `id_employee`, `firstname`, `lastname`\n\t\t\tFROM `'._DB_PREFIX_.'employee`\n\t\t\tWHERE `active` = 1\n\t\t\tORDER BY `lastname` ASC\n\t\t');\n\t}", "public function actionIndex() {\n $dataProvider = new ActiveDataProvider([\n 'query' => Empleados::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $employees = Employee::all();\n return response()->json($employees);\n }", "public function index()\n {\n $employees = Employee::all();\n return response()->json($employees);\n }", "public function index()\n {\n $emps = Employee::all();\n return view('employee.index', compact('emps'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $employers = $em->getRepository('DemoBundle:Employer')->findAll();\n\n return $this->render('employer/index.html.twig', array(\n 'employers' => $employers,\n ));\n }", "public function getAll() {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\"SELECT p FROM Empresas p\");\n return $query->getResult();\n }", "public function index()\n {\n $employees = Employee::all();\n\n\n return view('employee.index',compact('employees'));\n }", "public function index()\n {\n $employees = Employee::cursor();\n return view(\n 'employees.index',\n ['employees' => $employees]\n );\n }", "public function index()\n {\n $employees = Employee::all();\n\t\t\t\t\n\t\treturn view('employees.index', compact('employees'));\n }", "public function index()\n {\n $employees = Employee::orderby('id')->get();\n return view('employee.index', ['employees'=>$employees]);\n }", "public function actionIndex()\n {\n $searchModel = new EmployeeslistSearch();\n \n $params = Yii::$app->request->queryParams;\n $params['roleid'] = 3;\n $dataProvider = $searchModel->search($params);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $employees = Employee::all();\n\n return view('employees.index', ['employees' => $employees]);\n }", "public function index()\n {\n return view('employee.index')\n ->with('employees', Employee::latest()->paginate(10));\n }", "public function all()\n {\n $response = $this->get('/api/v1/employees');\n $response->assertStatus(200);\n }", "public function index()\n {\n $employees = Employee::all();\n return response()->json($employees);\n }", "public function index()\n {\n $employees = $this->user->dokancreate()\n ->find(request()->dokan_uid)\n ->employees;\n return EmployeeResource::collection($employees);\n }", "public function index()\n {\n $employees = Employee::latest()\n ->with('company')\n ->paginate(10);\n\n return view('employees.index', compact('employees'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $empleados = $em->getRepository('EmpleadoBundle:Empleado')->findAll();\n\n return $this->render('PanelBundle:Empleado:index.html.twig', array(\n 'empleados' => $empleados,\n ));\n }", "public function index()\n {\n $employees = Employee::paginate(10);\n\n return view('admin.employees.index', compact('employees'));\n }", "public function index()\n {\n $employees = Employee::with('company')->orderBy('created_at', 'DESC')->get();\n\n return view('employee.index', compact('employees'));\n }", "public function index()\n {\n $employees = Employee::all();\n\n return view('employees.index', [\n 'employees' => $employees,\n ]);\n }", "public function index()\n {\n $employees = $this->employees->index();\n return response()->json($employees);\n }", "public function getEmployees()\n {\n return $this->hasMany(Employee::className(), ['document_type_id' => 'id']);\n }", "public function index()\n { \n $employees = Employee::all();\n $data['employees'] = $employees;\n return view('employees.list', $data);\n }", "public function viewAllEmployees()\n\t{\n\t\t$this->load->database();\n\t\t$query = $this->db->query(\"SELECT employees.*, department_name FROM employees, departments\n\t\t\t\tWHERE employee_type <> 'administration' AND employee_type <> 'boss' AND employee_status ='active' AND\n\t\t\t\temployees.department_id = departments.department_id\" );\n\t\treturn $query->result_array();\n\t}", "public function index()\n {\n $employee = Employee::all();\n\n return view('employee.index',compact('employee'));\n }", "public function index()\n {\n $owner = auth_cache()->userable->id;\n $employees = Employee::where('owner_id', $owner)\n ->orderBy('created_at', 'desc')\n ->paginate();\n\n return response()->json($employees);\n }", "public function employees()\n {\n return $this->hasMany(Model_Employees::class);\n }", "public function getAllEmployees()\n {\n \t$users_services = new UsersService();\n \t$employess = $users_services->fetchAll(1);\n \t$result = array();\n \t\n \tforeach ($employess as $emp){\n \t\t$result[$emp['user_id']] = $emp['name'].\" \".$emp['surname'].\" \".$emp['lastname']; \n \t}\n \t\n \treturn $result;\n }", "public function index()\n {\n return view('employees.index', ['employees' => Employee::get()]);\n }", "public function index()\n {\n $data['title'] = 'Manage Employees';\n $data['employees'] = $this->employeesModel->getActiveLists();\n $this->load->view('employees/list', $data);\n\n }", "public function employees()\n\t{\n\t\treturn $this->hasMany(\\App\\Employee::class, 'admin_id', 'id');\n\t}", "public function employees()\n {\n return $this->hasMany(Employee::class);\n }", "public function employees()\n {\n return $this->hasMany(Employee::class);\n }", "public function index()\n {\n\n return Response::json([\n 'employees' => Employee::all(),\n ]);\n }", "public function index()\n {\n $employees = Employee::all();\n return view('employees.table', compact('employees'));\n }", "public function index()\n {\n $data = Employee::latest()->paginate(5);\n \n return view('employees.index',compact('data'));\n }", "public function index()\n {\n $employees = Employee::with('company')->orderByDesc('created_at')->paginate(10);\n return view('employee.index', compact('employees'));\n }", "public function indexAction()\n {\n // TODO: pagination\n\n $em = $this->getDoctrine()->getManager();\n\n $userEmployers = $em->getRepository('AppBundle:UserEmployer')->findAll();\n\n return $this->render('useremployer/index.html.twig', array(\n 'userEmployers' => $userEmployers,\n ));\n }", "public function index() \n { \n $employees = Employee::all();\n\t\t\n\t\t$sites = Site::all(); \n\t\t\n\t\tprint_r($employees); exit; \n \n return view('employees.index', compact('employees'));\n }", "function index()\n {\n $data['employees'] = $this->Employee_model->get_all_employees();\n \n $data['_view'] = 'employee/index';\n $this->load->view('layouts/main',$data);\n }", "public function employees()\n\t{\n\t\treturn $this->hasMany('App\\Employee', 'div_id');\n\t}", "public function index()\n {\n $arr['employees'] = Employee::paginate(10);\n return view('user.employees.index')->with($arr);\n }", "public function index()\n {\n $emps = Employee::all();\n return view('empmodel')->with('emps',$emps);\n }", "public function getEmployees()\n { \n return CHtml::listData(\n Position::model()->findAll(array(\n 'condition'=>\"department_id = $this->department_id AND t.employee_id NOT IN\n (SELECT user_id FROM \\\"user\\\" WHERE role IN ('ADMIN', 'HRMO'))\",\n 'with'=>'employee.usr',\n 'order'=>'usr.last_name'\n )),\n 'position_id',\n 'fullName'\n );\n }", "public function index()\n {\n $user = Auth::user();\n $employees = [];\n\n if($user->role->name === 'superadmin'){\n $employees = Employee::paginate(10);\n }else if($user->role->name === 'admin'){\n $employees = Employee::query()\n ->join('companies', 'company_id', '=','companies.id')\n ->where('created_by', $user->id)\n ->select(['employees.*'])\n ->paginate(10);\n }else if($user->role->name === 'company'){\n $employees = Employee::where('company_id', $user->company->id)->paginate();\n }\n\n return response()->view(\"pages.employee.index\",['employees' => $employees]);\n }", "public function index()\n {\n $emp_data = \\App\\Employee::all();\n return view('employeeList', ['emp_data' => $emp_data ]);\n }", "public function index()\n {\n $employee = Employee::all();\n\n return Response::json($employee);\n }" ]
[ "0.77566874", "0.7665437", "0.759447", "0.75732803", "0.7560443", "0.7553892", "0.742212", "0.741697", "0.7327195", "0.7304179", "0.716139", "0.7120667", "0.709549", "0.70286435", "0.7016211", "0.70083654", "0.69941264", "0.6986955", "0.6977865", "0.6942553", "0.6918147", "0.69161767", "0.69014215", "0.68937343", "0.6891399", "0.6841528", "0.6837609", "0.6835976", "0.6834509", "0.68343425", "0.68316513", "0.6825101", "0.6814682", "0.68002135", "0.6797431", "0.6795471", "0.6783118", "0.67795783", "0.677381", "0.6770005", "0.6766555", "0.6762373", "0.6753134", "0.6745606", "0.6738474", "0.67366683", "0.67346346", "0.6731186", "0.6726078", "0.6722842", "0.6719717", "0.67171866", "0.67132175", "0.67095345", "0.67095345", "0.6707819", "0.670755", "0.670743", "0.6698642", "0.669561", "0.66942364", "0.6683901", "0.66825545", "0.6681018", "0.6677574", "0.6673522", "0.6672968", "0.6666387", "0.66618687", "0.66606766", "0.6659763", "0.6658053", "0.6657649", "0.6654375", "0.66513145", "0.6641507", "0.66293824", "0.66283864", "0.66197217", "0.66103214", "0.6603231", "0.65882784", "0.65857035", "0.65772766", "0.656771", "0.656771", "0.6564673", "0.6561995", "0.6560487", "0.65603274", "0.65518486", "0.6545933", "0.65449584", "0.65387356", "0.6536732", "0.6534046", "0.6533788", "0.65322804", "0.6526578", "0.6523974" ]
0.81735957
0
Optional. The minimum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the servicelevel min RSA modulus size will continue to apply. Generated from protobuf field int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];
Опционально. Минимально допустимый размер RSA-модуля (включительно), в битах. Если это значение не задано или установлено в ноль, будет применяться минимальный размер RSA-модуля, определённый на уровне службы. Сгенерировано из поля protobuf int64 min_modulus_size = 1 [(.google.api.field_behavior) = OPTIONAL];
public function setMinModulusSize($var) { GPBUtil::checkInt64($var); $this->min_modulus_size = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMinModulusSize()\n {\n return $this->min_modulus_size;\n }", "public function setMaxModulusSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_modulus_size = $var;\n\n return $this;\n }", "public function getMaxModulusSize()\n {\n return $this->max_modulus_size;\n }", "public function set_rsa_key_size($key_size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! $this->is_loaded)\n $this->configuration = $this->_load_configuration();\n\n $this->configuration['req']['default_bits'] = $key_size;\n }", "public function setMinPrefixLength($var)\n {\n GPBUtil::checkInt32($var);\n $this->min_prefix_length = $var;\n\n return $this;\n }", "public function get_rsa_key_size_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $options = array(\n 512 => '512b',\n 1024 => '1024b',\n 2048 => '2048b',\n 4096 => '4096b'\n );\n\n return $options;\n }", "public function getPublicKeyModulus() {}", "public function setMinLength($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Int32Value::class);\n $this->min_length = $var;\n\n return $this;\n }", "public function getPasswordMinimumLength()\n {\n if (array_key_exists(\"passwordMinimumLength\", $this->_propDict)) {\n return $this->_propDict[\"passwordMinimumLength\"];\n } else {\n return null;\n }\n }", "public function minimumSize($edition) {\n\t\tif (is_int($edition)) {\n\t\t\t$edition = $this->get($edition, ['conditions' => [\n\t\t\t\t'user_id' => $this->contextUser()->artistId(),\n\t\t\t]]);\n\t\t}\n\n\t\tif (!($edition instanceof Edition)) {\n\t\t\tthrow new \\BadMethodCallException('An Edition entity or an ID that '\n\t\t\t\t\t. 'could lead to an Edition entity was required.');\n\t\t}\n\n\t\tif (EditionTypeMap::isNumbered($edition->type)) {\n\t\t\t/**\n\t\t\t * Limited editions nip undisposed pieces from the end of the edition\n\t\t\t */\n\t\t\t$minimum = $this->Pieces->highestNumberDisposed(['edition_id' => $edition->id]);\n\n\t\t} else {\n\n\t\t\t/**\n\t\t\t * Open edititions can delete any undisposed pieces\n\t\t\t */\n\t\t\t$minimum = $edition->disposed_piece_count/* > 0 ? $edition->disposed_piece_count : 1 */;\n\t\t}\n\n\t\treturn $minimum;\n\n\t}", "protected function getMinPasswordLength()\n {\n return $this->_scopeConfig->getValue(self::XML_PATH_MINIMUM_PASSWORD_LENGTH);\n }", "public function getMinimumLength()\n {\n if (array_key_exists(\"minimumLength\", $this->_propDict)) {\n return $this->_propDict[\"minimumLength\"];\n } else {\n return null;\n }\n }", "protected function hasPublicKeyModulus() {}", "static function convertRSA($modulus, $exponent) {\n /* make an ASN publicKeyInfo */\n $exponentEncoding = XMLSecurityKey::makeAsnSegment(0x02, $exponent);\n $modulusEncoding = XMLSecurityKey::makeAsnSegment(0x02, $modulus);\n $sequenceEncoding = XMLSecurityKey:: makeAsnSegment(0x30, $modulusEncoding.$exponentEncoding);\n $bitstringEncoding = XMLSecurityKey::makeAsnSegment(0x03, $sequenceEncoding);\n $rsaAlgorithmIdentifier = pack(\"H*\", \"300D06092A864886F70D0101010500\");\n $publicKeyInfo = XMLSecurityKey::makeAsnSegment (0x30, $rsaAlgorithmIdentifier.$bitstringEncoding);\n\n /* encode the publicKeyInfo in base64 and add PEM brackets */\n $publicKeyInfoBase64 = base64_encode($publicKeyInfo);\n $encoding = \"-----BEGIN PUBLIC KEY-----\\n\";\n $offset = 0;\n while ($segment=substr($publicKeyInfoBase64, $offset, 64)){\n $encoding = $encoding.$segment.\"\\n\";\n $offset += 64;\n }\n return $encoding.\"-----END PUBLIC KEY-----\\n\";\n }", "public function getMinimumPasswordLength()\n {\n return $this->_scopeConfig->getValue(AccountManagement::XML_PATH_MINIMUM_PASSWORD_LENGTH);\n }", "public function setMinPartitionsCount($var)\n {\n GPBUtil::checkUint64($var);\n $this->min_partitions_count = $var;\n\n return $this;\n }", "public function getMinLength()\n {\n return $this->min_length;\n }", "public function getMinPrefixLength()\n {\n return $this->min_prefix_length;\n }", "public function SetMinFileSize($size)\r\n\t\t{\r\n\t\t\t$this->MinFileSize = $size;\r\n\t\t}", "public function & SetMinSize ($minSize);", "public function getMinLength(): int;", "public function getMinLength()\n {\n return $this->getProperty(self::MIN_LENGTH);\n }", "public function validate_key_size($key_size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!is_int((int)$key_size) || $key_size < 1024)\n return lang('certificate_manager_key_size_invalid');\n }", "public function getMinimumLength()\n {\n return $this->minimum_length;\n }", "public function minSize($minSize)\n {\n if (is_numeric($minSize)) {\n $this->minSize = $minSize;\n } else {\n throw new InvalidConfigValue(\n __FUNCTION__,\n 'int | float'\n );\n }\n\n return $this;\n }", "public function getMinLengthValue()\n {\n return $this->readWrapperValue(\"min_length\");\n }", "public function setPrefixSize($prefixSize);", "function setMinSize($size) {\n\n $this->field['min_size'] = $size;\n return $this;\n \n }", "public function setMinQueryLength($minQueryLength)\n {\n if (!is_int($minQueryLength)) {\n throw new \\InvalidArgumentException('MinQueryLength should be integer type');\n }\n \n $this->minQueryLength = $minQueryLength;\n \n return $this;\n }", "public function getMinLength()\r\r\n {\r\r\n return $this->minLength;\r\r\n }", "public function setMinLength($min_length)\n {\n $this->container['min_length'] = $min_length;\n\n return $this;\n }", "public function setMinSpeakerCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->min_speaker_count = $var;\n\n return $this;\n }", "public static function getMinLength(): int {\n\t\treturn self::$minLength;\n\t}", "public function getMinLength()\n\t{\n\t\treturn $this->_minLength;\n\t}", "public function setMinimumLength($minimum_length)\n {\n $this->minimum_length = $minimum_length;\n }", "public function setWorkProfilePasswordMinimumLength(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordMinimumLength', $value);\n }", "function unframed_jsbn_rsa_public($keys) {\n\t$details = openssl_pkey_get_details($keys);\n\t$modulus = $details['rsa']['n'];\n\t$exponent = $details['rsa']['e'];\n\treturn array(\n\t\t\"n\" => strtoupper(bin2hex($modulus)),\n\t\t\"e\" => strtoupper(bin2hex($exponent))\n\t\t);\n}", "protected function minStringSize($parameterName, $size)\n {\n if (strlen($this->request[$parameterName]) >= $size) {\n return true;\n } else {\n $this->error->push($parameterName,\"The {$parameterName} must have {$size} minimal size.\");\n return false;\n }\n }", "public function getMinLength()\n {\n return $this->minLength;\n }", "public static function _mod($left_operand, $modulus)\n\t{\n\t\t$left_operand=ilMath::bcconv($left_operand);\n\t\t$modulus=ilMath::bcconv($modulus);\n\t\t\n\t\tif (function_exists(\"bcmod\"))\n\t\t{\n\t\t\treturn bcmod($left_operand, $modulus);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $left_operand % $modulus;\n\t\t}\n\t}", "public function setMin($var)\n {\n GPBUtil::checkInt32($var);\n $this->min = $var;\n\n return $this;\n }", "public function setSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->size = $var;\n\n return $this;\n }", "public function setMinLengthValue($var)\n {\n $this->writeWrapperValue(\"min_length\", $var);\n return $this;}", "public function setParagraphsMin ($min)\n {\n\t if (is_int ($min) && $min > 0)\n\t {\n\t $this->paragraphsMin = $min;\n\t }\n\t else\n\t {\n\t throw new \\InvalidArgumentException ('The value of $min must be a absolute int.');\n\t }\n\t \n\t return $this;\n }", "public function powmod($exponent, $modulus)\n\t{\n\t\t$exp = self::parse($exponent, 'array');\n\t\t$mod = self::parse($modulus, 'array');\n\n\t\tif ($this->value[0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The method %s can only be called for positive number, however this number is negative',\n\t\t\t\t'powmod()'\n\t\t\t);\n\t\t}\n\n\t\tif ($exp['integer'][0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The exponent specified, %s, must be a positive integer, however it is negative',\n\t\t\t\t$exponent\n\t\t\t);\n\t\t}\n\n\t\tif ($mod['integer'][0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The modulus specified, %s, must be a positive integer, however it is negative',\n\t\t\t\t$modulus\n\t\t\t);\n\t\t}\n\n\t\t// All numbers involved in this need to be integers\n\t\t$exponent = $exp['integer'];\n\t\t$modulus = $mod['integer'];\n\t\t$len = (strpos($this->value, '.') !== FALSE) ? strpos($this->value, '.') : strlen($this->value);\n\t\t$value = substr($this->value, 0, $len);\n\n\t\tif (function_exists('bcpowmod')) {\n\t\t\t$result = bcpowmod($value, $exponent, $modulus, 0);\n\n\t\t} else {\n\t\t\t$exponent = self::baseConvert($exponent, 10, 2);\n\t\t\t$result = '+1';\n\n\t\t\tself::performDiv($value, $modulus, $first_modulus);\n\t\t\tfor ($i=0; $i < strlen($exponent); $i++) {\n\t\t\t\tself::performDiv(self::performMul($result, $result), $modulus, $result);\n\t\t\t\tif ($exponent[$i] == '1') {\n\t\t\t\t\tself::performDiv(self::performMul($result, $first_modulus), $modulus, $result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new fNumber($result);\n\t}", "public function setPasswordMinimumLength($val)\n {\n $this->_propDict[\"passwordMinimumLength\"] = intval($val);\n return $this;\n }", "protected function min_len($input, $field, $params = null){\n\t\tif(empty($input)){\n\t\t\treturn true;\n\t\t}\n\t\tif(mb_strlen($input) >= (int)$params){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn array(\n\t\t\t\t'error' => 'min_len',\n\t\t\t\t'len' => $params,\n\t\t\t\t'field' => $field);\n\t\t}\n\t}", "private function getMinimumKeySize(string $algorithm): int\n {\n switch ($algorithm) {\n case HS256::class:\n return 256;\n case HS384::class:\n return 384;\n case HS512::class:\n return 512;\n default:\n return INF;\n }\n }", "public function setMinLength(int $min) {\n\n $this->minLength = $min;\n\n return $this;\n }", "public function getMinFileSize()\n {\n return $this->min_file_size;\n }", "public function setMinInstances($var)\n {\n GPBUtil::checkInt32($var);\n $this->min_instances = $var;\n\n return $this;\n }", "public function setRecommendedSize($var)\n {\n GPBUtil::checkInt32($var);\n $this->recommended_size = $var;\n\n return $this;\n }", "public function setPinMinimumLength(?int $value): void {\n $this->getBackingStore()->set('pinMinimumLength', $value);\n }", "public function getMltMinWordLength(): int {}", "public function getMltMinWordLength(): int {}", "public function getMinQuantity()\n\t{\n\t\treturn 1;\n\t}", "public function getPaddingReservedSize();", "public function setStartOffset($var)\n {\n GPBUtil::checkInt64($var);\n $this->start_offset = $var;\n\n return $this;\n }", "public function getRegularMinimalPrice()\n {\n $minPrice = 0;\n\n $haveRequiredOptions = $this->haveRequiredOptions();\n\n $minPrices = [];\n\n foreach ($this->product->bundle_options as $option) {\n $optionProductsPrices = $this->getOptionProductsPrices($option, false);\n\n if (! count($optionProductsPrices)) {\n continue;\n }\n\n $selectionMinPrice = min($optionProductsPrices);\n\n if ($option->is_required) {\n $minPrice += $selectionMinPrice;\n } elseif (! $haveRequiredOptions) {\n $minPrices[] = $selectionMinPrice;\n }\n }\n\n if (\n ! $haveRequiredOptions\n && count($minPrices)\n ) {\n $minPrice = min($minPrices);\n }\n\n return $minPrice;\n }", "public function setMinLength( $value ) {\n\t\t$minLength = (int)$value;\n\t\tif ( $minLength > 0 ) {\n\t\t\t$this->minLength = $minLength;\n\t\t}\n\t\telse {\n\t\t\tthrow new \\RuntimeException( 'MinLength must be a positive integer' );\n\t\t}\n\t}", "public function getSizeLimit() {\n\t\treturn $this->options->getIntegerOption('attachments_size_limit', 3145728);\n\t}", "protected static function getAlgorithmKeysize() {\n return [\n 'RS256' => 2048,\n ];\n }", "public function minCodingUnitSize(MinCodingUnitSize $minCodingUnitSize)\n {\n $this->minCodingUnitSize = $minCodingUnitSize;\n\n return $this;\n }", "public function getMinPasswordLength()\n {\n $wordCount = $this->getWordCount();\n\n return ($this->getMinWordLength() * $wordCount) + (strlen($this->getWordSeparator()) * ($wordCount - 1));\n }", "function reduce_min_strength_password_requirement( $strength ) {\r\n return 0; \r\n}", "public function setMinFileSize($minimum_file_size = false, $type = 'b')\n {\n $this->min_file_size = (int) $this->calculateSize($minimum_file_size, $type);\n\n return $this;\n }", "public function numberOfExpansionModuleKeysPerPage()\n {\n return 28;\n }", "public function setMinimumLength($val)\n {\n $this->_propDict[\"minimumLength\"] = $val;\n return $this;\n }", "public function setMinLength($min)\r\r\n {\r\r\n $this->minLength = $min;\r\r\n\r\r\n return $this;\r\r\n }", "public function getMinimumWipePatchVersion()\n {\n if (array_key_exists(\"minimumWipePatchVersion\", $this->_propDict)) {\n return $this->_propDict[\"minimumWipePatchVersion\"];\n } else {\n return null;\n }\n }", "public function getMinimumWipePatchVersion()\n {\n if (array_key_exists(\"minimumWipePatchVersion\", $this->_propDict)) {\n return $this->_propDict[\"minimumWipePatchVersion\"];\n } else {\n return null;\n }\n }", "public function getPasswordMinimumCharacterSetCount()\n {\n if (array_key_exists(\"passwordMinimumCharacterSetCount\", $this->_propDict)) {\n return $this->_propDict[\"passwordMinimumCharacterSetCount\"];\n } else {\n return null;\n }\n }", "public function setPasswordMinimumLength(?int $value): void {\n $this->getBackingStore()->set('passwordMinimumLength', $value);\n }", "public function setPasswordMinimumLength(?int $value): void {\n $this->getBackingStore()->set('passwordMinimumLength', $value);\n }", "function generate($key_len = null)\n {\n if (is_null($key_len)) {\n // use an old key length\n $key_len = $this->_key_len;\n if (is_null($key_len)) {\n $this->pushError('missing key_len parameter', CRYPT_RSA_ERROR_MISSING_KEY_LEN);\n return false;\n }\n }\n\n // minimal key length is 8 bit ;)\n if ($key_len < 8) {\n $key_len = 8;\n }\n // store key length in the _key_len property\n $this->_key_len = $key_len;\n\n // set [e] to 0x10001 (65537)\n $e = $this->_math_obj->bin2int(\"\\x01\\x00\\x01\");\n\n // generate [p], [q] and [n]\n $p_len = intval(($key_len + 1) / 2);\n $q_len = $key_len - $p_len;\n $p1 = $q1 = 0;\n do {\n // generate prime number [$p] with length [$p_len] with the following condition:\n // GCD($e, $p - 1) = 1\n do {\n $p = $this->_math_obj->getPrime($p_len, $this->_random_generator);\n $p1 = $this->_math_obj->dec($p);\n $tmp = $this->_math_obj->GCD($e, $p1);\n } while (!$this->_math_obj->isOne($tmp));\n // generate prime number [$q] with length [$q_len] with the following conditions:\n // GCD($e, $q - 1) = 1\n // $q != $p\n do {\n $q = $this->_math_obj->getPrime($q_len, $this->_random_generator);\n $q1 = $this->_math_obj->dec($q);\n $tmp = $this->_math_obj->GCD($e, $q1);\n } while (!$this->_math_obj->isOne($tmp) && !$this->_math_obj->cmpAbs($q, $p));\n // if (p < q), then exchange them\n if ($this->_math_obj->cmpAbs($p, $q) < 0) {\n $tmp = $p;\n $p = $q;\n $q = $tmp;\n $tmp = $p1;\n $p1 = $q1;\n $q1 = $tmp;\n }\n // calculate n = p * q\n $n = $this->_math_obj->mul($p, $q);\n } while ($this->_math_obj->bitLen($n) != $key_len);\n\n // calculate d = 1/e mod (p - 1) * (q - 1)\n $pq = $this->_math_obj->mul($p1, $q1);\n $d = $this->_math_obj->invmod($e, $pq);\n\n // calculate dmp1 = d mod (p - 1)\n $dmp1 = $this->_math_obj->mod($d, $p1);\n\n // calculate dmq1 = d mod (q - 1)\n $dmq1 = $this->_math_obj->mod($d, $q1);\n\n // calculate iqmp = 1/q mod p\n $iqmp = $this->_math_obj->invmod($q, $p);\n\n // store RSA keypair attributes\n $this->_attrs = array(\n 'version' => \"\\x00\",\n 'n' => $this->_math_obj->int2bin($n),\n 'e' => $this->_math_obj->int2bin($e),\n 'd' => $this->_math_obj->int2bin($d),\n 'p' => $this->_math_obj->int2bin($p),\n 'q' => $this->_math_obj->int2bin($q),\n 'dmp1' => $this->_math_obj->int2bin($dmp1),\n 'dmq1' => $this->_math_obj->int2bin($dmq1),\n 'iqmp' => $this->_math_obj->int2bin($iqmp),\n );\n\n $n = $this->_attrs['n'];\n $e = $this->_attrs['e'];\n $d = $this->_attrs['d'];\n\n // try to create public key object\n $obj = &new Crypt_RSA_myKey($n, $e, 'public', $this->_math_obj->getWrapperName(), $this->_error_handler);\n if ($obj->isError()) {\n // error during creating public object\n $this->pushError($obj->getLastError());\n return false;\n }\n $this->_public_key = &$obj;\n\n // try to create private key object\n $obj = &new Crypt_RSA_myKey($n, $d, 'private', $this->_math_obj->getWrapperName(), $this->_error_handler);\n if ($obj->isError()) {\n // error during creating private key object\n $this->pushError($obj->getLastError());\n return false;\n }\n $this->_private_key = &$obj;\n\n return true; // key pair successfully generated\n }", "public function setSize($var)\n {\n GPBUtil::checkInt32($var);\n $this->size = $var;\n }", "public function getMinimumRequiredPatchVersion()\n {\n if (array_key_exists(\"minimumRequiredPatchVersion\", $this->_propDict)) {\n return $this->_propDict[\"minimumRequiredPatchVersion\"];\n } else {\n return null;\n }\n }", "public function getMinimumRequiredPatchVersion()\n {\n if (array_key_exists(\"minimumRequiredPatchVersion\", $this->_propDict)) {\n return $this->_propDict[\"minimumRequiredPatchVersion\"];\n } else {\n return null;\n }\n }", "public function setMinValue($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Int64Value::class);\n $this->min_value = $var;\n\n return $this;\n }", "public function getMinValidatorRevisionRequired()\n {\n $value = $this->get(self::MIN_VALIDATOR_REVISION_REQUIRED);\n return $value === null ? (integer)$value : $value;\n }", "public function setMinDays($var)\n {\n GPBUtil::checkInt64($var);\n $this->min_days = $var;\n\n return $this;\n }", "public function getFinancingProgramCartSizeMinOrderTotal()\n {\n return $this->affirmPaymentConfig->getMfpValue('financing_program_cart_size_min_order_total');\n }", "public static function mod($base, $modulus)\n {\n if (!static::is($base) || !static::is($modulus)) {\n throw new \\InvalidArgumentException(\"The \\$base and \\$modulus parameters must be numeric.\");\n }\n\n if ($modulus == 0) {\n throw new \\InvalidArgumentException(\"Cannot divide by zero. The \\$modulus parameter cannot be zero.\");\n }\n\n return fmod($base, $modulus);\n }", "public function setMinMembers( $minMembers ) {// throws RDException;\n if($minMembers < 0) {\n throw new RDException('Min number of members of a team cannot be negative.');\n } else {\n $this->minMembers = $minMembers;\n\n }\n }", "public function getMinimumWipeOsVersion()\n {\n if (array_key_exists(\"minimumWipeOsVersion\", $this->_propDict)) {\n return $this->_propDict[\"minimumWipeOsVersion\"];\n } else {\n return null;\n }\n }", "public static function get_minimum_photo_dimension() {\n\t\treturn 2000;\n\t}", "public function minFileSize($value) {\n return $this->setProperty('minFileSize', $value);\n }", "public function getPerPageMin()\n {\n return $this->perPageMin;\n }", "public function getMinPartitionsCount()\n {\n return $this->min_partitions_count;\n }", "public function getMinMembers() {\n return $this->minMembers; \n }", "public function getWorkProfilePasswordMinimumLength(): ?int {\n $val = $this->getBackingStore()->get('workProfilePasswordMinimumLength');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'workProfilePasswordMinimumLength'\");\n }", "function GenerateRSAKey($Seed)\r\n\t{\t// Returns an array - Result[\"n\"] = n, Result[\"d\"] = e^-1 = 65537^-1\r\n\t\t\r\n\t}", "public function setSize($size)\r\n\t{\r\n\t\tif(!is_integer($size)) {\r\n\t\t\tthrow new oGravatarInvalidSizeException(\"The size must be an integer.\");\r\n\t\t}\r\n\r\n\t\tif($size > 2048 || $size < 1) {\r\n\t\t\tthrow new oGravatarInvalidSizeException(\"The size must be greater than 1 and less than 2048.\");\r\n\t\t}\r\n\r\n\t\t$this->params['s'] = $size;\r\n\t\treturn $this;\r\n\t}", "public static function get_minimum_photo_file_size( $as_bytes = true ) {\n\t\t/**\n\t\t * Filters the minimum allowed photo file size, in megabytes.\n\t\t *\n\t\t * @param int The minimum allowed photo file size, in megabytes.\n\t\t */\n\t\t$min_file_size = apply_filters( 'wporg_photos_min_photo_file_size', self::MIN_PHOTO_FILE_SIZE );\n\n\t\tif ( $as_bytes ) {\n\t\t\t$min_file_size = round( $min_file_size * 1024 * 1024 );\n\t\t}\n\n\t\treturn $min_file_size;\n\t}", "public function setSerialNumberRequired($value) {\r\n $this->_data[\"SerialNumberRequired\"] = filter_var($value, FILTER_VALIDATE_BOOLEAN);\r\n return $this;\r\n }", "public function SetMinOptions ($minOptions);", "function getMinWordLen()\n\t{\n\t\treturn $this->minWordLen;\n\t}", "public function setMinSize($value) {\n $this->settings['min_size'] = (int)$value;\n // Return for chaining\n return $this;\n }", "protected function minLength($parameter, $password)\n {\n $len = intval($parameter);\n if ($len && (strlen($password) < $len)) {\n $this->_addError(sprintf($this->translate->_('should be at least %d characters long'), $len));\n }\n }", "public function numberOfExpansionModuleKeys()\n {\n return 84;\n }" ]
[ "0.6905725", "0.6174213", "0.570117", "0.523396", "0.5229195", "0.5113391", "0.5084432", "0.49711037", "0.49245575", "0.47825882", "0.47633162", "0.47614995", "0.47260305", "0.4701796", "0.46176732", "0.45931166", "0.4568001", "0.45396176", "0.44612777", "0.44531748", "0.44337198", "0.44319975", "0.44312835", "0.44246954", "0.44237036", "0.43920624", "0.43904707", "0.43877178", "0.43836412", "0.43821788", "0.43762088", "0.43750358", "0.43734264", "0.43723574", "0.43721056", "0.43623832", "0.4347572", "0.43461487", "0.43203557", "0.43193254", "0.43062168", "0.43027034", "0.429856", "0.42557466", "0.42546833", "0.42463237", "0.4200661", "0.41814783", "0.4180797", "0.41735867", "0.41728875", "0.41694587", "0.41642442", "0.4149548", "0.4149548", "0.41493812", "0.4142878", "0.4142344", "0.4142307", "0.41112974", "0.4106281", "0.41045916", "0.40999213", "0.40937716", "0.40816462", "0.40810463", "0.40779015", "0.4076248", "0.40629506", "0.40628234", "0.40628234", "0.40564984", "0.40561754", "0.40561754", "0.40518105", "0.40488607", "0.40469387", "0.40469387", "0.40452632", "0.4044604", "0.40445125", "0.40205556", "0.3998532", "0.3977893", "0.39762354", "0.397477", "0.3962628", "0.39558804", "0.39486703", "0.39389277", "0.3937815", "0.39369008", "0.39338505", "0.3933389", "0.39252713", "0.3924614", "0.39245692", "0.39133114", "0.39115754", "0.3906936" ]
0.8038806
0
Optional. The maximum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the service will not enforce an explicit upper bound on RSA modulus sizes. Generated from protobuf field int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];
Опционально. Максимально допустимый размер модуля RSA (включительно), в битах. Если это значение не задано или установлено в ноль, служба не будет налагать явный верхний лимит на размеры модулей RSA. Сгенерировано из поля protobuf int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];
public function getMaxModulusSize() { return $this->max_modulus_size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMaxModulusSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_modulus_size = $var;\n\n return $this;\n }", "public function setMinModulusSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->min_modulus_size = $var;\n\n return $this;\n }", "public function getMinModulusSize()\n {\n return $this->min_modulus_size;\n }", "public function get_rsa_key_size_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $options = array(\n 512 => '512b',\n 1024 => '1024b',\n 2048 => '2048b',\n 4096 => '4096b'\n );\n\n return $options;\n }", "public function setMaxSize($var)\n {\n GPBUtil::checkUint32($var);\n $this->max_size = $var;\n\n return $this;\n }", "public function getSizeLimit() {\n\t\treturn $this->options->getIntegerOption('attachments_size_limit', 3145728);\n\t}", "public function getPublicKeyModulus() {}", "protected static function getAlgorithmKeysize() {\n return [\n 'RS256' => 2048,\n ];\n }", "public static function get_max_gallery_photos() {\n\t\t$max_photos = get_theme_mod( 'inventor_max_gallery_photos', false );\n\n\t\tif( ! is_numeric( $max_photos ) ) {\n\t\t\t$max_photos = false;\n\t\t}\n\n\t\treturn apply_filters( 'inventor_max_gallery_photos', $max_photos );\n\t}", "static function get_password_max_size() {\n\t\tswitch( \\Core\\Config::mantis_get( 'login_method' ) ) {\n\t\t\t# Max password size cannot be bigger than the database field\n\t\t\tcase PLAIN:\n\t\t\tcase BASIC_AUTH:\n\t\t\tcase HTTP_AUTH:\n\t\t\t\treturn DB_FIELD_SIZE_PASSWORD;\n\t\n\t\t\t# All other cases, i.e. password is stored as a hash\n\t\t\tdefault:\n\t\t\t\treturn PASSWORD_MAX_SIZE_BEFORE_HASH;\n\t\t}\n\t}", "public function setMaximumIterations($maxIterations)\n {\n if (null === $maxIterations) {\n $this->maxIterations = null;\n } else if (is_numeric($maxIterations) && 0 < intval($maxIterations)) {\n $this->maxIterations = intval($maxIterations);\n } else {\n throw new \\InvalidArgumentException(\n '$maxIterations must be null or integer number of iterations greater than 0'\n );\n }\n }", "public function set_rsa_key_size($key_size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! $this->is_loaded)\n $this->configuration = $this->_load_configuration();\n\n $this->configuration['req']['default_bits'] = $key_size;\n }", "public function numberOfExpansionModuleKeysPerPage()\n {\n return 28;\n }", "public function getNbMaxGamme() {\n return $this->nbMaxGamme;\n }", "public function getMaximumLength()\n {\n if (array_key_exists(\"maximumLength\", $this->_propDict)) {\n return $this->_propDict[\"maximumLength\"];\n } else {\n return null;\n }\n }", "public function getPodPidsLimit()\n {\n return $this->pod_pids_limit;\n }", "function setMaxSize($n)\n\t{\n\t\t$this->_maxsize = (int)$n;\n\t}", "public function powmod($exponent, $modulus)\n\t{\n\t\t$exp = self::parse($exponent, 'array');\n\t\t$mod = self::parse($modulus, 'array');\n\n\t\tif ($this->value[0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The method %s can only be called for positive number, however this number is negative',\n\t\t\t\t'powmod()'\n\t\t\t);\n\t\t}\n\n\t\tif ($exp['integer'][0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The exponent specified, %s, must be a positive integer, however it is negative',\n\t\t\t\t$exponent\n\t\t\t);\n\t\t}\n\n\t\tif ($mod['integer'][0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The modulus specified, %s, must be a positive integer, however it is negative',\n\t\t\t\t$modulus\n\t\t\t);\n\t\t}\n\n\t\t// All numbers involved in this need to be integers\n\t\t$exponent = $exp['integer'];\n\t\t$modulus = $mod['integer'];\n\t\t$len = (strpos($this->value, '.') !== FALSE) ? strpos($this->value, '.') : strlen($this->value);\n\t\t$value = substr($this->value, 0, $len);\n\n\t\tif (function_exists('bcpowmod')) {\n\t\t\t$result = bcpowmod($value, $exponent, $modulus, 0);\n\n\t\t} else {\n\t\t\t$exponent = self::baseConvert($exponent, 10, 2);\n\t\t\t$result = '+1';\n\n\t\t\tself::performDiv($value, $modulus, $first_modulus);\n\t\t\tfor ($i=0; $i < strlen($exponent); $i++) {\n\t\t\t\tself::performDiv(self::performMul($result, $result), $modulus, $result);\n\t\t\t\tif ($exponent[$i] == '1') {\n\t\t\t\t\tself::performDiv(self::performMul($result, $first_modulus), $modulus, $result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new fNumber($result);\n\t}", "public function & SetMaxSize ($maxSize);", "public function setPodPidsLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->pod_pids_limit = $var;\n\n return $this;\n }", "public function setPartitionSizeMb($var)\n {\n GPBUtil::checkUint64($var);\n $this->partition_size_mb = $var;\n\n return $this;\n }", "public function setFileSizeLimit($var)\n {\n GPBUtil::checkUint64($var);\n $this->file_size_limit = $var;\n\n return $this;\n }", "public function setMaxSize($max_size)\n\t{\n\t\t$this->max_size = (int)$max_size;\n\t\tif ($this->max_size < 0) $this->max_size = 0;\n\t}", "public function setSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->size = $var;\n\n return $this;\n }", "public function get_max_chunk_size() {\n\t\tif ( ! empty( $this->max_chunk_size ) ) {\n\t\t\treturn $this->max_chunk_size;\n\t\t}\n\n\t\t$max_size = tribe( 'db' )->get_max_allowed_packet_size();\n\n\t\t/**\n\t\t * Filters the max size of the of the chunks in bytes.\n\t\t *\n\t\t * @param int $max_size By default the `max_allowed_packet` from the database.\n\t\t */\n\t\t$this->max_chunk_size = apply_filters( 'tribe_meta_chunker_max_size', $max_size );\n\n\t\treturn $max_size;\n\t}", "public function get_max_cache_size() {\n $max_cache_size = get_option( $this->field_names['max_cache_size'], 1 );\n try {\n $max_cache_size = intval($max_cache_size);\n } catch ( Exception $e ) {\n $max_cache_size = 1;\n }\n return $max_cache_size;\n }", "public function setMax($var)\n {\n GPBUtil::checkInt32($var);\n $this->max = $var;\n\n return $this;\n }", "public function setMaxSlots($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_slots = $var;\n\n return $this;\n }", "public function getMaxBytes();", "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "static function convertRSA($modulus, $exponent) {\n /* make an ASN publicKeyInfo */\n $exponentEncoding = XMLSecurityKey::makeAsnSegment(0x02, $exponent);\n $modulusEncoding = XMLSecurityKey::makeAsnSegment(0x02, $modulus);\n $sequenceEncoding = XMLSecurityKey:: makeAsnSegment(0x30, $modulusEncoding.$exponentEncoding);\n $bitstringEncoding = XMLSecurityKey::makeAsnSegment(0x03, $sequenceEncoding);\n $rsaAlgorithmIdentifier = pack(\"H*\", \"300D06092A864886F70D0101010500\");\n $publicKeyInfo = XMLSecurityKey::makeAsnSegment (0x30, $rsaAlgorithmIdentifier.$bitstringEncoding);\n\n /* encode the publicKeyInfo in base64 and add PEM brackets */\n $publicKeyInfoBase64 = base64_encode($publicKeyInfo);\n $encoding = \"-----BEGIN PUBLIC KEY-----\\n\";\n $offset = 0;\n while ($segment=substr($publicKeyInfoBase64, $offset, 64)){\n $encoding = $encoding.$segment.\"\\n\";\n $offset += 64;\n }\n return $encoding.\"-----END PUBLIC KEY-----\\n\";\n }", "public function GetMaxSize ();", "public function setMaxParts($maxParts)\n {\n return $this->set('max_parts', (int)$maxParts);\n }", "public function setParagraphsMax ($max)\n {\n\t if (is_int ($max) && $max > 0)\n\t {\n\t $this->paragraphsMax = $max;\n\t }\n\t else\n\t {\n\t throw new \\InvalidArgumentException ('The value of $max must be a absolute int.');\n\t }\n\t \n\t return $this;\n }", "public function getMaxSize()\n {\n return $this->maxSize;\n }", "public function setMaxRetries($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_retries = $var;\n\n return $this;\n }", "public static function _mod($left_operand, $modulus)\n\t{\n\t\t$left_operand=ilMath::bcconv($left_operand);\n\t\t$modulus=ilMath::bcconv($modulus);\n\t\t\n\t\tif (function_exists(\"bcmod\"))\n\t\t{\n\t\t\treturn bcmod($left_operand, $modulus);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $left_operand % $modulus;\n\t\t}\n\t}", "public static function mod($base, $modulus)\n {\n if (!static::is($base) || !static::is($modulus)) {\n throw new \\InvalidArgumentException(\"The \\$base and \\$modulus parameters must be numeric.\");\n }\n\n if ($modulus == 0) {\n throw new \\InvalidArgumentException(\"Cannot divide by zero. The \\$modulus parameter cannot be zero.\");\n }\n\n return fmod($base, $modulus);\n }", "public function setMaxNumber($maxNumber);", "public function getMaximumSizeInBytes() {\n\t\treturn $this->maxIndividualSize;\n\t}", "public function setLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->limit = $var;\n }", "public function set_max_chunk_size( $max_chunk_size ) {\n\t\t$this->max_chunk_size = $max_chunk_size;\n\t}", "public function toPEM(): PEM\n {\n $n = $this->modulusParameter()->number()->base10();\n $e = $this->exponentParameter()->number()->base10();\n $pk = new RSAPublicKey($n, $e);\n return PublicKeyInfo::fromPublicKey($pk)->toPEM();\n }", "public function setMaxMembers( $maxMembers ) { // throws RDException; \n \n if($maxMembers < 0 || $maxMembers < $this->minMembers) {\n throw new RDException('Max number of members of a team cannot be smaller than the min number of teams or negative.'); \n } else {\n $this->maxMembers = $maxMembers;\n }\n }", "public static function getMaxUploadFileSize()\n {\n return '2M';\n }", "function setMaxSize($size) {\n\n $this->field['max_size'] = $size;\n return $this;\n\n }", "public function setMaxSize( $max_size = 0 )\n {\n $this->max_size = $max_size;\n return $this;\n }", "public function setMemoryLimit($var)\n {\n GPBUtil::checkUint64($var);\n $this->memory_limit = $var;\n\n return $this;\n }", "public function getMltMaxWordLength(): int {}", "public function getMltMaxWordLength(): int {}", "public function setMax($max);", "public function getSizeLimit() {\n $validator = $this->getValidator('Size');\n if ($validator) {\n return $validator->getMax('raw');\n } else {\n return null;\n }\n }", "public function getMaximumSizeInGigabytes() {\n\t\treturn (int) ($this->maxIndividualSize / 1024 / 1024 / 1024);\n\t}", "public function getMaxPasswordLength()\n {\n $wordCount = $this->getWordCount();\n\n return ($this->getMaxWordLength() * $wordCount) + (strlen($this->getWordSeparator()) * ($wordCount - 1));\n }", "public function getPinMaximumLength(): ?int {\n $val = $this->getBackingStore()->get('pinMaximumLength');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'pinMaximumLength'\");\n }", "function unframed_jsbn_rsa_new($bitLength=512) {\n\treturn openssl_pkey_new(array(\n\t \"private_key_bits\" => $bitLength,\n\t \"private_key_type\" => OPENSSL_KEYTYPE_RSA,\n\t));\n}", "function getMaxSize()\n\t{\n\t\treturn $this->_maxsize;\n\t}", "public function maximumSize()\n {\n return $this->size;\n }", "protected function hasPublicKeyModulus() {}", "public function setMaxSize($maxsize)\n {\n $this->maxSize = $maxsize;\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->writeOneof(5, $var);\n\n return $this;\n }", "function _big_decrypt_rsa($private_key, $encrypted_text)\n{\n $encrypted_chunks = explode('.', $encrypted_text);\n $plain_chunks = [];\n foreach ($encrypted_chunks as $encrypted_hex) {\n $plain_part = _decrypt_rsa($private_key, $encrypted_hex);\n $plain_chunks[] = $plain_part;\n }\n $plain_text = implode('', $plain_chunks);\n // var_dump(mb_strlen($plain_text));\n\n return $plain_text;\n}", "public function getMaximumSizeInKilobytes() {\n\t\treturn (int) ($this->maxIndividualSize / 1024);\n\t}", "function CalculateHeightMod($nOpponentHeight)\n\t{\n\t\t$this->nHeightMod = $this->nHeight - $nOpponentHeight;\n\t}", "public function getModulo()\n {\n return $this->Modulo;\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->limit = $var;\n\n return $this;\n }", "public function getMaxSize()\n {\n return $this->max_size;\n }", "public function setMaxSize($size)\r\n {\r\n $this->_maxSize = $size;\r\n }", "function fileMaxSize($maxSize = 1){\n\treturn $maxSize * 1024 * 1024;\n}", "public function getPaddingReservedSize();", "public function getMaxSize()\n\t{\n\t\treturn $this->max_size;\n\t}", "public function getDefaultLimitValue() : int\n {\n return 24;\n }", "public function setMaxSpeakerCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_speaker_count = $var;\n\n return $this;\n }", "public function setM($var)\n {\n GPBUtil::checkUint32($var);\n $this->m = $var;\n\n return $this;\n }", "public function validate_key_size($key_size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!is_int((int)$key_size) || $key_size < 1024)\n return lang('certificate_manager_key_size_invalid');\n }", "private function __validate_param_pie_max_ecnth() {\n if ($this->validated_data[\"aqm\"] === \"pie\") {\n # Check for our optional `param_pie_max_ecnth` payload value\n if (isset($this->initial_data[\"param_pie_max_ecnth\"])) {\n # Ensure the param_pie_max_ecnth is numeric\n if (is_numeric($this->initial_data[\"param_pie_max_ecnth\"])) {\n # Ensure the param_pie_max_ecnth value is 0 or greater\n if (intval($this->initial_data[\"param_pie_max_ecnth\"]) >= 0) {\n $this->validated_data[\"param_pie_max_ecnth\"] = intval($this->initial_data[\"param_pie_max_ecnth\"]);\n } else {\n $this->errors[] = APIResponse\\get(4187);\n }\n } else {\n $this->errors[] = APIResponse\\get(4187);\n }\n } else {\n $this->validated_data[\"param_pie_max_ecnth\"] = 99;\n }\n }\n }", "public function gperm_modid( $format = '' )\r\n\t{\r\n\t\treturn $this->getVar( 'gperm_modid', $format );\r\n\t}", "private function setMaxInputSize($size)\n {\n if (null !== $size) {\n $this->size = $size;\n } else {\n $maxBytes = 128*1024*1024;\n\n if (preg_match('/([0-9]+)([mMgG])/', @ini_get('memory_limit'), $m)) {\n $maxBytes = (stristr($m[2], 'm')) ? 1024*1024*$m[1] : 1024*1024*1024*$m[1];\n }\n\n $this->size = $maxBytes * 0.33;\n }\n }", "public function lenPageMod() { return $this->_m_lenPageMod; }", "function GenerateRSAKey($Seed)\r\n\t{\t// Returns an array - Result[\"n\"] = n, Result[\"d\"] = e^-1 = 65537^-1\r\n\t\t\r\n\t}", "public static function getMaxLength(): int {\n\t\treturn self::$maxLength;\n\t}", "public function setMax($max)\n\t\t{\n\t\t\tif($max == 1 || $max == 'n')\n\t\t\t{\n\t\t\t\t$this->max= $max;\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tthrow new Exception(\"Invalid maximum quantifier: \".$max, 0);\n\t\t\treturn false;\n\t\t}", "function generate($key_len = null)\n {\n if (is_null($key_len)) {\n // use an old key length\n $key_len = $this->_key_len;\n if (is_null($key_len)) {\n $this->pushError('missing key_len parameter', CRYPT_RSA_ERROR_MISSING_KEY_LEN);\n return false;\n }\n }\n\n // minimal key length is 8 bit ;)\n if ($key_len < 8) {\n $key_len = 8;\n }\n // store key length in the _key_len property\n $this->_key_len = $key_len;\n\n // set [e] to 0x10001 (65537)\n $e = $this->_math_obj->bin2int(\"\\x01\\x00\\x01\");\n\n // generate [p], [q] and [n]\n $p_len = intval(($key_len + 1) / 2);\n $q_len = $key_len - $p_len;\n $p1 = $q1 = 0;\n do {\n // generate prime number [$p] with length [$p_len] with the following condition:\n // GCD($e, $p - 1) = 1\n do {\n $p = $this->_math_obj->getPrime($p_len, $this->_random_generator);\n $p1 = $this->_math_obj->dec($p);\n $tmp = $this->_math_obj->GCD($e, $p1);\n } while (!$this->_math_obj->isOne($tmp));\n // generate prime number [$q] with length [$q_len] with the following conditions:\n // GCD($e, $q - 1) = 1\n // $q != $p\n do {\n $q = $this->_math_obj->getPrime($q_len, $this->_random_generator);\n $q1 = $this->_math_obj->dec($q);\n $tmp = $this->_math_obj->GCD($e, $q1);\n } while (!$this->_math_obj->isOne($tmp) && !$this->_math_obj->cmpAbs($q, $p));\n // if (p < q), then exchange them\n if ($this->_math_obj->cmpAbs($p, $q) < 0) {\n $tmp = $p;\n $p = $q;\n $q = $tmp;\n $tmp = $p1;\n $p1 = $q1;\n $q1 = $tmp;\n }\n // calculate n = p * q\n $n = $this->_math_obj->mul($p, $q);\n } while ($this->_math_obj->bitLen($n) != $key_len);\n\n // calculate d = 1/e mod (p - 1) * (q - 1)\n $pq = $this->_math_obj->mul($p1, $q1);\n $d = $this->_math_obj->invmod($e, $pq);\n\n // calculate dmp1 = d mod (p - 1)\n $dmp1 = $this->_math_obj->mod($d, $p1);\n\n // calculate dmq1 = d mod (q - 1)\n $dmq1 = $this->_math_obj->mod($d, $q1);\n\n // calculate iqmp = 1/q mod p\n $iqmp = $this->_math_obj->invmod($q, $p);\n\n // store RSA keypair attributes\n $this->_attrs = array(\n 'version' => \"\\x00\",\n 'n' => $this->_math_obj->int2bin($n),\n 'e' => $this->_math_obj->int2bin($e),\n 'd' => $this->_math_obj->int2bin($d),\n 'p' => $this->_math_obj->int2bin($p),\n 'q' => $this->_math_obj->int2bin($q),\n 'dmp1' => $this->_math_obj->int2bin($dmp1),\n 'dmq1' => $this->_math_obj->int2bin($dmq1),\n 'iqmp' => $this->_math_obj->int2bin($iqmp),\n );\n\n $n = $this->_attrs['n'];\n $e = $this->_attrs['e'];\n $d = $this->_attrs['d'];\n\n // try to create public key object\n $obj = &new Crypt_RSA_myKey($n, $e, 'public', $this->_math_obj->getWrapperName(), $this->_error_handler);\n if ($obj->isError()) {\n // error during creating public object\n $this->pushError($obj->getLastError());\n return false;\n }\n $this->_public_key = &$obj;\n\n // try to create private key object\n $obj = &new Crypt_RSA_myKey($n, $d, 'private', $this->_math_obj->getWrapperName(), $this->_error_handler);\n if ($obj->isError()) {\n // error during creating private key object\n $this->pushError($obj->getLastError());\n return false;\n }\n $this->_private_key = &$obj;\n\n return true; // key pair successfully generated\n }", "public function getMaxLength()\r\r\n {\r\r\n return $this->maxLength;\r\r\n }", "public function setMaxNumberOfMessages($var)\n {\n GPBUtil::checkInt32($var);\n $this->MaxNumberOfMessages = $var;\n\n return $this;\n }", "public function setMaxDays($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_days = $var;\n\n return $this;\n }", "public static function getMaximumPathLength() {}", "function setMaxLength($max_len)\n {\n $this->max_len = (int) $max_len;\n }", "public function numberOfExpansionModuleKeys()\n {\n return 84;\n }", "public function getMaxMessageLength()\n {\n return $this->maxMessageLength;\n }", "public function getMaxLength()\n {\n return $this->getProperty(self::MAX_LENGTH);\n }", "#[Deprecated(since: '7.1')]\nfunction mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = null) {}", "public function gidSize() { return $this->_m_gidSize; }", "public function getMaxSize()\n {\n return $this->size;\n }", "public function setPageSizeMax($size);", "public static function getMaxUploadFileSize() {}", "public function getMaximumSizeInMegabytes() {\n\t\treturn (int) ($this->maxIndividualSize / 1024 / 1024);\n\t}", "public function setMaxOutstandingBytes($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_outstanding_bytes = $var;\n\n return $this;\n }", "public function getMaxMembers() {\n return $this->maxMembers; \n }", "public function getMaxLength()\n {\n return $this->maxLength;\n }" ]
[ "0.77651685", "0.60758984", "0.57006145", "0.51084566", "0.49039975", "0.48993745", "0.48474458", "0.47232297", "0.46636304", "0.46603155", "0.46591157", "0.4653052", "0.45981887", "0.4541548", "0.4539917", "0.45318967", "0.45193267", "0.44970387", "0.44959825", "0.43818384", "0.43592024", "0.43485066", "0.43417978", "0.4316317", "0.42947263", "0.4291531", "0.428933", "0.4288313", "0.4282065", "0.42782736", "0.4275838", "0.4261667", "0.4258729", "0.4257192", "0.42555696", "0.42511693", "0.42462", "0.4242486", "0.42384285", "0.42383108", "0.42320874", "0.4229567", "0.42081526", "0.42058903", "0.41978636", "0.41799992", "0.41760457", "0.41752785", "0.41680777", "0.41680777", "0.41613084", "0.41602156", "0.41578048", "0.41552016", "0.4153383", "0.41492575", "0.41452187", "0.41448948", "0.41441655", "0.41354012", "0.4134938", "0.41343746", "0.41191176", "0.4118505", "0.411311", "0.41116878", "0.41108283", "0.41081223", "0.4103527", "0.41032073", "0.41021445", "0.40934762", "0.40930355", "0.4085979", "0.408354", "0.40768677", "0.40754122", "0.4072606", "0.40710992", "0.4066036", "0.40654573", "0.40608343", "0.4057472", "0.40498832", "0.40483922", "0.4044687", "0.40431452", "0.4042379", "0.40397897", "0.40393308", "0.40315005", "0.40276805", "0.40234464", "0.40165547", "0.4011898", "0.40095404", "0.40082338", "0.40028024", "0.39994588", "0.39974356" ]
0.72106975
1
Optional. The maximum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the service will not enforce an explicit upper bound on RSA modulus sizes. Generated from protobuf field int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];
Опционально. Максимальный допустимый размер модуля RSA (включительно), в битах. Если это значение не задано или установлено в ноль, служба не будет применять явный верхний предел для размеров модулей RSA. Сгенерировано из поля protobuf int64 max_modulus_size = 2 [(.google.api.field_behavior) = OPTIONAL];
public function setMaxModulusSize($var) { GPBUtil::checkInt64($var); $this->max_modulus_size = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxModulusSize()\n {\n return $this->max_modulus_size;\n }", "public function setMinModulusSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->min_modulus_size = $var;\n\n return $this;\n }", "public function getMinModulusSize()\n {\n return $this->min_modulus_size;\n }", "public function get_rsa_key_size_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $options = array(\n 512 => '512b',\n 1024 => '1024b',\n 2048 => '2048b',\n 4096 => '4096b'\n );\n\n return $options;\n }", "public function setMaxSize($var)\n {\n GPBUtil::checkUint32($var);\n $this->max_size = $var;\n\n return $this;\n }", "public function getSizeLimit() {\n\t\treturn $this->options->getIntegerOption('attachments_size_limit', 3145728);\n\t}", "public function getPublicKeyModulus() {}", "protected static function getAlgorithmKeysize() {\n return [\n 'RS256' => 2048,\n ];\n }", "public static function get_max_gallery_photos() {\n\t\t$max_photos = get_theme_mod( 'inventor_max_gallery_photos', false );\n\n\t\tif( ! is_numeric( $max_photos ) ) {\n\t\t\t$max_photos = false;\n\t\t}\n\n\t\treturn apply_filters( 'inventor_max_gallery_photos', $max_photos );\n\t}", "static function get_password_max_size() {\n\t\tswitch( \\Core\\Config::mantis_get( 'login_method' ) ) {\n\t\t\t# Max password size cannot be bigger than the database field\n\t\t\tcase PLAIN:\n\t\t\tcase BASIC_AUTH:\n\t\t\tcase HTTP_AUTH:\n\t\t\t\treturn DB_FIELD_SIZE_PASSWORD;\n\t\n\t\t\t# All other cases, i.e. password is stored as a hash\n\t\t\tdefault:\n\t\t\t\treturn PASSWORD_MAX_SIZE_BEFORE_HASH;\n\t\t}\n\t}", "public function setMaximumIterations($maxIterations)\n {\n if (null === $maxIterations) {\n $this->maxIterations = null;\n } else if (is_numeric($maxIterations) && 0 < intval($maxIterations)) {\n $this->maxIterations = intval($maxIterations);\n } else {\n throw new \\InvalidArgumentException(\n '$maxIterations must be null or integer number of iterations greater than 0'\n );\n }\n }", "public function set_rsa_key_size($key_size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! $this->is_loaded)\n $this->configuration = $this->_load_configuration();\n\n $this->configuration['req']['default_bits'] = $key_size;\n }", "public function numberOfExpansionModuleKeysPerPage()\n {\n return 28;\n }", "public function getNbMaxGamme() {\n return $this->nbMaxGamme;\n }", "public function getMaximumLength()\n {\n if (array_key_exists(\"maximumLength\", $this->_propDict)) {\n return $this->_propDict[\"maximumLength\"];\n } else {\n return null;\n }\n }", "public function getPodPidsLimit()\n {\n return $this->pod_pids_limit;\n }", "function setMaxSize($n)\n\t{\n\t\t$this->_maxsize = (int)$n;\n\t}", "public function powmod($exponent, $modulus)\n\t{\n\t\t$exp = self::parse($exponent, 'array');\n\t\t$mod = self::parse($modulus, 'array');\n\n\t\tif ($this->value[0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The method %s can only be called for positive number, however this number is negative',\n\t\t\t\t'powmod()'\n\t\t\t);\n\t\t}\n\n\t\tif ($exp['integer'][0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The exponent specified, %s, must be a positive integer, however it is negative',\n\t\t\t\t$exponent\n\t\t\t);\n\t\t}\n\n\t\tif ($mod['integer'][0] == '-') {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The modulus specified, %s, must be a positive integer, however it is negative',\n\t\t\t\t$modulus\n\t\t\t);\n\t\t}\n\n\t\t// All numbers involved in this need to be integers\n\t\t$exponent = $exp['integer'];\n\t\t$modulus = $mod['integer'];\n\t\t$len = (strpos($this->value, '.') !== FALSE) ? strpos($this->value, '.') : strlen($this->value);\n\t\t$value = substr($this->value, 0, $len);\n\n\t\tif (function_exists('bcpowmod')) {\n\t\t\t$result = bcpowmod($value, $exponent, $modulus, 0);\n\n\t\t} else {\n\t\t\t$exponent = self::baseConvert($exponent, 10, 2);\n\t\t\t$result = '+1';\n\n\t\t\tself::performDiv($value, $modulus, $first_modulus);\n\t\t\tfor ($i=0; $i < strlen($exponent); $i++) {\n\t\t\t\tself::performDiv(self::performMul($result, $result), $modulus, $result);\n\t\t\t\tif ($exponent[$i] == '1') {\n\t\t\t\t\tself::performDiv(self::performMul($result, $first_modulus), $modulus, $result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new fNumber($result);\n\t}", "public function & SetMaxSize ($maxSize);", "public function setPodPidsLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->pod_pids_limit = $var;\n\n return $this;\n }", "public function setPartitionSizeMb($var)\n {\n GPBUtil::checkUint64($var);\n $this->partition_size_mb = $var;\n\n return $this;\n }", "public function setFileSizeLimit($var)\n {\n GPBUtil::checkUint64($var);\n $this->file_size_limit = $var;\n\n return $this;\n }", "public function setMaxSize($max_size)\n\t{\n\t\t$this->max_size = (int)$max_size;\n\t\tif ($this->max_size < 0) $this->max_size = 0;\n\t}", "public function setSize($var)\n {\n GPBUtil::checkInt64($var);\n $this->size = $var;\n\n return $this;\n }", "public function get_max_chunk_size() {\n\t\tif ( ! empty( $this->max_chunk_size ) ) {\n\t\t\treturn $this->max_chunk_size;\n\t\t}\n\n\t\t$max_size = tribe( 'db' )->get_max_allowed_packet_size();\n\n\t\t/**\n\t\t * Filters the max size of the of the chunks in bytes.\n\t\t *\n\t\t * @param int $max_size By default the `max_allowed_packet` from the database.\n\t\t */\n\t\t$this->max_chunk_size = apply_filters( 'tribe_meta_chunker_max_size', $max_size );\n\n\t\treturn $max_size;\n\t}", "public function get_max_cache_size() {\n $max_cache_size = get_option( $this->field_names['max_cache_size'], 1 );\n try {\n $max_cache_size = intval($max_cache_size);\n } catch ( Exception $e ) {\n $max_cache_size = 1;\n }\n return $max_cache_size;\n }", "public function setMax($var)\n {\n GPBUtil::checkInt32($var);\n $this->max = $var;\n\n return $this;\n }", "public function setMaxSlots($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_slots = $var;\n\n return $this;\n }", "public function getMaxBytes();", "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "static function convertRSA($modulus, $exponent) {\n /* make an ASN publicKeyInfo */\n $exponentEncoding = XMLSecurityKey::makeAsnSegment(0x02, $exponent);\n $modulusEncoding = XMLSecurityKey::makeAsnSegment(0x02, $modulus);\n $sequenceEncoding = XMLSecurityKey:: makeAsnSegment(0x30, $modulusEncoding.$exponentEncoding);\n $bitstringEncoding = XMLSecurityKey::makeAsnSegment(0x03, $sequenceEncoding);\n $rsaAlgorithmIdentifier = pack(\"H*\", \"300D06092A864886F70D0101010500\");\n $publicKeyInfo = XMLSecurityKey::makeAsnSegment (0x30, $rsaAlgorithmIdentifier.$bitstringEncoding);\n\n /* encode the publicKeyInfo in base64 and add PEM brackets */\n $publicKeyInfoBase64 = base64_encode($publicKeyInfo);\n $encoding = \"-----BEGIN PUBLIC KEY-----\\n\";\n $offset = 0;\n while ($segment=substr($publicKeyInfoBase64, $offset, 64)){\n $encoding = $encoding.$segment.\"\\n\";\n $offset += 64;\n }\n return $encoding.\"-----END PUBLIC KEY-----\\n\";\n }", "public function GetMaxSize ();", "public function setMaxParts($maxParts)\n {\n return $this->set('max_parts', (int)$maxParts);\n }", "public function setParagraphsMax ($max)\n {\n\t if (is_int ($max) && $max > 0)\n\t {\n\t $this->paragraphsMax = $max;\n\t }\n\t else\n\t {\n\t throw new \\InvalidArgumentException ('The value of $max must be a absolute int.');\n\t }\n\t \n\t return $this;\n }", "public function getMaxSize()\n {\n return $this->maxSize;\n }", "public function setMaxRetries($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_retries = $var;\n\n return $this;\n }", "public static function _mod($left_operand, $modulus)\n\t{\n\t\t$left_operand=ilMath::bcconv($left_operand);\n\t\t$modulus=ilMath::bcconv($modulus);\n\t\t\n\t\tif (function_exists(\"bcmod\"))\n\t\t{\n\t\t\treturn bcmod($left_operand, $modulus);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $left_operand % $modulus;\n\t\t}\n\t}", "public static function mod($base, $modulus)\n {\n if (!static::is($base) || !static::is($modulus)) {\n throw new \\InvalidArgumentException(\"The \\$base and \\$modulus parameters must be numeric.\");\n }\n\n if ($modulus == 0) {\n throw new \\InvalidArgumentException(\"Cannot divide by zero. The \\$modulus parameter cannot be zero.\");\n }\n\n return fmod($base, $modulus);\n }", "public function setMaxNumber($maxNumber);", "public function getMaximumSizeInBytes() {\n\t\treturn $this->maxIndividualSize;\n\t}", "public function setLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->limit = $var;\n }", "public function set_max_chunk_size( $max_chunk_size ) {\n\t\t$this->max_chunk_size = $max_chunk_size;\n\t}", "public function toPEM(): PEM\n {\n $n = $this->modulusParameter()->number()->base10();\n $e = $this->exponentParameter()->number()->base10();\n $pk = new RSAPublicKey($n, $e);\n return PublicKeyInfo::fromPublicKey($pk)->toPEM();\n }", "public function setMaxMembers( $maxMembers ) { // throws RDException; \n \n if($maxMembers < 0 || $maxMembers < $this->minMembers) {\n throw new RDException('Max number of members of a team cannot be smaller than the min number of teams or negative.'); \n } else {\n $this->maxMembers = $maxMembers;\n }\n }", "public static function getMaxUploadFileSize()\n {\n return '2M';\n }", "function setMaxSize($size) {\n\n $this->field['max_size'] = $size;\n return $this;\n\n }", "public function setMaxSize( $max_size = 0 )\n {\n $this->max_size = $max_size;\n return $this;\n }", "public function setMemoryLimit($var)\n {\n GPBUtil::checkUint64($var);\n $this->memory_limit = $var;\n\n return $this;\n }", "public function getMltMaxWordLength(): int {}", "public function getMltMaxWordLength(): int {}", "public function setMax($max);", "public function getSizeLimit() {\n $validator = $this->getValidator('Size');\n if ($validator) {\n return $validator->getMax('raw');\n } else {\n return null;\n }\n }", "public function getMaximumSizeInGigabytes() {\n\t\treturn (int) ($this->maxIndividualSize / 1024 / 1024 / 1024);\n\t}", "public function getMaxPasswordLength()\n {\n $wordCount = $this->getWordCount();\n\n return ($this->getMaxWordLength() * $wordCount) + (strlen($this->getWordSeparator()) * ($wordCount - 1));\n }", "public function getPinMaximumLength(): ?int {\n $val = $this->getBackingStore()->get('pinMaximumLength');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'pinMaximumLength'\");\n }", "function unframed_jsbn_rsa_new($bitLength=512) {\n\treturn openssl_pkey_new(array(\n\t \"private_key_bits\" => $bitLength,\n\t \"private_key_type\" => OPENSSL_KEYTYPE_RSA,\n\t));\n}", "function getMaxSize()\n\t{\n\t\treturn $this->_maxsize;\n\t}", "public function maximumSize()\n {\n return $this->size;\n }", "protected function hasPublicKeyModulus() {}", "public function setMaxSize($maxsize)\n {\n $this->maxSize = $maxsize;\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt32($var);\n $this->writeOneof(5, $var);\n\n return $this;\n }", "function _big_decrypt_rsa($private_key, $encrypted_text)\n{\n $encrypted_chunks = explode('.', $encrypted_text);\n $plain_chunks = [];\n foreach ($encrypted_chunks as $encrypted_hex) {\n $plain_part = _decrypt_rsa($private_key, $encrypted_hex);\n $plain_chunks[] = $plain_part;\n }\n $plain_text = implode('', $plain_chunks);\n // var_dump(mb_strlen($plain_text));\n\n return $plain_text;\n}", "function CalculateHeightMod($nOpponentHeight)\n\t{\n\t\t$this->nHeightMod = $this->nHeight - $nOpponentHeight;\n\t}", "public function getMaximumSizeInKilobytes() {\n\t\treturn (int) ($this->maxIndividualSize / 1024);\n\t}", "public function getModulo()\n {\n return $this->Modulo;\n }", "public function setLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->limit = $var;\n\n return $this;\n }", "public function getMaxSize()\n {\n return $this->max_size;\n }", "public function setMaxSize($size)\r\n {\r\n $this->_maxSize = $size;\r\n }", "function fileMaxSize($maxSize = 1){\n\treturn $maxSize * 1024 * 1024;\n}", "public function getPaddingReservedSize();", "public function getMaxSize()\n\t{\n\t\treturn $this->max_size;\n\t}", "public function getDefaultLimitValue() : int\n {\n return 24;\n }", "public function setMaxSpeakerCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_speaker_count = $var;\n\n return $this;\n }", "public function setM($var)\n {\n GPBUtil::checkUint32($var);\n $this->m = $var;\n\n return $this;\n }", "public function validate_key_size($key_size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!is_int((int)$key_size) || $key_size < 1024)\n return lang('certificate_manager_key_size_invalid');\n }", "public function gperm_modid( $format = '' )\r\n\t{\r\n\t\treturn $this->getVar( 'gperm_modid', $format );\r\n\t}", "private function __validate_param_pie_max_ecnth() {\n if ($this->validated_data[\"aqm\"] === \"pie\") {\n # Check for our optional `param_pie_max_ecnth` payload value\n if (isset($this->initial_data[\"param_pie_max_ecnth\"])) {\n # Ensure the param_pie_max_ecnth is numeric\n if (is_numeric($this->initial_data[\"param_pie_max_ecnth\"])) {\n # Ensure the param_pie_max_ecnth value is 0 or greater\n if (intval($this->initial_data[\"param_pie_max_ecnth\"]) >= 0) {\n $this->validated_data[\"param_pie_max_ecnth\"] = intval($this->initial_data[\"param_pie_max_ecnth\"]);\n } else {\n $this->errors[] = APIResponse\\get(4187);\n }\n } else {\n $this->errors[] = APIResponse\\get(4187);\n }\n } else {\n $this->validated_data[\"param_pie_max_ecnth\"] = 99;\n }\n }\n }", "private function setMaxInputSize($size)\n {\n if (null !== $size) {\n $this->size = $size;\n } else {\n $maxBytes = 128*1024*1024;\n\n if (preg_match('/([0-9]+)([mMgG])/', @ini_get('memory_limit'), $m)) {\n $maxBytes = (stristr($m[2], 'm')) ? 1024*1024*$m[1] : 1024*1024*1024*$m[1];\n }\n\n $this->size = $maxBytes * 0.33;\n }\n }", "public function lenPageMod() { return $this->_m_lenPageMod; }", "function GenerateRSAKey($Seed)\r\n\t{\t// Returns an array - Result[\"n\"] = n, Result[\"d\"] = e^-1 = 65537^-1\r\n\t\t\r\n\t}", "public static function getMaxLength(): int {\n\t\treturn self::$maxLength;\n\t}", "public function setMax($max)\n\t\t{\n\t\t\tif($max == 1 || $max == 'n')\n\t\t\t{\n\t\t\t\t$this->max= $max;\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tthrow new Exception(\"Invalid maximum quantifier: \".$max, 0);\n\t\t\treturn false;\n\t\t}", "function generate($key_len = null)\n {\n if (is_null($key_len)) {\n // use an old key length\n $key_len = $this->_key_len;\n if (is_null($key_len)) {\n $this->pushError('missing key_len parameter', CRYPT_RSA_ERROR_MISSING_KEY_LEN);\n return false;\n }\n }\n\n // minimal key length is 8 bit ;)\n if ($key_len < 8) {\n $key_len = 8;\n }\n // store key length in the _key_len property\n $this->_key_len = $key_len;\n\n // set [e] to 0x10001 (65537)\n $e = $this->_math_obj->bin2int(\"\\x01\\x00\\x01\");\n\n // generate [p], [q] and [n]\n $p_len = intval(($key_len + 1) / 2);\n $q_len = $key_len - $p_len;\n $p1 = $q1 = 0;\n do {\n // generate prime number [$p] with length [$p_len] with the following condition:\n // GCD($e, $p - 1) = 1\n do {\n $p = $this->_math_obj->getPrime($p_len, $this->_random_generator);\n $p1 = $this->_math_obj->dec($p);\n $tmp = $this->_math_obj->GCD($e, $p1);\n } while (!$this->_math_obj->isOne($tmp));\n // generate prime number [$q] with length [$q_len] with the following conditions:\n // GCD($e, $q - 1) = 1\n // $q != $p\n do {\n $q = $this->_math_obj->getPrime($q_len, $this->_random_generator);\n $q1 = $this->_math_obj->dec($q);\n $tmp = $this->_math_obj->GCD($e, $q1);\n } while (!$this->_math_obj->isOne($tmp) && !$this->_math_obj->cmpAbs($q, $p));\n // if (p < q), then exchange them\n if ($this->_math_obj->cmpAbs($p, $q) < 0) {\n $tmp = $p;\n $p = $q;\n $q = $tmp;\n $tmp = $p1;\n $p1 = $q1;\n $q1 = $tmp;\n }\n // calculate n = p * q\n $n = $this->_math_obj->mul($p, $q);\n } while ($this->_math_obj->bitLen($n) != $key_len);\n\n // calculate d = 1/e mod (p - 1) * (q - 1)\n $pq = $this->_math_obj->mul($p1, $q1);\n $d = $this->_math_obj->invmod($e, $pq);\n\n // calculate dmp1 = d mod (p - 1)\n $dmp1 = $this->_math_obj->mod($d, $p1);\n\n // calculate dmq1 = d mod (q - 1)\n $dmq1 = $this->_math_obj->mod($d, $q1);\n\n // calculate iqmp = 1/q mod p\n $iqmp = $this->_math_obj->invmod($q, $p);\n\n // store RSA keypair attributes\n $this->_attrs = array(\n 'version' => \"\\x00\",\n 'n' => $this->_math_obj->int2bin($n),\n 'e' => $this->_math_obj->int2bin($e),\n 'd' => $this->_math_obj->int2bin($d),\n 'p' => $this->_math_obj->int2bin($p),\n 'q' => $this->_math_obj->int2bin($q),\n 'dmp1' => $this->_math_obj->int2bin($dmp1),\n 'dmq1' => $this->_math_obj->int2bin($dmq1),\n 'iqmp' => $this->_math_obj->int2bin($iqmp),\n );\n\n $n = $this->_attrs['n'];\n $e = $this->_attrs['e'];\n $d = $this->_attrs['d'];\n\n // try to create public key object\n $obj = &new Crypt_RSA_myKey($n, $e, 'public', $this->_math_obj->getWrapperName(), $this->_error_handler);\n if ($obj->isError()) {\n // error during creating public object\n $this->pushError($obj->getLastError());\n return false;\n }\n $this->_public_key = &$obj;\n\n // try to create private key object\n $obj = &new Crypt_RSA_myKey($n, $d, 'private', $this->_math_obj->getWrapperName(), $this->_error_handler);\n if ($obj->isError()) {\n // error during creating private key object\n $this->pushError($obj->getLastError());\n return false;\n }\n $this->_private_key = &$obj;\n\n return true; // key pair successfully generated\n }", "public function getMaxLength()\r\r\n {\r\r\n return $this->maxLength;\r\r\n }", "public function setMaxNumberOfMessages($var)\n {\n GPBUtil::checkInt32($var);\n $this->MaxNumberOfMessages = $var;\n\n return $this;\n }", "public function setMaxDays($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_days = $var;\n\n return $this;\n }", "public static function getMaximumPathLength() {}", "function setMaxLength($max_len)\n {\n $this->max_len = (int) $max_len;\n }", "public function numberOfExpansionModuleKeys()\n {\n return 84;\n }", "public function getMaxMessageLength()\n {\n return $this->maxMessageLength;\n }", "public function getMaxLength()\n {\n return $this->getProperty(self::MAX_LENGTH);\n }", "#[Deprecated(since: '7.1')]\nfunction mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = null) {}", "public function gidSize() { return $this->_m_gidSize; }", "public function getMaxSize()\n {\n return $this->size;\n }", "public function setPageSizeMax($size);", "public static function getMaxUploadFileSize() {}", "public function getMaximumSizeInMegabytes() {\n\t\treturn (int) ($this->maxIndividualSize / 1024 / 1024);\n\t}", "public function setMaxOutstandingBytes($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_outstanding_bytes = $var;\n\n return $this;\n }", "public function getMaxMembers() {\n return $this->maxMembers; \n }", "public function getMaxLength()\n {\n return $this->maxLength;\n }" ]
[ "0.72118145", "0.6078501", "0.57022846", "0.5107281", "0.49036628", "0.48981413", "0.48478982", "0.47229466", "0.46634477", "0.46595463", "0.46588686", "0.46519506", "0.4598137", "0.45404795", "0.45385134", "0.453063", "0.4519402", "0.4498698", "0.44957766", "0.43810034", "0.4358194", "0.43478113", "0.4341273", "0.4316687", "0.4293552", "0.4290841", "0.428952", "0.42889774", "0.42807868", "0.42775935", "0.42759436", "0.42612416", "0.42587477", "0.42559814", "0.42546338", "0.4251303", "0.42483824", "0.42443615", "0.42387864", "0.4236645", "0.4232076", "0.422933", "0.4206864", "0.4205275", "0.41970465", "0.41800147", "0.4175273", "0.41746724", "0.41669956", "0.41669956", "0.41614357", "0.41595066", "0.41568446", "0.41540363", "0.4152587", "0.41489276", "0.41442928", "0.41439462", "0.41438812", "0.4135369", "0.41352025", "0.4133105", "0.4119368", "0.41178876", "0.4114694", "0.411184", "0.41097522", "0.41080642", "0.41031677", "0.4102612", "0.41010845", "0.409359", "0.4092224", "0.40862855", "0.4082352", "0.40766573", "0.407562", "0.4072433", "0.40714163", "0.406535", "0.40642998", "0.40611696", "0.40566856", "0.40490457", "0.40471324", "0.40448007", "0.4042199", "0.4041761", "0.4040175", "0.4037641", "0.4030661", "0.40272266", "0.4023041", "0.40156066", "0.4011395", "0.40083826", "0.40070596", "0.40012366", "0.3998336", "0.39965594" ]
0.7766827
0
Return the number of covered elemetns.
Верните количество покрытых элементов.
public function getCoveredElementCount() : int { return $this->covered_statement_count + $this->covered_conditional_count + $this->covered_method_count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calcCoverage(): int\n {\n $cover = 0;\n $tiles = &$this->levelTiles->tiles;\n foreach ($this->markers as $marker) {\n [$x, $y] = $marker->xy;\n if (isset($tiles[$x][$y][1]) && $tiles[$x][$y][1]->id === 5) {\n ++$cover;\n }\n }\n return $cover;\n }", "public function getCoveredLines()\n {\n $lines = 0;\n foreach ($this->getCoverages() as $coverage) {\n $lines += $coverage->getCoveredLineCount();\n }\n return $lines;\n }", "public function getTotalNumberOfElements()\n {\n return $this->getOpenCourseService()->countClosedCourses($this->getCondition());\n }", "public function count() {\n\t\treturn count( $this->element ) ;\n\t}", "public function count()\n {\n return count($this->element);\n }", "public function count(): int\n {\n return count($this->elements);\n }", "public function count ()\n {\n return count($this->elements);\n }", "public function count() {\n\t\treturn count($this->elements);\n\t}", "public function count()\n {\n return count($this->elements);\n }", "public function count() {\n return count($this->elements);\n }", "public function count()\n {\n return $this->elements->count();\n }", "public function getElementCount() : int\n {\n return $this->statement_count +\n $this->conditional_count +\n $this->method_count;\n }", "final public function count()\n {\n return count($this->elements);\n }", "public function getNumDescendants()\n {\n return max($this->{$this->_right_side} - $this->{$this->_left_side} - 1, 0);\n }", "public function count()\n {\n return count($this->_elements);\n }", "public function count()\n {\n return count($this->test);\n }", "public function size()\n {\n return $this->elementCount;\n }", "public function seeNumberOfElementsInDOM($selector, $expected) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Assertion('seeNumberOfElementsInDOM', func_get_args()));\n }", "public function count()\n {\n return array_sum(array_map('count', $this->specs));\n }", "public function getNumberOfElement()\n {\n \treturn 3;\n }", "public function count(): int {\n return $this->getInnerContainer()->count();\n }", "public function count()\n\t{\n\t\treturn $this->nodes->count();\n\t}", "public function getItemsCount()\n {\n return count($this->elements);\n }", "public function count(): int\n {\n return count($this->blocks);\n }", "public function seeNumberOfElements($selector, $expected) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Assertion('seeNumberOfElements', func_get_args()));\n }", "public function testgetOccupied(){\n $collection = new PositionCollection($this->constructionWithEntities());\n $this->assertEquals(3, $collection->getOccupied()->count() );\n }", "public function canSeeNumberOfElementsInDOM($selector, $expected) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('seeNumberOfElementsInDOM', func_get_args()));\n }", "public function count(): int\n {\n return count($this->exercises);\n }", "public function getCountTests()\n {\n return count($this->getTests());\n }", "public function getNumberDescendants() {\n return $this->getDescendantsQuery()->count();\n }", "public function count() {\n $n = 0;\n while ($this->nodeList->item($n)) {\n $n++;\n }\n return $n;\n }", "public function getTotalLines()\n {\n $lines = 0;\n foreach ($this->getCoverages() as $coverage) {\n $lines += $coverage->getLineCount();\n }\n return $lines;\n }", "public function count() : int\n {\n return \\count($this->tiles);\n }", "public function count() {\n\t\tif ($this->documentElement->hasChildNodes()) {\n\t\t\treturn $this->documentElement->childNodes->length;\n\t\t} else {\n\t\t\t$this->_node = null;\n\t\t\treturn 0;\n\t\t}\n\t}", "public function countNodes(): int\n {\n return count($this->nodes);\n }", "public function count(): int\n {\n return count($this->forest);\n }", "private function _getSectionCount() {\n\t\t$this->assertNotEmpty($this->_getData());\n\n\t\treturn count($this->_getData());\n\t}", "public function count()\n {\n return (count($this->m_tree_childs) + count($this->m_tree_output));\n }", "public function getLength(){\n return count($this->nodes);\n }", "public function capacity()\n {\n return count($this->elementData);\n }", "public function cellCount() {\n $cell_Count = 0; // start the counter at 0\n foreach ($this->cells as $y => $row) { // for every row of cells...\n foreach ($row as $x => $cell) { // and for every position on that row...\n if ($cell) { // if there's a cell there...\n $cell_Count++; // add 1 to the counter\n }\n }\n }\n return $cell_Count; // return count for display\n }", "public function canSeeNumberOfElements($selector, $expected) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('seeNumberOfElements', func_get_args()));\n }", "public function TotalQuantity() {\n\t\treturn $this->Attendees()->count();\n\t}", "public function count()\n {\n return count($this->tree);\n }", "public function countBasketElements();", "function wpcampus_get_interested_count() {\n\treturn GFAPI::count_entries( 1, array(\n\t\t'status' => 'active',\n\t));\n}", "public function count()\n {\n return count($this->getChildren());\n }", "public function count()\n {\n return count($this->getChildren());\n }", "public function count() : int\r\n {\r\n return count($this->occupiedWorkers) + count($this->freeWorkers);\r\n }", "public function getTotalCoverage()\n {\n return round(($this->getCoveredLines() / $this->getTotalLines()) * 100, 2);\n }", "public function testgetOccupants(){\n $collection = new PositionCollection($this->constructionWithEntities());\n $this->assertEquals(3, $collection->getOccupants()->count() );\n }", "public function count()\n {\n $num = 0;\n foreach ($this->items as $item) {\n $num += $item['qty'];\n }\n\n return $num;\n }", "public function size() {\n\t\treturn count( $this->nodes );\n\t}", "public function countAll()\n {\n $cc = 0;\n foreach ($this->events as $a => $list) {\n $this->debug(\"counting $a -> \" . count($list));\n $cc += count($list);\n }\n return $cc;\n }", "public function getCellsCount(): int\n {\n return ($this->blockLength * $this->blockNumber) * ($this->blockHeight * $this->blockNumber);\n }", "public function count()\n {\n return count($this->points);\n }", "public function testgetUnOccupied(){\n $collection = new PositionCollection($this->constructionWithEntities());\n $this->assertEquals(6, $collection->getUnoccupied()->count() );\n }", "public function getNodeCount()\n {\n return $this->node_count;\n }", "public function count ()\n\t{\n\t\treturn count($this->children);\n\t}", "public function step_seeNumberOfElements($selector, $expected) {\n $args = func_get_args();\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('seeNumberOfElements', $args));\n }", "public function testCount()\n {\n $this->assertEquals(2, $this->getNodesCollector()->count());\n }", "public static function getTotalItens() {\n return count(self::getInstance()->aitens);\n }", "public function skipCount() {\n return sizeof($this->skipped);\n }", "function getNodeCount() {\n\t\treturn $this->size;\n\t}", "public function getInteriorCount()\n {\n Yii::import('application.modules.idea.models.Interior');\n return Interior::model()->countByAttributes(array('author_id' => $this->id, 'status' => Interior::STATUS_ACCEPTED));\n }", "public function skipCount() {\n return sizeof($this->skipped);\n }", "public function count()\n {\n return count($this->children);\n }", "public function countAllOpen()\n {\n $cc = 0;\n foreach ($this->events as $a => $list) {\n foreach ($list as $e) if ($e['open']) $cc++;\n }\n return $cc;\n }", "final public function totalElementosCarro(){\n \t\treturn count($this->carro_avisos);\n \t}", "public function count(): int\n {\n return \\count($this->A);\n }", "public function countItemsCondition()\n {\n $result = 0;\n\n foreach ($this->getItemsCondition() as $item) {\n $result += $item->getAmount();\n }\n\n return $result;\n }", "public function getChildCount() {}", "public function atCount(){\n return count($this->getAtFromText());\n }", "public function count() {\n return sizeof($this->succeeded) + sizeof($this->failed) + sizeof($this->skipped);\n }", "public function getNumTestedClasses() {\n\t\treturn $this->numTestedClasses;\n\t}", "public function count() {\n return sizeof($this->succeeded)+ sizeof($this->failed)+ sizeof($this->skipped);\n }", "private function prop_get_length():int {\n\t\t$key = $this->iteratorKey;\n\n\t\t$length = 0;\n\t\tforeach($this as $element) {\n\t\t\t$length++;\n\t\t}\n\n\t\t$this->iteratorKey = $key;\n\t\treturn $length;\n\t}", "public function getExpectedNumberOfCodes()\n {\n return (integer)$this->_xml->expected_number_of_codes;\n }", "public function getExpectedNumberOfCodes()\n {\n return (integer)$this->_xml->expected_number_of_codes;\n }", "public function count() {\r\n return $this->nodeList->length;\r\n }", "public function getFilledPositionsCountDirect()\n\t{\n\t\t$total = 0;\n\n\t\tif ($this->positions) {\n\t\t\tforeach ($this->positions as $position) {\n\t\t\t\tforeach ($position->offers as $offer) {\n\t\t\t\t\tif ($offer->accepted == 1) {\n\t\t\t\t\t\t$total = $total + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $total;\n\t}", "public function nodeCount() : int\n {\n return $this->nodeCount; \n \n }", "public function getCountGiftcodes()\n {\n return count($this->_rootElement->getElements($this->printItem));\n }", "private function getNumberOfUsedLines(): int\n {\n $numberOfUsedLines = 0;\n\n // Determine borders of highlight or selection\n $hasTopBorder = false;\n $hasBottomBorder = false;\n\n if ($this->highLightField != array())\n {\n if ($this->highLightField[\"y\"] > 0) $hasTopBorder = true;\n if ($this->highLightField[\"y\"] < $this->board->height() - 1) $hasBottomBorder = true;\n\n /*\n * 1x X-Coordinate number above board\n */\n $numberOfUsedLines += 1;\n }\n elseif ($this->selectionCoordinates != array())\n {\n if ($this->selectionCoordinates[\"A\"][\"y\"] > 0) $hasTopBorder = true;\n if ($this->selectionCoordinates[\"B\"][\"y\"] < $this->board->height() - 1) $hasBottomBorder = true;\n }\n\n $numberOfUsedLines += $hasTopBorder + $hasBottomBorder;\n\n /*\n * 4x Title\n * 2x Board border\n * 2x Board output margin bottom\n */\n $numberOfUsedLines += $this->board->height() + 8;\n\n return $numberOfUsedLines;\n }", "public function hasCnt(){\r\n return $this->_has(4);\r\n }", "public function hasCnt(){\r\n return $this->_has(4);\r\n }", "public function countItems()\n {\n $result = 0;\n\n foreach ($this->getItems() as $item) {\n $result += $item->getAmount();\n }\n\n return $result;\n }", "public function getCoverages()\n {\n return $this->_coverages;\n }", "public static function get_total_editions() {\n return 20;\n }", "public function count()\n {\n return count($this->collectItems());\n }", "public function getCompletedSectionsCount() : int\n {\n return count($this->completedSections);\n }", "public function count(): int\n {\n return count($this->solutions);\n }", "public function countInclude()\n {\n return count($this->includes);\n }", "public function getMatchesCount()\n {\n return $this->wins + $this->losses + $this->draws;\n }", "public function getCssLengthSpecCount()\n {\n return $this->count(self::CSS_LENGTH_SPEC);\n }", "public function count()\n {\n return count($this->parts);\n }", "function countDrawableSeries()\n {\n $Results = 0;\n $Data = $this->DataSet->getData();\n\n foreach($Data[\"Series\"] as $SerieName => $Serie)\n { if ( $Serie[\"isDrawable\"] == TRUE && $SerieName != $Data[\"Abscissa\"] ) { $Results++; } }\n\n return($Results);\n }", "public function getNumberOfByes()\n {\n return $this->numberOfByes;\n }", "function count() {\r\n \t\treturn $this->iterator->count();\r\n \t}", "public function getAttributeCount() {}" ]
[ "0.695146", "0.64949703", "0.63703084", "0.6285918", "0.62436813", "0.6177965", "0.61634994", "0.61392194", "0.6122314", "0.61082816", "0.60884714", "0.6072017", "0.6034935", "0.59978753", "0.5983216", "0.59729856", "0.59322345", "0.5908647", "0.5869075", "0.58462137", "0.5833072", "0.58269054", "0.5812439", "0.5799495", "0.57911754", "0.57756126", "0.57687664", "0.5763466", "0.5726015", "0.57131815", "0.5703576", "0.5691722", "0.56820196", "0.5671377", "0.5646441", "0.5639098", "0.56380993", "0.563209", "0.56278867", "0.56262773", "0.56081945", "0.56055033", "0.56005555", "0.55961263", "0.55876136", "0.5578275", "0.5555894", "0.5555894", "0.5552037", "0.55473214", "0.5546242", "0.55462384", "0.5539913", "0.55386394", "0.5533727", "0.55298406", "0.5529317", "0.55133885", "0.5506916", "0.5506504", "0.5499539", "0.54953575", "0.5486521", "0.5481438", "0.5480654", "0.5473841", "0.54724807", "0.54639775", "0.5447295", "0.54426336", "0.54388833", "0.54302865", "0.54281753", "0.5420447", "0.54195726", "0.5406448", "0.54015726", "0.5400906", "0.5400906", "0.53938687", "0.53905857", "0.5390344", "0.53898376", "0.5388876", "0.53798926", "0.53798926", "0.537219", "0.53538066", "0.5352596", "0.535046", "0.5344824", "0.5337167", "0.533694", "0.5334796", "0.5331973", "0.5327272", "0.5320568", "0.5319446", "0.531586", "0.53123194" ]
0.8051635
0
The S3 backend does not have a filter for file_exists functionality, so it depends on the general WPRO fallback.
Бэкенд S3 не имеет фильтра для функциональности file_exists, поэтому он зависит от общего WPRO-запасного варианта.
function testFileExists() { // This test just makes sure the filter returns null, which means it should do the fallback. However, the fallback is not tested here. wpro()->backends->activate_backend('Amazon S3'); $exists = apply_filters('wpro_backend_file_exists', null, 'http://example.org/2015/01/test.png'); $this->assertNull($exists); wpro()->backends->deactivate_backend(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filesMustExist();", "function checkExists($filename)\n {\n $file = $this->prefix . $filename;\n $s3 = Aws::factory($this->config)->get('s3');\n return $s3->doesObjectExist($this->bucket, $file);\n }", "function file_exists($filename)\n{\n\treturn false;\n}", "function file_exists($filename)\n{\n return false;\n}", "public function getFileExistsAttribute(): bool\n {\n return Storage::disk('local')->exists($this->url);\n }", "function exists($location){\n\t\treturn $this->s3->if_object_exists($this->bucket, $location);\n\t}", "function file_exists(string $path): bool\n{\n return true;\n}", "public abstract function exists($filepath);", "public function exists($filename);", "protected function exists() {}", "public static function hasFile ()\n {\n }", "abstract public function fileExists($path);", "public function getHasFile();", "public function fileExists($fileName);", "public function fileExists($fileName);", "public function exists($file)\n {\n }", "public function attachmentExists()\n {\n }", "public function doesBucketExistV2($bucket, $accept403);", "public function exists(string $filename): bool;", "public function exists(string $filename): bool;", "public function myfile_exists($filename) {\n if (file_exists($filename))\n return true;\n else {\n $this->errorMessage = \"Error (myfile_exists): File (\".$filename.\") does not exist.\";\n $this->errorLog->add_to_error_log($this->errorMessage);\n return false;\n }\n}", "function resource_exists( $resource ){\n\treturn file_exists( INCLUDE_PATH . $resource );\n}", "function web_file_exists($url) {\n\t\n\t$context = stream_context_create(['http' => ['method' => 'HEAD']]);\n\t$headers = get_headers($url, 0, $context);\n\treturn stripos($headers[0], \"200 OK\") ? true : false;\n\n}", "abstract protected function _checkTemplateFileExists();", "function isOriginalFileExists() {\n\t\tif ($this->getIsFileUpload() == self::UPLOAD_FILE_TYPE_UPLOAD || $this->getIsFileUpload() == self::UPLOAD_FILE_TYPE_FTP) {\n\t\t\tif (file_exists($this->getFilename())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If this is a remote file, then assume it is there\n\t\treturn true;\n\t}", "function is_uploaded_file($file)\n{\n return file_exists($file);\n}", "abstract protected function _isSupportedIfNoMoreFiles();", "function FileExists(string $fileName): bool { return false; }", "public function MP3Exists()\n\t{\treturn file_exists($this->MP3Location());\n\t}", "public function testCanOverwriteExistingMediaInS3Bucket()\n {\n $bucket = S3Bucket::getInstance('us-east-1', 'tests.jonnyw.me');\n\n $path = $this->getFilePath();\n $name = $this->getFileName();\n\n $this->assertTrue($bucket->cp($path, $name) && $bucket->cp($path, $name));\n }", "public function testExistsReturnsFalesIfFileDoesNotExist()\n {\n $fileCache = $this->getFileCache($this->directory, 'txt');\n\n $this->assertFalse($fileCache->exists($this->filename, 'Test'));\n }", "protected function canFileBeCreated() {}", "public function hasFile($key);", "function addFiletoS3($data)\n{\n $client = getS3clientObject();\n \n try\n {\n if($result = $client->putObject(\n array('Bucket' => $data['bucketname'],\n 'Key' => $data['filename'],\n 'SourceFile' => $data['source'],\n 'ContentType' => $data['mimetype'])))\n {\n error_log(json_encode($result));\n return true;\n }\n \n }\n catch(Exception $e)\n {\n error_log(\"SOME ERROR OCCURED IN ADDING FILE TO S3 Filename===\".$filename.\"Bucket===\".$bucket.\"Source===\".$source.\"ContentType===\".$mimetype,1);\n \n error_log(\"Error: \" . $e->getMessage().\" File: \" . $e->getFile().\" Line: \" . $e->getLine(),1);\n return false;\n }\n}", "public function hasFile($name);", "public function hasFile($name);", "abstract public function exists($keyName);", "abstract public function exists($path);", "public function hasFile(){\n return $this->_has(3);\n }", "function inputFileExistence($fileLocation)\n{\n if (file_exists($fileLocation)) {\n\n return true;\n }\n}", "function myfile_exists($filename) {\r\n if (file_exists($filename))\r\n echo \"File $filename exists.\";\r\n else\r\n echo \"File $filename does not exist.\";\r\n}", "function cvtFileExists()\n {\n list($expr, $right) = $this->getRightArg();\n $this->content = \"file_exists($expr)\";\n }", "protected function _fileExists($filename)\n {\n if (!Mage::getStoreConfig('mycdn/general/enabled')) {\n return parent::_fileExists($filename);\n }\n if (Mage::helper('mycdn')->isFileExists($filename)) {\n return true;\n }\n Mage::helper('mycdn')->addLog('[NEED TO DOWNLOAD] no source on server -> ' . $filename);\n return Mage::helper('mycdn')->getCdnFile($filename);\n }", "function Exists() \n\t{ \n\t\tif($this->FilePath == null || strlen(trim($this->FilePath)) == 0) \n \t\treturn false; \n \telse \n \t\treturn file_exists($this->FilePath); \n \t}", "public static function exists() :bool\n {\n return Storage::exists(static::$file);\n }", "function fileExists(){\n if (file_exists($this->target_file)) {\n $this->upload = FALSE;\n $_SESSION['message'] = 'file exists';\n }\n }", "function _downloadFile($fileName, $fullPath) {\n if ($this->amazons3) {\n $bucket = bucket;\n $aws = Aws::factory(APPPATH . 'config/amazoneS3.php');\n // Get the client from the service locator by namespace\n $client = $aws->get('s3');\n $newFilePath = 'videos/' . $fileName;\n $existFile = $client->doesObjectExist($bucket, $newFilePath);\n if ($existFile) {\n try {\n // Get the object\n $result = $client->getObject(array(\n 'Bucket' => $bucket,\n 'Key' => $newFilePath\n ));\n\n // Display the object in the browser\n header(\"Content-Type: {$result['ContentType']}\");\n header(\"Pragma: public\"); // required\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Cache-Control: private\", false); // required for certain browsers\n header(\"Content-Type: $ctype\");\n header(\"Content-Disposition: attachment; filename=\\\"\" . basename($fullPath) . \"\\\";\");\n header(\"Content-Transfer-Encoding: binary\");\n header(\"Content-Length: {$result['ContentLength']}\");\n ob_clean();\n flush();\n readfile($fullPath);\n //return $result['Body'];\n } catch (S3Exception $e) {\n //echo $e->getMessage() . \"\\n\";\n return false;\n }\n } else {\n return false;\n }\n } else {\n if (headers_sent())\n die('Headers Sent');\n\n // Required for some browsers\n if (ini_get('zlib.output_compression'))\n ini_set('zlib.output_compression', 'Off');\n\n // File Exists?\n if (file_exists($fullPath)) {\n // Parse Info / Get Extension\n try {\n $fsize = filesize($fullPath);\n $path_parts = pathinfo($fullPath);\n $ext = strtolower($path_parts[\"extension\"]);\n // Determine Content Type\n switch ($ext) {\n case \"gif\": $ctype = \"image/gif\";\n break;\n case \"png\": $ctype = \"image/png\";\n break;\n case \"jpeg\":\n case \"jpg\": $ctype = \"image/jpg\";\n break;\n default: $ctype = \"application/force-download\";\n }\n\n header(\"Pragma: public\"); // required\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Cache-Control: private\", false); // required for certain browsers\n header(\"Content-Type: $ctype\");\n header(\"Content-Disposition: attachment; filename=\\\"\" . basename($fullPath) . \"\\\";\");\n header(\"Content-Transfer-Encoding: binary\");\n header(\"Content-Length: \" . $fsize);\n ob_clean();\n flush();\n readfile($fullPath);\n return true;\n } catch (S3Exception $e) {\n //echo $e->getMessage() . \"\\n\";\n return false;\n }\n } else {\n return false;\n }\n }\n }", "protected function detectMissingFiles() {}", "function check_file_existance($path)\n{\n // buld the url\n $image_url = $path;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "function wpsc_product_has_supplied_file() {\n\tglobal $wpsc_query, $wpdb;\n\t$id = get_the_ID();\n\t$product_meta = get_post_meta( $id, '_wpsc_product_metadata', true );\n\tif ( isset($product_meta['can_have_uploaded_image']) && $product_meta['can_have_uploaded_image'] == true )\n\t\treturn true;\n\n\treturn false;\n}", "function _checkFileExists($url){\n\t\t\t$headers = @get_headers($url);\n\t\t\tif($headers[0] == 'HTTP/1.1 404 Not Found') {\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "private function check_custom_dir(){\n\n\t\t$url = WP_CONTENT_DIR . '/uploads/wpttcustom';\n\n\t\tif ( file_exists( $url ) ){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t}", "function get_file()\n {\n\n// (new \\Sparket\\Orders\\Cfdi\\Cfdi())->get_file();\n\n $aws_s3 = new aws_s3();\n $aws_s3->setBucketDir('test');\n $aws_s3->setFileName('sample.pdf');\n $aws_s3->pull();\n\n\n// $aws_s3->pull_url();\n\n\n }", "public function checkBucketExists()\n {\n $this->initializeBucketName();\n\n $this->setRequestData();\n \n $response = wp_remote_post(\n // 'http://localhost/wpm2aws-migration-api/public/api/migration/uploads/checkstore',\n 'https://wponaws.migration.seahorse-data.com/api/migration/uploads/checkstore',\n array(\n 'method' => 'POST',\n 'timeout' => 45,\n 'redirection' => 10,\n 'httpversion' => '1.0',\n 'blocking' => true,\n 'headers' => array(\n 'Cache-Control' => 'no-cache',\n ),\n 'body' => array('data' => $this->requestData),\n 'cookies' => array(),\n )\n );\n\n $responseCode = wp_remote_retrieve_response_code($response);\n\n if ('200' !== $responseCode && 200 !== $responseCode) {\n $errorMessage = wp_remote_retrieve_response_message( $response );\n\n if ((int)$responseCode >= 400 && (int)$responseCode < 500) {\n throw new Exception('Error! This Action Can Not Be Completed. Unauthorised Access<br>' . $errorMessage);\n } elseif ((int)$responseCode >= 500 && (int)$responseCode < 600) {\n throw new Exception('Error! This Action Can Not Be Completed. Internal Server Error.<br>' . $errorMessage);\n } else {\n throw new Exception('Unauthorised Access<br>' . $errorMessage);\n }\n }\n \n return $response['body'];\n }", "public function isFileExist() {\n\t\treturn (bool)$this->findByAttributes(array('name' => $this->getAttribute('name')));\n\t}", "function check_image_existance($path, $image_name)\n{\n // buld the url\n $image_url = $path . $image_name;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "public function exists()\n\t{\n\t\tif ($this->isLink($this->filename)) {\n\t\t\treturn strpos(get_headers(urldecode($this->filename))[0], '200');\n\t\t} else {\n\t\t\treturn is_file($this->filename) && file_exists($this->filename);\n\t\t}\n\n\t}", "function smarty_modifier_fileexists($string)\n{\n return file_exists($string);\n}", "public function hasFiles();", "public function hasFiles();", "public function fileExist(Filename $filename): bool;", "public function file_is_exists($path_to = '')\n {\n return _class('remote_files', 'classes/common/')->file_is_exists($path_to);\n }", "function exists($file) {\n \tif(empty($file)) return false;\n if(strpos($file,'content') === false) $file = Helpers::url_to_file_path($file);\n return file_exists($file);\n }", "function _file_exists($file){\n if(file_exists($file)) return $file;\n if(file_exists(ROOT.$file)) return ROOT.$file;\n if(file_exists(RPHAR.$file)) return RPHAR.$file;\n $xfile = str_replace(ROOT, RPHAR, $file);\n if(file_exists($xfile)) return $xfile;\n return false;\n}", "function check_image_existance($path,$image_name)\n{\n //buld the url\n $image_url=$path.$image_name;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "public function fileExists(): bool\n {\n return $this->storage()->has($this->getDiskPath());\n }", "public function exists() {}", "public function exists() {}", "public function test_file_exists()\n {\n $img = $this->mappr->get_tmp_path() . basename($this->output[\"mapOutputImage\"]);\n $this->assertFileExists($img);\n }", "public function checkFileExists()\n {\n switch($this->type)\n {\n case Asset::ASSET_TYPE_CSS: $this->assetFolder = $this->paths['css'];\n break;\n \n case Asset::ASSET_TYPE_JS: $this->assetFolder = $this->paths['js'];\n break;\n \n case Asset::ASSET_TYPE_IMAGE: $this->assetFolder = $this->paths['images'];\n break;\n\n default: $folder = '';\n }\n \n //Path to file\n $file = new PhingFile($this->assetsDir.'/'.$this->assetFolder.$this->file);\n \n //Check file exists\n if(!$file->exists())\n {\n throw new BuildException(\"Unable to find asset file: \".$file->getAbsolutePath());\n }\n \n //Check we can read it\n if(!$file->canRead())\n {\n throw IOException(\"Unable to read asset file: \".$file->getPath());\n }\n \n return $file;\n }", "public function hasStaticFile(){\n return $this->_has(2);\n }", "private function checkForCachedFile()\n {\n $filename = Str::after($this->file, '/');\n $pathRaw = Str::before($this->file, $filename);\n $height = $this->height ? $this->height.\"$this->cacheSeperate\" : \"\";\n $width = $this->width ? $this->width.\"$this->cacheSeperate\" : \"\";\n \n $path = public_path(\"{$pathRaw}{$height}{$width}{$filename}\");\n \n if (file_exists($path)) {\n $this->file = $path;\n return true;\n }\n\n return false;\n }", "protected function cachedFileExists() : bool {\n return isset($this->relative_path) && file_exists($this->getTargetAbsolutePath());\n }", "abstract public function isExists();", "function pronunciationExists($word) {\n global $config;\n\n $exists = file_exists(\"wfio://\" . $config[\"media_directory\"] . \"\\\\\" . $word . \".mp3\");\n\n if ($exists) {\n file_put_contents(\"log.txt\", \"Word $word already exists in media collection.\\n\", FILE_APPEND);\n return true;\n }\n return false;\n}", "function file_exists($file_id) {\n // Check if the file exists in the list of available files. Actual destination types may have more efficient ways of doing this.\n $files = $this->list_files();\n return isset($files[$file_id]);\n }", "public function testFetchDataThrowsNotExistsExceptionIfFileDoesNotExist()\n {\n $this->setExpectedException('\\JonnyW\\PhantomJs\\Exception\\NotExistsException');\n\n $fileCache = $this->getFileCache('', 'txt');\n\n $this->assertFalse($fileCache->fetch($this->filename));\n }", "public function fileExists($name=null) {\n\t\t$fileStorageBucket = $this->getFileStorageBucket();\n\t\treturn $fileStorageBucket->fileExists($this->getFileFullName($name));\n\t}", "public function pushFileToS3($filepath, $filename, $type, $is_manifest_file, $processid){\n Mage::log(\"Entry Knolseed_Engage_Model_Observer::pushFileToS3()\",null,'knolseed.log');\n\n $aws_connection = $this->getAwsAccessKey($this->aws_token);\n\n $subfolder = $this->getAWSFolderName($type);\n # $key to upload file on S3 bucket\n $key = $this->aws_foldername.'/'.$subfolder.'/'.$filename;\n # $key = $this->getAWSFolderName($type).'/'.$filename;\n Mage::log(\"Uploading to S3, key=\".$key, null, \"knolseed.log\") ;\n $source_file = $filepath;\n\n # upload file to S3 bucket\n try{ \n $response = $aws_connection->upload($this->aws_bucketname, $key, fopen($source_file, 'r'), $this->aws_acl);\n # $this->trackS3PushToKf($filename,$type);\n if($is_manifest_file === true){\n $this->trackS3PushToKf($filename, $type); \n }\n \n # unlink($filepath);\n Mage::log(\"Uploaded. Returning true\", null, \"knolseed.log\") ;\n\n return true ;\n\n }catch(Exception $e){\n // Check if critical error or retriable error\n if($processid){\n $kf_item = Mage::getModel('engage/engage')->load($processid);\n $critical = ($kf_item->getAttempt() >= 1) ? true : false ;\n\n // Update attempt counts for RETRIABLE errors \n Mage::helper('engage')->updatedAttempts($processid);\n }else{\n $critical = true;\n }\n\n $errormessage = \"Critical Error! \". $type .\" sync unable to authenticate with Knolseed. Please email support@knolseed.com about this error, and we will help you to fix this problem.\" ;\n \n Mage::helper('engage')->errorAdminNotification('pushFileToS3','AWSpush',$errormessage,$filename,$critical);\n\n Mage::log(\"Removing file:\".$filepath, null, 'knolseed.log');\n unlink($filepath);\n\n Mage::log(\"Upload failed! Returning false\", null, \"knolseed.log\") ;\n return false ;\n }\n\n }", "function Check_exists_img($img){\n if(file_exists(\"uploads/blog/$img\")){\n $fileName = \"uploads/blog/$img\";\n }else{\n $fileName = \"admin/uploads/blog/$img\";\n }\n return $fileName;\n }", "function s9y_aws_upload(array $uploads) {\n\t\t \n\t\t\t$bucket = $this->get_config('aws_s3_bucket_name');\n $awsopts = array( \"key\" => $this->get_config('aws_key'),\n \"secret\" => $this->get_config('aws_secret_key'));\n $s3 = new AmazonS3($awsopts);\n\n if ($s3->if_bucket_exists($bucket)) {\n \n $validate = array();\n foreach ($uploads as $rel_filename => $target_obj) {\n \n $i = $this->get_config('aws_s3_storage_type');\n \t\t\t\t$storagetype = $this->get_s3_storage_types();\n\n \t\t\t\tswitch($storagetype[$i]) {\n \t\t\t\t\tcase 'REDUCED_REDUNDANCY':\n // upload image to amazon s3 \n $media_uploadresponse = $s3->create_object($bucket, $rel_filename, array(\n 'fileUpload' => $target_obj,\n 'acl' => AmazonS3::ACL_PUBLIC,\n 'storage' => AmazonS3::STORAGE_REDUCED\n )); \n break;\n \t\t\t\t\tcase 'STANDARD':\n \t\t\t\t\t// upload image to amazon s3 \n $media_uploadresponse = $s3->create_object($bucket, $rel_filename, array(\n 'fileUpload' => $target_obj,\n 'acl' => AmazonS3::ACL_PUBLIC,\n 'storage' => AmazonS3::STORAGE_STANDARD\n )); \n \n \t\t\t\t\tbreak;\n\t\t\t\t\t}\n \n if ($s3->if_object_exists($bucket, $rel_filename)) {\n $validate[$rel_filename] = true;\n\t\t\t\t } else {\n\t\t\t\t $validate[$rel_filename] = false;\n\t\t\t\t }\n \t }\n \t \n \t return $validate;\n \t}\n \t\n\t\t\treturn null;\n\t\t\t\n\t\t}", "public function testFileExistsReturnsTrueIfStreamObjectIsPassed()\n {\n $this->assertTrue(file_exists($this->stream));\n }", "public function thumbExists()\n {\n $return = false;\n if (xoops_trim($this->getVar('product_thumb_url')) != '' && file_exists(OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $this->getVar('product_thumb_url'))) {\n $return = true;\n }\n\n return $return;\n }", "public function cacheUploadExists($disk, $uploadFolderPath, $filename, $isExists = true);", "static private function file_exists($path) {\n\t\t$file_exists = file_exists($path);\n\t\tvar_dump(compact('path', 'file_exists'));\n\t\treturn $file_exists;\n\t}", "public function testExistsReturnsTrueIfFileDoesExist()\n {\n touch($this->getFilename());\n\n $fileCache = $this->getFileCache($this->directory, 'txt');\n\n $this->assertTrue($fileCache->exists($this->filename));\n }", "private function existsDocument($sourceFile)\r\n {\r\n return file_exists($sourceFile);\r\n }", "protected function file_exists($input, $field, $params = null){\n\t\tif($input['error'] !== 4){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn array(\n\t\t\t\t'error' => 'file_exists',\n\t\t\t\t'field' => $field\n\t\t\t\t);\n\t\t}\n\t}", "public function resourceExists($resourcePath);", "function admin_resource_exists( $resource ){\n\treturn file_exists( ADMIN_PATH . $resource );\n}", "public function pathExistsLike($pathPart);", "function _exists($object_name)\n {\n return false;\n }", "public function testFilePathLooksCrawlableFilenameFilter() {\n // thumbs.db filenames are currently disallowed\n $expected = false;\n $actual = FilesHelper::filePathLooksCrawlable( '/path/to/thumbs.db' );\n $this->assertEquals( $expected, $actual );\n\n // Here we're changing which fil eextensions are no longer allowed.\n \\WP_Mock::onFilter( 'wp2static_filenames_to_ignore' )\n ->with(\n [\n '__MACOSX',\n '.babelrc',\n '.git',\n '.gitignore',\n '.gitkeep',\n '.htaccess',\n '.php',\n '.svn',\n '.travis.yml',\n 'backwpup',\n 'bower_components',\n 'bower.json',\n 'composer.json',\n 'composer.lock',\n 'config.rb',\n 'current-export',\n 'Dockerfile',\n 'gulpfile.js',\n 'latest-export',\n 'LICENSE',\n 'Makefile',\n 'node_modules',\n 'package.json',\n 'pb_backupbuddy',\n 'plugins/wp2static',\n 'previous-export',\n 'README',\n 'static-html-output-plugin',\n '/tests/',\n 'thumbs.db',\n 'tinymce',\n 'wc-logs',\n 'wpallexport',\n 'wpallimport',\n 'wp-static-html-output', // exclude earlier version exports\n 'wp2static-addon',\n 'wp2static-crawled-site',\n 'wp2static-processed-site',\n 'wp2static-working-files',\n 'yarn-error.log',\n 'yarn.lock',\n ]\n )\n ->reply( [ 'yarn.lock' ] );\n // We've disallowed yarn.lock - test it\n $expected = false;\n $actual = FilesHelper::filePathLooksCrawlable( '/path/to/yarn.lock' );\n $this->assertEquals( $expected, $actual );\n\n // thumbs.db filenames should now be allowed - test it\n $expected = true;\n $actual = FilesHelper::filePathLooksCrawlable( '/path/to/thumbs.db' );\n $this->assertEquals( $expected, $actual );\n }", "public function exists($filename, array $conditions = []);", "public static function fileExist($filename){\n $filename = wfSettings::replaceDir($filename);\n return file_exists($filename);\n }", "public function testFileExistsReturnsFalseIfStreamDoesNotExistAnymore()\n {\n $identifier = (string)$this->stream;\n $this->stream = null;\n $this->assertFalse(file_exists($identifier));\n }", "abstract protected function _checkScriptFilesExist();", "private function _createNewFile() {\n if ( $this->settings['bucket_remain'] < 0 ) { return \"Insufficient Storage Remaining\"; }\n $list = false;\n $errs = false;\n\n // Collect the Name of the Files Object\n $items = array();\n foreach ( $_FILES as $Key=>$Value ) {\n $items[] = $Key;\n }\n\n // Do Not Continue if there are No Files\n if ( count($items) <= 0 ) { return \"No Files Found\"; }\n\n // Check to see if there are files and, if so, process them.\n if ( is_array($_FILES) ) {\n require_once(LIB_DIR . '/images.php');\n require_once(LIB_DIR . '/s3.php');\n\n // If We Should Use Amazon's S3, Activate the Class\n if ( USE_S3 == 1 ) { $s3 = new S3(AWS_ACCESS_KEY, AWS_SECRET_KEY); }\n\n foreach ( $items as $FileID ) {\n $FileName = NoNull(basename($_FILES[ $FileID ]['name']));\n $FileSize = nullInt($_FILES[ $FileID ]['size']);\n $FileType = NoNull($_FILES[ $FileID ]['type']);\n if ( NoNull($FileType) == '' ) {\n $ext = $this->_getFileExtension($FileName, $FileType);\n switch ( strtolower(NoNull($ext)) ) {\n case 'jpeg':\n case 'jpg':\n $FileType = 'image/jpg';\n break;\n\n case 'gif':\n $FileType = 'image/gif';\n break;\n\n case 'png':\n $FileType = 'image/png';\n break;\n }\n }\n\n // Validate the File\n $ValidType = $this->_isValidUploadType($FileType, $this->_getFileExtension($FileName, $FileType));\n\n // Process the File if we have Space in the Bucket, otherwise Record a Size Error\n if ( $ValidType && $FileSize <= (CDN_UPLOAD_LIMIT * 1024 * 1024) && $FileSize <= nullInt($this->settings['bucket_remain']) ) {\n $this->settings['bucket_remain'] -= $FileSize;\n $now = time();\n\n if ( isset($_FILES[ $FileID ]) ) {\n $LocalName = md5(\"$FileName $now\") . \".\" . $this->_getFileExtension($FileName, $FileType);\n $fullPath = CDN_PATH . '/' . intToAlpha($this->settings['_account_id']) . \"/\" . strtolower($LocalName);\n checkDIRExists(CDN_PATH . '/' . intToAlpha($this->settings['_account_id']));\n\n $cdnPath = intToAlpha($this->settings['_account_id']) . \"/\" . strtolower($LocalName);\n $imgMeta = false;\n $geoData = false;\n $isAnimated = false;\n $isReduced = false;\n $isGood = false;\n\n if ( NoNull($FileName) != \"\" ) {\n // Shrink the File If Needs Be\n if ( $this->_isResizableImage($FileType) ) {\n $thumbName = md5(\"$FileName $now\") . '_thumb.' . $this->_getFileExtension($FileName, $FileType);\n $thumbPath = CDN_PATH . '/' . intToAlpha($this->settings['_account_id']) . \"/\" . strtolower($thumbName);\n\n $propName = md5(\"$FileName $now\") . '_medium.' . $this->_getFileExtension($FileName, $FileType);\n $propPath = CDN_PATH . '/' . intToAlpha($this->settings['_account_id']) . \"/\" . strtolower($propName);\n\n $origName = md5(\"$FileName $now\") . '.' . $this->_getFileExtension($FileName, $FileType);\n $origPath = CDN_PATH . '/' . intToAlpha($this->settings['_account_id']) . \"/\" . strtolower($origName);\n move_uploaded_file($_FILES[ $FileID ]['tmp_name'], $origPath);\n\n // Upload the Original Image to S3 if Appropriate\n if ( USE_S3 == 1 ) {\n $s3Path = intToAlpha($this->settings['_account_id']) . strtolower(\"/$origName\");\n $s3->putObject($s3->inputFile($origPath, false), CDN_URL, $s3Path, 'public-read');\n }\n\n // Resize the Image\n $img = new Images();\n $img->load($origPath);\n $geoData = $img->getGeolocation();\n $imgMeta = $img->getPhotoMeta();\n\n $imgWidth = $img->getWidth();\n\n $isAnimated = $img->is_animated();\n if ( $isAnimated !== true ) {\n if ( $imgWidth > 960 ) {\n $img->reduceToWidth(960);\n $isGood = $img->save($propPath);\n $hasProp = $img->is_reduced();\n }\n if ( $imgWidth > 480 ) {\n $img->reduceToWidth(480);\n $isGood = $img->save($thumbPath);\n $hasThumb = $img->is_reduced();\n }\n }\n unset($img);\n\n } else {\n $isGood = move_uploaded_file($_FILES[ $FileID ]['tmp_name'], $fullPath);\n }\n\n $rfu = $this->_recordFileUpload( strtolower($FileName), strtolower($LocalName), $FileSize, strtolower($FileType),\n md5(\"$FileName $now\"), $geoData, $imgMeta, $hasProp, $hasThumb, $isAnimated );\n if ( is_array($rfu) && count($rfu) > 0 ) {\n if ( is_array($list) === false ) { $list = array(); }\n $list[] = $rfu;\n } else {\n if ( is_array($errs) === false ) { $errs = array(); }\n $errs[] = array( 'name' => $FileName,\n 'size' => $FileSize,\n 'type' => strtolower($FileType),\n 'reason' => \"Could Not Record File Data\",\n );\n }\n\n // Copy the Data to S3\n if ( USE_S3 == 1 ) {\n $s3->putObject($s3->inputFile($fullPath, false), CDN_URL, $cdnPath, 'public-read');\n unset($s3);\n }\n\n } else {\n if ( is_array($errs) === false ) { $errs = array(); }\n $errs[] = array( 'name' => $FileName,\n 'size' => $FileSize,\n 'type' => strtolower($FileType),\n 'reason' => \"Bad File Name\",\n );\n }\n }\n\n } else {\n if ( is_array($errs) === false ) { $errs = array(); }\n $errs[] = array( 'name' => $FileName,\n 'size' => $FileSize,\n 'type' => strtolower($FileType),\n 'reason' => (($ValidType) ? \"Insufficient Storage Remaining\" : \"Unsupported File Type\"),\n );\n }\n }\n\n // Reload the Bucket Data\n $this->_populateClass();\n\n // Return a Files Object Array\n return array( 'files' => $list,\n 'bucket' => array( 'files' => $this->settings['bucket_files'],\n 'limit' => $this->settings['bucket_size'],\n 'used' => $this->settings['bucket_used'],\n ),\n 'errors' => $errs,\n );\n }\n\n // If We're Here, Nothing Was Found\n return \"No Files Found\";\n }", "public function hasStoragePath(){\n return $this->_has(2);\n }", "public function existsOnDFS( $filePath )\n {\n try\n {\n return $this->s3client->doesObjectExist( $this->bucket, $filePath );\n }\n catch ( S3Exception $e )\n {\n eZDebug::writeError( $e->getMessage(), __METHOD__ );\n return false;\n }\n }" ]
[ "0.65395755", "0.639318", "0.6319861", "0.627717", "0.6230239", "0.61134785", "0.6001331", "0.59860605", "0.5899061", "0.5890853", "0.5890071", "0.58513373", "0.5799865", "0.5781888", "0.5781888", "0.57734644", "0.57050794", "0.5705065", "0.56917614", "0.56917614", "0.5688256", "0.5685463", "0.56731164", "0.5667033", "0.56165606", "0.56064945", "0.5585987", "0.5585707", "0.5567933", "0.5567538", "0.555982", "0.55545026", "0.55439204", "0.5533156", "0.55304164", "0.55304164", "0.5526557", "0.55123746", "0.550829", "0.54860336", "0.5481017", "0.5480951", "0.54769534", "0.54746485", "0.54458594", "0.5443895", "0.54412514", "0.5441006", "0.5436925", "0.5416273", "0.54125834", "0.5407534", "0.54047996", "0.54014874", "0.53930616", "0.5387399", "0.53836507", "0.5380545", "0.5379727", "0.5379727", "0.53792006", "0.5376897", "0.5375954", "0.537525", "0.5372111", "0.5364061", "0.53635156", "0.53635156", "0.53487766", "0.53464115", "0.53448594", "0.5341914", "0.5337048", "0.533416", "0.5333", "0.5315545", "0.5307184", "0.53053856", "0.5300524", "0.5298592", "0.5279173", "0.5273602", "0.527257", "0.5271057", "0.5263053", "0.5254176", "0.52337176", "0.5226992", "0.5224991", "0.5223122", "0.52059036", "0.5204611", "0.52022517", "0.5199747", "0.5193497", "0.51883984", "0.51849324", "0.51843685", "0.5177679", "0.51675844" ]
0.7791778
0
Returns a clearfloat HTML snip
Возвращает чистый HTML-фрагмент float
public static function clearfloat() { Yii::app()->clientScript->registerCss('P2Helper.clearfloat','.clearfloat{ clear:both; height:0; font-size: 1px; line-height: 0px; }'); return "<div class='clearfloat'></div>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cr_clear()\n\t{\n\t\t$out = '<div class=\"cr-clear\"></div>';\n\t\treturn $out;\n\t}", "static public function divClear(){\n echo '<div class=\"clear\"\"></div>';\n }", "protected function getHtmlNull()\n {\n return '<pre>NULL</pre>';\n }", "protected function html() {\n\t\treturn '';\n\t}", "protected function html() {\n\t\treturn '';\n\t}", "protected function html() {\n\t\treturn '';\n\t}", "function gen_small_goal($row, $float)\r\n{\r\n\tif($float)\r\n\t\techo '<div class=\"stream-goal-small\" style=\"float: right;\">';\r\n\telse\r\n\t\techo '<div class=\"stream-goal-small\" style=\"float: left;\">';\r\n\r\n\t\techo '<a href=\"goal.php?id='.$row[8].'\"><h2>'.html_entity_decode($row[0]).\"</h2></a>\";\r\n\t\techo '<img src=\"'.$row[4].'\">';\r\n\t\techo '<div class=\"small-space\"></div>';\r\n\techo '</div>';\r\n}", "private function clear() {\n\t\techo '<div class=\"visualClear\"></div>';\n\t}", "public function render()\n {\n $count = 0;\n $ret = '';\n foreach ($this->getElements() as $ele) {\n if ($count > 0) {\n $ret .= $this->getDelimeter();\n }\n if ($ele->getCaption() != '') {\n $ret .= $ele->getCaption() . '&nbsp;';\n }\n $ret .= $ele->render() . NWLINE;\n if (!$ele->isHidden()) {\n ++$count;\n }\n }\n\n return $ret;\n }", "public function stdWrap_stripHtml() {}", "public function render()\n {\n $count = 0;\n $ret = \"\";\n foreach ($this->getElements() as $ele) {\n /* @var Element $ele */\n if ($count > 0) {\n $ret .= $this->getDelimiter();\n }\n if ($ele->getCaption() != '') {\n $ret .= $ele->getCaption() . \"&nbsp;\";\n }\n $ret .= $ele->render() . NWLINE;\n if (!$ele->isHidden()) {\n $count++;\n }\n }\n return $ret;\n }", "protected function html() {\n\t\treturn $this->html_placeholder();\n\t}", "protected function _toHtml()\r\n {\r\n return '';\r\n }", "public function displayHtmlStart();", "protected function _toHtml()\n {\n return '';\n }", "function carawebs_clearfix(){\n\n\techo '<div style=\"clear:both;\"></div>';\n\n}", "public static function closeVoidHTMLElement()\n\t{\n\t\treturn (current_theme_supports( 'html5' ) ? '' : ' /');\n\t}", "public function displayHtmlEnd();", "public function toHtml()\n {\n return '';\n }", "public function get_output_html() {\n\t\treturn '';\n\t}", "public function html(){\n\t\treturn $this->inner();\n\t}", "function g_funk_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#g-funk {\n\t\tfloat: $x;\n\t\tpadding-$x: 15px;\n\t\tpadding-top: 5px;\n\t\tmargin: 0;\n\t\tfont-size: 11px;\n\t}\n\t</style>\n\t\";\n}", "static public function widthClose()\n\t{\n\t\t$html = \"\n</div>\";\n\t\treturn $html;\n\t}", "function clear() {\n\n $this->html = '';\n\n }", "public function getDetailedHTML()\n {\n return '';\n }", "function getHtml() { return ''; }", "public function html()\n\t\t{\n\t\t\t\n\t\t}", "private function renderHTML() {\n $content = '';\n $content = $content.'<div ';\n $content = $content.$this->renderClass( ' well ' );\n $content = $content.$this->renderID();\n $content = $content.' >'.$this->getText().'</div>';\n return $content;\n }", "public function displayStart()\n {\n $style = '';\n $class = '';\n\n if (!empty($this->styleClass))\n $class .= $this->styleClass . ' ';\n\n switch ($this->stylePosition) {\n case 'above':\n $style .= \"margin-left: auto; margin-right: auto;\";\n break;\n case 'topLeft':\n $style .= \"float: left;\";\n break;\n case 'topRight':\n $style .= \"float: right;\";\n break;\n case 'aboveLeft':\n $style .= \"margin-right: auto;\";\n break;\n case 'aboveRight':\n $style .= \"margin-left: auto;\";\n break;\n }\n\n if ($this->stylePosition != 'none') {\n $class .= \"figure-$this->stylePosition \";\n if (!empty($this->styleWidth))\n $class .= \"$this->styleWidth \";\n }\n\n if (empty($style) && empty($class))\n return '';\n\n $styleHtml = empty($style) ? '' : \" style=\\\"$style\\\"\";\n $classHtml = empty($class) ? '' : \" class=\\\"$class\\\"\";\n\n $this->addedStyle = true;\n return \"<div$styleHtml$classHtml>\\n\";\n }", "protected function getHtmlContent() {\n return '';\n }", "public function renderAdditionalFeesAndDiscountFrame() {\r\n // output them...\r\n $addFeeAndDiscountFrame = $this->getAdditionalFeesAndDiscountFrame();\r\n if (!is_null($addFeeAndDiscountFrame)) {\r\n $string = $addFeeAndDiscountFrame->renderHtml(null);\r\n }\r\n }", "public function renderEmpty()\n {\n return $this->emptyText;\n }", "public function flush()\n\t{\n\t\t$content = parent::flush();\n\t\tif(empty($content))\n\t\t\treturn \"\";\n\t\treturn '<!--'.$this->getBoundary().'-->'.$content.'<!--//'.$this->getBoundary().'-->';\n\t}", "private function course_menu_display_garbage() {\n echo html_writer::start_tag('div', array('class'=>'cmf_garbage_main'));//garbage wrapper\n echo html_writer::start_tag('span', array('class'=>'cmf_garbage_title'));//label span\n echo get_string('garbage', 'format_course_menu');\n echo html_writer::end_tag('span');\n echo html_writer::start_tag('ul', array('class'=>'cmf_garbage ui-corner-all'));//garbage list\n echo html_writer::end_tag('ul');\n echo html_writer::end_tag('div');\n }", "public function renderNone()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function getHTML()\n\t{\n\t\treturn '<div class=\"field\">'.$this->getLabelHTML().$this->getInputHTML().'</div>';\n\t}", "public function printText(){\n\t\tif(($this->gethref() == '') or ($this->hidden == 1)){\n\t\t\treturn '<li>'.$this->gethtml().'</li>';\n\t\t}else{\n\t\t\treturn '<li><a href=\"'.$this->gethref().'\">'.$this->gethtml().'</a></li>';\n\t\t}\n\t}", "function _nullFill($value)\n{\n if (function_exists('__nullFill')) {\n return __nullFill($value);\n }\n\n return $value ?: '<span class=\"null-fill\">-</span>';\n}", "public function renderField() {\r\n // Replace line breaks with <br> tags\r\n $this->value = str_replace(\"\\n\", \"<br/>\\n\", $this->value);\r\n return \"<div class=\\\"content\\\">$this->value</div>\";\r\n }", "function fg($a,$b=''){\n\t\t$this->rwidths=\"width:\".($this->fwidth-$this->lwidth-18).\"px\";\n\t\techo '<tr><td width=\"*\" colspan=\"2\"><b>'.($a==''?'':$a.':').'</b>'.($b==''?'':'&nbsp'.$b).'</td></tr>';\n\t}", "public function displayShort() : string\n {\n return parent::displayShort() . \"&nbsp;<sup>[PR&nbsp;#{$this->_number}]</sup>\";\n }", "protected function render_small_footer()\n {\n return '</div>';\n }", "public function getElementHtml()\n {\n $data = Mage::getModel('tiny_compressimages/totals')->getTotalCompressionInformation();\n\n return Mage::helper('tiny_compressimages')->__(\n 'Saved %s%% over a total of %s compressions',\n $data['percentageSaved'],\n $data['totalCompressions']\n );\n\n }", "public function get_header() {\n $output = \"\";\n\n $output .= \\html_writer::start_div('clearfix');\n $output .= \\html_writer::end_div();\n\n return $output;\n }", "public function getDisplay() {\n\t\t$return = '';\n\t\tif (!empty($this->logo)) {\n\t\t\t$return .= '<img src=\"web/image/portfolio/'.$this->logo.'\" alt=\"'.$this->name.'\" title=\"'.$this->name.'\"/>';\n\t\t}\n\t\t\n\t\treturn '<span style=color=\"'.$this->color.'\">'.$return.'</span>';\n\t}", "function sc_clearfix( $attr ) {\n\treturn '<div class=\"clearfix\"></div>';\n}", "protected function _getHeaderCommentHtml($element)\n {\n return '';\n }", "function cpm_afc_vc_fix() {\n echo '<style>\n .repeater .row:before, .repeater .row:after {\n display: auto;\n content: none;\n }\n </style>';\n}", "public function renderHtml()\n {\n return;\n }", "function outputFaqs()\n {\n //Gets the current page id\n $post_id = get_queried_object_id();\n\n $return = '';\n $faqHTML = '';\n\n $faqs = get_field('related_faqs', $post_id);\n $show_adv_options = get_field('show_adv_options', $post_id);\n\n if( $faqs ):\n foreach( $faqs as $k => $f): // variable must be called $post (IMPORTANT)\n // Question\n $question = $this->faqQuestion(get_field('question', $f->ID), $f->ID, (0 == $k) );\n // Answer\n $answer = $this->faqAnswer(get_field('answer', $f->ID), $f->ID,\n (0 == $k) );\n // Output Formatting\n $faqHTML .= $this->formatFAQ($question, $answer);\n\n endforeach;\n\n $advOptions = ( $show_adv_options )?\n $this->outPutAdvancedExpHTML():\n '';\n\n $return = '\n <!-- START THE FAQS!!1!1!111 -->\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div id=\"faqBlock\" class=\"block\">\n ' . $advOptions . '\n <div class=\"group-holder\">\n ' . $faqHTML . '\n </div>\n ' . $advOptions . '\n </div>\n </div>\n </div>';\n\n endif;\n\n return $return;\n }", "function clearHTML($text, $linebreaks = false, $censor = true) {\n\tglobal $ms_user;\n\t$text = str_replace('&', '&amp;', $text);\n\t$text = str_replace('<', '&lt;', $text);\n\t$text = str_replace('>', '&gt;', $text);\n\t\n\tif ($linebreaks) {\n\t\t$text = str_replace(\"\\r\\n\", \"\\n\", $text);\n\t\t$text = str_replace(\"\\r\", \"\\n\", $text);\n\t\t$pattern = array(\"\\n\", \"\\t\", ' ', ' ');\n\t\t$replace = array('<br />', '&#160; &#160; ', '&#160; ', ' &#160;');\n\t\t$text = str_replace($pattern, $replace, $text);\n\t}\n\tif ($censor) {\n\t\t$text = censor($text);\n\t}\n\treturn $text;\n}", "function echopre($str){\n\t echo '<pre>'.$str.\"</pre>\";\n\t}", "public function render_content() {\n\t\techo '<hr style=\"margin: 1em 0;\" />';\n\t}", "function invisible_html($bytes)\r\n{\r\n $retVal=\"\";\r\n $bytes = (int) round(($bytes/8),0);\r\n for($i=0;$i<$bytes;$i++) $retVal .= \"<b> </b>\"; // 8 bytes content\r\n return $retVal; \r\n}", "function emptyLine() {\n if ($this->type == 'sidebyside') \n return '<td colspan=\"2\">&nbsp;</td>';\n else \n return '<th>&nbsp;</th><th>&nbsp;</th><td>&nbsp;</td>';\n }", "protected function _toHtml()\n {\n if ($this->isVisible()) {\n return parent::_toHtml();\n }\n\n return '';\n }", "function fc($a,$ds=''){\n\t\techo '<tr height=\"'.$this->rheight.'\"><td colspan=\"2\"><div style=\"'.$ds.'\">'.$a.'</div></td></tr>';\n\t}", "public function createDisplayPrice()\n {\n if($this->title == null)\n return null;\n// $output = \"\\t<div class='col-md-3'>\\n\";\n $output = \"\\t\\t<p><strong>Price:</strong> £$this->price</p>\\n\";\n// $output = $output . \"\\t</div>\\n\";\n return $output;\n }", "function getHtmlFormatted() {\r\n if (count($this->Definitions) > 0) {\r\n $css = '';\r\n foreach($this->Definitions as $definition) {\r\n $css.=\"\\n\";\r\n\r\n foreach($definition->Names as $index=>$name) {\r\n // multiple names\r\n if ($index>0){\r\n $css.=\", {$name}\"; \r\n } else {\r\n $css.=\" {$name}\"; \r\n }\r\n }\r\n $css.=\" {\";\r\n\r\n foreach($definition->Properties as $property) {\r\n $css.=\"\\n {$property->Name}: {$property->Value};\";\r\n }\r\n\r\n $css.=\"\\n }\";\r\n }\r\n return $css.\"\\n\";\r\n } \r\n return 'Hello';\r\n }", "public function stdWrap_cropHTML() {}", "function el() {\techo \"<br><br>\"; }", "private function generateRemoveOpHtml() {\n\t\t$html = Html::openElement( 'tr' );\n\t\t$html .= Html::rawElement( 'td', array( 'class' => 'diff-marker' ), '-' );\n\t\t$html .= Html::rawElement( 'td', array( 'class' => 'diff-deletedline' ),\n\t\t\tHtml::rawElement( 'div', array(),\n\t\t\t\tHtml::rawElement( 'del', array( 'class' => 'diffchange diffchange-inline' ),\n\t\t\t\t\t$this->generateValueHtml( $this->oldValues ) ) ) );\n\t\t$html .= Html::rawElement( 'td', array( 'colspan' => '2' ), '&nbsp;' );\n\t\t$html .= Html::closeElement( 'tr' );\n\n\t\treturn $html;\n\t}", "function foot(){\n\techo '';\n\t?>\n</html>\n\t\n\t<?php\n}", "protected function clear()\n\t{\n\t\t$this->innerHtml = null;\n\t\t$this->outerHtml = null;\n\t\t$this->text\t\t = null;\n\t}", "private function displayMath(string $content) : string {\n\t\t$last = 0;\n\t\tfor (;;) {\n\t\t\t$start = strpos($content,'$$',$last);\n\t\t\tif ($start === false) break;\n\t\t\t$end = strpos($content,'$$',$start+2);\n\t\t\tif ($end === false) break;\n\t\t\t$last = $end + 2;\n\t\t\t$math = substr($content,$start,$last-$start);\n\t\t\t$math = str_replace('\\>','\\: ',$math);\n\t\t\t$math = str_replace('<','\\lt ',$math);\n\t\t\t$math = str_replace('>','\\gt ',$math);\n//printf(\"toHtml(): fileToRender=%s, last=%d, start=%d, end=%d, %s[%s]\\n\",$GLOBALS['fileToRender'],$last,$start,$end,substr($content,$start,$end-$start+2),substr($content,0,12));\n\t\t\t$content = substr($content,0,$start)\n\t\t\t\t. \"\\n<div class=math>\\n\"\n\t\t\t\t. $math\n\t\t\t\t. \"\\n</div>\\n\"\n\t\t\t\t. substr($content,$last);\n\t\t\t$last = $start + strlen(\"\\n<div class=math>\\n\") + strlen($math) + strlen(\"\\n</div>\\n\");\n\t\t}\n\t\treturn $content;\n\t}", "private function _format_null_value()\n {\n return '<{yellow>null<}>';\n }", "function fin_html() {\n\n\techo \"</font>\", $GLOBALS['rejoue_session'];\n\n\tif (function_exists('dessiner_gadgets'))\n\t\techo dessiner_gadgets($GLOBALS['id_rubrique_gadgets']);\n\tif (defined('_TESTER_NOSCRIPT'))\n\t\techo _TESTER_NOSCRIPT;\n\n\techo \"</body></html>\\n\";\n}", "abstract protected function displayEmpty();", "function nakedfooter() {\n return '</td></tr></table> </form></body></html>';\n }", "public function render() {\n return '';\n }", "function foot(){\r\n\t\t\techo \" <div id=\\\"frameFoot\\\">\";\r\n\t\t\techo\t \" <p>Website made by ESN Valenciennes</p>\";\r\n\t\t\techo \" </div>\";\r\n\t\t}", "function html5_figure($content, $options='') {\n return html_tag('figure', $content, '', $options);\n}", "public function getHtml(): string {\n return $this->toString(true);\n }", "public function html(): string {\n\t\t$classNames = $this->classNames();\n\t\t$this->addClassName(\"hidden_widget\");\n\t\t$ret = \"<input type=\\\"hidden\\\" \" . $this->emitAttributes() . \" />\";\n\t\t$this->setClassNames($classNames);\n\t\treturn $ret;\n\t}", "function get_summary_text()\n\t{\n\t\treturn null;\n\t}", "public function render()\n {\n return '';\n }", "public function render()\n {\n return '';\n }", "protected function renderUnit()\n {\n return Html::tag('div', '', $this->options);\n }", "public function Render() {\n\t$out = NULL;\n\n\t$nPrice\t= $this->Price();\n\t$nShItm\t= $this->SH_perItem();\n\t$nShPkg\t= $this->SH_perPackage();\n\t$nQty\t= $this->Qty();\n\n\t$nPriceQty = $this->Price() * $nQty;\n\t$nShItmQty = $this->SH_perItem() * $nQty;\n\t$nLineTotal = $nPriceQty + $nShItmQty;\t// line total including per-item s/h\n\n\t$sCatNum = $this->CatNum();\n\t$sDescr = $this->Descrip();\n\n\t//$ftShipPkg = clsMoney::BasicFormat($dlrPerPkg);\n\n\t$out = sprintf($this->FormatString(),\n\t $sCatNum,\n\t $nPrice,\n\t $nShItm,\n\t $nQty,\n\t $nPriceQty,\n\t $nShItmQty,\n\t $nLineTotal\n\t )\n\t .\"\\n - $sDescr\\n\";\n\treturn $out;\n }", "function wrap_html_start() {\r\n $html = '<div>';\r\n }", "function render()\n {\n if ($this->ppos < 0)\n return null;\n\n $buf = '';\n\n for ($i = 0; $i < $this->ppos; $i++) {\n $t = $this->stack[$i];\n if (!$t->is_deleted())\n $buf .= (string) $t;\n }\n\n return $buf;\n }", "public function make_blank ()\n {\n echo \"<td class=\\\"cell-empty\\\">&nbsp;</td>\\n\";\n }", "public function html() {\n\n $html = array();\n\n // create a list of applicable attributes\n $attr = array(\n 'id' => $this->attributes['id'], \n 'class' => $this->attributes['class'], \n );\n\n // start the fieldset and add all attributes\n $html[] = '<' . $this->attributes['element'] . ' ' . attr($attr) . '>';\n\n // start counting fields\n $n = 0;\n\n // add each field\n foreach($this->fields as $class => $field) {\n $n++; $html[] = '<div class=\"column' . r($field->attribute('columnClass'), ' ' . $field->attribute('columnClass')) . r($n == $this->count, ' last') . '\">' . $field->html() . '</div>';\n } \n\n // end the fieldset\n $html[] = '</' . $this->attributes['element'] . '>';\n\n return implode('', $html); \n\n }", "public function asHtml()\n {\n return $this->getTypeElementHtml()\n . Mage::helper('bronto_reminder')->__('Shopping cart %s amount %s %s:',\n $this->getAttributeElementHtml(), $this->getOperatorElementHtml(), $this->getValueElementHtml())\n . $this->getRemoveLinkHtml();\n }", "protected function clear()\n\t{\n\t\t$this->innerHtml = null;\n\t\t$this->outerHtml = null;\n\t\t$this->text\t\t = null;\n\t\t\n\t\t$this->isIndent\t= null;\n\t\t$this->pad\t\t= null;\n\t\t$this->newline\t= null;\n\t\t$this->level\t= null;\n\t}", "public function display()\n {\n $string = 'Total:'.$this->_totalNode.'<br/>';\n // p($this->_firstNode);\n if( !$this->isEmpty() ){\n $currentNode = $this->_firstNode;\n while( $currentNode->next !== $this->_firstNode ){ \n $string .= $currentNode->data.'<br/>'; \n $currentNode = $currentNode->next;\n }\n $string .= $currentNode->data; \n } \n return $string;\n }", "public function footerClean() {\n return '';\n }", "function publisher_echo_std( $field_id ) {\n\n\t\techo bf_get_std( $field_id ); // escaped before\n\t}", "public function render()\n {\n $length = ($this->arguments['length']) ?: 100;\n $dummytext = ($this->renderChildren()) ?: 'Lorem ipsum dolor sit amet. ';\n $len = strlen($dummytext);\n $repeat = ceil($length / $len);\n $dummytext_neu = substr(str_repeat($dummytext,$repeat),0,$length);\n return $dummytext_neu;\n }", "function WriteContentF()\n {\n ?>\n </div>\n </div>\n <div class=\"clear\"></div>\n </div>\n <div class=\"copyright\">© 2005-<?=date(\"Y\");?> Content Management System SEOCMS, SEOTM.COM все права защищены</div>\n <?\n }", "public function format()\n {\n return ($this->comment) ? PHP_EOL . '#' . $this->comment . PHP_EOL : '';\n }", "public function render(){\n\t\tif($this->header !== false){\n\t\t\t$this->appendChild($this->header, 0);\n\t\t}\n\t\t$string = parent::render();\n\t\t$this->removeChild(0);\n\t\treturn $string;\n\t}", "protected function getLabel()\n\t{\n\t\t$html = array();\n\t\t$class = $this->element['class'] ? (string) $this->element['class'] : '';\n\n\t\t$html[]= '<div class=\"clr\"></div>';\n\t\t$html[]='<div class=\"'.$class.' hotspacer\">';\n\t\tif ((string) $this->element['hr'] == 'true') {\n\t\t\t$html[]= '<hr />';\n\t\t}\n\t\telse {\n\t\t\t$html[]= parent::getLabel();\n\t\t}\n\t\t$html[] = '</div>';\n\t\treturn implode('',$html);\n\t}", "function do_html_footer() {\n global $table_width;\n?>\n </td></tr>\n </table>\n <table width=\"<?php echo $table_width; ?>\" cellspacing=\"0\" cellpadding=\"6\" border=\"0\">\n <tr>\n <td bgcolor=\"#5B69A6\" align=\"right\">\n <img src=\"images/pyramid.gif\" width=\"73\" height=\"49\" alt=\"\" valign=\"middle\" />\n </td>\n </tr>\n </table>\n </body>\n </html>\n<?php\n}", "public function emiteDocHTML() {\n\n $this->getParagrafos();\n for ($i = 0; $i < count($this->aParagrafos); $i++) {\n\n $obj = current($this->aParagrafos);\n $this->strDocHTML .= $this->geraTexto($obj->db02_texto);\n next($this->aParagrafos);\n }\n\n return nl2br($this->strDocHTML);\n }", "public static function wrapStart()\n {\n return \"<div class=\\\"_sage\\\">\";\n }", "function toHtml() {\n\t\t$contents = $this->getContents();\n\t\tif (empty($contents)) {\n\t\t\treturn '';\n\t\t}\n\t\t$html = '';\n\t\t$html .= $this->printOpen();\n\t\t$html .= $contents;\n\t\t$html .= $this->printClose();\n\t\treturn $html;\n\t}", "public function getElementHtml()\n {\n $columns = $this->getVersionHtml($this->getData('current_ver'), 'current-version');\n $columns .= $this->getVersionHtml($this->getData('latest_ver'), 'latest-version');\n\n $html = $this->getBeforeElementHtml() . $columns . $this->getAfterElementHtml();\n return $html;\n }", "private function field_close()\n {\n $form = $this->formBuilder->getForm();\n\t\treturn $form['markup'] === 'xhtml' ? ' />' : '>';\n\t}", "public function markup()\n {\n\n // Setting up an alias, so we don't have to write $this->data every time:\n $d = &$this->data;\n\n\n // Converting the time to a UNIX timestamp:\n $d['dt'] = strtotime($d['dt']);\n\n\n return '\n\t\t\t<div class=\"comment\">\n\t\t\t\t<div class=\"name\">' . $d['name'] . '</div>\n\t\t\t\t<div class=\"date\" title=\"Added at ' . date('H:i \\o\\n d M Y', $d['dt']) . '\">' . date('d M Y', $d['dt']) . '</div>\n\t\t\t\t<p>' . $d['body'] . '</p>\n\t\t\t</div>\n\t\t';\n }" ]
[ "0.67001253", "0.6474839", "0.6332038", "0.63120323", "0.63120323", "0.63120323", "0.6148687", "0.6101046", "0.6079352", "0.59663516", "0.5932774", "0.58830285", "0.5876807", "0.5840708", "0.5839412", "0.58140135", "0.57495224", "0.5744983", "0.5740849", "0.5737316", "0.5733239", "0.57257843", "0.5714925", "0.56855285", "0.56799406", "0.56540126", "0.56374073", "0.563203", "0.56260073", "0.56171423", "0.55799043", "0.5576639", "0.5570827", "0.5562313", "0.55492467", "0.5544865", "0.5519885", "0.5499715", "0.5498837", "0.54892254", "0.54788315", "0.54655236", "0.5464157", "0.5461597", "0.54595727", "0.5454962", "0.5452515", "0.5445674", "0.54456633", "0.5437589", "0.543253", "0.54294705", "0.54197526", "0.54185694", "0.5411277", "0.5404451", "0.53882915", "0.5387764", "0.53850746", "0.5385041", "0.53828293", "0.53821146", "0.5378097", "0.5371862", "0.5355846", "0.5350413", "0.53453314", "0.53267807", "0.53257114", "0.5321616", "0.532143", "0.5317988", "0.53175706", "0.53175074", "0.5316661", "0.53134483", "0.53134483", "0.5312109", "0.5309321", "0.53074276", "0.5306544", "0.53024715", "0.5302213", "0.53021675", "0.52925044", "0.52877563", "0.5281233", "0.5279168", "0.5275892", "0.5272613", "0.5272192", "0.52694833", "0.5259079", "0.5257034", "0.52537185", "0.5250521", "0.5248303", "0.52467024", "0.5243569", "0.52328295" ]
0.8100286
0
Finds a module by id, returns 'p2' if no id given
Находит модуль по идентификатору, возвращает 'p2', если идентификатор не задан
public static function findModule($id = null) { if ($id === null) $id = self::MODULE_NAME; return Yii::app()->findModule($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findModule($id)\n\t{\n\t\tif(($controller=$this->getController())!==null && ($module=$controller->getModule())!==null)\n\t\t{\n\t\t\tdo\n\t\t\t{\n\t\t\t\tif(($m=$module->getModule($id))!==null)\n\t\t\t\t\treturn $m;\n\t\t\t} while(($module=$module->getParentModule())!==null);\n\t\t}\n\t\tif(($m=$this->getModule($id))!==null)\n\t\t\treturn $m;\n\t}", "public function findModuleById($id) {\n try\n {\n $dql = 'SELECT m FROM WF\\Lib\\Core\\WFModule m WHERE m.id = :id';\n $query = $this->_em->createQuery($dql);\n $query->setParameter('id', $id);\n\n $res = $query->getResult();\n\n if (count($res) != 0) {\n return $res[0];\n } else {\n return null;\n }\n }\n catch(Exception $err)\n {\n return null;\n }\n }", "function get_module_by_id( $module_id )\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->db->where( 'module_id', $module_id );\n\t\t$ci->db->limit( 1 );\n\t\t$query = $ci->db->get( 'modules' );\n\t\treturn $query->row_array();\n\t}", "function getModule($id) {\n\t\tglobal $dbconn;\n\n // ---- Get sql query\n $sql = \" SELECT user_module FROM $this->tablename where user_id=\".$id;\n // ---- Execute SQL\n $result = $dbconn->Execute($sql);\n\t\treturn $result->fields[0];\n\t}", "function search_id_modules($what){\n global $modules;\n foreach( $modules as $k => $v ){\n if( $what === $v->index ) {\n return $k;\n }\n }\n return null;\n}", "public static function findById($id) {\n\t\t$record = (new Query)\n\t\t\t\t\t\t->select('e.*, m.name AS moduleName, m.package AS modulePackage')\n\t\t\t\t\t\t->from('core_entity', 'e')\n\t\t\t\t\t\t->join('core_module', 'm', 'm.id = e.moduleId')\n\t\t\t\t\t\t->where('id', '=', $id)\n\t\t\t\t\t\t->single();\n\t\t\n\t\tif(!$record) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn static::fromRecord($record);\n\t}", "function get_module_id( $module )\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->db->where( 'system_name', strtolower( $module ) );\n\t\t$ci->db->limit( 1 );\n\t\t$query = $ci->db->get( 'modules' );\n\t\t$row = $query->row();\n\t\treturn $row->module_id;\n\t}", "public function findModuleByName($name) {\n try\n {\n $dql = 'SELECT m FROM WF\\Lib\\Core\\WFModule m WHERE m.name = :name';\n $query = $this->_em->createQuery($dql);\n $query->setParameter('name', $name);\n\n $res = $query->getResult();\n\n if (count($res) != 0) {\n return $res[0];\n } else {\n return null;\n }\n }\n catch(Exception $err)\n {\n return null;\n }\n }", "function block_page_module_get_module($moduleid) {\n global $pagemodulecache, $DB;\n\n $modules = &$pagemodulecache['modules'];\n\n if (empty($modules[$moduleid])) {\n if (!$module = $DB->get_record('modules', array('id' => $moduleid))) {\n return false;\n }\n $modules[$module->id] = $module;\n }\n\n return $modules[$moduleid];\n}", "function getItemModule($module_id)\n {\n $conn = dbConnect();\n if ($conn->connect_errno == 0) {\n $sql = \"SELECT * FROM module WHERE module_id='$module_id'\";\n $res = $conn->query($sql);\n $data = $res->fetch_assoc();\n $row_cnt = $res->num_rows;\n\n if ($row_cnt == 1) {\n return $data;\n }\n\n } else {\n return false;\n }\n }", "public function get_module_id()\n {\n return C__MODULE__SEARCH;\n }", "public function find($module, $type, $id = 0) {\n\t\t$q = new apm_Database_Query ();\n\t\t$q->addTable ( $this->table );\n\t\t$q->addWhere ( \"queue_module = '$module'\" );\n\t\t$q->addWhere ( \"queue_type = '$type'\" );\n\t\tif ($id) {\n\t\t\t$q->addWhere ( \"queue_origin_id = $id\" );\n\t\t}\n\t\treturn $q->loadHashList ( 'queue_id' );\n\t}", "function &getModule($name, $title = null, $moduleid = 0 )\n\t{\n\t\t$result = null;\n\t\t$modules =& JModuleHelper::_load(); // ooh i wonder if this will break\n\t\t$total = count($modules);\n\t\tfor ($i = 0; $i < $total; $i++)\n\t\t{\n\t\t\t// Match the name of the module\n\t\t\tif ($modules[$i]->name == $name && (!$moduleid || $modules[$i]->id == $moduleid))\n\t\t\t{\n\t\t\t\t// Match the title if we're looking for a specific instance of the module\n\t\t\t\tif ( ! $title || $modules[$i]->title == $title )\n\t\t\t\t{\n\t\t\t\t\t$result =& $modules[$i];\n\t\t\t\t\tbreak; // Found it\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if we didn't find it, and the name is mod_something, create a dummy object\n\t\tif (is_null( $result ) && substr( $name, 0, 4 ) == 'mod_')\n\t\t{\n\t\t\t$result = new stdClass;\n\t\t\t$result->id = 0;\n\t\t\t$result->title = '';\n\t\t\t$result->module = $name;\n\t\t\t$result->position = '';\n\t\t\t$result->content = '';\n\t\t\t$result->showtitle = 0;\n\t\t\t$result->control = '';\n\t\t\t$result->params = '';\n\t\t\t$result->user = 0;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function block_page_module_get_instance($name, $id) {\n global $pagemodulecache, $DB;\n\n $instances = &$pagemodulecache['instances'];\n\n if (empty($instances[$name]) or empty($instances[$name][$id])) {\n if (!$moduleinstance = $DB->get_record($name, array('id' => $id))) {\n return false;\n }\n $instances[$name][$id] = $moduleinstance;\n }\n\n return $instances[$name][$id];\n}", "public static function getInstanceById($id_module)\n\t{\n\t\t$moduleName = Module::preloadModuleNameFromId($id_module);\n\t\treturn ($moduleName ? Module::getInstanceByName($moduleName) : false);\n\t}", "public static function getNameFromId(int $id): ?string {\n $query = DB::getInstance()->get('modules', ['id', $id]);\n\n if ($query->count()) {\n return $query->first()->name;\n }\n\n return null;\n }", "public function get(string $module): Module;", "function get_component($id){\n\tglobal $components;\n\tif(array_key_exists($id,$components)){\n\t\treturn $components[$id];\n\t}else{\n\t\treturn;\n\t}\n}", "public function findModuleById($moduleId)\n {\n $select = $this->getAdapter()\n ->select()\n ->from($this->_name)\n ->joinLeft('modules', 'm_id = l_m_id', array('m_moduleId'))\n ->where('m_moduleId = ?', $moduleId);\n\n RETURN $this->getAdapter()->fetchAll($select);\n }", "public function getModuleByName($name)\n {\n $modules = $this->fetchAll(['name' => $name], null, 1);\n if (!empty($modules[0])) {\n return $modules[0];\n }\n return null;\n }", "public function getModuleById(){\n if(Input::has('id')){\n $modules = Modules::find(Input::get('id'));\n if(!is_null($modules)){\n return Response::json($modules);\n }\n return Response::json(array(\n 'success'=>false,\n 'fault_msg'=>\"Cannot no module with ID \".Input::get('id')\n ));\n }\n else{\n return Response::json(array(\n 'success'=>false,\n 'fault_msg'=>\"cannot load a module without an Id\"\n ));\n }\n }", "public function findOrFail($name)\n {\n if (!is_null($module = $this->find($name))) {\n return $module;\n }\n\n throw new ModuleNotFound(\"Module or group of modules [{$name}] does not exist!\");\n }", "private function getModuleName($mid)\n\t{\n\t\t$db = Db::getLink();\n\t\t$stmt = $db->prepare(\n\t\t\t\"SELECT `name` FROM `module` WHERE `id` = ?;\"\n\t\t);\n\t\t$stmt->bind_param('i', $mid);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($name);\n\t\t$stmt->fetch();\n\t\t$stmt->close();\n\t\treturn $name;\n\t}", "public function getModuleId() {\n\t\treturn $this->moduleId;\n\t}", "function getModule() {\n\tglobal $questionnaireID, $moduleID, $alerts, $db;\n\tif (!$moduleID) {\n\t\treturn array(\"ModuleID\"=>\"global\", \"ModuleTitle\"=>\"Repeated questions\", \"Fake\"=>true);\n\t}\n\telse {\n\t\t$stmt = new tidy_sql($db, \"\n\t\t\tSELECT ModuleID, ModuleTitle, Fake FROM Modules WHERE QuestionaireID=? AND ModuleID=?\n\t\t\", \"is\");\n\t\t$module = $stmt->query($questionnaireID, $moduleID);\n\t\treturn $module[0];\n\t}\n}", "static function getNameById($id) {\n\t\t$mModule=new Maerdo_Model_Module();\n\t\t$moduleDetails=$mModule->find($id);\n\t\treturn($moduleDetails->name);\n\t}", "public function getModuleId() {\n return $this->moduleId;\n }", "function module_name($id) {\r\n global $DB;\r\n $module = $DB->get_record_sql('SELECT name FROM {course_categories} WHERE id = ?', array($id));\r\n $module = format_string($module->name);\r\n return $module;\r\n}", "public function getModuleId($sName)\n\t{\t\t\n\t\t$sModule = strtolower($sName);\n\t\tif (isset($this->_aModules[$sModule]))\n\t\t{\n\t\t\treturn $this->_aModules[$sModule];\n\t\t}\t\t\n\t\treturn 'core';\t\t\n\t}", "public static function get($slug) {\n\t\tforeach (UserConfig::$all_modules as $module)\n\t\t{\n\t\t\tif ($module->getID() == $slug) {\n\t\t\t\treturn $module;\n\t\t\t}\n\t\t}\n\t}", "function findById($module, $id) {\n $params = array(\n 'Verb' => 'GET',\n 'Model' => $module,\n 'Version' => Yii::app()->params->API_VERSION,\n 'Timestamp' => date(\"c\"),\n 'KeyID' => Yii::app()->params->GIZURCLOUD_API_KEY,\n 'UniqueSalt' => uniqid()\n );\n\n // Sorg arguments\n ksort($params);\n\n // Generate string for sign\n $string_to_sign = \"\";\n foreach ($params as $k => $v)\n $string_to_sign .= \"{$k}{$v}\";\n\n // Generate signature\n $signature = base64_encode(hash_hmac('SHA256', $string_to_sign, Yii::app()->params->GIZURCLOUD_SECRET_KEY, 1));\n \n //foreach($this->credentials as $username => $password){ \n $rest = new RESTClient();\n $rest->format('json');\n $rest->set_header('X_USERNAME', Yii::app()->session['username']);\n $rest->set_header('X_PASSWORD', Yii::app()->session['password']);\n $rest->set_header('X_TIMESTAMP', $params['Timestamp']);\n $rest->set_header('X_UNIQUE_SALT', $params['UniqueSalt']);\n $rest->set_header('X_SIGNATURE', $signature);\n $rest->set_header('X_GIZURCLOUD_API_KEY', Yii::app()->params->GIZURCLOUD_API_KEY);\n $response = $rest->get(Yii::app()->params->URL . $module . '/' . $id);\n return $result = json_decode($response, true);\n }", "function get_plugin_by_id($id){\r\n\t\treturn $this->db->fetch_first(\"SELECT * FROM \".DB_TABLEPRE.\"plugin WHERE pluginid=$id\");\r\n\t}", "public function findById($id)\n\t{\n\t\tstatic $_plugins;\n\t\tif(!isset($_plugins))\n\t\t{\n\t\t\t$_plugins = SBPlugin::model()->findAll(array('index' => 'id'));\n\t\t}\n\t\t\n\t\tif(isset($_plugins[$id]))\n\t\t\treturn $_plugins[$id];\n\t\t\n\t\treturn null;\n\t}", "public function getModule($module)\n\t{\n\t\tif(isset($this->modules[$module])) {\n\t\t\treturn $this->modules[$module];\n\t\t}\n\t\treturn null;\n\t}", "function check_mod($user_id,$mod_id){\n\t\tglobal $dbconn;\n\n // ---- Get sql query\n $sql = \" SELECT user_module FROM $this->tablename where user_module like '%\".$mod_id.\"%' and user_id=\".$user_id;\n // ---- Execute SQL\n $result = $dbconn->Execute($sql);\n\t\treturn $result->fields[0];\n\t}", "public function getIdByName($name)\n {\n $sql = \"SELECT * FROM `modules` WHERE `name` = :name\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':name', $name, PDO::PARAM_STR);\n try {\n $ret = $stmt->execute();\n if (!$ret) {\n return false;\n }\n } catch (PDOException $e) {\n return false;\n }\n $res = $stmt->fetch(PDO::FETCH_ASSOC);\n return $res['id'];\n }", "function getModuleIdFromCode($moduleCode) {\n $moduleId = null;\n $sql = null;\n if ($this->getVendor() == self::MYSQL) {\n\n $sql = \"SET NAMES utf8\";\n $this->q->fast($sql);\n }\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n\t\t\tSELECT `moduleId`\n\t\t\tFROM `module`\n\t\t\tWHERE `companyId`\t\t\t=\t'\" . $this->getCompanyId() . \"'\n\t\t\tAND\t `moduleCode`\t\t\t=\t'\" . $moduleCode . \"'\";\n } else {\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n\t\t\tSELECT [moduleId]\n\t\t\tFROM [module]\n\t\t\tWHERE [companyId]\t\t\t=\t'\" . $this->getCompanyId() . \"'\n\t\t\tAND\t [moduleCode]\t\t\t=\t'\" . $moduleCode . \"'\";\n } else {\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n\t\t\tSELECT MODULEID\n\t\t\tFROM MODULE\n\t\t\tWHERE COMPANYID\t\t\t=\t'\" . $this->getCompanyId() . \"'\n\t\t\tAND\t MODULECODE\t\t\t=\t'\" . $moduleCode . \"'\";\n }\n }\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n header('Content-Type:application/json; charset=utf-8');\n $this->q->rollback();\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $moduleId = $row['moduleId'];\n }\n return $moduleId;\n }", "public static function findByIdStatic($id)\n {\n return ModuleGateway::retrieveStatic($id);\n }", "public function getInstanceOfModuleNamed($name) {\n\t\tif (!$this->enabled) { return null; }\t \n\n\t\tif (array_key_exists($name, $this->allModules)) {\n\t\t\t$moduleDefinition = $this->allModules[$name];\n\t\t\treturn $moduleDefinition->getModuleClassInstance(); \n\t\t} else { return null; }\n\t}", "public function get_module_id(){\n\t\treturn (int) $this->v_module_id;\n\t}", "public function getModule ($moduleId)\n {\n return $this->getFullModuleByFilter('id=' . (int) $moduleId);\n }", "public function getModuleId()\n\t{\n\t\tif ($this->tabid) {\n\t\t\treturn $this->tabid;\n\t\t}\n\t\treturn $this->block->module->id;\n\t}", "public function getModuleId()\n\t{\n\t\tif ($this->tabid) {\n\t\t\treturn $this->tabid;\n\t\t}\n\t\treturn $this->block->module->id;\n\t}", "public static function getModuleName($moduleId)\r\n\t{\n\t\t$moduleTbl = new Application_Model_DbTable_Module();\r\n\t\t$moduleName = $moduleTbl->fetchRow($moduleTbl->select()->where('module_id = '.$moduleId))->toArray()['module_name'];\n\t\t\n\t\treturn $moduleName;\n\t}", "function loadPluginByID($id)\r\n{\r\n $statement = get_slave_db_handle()->prepare('SELECT ID, Name, Author, Hidden, GlobalHits FROM Plugin WHERE ID = :ID');\r\n $statement->execute(array(':ID' => $id));\r\n\r\n if ($row = $statement->fetch())\r\n {\r\n return resolvePlugin($row);\r\n }\r\n\r\n return NULL;\r\n}", "public function getFirstActiveModuleId($applicationId) {\n if ($this->getVendor() == self::MYSQL) {\n\n $sql = \"SET NAMES utf8\";\n $this->q->fast($sql);\n }\n $sql = null;\n $moduleId = 0;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n SELECT `module`.`moduleId`\n FROM `module`\n JOIN `moduleAccess`\n WHERE `module`.`isActive`=1\n AND `moduleaccess`.`roleId`='\" . $this->getRoleId() . \"'\n AND `module`.`applicationId`='\" . $applicationId . \"'\n LIMIT 1 \";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n SELECT TOP 1 [moduleId]\n FROM [module]\n JOIN [moduleAccess]\n WHERE [module].[isActive]=1\n AND [moduleAccess].[roleId]='\" . $this->getRoleId() . \"'\n AND [module].[applicationId]='\" . $applicationId . \"'\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n SELECT MODULEID\n FROM MODULE\n JOIN MODULEACCESS\n WHERE MODULE.ISACTIVE=1\n AND MODULEACCESS.ROLEID='\" . $this->getRoleId() . \"'\n WHERE MODULE.APPLICATIONID='\" . $applicationId . \"'\n AND ROWNUM = 1\";\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n header('Content-Type:application/json; charset=utf-8');\n $this->q->rollback();\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $moduleId = intval($row['moduleId']);\n }\n\n return $moduleId;\n }", "public function getModule($name);", "public static function preloadModuleNameFromId($ids)\n\t{\n\t\tstatic $preloadedModuleNameFromId;\n\t\tif (!isset($preloadedModuleNameFromId)) {\n\t\t\t$preloadedModuleNameFromId = array();\n\t\t}\n\t\t\n\t\tif (is_array($ids))\n\t\t{\n\t\t\tforeach($ids as $id)\n\t\t\t\t$preloadedModuleNameFromId[$id] = false;\n\n\t\t\t$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('\n\t\t\tSELECT `name`,`id_module`\n\t\t\tFROM `'._DB_PREFIX_.'module`\n\t\t\tWHERE `id_module` IN ('.join(',',$ids) .');');\n\t\t\tforeach($results as $result)\n\t\t\t\t$preloadedModuleNameFromId[$result['id_module']] = $result['name'];\n\t\t}\n\t\telseif (!isset($preloadedModuleNameFromId[$ids]))\n\t\t{\n\t\t\t$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('\n\t\t\tSELECT `name`\n\t\t\tFROM `'._DB_PREFIX_.'module`\n\t\t\tWHERE `id_module` = '.(int)($ids));\n\t\t\tif ($result)\n\t\t\t\t$preloadedModuleNameFromId[$ids] = $result['name'];\n\t\t\telse\n\t\t\t\t$preloadedModuleNameFromId[$ids] = false;\n\t\t}\n\t\t\n\n\t\tif (is_array($ids)) {\n\t\t\treturn $preloadedModuleNameFromId;\n\t\t} else {\n\t\t\tif (!isset($preloadedModuleNameFromId[$ids])) \n\t\t\t\treturn false;\n\t\t\treturn $preloadedModuleNameFromId[$ids];\n\t\t}\n\t}", "public function getModule($id, $load = true)\n {\n if (($pos = strpos($id, '/')) !== false) {\n // sub-module\n $module = $this->getModule(substr($id, 0, $pos));\n\n return $module === null ? null : $module->getModule(substr($id, $pos + 1), $load);\n }\n\n if (isset($this->_modules[$id])) {\n if ($this->_modules[$id] instanceof self) {\n return $this->_modules[$id];\n } elseif ($load) {\n Yii::debug(\"Loading module: $id\", __METHOD__);\n /* @var $module Module */\n $module = Yii::createObject($this->_modules[$id], [$id, $this]);\n $module::setInstance($module);\n return $this->_modules[$id] = $module;\n }\n }\n\n return null;\n }", "function coxauto_get_display_module_type($id)\n{\n return (get_field('display_module_type', $id)) ? get_field('display_module_type', $id) : 'standard';\n}", "public function getTemplateModule($templateId);", "function getPermNameFromID($permID) \n {\n //$strSQL = \"SELECT `permName` FROM `\".DB_PREFIX.\"permissions` WHERE `ID` = \" . floatval($permID) . \" LIMIT 1\";\n $this->ci->db->select('sb_mod_name');\n $this->ci->db->where('sb_mod_id',floatval($permID));\n\t\t//$this->ci->db->where('sb_mod_status','1');\n $sql = $this->ci->db->get('sb_modules',1);\n $data = $sql->result();\n return $data[0]->sb_mod_name;\n }", "private function find_class($id, $stream)\r\n\t{\r\n\t\tglobal $global_module_list ;\r\n\t\tfor ($i = 0; $i < count($global_module_list); $i++)\r\n\t\t{\r\n\t\t\tif (!class_exists($global_module_list[$i][0]))\r\n\t\t\t{\r\n\t\t\t\t$this->log->add(\"ERR_CLASS_DOES_NOT_EXIST\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tif ($global_module_list[$i][1] == $id)\r\n\t\t\t\treturn new $global_module_list[$i][0]($stream, $this->log, $this->options);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function via_get_module_instance($cmid) {\n return context_module::instance($cmid);\n}", "public static function getIdFromName(string $name): ?int {\n $query = DB::getInstance()->get('modules', ['name', $name]);\n\n if ($query->count()) {\n return $query->first()->id;\n }\n\n return null;\n }", "function getTabid($module)\n{\n\tglobal $log;\n\t$log->debug(\"Entering getTabid(\".$module.\") method ...\");\n\n\t// Lookup information in cache first\n\t$tabid = VTCacheUtils::lookupTabid($module);\n\tif($tabid === false) {\n\n\t\tif(file_exists('tabdata.php') && (filesize('tabdata.php') != 0)) {\n\t\t\tinclude('tabdata.php');\n\t\t\t$tabid= $tab_info_array[$module];\n\n\t\t\t// Update information to cache for re-use\n\t\t\tVTCacheUtils::updateTabidInfo($tabid, $module);\n\n\t\t} else {\n\t $log->info(\"module is \".$module);\n \t global $adb, $table_prefix;\n\t\t\t$sql = \"select tabid from \".$table_prefix.\"_tab where name=?\";\n\t\t\t$result = $adb->pquery($sql, array($module));\n\t\t\t$tabid= $adb->query_result($result,0,\"tabid\");\n\n\t\t\t// Update information to cache for re-use\n\t\t\tVTCacheUtils::updateTabidInfo($tabid, $module);\n\t\t}\n\t}\n\n\t$log->debug(\"Exiting getTabid method ...\");\n\treturn $tabid;\n}", "function findItem($id);", "private function getFirstModule() {\r\n \t\r\n \tforeach($this->widgets as $module => $entries) {\r\n \t\tif($module != \"pages\") {\r\n \t\t\treturn $module;\r\n \t\t}\r\n \t\t\r\n \t}\r\n \t\r\n \treturn \"\";\t\r\n \r\n }", "function get_module_by_page($page) {\n global $clientele;\n foreach ($clientele->modules as $mod_name => $mod_data) {\n if ($mod_data->page_slug == $page) {\n return $clientele->modules->$mod_name;\n }\n }\n return false;\n }", "public static function find_by_id ($id=0) \n\t\t{\t\n\t\t\t// Check that the id is an int to prevent sql injection\n\t\t\tif (!is_numeric($id))\n\t\t\t{\n\t\t\t\t$_SESSION[\"message\"] = \"There is an error with the page you were trying to access.<br />\";\n\t\t\t\tredirect_head(ROOT_URL);\n\t\t\t}\n\t\t\n\t\t\t$sql = \"SELECT `\".static::$table_name.\"`.* FROM `\".\n\t\t\t\tstatic::$table_name.\"` WHERE `\".static::primary_key_field().\"`={$id} LIMIT 1;\";\n\t\t\t$result_array = static::find_by_sql($sql);\n\t\t\t\n\t\t\tif ($result_array != null)\n\t\t\t{\n\t\t\t\treturn array_shift($result_array);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function version($module) {\n if (array_key_exists($module, $this->list)) return $this->list[$module];\n\n throw new ElementNotFoundException('No such module \"'.$module.'\"');\n }", "public static function find($id) {\n return parent::find(__CLASS__, $id);\n }", "public function getModule() {\n\t\treturn Module::findById($this->moduleId);\n\t}", "public static function getModuleByUniqueId($uniqueId)\n {\n $modules = Yii::$app->loadedModules;\n foreach ($modules as $module) {\n if ($module->uniqueId == $uniqueId) return $module;\n }\n return false;\n }", "public function getNextModule() {\n\t\t\t$desc = @$this->_bootSequence[0];\n\t\t\tif ( $desc === NULL ) {\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\t\n\t\t\treturn PBModule($desc->id);\n\t\t}", "public function find($name)\n {\n\t\t$module = Arr::get($this->all(), $name);\n\t\tif(is_array($module))\n\t\t\treturn new static($this->app, $module);\n\t\treturn $module;\n }", "static function get_by_id($id)\n {\n }", "function getMod($mod) {\n\tglobal $modlist;\n\tif (isset($modlist[$mod])) {\n\t\treturn $modlist[$mod]['name'];\n\t} else {\n\t\treturn 'A nonexistent mod';\n\t}\n}", "public function determine_module_key($module) {\n\t\n\t\t$module_key = $module['module_type'];\n\t\t\n\t\tif (!empty($module['widget_id'])) {\n\t\t\tif (!empty($module['module_id_base'])) {\n\t\t\t\t$module_key = $module['module_id_base'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$module_key = $module['widget_id'];\n\t\t\t}\n\t\t}\n\n\t\treturn $module_key;\n\t}", "public function getModule();", "public function getModule();", "abstract public static function getModule(): string;", "public function getOne($module, $type, $id) {\n\t\t\t$message = null;\n\t\t\tif (isset($_SESSION['messages'][$module][$type][$id])) { \n\t\t\t\t$message = $_SESSION['messages'][$module][$type][$id];\n\t\t\t\tunset($_SESSION['messages'][$module][$type][$id]);\n\t\t\t}\n\t\t\treturn $message;\n\t\t\n\t\t}", "protected function findModel($id)\n {\n if (($model = PdmP36::findOne(['id_p36' => $id])) !== null) {\n return $model;\n } \n }", "public function get_membership_package_byid($id)\r\n {\r\n $this->db->where(\"id\", $id); \r\n $query = $this->db->get('membership_package');\r\n if($query->num_rows()>0)\r\n {\r\n return $query->row();\r\n }\r\n }", "public function getId(): int {\n return DB::getInstance()->query('SELECT `id` FROM nl2_modules WHERE `name` = ?', [$this->_name])->first()->id;\n }", "function getModuleId($email){\t\t$querystring = \"select m.mid from users_modules mc, modules m where m.mid = mc.mid and m.modulename like '% - INBOX' and m.Did = 18 and mc.email ='\".$email . \"' limit 1\n\";\n\t\tprint $querystring;\n\t\t$query = $this->db->query($querystring);\n\t\t$email = $query->row(0)->mid;\t\n\t\treturn $email;\t\n\t}", "public function getDefinitionOfModuleNamed($name) {\n\t\tif (!$this->enabled) { return null; }\t \n\n\t\tif (array_key_exists($name, $this->allModules)) {\n\t\t\treturn $this->allModules[$name];\n\t\t} else { return null; }\n\t}", "function get_by_id($id)\r\n {\r\n $sql=\" SELECT M.id, M.name, M.a AS high_percentage, \" .\r\n \" M.b AS medium_percentage, M.c AS low_percentage, \" .\r\n \" M.target_date, M.start_date, \" .\r\n \" M.testplan_id, NH_TPLAN.name AS testplan_name \" .\r\n // \" M.build_id, B.name AS build_name, \" . \r\n // \" M.platform_id, P.name AS platform_name \" . \r\n// \" FROM {$this->tables['milestones']} M \" .\r\n// \" JOIN {$this->tables['nodes_hierarchy']} NH_TPLAN \" .\r\n \" FROM \".$this->db->get_table('milestones').\" M \" .\r\n \" JOIN \".$this->db->get_table('nodes_hierarchy').\" NH_TPLAN \" .\r\n \" ON NH_TPLAN.id=M.testplan_id \" .\r\n // \" LEFT OUTER JOIN {$this->tables['builds']} B \" .\r\n // \" ON B.id=M.build_id \" .\r\n // \" LEFT OUTER JOIN {$this->tables['platforms']} P \" .\r\n // \" ON P.id=M.platform_id \" .\r\n \" WHERE M.id = \" . $this->db->prepare_int($id);\r\n \r\n $row = $this->db->fetchRowsIntoMap($sql,'id');\r\n return $row;\r\n }", "function findById($id)\n {\n }", "function findById($id)\n {\n }", "function findById($id);", "public function getId()\n\t{\n\t\treturn \\App\\Module::getModuleId($this->getName());\n\t}", "function globallink_fieldable_panels_get_row_by_id($id) {\r\n $result = db_select('globallink_core_fieldable_panels', 'tcfp')\r\n ->fields('tcfp')\r\n ->condition('id', $id, '=')\r\n ->execute();\r\n\r\n foreach ($result as $row) {\r\n return $row;\r\n }\r\n\r\n return FALSE;\r\n}", "protected static function getModuleName(): string\n {\n $moduleName = 'record_edit';\n if (GeneralUtility::_GET('route') !== null) {\n $routePath = (string)GeneralUtility::_GET('route');\n $router = GeneralUtility::makeInstance(Router::class);\n try {\n $route = $router->match($routePath);\n $moduleName = $route->getOption('_identifier');\n } catch (ResourceNotFoundException $exception) {\n unset($exception);\n }\n }\n return $moduleName;\n }", "protected function findModel($id)\n {\n if (($model = PdmP42::findOne($id)) !== null) {\n return $model;\n }\n }", "public static function find_by_id($id=0)\n\t{\n\t\tif(is_numeric($id)){\n\t\t\t$result_array = static::find_by_sql( \"SELECT * FROM \" . static::$table_name . \" WHERE id={$id} LIMIT 1\" );\n\t\t\treturn !empty($result_array) ? $result_array[0] : false ;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "abstract public function getModuleName();", "protected function findFile($id)\n {\n $found = glob($this->path . '/' . $id . '*.php');\n return sy_get_param((array)$found, 0);\n }", "protected function RetrieveModuleName()\n {\n $checked = 0;\n /** read online modules **/\n unset($GLOBALS[CONFIGS]['imvc']['module']);\n // we need to load module's directory names first\n $h = opendir(MODULE_PATH);\n while(($c = readdir($h))!=NULL)\n {\n if($c == '.' || $c=='..' || \\iMVC\\Tools\\String::startsWith($c, '__'))\n continue; \n $GLOBALS[CONFIGS]['imvc']['module'][] = $c;\n }\n if(count($this->_parts)==0)\n return;\n foreach($GLOBALS[CONFIGS]['imvc']['module'] as $index => $module)\n {\n // check normalized\n if(strtolower($module)==strtolower($this->_parts[0]))\n {\n if(!file_exists(MODULE_PATH.$module))\n {\n throw new \\iMVC\\Exceptions\\NotFoundException(\"Wired! $module not found at '\".MODULE_PATH.\"$module' ...!\");\n }\n $this->module = $module;\n if(strtolower($this->module)!=\"default\")\n $this->controller = \"{$module}_{$this->controller}\";\n \n // defines how many part of URI is matched with pattern\n $this->_URI_Accept_Level++;\n $checked = true;\n break;\n }\n }\n if(!$checked)\n {\n $this->_URI_Accept_Level = 0;\n }\n $this->_process_level = 1;\n $this->module;\n }", "public function lookup_group($id);", "public abstract function find(int $p): int;", "public function getModuleByName ($name)\n {\n return $this->getFullModuleByFilter('name=' . $this->conn->quote($name));\n }", "function get_for_details($module, $id) {\r\n\t\t\t\tif ($module == \"hotels\") {\r\n\t\t\t\t\t\t$this->db->select('hotel_id,hotel_title,hotel_slug');\r\n\t\t\t\t\t\t$this->db->where('hotel_id', $id);\r\n\t\t\t\t\t\t$this->db->order_by('hotel_id', 'desc');\r\n\t\t\t\t\t\t$rslt = $this->db->get('pt_hotels')->result();\r\n\t\t\t\t\t\t$result['id'] = $rslt[0]->hotel_id;\r\n\t\t\t\t\t\t$result['title'] = $rslt[0]->hotel_title;\r\n\t\t\t\t\t\t$result['slug'] = \"hotels/\".$rslt[0]->hotel_slug;\r\n\t\t\t\t}\r\n\t\t\t\telseif ($module == \"tours\") {\r\n\t\t\t\t\t\t$this->db->select('tour_id,tour_title,tour_slug');\r\n\t\t\t\t\t\t$this->db->where('tour_id', $id);\r\n\t\t\t\t\t\t$this->db->order_by('tour_id', 'desc');\r\n\t\t\t\t\t\t$rslt = $this->db->get('pt_tours')->result();\r\n\t\t\t\t\t\t$result['id'] = $rslt[0]->tour_id;\r\n\t\t\t\t\t\t$result['title'] = $rslt[0]->tour_title;\r\n\t\t\t\t\t\t$result['slug'] = \"tours/\".$rslt[0]->tour_slug;\r\n\t\t\t\t}\r\n\t\t\t\telseif ($module == \"cars\") {\r\n\t\t\t\t\t\t$this->db->select('car_id,car_title,car_slug');\r\n\t\t\t\t\t\t$this->db->where('car_id', $id);\r\n\t\t\t\t\t\t$this->db->order_by('car_id', 'desc');\r\n\t\t\t\t\t\t$rslt = $this->db->get('pt_cars')->result();\r\n\t\t\t\t\t\t$result['id'] = $rslt[0]->car_id;\r\n\t\t\t\t\t\t$result['title'] = $rslt[0]->car_title;\r\n\t\t\t\t\t\t$result['slug'] = \"cars/\".$rslt[0]->car_slug;\r\n\t\t\t\t}\r\n\t\t\t\telseif ($module == \"cruises\") {\r\n\t\t\t\t\t\t$this->db->select('cruise_id,cruise_title,cruise_slug');\r\n\t\t\t\t\t\t$this->db->where('cruise_id', $id);\r\n\t\t\t\t\t\t$this->db->order_by('cruise_id', 'desc');\r\n\t\t\t\t\t\t$rslt = $this->db->get('pt_cruises')->result();\r\n\t\t\t\t\t\t$result['id'] = $rslt[0]->cruise_id;\r\n\t\t\t\t\t\t$result['title'] = $rslt[0]->cruise_title;\r\n\t\t\t\t\t\t$result['slug'] = \"cruises/\".$rslt[0]->cruise_slug;\r\n\t\t\t\t}\r\n\t\t\t\treturn $result;\r\n\t\t}", "public static function getPrivilege($id)\n {\n parent::initialize();\n\n $cacheKey = 'Privilege.ByPid';\n if(xarCoreCache::isCached($cacheKey,$id)) {\n return xarCoreCache::getCached($cacheKey,$id);\n }\n // Need to get it\n $query = \"SELECT p.id, p.name, r.name, p.module_id, m.name, p.component, p.instance, p.level, p.description\n FROM \" . parent::$privilegestable . \" p LEFT JOIN \". parent::$realmstable .\" r ON p.realm_id = r.id\n LEFT JOIN \". parent::$modulestable .\" m ON p.module_id = m.id\n WHERE itemtype = ?\";\n if(is_numeric($id)) $query .= \" AND p.id = ?\";\n else $query .= \" AND p.name = ?\";\n\n $stmt = parent::$dbconn->prepareStatement($query);\n //Execute the query, bail if an exception was thrown\n $result = $stmt->executeQuery(array(self::PRIVILEGES_PRIVILEGETYPE,$id),ResultSet::FETCHMODE_NUM);\n\n if ($result->next()) {\n list($id,$name,$realm,$module_id,$module,$component,$instance,$level,$description) = $result->fields;\n $pargs = array('id'=>$id,\n 'name'=>$name,\n 'realm'=> is_null($realm) ? 'All' : $realm,\n 'module'=>$module,\n 'module_id'=>$module_id,\n 'component'=>$component,\n 'instance'=>$instance,\n 'level'=>$level,\n 'description'=>$description,\n 'parentid'=>0);\n\n sys::import('modules.privileges.class.privilege');\n $priv = new xarPrivilege($pargs);\n xarCoreCache::setCached($cacheKey,$id,$priv);\n return $priv;\n } else {\n return;\n }\n }", "function &get($id = null){\n\t\t\t//$myrow = $this->target_list[$id];\n\t\t\t$myrow =false;\n\t\t\tforeach($this->target_list as $key => $row){\n\t\t\t\tif($row['id'] == $id ){\n\t\t\t\t\t$myrow = $row;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($myrow ==false) {die('ID=' . $id . ' ERROR');}\n\t\t\t$ccmodule = new $this->mClass();\n\t\t\t$ccmodule->assignVars($myrow);\n\t\t\t$ret =& $ccmodule;\n\t\t\treturn $ret;\n\t\t}", "public function get_module_pid(){\n\t\treturn (int) $this->v_module_pid;\n\t}", "public function findElementById($id);", "function findById($id) {\n $query = $this->getSelectQuery() . \" WHERE id=?\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // bind id of product to be updated\n $stmt->bindParam(1, $id);\n\n return $this->returnOne($stmt);\n }", "public function getPatternModule($module) {\n $lang = Yii::app()->language;\n $command = Yii::app()->db->createCommand('SELECT url_pattern FROM ' . $this->tableName() . ' WHERE url_type=1 AND hoiit_modules_module_id=:module AND hoiit_languages_language_id=:lang');\n $command->bindParam(\":module\", $module, PDO::PARAM_STR);\n $command->bindParam(\":lang\", $lang, PDO::PARAM_STR);\n return $command->queryScalar();\n }" ]
[ "0.7675615", "0.73585", "0.69570524", "0.68722856", "0.6803015", "0.67217183", "0.64714426", "0.64276475", "0.64224315", "0.6418427", "0.63563365", "0.62678236", "0.626005", "0.6241067", "0.6208223", "0.61905795", "0.61862063", "0.61763436", "0.614445", "0.6113107", "0.61068386", "0.6071215", "0.60426855", "0.6037126", "0.6026064", "0.5983527", "0.5971025", "0.5953956", "0.5936371", "0.59291583", "0.59272367", "0.5906103", "0.5875001", "0.58638555", "0.5860755", "0.58545375", "0.5834252", "0.5832425", "0.5818976", "0.58178526", "0.5816379", "0.5789243", "0.5789243", "0.57568014", "0.57378864", "0.5734549", "0.5722795", "0.572021", "0.5717959", "0.5706382", "0.5698848", "0.5696874", "0.5690651", "0.56898606", "0.5679405", "0.5677919", "0.5677825", "0.5650188", "0.56358784", "0.56270856", "0.5624753", "0.5614331", "0.5613202", "0.5609231", "0.558893", "0.55731994", "0.55707294", "0.5566523", "0.55659026", "0.5549745", "0.5549745", "0.5541688", "0.55408156", "0.5540504", "0.55382395", "0.55365324", "0.55282694", "0.5524442", "0.55186886", "0.5512623", "0.5512623", "0.550532", "0.5498358", "0.54924357", "0.54809314", "0.5479409", "0.54786783", "0.5478649", "0.54708034", "0.54617363", "0.545662", "0.5449486", "0.5449117", "0.5442035", "0.5433314", "0.54271066", "0.54255855", "0.5425203", "0.542375", "0.5422813" ]
0.7453731
1
Retrieves $_POST variable by array values
Получает переменную $_POST по значениям массива
public static function getPostVar($array) { switch(count($array)) { case 0: $msg = "Unable to determine POST vars!"; throw new Exception($msg); break; case 1: $return = $_POST[$array[0]]; break; case 2: $return = $_POST[$array[0]][$array[1]]; break; case 3: $return = $_POST[$array[0]][$array[1]][$array[2]]; break; default: $msg = "Too many POST fields specified!"; throw new Exception($msg); break; } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cr_get_array_from_POST($key)\n{\n\t$result = array();\n\t$values = $_POST[$key];\n\tforeach ($values as $value) {\n\t\t$result[] = $value;\n\t}\n\treturn $result;\n}", "public function getPost($value='') {\n return ($value == '') ? $_POST : $_POST[$value];\n }", "function post($key){\n return arrayValue($_POST, $key);\n}", "function postvalues($flds = array(), $post = array()) {\n $flds = is_assoc($flds) ? array_keys($flds) : $flds;\n $data = array();\n foreach ($flds as $fld) {\n if (@issetNE($post[$fld]) || @issetNE($_REQUEST[$fld]))\n $data[$fld] = @issetVal($post[$fld], @issetVal($_REQUEST[$fld]));\n }\n return $data;\n}", "function ObtainPOSTValues() {\n\t\t//echo 'HTMLInputs:';var_dump($this->Values);\n\t\tif (empty($this->Values)) return;\n\t\t\n\t\t$isPost = (isset($_SERVER['REQUEST_METHOD']) && strtoupper($_SERVER['REQUEST_METHOD']) == 'POST');\n\t\t//echo 'Is Post: '.($isPost?'true':'false').'<br>';\n\t\t$params = ($isPost) ? $_POST : $_GET;\n\t\t\n\t\tforeach ($this->Values as $id=>$val) {\n\t\t\t$inputName = null;\n\t\t\t\n\t\t\t// Scan all data named POST.xx, and all names of HTML inputs on this page coming from json FormInputs array:\n\t\t\tif (substr($id, 0, 5) === 'POST.') {\n\t\t\t\t$inputName = substr($id, 5);\n\t\t\t\t//echo 'Searching POST.'.$inputName.'<br/>';\n\t\t\t} else {\n\t\t\t\t$split = explode('.', $id); \n\t\t\t\t$inputName = $split[count($split)-1]; // take input_name in element_id.input_type.input_name\n\t\t\t\t//echo 'Searching this page input '.$inputName.'<br/>';\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($params[$inputName])) { // value to receive from POST-submitted data\n\t\t\t\tif (OEDataContainer::$magicQuotesOn) $params[$inputName] = stripslashes($params[$inputName]);\n\t\t\t\t$postVal = $this->Clean($params[$inputName]); //!!check security\n\t\t\t\t$this->Values[$id] = $postVal;\n\t\t\t\t//echo \"Found POST input $id = $postVal<br/>\";\n\t\t\t}\n\t\t}\n\t}", "function savePostGet($array=null, $offset ='') {\n if ($array == null) $array = $_POST;\n if ($offset != '') $array = $array[$offset];\n $return = '';\n foreach ($array as $key => $value) {\n $return .= '<input type=\"hidden\" value=\"'.$value.'\" ';\n if ($offset != '') \n $return .= 'name=\"['.$offset.']'.$key.'\">';\n else\n $return .= 'name=\"'.$key.'\">';\n $return .=\"\\n\";\n }\n return $return; \n }", "function transfer_postdata($flds = array()) {\n if (empty($flds)) {\n return false;\n }\n $data = array();\n\n foreach ($flds as $fld) {\n if (isset($_POST[$fld])) {\n $data[$fld] = $_POST[$fld];\n }\n }\n return $data;\n}", "function posted() {\n\t\treturn array_map(array($this, 'cleanValue'), $_POST);\n\t}", "public function fetch_form_fields_value()\n {\n foreach( $_POST as $key=>$value){\n $request[$key] = $value;\n }\n\n return $request;\n\n }", "function postvalue($name)\n{\n\tif(isset($_POST[$name]))\n\t\t$value=$_POST[$name];\n\telse if(isset($_GET[$name]))\n\t\t$value=$_GET[$name];\n\telse\n\t\treturn \"\";\n\tif(!is_array($value))\n\t\treturn refine($value);\n\t$ret=array();\n\tforeach($value as $key=>$val)\n\t\t$ret[$key]=refine($val);\n\treturn $ret;\n}", "function getValues()\n{\n $post = [];\n foreach ($_POST as $index => $value ){\n if(!is_array($_POST[$index]))\n $post[$index] = trim(htmlentities($_POST[$index], ENT_QUOTES, 'UTF-8'));\n else\n $post[$index] = $_POST[$index];\n }\n return $post;\n}", "function getpost() {\n $keys = array_keys($_POST);\n $url = \"/\";\n $posts = array();\n foreach ($keys as $key) {\n $posts[$key] = filter_input(INPUT_POST, $key, FILTER_SANITIZE_STRING);\n }\n return $posts;\n}", "public static function post($array = false)\n {\n return $array ? $_POST : (object)$_POST;\n }", "function keeppostvalue($index)\r\n{\r\n if(isset($_POST[\"$index\"])) echo $_POST[\"$index\"];\r\n}", "protected function get_post_values($ids){\r\n\t\t$data=array();\r\n\t\tfor ($i=0; $i < sizeof($ids); $i++)\r\n\t\t\t$data[$ids[$i]]=array();\r\n\r\n\t\tforeach ($_POST as $key => $value) {\r\n\t\t\t$details=explode(\"_\",$key,2);\r\n\t\t\tif (sizeof($details)==1) continue;\r\n\r\n\t\t\t$name=$this->name_data($details[1]);\r\n\t\t\t$data[$details[0]][$name]=ConnectorSecurity::filter($value);\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "function postvar($v,$d='') { return (isset($_POST[$v]))?$_POST[$v]:$d; }", "public function getFormValues() : array {}", "public function getPost()\n\t{\n\t\tif (!$this->isPost()) {\n\t\t\treturn array();\n\t\t}\n\t\treturn Zend_Controller_Front::getInstance()->getRequest()->getPost();\n\t}", "protected static function getFormAttributeValues()\n {\n $values = $_POST;\n if (static::convertActionToCrud() === Crud::UPDATE) {\n parse_str(file_get_contents(\"php://input\") , $values);\n }\n $newValues = array();\n foreach ($values as $attrid => $value) {\n $newValues[strtolower($attrid) ] = $value;\n }\n return $newValues;\n }", "public function getPost($key=null){\n\t\tif($this->isPost()){\n\t\t\t// if key exists in post data, return value for that\n\t\t\tif($key != null && array_key_exists($key, $_POST)){\n\t\t\t\treturn $_POST[$key];\n\t\t\t} else {\n\t\t\t\t// return entire post array\n\t\t\t\treturn $_POST;\n\t\t\t}\n\n\t\t} else {\n\t\t\tif($key != null){\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t}\n\t}", "function transfer_data($flds = array(), $post = false) {\n if (empty($flds)) {\n return false;\n }\n $post = $post ? $post : $_POST;\n\n $data = array();\n foreach ($flds as $fld) {\n if (isset($post[$fld])) {\n $data[$fld] = $post[$fld];\n }\n }\n return $data;\n}", "function p($var){\r\n\t\treturn $_POST[$var];\r\n\t}", "function extract_data()\n {\n $data = array();\n\n // To retrieve all param-value pairs from a post object\n foreach ($_POST as $key => $val)\n {\n $data[$key] = $val; // record all form data to an array\n }\n reset($data);\n return $data;\n }", "public function getpost($index) {\n\t\treturn isset($_POST[$index])?$_POST[$index]:$_GET[$index];\n\t}", "public function getRequestValue() {\n\t\t\n\t\t#Check if the request is done via POST. Otherwise return an empty array.\n\t\tif ($_SERVER['REQUEST_METHOD'] != 'POST') throw new \\spitfire\\exceptions\\PrivateException(\"Nothing posted\");\n\t\t\n\t\t#Post will contain an array of subforms for this element.\n\t\t$postdata= $this->getPostData();\n\t\t$_return = Array();\n\t\t$table = $this->getField()->getTarget()->getTable();\n\t\t\n\t\tif (empty($postdata)) {throw new \\spitfire\\exceptions\\PrivateException(\"nothing sent\");}\n\t\t\n\t\t#Loop through the passed array and create the subforms to handle the data\n\t\tforeach ($postdata as $pk) {\n\t\t\t\n\t\t\t$record = $table->getById($pk);\n\t\t\tif ($record) { $_return[] = $record; }\n\t\t\t\n\t\t}\n\n\t\treturn $_return;\n\t}", "function getInputValues($name)\n {\n if(isset($_POST[$name])) {\n echo $_POST[$name];\n }\n }", "function getPOSTData() {\n //pre-filling of the form.\n $postdata = '';\n\n foreach($_POST as $key => $value) {\n $postdata .= '&' . htmlspecialchars($key, ENT_QUOTES, 'UTF-8') . '=' . htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }\n\n return $postdata;\n}", "protected function getFormValues() : array {}", "public function set_data_from_post() {\n\t\t$this->data = array();\n\t\tforeach ($this->fields as $field) {\n\t\t\tif (array_key_exists($field, $_POST)) {\n\t\t\t\tif (in_array($field, $this->fields_bitwise)) {\n\t\t\t\t\t// Bitwise field.\n\t\t\t\t\t$this->data[$field] = array();\n\t\t\t\t\tif (is_array($_POST[$field])) {\n\t\t\t\t\t\tforeach ($_POST[$field] as $key => $value) {\n\t\t\t\t\t\t\tif (ctype_digit($value)) {\n\t\t\t\t\t\t\t\t$this->data[$field][] = $value;\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} else {\n\t\t\t\t\t// Normal field.\n\t\t\t\t\tif (is_scalar($_POST[$field])) {\n\t\t\t\t\t\t$this->data[$field] = trim($_POST[$field]);\n\t\t\t\t\t\tif ($this->data[$field] === '') {\n\t\t\t\t\t\t\t$this->data[$field] = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->data[$field] =\n\t\t\t\t\t\t\t\t$this->convert_windows_characters($this->data[$field]);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->data[$field] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Field not submitted.\n\t\t\t\tif (in_array($field, $this->fields_bitwise)) {\n\t\t\t\t\t$this->data[$field] = array();\n\t\t\t\t} else {\n\t\t\t\t\t$this->data[$field] = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->data['set_from'] = 'post';\n\t}", "public function getPostValues()\n {\n // Define the check for params\n $post_check_array = array(\n // education\n 'cluster' => array('filter' => FILTER_SANITIZE_STRING),\n );\n // Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n // RTS\n return $inputs;\n }", "function getSaveArray() {\n\t\treturn $_POST['json'];\n\t}", "public function form($key) {\n\t\treturn $_POST[$key];\n\t}", "function getPostData($key){\n\t\t\n\t\tif( !isset($_POST[$key]) )\n\t\t\treturn false;\n\t\treturn $_POST[$key];\n\t}", "public function getValues(): array {\n $arr = [];\n foreach ($this->el as $el) {\n $n = $el->nameFiles ?? $el->name;\n if($n === \"csrf_token\") continue;\n //if isset default, then sets the value to the default and if the value was filled in form, then overwrite with it.\n if(!empty($el->default)) {\n $arr[$n] = $el->default;\n }\n if($this->method == \"POST\") {\n if(!empty($_POST[$n])) {\n $arr[$n] = $_POST[$n];\n }\n } else {\n if(!empty($_GET[$n])) {\n $arr[$n] = $_GET[$n];\n }\n }\n }\n return $arr;\n }", "function post($index = NULL, $xss_clean = TRUE)\n\t{\n\t\t// Check if a field has been provided\n\t\tif ($index === NULL AND ! empty($_POST))\n\t\t{\n\t\t\t$post = array();\n\n\t\t\t// Loop through the full _POST array and return it\n\t\t\tforeach (array_keys($_POST) as $key)\n\t\t\t{\n\t\t\t\t$post[$key] = $this->_fetch_from_array($_POST, $key, $xss_clean);\n\t\t\t}\n\t\t\treturn $post;\n\t\t}\n\t\t\n\t\treturn $this->_fetch_from_array($_POST, $index, $xss_clean);\n\t}", "protected function getPostValues() {}", "function _processPost(){\n\t\tif( empty($_POST) ) return false;\n\t\tif( $this->_multi == 'node' ){\n\t\t\t$post = array();\n\t\t\tforeach($_POST as $fieldName=>$fieldValue){\n\t\t\t\t// split at __, if count eq 2 continue\n\t\t\t\t$field = explode('__',$fieldName);\n\t\t\t\tif( count($field) == 2 ){\n\t\t\t\t\t// shuffle post values if tables match\n\t\t\t\t\tif( $field[0] == $this->table ){\n\t\t\t\t\t\t$post[$field[1]] = $fieldValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $post;\n\t\t} else return $_POST;\n\t}", "public static function post() {\r\n return self::__filter($_POST);\r\n }", "private function getFields($names) {\n $values = array();\n $data = $this->controller->getRequest();\n foreach ($names as $name) {\n if (isset($_POST[$name])) {\n $values[$name] = $_POST[$name];\n } else {\n $values[$name] = '';\n }\n }\n\n return $values;\n }", "protected function get_step_post(&$step_var) {\n\t if (empty($_POST)) return false;\n\t\t\n\t\t//extract submit and FormAction\n\t\tarray_shift($_POST);//FormAction\n\t\tarray_pop($_POST); //Submit\n\t\t\n\t\tif (count($_POST)>1) {//if multiple values\n\t\t\t$ret = (array) $_POST; //return array\n\t\t\t//print_r($_POST);\n\t\t}\t\n\t\telse {//return last element\n\t\t $step_var = key($_POST); //save field name..\n\t\t $ret = array_pop($_POST);\n\t\t\t//echo $ret;\n\t\t}\t\n \t\t\n\t\treturn ($ret);\t\n }", "function GetAssocPosts($match)\r\n{\r\n\t$ret = array();\r\n\tforeach (array_keys($_POST) as $n)\r\n\t{\r\n\t\tif (preg_match(\"/^$match/\", $n)) $ret[$n] = FormInput::GetPostValue($n);\r\n\t}\r\n\treturn $ret;\r\n}", "public function getPostData()\n {\n if (isset($_POST[$this->name]))\n {\n $val = $_POST[$this->name];\n return $val;\n }\n else\n {\n return '';\n }\n }", "public function all()\n {\n if (isset($_POST)) {\n return $_POST;\n }\n return array();\n }", "public static function getPost($function=\"htmlentities\"){\n\t\treturn array_map($function, $_POST);\n\t}", "function get($key)\n{\n if (array_key_exists($key,$_POST))\n return $_POST[$key];\n else\n return \"\";\n}", "function getDataForm($aarray) {\n\t\t\n\t\tif(!is_array($aarray)) { //try to transform to array\n\t\t\t\t$aarray = get_object_vars($aarray);\n\t\t} else {\n\t\t\tprint \"<br/> don't need to convert object to array: \";\n\t\t}\n\t\t\t\n\t\t$value = \"\";\n\t\tforeach (array_keys($aarray) as $key) {\n\t\t\t//if ($_GET)\n\t\t\tif ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n\t\t\t\t$value = $_GET[$key];\n\t\t\t} else if (isset($_POST)) {\n\t\t\t\t$value = $_POST[$key];\n\t\t\t} else {\n\t\t\t\t$value = $_REQUEST[$key];\n\t\t\t}\n\t\t\t$aarray[$key] = $value;\n\t\t}\n\n\t\t/**should try catch unexpected exception may happen */\n\t\treturn $aarray;\n\t}", "public function dataPost($key){\n\t\tif($this->existPost($key)){\n\t\t\treturn $_POST[$key];\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "protected function _order_input()\n\t{\n\t $input = array();\n\t $params = $this->_order_params();\n\t \n\t foreach ($params as $p) {\n\t $input[$p] = $this->input->post($p);\n\t }\n\t\n\t return $input;\n\t}", "public function getAllPostInput()\n {\n if(isset($_POST))\n {\n $postData = [];\n foreach($_POST as $field => $value)\n {\n $postData[$field] = filter_input(INPUT_POST, $field, FILTER_SANITIZE_STRING);\n }\n return $postData;\n }\n return false;\n }", "function myFunction(){\n\t\n\tparse_str($_POST['values'], $my_array_of_vars);\n print_r($my_array_of_vars);\n\tdie();\n}", "public function getData()\n {\n return $_POST;\n }", "function getPost($key, $default = null)\n{\n if (is_array($key)) {\n // $key = array_flip($key);\n // return array_replace($key, array_intersect_key($_POST, $key));\n foreach ($key as $val) {\n $post[$val] = getPost($val);\n }\n return $post;\n }\n\n return isset($_POST[$key])\n ? $_POST[$key]\n : $default;\n}", "public static function getPostData() {\n\t\t\tif (!function_exists('merge_file_post_data')) {\n\t\t\t\tfunction merge_file_post_data($type, array $file, &$post) {\n\t\t\t\t\tforeach ($file as $key => $value) {\n\t\t\t\t\t\tif (!isset($post[$key])) $post[$key] = array();\n\t\t\t\t\t\tif (is_array($value)) merge_file_post_data($type, $value, $post[$key]);\n\t\t\t\t\t\telse $post[$key][$type] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$files = array(\n\t\t\t\t'name'\t\t=> array(),\n\t\t\t\t'type'\t\t=> array(),\n\t\t\t\t'tmp_name'\t=> array(),\n\t\t\t\t'error'\t\t=> array(),\n\t\t\t\t'size'\t\t=> array()\n\t\t\t);\n\t\t\t$post = $_POST;\n\t\t\t\n\t\t\tif(is_array($_FILES) && !empty($_FILES)){\n\t\t\t\tforeach ($_FILES as $key_a => $data_a) {\n\t\t\t\t\tif(!is_array($data_a)) continue;\n\t\t\t\t\tforeach ($data_a as $key_b => $data_b) {\n\t\t\t\t\t\t$files[$key_b][$key_a] = $data_b;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($files as $type => $data) {\n\t\t\t\tmerge_file_post_data($type, $data, $post);\n\t\t\t}\n\t\t\t\n\t\t\treturn $post;\n\t\t}", "public static function post_values(array $values) : array {\n $arr = [];\n foreach($values as $key => $value) {\n $arr[$key] = self::sanitize($value);\n }\n\n return $arr;\n }", "public function post(){\r\n return $_POST;\r\n }", "protected function post_to_array(Array $names){\n\t\t$arr = array();\n\t\tforeach($names as $name){\n\t\t\t$arr[$name] = strip_tags($_POST[$name]);\n\t\t}\n\t}", "public function inputs(){\n if($_SERVER['REQUEST_METHOD'] == \"POST\"){\n foreach($_POST as $name => $value){\n $this->inputs[$name] = $this->sanInput($value);\n }\n }\n }", "function ReadData_FromPost($lst) {\n $results = array();\n foreach($lst as $key=>$value)\n $results[$value] = GetSafeValuePost($value);\n //var_dump($results);\n return $results;\n}", "private function setPost()\r\n\t{\r\n\t\t$this->postArr = array();\r\n\t\tforeach ($_POST as $key => $value) {\r\n\t\t\t$this->postArr[strtolower($key)]= filter_input(INPUT_POST, $key, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\t\t}\r\n\t}", "function _getValue($field)\r\n\t{\r\n\t\t$value = $_POST[$field];\r\n\t\treturn $value;\r\n\t}", "function determineTerms(){\n $terms_array = $_POST[\"termsSelect\"];\n}", "function getPostData ($data) \n{\n if(empty($data))\n {\n $data = array();\n $request = PODIO_POST_REQUEST;\n $datas = explode(\"&\", $request);\n foreach($datas as $rawdata) {\n $aData = explode(\"=\", $rawdata);\n $data[$aData[0]] = $aData[1];\n }\n }\n return $data;\n}", "public function get($field = null){\n if($field){\n if(isset($_POST[$field])){\n return $this->postData[$field];\n }else{\n return false;\n } \n }else{\n return $this->postData;\n }\n }", "function set_parcel_post() {\n\n\tforeach ( $_POST as $a => $b ) {\n\t\techo \"<input type='hidden' name='\" . htmlentities($a) . \"' value='\" . htmlentities($b) . \"'>\";\n\t}\n}", "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "function seed_from_POST()\n\t{\n\t\tforeach($_POST as $key => $value)\n\t\t{\n\t\t\t$this->$key = !isset($key[$value]) || is_null(trim($key[$value])) ? \"\" : $value;\n\t\t\tif ($key != \"submit\")\n\t\t\t{\n\t\t\t\t$this->$key = $value;\n\t\t\t//\techo \"<br />\".$this->$key;\n\t\t\t}\n\t\t}\n\t}", "public function lpost(){\r\n\t\treset($_POST);\r\n\t\techo \"<hr>\";\r\n\t\twhile (list ($clave, $val) = each($_POST)) {\r\n\t\t\techo \"$clave = \" . $_POST[\"$clave\"] . \" \";\r\n\t\t}\r\n\t\techo \"</hr>\";\r\n\t}", "protected function inputPOST($name) {\n\t return (isset($_POST[$name]) ? $_POST[$name] : NULL);\n\t}", "function get_value($value)\n\t{\n\t\tif ( _button($this->name . '_dsp') )\n\t\t{\n\t\t\t$form_values = _read($this->name, '', '', '', true);\n\t\t\t$count_values = count($form_values);\n\t\t\t$value = array();\n\t\t\tfor ( $i = 0; $i < $count_values; $i++ )\n\t\t\t{\n\t\t\t\tif ( isset($this->data['options'][ $form_values[$i] ]) )\n\t\t\t\t{\n\t\t\t\t\t$value[] = $form_values[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if ( empty($value) )\n\t\t{\n\t\t\t$value = array();\n\t\t}\n\t\treturn $value;\n\t}", "function _cargarValues()\r\n\t{\r\n\t\tforeach ($_REQUEST as $key => $value)\r\n\t\t{\r\n\t\t\t// Si no es un button o un hidden, incluir la clave y el valor en el array\r\n\t\t\tif (! (strstr($key, PREFIX_BUTTON) || substr($key, 0, 1) == PREFIX_HIDDEN) )\r\n\t\t\t{\r\n\t\t\t\t// Si es un checkbox, poner como valor 'checked'\r\n\t\t\t\tif (strstr($key, PREFIX_CHECKBOX))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->values[$key] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t\t// Text, select\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Clean data\r\n\t\t\t\t\t//$value = htmlentities($value);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Si esta activado \"magic quotes\" quitar los slashes\r\n\t\t\t\t\tif (get_magic_quotes_gpc())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->values[$key] = stripslashes($value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->values[$key] = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function init_get_post_arrays()\r\n{\r\n\tif ($_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST))\r\n\t\t$_POST = json_decode(file_get_contents('php://input'), true);\r\n\t\r\n\tforeach($_POST as $key => $val)\r\n\t\t$_POST[$key] = utf8_decode($val);\r\n\t\r\n\t// merge the two arrays inside $_GET, so we can only work with $_GET\r\n\t$_GET += $_POST;\r\n\t\r\n\t// do some cleaning if 'get_magic_quotes_gpc' parameter is on, and remove strange keys (starting by '|')\r\n\tforeach($_GET as $key => $val)\r\n\t{\r\n\t\tif( is_string($val) && get_magic_quotes_gpc() ) // magic_quotes mode fix\r\n\t\t\t$_GET[$key] = stripslashes($val);\r\n\t}\r\n}", "function getInputValue($name) {\n if(isset($_POST[$name])) {\n echo $_POST[$name];\n }\n}", "function post($key){\n\n if ($_SERVER['REQUEST_METHOD']=='POST') {\n\n \n\n $toArray= _toArray(json_decode(file_get_contents(\"php://input\")));\n\n if(is_null($toArray))\n\n $toArray= _toArray($_POST);\n\n \n\n if(array_key_exists($key, $toArray)){\n\n return _toArray($toArray[$key]);\n\n }else{\n\n return null;\n\n }\n\n \n\n }else{\n\n return null;\n\n }\n\n}", "function CleanPostData()\r\n\t{\r\n\t\t$vals =& $_POST;\r\n\t\t\r\n\t\t$noValidateArray = array(Postback::GetPostbackVariable());\r\n\t\t\r\n\t\tforeach ($vals as $key=>$val)\r\n\t\t{\r\n\t\t\tif (array_search($key,$noValidateArray) !== false)\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$new_value = $val;\r\n\t\t\t\r\n\t\t\tif (is_array($val))\r\n\t\t\t{\r\n\t\t\t\t$tmp = array();\r\n\t\t\t\tforeach ($val as $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t//clean each \t\r\n\t\t\t\t\t$tmp[] = Postback::CleanMe($v);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$new_value = $tmp;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$new_value = Postback::CleanMe($val);\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$vals[$key] = $new_value;\r\n\t\t}\r\n\t}", "public function cleanPostArray($array){\r\n\t\t$cleanArray = array();\r\n\t\t\r\n\t\tforeach($array as $key => $value){\r\n\t\t\t$cleanArray[$key] = $this->cleanPostValue($value);\r\n\t\t}\r\n\t\t\r\n\t\treturn $cleanArray;\r\n\t}", "private function issetPost(): array\n {\n $myPost = $_POST;\n if (isset($myPost['quantity']) && $myPost['quantity'] == '') {\n $myPost['quantity'] = null;\n }\n if (isset($myPost['measurementId']) && $myPost['measurementId'] == '-- --') {\n $myPost['measurementId'] = null;\n }\n if (isset($myPost['description']) && $myPost['description'] == '') {\n $myPost['description'] = null;\n }\n return $myPost;\n }", "function getInputValue($name){\n if(isset($_POST[$name])){\n echo $_POST[$name];\n }\n }", "function form_hidden_from_array(array $list){\n\tforeach($list as $name=>$value)echo '<input type=\"hidden\" name=\"'.$name.'\" value=\"'.$value.'\" />'.\"\\n\";\n}", "public static function prepareToPost($ary = array()){\n self::$debug[] = \"Trying to prepareToPost\";\n $ret = array();\n foreach ($ary as $key => $value){\n // continue if field value is 'submit' or 'captcha'\n if ($key == 'submit') continue;\n if ($key == 'captcha') continue;\n $ret[$key] = $value;\n }\n return $ret;\n }", "public function getPostVars() {\n\n return $this->_POST;\n\n }", "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= \"<p><b>\" . $strippedVarName . \":</b> \" . implode(\",\",$_POST[$varName]) . \"</p>\" . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= \"<p><b>\" . $strippedVarName . \":</b> \" . $value . \"</p>\" . PHP_EOL;\n }\n }\n return $myReturn;\n}", "function POST($POSTVariableName){\n\t\tif(isset($_POST[$POSTVariableName])){\n\t\t\treturn $_POST[$POSTVariableName];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "function process_post()\n{//loop through POST vars and return a single string\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "function Post()\n\t{\n\t\t// for each post variable\n\t\tif(is_array($_POST))\n\t\t{\n\t\t\tforeach($_POST AS $strName=>$strValue)\n\t\t\t{\n\t\t\t\t// parse variable\n\t\t\t\t$this->_ParseData($strName, $strValue);\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "public function getPost($key = null)\n {\n if(!$key) {\n return $_POST;\n } else {\n return isset($_POST[$key]) ? $_POST[$key] : null;\n }\n }", "function get_postval($val)\n{\n\tglobal $_POST;\n\tif (isset($_POST[$val]) && !empty($_POST[$val]))\n\t{\n\t\treturn $_POST[$val];\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function formArray($varname, $striptags = true, $quotes = false, $type = 'string')\n{\n $arrayItems = array();\n // Convert a single or comma delimited list to an array\n if (isset($_POST[$varname]) && !is_array($_POST[$varname])) {\n if (strpos($_POST[$varname], ',') !== false) {\n $_POST[$varname] = explode(',', $_POST[$varname]);\n } else {\n $_POST[$varname] = array($_POST[$varname]);\n }\n }\n\n if (isset($_POST[$varname]) && is_array($_POST[$varname]) && count($_POST[$varname]) > 0) {\n $arrayItems = $_POST[$varname];\n foreach ($arrayItems as $item => $theObject) {\n $theObject = &$arrayItems[$item];\n switch ($type) {\n case 'int':\n $theObject = intval($theObject);\n break;\n case 'string':\n default:\n if ($striptags) {\n $theObject = strip_tags($theObject);\n }\n if ($quotes) {\n $theObject = htmlspecialchars($theObject, ENT_QUOTES);\n } else {\n $theObject = htmlspecialchars($theObject, ENT_NOQUOTES);\n }\n break;\n }\n unset($theObject);\n }\n }\n return $arrayItems;\n}", "function return_array_post_filter(){\r\n $return_array = array();\r\n\r\n foreach($_POST as $postKey => $postVar){\r\n\t\tif (is_array($postVar) == false)\r\n\t\t\t$return_array[$postKey] = post_filter($postVar);\r\n\t\telse\r\n\t\t\t$return_array[$postKey] = $postVar;\r\n }\r\n\r\n\t$_POST = $return_array;\r\n}", "function call_post(){\n\t\tunset($_POST['action']);\n\n\t\tforeach($_POST as $key => $value) {\n\t\t\tglobal ${$key};\n\t\t\t${$key} = stripslashes($value);\n\t\t}\n\n\n}", "public function testGetPostArray()\n {\n $raw = array('REQUEST_METHOD' => 'POST');\n $request = new Pillar_Rest_Request($raw);\n\n $vars = $request->getRequestVars();\n\n $this->assertEquals(1, count($vars));\n $this->assertEquals('Jill', $vars['Name']);\n }", "public function post($arrDecrypt = []) {\n $this->_objectForm->decrypt = new stdClass();\n\n foreach ($_POST as $key => $value) {\n $kk = explode('__', $key); //se quita el alias\n $kk = (isset($kk[1])) ? $kk[1] : $key;\n\n if (is_array($_POST[$key])) {\n $arr = [];\n foreach ($_POST[$key] as $k => $val) {\n $arr[] = htmlspecialchars(trim($val), ENT_QUOTES);\n }\n $this->_objectForm->$kk = $arr;\n $this->_decryptArray($arrDecrypt, $_POST[$key], $kk);\n } else {\n $this->_objectForm->$kk = htmlspecialchars(trim($value), ENT_QUOTES);\n $this->_decrypt($arrDecrypt, $kk, $value);\n }\n }\n return $this->_objectForm;\n }", "function getPostData($name)\n {\n if (isset($_POST[$name]))\n {\n return $_POST[$name];\n }\n else\n {\n return '';\n }\n }", "function get_post($conn, $var) {\n return $conn->real_escape_string($_POST[$var]);\n }", "function getPostData() {\n\t\t\n\t\t$body = $this->getRequestBody();\n\t\tif($body != NULL && is_array($body)) {\n\t\t return $body;\t\n\t\t} if (empty($_POST) === true) { //if empty, create a barebone object\n\t\t\treturn NULL;\n\t\t} else if (is_array($_POST) === true) { \n\t\t\treturn $_POST;\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "function getFormInputVal($name)\n{\n if (isset($_POST[$name])) {\n echo $_POST[$name];\n }\n}", "function getPostVar($key)\n\t{\n\n\t\tif (isset($_POST[$key])) {\n\t\t\treturn $_POST[$key];\n\t\t}\n\n\t\treturn NULL;\n\n\t}", "public function getInputValues(): array;", "function get_post_value ($var_name) {\n global $HTTP_POST_VARS;\n if (IsSet($_POST) &&\n IsSet($_POST[$var_name])) {\n return($_POST[$var_name]);\n }\n elseif (IsSet($HTTP_POST_VARS) &&\n IsSet($HTTP_POST_VARS[$var_name])) {\n return($HTTP_POST_VARS[$var_name]);\n }\n else {\n return(FALSE);\n }\n}" ]
[ "0.6965111", "0.69444823", "0.69044006", "0.68204427", "0.6691269", "0.66839284", "0.6572434", "0.6533471", "0.6527404", "0.6507112", "0.6494137", "0.64731944", "0.6454628", "0.64305645", "0.6359856", "0.6313689", "0.6309497", "0.6285551", "0.6269199", "0.626118", "0.6257984", "0.6244907", "0.6219917", "0.61883307", "0.6178256", "0.6174201", "0.6174092", "0.61683035", "0.6126553", "0.61153907", "0.6109346", "0.6107934", "0.61025345", "0.6098711", "0.60772544", "0.6062117", "0.6050246", "0.6041319", "0.6035894", "0.6030189", "0.6027594", "0.6020227", "0.60172105", "0.6012775", "0.59907126", "0.59895223", "0.59805804", "0.5980451", "0.59578264", "0.59498787", "0.59169877", "0.58960634", "0.5890178", "0.58836263", "0.5882602", "0.5868795", "0.58663994", "0.58635587", "0.58631843", "0.5854529", "0.5849724", "0.5838495", "0.58359957", "0.5835456", "0.5834092", "0.5834092", "0.5834092", "0.58309454", "0.5827166", "0.5827156", "0.5825056", "0.5813044", "0.5809812", "0.58005995", "0.5787812", "0.57663363", "0.57593775", "0.5756675", "0.57545274", "0.5753552", "0.57504416", "0.57454", "0.57389945", "0.5736332", "0.5735289", "0.5729265", "0.5717076", "0.57139134", "0.5711799", "0.56972533", "0.56970865", "0.5696023", "0.569195", "0.56883997", "0.5682404", "0.5672254", "0.56693625", "0.5658602", "0.5654183", "0.5654133" ]
0.70139253
0
Adds support for the WordPress 'customheader' theme feature and registers custom headers.
Добавляет поддержку функции WordPress 'customheader' и регистрирует пользовательские заголовки.
function w4ptheme_custom_header_setup() { add_theme_support( 'custom-header', array( 'default-image' => '', 'random-default' => false, 'width' => 1280, 'height' => 400, 'flex-width' => true, 'flex-height' => true, 'header-text' => false, 'uploads' => true, 'wp-head-callback' => 'w4ptheme_custom_header_wp_head', ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpo_custom_header_setup() {\n /**\n * Filter Twenty Fourteen custom-header support arguments.\n *\n * @since Twenty Fourteen 1.0\n *\n * @param array $args {\n * An array of custom-header support arguments.\n *\n * @type bool $header_text Whether to display custom header text. Default false.\n * @type int $width Width in pixels of the custom header image. Default 1260.\n * @type int $height Height in pixels of the custom header image. Default 240.\n * @type bool $flex_height Whether to allow flexible-height header images. Default true.\n * @type string $admin_head_callback Callback function used to style the image displayed in\n * the Appearance > Header screen.\n * @type string $admin_preview_callback Callback function used to create the custom header markup in\n * the Appearance > Header screen.\n * }\n */\n add_theme_support( 'custom-header', apply_filters( 'wpo_custom_header_args', array(\n 'default-text-color' => 'fff',\n 'width' => 1260,\n 'height' => 240,\n 'flex-height' => true,\n 'wp-head-callback' => 'wpo_header_style',\n 'admin-head-callback' => 'wpo_admin_header_style',\n 'admin-preview-callback' => 'wpo_admin_header_image',\n ) ) );\n}", "function shoper_custom_header_setup() {\n\tadd_theme_support( 'custom-header', apply_filters( 'shoper_custom_header_args', array(\n\t\t'default-image' => get_template_directory_uri() . '/assets/image/custom-header.jpg',\n\t\t'default-text-color' => '000000',\n\t\t'width' => 1000,\n\t\t'height' => 350,\n\t\t'flex-height' => true,\n\t\t'wp-head-callback' => 'shoper_header_style',\n\t) ) );\n\t\n\tregister_default_headers( array(\n\t\t'default-image' => array(\n\t\t'url' => '%s/assets/image/custom-header.jpg',\n\t\t'thumbnail_url' => '%s/assets/image/custom-header.jpg',\n\t\t'description' => esc_html__( 'Default Header Image', 'shoper' ),\n\t\t),\n\t));\n\t\n}", "function fotografie_custom_header_setup() {\n\tadd_theme_support( 'custom-header', apply_filters( 'fotografie_custom_header_args', array(\n\t\t'default-image' => get_stylesheet_directory_uri() . '/assets/images/header.jpg',\n\t\t'default-text-color' => 'ffffff',\n\t\t'width' => 1920,\n\t\t'height' => 1080,\n\t\t'flex-height' => true,\n\t\t'flex-width' => true,\n\t\t'wp-head-callback' => 'fotografie_header_style',\n\t\t'video' => true,\n\t) ) );\n\n\tregister_default_headers( array(\n\t\t'blond' => array(\n\t\t\t'thumbnail_url' => get_stylesheet_directory_uri() . '/assets/images/header-thumb.jpg',\n\t\t\t'url' => get_stylesheet_directory_uri() . '/assets/images/header.jpg',\n\t\t\t'description' => esc_html__( 'Blond', 'clean-fotografie' ),\n\t\t),\n\t\t'closeup' => array(\n\t\t\t'thumbnail_url' => get_stylesheet_directory_uri() . '/assets/images/header2-thumb.jpg',\n\t\t\t'url' => get_stylesheet_directory_uri() . '/assets/images/header2.jpg',\n\t\t\t'description' => esc_html__( 'Closeup', 'clean-fotografie' ),\n\t\t),\n\t) );\n}", "function estore_custom_header_setup() {\n\tadd_theme_support(\n\t\t'custom-header',\n\t\tapply_filters(\n\t\t\t'estore_custom_header_args',\n\t\t\tarray(\n\t\t\t\t'default-image' => '',\n\t\t\t\t'default-text-color' => '000000',\n\t\t\t\t'width' => 1000,\n\t\t\t\t'height' => 250,\n\t\t\t\t'flex-height' => true,\n\t\t\t\t'wp-head-callback' => 'estore_header_style',\n\t\t\t)\n\t\t)\n\t);\n}", "function happy_custom_header_setup() {\n\t$args = array(\n\t\t// Text color and image (empty to use none).\n\t\t'header-text' => false,\n\t\t'default-image' => '',\n\n\t\t// Set height and width, with a maximum value for the width.\n\t\t'height' => 250,\n\t\t'width' => 1140,\n\t\t'max-width' => 2000,\n\n\t\t// Support flexible height and width.\n\t\t'flex-height' => true,\n\t\t'flex-width' => true,\n\n\t\t// Random image rotation off by default.\n\t\t'random-default' => false,\n\n\t\t// Callbacks for styling the header and the admin preview.\n\t\t'wp-head-callback' => 'happy_admin_header_style',\n\t\t'admin-head-callback' => '',\n\t\t'admin-preview-callback' => 'happy_admin_header_image',\n\t);\n\n\tadd_theme_support( 'custom-header', $args );\n}", "function id_custom_header_setup() {\r\n\tadd_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(\r\n\t\t'default-image' => get_stylesheet_directory_uri().'/assets/images/header.jpg',\r\n\t\t'width' => 2000,\r\n\t\t'height' => 300,\r\n\t\t'flex-height' => true,\r\n\t\t'video' => true,\r\n\t\t'wp-head-callback' => 'twentyseventeen_header_style',\r\n\t) ) );\r\n\tregister_default_headers( array(\r\n\t\t'default-image' => array(\r\n\t\t\t'url' => '%s/assets/images/header.jpg',\r\n\t\t\t'thumbnail_url' => '%s/assets/images/header.jpg',\r\n\t\t\t'description' => __( 'Default Header Image', 'twentyseventeen' ),\r\n\t\t),\r\n\t) );\r\n}", "function materialdesign_custom_header_setup() {\n\tadd_theme_support( 'custom-header', apply_filters( 'materialdesign_custom_header_args', array(\n\t\t'default-image' => '',\n\t\t'default-text-color' => 'ffffff',\n\t\t'width' => 1600,\n\t\t'height' => 250,\n\t\t'flex-height' => true,\n\t\t'wp-head-callback' => 'materialdesign_header_style',\n\t\t'admin-head-callback' => 'materialdesign_admin_header_style',\n\t\t'admin-preview-callback' => 'materialdesign_admin_header_image',\n\t) ) );\n}", "function get_custom_header()\n{\n}", "function twentythirteen_custom_header_setup() {\r\n\t$args = array(\r\n\t\t// Text color and image (empty to use none).\r\n\t\t'default-text-color' => '220e10',\r\n\t\t'default-image' => '%s/images/headers/circle.png',\r\n\r\n\t\t// Set height and width, with a maximum value for the width.\r\n\t\t'height' => 150,\r\n\t\t'width' => 1600,\r\n\r\n\t\t// Callbacks for styling the header and the admin preview.\r\n\t\t'wp-head-callback' => 'twentythirteen_header_style',\r\n\t\t'admin-head-callback' => 'twentythirteen_admin_header_style',\r\n\t\t'admin-preview-callback' => 'twentythirteen_admin_header_image',\r\n\t);\r\n\r\n\tadd_theme_support( 'custom-header', $args );\r\n\r\n\t/*\r\n\t * Default custom headers packaged with the theme.\r\n\t * %s is a placeholder for the theme template directory URI.\r\n\t */\r\n\tregister_default_headers( array(\r\n\t\t'circle' => array(\r\n\t\t\t'url' => '%s/images/headers/circle.png',\r\n\t\t\t'thumbnail_url' => '%s/images/headers/circle-thumbnail.png',\r\n\t\t\t'description' => _x( 'Circle', 'header image description', 'twentythirteen' )\r\n\t\t),\r\n\t\t'diamond' => array(\r\n\t\t\t'url' => '%s/images/headers/diamond.png',\r\n\t\t\t'thumbnail_url' => '%s/images/headers/diamond-thumbnail.png',\r\n\t\t\t'description' => _x( 'Diamond', 'header image description', 'twentythirteen' )\r\n\t\t),\r\n\t\t'star' => array(\r\n\t\t\t'url' => '%s/images/headers/star.png',\r\n\t\t\t'thumbnail_url' => '%s/images/headers/star-thumbnail.png',\r\n\t\t\t'description' => _x( 'Star', 'header image description', 'twentythirteen' )\r\n\t\t),\r\n\t) );\r\n}", "function custom_theme_header() {\r\n\r\n\t// Add theme support for Custom Header\r\n\t$header_args = array(\r\n\t\t'default-image' => get_template_directory_uri() . '/images/default_header.jpg',\r\n\t\t'width' => 1170,\r\n\t\t'height' => 350,\r\n\t\t'flex-width' => false,\r\n\t\t'flex-height' => false,\r\n\t\t'random-default' => false,\r\n\t\t'header-text' => false,\r\n\t\t'default-text-color' => '',\r\n\t\t'uploads' => true,\r\n\t\t'wp-head-callback' => '',\r\n\t\t'admin-head-callback' => '',\r\n\t\t'admin-preview-callback' => '',\r\n\t);\r\n\tadd_theme_support( 'custom-header', $header_args );\r\n}", "function ubersmake_custom_header_setup() {\n $args = array(\n 'default-image' => '%2$s/images/headers/atrium.jpg',\n 'default-text-color' => '000',\n 'width' => apply_filters('pilcrow_header_image_width', 990),\n 'height' => apply_filters('pilcrow_header_image_height', 257),\n 'wp-head-callback' => 'pilcrow_header_style',\n 'admin-head-callback' => 'pilcrow_admin_header_style',\n 'admin-preview-callback' => 'pilcrow_admin_header_image',\n );\n\n $options = pilcrow_get_theme_options();\n \n if (in_array($options['theme_layout'], array('content-sidebar', 'sidebar-content'))) {\n $args['width'] = apply_filters('pilcrow_header_image_width', 770);\n $args['height'] = apply_filters('pilcrow_header_image_height', 200);\n }\n\n add_theme_support('custom-header', apply_filters('pilcrow_custom_header_args', $args));\n\n set_post_thumbnail_size(get_custom_header()->width, get_custom_header()->height, true);\n\n register_default_headers(array(\n 'atrium' => array(\n 'url' => '%2$s/images/headers/atrium.jpg',\n 'thumbnail_url' => '%2$s/images/headers/atrium-thumbnail.jpg',\n 'description' => _x('Atrium', 'Header image description', 'ubersmake'),\n 'source' => 'https://www.flickr.com/photos/ubersmake/14967126893/'\n ),\n 'cafe' => array(\n 'url' => '%2$s/images/headers/cafe.jpg',\n 'thumbnail_url' => '%2$s/images/headers/cafe-thumbnail.jpg',\n 'description' => _x('Cafe', 'Header image description', 'ubersmake'),\n 'source' => 'https://www.flickr.com/photos/ubersmake/15836437415/'\n ),\n 'causeway' => array(\n 'url' => '%2$s/images/headers/causeway.jpg',\n 'thumbnail_url' => '%2$s/images/headers/causeway-thumbnail.jpg',\n 'description' => _x('Causeway', 'Header image description', 'ubersmake'),\n 'source' => 'https://www.flickr.com/photos/ubersmake/14975660961/'\n ),\n 'edinburgh' => array(\n 'url' => '%2$s/images/headers/edinburgh.jpg',\n 'thumbnail_url' => '%2$s/images/headers/edinburgh-thumbnail.jpg',\n 'description' => _x('edinburgh', 'Header image description', 'ubersmake'),\n 'source' => 'https://www.flickr.com/photos/ubersmake/15062454096/'\n ),\n 'paris' => array(\n 'url' => '%2$s/images/headers/paris.jpg',\n 'thumbnail_url' => '%2$s/images/headers/paris-thumbnail.jpg',\n 'description' => _x('Paris', 'Header image description', 'ubersmake'),\n 'source' => 'https://www.flickr.com/photos/ubersmake/15174505258/'\n ),\n ));\n}", "function themename_custom_header_and_background()\n{\n $default_text_color = \"000000\";\n\n /**\n * Filter the arguments used when adding 'custom-background' support in scm beautiful.\n *\n * @since scm beautiful 1.0\n *\n * @param array $args {\n * An array of custom-background support arguments.\n *\n * @type string $default-color Default color of the background.\n * }\n */\n // add_theme_support('custom-background', apply_filters('themename_custom_background_args', array(\n // 'default-color' => $default_body_background_color,\n // 'default-image' => $GLOBALS['bg_image_path'],\n // 'wp-head-callback' => 'scm_beautiful_style',\n // 'admin-preview-callback' => 'scm_beautiful_admin_background_image',\n // )));\n\n /**\n * Filter the arguments used when adding 'custom-header' support in scm beautiful.\n *\n * @since scm beautiful 1.0\n *\n * @param array $args {\n * An array of custom-header support arguments.\n *\n * @type string $default-text-color Default color of the header text.\n * @type int $width Width in pixels of the custom header image. Default 1200.\n * @type int $height Height in pixels of the custom header image. Default 280.\n * @type bool $flex-height Whether to allow flexible-height header images. Default true.\n * @type callable $wp-head-callback Callback function used to style the header image and text\n * displayed on the blog.\n * }\n */\n add_theme_support('custom-header', apply_filters('themename_custom_header_args', array(\n 'default-image' => '',\n 'default-text-color' => $default_text_color,\n 'flex-height' => true,\n 'flex-width' => true,\n 'uploads' => true,\n 'wp-head-callback' => 'scm_beautiful_style',\n 'admin-head-callback' => 'scm_beautiful_admin_header_style',\n 'admin-preview-callback' => 'scm_beautiful_admin_header_image',\n )));\n}", "function my_function(){\n laod_theme_textdomain();\n add_theme_support('title-tag');\n add_theme_support('post-thumbnail');\n add_theme_support('custom-header', array(\n 'default-text-color' => '#c0000', // get_header_textcolor();\n 'header-text' => true // if(!display_header_text()){ echo \"display: none;\"; }\n 'width' => '1200',\n 'height' => '500',\n 'flex-heitht' => false,\n 'flex-width' => false\n )); // header_image();\n add_theme_support('custom-logo', array(\n 'width' => '100',\n 'height' => '100'\n )); // the_custom_logo();\n add_theme_support('custom-background');\n }", "public function register() {\n\t\t// Filter must be added as soon as possible since once wp_get_themes() is called, the results are cached.\n\t\tadd_filter( 'extra_theme_headers', [ $this, 'filter_extra_headers' ] );\n\t}", "function versluis2013_add_headers () {\n\t\n\t// this array contains my own header images\n\t// %s is a placeholder for the parent theme's directory\n\t// %2$s is the same for the child theme's directory\n\tregister_default_headers( array(\n\t\t'header1' => array(\n\t\t\t'url' => '%2$s/headers/header_1.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_1.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 1', 'twentythirteen' )\n\t\t),\n\t\t'header2' => array(\n\t\t\t'url' => '%2$s/headers/header_2.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_2.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 2', 'twentythirteen' )\n\t\t),\n\t\t'header3' => array(\n\t\t\t'url' => '%2$s/headers/header_3.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_3.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 3', 'twentythirteen' )\n\t\t),\n\t\t'header4' => array(\n\t\t\t'url' => '%2$s/headers/header_4.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_4.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 4', 'twentythirteen' )\n\t\t),\n\t\t'header5' => array(\n\t\t\t'url' => '%2$s/headers/header_5.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_5.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 5', 'twentythirteen' )\n\t\t),\n\t\t'header6' => array(\n\t\t\t'url' => '%2$s/headers/header_6.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_6.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 6', 'twentythirteen' )\n\t\t),\n\t\t'header7' => array(\n\t\t\t'url' => '%2$s/headers/header_7.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_7.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 7', 'twentythirteen' )\n\t\t),\n\t\t'header8' => array(\n\t\t\t'url' => '%2$s/headers/header_8.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_8.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 8', 'twentythirteen' )\n\t\t),\n\t\t'header9' => array(\n\t\t\t'url' => '%2$s/headers/header_9.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_9.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 9', 'twentythirteen' )\n\t\t),\n\t\t'header10' => array(\n\t\t\t'url' => '%2$s/headers/header_10.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_10.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 10', 'twentythirteen' )\n\t\t),\n\t\t'header11' => array(\n\t\t\t'url' => '%2$s/headers/header_11.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_11.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 11', 'twentythirteen' )\n\t\t),\n\t\t'header12' => array(\n\t\t\t'url' => '%2$s/headers/header_12.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_12.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 12', 'twentythirteen' )\n\t\t),\n\t\t'header13' => array(\n\t\t\t'url' => '%2$s/headers/header_13.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_13.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 13', 'twentythirteen' )\n\t\t),\n\t\t'header14' => array(\n\t\t\t'url' => '%2$s/headers/header_14.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_14.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 14', 'twentythirteen' )\n\t\t),\n\t\t'header15' => array(\n\t\t\t'url' => '%2$s/headers/header_15.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_15.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 15', 'twentythirteen' )\n\t\t),\n\t\t'header16' => array(\n\t\t\t'url' => '%2$s/headers/header_16.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_16.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 16', 'twentythirteen' )\n\t\t),\n\t\t'header17' => array(\n\t\t\t'url' => '%2$s/headers/header_17.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_17.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 17', 'twentythirteen' )\n\t\t),\n\t\t'header18' => array(\n\t\t\t'url' => '%2$s/headers/header_18.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_18.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 18', 'twentythirteen' )\n\t\t),\n\t\t'header19' => array(\n\t\t\t'url' => '%2$s/headers/header_19.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_19.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 19', 'twentythirteen' )\n\t\t),\n\t\t'header20' => array(\n\t\t\t'url' => '%2$s/headers/header_20.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_20.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 20', 'twentythirteen' )\n\t\t),\n\t\t'header21' => array(\n\t\t\t'url' => '%2$s/headers/header_21.jpg',\n\t\t\t'thumbnail_url' => '%2$s/headers/header_21.jpg',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Header 21', 'twentythirteen' )\n\t\t)\n\t\t)); // end of array\n}", "function twentyfifteen_xili_setup_custom_header () {\n\t// http://michel-i5-imac.local:8888/wp_svn41/wp-content/themes/twentyfifteen-xili/images/headers/header-en-thumbnail.jpg\n\n\tregister_default_headers( array(\n\t\t'xili2015' => array(\n\n\t\t\t'url'\t\t\t=> '%2$s/images/headers/header-en.jpg',\n\t\t\t'thumbnail_url' => '%2$s/images/headers/header-en-thumbnail.jpg',\n\t\t\t/* translators: added in child functions by xili */\n\t\t\t'description'\t=> _x( '2015 by xili', 'header image description', 'twentyfifteen' )\n\t\t\t),\n\t\t'xili2015-2' => array(\n\n\t\t\t'url'\t\t\t=> '%2$s/images/headers/header-fr.jpg',\n\t\t\t'thumbnail_url' => '%2$s/images/headers/header-fr-thumbnail.jpg',\n\t\t\t/* translators: added in child functions by xili */\n\t\t\t'description'\t=> _x( '2015.2 by xili', 'header image description', 'twentyfifteen' )\n\t\t\t)\n\t\t)\n\t);\n\n\t$args = array(\n\t\t// Text color and image (empty to use none).\n\t\t'default-text-color'\t=> '000000', // diff of parent\n\t\t'default-image'\t\t\t=> '%2$s/images/headers/header-en.jpg',\n\n\t\t// Set height and width, with a maximum value for the width.\n\t\t'height'\t\t\t\t=> 1300,\n\t\t'width'\t\t\t\t\t=> 954,\n\n\t\t// Callbacks for styling the header and the admin preview.\n\t\t'wp-head-callback'\t\t\t=> 'twentyfifteen_header_style',\n\t\t'admin-head-callback'\t\t=> 'twentyfifteen_admin_header_style',\n\t\t'admin-preview-callback'\t=> 'twentyfifteen_admin_header_image',\n\t);\n\n\tadd_theme_support( 'custom-header', $args ); // need 8 in add_action to overhide parent\n\n}", "function w4ptheme_custom_header_wp_head() {\n\n\tif ( ! display_header_text() ) {\n\t\treturn;\n\t}\n\n\t$hex = get_header_textcolor();\n\n\tif ( ! $hex ) {\n\t\treturn;\n\t}\n\n\t$style = \"body.custom-header #site-title a { color: #{$hex}; }\";\n\n\techo \"\\n\" . '<style type=\"text/css\" id=\"custom-header-css\">' . esc_html( trim( $style ) ) . '</style>' . \"\\n\";\n}", "function the_custom_header_markup()\n{\n}", "function twentytwentyone_xilidev_setup_custom_header() {\n\n\t// %2$s = in child.\n\tregister_default_headers(\n\t\tarray(\n\t\t\t'xili2021' => array(\n\t\t\t\t'url' => '%2$s/assets/images/headers/xili2021-h1.jpg',\n\t\t\t\t'thumbnail_url' => '%2$s/assets/images/headers/xili2021-h1-thumb.jpg',\n\t\t\t\t/* translators: added in child functions by xili */\n\t\t\t\t'description' => _x( '2021 by xili', 'header image description', 'twentytwentyone' ),\n\t\t\t),\n\t\t\t'xili2021-2' => array(\n\t\t\t\t'url' => '%2$s/assets/images/headers/xili2021-h2.jpg',\n\t\t\t\t'thumbnail_url' => '%2$s/assets/images/headers/xili2021-h2-thumb.jpg',\n\t\t\t\t/* translators: added in child functions by xili */\n\t\t\t\t'description' => _x( '2021.2 by xili', 'header image description', 'twentytwentyone' ),\n\t\t\t),\n\t\t)\n\t);\n\n\t$args = array(\n\t\t// Text color and image (empty to use none).\n\t\t'default-text-color' => 'fffff0', // diff of parent .\n\t\t'default-image' => '%2$s/assets/images/headers/xili2021-h1.jpg',\n\n\t\t// Set height and width, with a maximum value for the width.\n\t\t'height' => 280,\n\t\t'width' => 1200,\n\t);\n\n\tadd_theme_support( 'custom-header', $args ); // need 8 in add_action to overhide parent .\n\n}", "function appthemes_header() {\n\t/**\n\t * Runs in the header.php and loads in the theme header code found in /includes/theme-header.php.\n\t */\n\tdo_action( 'appthemes_header' );\n}", "function respHeader_load_before_customizer() {\n\t$headerSize = get_theme_support( 'custom-header' );\n\t// set header img width\n\tif(!cs_get_mods( 'respheader_width' ) ) {\n\t\tset_theme_mod( 'respheader_width', $headerSize[0]['width'] );\n\t}\n\t// set header img height\n\tif(!cs_get_mods( 'respheader_height' ) ) {\n\t\tset_theme_mod( 'respheader_height', $headerSize[0]['height'] );\n\t}\n\n}", "private function scipio_customize_header($wp_customize) {\n\n /**\n * Section\n */\n $wp_customize->add_section('scipio-header-section', array(\n 'title' => 'Scipio Header',\n 'priority' => 2,\n 'description' => esc_html__('Edit website header', 'scipio')\n ));\n\n /**\n * Settings\n */\n\n //Default option\n $wp_customize->add_setting('scipio-header-settings', array(\n 'default' => 'align-center',\n ));\n\n // Align center\n\n\n /**\n * Controls\n */\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'scipio-header-control', array(\n 'label' => 'Scipio Header Customization',\n 'section' => 'scipio-header-section',\n 'settings' => 'scipio-header-settings',\n 'type' => 'select',\n 'choices' => array(\n 'align-center' => 'Align Center',\n 'align-right' => 'Align Right',\n 'align-left' => 'Align Left'\n )\n\n )));\n\n\n\n /**\n * Social Links Panel\n * Section, Settings & Control\n */\n\n $wp_customize->add_section('scipio-header-socials', array(\n 'title' => 'Social Links',\n 'priority' => 3,\n 'description' => esc_html__('Edit your social links', 'scipio'),\n ));\n\n /**\n * Settings\n */\n $wp_customize->add_setting('facebook-settings', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'sanitize_custom_url')\n ));\n $wp_customize->add_setting('instagram-settings', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'sanitize_custom_url')\n ));\n $wp_customize->add_setting('youtube-settings', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'sanitize_custom_url')\n ));\n $wp_customize->add_setting('twitter-settings', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'sanitize_custom_url')\n ));\n $wp_customize->add_setting('linkedin-settings', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'sanitize_custom_url')\n ));\n\n\n /**\n * Controls\n */\n $this->scipio_social_control($wp_customize, 'facebook-settings', 'scipio-facebook-control', 'Facebook');\n $this->scipio_social_control($wp_customize, 'instagram-settings', 'scipio-instagram-control', 'Instagram');\n $this->scipio_social_control($wp_customize, 'youtube-settings', 'scipio-youtube-control', 'You Tube');\n $this->scipio_social_control($wp_customize, 'twitter-settings', 'scipio-twitter-control', 'Twitter');\n $this->scipio_social_control($wp_customize, 'linkedin-settings', 'scipio-linkedin-control', 'LinkedIn');\n }", "public function customize_register( $wp_customize ) {\n\t\t$section = 'troc_header_section';\n\t\t$wp_customize->add_section( $section, array(\n\t\t\t'title' => esc_html__( 'Transparent Header', 'transparent-ocean' ),\n\t\t\t'panel' => 'troc_panel',\n\t\t\t'priority' => 20,\n\t\t) );\n\n\t\t/* -------------------------------------------------------------------------\n\t\t * Sticky Header Heading\n\t\t * ---------------------------------------------------------------------- */\n\n\t\t$wp_customize->add_setting( 'troc_header_sticky_heading', array(\n\t\t\t'sanitize_callback' => 'wp_kses',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Heading_Control( $wp_customize, 'troc_header_sticky_heading', array(\n\t\t\t'label' => esc_html__( 'Sticky header behavior', 'transparent-ocean' ),\n\t\t\t'section' => 'osh_section',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t// Sticky header style\n\t\t$wp_customize->add_setting( 'troc_header_sticky_inherit', array(\n\t\t\t'default' => 'ocean',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Buttonset_Control( $wp_customize, 'troc_header_sticky_inherit', array(\n\t\t\t'label' => esc_html__( 'Sticky Header Default Colors', 'transparent-ocean' ),\n\t\t\t'section' => 'osh_section',\n\t\t\t'settings' => 'troc_header_sticky_inherit',\n\t\t\t'priority' => 10,\n\t\t\t'choices' => array(\n\t\t\t\t'ocean' => esc_html__( 'OceanWP', 'oceanwp' ),\n\t\t\t\t'troc' => esc_html__( 'Transparent', 'transparent-ocean' ),\n\t\t\t),\n\t\t) ) );\n\n\t\t// Sticky Logo Color\n\t\t$wp_customize->add_setting( 'troc_header_sticky_logo_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_sticky_logo_color', array(\n\t\t\t'label' => esc_html__( 'Sticky Logo Color', 'transparent-ocean' ),\n\t\t\t'section' => 'osh_section',\n\t\t\t'settings' => 'troc_header_sticky_logo_color',\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_hasnt_custom_logo',\n\t\t) ) );\n\n\t\t// Sticky Logo Hover Color\n\t\t$wp_customize->add_setting( 'troc_header_sticky_logo_hover_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_sticky_logo_hover_color', array(\n\t\t\t'label' => esc_html__( 'Sticky Logo Color: Hover', 'transparent-ocean' ),\n\t\t\t'section' => 'osh_section',\n\t\t\t'settings' => 'troc_header_sticky_logo_hover_color',\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_hasnt_custom_logo',\n\t\t) ) );\n\n\t\t/* -------------------------------------------------------------------------\n\t\t * Logo Heading\n\t\t * ---------------------------------------------------------------------- */\n\n\t\t$wp_customize->add_setting( 'troc_header_logo_heading', array(\n\t\t\t'sanitize_callback' => 'wp_kses',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Heading_Control( $wp_customize, 'troc_header_logo_heading', array(\n\t\t\t'label' => esc_html__( 'Logo', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t// Transparent Logo\n\t\t$wp_customize->add_setting( 'troc_header_custom_logo', array(\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => array( Common::instance(), 'sanitize_image' ),\n\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'troc_header_custom_logo', array(\n\t\t\t'label' => esc_html__( 'Transparent Logo', 'transparent-ocean' ),\n\t\t\t'description' => esc_html__( 'If you want to display a different logo on a transparent header', 'transparent-ocean' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_custom_logo',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t// Transparent Retina Logo\n\t\t$wp_customize->add_setting( 'troc_header_retina_logo', array(\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => array( Common::instance(), 'sanitize_image' ),\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'troc_header_retina_logo', array(\n\t\t\t'label' => esc_html__( 'Transparent Retina Logo', 'ocean-sticky-header' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_retina_logo',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t// Logo Color\n\t\t$wp_customize->add_setting( 'troc_header_logo_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_logo_color', array(\n\t\t\t'label' => esc_html__( 'Logo Color', 'transparent-ocean' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_logo_color',\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_hasnt_custom_logo',\n\t\t) ) );\n\n\t\t// Logo Hover Color\n\t\t$wp_customize->add_setting( 'troc_header_logo_hover_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_logo_hover_color', array(\n\t\t\t'label' => esc_html__( 'Logo Color: Hover', 'transparent-ocean' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_logo_hover_color',\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_hasnt_custom_logo',\n\t\t) ) );\n\n\t\t// Move OceanWP transparent background setting\n\t\t//\t$wp_customize->get_control( 'ocean_transparent_header_heading' )->section = $section;\n\t\t//\t$wp_customize->get_control( 'ocean_transparent_header_bg' )->section = $section;\n\n\t\t/* -------------------------------------------------------------------------\n\t\t * Menu Heading\n\t\t * ---------------------------------------------------------------------- */\n\n\t\t$wp_customize->add_setting( 'troc_header_menu_heading', array(\n\t\t\t'sanitize_callback' => 'wp_kses',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Heading_Control( $wp_customize, 'troc_header_menu_heading', array(\n\t\t\t'label' => esc_html__( 'Menu', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/**\n\t\t * Menu Link Color\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_link_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_link_color', array(\n\t\t\t'label' => esc_html__( 'Link Color', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_link_color',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/**\n\t\t * Menu Link Color Hover\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_link_color_hover', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_link_color_hover', array(\n\t\t\t'label' => esc_html__( 'Link Color: Hover', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_link_color_hover',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/**\n\t\t * Menu Link Active Color\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_link_color_active', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_link_color_active', array(\n\t\t\t'label' => esc_html__( 'Link Color: Current Menu Item', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_link_color_active',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/**\n\t\t * Menu Link Background Color\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_link_background', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_link_background', array(\n\t\t\t'label' => esc_html__( 'Link Background', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_link_background',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/**\n\t\t * Menu Link Hover Background Color\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_link_hover_background', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_link_hover_background', array(\n\t\t\t'label' => esc_html__( 'Link Background: Hover', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_link_hover_background',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/**\n\t\t * Menu Link Background Current Menu Item\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_link_active_background', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_link_active_background', array(\n\t\t\t'label' => esc_html__( 'Link Background: Current Menu Item', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_link_active_background',\n\t\t\t'priority' => 10,\n\t\t) ) );\n\n\t\t/* -------------------------------------------------------------------------\n\t\t * Social Menu Heading\n\t\t * ---------------------------------------------------------------------- */\n\n\t\t$wp_customize->add_setting( 'troc_header_social_heading', array(\n\t\t\t'sanitize_callback' => 'wp_kses',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Heading_Control( $wp_customize, 'troc_header_social_heading', array(\n\t\t\t'label' => esc_html__( 'Social Menu', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_has_menu_social_and_simple_style',\n\t\t) ) );\n\n\t\t/**\n\t\t * Social Menu Link Color\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_social_links_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_social_links_color', array(\n\t\t\t'label' => esc_html__( 'Social: Color', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_social_links_color',\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_has_menu_social_and_simple_style',\n\t\t) ) );\n\n\t\t/**\n\t\t * Social Menu Link Hover Color\n\t\t */\n\t\t$wp_customize->add_setting( 'troc_header_menu_social_hover_links_color', array(\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'oceanwp_sanitize_color',\n\t\t) );\n\t\t$wp_customize->add_control( new OceanWP_Customizer_Color_Control( $wp_customize, 'troc_header_menu_social_hover_links_color', array(\n\t\t\t'label' => esc_html__( 'Social Hover: Color', 'oceanwp' ),\n\t\t\t'section' => $section,\n\t\t\t'settings' => 'troc_header_menu_social_hover_links_color',\n\t\t\t'priority' => 10,\n\t\t\t'active_callback' => 'oceanwp_cac_has_menu_social_and_simple_style',\n\t\t) ) );\n\t}", "function wpex_page_header() {\n global $wpex_theme;\n if ( $wpex_theme->has_page_header ) {\n get_template_part( 'partials/page-header' );\n }\n}", "function has_custom_header()\n{\n}", "function _hrb_customize_header_nav( $wp_customize ) {\n\tglobal $hrb_options;\n\n\t// Support for legacy header nav. Prior to 1.4.0.\n\t// Moved widget default content to index.php page content.\n\t// No longer need widget and these options.\n\tif ( ! is_active_sidebar( 'hrb-header-nav' ) ) {\n\t\treturn;\n\t}\n\n\t$wp_customize->add_section( 'hrb_header', array(\n\t\t'title' => __( 'Header', APP_TD ),\n\t\t'description' => __( 'Control the visibility of the optional custom header.', APP_TD ),\n\t\t'priority' => 30,\n\t));\n\n\t$wp_customize->add_setting( 'hrb_options[custom_header_vis]', array(\n\t\t'title' => '',\n\t\t'default' => 'yes',\n\t\t'type' => 'option',\n\t));\n\n\t$wp_customize->add_control( 'hrb_extra_header', array(\n\t\t'label' => __( 'Display Custom Header', APP_TD ),\n\t\t'section' => 'hrb_header',\n\t\t'settings' => 'hrb_options[custom_header_vis]',\n\t\t'type' => 'radio',\n\t\t'choices' => array(\n\t\t\t'front' => __( 'Front Page Only', APP_TD ),\n\t\t\t'any' => __( 'Always', APP_TD ),\n\t\t\t'disable' => __( 'Disable', APP_TD ),\n\t\t),\n\t) );\n}", "function get_custom_header_markup()\n{\n}", "function hook_after_setup_theme() {\n\t\t$this->domain();\n\t\t//remove_action( 'wp_head', 'rsd_link' );\n\t\t//remove_action( 'wp_head', 'wlwmanifest_link' );\n\t\t\n\t\tdefine( 'HEADER_IMAGE', '%s/includes/images/header.jpg' );\n\t\tdefine( 'HEADER_TEXTCOLOR', '333' );\n\t\tdefine( 'HEADER_IMAGE_WIDTH', $this->option( 'header_w' ) );\n\t\tdefine( 'HEADER_IMAGE_HEIGHT', $this->option( 'header_h' ) );\n\t\t\n\t\tset_post_thumbnail_size( $this->option( 'post_w' ), $this->option( 'post_h' ), true );\n\t\t\n\t\tadd_editor_style( 'style-editor.css' );\n\t\tadd_theme_support( 'nav-menus' );\n\t\tadd_theme_support( 'post-thumbnails' );\n\t\tadd_theme_support( 'automatic-feed-links' );\n\t\tadd_custom_background( array( &$this, 'custom_background' ) );\n\t\tadd_custom_image_header( array( &$this, 'custom_header' ), array( &$this, 'admin_custom_header' ) );\n\t\tregister_nav_menus( array(\n\t\t\t'navbar' => __( 'Navbar', 'inkblot' )\n\t\t) );\n\t\t\n\t\tregister_default_headers( array (\n\t\t\t'default' => array (\n\t\t\t\t'url' => '%s/includes/images/headers/header.png',\n\t\t\t\t'thumbnail_url' => '%s/includes/images/headers/thumbs/header.png',\n\t\t\t\t'description' => ucwords( str_replace( '_', ' ', $this->name ) )\n\t\t\t)\n\t\t) );\n\t}", "function custom_respheader( $wp_customize ) {\n\t$textdomain = get_stylesheet();\n\t/**\n\t * Remove default header control \n\t */\n\t$wp_customize->remove_control('header_image');\n\t/**\n\t * \n\t * Add custom control\n\t * @see class resp_Header_Image_Control\n\t */\n\t$wp_customize->add_control( new resp_Header_Image_Control( $wp_customize, 'header_image', array(\n\t\t\t'section' => 'header_image',\n\t\t\t'settings' => 'header_image'\n\t\t\t)\n\t\t) \n\t);\n\n\t/**\n\t * respHeader custom size\n\t * width\n\t */\n\t$headerSize = get_theme_support( 'custom-header' );\n\n\t$wp_customize->add_setting( 'respheader_width', array(\n\t\t'default' => $headerSize[0]['width'],\n\t\t'section'\t\t\t=> 'header_image',\n\t\t'sanitize_callback' => 'respH_custom_width_validate',\n\t\t'sanitize_js_callback' => 'respH_custom_width_js_validate'\n\t\t)\n\t);\n\t$wp_customize->add_control( 'respheader_width', array(\n\t\t'label' => sprintf( __( 'Header image width, in px', '%s'), $textdomain ),\n\t\t'section' => 'header_image',\n\t\t'type' => 'text'\n\t\t)\n\t);\n\t// height\n\t$wp_customize->add_setting( 'respheader_height', array(\n\t\t'default' => $headerSize[0]['height'],\n\t\t'section'\t\t\t=> 'header_image',\n\t\t'sanitize_callback' => 'respH_custom_height_validate',\n\t\t'sanitize_js_callback' => 'respH_custom_height_js_validate'\n\t\t)\n\t);\n\t$wp_customize->add_control( 'respheader_height', array(\n\t\t'label' => sprintf( __( 'Header image height, in px', '%s'), $textdomain ),\n\t\t'section' => 'header_image',\n\t\t'type' => 'text'\n\t\t)\n\t);\n}", "function wpex_header() {\n \n // Get global object\n global $wpex_theme;\n\n // Get header template file if enabled\n if ( $wpex_theme->has_site_header ) {\n get_template_part( 'partials/header/header', 'layout' );\n }\n\n}", "function tutsplus_customize_register_sections( $wp_customize ) {\n\n\t// add the section for header design\n\t$wp_customize->add_section( 'tutsplus_header' , array(\n\t\t'title' => __( 'Site Header', 'tutsplus' ),\n\t) );\n\t\n\t// add the section for layout\n\t$wp_customize->add_section( 'tutsplus_layout' , array(\n\t\t'title' => __( 'Site Layout', 'tutsplus' ),\n\t) );\n\t\n\t// add the section for layout\n\t$wp_customize->add_section( 'tutsplus_colorscheme' , array(\n\t\t'title' => __( 'Color Scheme', 'tutsplus' ),\n\t) );\n\n}", "function appthemes_before_header() {\n\t/**\n\t * Runs in the header.php after the opening div tag and before the main\n\t * header section is called at the top of the theme.\n\t */\n\tdo_action( 'appthemes_before_header' );\n}", "public function run(){\n\t\tif ( ! current_theme_supports( 'custom-header' ) )\n\t\t\t$this->add_theme_support_custom_header();\n\n\t\t// register our custom settings\n\t\tadd_action( 'customize_register', array( $this, 'register' ) );\n\n\t\t// Scripts for Preview\n\t\tadd_action( 'customize_preview_init', array( $this, 'preview_js' ) );\n\n\t\t// call Rain_Effect_Loader::apply_effect() if is rain\n\t\tadd_action( 'customize_preview_init', array( $this, 'loader_apply_effect' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'loader_apply_effect' ) );\n\n\t\t// filter header image tag\n\t\tadd_filter( 'get_header_image_tag', array( $this, 'filter_header_image_tag' ), 10, 3 );\n\n\t\t// add footer image to wp footer\n\t\tadd_action( 'wp_footer', array( $this, 'hook_footer_image' ) );\n\n\t}", "function theme_features()\n{\n register_nav_menu('headerMenuLocation', 'Header Menu Location');\n register_nav_menu('footerMenu', 'Footer Menu');\n}", "function hopeareunus_theme_meta_box_header() { ?>\n\n\t<table class=\"form-table\">\n\n\t\t<!-- Logo -->\n\t\t<tr>\n\t\t\t<th>\n\t\t\t\t<label for=\"<?php echo hybrid_settings_field_id( 'hopeareunus_custom_header' ); ?>\"><?php _e( 'Custom Header:', 'hopeareunus' ); ?></label>\n\t\t\t</th>\n\t\t\t<td>\n\t\t\t\t<p><?php printf( __( 'Want to replace or remove default Header? <a href=\"%s\">Go to Appearance &gt;&gt; Header</a>. ', 'hopeareunus' ), admin_url( 'themes.php?page=custom-header' ) ); ?></p>\n\t\t\t\t<p><?php _e( 'Note! You can overwrite default header image in singular post/page by setting large enough featured image. Feature header size is 1920 x 379 pixels.', 'hopeareunus' ); ?></p>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<!-- End custom form elements. -->\n\t</table><!-- .form-table --><?php\n\t\n}", "function theme_setup() {\r\n\tregister_nav_menu( 'standard','Hauptmenü' );\r\n\tregister_nav_menu( 'siteservice','Siteservice' );\r\n\tregister_nav_menu( 'footer-menu','Footer Links');\r\n\r\n\tif ( ! isset( $content_width ) )\r\n\t\t$content_width = 500;\r\n\t\r\n\t// Setup for dynamic header image\r\n\tdefine('NO_HEADER_TEXT', true );\r\n\tdefine('HEADER_TEXTCOLOR', '');\r\n\tdefine('HEADER_IMAGE', '%s/images/hintergrundoben.png'); // %s is the template dir uri\r\n\tdefine('HEADER_IMAGE_WIDTH', 964); // use width and height appropriate for your theme\r\n\tdefine('HEADER_IMAGE_HEIGHT', 130);\r\n\r\n\tadd_custom_image_header('header_style', 'admin_header_style');\r\n\r\n\r\n}", "function wp_admin_headers()\n{\n}", "public static function customize_register( $wp_customize ) {\n\t\t$wp_customize->add_section( 'title_tagline', array(\n\n\t\t\t'title'\t\t\t\t=> esc_html__( 'Site title & tagline', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 10,\n\n\t\t) );\n\n\t\t// Remove\n\t\t//$wp_customize->remove_control( 'display_header_text' );\n\n\t\t// Transport\n\t\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\n\n\n\n\t\t// Logo & favicon\n\t\t$wp_customize->add_section( 'logo_favicon', array(\n\n\t\t\t'title'\t\t\t\t=> esc_html__( 'Logo & favicon', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 20,\n\n\t\t) );\n\n\t\t\t// Custom logo\n\t\t\t$wp_customize->add_setting( 'logo', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Logo', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'logo_favicon',\n\t\t\t\t'settings'\t\t\t=> 'logo',\n\t\t\t\t'type'\t\t\t\t=> 'image',\n\n\t\t\t) ) );\n\n\t\t\t// Custom logo (retina)\n\t\t\t$wp_customize->add_setting( 'logo_retina', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo_retina', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Logo (Retina)', 'worx' ),\n\t\t\t\t'description'\t\t=> __( 'If your logo is called logo.png make sure your retina logo is called logo@2x.png.', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'logo_favicon',\n\t\t\t\t'settings'\t\t\t=> 'logo_retina',\n\t\t\t\t'type'\t\t\t\t=> 'image',\n\n\t\t\t) ) );\n\n\t\t\t// Custom favicon\n\t\t\t$wp_customize->add_setting( 'favicon', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'sanitize_callback' => 'esc_url_raw',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'favicon', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Favicon', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'logo_favicon',\n\t\t\t\t'settings'\t\t\t=> 'favicon',\n\t\t\t\t'type'\t\t\t\t=> 'image',\n\n\t\t\t) ) );\n\n\n\n\n\t\t// Static front page\n\t\t$wp_customize->add_section( 'static_front_page', array(\n\n\t\t\t'title'\t\t\t\t=> __( 'Static front page', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 30,\n\n\t\t) );\n\n\n\n\n\t\t// Navigation\n\t\t$wp_customize->add_section( 'nav', array(\n\n\t\t\t'title'\t\t\t\t=> __( 'Navigation', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 40,\n\n\t\t) );\n\n\n\n\n\t\t// Custom styles\n\t\t$wp_customize->add_section( 'colors', array(\n\n\t\t\t'title'\t\t\t\t=> esc_html__( 'Colors', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 60,\n\n\t\t) );\n\n\t\t\t// Accent\n\t\t\t$wp_customize->add_setting( 'accent', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['accent'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'accent', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Accent', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'accent',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Footer Background\n\t\t\t$wp_customize->add_setting( 'footer_background', array(\n\t\n\t\t\t\t'default'\t\t\t=> $GLOBALS['footer_background'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_background', array(\n\t\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Footer Background', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'footer_background',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\t\n\t\t\t) ) );\n\n\n\t\t\t// Site title link\n\t\t\t$wp_customize->add_setting( 'site_title_link', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['site_title_link'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'site_title_link', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Site title', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'site_title_link',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Tagline text\n\t\t\t$wp_customize->add_setting( 'tagline_text', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['tagline_text'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'tagline_text', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Tagline', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'tagline_text',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Navigation link\n\t\t\t$wp_customize->add_setting( 'primary_navigation_link', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['primary_navigation_link'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_navigation_link', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Navigation link', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'primary_navigation_link',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Primary text\n\t\t\t$wp_customize->add_setting( 'primary_text', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['primary_text'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_text', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Primary text', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'primary_text',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\t\t\t// Primary link\n\t\t\t$wp_customize->add_setting( 'primary_link', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['primary_link'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_link', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Primary link', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'primary_link',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Primary headings\n\t\t\t$wp_customize->add_setting( 'primary_headings', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['primary_headings'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_headings', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Primary headings', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'primary_headings',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Secondary headings\n\t\t\t$wp_customize->add_setting( 'secondary_headings', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['secondary_headings'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_headings', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Secondary headings', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'secondary_headings',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\t\t\t// Footer headings\n\t\t\t$wp_customize->add_setting( 'footer_headings', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['footer_headings'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_headings', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Footer headings', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'footer_headings',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\t\n\n\t\t\t// Meta text\n\t\t\t$wp_customize->add_setting( 'meta_text', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['meta_text'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'meta_text', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Meta text', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'meta_text',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\t\t\t// Meta link\n\t\t\t$wp_customize->add_setting( 'meta_link', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['meta_link'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'meta_link', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Meta link', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'meta_link',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Secondary text\n\t\t\t$wp_customize->add_setting( 'secondary_text', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['secondary_text'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Sidebar text', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'secondary_text',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\t\t\t// Secondary link\n\t\t\t$wp_customize->add_setting( 'secondary_link', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['secondary_link'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_link', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Sidebar link', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'secondary_link',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Footer text\n\t\t\t$wp_customize->add_setting( 'footer_text', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['footer_text'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_text', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Footer text', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'footer_text',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\t\t\t// Footer link\n\t\t\t$wp_customize->add_setting( 'footer_link', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['footer_link'],\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_link', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Footer link', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'footer_link',\n\t\t\t\t'type'\t\t\t\t=> 'color',\n\n\t\t\t) ) );\n\n\n\t\t\t// Custom CSS\n\t\t\t$wp_customize->add_setting( 'custom_css', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_text', \n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'custom_css', array(\n\t\n\t\t\t\t'label'\t\t\t\t=> __( 'Custom CSS', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'colors',\n\t\t\t\t'settings'\t\t\t=> 'custom_css',\n\t\t\t\t'type'\t\t\t\t=> 'textarea',\n\n\t\t\t) );\n\n\n\n\t\t// Theme\n\t\t$wp_customize->add_section( 'theme', array(\n\n\t\t\t'title'\t\t\t\t=> esc_html__( 'Theme Settings', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 70,\n\n\t\t) );\n\n\n\t\t\t// Tagline\n\t\t\t$wp_customize->add_setting( 'enable_tagline', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'enable_tagline', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable the tagline', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'theme',\n\t\t\t\t'settings'\t\t\t=> 'enable_tagline',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\n\t\t\t// Header - byline\n\t\t\t$wp_customize->add_setting( 'header_byline', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t//'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_textarea',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'header_byline', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Header byline', 'worx' ),\n\t\t\t\t'description'\t\t=> __( 'Add additional content to the header.', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'theme',\n\t\t\t\t'settings'\t\t\t=> 'header_byline',\n\t\t\t\t'type'\t\t\t\t=> 'textarea',\n\n\t\t\t) );\n\n\n\t\t\t// Homepage - Portfolio - Posts per page\n\t\t\t$wp_customize->add_setting( 'homepage_portfolio_posts_per_page', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['homepage_portfolio_items'],\n\t\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_number',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'homepage_portfolio_posts_per_page', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( '# portfolio items (homepage)', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'theme',\n\t\t\t\t'settings'\t\t\t=> 'homepage_portfolio_posts_per_page',\n\t\t\t\t'type'\t\t\t\t=> 'number',\n\n\t\t\t) );\n\n\n\t\t\t// Page - Portfolio\n\t\t\t$wp_customize->add_setting( 'page_portfolio', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t\t'sanitize_callback' => 'absint',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'page_portfolio', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Page set as portfolio', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'theme',\n\t\t\t\t'settings'\t\t\t=> 'page_portfolio',\n\t\t\t\t'type'\t\t\t\t=> 'dropdown-pages',\n\n\t\t\t) );\n\n\n\t\t\t// Portfolio - Posts per page\n\t\t\t$wp_customize->add_setting( 'portfolio_posts_per_page', array(\n\n\t\t\t\t'default'\t\t\t=> $GLOBALS['portfolio_items'],\n\t\t\t\t'transport'\t\t\t=> 'refresh',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_number',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'portfolio_posts_per_page', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( '# portfolio items (portfolio page)', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'theme',\n\t\t\t\t'settings'\t\t\t=> 'portfolio_posts_per_page',\n\t\t\t\t'type'\t\t\t\t=> 'number',\n\n\t\t\t) );\n\n\n\t\t\t// Footer - byline\n\t\t\t$wp_customize->add_setting( 'footer_byline', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t//'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_textarea',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'footer_byline', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Footer byline', 'worx' ),\n\t\t\t\t'description'\t\t=> __( 'Add additional content to the footer.', 'worx' ),\n\t\t\t\t'section'\t\t\t=> 'theme',\n\t\t\t\t'settings'\t\t\t=> 'footer_byline',\n\t\t\t\t'type'\t\t\t\t=> 'textarea',\n\n\t\t\t) );\n\n\n\n\n\t\t// Widgets\n\t\t$wp_customize->add_section( 'widgets', array(\n\n\t\t\t'title'\t\t\t\t=> __( 'Widgets', 'worx' ),\n\t\t\t'description'\t\t=> '',\n\t\t\t'priority'\t\t\t=> 200,\n\n\t\t) );\n\n\n\n\n\t\t//if( class_exists( 'TVA_Social' ) ) :\n\n\t\t// Social Settings\n\t\t$wp_customize->add_section( 'social', array(\n\t\n\t\t\t'title'\t\t\t\t=> esc_html__( 'Social Icons Settings', 'worx' ),\n\t\t\t'description'\t\t=> __( 'Add links to you favorite social networks and display them using the [tva_social] shortcode or the Social Icons widget.', 'worx' ),\n\t\t\t'priority'\t\t\t=> 300,\n\t\t\t'active_callback'\t=> 'worx_social',\n\n\t\t) );\n\n\n\t\t\t// Dribbble\n\t\t\t$wp_customize->add_setting( 'social_dribbble', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_dribbble', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Dribbble', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_dribbble',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Facebook\n\t\t\t$wp_customize->add_setting( 'social_facebook', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_facebook', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Facebook', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_facebook',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Github\n\t\t\t$wp_customize->add_setting( 'social_github', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_github', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Github', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_github',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Google+\n\t\t\t$wp_customize->add_setting( 'social_google', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_google', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Google+', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_google',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Instagram\n\t\t\t$wp_customize->add_setting( 'social_instagram', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_instagram', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Instagram', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_instagram',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// LinkedIN\n\t\t\t$wp_customize->add_setting( 'social_linkedin', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_linkedin', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'LinkedIN', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_linkedin',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Pinterest\n\t\t\t$wp_customize->add_setting( 'social_pinterest', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_pinterest', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Pinterest', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_pinterest',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Twitter\n\t\t\t$wp_customize->add_setting( 'social_twitter', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_twitter', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Twitter', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_twitter',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// Vimeo\n\t\t\t$wp_customize->add_setting( 'social_vimeo', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_vimeo', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Vimeo', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_vimeo',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\t// YouTube\n\t\t\t$wp_customize->add_setting( 'social_youtube', array(\n\n\t\t\t\t'default'\t\t\t=> '',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_url',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'social_youtube', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'YouTube', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'social',\n\t\t\t\t'settings'\t\t\t=> 'social_youtube',\n\t\t\t\t'type'\t\t\t\t=> 'url',\n\t\t\t\t'input_attrs' \t\t=> array(\n\t\t\t\t\t'placeholder'\t=> __( 'http://', 'worx' ),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t//endif; // END TVA_Social\n\n\n\n\n\t\t//if( class_exists( 'TVA_Share' ) ) :\n\n\t\t// Social Settings\n\t\t$wp_customize->add_section( 'share', array(\n\t\n\t\t\t'title'\t\t\t\t=> esc_html__( 'Social Share Settings', 'worx' ),\n\t\t\t'description'\t\t=> __( 'Add a nice tool to share your posts.', 'worx' ),\n\t\t\t'priority'\t\t\t=> 310,\n\t\t\t'active_callback'\t=> 'worx_share',\n\n\t\t) );\n\n\t\t\t// Social\n\t\t\t$wp_customize->add_setting( 'enable_share', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'enable_share', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable social sharing', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'share',\n\t\t\t\t'settings'\t\t\t=> 'enable_share',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\t\t\t// Twitter\n\t\t\t$wp_customize->add_setting( 'share_twitter', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'share_twitter', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable Twitter', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'share',\n\t\t\t\t'settings'\t\t\t=> 'share_twitter',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\t\t\t// Facebook\n\t\t\t$wp_customize->add_setting( 'share_facebook', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'share_facebook', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable Facebook', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'share',\n\t\t\t\t'settings'\t\t\t=> 'share_facebook',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\t\t\t// Google\n\t\t\t$wp_customize->add_setting( 'share_google', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'share_google', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable Google', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'share',\n\t\t\t\t'settings'\t\t\t=> 'share_google',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\t\t\t// LinkedIN\n\t\t\t$wp_customize->add_setting( 'share_linkedin', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'share_linkedin', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable LinkedIN', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'share',\n\t\t\t\t'settings'\t\t\t=> 'share_linkedin',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\t\t\t// Pinterest\n\t\t\t$wp_customize->add_setting( 'share_pinterest', array(\n\n\t\t\t\t'default'\t\t\t=> true,\n\t\t\t\t'sanitize_callback' => 'worx_sanitize_checkbox',\n\n\t\t\t) );\n\n\t\t\t$wp_customize->add_control( 'share_pinterest', array(\n\n\t\t\t\t'label'\t\t\t\t=> __( 'Enable Pinterest', 'worx' ),\n\t\t\t\t'description'\t\t=> '',\n\t\t\t\t'section'\t\t\t=> 'share',\n\t\t\t\t'settings'\t\t\t=> 'share_pinterest',\n\t\t\t\t'type'\t\t\t\t=> 'checkbox',\n\n\t\t\t) );\n\n\t\t//endif; // END TVA_Share\n\n\n\n\n\t\t// Custom contextual controls\n\t\tfunction worx_share() {\n\n\t\t\treturn class_exists( 'TVA_Share' );\n\t\t\t\n\t\t}\n\n\t\tfunction worx_social() {\n\n\t\t\treturn class_exists( 'TVA_Social' );\n\t\t\t\n\t\t}\n\n\t\tfunction worx_homepage() {\n\t\t\n\t\t\treturn is_page_template( 'template-homepage.php' );\n\t\t\n\t\t}\n\t\t\n\t\tfunction worx_portfolio() {\n\t\t\n\t\t\treturn is_page_template( 'template-projects.php' );\n\t\t\n\t\t}\n\t\t\n\t\tfunction worx_team() {\n\t\t\n\t\t\treturn is_page_template( 'template-team.php' );\n\t\t\n\t\t}\n\t\t\n\t\tfunction worx_testimonials() {\n\t\t\n\t\t\treturn is_page_template( 'template-testimonials.php' );\n\t\t\n\t\t}\n\n\n\t\t// Sanitize text\n\t\tfunction worx_sanitize_text( $input ) {\n\n\t\t\treturn wp_kses_allowed_html( force_balance_tags( $input ) );\n\n\t\t}\n\n\t\t// Sanitize number\n\t\tfunction worx_sanitize_number( $input ) {\n\n\t\t\treturn esc_attr( force_balance_tags( $input ) );\n\n\t\t}\n\n\t\t// Sanitize textarea\n\t\tfunction worx_sanitize_textarea( $content ) {\n\n\t\t\tif ( '' === $content ) {\n\n\t\t\t\treturn '';\n\n\t\t\t}\n\t\n\t\t\treturn wp_kses( $content, wp_kses_allowed_html( 'post' ) );\n\n\t\t}\n\n\t\t// Sanitize URL\n\t\tfunction worx_sanitize_url( $input ) {\n\n\t\t\treturn esc_url( force_balance_tags( $input ) );\n\n\t\t}\n\n\t\t// Sanitize checkbox\n\t\tfunction worx_sanitize_checkbox( $input ) {\n\n\t\t\tif( $input == 1 ) {\n\n\t\t\t\treturn 1;\n\n\t\t\t} else {\n\n\t\t\t\treturn '';\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Sanitize select\n\t\tfunction worx_sanitize_select( $input, $setting ) {\n\n\t\t\tglobal $wp_customize;\n\n\t\t\t$control = $wp_customize->get_control( $setting->id );\n\n\t\t\tif( array_key_exists( $input, $control->choices ) ) {\n\n\t\t\t\treturn $input;\n\n\t\t\t} else {\n\n\t\t\t\treturn $setting->default;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function falcon_setup() {\n\n // We don't supply a title tag in header.php\n add_theme_support( 'title-tag' );\n\n // Default posts/comments RSS feed links to head.\n // Note, comments might not be supported so could need updating\n add_theme_support( 'automatic-feed-links' );\n\n // Plan to add support for post thumbnails...\n add_theme_support( 'post-thumbnails' );\n\n // Header uses wp_nav_menu() at two points.\n register_nav_menus( array(\n 'primary_nav' => esc_html__( 'Primary Menu', 'falcon' ),\n 'footer_nav' => esc_html__( 'Footer Menu', 'falcon' ),\n 'external_nav' => esc_html__( 'External/Social Menu', 'falcon' ),\n 'mobile_nav' => esc_html__( 'Pull-down Main Mobile Menu', 'falcon' ),\n 'mobile_contact'=> esc_html__( 'Speech-icon/contact Mobile Button', 'falcon' ),\n ) );\n\n /*\n * Use HTML5 standard markup for...\n */\n add_theme_support( 'html5', array(\n 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',\n ) );\n\n /*\n * Add support for styling quotes in a cool way\n * Other post formats listed: https://codex.wordpress.org/Post_Formats\n */\n add_theme_support( 'post-formats', array('quote') );\n}", "function theme_setup_after()\r\n{\r\n /* Adds support for wordpress to handle setting the title */\r\n add_theme_support( 'title-tag' );\r\n \r\n // Adds Support for wordpress to handle feed links\r\n add_theme_support( 'automatic-feed-links' );\r\n\r\n\r\n // Adds Support for wordpress to handle thumbnails\r\n add_theme_support( 'post-thumbnails' );\r\n\r\n //\r\n add_theme_support( 'custom-logo' );\r\n\r\n add_theme_support( 'custom-logo', array(\r\n 'height' => 400,\r\n 'width' => 400,\r\n \r\n 'flex-height' => true,\r\n 'flex-width' => true,\r\n\r\n 'header-text' => array( 'site-title', 'site-description' ),\r\n ) );\r\n\r\n // Registration\r\n register_menus();\r\n}", "public function setup_header() {\n\t\twp_enqueue_style( 'wsu-style-common', 'http://designer.wsu.edu/template/css2.aspx?key=0eab28zs011' );\n\t\twp_enqueue_style( 'wsu-news-parent-style', get_template_directory_uri() . '/style.css' );\n\t}", "function hfcm_header_scripts() {\n\thfcm_add_snippets( 'header' );\n}", "function _custom_header_background_just_in_time_taxonomy_background_override() {\n\tglobal $custom_image_header, $custom_background;\n\n\tif ( current_theme_supports( 'custom-header' ) ) {\n\t\t// In case any constants were defined after an add_custom_image_header() call, re-run.\n\t\tadd_theme_support( 'custom-header', array( '__jit' => true ) );\n\n\t\t$args = get_theme_support( 'custom-header' );\n\t\tif ( $args[0]['wp-head-callback'] )\n\t\t\tadd_action( 'wp_head', $args[0]['wp-head-callback'] );\n\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/custom-header.php' );\n\t\t\t$custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );\n\t\t}\n\t}\n\n\tif ( current_theme_supports( 'custom-background' ) ) {\n\t\t// In case any constants were defined after an add_custom_background() call, re-run.\n\t\tadd_theme_support( 'custom-background', array( '__jit' => true ) );\n\n\t\t$args = get_theme_support( 'custom-background' );\n\t\tadd_action( 'wp_head', $args[0]['wp-head-callback'] );\n\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( plugin_dir_path(__FILE__) . 'includes/background-class.php' );\n\t\t\trequire_once( plugin_dir_path(__FILE__) . 'includes/mods.php' );\n\t\t\t$custom_background = new Tax_Custom_Background( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );\n\t\t}\n\t}\n}", "function codeless_add_page_header(){\n \n if( ( codeless_get_page_layout() == 'fullwidth' && ! codeless_is_blog_query() && ! is_single() ) || codeless_is_shop_page() )\n return false;\n\n if( is_single() && codeless_get_post_style() != 'custom' )\n return;\n\n\n\n $post = get_post( codeless_get_post_id() ); \n setup_postdata($post);\n if( ! is_object( $post ) )\n return;\n \n $content = $post->post_content;\n $page_header = codeless_extract_page_header($content);\n\n $page_header = str_replace(']]>', ']]&gt;', apply_filters( 'codeless_the_page_header' , $page_header ));\n\n echo apply_filters('the_content', $page_header ); \n\n \n wp_reset_postdata();\n}", "function customPageHeader(){\n\t}", "function yoko() {\r\n\r\n\t// This theme styles the visual editor with editor-style.css to match the theme style.\r\n\tadd_editor_style();\r\n\r\n\t// This theme uses post thumbnails\r\n\tadd_theme_support( 'post-thumbnails' );\r\n\r\n\t// Add default posts and comments RSS feed links to head\r\n\tadd_theme_support( 'automatic-feed-links' );\r\n\r\n\t// This theme uses wp_nav_menu() in one location.\r\n\tregister_nav_menus( array(\r\n\t\t'primary' => __( 'Primary Navigation', 'yoko' ),\r\n\t) );\r\n\r\n\t// Add support for Post Formats\r\n\tadd_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'video', 'image', 'quote' ) );\r\n\r\n\t// This theme allows users to set a custom background\r\n\tadd_custom_background();\r\n\r\n\t// Your changeable header business starts here\r\n\tdefine( 'HEADER_TEXTCOLOR', '' );\r\n\t// No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.\r\n\tdefine( 'HEADER_IMAGE', 'http://kumanowarouda.jp/wp-content/themes/warouda/images/header.jpg' );\r\n\r\n\t// The height and width of your custom header. You can hook into the theme's own filters to change these values.\r\n\t// Add a filter to yoko_header_image_width and yoko_header_image_height to change these values.\r\n\tdefine( 'HEADER_IMAGE_WIDTH', apply_filters( 'yoko_header_image_width', 1102 ) );\r\n\tdefine( 'HEADER_IMAGE_HEIGHT', apply_filters( 'yoko_header_image_height', 350 ) );\r\n\r\n\t// We'll be using post thumbnails for custom header images on posts and pages.\r\n\t// We want them to be 940 pixels wide by 350 pixels tall.\r\n\t// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.\r\n\tset_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );\r\n\r\n\t// Don't support text inside the header image.\r\n\tdefine( 'NO_HEADER_TEXT', true );\r\n\r\n\t// Add a way for the custom header to be styled in the admin panel that controls\r\n\t// custom headers. See yoko_admin_header_style(), below.\r\n\tadd_custom_image_header( '', 'yoko_admin_header_style' );\r\n\r\n\t// ... and thus ends the changeable header business.\r\n\r\n\t// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.\r\n\tregister_default_headers( array(\r\n\t\t\t'Default' => array(\r\n\t\t\t'url' => 'http://kumanowarouda.jp/wp-content/themes/warouda/images/header.jpg',\r\n\t\t\t'thumbnail_url' => 'http://kumanowarouda.jp/wp-content/themes/warouda/images/header-300x95.jpg',\r\n\t\t\t/* translators: header image description */\r\n\t\t\t'description' => 'ヘッダー'\r\n\t\t\t),\r\n\t) );\r\n}", "function first_class_theme_setup() {\n\n // Add <title> tag support\n add_theme_support( 'title-tag' ); \n\n // Add custom-logo support\n add_theme_support( 'custom-logo' );\n\n\n\n}", "function custom_theme_features() {\n\n\t// menus\n\tregister_nav_menu( 'primary', __( 'Primary', 'framework' ) );\n\tregister_nav_menu( 'social', __( 'Social', 'framework' ) );\n\n\n\t// featured images\n\tadd_theme_support( 'post-thumbnails' );\n\n\n\tadd_editor_style ( 'css/typography.css' );\n\n\n\t// Enable support for HTML5 markup.\n\tadd_theme_support( 'html5', array(\n\t\t'comment-list',\n\t\t'comment-form',\n\t\t'search-form',\n\t\t'comment-form',\n\t\t'gallery',\n\t\t'caption'\n\t) );\n\t\n\t\n\t// allow WordPress to control the title tag\n\tadd_theme_support( 'title-tag' );\n\n\n}", "private function addHeaderTemplate() {\n\t\t$this->_registry->getObject('template')->addTemplateBit('header', 'header.tpl.html');\n\t}", "function _rhd_custom_theme_features() {\n\n\t\t// Make theme available for translation.\n\t load_theme_textdomain( '_rhd', get_template_directory() . '/languages' );\n\n\t\t// Add default posts and comments RSS feed links to head.\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t// Add theme support for Post Formats\n\t\tadd_theme_support( 'post-formats', array(\n\t\t\t'status',\n\t\t\t'quote',\n\t\t\t'gallery',\n\t\t\t'image',\n\t\t\t'video',\n\t\t\t'audio',\n\t\t\t'link',\n\t\t\t'aside',\n\t\t\t'chat'\n\t\t));\n\n\t\t// Add theme support for Featured Images\n\t\tadd_theme_support( 'post-thumbnails' );\n\t add_image_size( '_rhd_featured', 750, 410, true );\n\t add_image_size( 'tab-small', 60, 60 , true); // Small Thumbnail\n\t\tadd_image_size( 'admin-list-thumb', 80, 80, true); //admin thumbnail\n\t\tadd_image_size( 'album-grid', 450, 450, true );\n\n\t\t// Enable support for HTML5 markup.\n\t add_theme_support( 'html5', array(\n\t 'comment-list',\n\t 'search-form',\n\t 'comment-form',\n\t 'gallery',\n\t 'caption',\n\t ));\n\n\t\t// Add theme support for Custom Background\n\t\t// add_theme_support( 'custom-background', apply_filters( '_rhd_custom_background_args', array(\n\t\t// \t'default-color' => 'f2f2f2',\n\t\t// \t'default-image' => '',\n\t\t// )));\n\n\t\t// Add theme support for Custom Header\n\t\t$header_args = array(\n\t\t\t'default-image' => '',\n\t\t\t'width' => 0,\n\t\t\t'height' => 0,\n\t\t\t'flex-width' => false,\n\t\t\t'flex-height' => false,\n\t\t\t'uploads' => true,\n\t\t\t'random-default' => false,\n\t\t\t'header-text' => true,\n\t\t\t'default-text-color' => '',\n\t\t\t'wp-head-callback' => '',\n\t\t\t'admin-head-callback' => '',\n\t\t\t'admin-preview-callback' => '',\n\t\t\t'video' => true,\n\t\t\t'video-active-callback' => ''\n\t\t);\n\t\tadd_theme_support( 'custom-header', $header_args );\n\n\t\t// Add theme support for logo\n\t\tadd_theme_support( 'custom-logo', array(\n\t 'height' => 100,\n\t 'width' => 400,\n\t 'flex-height' => true,\n\t 'flex-width' => true,\n\t 'header-text' => array( 'site-title', 'site-description' )\n\t\t));\n\n\t\t// Add theme support for custom CSS in the TinyMCE visual editor\n\t\tadd_editor_style();\n\n\t add_theme_support( 'title-tag' );\n\t}", "function freshops_theme_support()\n{\n\n // wp thumbnails (sizes handled in functions.php)\n add_theme_support('post-thumbnails');\n\n // default thumb size\n set_post_thumbnail_size(125, 125, true);\n\n // wp custom background (thx to @bransonwerner for update)\n add_theme_support('custom-background',\n array(\n 'default-image' => '', // background image default\n 'default-color' => '', // background color default (dont add the #)\n 'wp-head-callback' => '_custom_background_cb',\n 'admin-head-callback' => '',\n 'admin-preview-callback' => '',\n )\n );\n\n // rss thingy\n add_theme_support('automatic-feed-links');\n\n // to add header image support go here: http://themble.com/support/adding-header-background-image-support/\n\n // adding post format support\n // add_theme_support( 'post-formats',\n // \tarray(\n // \t\t'aside', // title less blurb\n // \t\t'gallery', // gallery of images\n // \t\t'image', // an image\n // \t\t'status', // a Facebook like status update\n // \t\t'video', // video\n // \t)\n // );\n\n // wp menus\n add_theme_support('menus');\n\n // registering wp3+ menus\n register_nav_menus(\n array(\n 'main-nav' => __('The Main Menu', 'freshops_rhizome'), // main nav in header\n 'footer-links' => __('Footer Links', 'freshops_rhizome'), // secondary nav in footer\n 'order' => __('Order', 'freshops_rhizome'), //the \"Order\" rollover nav below the header\n )\n );\n}", "function testing_theme_support() {\n\t// requires wp_head(); to be in header.php\n\tadd_theme_support('title-tag');\n}", "function s4o_custom_header() {\n // INJECTION OF CUSTOM CSS IS NOW IN /classes/class-fl-child-theme.php\n\n // INSERT TEMPLATE NAME FOR REFERENCE\n echo \"\\n<!-- Template is : \" . get_current_template() . \" -->\\n\";\n\n}", "public function enqueue() { \n\t\tparent::enqueue();\n\t\t// Re-localize parent's script, since we added a custom setting for header size and need to change the default value\n\n\t\twp_localize_script( 'customize-views', '_wpCustomizeHeader', array(\n\t\t\t'data' => array(\n\t\t\t\t'width' => absint( cs_get_mods( 'respheader_width' ) ), // changed value\n\t\t\t\t'height' => absint( cs_get_mods( 'respheader_height' ) ), // changed value\n\t\t\t\t'flex-width' => absint( get_theme_support( 'custom-header', 'flex-width' ) ),\n\t\t\t\t'flex-height' => absint( get_theme_support( 'custom-header', 'flex-height' ) ),\n\t\t\t\t'currentImgSrc' => $this->get_current_image_src(),\n\t\t\t),\n\t\t\t'nonces' => array(\n\t\t\t\t'add' => wp_create_nonce( 'header-add' ),\n\t\t\t\t'remove' => wp_create_nonce( 'header-remove' ),\n\t\t\t),\n\t\t\t'uploads' => $this->uploaded_headers,\n\t\t\t'defaults' => $this->default_headers\n\t\t) );\n\n\n\t\t// Load won custom script js/respHeader.js\n\t\twp_enqueue_script( \n\t\t\t'_'.$this->textdomain, // handle\n\t\t\t_module_uri()\n\t\t\t.$this->textdomain\n\t\t\t.'/js/'\n\t\t\t.$this->textdomain.'.js', // path\n\t\t\tarray( 'wp-util' ), // depends on wp-includes/js/wp-utils.js\n\t\t\tRESPHEADER_V, // skip printing version\n\t\t\ttrue // load late\n\t\t);\n\n\t\t/**\n\t\t * Strings to go to custom script \n\t\t */\n\t\t$this->strings = array(\n\t\t\t'ajaxUrl' => admin_url('admin-ajax.php', (is_ssl() ? 'https': 'http')),\n\t\t\t'supported_widths' => respHeader_widths(),//theme recommended\n\t\t\t'due_widths' => _due_widths(),//left to add\n\t\t\t'fallback_width' => array( _fallback_widths())//img cropper guidance for when all due are added to the srcset\n\t\t);\n\t\t\n\t\t// localize custom script\n\t\twp_localize_script( \n\t\t\t'_'.$this->textdomain, // handle\n\t\t\t$this->textdomain, // var name\n\t\t\t$this->strings // value\n\t\t\t);\n\t}", "public function customize_register( $wp_customize ) {\r\n\r\n\t\t/**\r\n\t\t * Register Panel & Sections\r\n\t\t */\r\n\t\trequire_once ASTRA_THEME_HEADING_COLORS_DIR . 'customizer/class-astra-heading-colors-configs.php';// phpcs:ignore: WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\r\n\t}", "function neobeat_load_page_header() {\n\t\t// Include header template\n\t\techo apply_filters( 'neobeat_filter_header_template', neobeat_get_template_part( 'header', 'templates/header' ) );\n\t}", "function refined_magazine_header_start_container()\r\n {\r\n ?>\r\n <header id=\"masthead\" class=\"site-header\" <?php refined_magazine_do_microdata('header'); ?>>\r\n <?php\r\n\r\n }", "public function header(){\n // load_template( plugin_dir_path( dirname( __FILE__ ) ) . \"views/meta-tags.php\" );\n }", "function power_show_header_customizer_callback() {\n\treturn ! current_theme_supports( 'power-custom-header' ) && ! current_theme_supports( 'custom-header' ) && ! current_theme_supports( 'power-custom-logo' );\n}", "function vitals_post_header() {\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t<?php\n\t\tdo_action( 'vitals_post_header_before' );\n\n\t\tif ( is_single() ) {\n\t\t\tthe_title( '<h1 class=\"entry-title\">', '</h1>' );\n\t\t} else {\n\t\t\tthe_title( sprintf( '<h2 class=\"entry-title heading-size-1\"><a href=\"%s\" rel=\"bookmark\">', esc_url( get_permalink() ) ), '</a></h2>' );\n\t\t}\n\t\t/**\n\t\t * Functions hooked in to vitals_post_header_before action.\n\t\t *\n\t\t * @hooked vitals_post_meta - 10\n\t\t */\n\t\tdo_action( 'vitals_post_header_after' );\n\t\t?>\n\t\t</header><!-- .entry-header -->\n\t\t<?php\n\t}", "function _nighthawk_process_custom_header_settings() {\n\tif ( isset( $_POST['save-header-options'] ) ) {\n\t\tcheck_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );\n\n\t\tif ( ! current_user_can( 'edit_theme_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$display_title = 0;\n\t\tif ( isset( $_POST['nighthawk_display_site_title'] ) ) {\n\t\t\t$display_title = 1;\n\t\t}\n\t\tset_theme_mod( 'nighthawk_display_site_title', $display_title );\n\n\t\t$display_tagline = 0;\n\t\tif ( isset( $_POST['nighthawk_display_tagline'] ) ) {\n\t\t\t$display_tagline = 1;\n\t\t}\n\t\tset_theme_mod( 'nighthawk_display_tagline', $display_tagline );\n\t}\n}", "function mytheme_customize_register( $wp_customize ) {\n\n $wp_customize->add_section( 'other_options', array(\n 'title' => 'head tag',\n 'priority' => 20,\n ) );\n\n $wp_customize->add_setting( 'insert_tag_tohead', array(\n 'type' => 'option',\n 'transport' => 'postMessage',\n ) );\n\n $wp_customize->add_control( 'insert_tag_tohead', array(\n 'settings' => 'insert_tag_tohead',\n 'label' => 'Insert text to head tag.',\n 'description' => 'Insert this text as is to the head tag, e.g. Google Analytics Tracking Code.',\n 'section' => 'other_options',\n 'type' => 'textarea',\n ) );\n}", "function setup() {\n if (current_user_can('edit_posts')) {\n show_admin_bar(true);\n } else {\n show_admin_bar(false);\n }\n\n // add which sizes the images need to have in the theme\n add_image_size( 'page-featured-image', 2580, 450, array('center', 'center') );\n add_image_size( 'post-featured-image', 9999, 400, false ); // width, height\n // add support for featured images \n add_theme_support( 'post-thumbnails' );\n set_post_thumbnail_size( 300, 300, true );\n\n // register header menu\n register_nav_menu('header-menu', __( 'Header Menu', 'sos-animals' ) );\n\n // register support for custom logo\n add_theme_support( 'custom-logo', array(\n 'height' => 100,\n 'width' => 400,\n 'flex-height' => false,\n 'flex-width' => false,\n 'header-text' => array( 'site-title', 'site-description' ),\n ) );\n\n // register which post formats that are supported in the theme\n add_theme_support('post-formats', array('image') );\n\n}", "function add_theme_customize($wp_customize) {\n $wp_customize->add_section('js_header_section', array('title' => 'JS Header',));\n $wp_customize->add_setting('js_header_setting', array('default' => '', 'transport' => 'refresh',));\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'js_header', array('label' => 'Javascript in Header', 'section' => 'js_header_section', 'settings' => 'js_header_setting', 'type' => 'textarea')));\n $wp_customize->add_section('js_footer_section', array('title' => 'JS Footer',));\n $wp_customize->add_setting('js_footer_setting', array('default' => '', 'transport' => 'refresh',));\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'js_footer', array('label' => 'Javascript in Footer', 'section' => 'js_footer_section', 'settings' => 'js_footer_setting', 'type' => 'textarea')));\n $wp_customize->add_setting('header_menu_pos_setting', array('capibility' => 'manage_options', 'default' => 'bottomleft', 'type' => 'theme_mod', 'transport' => 'postMessage', 'sanitize_callback' => 'change_header_menu_pos'));\n $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'header_menu_pos', array('label' => 'Vị trí của header menu', 'section' => 'menu_locations', 'settings' => 'header_menu_pos_setting', 'type' => 'radio', 'choices' => array( 'bottomleft' => 'Bottom Left', 'bottomright' => 'Bottom Right', 'topleft' => 'Top Left', 'topright' => 'Top Right'), 'priority' => 50,)));\n}", "function appthemes_after_header() {\n\t/**\n\t * Runs in the header.php file and loads after the theme header code.\n\t * Usage This hook provides no parameters.\n\t */\n\tdo_action( 'appthemes_after_header' );\n}", "function _nighthawk_custom_image_header() {\n\tif ( ! defined( 'HEADER_TEXTCOLOR' ) ) {\n\t\tdefine( 'HEADER_TEXTCOLOR', '777' );\n\t}\n\tif ( ! defined( 'HEADER_IMAGE' ) ) {\n\t\tdefine( 'HEADER_IMAGE', get_template_directory_uri() . '/images/lanterns.jpg' );\n\t}\n\tif ( ! defined( 'HEADER_IMAGE_WIDTH' ) ) {\n\t\tdefine( 'HEADER_IMAGE_WIDTH', 1000 );\n\t}\n\tif ( ! defined( 'HEADER_IMAGE_HEIGHT' ) ) {\n\t\tdefine( 'HEADER_IMAGE_HEIGHT', 288 );\n\t}\n\tif ( ! defined( 'NO_HEADER_TEXT' ) ) {\n\t\tdefine( 'NO_HEADER_TEXT', true );\n\t}\n\tadd_custom_image_header( '_nighthawk_custom_image_header_live', '_nighthawk_custom_image_header_admin' );\n}", "function composer_theme_setup() {\n\n\tremove_theme_support( 'theme-layouts' );\n\n\t/* Load the primary menu. */\n\tremove_action( 'omega_before_header', 'omega_get_primary_menu' );\n\t//add_action( 'omega_header', 'omega_get_primary_menu' );\n\tadd_filter( 'omega_site_description', 'composer_site_description' );\n\n\tadd_action( 'omega_after_header', 'composer_banner' );\n\n\tadd_theme_support( 'omega-footer-widgets', 3 );\n\n\tremove_action( 'omega_after_main', 'omega_primary_sidebar' );\n\n\t/* Add support for a custom header image. */\n\tadd_theme_support(\n\t\t'custom-header',\n\t\tarray( 'header-text' => false,\n\t\t\t// Support flexible height and width.\n\t\t\t'flex-width' => true,\n\t\t\t'width' => 1024,\n\t\t\t'flex-height' => true,\n\t\t\t'height' => 600,\n\t\t\t'uploads' => true,\n\t\t\t'default-image' => get_stylesheet_directory_uri() . '/images/header.jpg'\n\t\t\t));\n\n\tadd_action( 'wp_enqueue_scripts', 'composer_scripts_styles' );\n\n\tremove_action( 'omega_before_entry', 'omega_entry_header' );\n\tadd_action( 'omega_before_entry', 'composer_entry_header' );\n\tremove_action( 'omega_before_loop', 'omega_archive_title');\n\n\tload_child_theme_textdomain( 'composer', get_stylesheet_directory() . '/languages' );\n\n}", "public static function init() {\n add_filter('wp_headers', array('ShareaholicUtilities', 'add_header_xua'));\n }", "function custom_header() {\n\t\t$h_el = \"branding\";\n\t\t$background = ( get_header_image() ) ? 'h_el hgroup a{display:block;}' : '';\n\t\t$color = get_header_textcolor();\n\t\t\n\t\tif ( !$background && !$color )\n\t\t\treturn false;\n\t\t\n\t\t$text = ( 'blank' == $color ) ? '#header hgroup h1,#header hgroup h2{display:none}' : \"#header hgroup,#header hgroup a{color:#$color}\";\n\t\t\n\t\techo '<style>' . $background . $text . \"</style>\\n\";\n\t}", "public function modify_header() {\n\t\twp_dequeue_style( 'twentythirteen-fonts' );\n\t\twp_enqueue_style( 'wsu-news-fonts', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic|Bitter:400,700|Open+Sans+Condensed:300,700,300italic', array(), null );\n\t}", "function news_vibrant_header_settings_register( $wp_customize ) {\r\n $wp_customize->add_panel(\r\n\t 'news_vibrant_header_settings_panel',\r\n\t array(\r\n\t 'priority' => 10,\r\n\t 'capability' => 'edit_theme_options',\r\n\t 'theme_supports' => '',\r\n\t 'title' => __( 'Header Settings', 'news-vibrant' ),\r\n\t )\r\n );\r\n\r\n/*-----------------------------------------------------------------------------------------------------------------------*/\r\n\t\r\n\t/**\r\n * Top Header Section\r\n */\r\n $wp_customize->add_section(\r\n 'news_vibrant_top_header_section',\r\n array(\r\n 'title' => __( 'Top Header Section', 'news-vibrant' ),\r\n 'priority' => 5,\r\n 'panel' => 'news_vibrant_header_settings_panel'\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for Top Header\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_top_header_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_top_header_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Top Header Section', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for top header section.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_top_header_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'priority' => 5,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for Current Date\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_top_date_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_top_date_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Current Date', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for current date at top header section.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_top_header_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'active_callback' => 'news_vibrant_top_header_option_active_callback',\r\n 'priority' => 10,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for Social Icon\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_top_social_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_top_social_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Social Icons', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for social media icons at top header section.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_top_header_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'active_callback' => 'news_vibrant_top_header_option_active_callback',\r\n 'priority' => 15,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for featured section\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_top_featured_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_top_featured_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Featured Posts Section', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for featured posts at top header section.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_top_header_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'active_callback' => 'news_vibrant_top_header_option_active_callback',\r\n 'priority' => 20,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Multiple checkboxes for featured posts section\r\n *\r\n * @since 1.0.0\r\n */\r\n $news_vibrant_categories_lists = news_vibrant_categories_lists();\r\n\r\n $wp_customize->add_setting(\r\n 'news_vibrant_top_posts_cat_slugs',\r\n array(\r\n 'default' => '',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_mulitple_checkbox'\r\n )\r\n );\r\n\r\n $wp_customize->add_control( new News_Vibrant_Customize_Multiple_Checkboxes_Control(\r\n $wp_customize,\r\n 'news_vibrant_top_posts_cat_slugs',\r\n array(\r\n 'section' => 'news_vibrant_top_header_section',\r\n 'label' => __( 'Categories for Featured Posts', 'news-vibrant' ),\r\n 'priority' => 25,\r\n 'choices' => $news_vibrant_categories_lists,\r\n 'active_callback' => 'news_vibrant_featured_posts_top_header_active_callback'\r\n )\r\n )\r\n );\r\n\r\n\r\n/*-----------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Header Section\r\n */\r\n $wp_customize->add_section(\r\n 'news_vibrant_header_option_section',\r\n array(\r\n 'title' => __( 'Header Option', 'news-vibrant' ),\r\n 'priority' => 10,\r\n 'panel' => 'news_vibrant_header_settings_panel'\r\n )\r\n ); \r\n\r\n /**\r\n * Switch option for Home Icon\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_menu_sticky_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_menu_sticky_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Sticky Menu', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Enable/Disable option for sticky menu.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_header_option_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Enable', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Disable', 'news-vibrant' )\r\n ),\r\n 'priority' => 5,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for Home Icon\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_home_icon_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_home_icon_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Home Icon', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for home icon at primary menu.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_header_option_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'priority' => 10,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for Search Icon\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_search_icon_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_search_icon_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Search Icon', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for search icon at primary menu.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_header_option_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'priority' => 15,\r\n )\r\n )\r\n );\r\n\r\n/*-----------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Ticker Section\r\n */\r\n $wp_customize->add_section(\r\n 'news_vibrant_ticker_section',\r\n array(\r\n 'title' => __( 'Ticker Section', 'news-vibrant' ),\r\n 'priority' => 15,\r\n 'panel' => 'news_vibrant_header_settings_panel'\r\n )\r\n );\r\n\r\n /**\r\n * Switch option for Home Icon\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_ticker_option',\r\n array(\r\n 'default' => 'show',\r\n 'sanitize_callback' => 'news_vibrant_sanitize_switch_option',\r\n )\r\n );\r\n $wp_customize->add_control( new News_Vibrant_Customize_Switch_Control(\r\n $wp_customize,\r\n 'news_vibrant_ticker_option',\r\n array(\r\n 'type' => 'switch',\r\n 'label' => esc_html__( 'Ticker Option', 'news-vibrant' ),\r\n 'description' => esc_html__( 'Show/Hide option for news ticker section.', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_ticker_section',\r\n 'choices' => array(\r\n 'show' => esc_html__( 'Show', 'news-vibrant' ),\r\n 'hide' => esc_html__( 'Hide', 'news-vibrant' )\r\n ),\r\n 'priority' => 5,\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * Text field for ticker caption\r\n *\r\n * @since 1.0.0\r\n */\r\n $wp_customize->add_setting(\r\n 'news_vibrant_ticker_caption',\r\n array(\r\n 'default' => __( 'Breaking News', 'news-vibrant' ),\r\n 'transport' => 'postMessage',\r\n 'sanitize_callback' => 'sanitize_text_field'\r\n )\r\n );\r\n $wp_customize->add_control(\r\n 'news_vibrant_ticker_caption',\r\n array(\r\n 'type' => 'text',\r\n 'label' => esc_html__( 'Ticker Caption', 'news-vibrant' ),\r\n 'section' => 'news_vibrant_ticker_section',\r\n 'priority' => 10,\r\n 'active_callback' => 'news_vibrant_ticker_option_active_callback'\r\n )\r\n );\r\n $wp_customize->selective_refresh->add_partial(\r\n 'news_vibrant_ticker_caption', \r\n array(\r\n 'selector' => '.ticker-caption',\r\n 'render_callback' => 'news_vibrant_customize_partial_ticker_caption',\r\n )\r\n );\r\n}", "function wc_enable_wc_plugin_headers($headers)\n {\n }", "function theme_features() {\n add_theme_support('title-tag');\n add_theme_support('post-thumbnails');\n add_theme_support( 'custom-background');\n}", "function floatingorchard_customize_register( $wp_customize ) {\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';\n\n\t//Home Page\n\t$wp_customize->add_setting( 'homepage_setting' , array(\n\n\t) );\n\n\t$wp_customize->add_section( 'homepage_section' , array(\n\t 'title' => __( 'Home Page', 'floatingorchard' ),\n\t 'priority' => 120,\n\t) );\n\n\t$wp_customize->add_control( 'homepage_control', array(\n\t\t'label' => __( 'Core Commitments', 'floatingorchard' ),\n\t\t'section' => 'homepage_section',\n\t\t'settings' => 'homepage_setting'\n\t) );\t\n\n\n\t//Footer\n\t$wp_customize->add_setting( 'footersetting' , array(\n\n\t) );\n\n\t$wp_customize->add_section( 'footersection' , array(\n\t 'title' => __( 'Footer Section', 'floatingorchard' ),\n\t 'priority' => 130,\n\t) );\n\n\t$wp_customize->add_control( 'footercontrol', array(\n\t\t'label' => __( 'Footer Label', 'floatingorchard' ),\n\t\t'section' => 'footersection',\n\t\t'settings' => 'footersetting'\n\t) );\n\n\n}", "function freshio_page_header()\n\t{\n\n\t\tif (freshio_is_woocommerce_activated() || freshio_is_bcn_nav_activated() || is_page()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_front_page() && is_page_template('template-fullwidth.php')) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t\t<?php\n\t\t\tfreshio_post_thumbnail('full');\n\t\t\tthe_title('<h1 class=\"entry-title\">', '</h1>');\n\t\t\t?>\n\t\t</header><!-- .entry-header -->\n\t\t<?php\n\t}", "function centreforge_customize_register($wp_customize){\n\t$wp_customize->add_section('layout_section', array(\n\t\t'title' => 'Layout',\n\t\t'capability' => 'edit_theme_options',\n\t\t'description' => 'Allows you to edit your theme\\'s layout.')\n\t);\n\t$wp_customize->add_setting('cf_options[use_custom_text]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n\t\t'default' => '1'\n\t));\n\t$wp_customize->add_control('cf_options[use_custom_text]', array(\n\t\t'settings' => 'cf_options[use_custom_text]',\n\t\t'label' => 'Display Custom Text',\n\t\t'section' => 'layout_section',\n\t\t'type' => 'checkbox',\n\t));\n\t\n\t$wp_customize->add_setting('cf_options[logo_upload]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'logo_upload', array(\n\t \t'label' => 'Logo Upload',\n\t \t'section' => 'title_tagline',\n\t \t'settings' => 'cf_options[logo_upload]',\n \t)));\n\t\n // Menu Options\n \n $wp_customize->add_section('menu_layout', array(\n\t\t'title' => 'Menu Layout',\n\t\t'capability' => 'edit_theme_options',\n 'panel' => 'nav_menus',\n 'priority' => 5,\n\t\t'description' => 'Allows you to edit your theme\\'s layout.')\n\t);\n \n $cf_nav_types = array();\n $cfchild_nav_types = array();\n \n // Find all files in the centreforge theme with nav-\n $cfcore_nav_types = glob(TEMPLATEPATH.\"/nav-*.php\");\n \n // If there is a child theme preset, get the child theme navs\n if(TEMPLATEPATH != STYLESHEETPATH){\n //Find all Child Theme nav-\n $cfchild_nav_types = glob(STYLESHEETPATH.\"/nav-*.php\");\n }\n \n $cf_nav_types = array_merge($cfcore_nav_types, $cfchild_nav_types);\n \n if(count($cf_nav_types) > 0) {\n $menuTypes = array();\n foreach($cf_nav_types as $cf_nav_type) {\n $info = pathinfo($cf_nav_type);\n $filenameNoNav = str_replace('nav-', '', $info['filename']);\n $filename = str_replace('-', ' ', $filenameNoNav);\n $menuTypes[$filenameNoNav] = ucwords($filename);\n }\n \n $wp_customize->add_setting('cf_menu_options[menu_type]', array(\n 'default' => 'bootstrap',\n 'type' => 'option',\n 'capability' => 'edit_theme_options'\n ));\n $wp_customize->add_control('cf_menu_options[menu_type]', array(\n 'label' => 'Primary Menu Style',\n 'section' => 'menu_layout',\n 'settings' => 'cf_menu_options[menu_type]',\n 'type' => 'select',\n 'choices' => $menuTypes\n ));\n }\n \n $wp_customize->add_setting('cf_menu_options[show_menu]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n\t\t'default' => '1'\n\t));\n\t$wp_customize->add_control('cf_menu_options[show_menu]', array(\n\t \t'label' => 'Show Main Menu',\n 'section' => 'menu_layout',\n 'settings' => 'cf_menu_options[show_menu]',\n 'type' => 'checkbox',\n \t));\n \n // Social Profiles\n\t$wp_customize->add_section('social_section', array(\n\t\t'title' => 'Social Profiles',\n\t\t'capability' => 'edit_theme_options',\n\t\t'description' => 'Allows you to add your social profiles.')\n\t);\n\t$wp_customize->add_setting('cf_options[facebook]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[facebook]', array(\n\t\t'settings' => 'cf_options[facebook]',\n\t\t'label' => 'Facebook URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[twitter]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[twitter]', array(\n\t\t'settings' => 'cf_options[twitter]',\n\t\t'label' => 'Twitter URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[googleplus]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[googleplus]', array(\n\t\t'settings' => 'cf_options[googleplus]',\n\t\t'label' => 'Google+ URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[linkedin]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[linkedin]', array(\n\t\t'settings' => 'cf_options[linkedin]',\n\t\t'label' => 'LinkedIn URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[youtube]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[youtube]', array(\n\t\t'settings' => 'cf_options[youtube]',\n\t\t'label' => 'YouTube URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n \n // Custom Colors\n \n // Remove these two controls and re-add them using our colors array\n $wp_customize->remove_control('header_textcolor');\n $wp_customize->remove_control('background_color');\n \n $colors = array();\n $colors[] = array(\n 'slug' =>'cf_colors[body-bg]', \n 'default' => '#ffffff',\n 'label' => 'Background Color',\n 'description' => __( 'The main body background color.', 'centreforge' ),\n );\n \n $colors[] = array(\n 'slug' =>'cf_colors[text-color]', \n 'default' => '#333333',\n 'label' => 'Content Text Color',\n 'description' => __( 'The main text color for your content.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[link-color]', \n 'default' => '#337ab7',\n 'label' => 'Content Link Color',\n 'description' => __( 'The text color for all your links. This is typically the same color as Brand Primary.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-primary]', \n 'default' => '#337ab7',\n 'label' => 'Brand Primary Color',\n 'description' => __( 'Primary color for any buttons, labels, and headings you may have.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-success]', \n 'default' => '#5cb85c',\n 'label' => 'Success Color',\n 'description' => __( 'The color for any success labels, buttons or alerts.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-info]', \n 'default' => '#46b8da',\n 'label' => 'Info Button Color',\n 'description' => __( 'The color for any info labels, buttons or alerts.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-warning]', \n 'default' => '#f0ad4e',\n 'label' => 'Warning Button Color',\n 'description' => __( 'The color for any warning labels, buttons or alerts.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-danger]', \n 'default' => '#d9534f',\n 'label' => 'Danger Button Color',\n 'description' => __( 'The color for any danger labels, buttons or alerts.', 'centreforge' ),\n );\n foreach( $colors as $color ) {\n // SETTINGS\n $wp_customize->add_setting(\n $color['slug'], array(\n 'default' => $color['default'],\n 'type' => 'option', \n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'check_compile_bootstrap',\n )\n );\n // CONTROLS\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n $color['slug'], \n array(\n 'label' => $color['label'], \n 'section' => 'colors',\n 'settings' => $color['slug'],\n 'description' => $color['description']\n )\n )\n );\n }\n}", "public function register_custom_fields()\n {\n require get_template_directory() . '/inc/custom-fields.php';\n }", "public function _add_header_code()\n\t{\n\t\tif (Bunyad::options()->header_custom_code) {\n\t\t\techo Bunyad::options()->header_custom_code;\n\t\t}\n\t}", "function composer_entry_header() {\n\n\techo '<header class=\"entry-header\">';\n\tif ( is_home() || is_archive() || is_search() ) {\n\t?>\n\t\t<h2 class=\"entry-title\" itemprop=\"headline\"><a href=\"<?php the_permalink(); ?>\" rel=\"bookmark\"><?php the_title(); ?></a></h2>\n\t<?php\n\t\tget_template_part( 'partials/entry', 'byline' );\n\t}\n\techo '</header><!-- .entry-header -->';\n\n}", "function theme_support(){\n add_theme_support('title-tag');\n add_theme_support('custom-logo');\n add_theme_support('post-thumbnails');\n }", "function _wp_customize_include()\n{\n}", "function mytheme_setup() {\n\tadd_theme_support( 'post-thumbnails', array( 'post' ) );\n\t$defaults = array(\n\t\t'height' => 100,\n\t\t'width' => 400,\n\t\t'flex-height' => true,\n\t\t'flex-width' => true,\n\t\t'header-text' => array( 'site-title', 'site-description' ),\n\t);\n\tadd_theme_support( 'custom-logo', $defaults );\t\n}", "function aletta_features() {\n //This WP function allows us to add dynamic navigational menus through WP admin menu panel\n // register_nav_menu('headerMenuLocation', 'Header Menu Location');\n // register_nav_menu('footerLocationOne', 'Footer Location One');\n // register_nav_menu('footerLocationTwo', 'Footer Location Two');\n add_theme_support('title-tag');\n //this function will enable featured images for blog posts\n add_theme_support('post-thumbnails');\n //this function will add a custom banner landscape image size to uploads /image folder\n add_image_size('bannerLandscape', 3000, 1275, true);\n //this function will add a custom banner portrait image size to uploads /image folder\n add_image_size('bannerPortrait', 1050, 840, true);\n // Custom logo Variables\n\t $logo_width = 200;\n $logo_height = 90;\n // Custom Logo Attributes\n $defaults = array(\n 'height' => $logo_width,\n 'width' => $logo_height,\n 'flex-height' => true,\n 'flex-width' => true,\n 'header-text' => array( 'site-title', 'site-description' ),\n );\n add_theme_support( 'custom-logo', $defaults );\n \n}", "public static function register($wp_customize)\n { \n $transport = ( $wp_customize->selective_refresh ? 'postMessage' : 'refresh' );\n\n // Add hero section\n $wp_customize->add_section( 'hero', array(\n 'title' => 'Hero',\n 'priority' => 0\n ));\n \n // Add setting & control for hero title\n $wp_customize->add_setting( 'hero_title', array(\n 'default' => 'Edit live with the Wordpress Customizer',\n 'transport' => $transport\n ));\n \n $wp_customize->add_control( 'hero_title', array(\n 'label' => 'Title',\n 'section' => 'hero',\n 'settings' => 'hero_title',\n 'type' => 'text'\n ));\n \n // Add setting & control for hero description\n $wp_customize->add_setting( 'hero_description', array(\n 'default' => 'Using the Wordpress Customizer you can make updates to parts of your website with a live preview. This makes it easy to iterate on changes.',\n 'transport' => $transport\n ));\n \n $wp_customize->add_control( 'hero_description', array(\n 'label' => 'Description',\n 'section' => 'hero',\n 'settings' => 'hero_description',\n 'type' => 'textarea'\n ));\n \n // Add setting & control for hero image\n $wp_customize->add_setting( 'hero_image', array(\n 'default' => get_template_directory_uri() . '/images/hero-image.svg',\n 'transport' => $transport\n ));\n \n $wp_customize->add_control(\n new WP_Customize_Cropped_Image_Control( $wp_customize, 'hero_image', array(\n 'label' => 'Image',\n 'section' => 'hero',\n 'context' => 'hero-image',\n 'flex_width' => false,\n 'flex_height' => true,\n 'width' => 1080,\n 'height' => 1080\n ) )\n );\n \n // Add setting & control for hero background color\n $wp_customize->add_setting( 'hero_background_color', array(\n 'default' => '#c3f2f5',\n 'transport' => $transport\n ));\n\n $wp_customize->add_control( \n new WP_Customize_Color_Control( $wp_customize, 'hero_background_color', array(\n 'label' => 'Background color',\n 'section' => 'hero',\n 'settings' => 'hero_background_color'\n ) ) \n );\n \n // Select a page\n $wp_customize->add_setting( 'hero_page', array(\n 'type' => 'option',\n 'transport' => 'none'\n ));\n\n $wp_customize->add_control( 'hero_page', array(\n 'label' => 'Link to page',\n 'section' => 'hero',\n 'type' => 'dropdown-pages',\n 'settings' => 'hero_page'\n ));\n \n // Add setting & control for button text\n $wp_customize->add_setting( 'hero_button_text', array(\n 'default' => 'Find out how',\n 'transport' => $transport\n ));\n \n $wp_customize->add_control( 'hero_button_text', array(\n 'label' => 'Button text',\n 'section' => 'hero',\n 'settings' => 'hero_button_text',\n 'type' => 'text'\n ));\n }", "function twentyten_setup() {\n\n\t// This theme styles the visual editor with editor-style.css to match the theme style.\n\tadd_editor_style();\n\n\t// Post Format support. You can also use the legacy \"gallery\" or \"asides\" (note the plural) categories.\n\tadd_theme_support( 'post-formats', array( 'aside', 'gallery' ) );\n\n\t// This theme uses post thumbnails\n\tadd_theme_support( 'post-thumbnails' );\n\n\t// Add default posts and comments RSS feed links to head\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t// Make theme available for translation\n\t// Translations can be filed in the /languages/ directory\n\tload_theme_textdomain( 'twentyten', get_template_directory() . '/languages' );\n\n\t// This theme uses wp_nav_menu() in one location.\n\tregister_nav_menus( array(\n\t\t'primary' => __( 'Primary Navigation', 'twentyten' ),\n\t) );\n\n\t// This theme allows users to set a custom background.\n\tadd_theme_support( 'custom-background', array(\n\t\t// Let WordPress know what our default background color is.\n\t\t'default-color' => 'f1f1f1',\n\t) );\n\n\t// The custom header business starts here.\n\n\t$custom_header_support = array(\n\t\t// The default image to use.\n\t\t// The %s is a placeholder for the theme template directory URI.\n\t\t'default-image' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v4.png',\n\t\t// The height and width of our custom header.\n\t\t'width' => apply_filters( 'twentyten_header_image_width', 940 ),\n\t\t'height' => apply_filters( 'twentyten_header_image_height', 198 ),\n\t\t// Support flexible heights.\n\t\t'flex-height' => false,\n\t\t// Don't support text inside the header image.\n\t\t'header-text' => false,\n\t\t// Callback for styling the header preview in the admin.\n\t\t'admin-head-callback' => 'twentyten_admin_header_style',\n\t);\n\n\tadd_theme_support( 'custom-header', $custom_header_support );\n\n\tif ( ! function_exists( 'get_custom_header' ) ) {\n\t\t// This is all for compatibility with versions of WordPress prior to 3.4.\n\t\tdefine( 'HEADER_TEXTCOLOR', '' );\n\t\tdefine( 'NO_HEADER_TEXT', true );\n\t\tdefine( 'HEADER_IMAGE', $custom_header_support['default-image'] );\n\t\tdefine( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] );\n\t\tdefine( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] );\n\t\tadd_custom_image_header( '', $custom_header_support['admin-head-callback'] );\n\t\tadd_custom_background();\n\t}\n\n\t// We'll be using post thumbnails for custom header images on posts and pages.\n\t// We want them to be 940 pixels wide by 198 pixels tall.\n\t// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.\n\tset_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true );\n\n\t// ... and thus ends the custom header business.\n\n\t// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.\n\tregister_default_headers( array(\n\t\t'v1' => array(\n\t\t\t'url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v1.png',\n\t\t\t'thumbnail_url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v1-thumbnail.png',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Apex Cougar Club v1', 'twentyten' )\n\t\t),\n\t\t'v2' => array(\n\t\t\t'url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v2.png',\n\t\t\t'thumbnail_url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v2-thumbnail.png',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Apex Cougar Club v2', 'twentyten' )\n ),\n \t\t'v3' => array(\n\t\t\t'url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v3.png',\n\t\t\t'thumbnail_url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v3-thumbnail.png',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Apex Cougar Club v3', 'twentyten' )\n ),\n \t\t'v4' => array(\n\t\t\t'url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v4.png',\n\t\t\t'thumbnail_url' => get_bloginfo('stylesheet_directory') . '/images/ApexCougarClubBanner_v4-thumbnail.png',\n\t\t\t/* translators: header image description */\n\t\t\t'description' => __( 'Apex Cougar Club v4', 'twentyten' )\n\t\t)\n\t) );\n}", "function athen_page_header() {\n\t$obj = athen_global_obj();\n $header_style = $obj->header_style;\n\tif ( $obj->has_page_header && $header_style !== \"three\" ) {\n\t\tget_template_part( 'partials/pageheader/page-header' );\n\t}\n}", "function freshio_post_header()\n\t{\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t\t<?php\n\n\t\t\t/**\n\t\t\t * Functions hooked in to freshio_post_header_before action.\n\t\t\t */\n\t\t\tdo_action('freshio_post_header_before');\n\n\t\t\t?>\n\n\t\t\t<div class=\"entry-meta\">\n\t\t\t\t<?php\n\t\t\t\tfreshio_post_meta();\n\t\t\t\t?>\n\t\t\t</div>\n\n\t\t\t<?php\n\t\t\tif (!is_single()) {\n\t\t\t\tthe_title(sprintf('<h2 class=\"alpha entry-title\"><a href=\"%s\" rel=\"bookmark\">', esc_url(get_permalink())), '</a></h2>');\n\t\t\t}\n\t\t\t?>\n\n\t\t\t<?php\n\t\t\tdo_action('freshio_post_header_after');\n\t\t\t?>\n\t\t</header><!-- .entry-header -->\n\t\t<?php\n\t}", "function trainu_setup() {\n add_theme_support( 'title-tag' );\n }", "function mytheme_customize_register( $wp_customize ) {\n \n // Adds Theme Logo to 'Site Identity'\n \n $wp_customize->add_setting( 'themesimages_logo' );\n \n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'themesimages_logo', array(\n 'label' => __( 'Logo', 'themesimages' ),\n 'section' => 'title_tagline',\n 'settings' => 'themesimages_logo',\n ) ) );\n \n // Adds Social Media Links\n \n $wp_customize->add_section( 'social_section' , array(\n 'title' => __( 'Social Media Profiles', 'themessocial' ),\n 'priority' => 30,\n 'description' => 'Add social media profiles here.',\n ) );\n \n // Adds Twitter\n \n $wp_customize->add_setting( 'social_twitter' );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_twitter', array(\n 'label' => __( 'Twitter Account', 'themessocial' ),\n 'section' => 'social_section',\n 'settings' => 'social_twitter',\n 'description' => 'Enter a Twitter URL',\n ) ) );\n \n // Adds Twitter\n \n $wp_customize->add_setting( 'social_facebook' );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_facebook', array(\n 'label' => __( 'Facebook Account', 'themessocial' ),\n 'section' => 'social_section',\n 'settings' => 'social_facebook',\n 'description' => 'Enter a Facebook URL',\n ) ) );\n \n // Old 3D Issue Archives\n \n $wp_customize->add_section( 'archive_section' , array(\n 'title' => __( '3D Issue Archives', 'themesarchive' ),\n 'priority' => 30,\n ) );\n \n // Adds Archive Code\n \n $wp_customize->add_setting( 'archive_html' );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'archive_html', array(\n 'label' => __( 'Archive Issue HTML', 'themessocial' ),\n 'section' => 'archive_section',\n 'settings' => 'archive_html',\n 'type' => textarea,\n 'description' => 'Enter the HTML for any archived 3D Issue issues here.',\n ) ) );\n \n // Promotions API\n \n $wp_customize->add_section( 'api_section' , array(\n 'title' => __( 'Promotions API', 'themesapi' ),\n 'priority' => 30,\n ) );\n \n // Adds Archive Code\n \n $wp_customize->add_setting( 'api_link' );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'api_link', array(\n 'label' => __( 'Promotions API URL', 'themesapi' ),\n 'section' => 'api_section',\n 'settings' => 'api_link',\n ) ) );\n \n}", "function register( $wp_customize ) {\n\t// Add layout section.\n\t$args = [\n\t\t'priority' => 200,\n\t\t'title' => esc_html__( 'Post Settings', 'material-design-google' ),\n\t];\n\n\tCustomizer\\add_section( $wp_customize, 'layout', $args );\n\n\tadd_settings( $wp_customize );\n}", "function ct_before_post_header() {\n\t// Your Code Here\n}", "public function add_header() {\n echo '<div id=\"tribe-community-events\" class=\"tribe-community-events form login-form\">';\n tribe_get_template_part( 'community/modules/header-links' );\n }", "function wpselect_custom_header_style() {\n\tif ( HEADER_TEXTCOLOR == get_header_textcolor() && HEADER_IMAGE == get_header_image() )\n\t\treturn;\n\t/** Header image CSS */\n\t$output = sprintf( '#header .wrap { background-image: url(%s); min-height: %spx }', esc_url( get_header_image() ), get_custom_header()->height );\n\t/** Header text color CSS, if showing text */\n\tif ( 'blank' != get_header_textcolor() )\n\t\t$output .= sprintf( '#title a, #title a:hover, #description { color: #%s; }', esc_html( get_header_textcolor() ) );\n\tprintf( '<style type=\"text/css\">%s</style>', $output );\n}", "function athemes_customize_register( $wp_customize ) {\t\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\n\n\t//___General___//\n $wp_customize->add_section(\n 'athemes_general',\n array(\n 'title' => __('General', 'lepays'),\n 'priority' => 9,\n )\n );\n\t//Logo Upload\n\t$wp_customize->add_setting(\n\t\t'site_logo',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t)\n\t);\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'site_logo',\n array(\n 'label' => __( 'Upload your logo', 'lepays' ),\n\t\t\t 'type' \t\t\t=> 'image',\n 'section' => 'athemes_general',\n 'settings' => 'site_logo',\n\t\t\t 'priority' => 9,\n )\n )\n );\n\t//Favicon Upload\n\t$wp_customize->add_setting(\n\t\t'site_favicon',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t)\n\t);\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'site_favicon',\n array(\n 'label' => __( 'Upload your favicon', 'lepays' ),\n\t\t\t 'type' \t\t\t=> 'image',\n 'section' => 'athemes_general',\n 'settings' => 'site_favicon',\n )\n )\n );\n\t//Apple touch icon 144\n\t$wp_customize->add_setting(\n\t\t'apple_touch_144',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t)\n\t);\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'apple_touch_144',\n array(\n 'label' => __( 'Upload your Apple Touch Icon (144x144 pixels)', 'lepays' ),\n\t\t\t 'type' \t\t\t=> 'image',\n 'section' => 'athemes_general',\n 'settings' => 'apple_touch_144',\n )\n )\n );\n\t//Apple touch icon 114\n\t$wp_customize->add_setting(\n\t\t'apple_touch_114',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t)\n\t);\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'apple_touch_114',\n array(\n 'label' => __( 'Upload your Apple Touch Icon (114x114 pixels)', 'lepays' ),\n\t\t\t 'type' \t\t\t=> 'image',\n 'section' => 'athemes_general',\n 'settings' => 'apple_touch_114',\n )\n )\n );\n\t//Apple touch icon 72\n\t$wp_customize->add_setting(\n\t\t'apple_touch_72',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t)\n\t);\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'apple_touch_72',\n array(\n 'label' => __( 'Upload your Apple Touch Icon (72x72 pixels)', 'lepays' ),\n\t\t\t 'type' \t\t\t=> 'image',\n 'section' => 'athemes_general',\n 'settings' => 'apple_touch_72',\n )\n )\n );\n\t//Apple touch icon 57\n\t$wp_customize->add_setting(\n\t\t'apple_touch_57',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t)\n\t);\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'apple_touch_57',\n array(\n 'label' => __( 'Upload your Apple Touch Icon (57x57 pixels)', 'lepays' ),\n\t\t\t 'type' \t\t\t=> 'image',\n 'section' => 'athemes_general',\n 'settings' => 'apple_touch_57',\n )\n )\n );\n\t//**Content/excerpt**//\n $wp_customize->add_section(\n 'athemes_excerpt',\n array(\n 'title' => __('Content/Excerpt', 'lepays' ),\n\t\t\t'description' => __('Check the boxes below to display the content instead of the excerpt.', 'lepays'),\n 'priority' => 10,\n )\n );\n\t// Home\n\t$wp_customize->add_setting(\n\t\t'athemes_home_excerpt',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_checkbox',\n\t\t)\t\t\n\t);\n\t$wp_customize->add_control(\n\t\t'athemes_home_excerpt',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __('Blog index', 'lepays'),\n\t\t\t'section' => 'athemes_excerpt',\n\t\t)\n\t);\n\t// Archive\n\t$wp_customize->add_setting(\n\t\t'athemes_arch_excerpt',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_checkbox',\n\t\t)\t\t\n\t);\n\t$wp_customize->add_control(\n\t\t'athemes_arch_excerpt',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __('Archives, tags, categories, author', 'lepays'),\n\t\t\t'section' => 'athemes_excerpt',\n\t\t)\n\t);\t\n\t// Search\n\t$wp_customize->add_setting(\n\t\t'athemes_search_excerpt',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_checkbox',\n\t\t)\t\t\n\t);\n\t$wp_customize->add_control(\n\t\t'athemes_search_excerpt',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __('Search', 'lepays'),\n\t\t\t'section' => 'athemes_excerpt',\n\t\t)\n\t); \n\n\t//___Single posts___//\n $wp_customize->add_section(\n 'athemes_singles',\n array(\n 'title' => __('Single posts/pages', 'lepays'),\n 'priority' => 13,\n )\n );\n\t//Single posts\n\t$wp_customize->add_setting(\n\t\t'athemes_post_img',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_checkbox',\n\t\t)\t\t\n\t);\n\t$wp_customize->add_control(\n\t\t'athemes_post_img',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __('Check this box to show featured images on single posts', 'lepays'),\n\t\t\t'section' => 'athemes_singles',\n\t\t)\n\t);\n\t//Pages\n\t$wp_customize->add_setting(\n\t\t'athemes_page_img',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_checkbox',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'athemes_page_img',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __('Check this box to show featured images on pages', 'lepays'),\n\t\t\t'section' => 'athemes_singles',\n\t\t)\n\t);\n\t//Author bio\n\t$wp_customize->add_setting(\n\t\t'author_bio',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_checkbox',\n\t\t)\t\t\n\t);\n\t$wp_customize->add_control(\n\t\t'author_bio',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __('Check this box to hide the author bio on single posts.', 'lepays'),\n\t\t\t'section' => 'athemes_singles',\n\t\t)\n\t);\n\t//___Colors___//\n\t\n\t//Primary color\n\t$wp_customize->add_setting(\n\t\t'main_color',\n\t\tarray(\n\t\t\t'default'\t\t\t=> '#ff2828',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'main_color',\n\t\t\tarray(\n\t\t\t\t'label' => __('Main color', 'lepays'),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'main_color',\n\t\t\t\t'priority' => 13\n\t\t\t)\n\t\t)\n\t);\n\t//Site title\n\t$wp_customize->add_setting(\n\t\t'site_title',\n\t\tarray(\n\t\t\t'default'\t\t\t=> '#fff',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t'transport'\t\t\t=> 'postMessage'\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'site_title',\n\t\t\tarray(\n\t\t\t\t'label' => __('Site title', 'lepays'),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'site_title',\n\t\t\t\t'priority' => 14\n\t\t\t)\n\t\t)\n\t);\n\t//Site description\n\t$wp_customize->add_setting(\n\t\t'site_desc',\n\t\tarray(\n\t\t\t'default'\t\t\t=> '#999999',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t'transport'\t\t\t=> 'postMessage'\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'site_desc',\n\t\t\tarray(\n\t\t\t\t'label' => __('Site description', 'lepays'),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'site_desc',\n\t\t\t\t'priority' => 15\n\t\t\t)\n\t\t)\n\t);\n\t//Entry title\n\t$wp_customize->add_setting(\n\t\t'entry_title',\n\t\tarray(\n\t\t\t'default'\t\t\t=> '#222222',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t'transport'\t\t\t=> 'postMessage'\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'entry_title',\n\t\t\tarray(\n\t\t\t\t'label' => __('Entry title', 'lepays'),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'entry_title',\n\t\t\t\t'priority' => 16\n\t\t\t)\n\t\t)\n\t);\t\n\t//Body\n\t$wp_customize->add_setting(\n\t\t'body_text',\n\t\tarray(\n\t\t\t'default'\t\t\t=> '#333',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t'transport'\t\t\t=> 'postMessage'\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'body_text',\n\t\t\tarray(\n\t\t\t\t'label' => __('Text', 'lepays'),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'body_text',\n\t\t\t\t'priority' => 17\n\t\t\t)\n\t\t)\n\t);\n\t//___Fonts___//\n $wp_customize->add_section(\n 'athemes_typography',\n array(\n 'title' => __('Fonts', 'lepays' ),\n 'priority' => 15,\n )\n );\n\t$font_choices = \n\t\tarray(\n\t\t\t'Source Sans Pro:400,700,400italic,700italic' => 'Source Sans Pro',\t\t\n\t\t\t'Droid Sans:400,700' => 'Droid Sans',\n\t\t\t'Lato:400,700,400italic,700italic' => 'Lato',\n\t\t\t'Arvo:400,700,400italic,700italic' => 'Arvo',\n\t\t\t'Lora:400,700,400italic,700italic' => 'Lora',\n\t\t\t'PT Sans:400,700,400italic,700italic' => 'PT Sans',\n\t\t\t'PT+Sans+Narrow:400,700' => 'PT Sans Narrow',\n\t\t\t'Arimo:400,700,400italic,700italic' => 'Arimo',\n\t\t\t'Ubuntu:400,700,400italic,700italic' => 'Ubuntu',\n\t\t\t'Bitter:400,700,400italic' => 'Bitter',\n\t\t\t'Droid Serif:400,700,400italic,700italic' => 'Droid Serif',\n\t\t\t'Open+Sans:400italic,700italic,400,700' => 'Open Sans',\n\t\t\t'Roboto:400,400italic,700,700italic' => 'Roboto',\n\t\t\t'Oswald:400,700' => 'Oswald',\n\t\t\t'Open Sans Condensed:700,300italic,300' => 'Open Sans Condensed',\n\t\t\t'Roboto Condensed:400italic,700italic,400,700' => 'Roboto Condensed',\n\t\t\t'Raleway:400,700' => 'Raleway',\n\t\t\t'Roboto Slab:400,700' => 'Roboto Slab',\n\t\t\t'Yanone Kaffeesatz:400,700' => 'Yanone Kaffeesatz',\n\t\t\t'Rokkitt:400' => 'Rokkitt',\n\t\t);\n\t\n\t$wp_customize->add_setting(\n\t\t'headings_fonts',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_fonts',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'headings_fonts',\n\t\tarray(\n\t\t\t'type' => 'select',\n\t\t\t'label' => __('Select your desired font for the headings.', 'lepays'),\n\t\t\t'section' => 'athemes_typography',\n\t\t\t'choices' => $font_choices\n\t\t)\n\t);\n\t\n\t$wp_customize->add_setting(\n\t\t'body_fonts',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'athemes_sanitize_fonts',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'body_fonts',\n\t\tarray(\n\t\t\t'type' => 'select',\n\t\t\t'label' => __('Select your desired font for the body.', 'lepays'),\n\t\t\t'section' => 'athemes_typography',\n\t\t\t'choices' => $font_choices\n\t\t)\n\t);\t\t\n\n}", "public function user_custom_scripts() {\n\n\t\tif ( get_key('cs_head') ) {\n\n\t\t\tadd_action('wp_head', function() {\n\t\t\t\tthe_key('cs_head');\n\t\t\t});\n\t\t}\n\n\n\t\tif ( get_key('cs_body_open') ) {\n\n\t\t\tadd_action('get_header', function() {\n\t\t\t\tthe_key('cs_body_open');\n\t\t\t});\n\t\t}\n\n\n\t\tif ( get_key('cs_body_close') ) {\n\n\t\t\tadd_action('wp_footer', function() {\n\t\t\t\tthe_key('cs_body_close');\n\t\t\t});\n\t\t}\n\t}", "public function hooks() {\n\n\t\tadd_action( 'customize_register', \tarray( $this, 'register_panels' ) );\n\t\tadd_action( 'customize_register', \tarray( $this, 'register_sections' ) );\n\t\tadd_action( 'customize_register', \tarray( $this, 'register_fields' ) );\n\t\tadd_action( 'wp_head', \t\t\t\tarray( $this, 'header_output' ) );\n\t\tadd_action( 'customize_register', \tarray( $this, 'load_customize_controls' ), 0 );\n\n\t}", "function themename_custom_logo_setup() {\n $defaults = array(\n 'height' => 400,\n 'width' => 400,\n 'flex-height' => true,\n 'flex-width' => true,\n 'header-text' => array( 'site-title', 'site-description' ),\n );\n add_theme_support( 'custom-logo', $defaults );\n }", "public static function register ( $wp_customize ) {\n\t\t$wp_customize->remove_section('background_image');\n\t\t$wp_customize->remove_section('colors');\n\t\t$wp_customize->remove_section('header_image');\n\t\t\n\t\t\t\n\t\t/**** Google Options ****/\n\t\t$wp_customize->add_section( 'google_options' , array(\n\t\t\t'title' => esc_html__( 'Google Options', 'luxortheme' ),\n\t\t\t'priority' => 1,\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'googleAPIKey', array(\n\t\t\t\t'default' => \"\",\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'googleAPIKey',\n\t\t\t array(\n\t\t\t\t'label' => esc_html__( 'API KEY', 'luxortheme' ),\n\t\t\t \t'section' => 'google_options',\n\t\t\t\t'description' => __('Insert your Google API key (browser key) to activate Google services such as Google Maps and Google Places.', 'luxortheme'),\n\t\t\t\t'priority' => 1,\n\t\t\t )\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_setting( 'googleMapsMarkerImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'googleMapsMarkerImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Google Maps Marker Image', 'luxortheme' ),\n\t\t\t\t'section' => 'google_options',\n\t\t\t\t'settings' => 'googleMapsMarkerImage',\n\t\t\t\t'priority' => 2,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t/**** Header Options ****/\n\t\t$wp_customize->add_section( 'header_options' , array(\n\t\t\t'title' => esc_html__( 'Header Options', 'luxortheme' ),\n\t\t\t'priority' => 20,\n\t\t));\n\t\t\n\t\t//Upload Options\n\t\t$wp_customize->add_setting( 'companyLogo', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'companyLogo', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Header Logo', 'luxortheme' ),\n\t\t\t\t'section' => 'header_options',\n\t\t\t\t'settings' => 'companyLogo',\n\t\t\t\t'priority' => 1,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting( 'menuLogo', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'menuLogo', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Menu Logo', 'luxortheme' ),\n\t\t\t\t'section' => 'header_options',\n\t\t\t\t'settings' => 'menuLogo',\n\t\t\t\t'priority' => 2,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting( 'globalHeaderImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'globalHeaderImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Global Header Image (Pages and Posts)', 'luxortheme' ),\n\t\t\t\t'section' => 'header_options',\n\t\t\t\t'settings' => 'globalHeaderImage',\n\t\t\t\t'priority' => 3,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting( 'globalHeaderImage2', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'globalHeaderImage2', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Global Header Image (Archives, 404, etc.)', 'luxortheme' ),\n\t\t\t\t'section' => 'header_options',\n\t\t\t\t'settings' => 'globalHeaderImage2',\n\t\t\t\t'priority' => 4,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t\n\t\t//Radio Options\t\t\t\t\t\t\t\n\t\t$wp_customize->add_setting('enableBreadCrumbs', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableBreadCrumbs', array(\n\t\t\t'label' => esc_html__('Display Breadcrumbs?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'enableBreadCrumbs',\n\t\t\t'priority' => 5,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t\n\t\t$wp_customize->add_setting('enableLanguageSelector', array(\n\t\t\t'default' => 'off',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableLanguageSelector', array(\n\t\t\t'label' => esc_html__('Display WPML Language selector?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'enableLanguageSelector',\n\t\t\t'priority' => 6,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t\t\t\n\t\t\n\t\t$wp_customize->add_setting('enableSearch', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableSearch', array(\n\t\t\t'label' => esc_html__('Display Search Field?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'enableSearch',\n\t\t\t'priority' => 7,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t\n\t\t$wp_customize->add_setting('enableLoginBtn', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableLoginBtn', array(\n\t\t\t'label' => esc_html__('Display Login Button?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'enableLoginBtn',\n\t\t\t'priority' => 8,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('enableRegisterBtn', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableRegisterBtn', array(\n\t\t\t'label' => esc_html__('Display Register Button?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'enableRegisterBtn',\n\t\t\t'priority' => 9,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('enableMenuSocialIcons', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableMenuSocialIcons', array(\n\t\t\t'label' => esc_html__('Display Menu Social Icons?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'enableMenuSocialIcons',\n\t\t\t'priority' => 10,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displaySubHeader', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displaySubHeader', array(\n\t\t\t'label' => esc_html__('Display Sub-Header?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'displaySubHeader',\n\t\t\t'priority' => 11,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('headerNavigationMode', array(\n\t\t\t'default' => 'minimized',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('headerNavigationMode', array(\n\t\t\t'label' => esc_html__('Navigation Mode', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'headerNavigationMode',\n\t\t\t'description' => __('Choose between a minimized Hamburger style menu or full desktop menu.', 'luxortheme'),\n\t\t\t'priority' => 12,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'minimized' => __('Minimized', 'luxortheme'),\n\t\t\t\t'desktop' => __('Desktop', 'luxortheme'),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('desktopNavPosition', array(\n\t\t\t'default' => 'bottom',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('desktopNavPosition', array(\n\t\t\t'label' => esc_html__('Desktop Nav Position', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'desktopNavPosition',\n\t\t\t'description' => __('Position the desktop navigation above or below the header area. (Only applies if Desktop Navigation mode is active)', 'luxortheme'),\n\t\t\t'priority' => 13,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'top' => __('Top', 'luxortheme'),\n\t\t\t\t'bottom' => __('Bottom', 'luxortheme'),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('desktopStickyNav', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('desktopStickyNav', array(\n\t\t\t'label' => esc_html__('Enable stickiness?', 'luxortheme'),\n\t\t\t'section' => 'header_options',\n\t\t\t'settings' => 'desktopStickyNav',\n\t\t\t'description' => __('Only applies to desktop menu.', 'luxortheme'),\n\t\t\t'priority' => 14,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t\n\t\t//Textfields\n\t\t$wp_customize->add_setting(\n\t\t\t'searchFieldText', array(\n\t\t\t\t'default' => esc_html__( 'Search Articles...', 'luxortheme' ),\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'searchFieldText',\n\t\t\t array(\n\t\t\t\t'label' => esc_html__( 'Search field text (applies globally)', 'luxortheme' ),\n\t\t\t \t'section' => 'header_options',\n\t\t\t\t'priority' => 15,\n\t\t\t )\n\t\t);\n\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'companyLogoAltTag', array(\n\t\t\t\t'default' => \"\",\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'companyLogoAltTag',\n\t\t\t array(\n\t\t\t\t'label' => esc_html__( 'Company Logo Alt Tag', 'luxortheme' ),\n\t\t\t \t'section' => 'header_options',\n\t\t\t\t'priority' => 16,\n\t\t\t )\n\t\t);\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'companyLogoURL', array(\n\t\t\t\t'default' => \"\",\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'companyLogoURL',\n\t\t\t array(\n\t\t\t\t'label' => esc_html__( 'Company Logo URL', 'luxortheme' ),\n\t\t\t \t'section' => 'header_options',\n\t\t\t\t'priority' => 17,\n\t\t\t )\n\t\t);\t\n\n\t\t\n\t\t$wp_customize->add_setting( 'headerBgOpacity', array(\n\t\t\t'default' => 80,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'headerBgOpacity', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'header_options',\n\t\t\t'label' => esc_html__( 'Header Background opacity', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the background opacity of the header area. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 18,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 0,\n\t\t\t\t'max' => 100,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting( 'mainNavBgOpacity', array(\n\t\t\t'default' => 90,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'mainNavBgOpacity', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'header_options',\n\t\t\t'label' => esc_html__( 'Menu Background opacity', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the background opacity of the main navigation. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 19,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 0,\n\t\t\t\t'max' => 100,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\n\t\t\n\t\t$wp_customize->add_setting( 'headerPadding', array(\n\t\t\t'default' => 25,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'headerPadding', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'header_options',\n\t\t\t'label' => esc_html__( 'Header Padding', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the vertical padding of the header area.', 'luxortheme'),\n\t\t\t'priority' => 20,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 1,\n\t\t\t\t'max' => 100,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\t\t\n\t\t\n\t\t\t\t\n\t\t//Header Option Colors\n\t\t$headerOptionColors = array();\n\t\t\n\t\t$headerOptionColors[] = array(\n\t\t\t'slug'=>'mainNavBackgroundColor', \n\t\t\t'default' => '#000000',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Header Background Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the header area. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t$headerOptionColors[] = array(\n\t\t\t'slug'=>'menuBorderColor', \n\t\t\t'default' => '#353535',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Menu Border Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the border color of the main navigation.', 'luxortheme')\n\t\t);\n\t\t$headerOptionColors[] = array(\n\t\t\t'slug'=>'subpageHeaderBackgroundColor', \n\t\t\t'default' => '#3f3f3f',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Subpage Header Background Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the sub-header area.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$headerOptionColors[] = array(\n\t\t\t'slug'=>'pageTitleBackgroundColor', \n\t\t\t'default' => '#000000',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Page Title/Message Background Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the page title and message. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\t\t\n\t\t$priorityHeaderColors = 50;\n\t\t\n\t\tforeach( $headerOptionColors as $color ) {\n\t\t\t\n\t\t\t$priorityHeaderColors += 10;\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t\t'sanitize_callback' => 'esc_attr',\n\t\t\t\t)\n\t\t\t);\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'section' => 'header_options',\n\t\t\t\t\t'priority' => $priorityHeaderColors,\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'settings' => $color['slug'])\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$priorityHeaderColors++;\n\t\t\t\n\t\t}//end of foreach\n\t\t\n\t\t\n\t\t\t\n\t\t/**** Layout Options ****/\n\t\t$wp_customize->add_section( 'layout_options' , array(\n\t\t\t'title' => esc_html__( 'Layout Options', 'luxortheme' ),\n\t\t\t'priority' => 60,\n\t\t));\n\t\t\n\t\t//Radio Options\n\t\t$wp_customize->add_setting('enableBoxMode', array(\n\t\t\t'default' => 'off',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableBoxMode', array(\n\t\t\t'label' => esc_html__('1170 Boxed Mode', 'luxortheme'),\n\t\t\t'section' => 'layout_options',\n\t\t\t'settings' => 'enableBoxMode',\n\t\t\t'priority' => 10,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'homepageLayout', array(\n\t\t\t\t'default' => 'no-sidebar',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( new pm_ln_Customize_Radio_Control( \n\t\t\t$wp_customize, 'homepageLayout', \n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Homepage Layout', 'luxortheme' ),\n\t\t\t\t\t'section' => 'layout_options',\n\t\t\t\t\t'settings' => 'homepageLayout',\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'mode' => 'image',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'no-sidebar' => get_template_directory_uri() . '/css/img/layouts/no-sidebar.png',\n\t\t\t\t\t\t'left-sidebar' => get_template_directory_uri() . '/css/img/layouts/left-sidebar.png',\n\t\t\t\t\t\t'right-sidebar' => get_template_directory_uri() . '/css/img/layouts/right-sidebar.png',\n\t\t\t\t\t),\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'universalLayout', array(\n\t\t\t\t'default' => 'no-sidebar',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( new pm_ln_Customize_Radio_Control( \n\t\t\t$wp_customize, 'universalLayout', \n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Universal Layout (Tag - Archive - Category)', 'luxortheme' ),\n\t\t\t\t\t'section' => 'layout_options',\n\t\t\t\t\t'settings' => 'universalLayout',\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'mode' => 'image',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'no-sidebar' => get_template_directory_uri() . '/css/img/layouts/no-sidebar.png',\n\t\t\t\t\t\t'left-sidebar' => get_template_directory_uri() . '/css/img/layouts/left-sidebar.png',\n\t\t\t\t\t\t'right-sidebar' => get_template_directory_uri() . '/css/img/layouts/right-sidebar.png',\n\t\t\t\t\t),\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'footerLayout', array(\n\t\t\t\t'default' => 'footer-four-columns',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( new pm_ln_Customize_Radio_Control( \n\t\t\t$wp_customize, 'footerLayout', \n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Footer Layout', 'luxortheme' ),\n\t\t\t\t\t'section' => 'layout_options',\n\t\t\t\t\t'settings' => 'footerLayout',\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'mode' => 'image',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'footer-one-column' => get_template_directory_uri() . '/css/img/layouts/footer-one-column.png',\n\t\t\t\t\t\t'footer-two-columns' => get_template_directory_uri() . '/css/img/layouts/footer-two-columns.png',\n\t\t\t\t\t\t'footer-three-columns' => get_template_directory_uri() . '/css/img/layouts/footer-three-columns.png',\n\t\t\t\t\t\t'footer-four-columns' => get_template_directory_uri() . '/css/img/layouts/footer-four-columns.png',\n\t\t\t\t\t\t'footer-three-wide-left' => get_template_directory_uri() . '/css/img/layouts/footer-three-wide-left.png',\n\t\t\t\t\t\t'footer-three-wide-right' => get_template_directory_uri() . '/css/img/layouts/footer-three-wide-right.png',\n\t\t\t\t\t),\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t\n\t\t/**** Footer Options ****/\n\t\t$wp_customize->add_section( 'footer_options' , array(\n\t\t\t'title' => esc_html__( 'Footer Options', 'luxortheme' ),\n\t\t\t'priority' => 70,\n\t\t));\n\t\t\t\n\t\t//Images\n\t\t$wp_customize->add_setting( 'footerLogo', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'footerLogo', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Footer Logo', 'luxortheme' ),\n\t\t\t\t'section' => 'footer_options',\n\t\t\t\t'settings' => 'footerLogo',\n\t\t\t\t'priority' => 1,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting( 'fatFooterBackgroundImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'fatFooterBackgroundImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Footer Background Image', 'luxortheme' ),\n\t\t\t\t'section' => 'footer_options',\n\t\t\t\t'settings' => 'fatFooterBackgroundImage',\n\t\t\t\t'priority' => 2,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\n\t\t\t\n\t\t//Radio Options\n\t\t$wp_customize->add_setting('toggle_footer', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggle_footer', array(\n\t\t\t'label' => esc_html__('Display Footer?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'toggle_footer',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 3,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t\n\t\t$wp_customize->add_setting('toggleParallaxFooter', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggleParallaxFooter', array(\n\t\t\t'label' => esc_html__('Run Parallax on Footer?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'toggleParallaxFooter',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 4,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('toggle_footerWidgets', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggle_footerWidgets', array(\n\t\t\t'label' => esc_html__('Display Footer Widgets?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'toggle_footerWidgets',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 5,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t$wp_customize->add_setting('toggle_footer_socialIcons', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggle_footer_socialIcons', array(\n\t\t\t'label' => esc_html__('Display Social Icons?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'toggle_footer_socialIcons',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 6,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayFooterLogo', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayFooterLogo', array(\n\t\t\t'label' => esc_html__('Display Footer Logo?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'displayFooterLogo',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 7,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayFooterStats', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayFooterStats', array(\n\t\t\t'label' => esc_html__('Display Footer Stats?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'displayFooterStats',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 8,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayCopyright', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayCopyright', array(\n\t\t\t'label' => esc_html__('Display Copyright?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'displayCopyright',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 9,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayBusinessInfo', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayBusinessInfo', array(\n\t\t\t'label' => esc_html__('Display Business Info?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'displayBusinessInfo',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 10,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayLoginButton', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayLoginButton', array(\n\t\t\t'label' => esc_html__('Display Login Button?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'displayLoginButton',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 11,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('toggle_footerNav', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggle_footerNav', array(\n\t\t\t'label' => esc_html__('Display Footer Navigation?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'toggle_footerNav',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 12,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('toggle_backtotop', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggle_backtotop', array(\n\t\t\t'label' => esc_html__('Display Back To Top Button?', 'luxortheme'),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'toggle_backtotop',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 13,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t//Textfields\n\t\t$wp_customize->add_setting(\n\t\t\t'statInfo1', array(\n\t\t\t\t'default' => '786 Agents Worldwide',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'statInfo1', array(\n\t\t\t'label' => esc_html__( 'Stat info 1', 'luxortheme' ),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'statInfo1',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 14,\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'statInfo2', array(\n\t\t\t\t'default' => '3,344,543 Homes for sale',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'statInfo2', array(\n\t\t\t'label' => esc_html__( 'Stat info 2', 'luxortheme' ),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'statInfo2',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 15,\n\t\t) );\n\t\t\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'businessPhoneIcon', array(\n\t\t\t\t'default' => 'fa fa-mobile',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'businessPhoneIcon', array(\n\t\t\t'label' => esc_html__( 'Business Phone Icon', 'luxortheme' ),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'businessPhoneIcon',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 17,\n\t\t) );\n\t\t\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'businessEmailIcon', array(\n\t\t\t\t'default' => 'fa fa-inbox',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'businessEmailIcon', array(\n\t\t\t'label' => esc_html__( 'Business Email Icon', 'luxortheme' ),\n\t\t\t'section' => 'footer_options',\n\t\t\t'settings' => 'businessEmailIcon',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 18,\n\t\t) );\n\n\n\t\t//Slider elements\t\n\t\t$wp_customize->add_setting( 'fatFooterPadding', array(\n\t\t\t'default' => 100,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'fatFooterPadding', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'footer_options',\n\t\t\t'label' => esc_html__( 'Fat Footer Padding', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the vertical padding of the fat footer area.', 'luxortheme'),\n\t\t\t'priority' => 18,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 0,\n\t\t\t\t'max' => 120,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\t\t\n\t\t$FooterColors = array();\n\n\t\t$FooterColors[] = array(\n\t\t\t'slug'=>'fatFooterBackgroundColor', \n\t\t\t'default' => '#191B27',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Fat Footer Background Color.', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the header area. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\n\t\t$priorityFooterCounter = 50;\n\t\t\n\t\tforeach( $FooterColors as $color ) {\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'sanitize_callback' => 'esc_attr',\n\t\t\t\t\t'capability' => 'edit_theme_options'\n\t\t\t\t)\n\t\t\t);\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'section' => 'footer_options',\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'priority' => $priorityFooterCounter,\n\t\t\t\t\t'settings' => $color['slug'])\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$priorityFooterCounter++;\n\t\t\t\n\t\t}//end of foreach\n\t\t\n\t\t\n\t\t/**** Global Options ****/\n\t\t$wp_customize->add_section( 'global_options' , array(\n\t\t\t'title' => esc_html__( 'Global Options', 'luxortheme' ),\n\t\t\t'priority' => 80,\n\t\t));\n\t\n\t\t\n\t\t$wp_customize->add_setting( 'pageBackgroundImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'pageBackgroundImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Background image', 'luxortheme' ),\n\t\t\t\t'section' => 'global_options',\n\t\t\t\t'settings' => 'pageBackgroundImage',\n\t\t\t\t'priority' => 2,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting('repeatBackground', array(\n\t\t\t'default' => 'repeat',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('repeatBackground', array(\n\t\t\t'label' => esc_html__('Background Repeat', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'repeatBackground',\n\t\t\t'priority' => 3,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'repeat' => 'Repeat',\n\t\t\t\t'repeat-x' => 'Repeat X',\n\t\t\t\t'repeat-y' => 'Repeat Y',\n\t\t\t\t'no-repeat' => 'No Repeat',\n\t\t\t),\n\t\t));\n\n\t\t\n\t\t$wp_customize->add_setting('enableTooltip', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableTooltip', array(\n\t\t\t'label' => esc_html__('ToolTip', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'enableTooltip',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 4,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\n\t\t$wp_customize->add_setting('retinaSupport', array(\n\t\t\t'default' => 'off',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('retinaSupport', array(\n\t\t\t'label' => esc_html__('Retina Support', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'retinaSupport',\n\t\t\t'priority' => 7,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\t\t\n\t\t\n\t\t\n\t\t$wp_customize->add_setting('currenySymbolPosition', array(\n\t\t\t'default' => 'left',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('currenySymbolPosition', array(\n\t\t\t'label' => esc_html__('Currency Symbol Position', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'currenySymbolPosition',\n\t\t\t'priority' => 7,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'left' => esc_html__( 'Left', 'luxortheme' ),\n\t\t\t\t'right' => esc_html__( 'Right', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$wp_customize->add_setting('displayConsentCheckbox', array(\n\t\t\t'default' => 'off',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayConsentCheckbox', array(\n\t\t\t'label' => esc_html__('Consent Checkbox', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'displayConsentCheckbox',\n\t\t\t'description' => esc_attr__('Use this option to enable a consent checkbox for all contact forms. This was added on May 26, 2018 for GDPR compliancy in Europe.', 'luxortheme' ),\n\t\t\t'priority' => 8,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'consentMessage', array(\n\t\t\t\t'default' => '',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( 'consentMessage', array(\n\t\t\t'label' => esc_html__('Consent Message', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'description' => esc_attr__('Add a message for the consent checkbox to all contact forms. NOTE: Only applies if \"Consent Checkbox\" option is set to ON', 'luxortheme' ),\n\t\t\t'settings' => 'consentMessage',\n\t\t\t'priority' => 9,\n\t\t\t'type' => 'textarea',\n\t\t) );\n\t\t\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'ulListIcon', array(\n\t\t\t\t'default' => 'f105',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( 'ulListIcon', array(\n\t\t\t'label' => esc_html__('UL List Icon', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'ulListIcon',\n\t\t\t'priority' => 10,\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'currencySymbol', array(\n\t\t\t\t'default' => '$',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( 'currencySymbol', array(\n\t\t\t'label' => esc_html__('Currency Symbol', 'luxortheme'),\n\t\t\t'section' => 'global_options',\n\t\t\t'settings' => 'currencySymbol',\n\t\t\t'priority' => 11,\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting('globalPageContainerPadding',\n\t\t\tarray(\n\t\t\t\t'default' => 'default',\n\t\t\t\t'sanitize_callback' => 'esc_attr',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control('globalPageContainerPadding',\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'priority' => 12,\n\t\t\t\t'label' => esc_attr__('Global Bootstrap Container Padding', 'luxortheme' ),\n\t\t\t\t'description' => esc_attr__('Use this option to apply a global container padding across all pages. The \"Default padding\" option will apply the actual page bootstrap container padding amount instead.', 'luxortheme' ),\n\t\t\t\t'section' => 'global_options',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'default' => 'Default padding',\n\t\t\t\t\t0 => 0,\n\t\t\t\t\t10 => 10,\n\t\t\t\t\t20 => 20,\n\t\t\t\t\t30 => 30,\n\t\t\t\t\t40 => 40,\n\t\t\t\t\t50 => 50,\n\t\t\t\t\t60 => 60,\n\t\t\t\t\t70 => 70,\n\t\t\t\t\t80 => 80,\n\t\t\t\t\t90 => 90,\n\t\t\t\t\t100 => 100,\n\t\t\t\t\t110 => 110,\n\t\t\t\t\t120 => 120,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\n\t\t$GlobalColors = array();\n\t\t\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'pageBackgroundColor', \n\t\t\t'default' => '#FFFFFF',\n\t\t\t'label' => esc_html__('Background Color', 'luxortheme')\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'boxedModeContainerColor', \n\t\t\t'default' => '#FFFFFF',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Boxed Mode Container Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the boxed mode container. Only applies if Boxed Mode is enabled.', 'luxortheme')\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'primaryColor', \n\t\t\t'default' => '#ffe1a0',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Primary Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the primary color of the Luxor theme. This color gets applied to multiple elements for a consistent design. Please note not all elements get updated in real-time - please save your settings and review the final changes on the front-end.', 'luxortheme'),\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'secondaryColor', \n\t\t\t'default' => '#7f6631',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Secondary Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the secondary color of the Luxor theme. This color gets applied to multiple elements for a consistent design. Please note not all elements get updated in real-time - please save your settings and review the final changes on the front-end.', 'luxortheme'),\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'dividerColor', \n\t\t\t'default' => '#8e8e8e',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Divider/Border Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the divider/border color of the Luxor theme. Applies to multiple elements throughout the theme.', 'luxortheme')\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'tooltipColor', \n\t\t\t'default' => '#ffe1a0',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('ToolTip Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the tooltip popup. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'blockQuoteColor', \n\t\t\t'default' => '#ffe1a0',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Blockquote Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the blockquote element. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t$GlobalColors[] = array(\n\t\t\t'slug'=>'ulListIconColor', \n\t\t\t'default' => '#ffe1a0',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('UL List icon color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the unordered list element icon. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\n\t\t$priority = 100;\n\t\t\n\t\tforeach( $GlobalColors as $color ) {\n\t\t\t\n\t\t\t$priority = $priority + 1;\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t\t)\n\t\t\t);\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'section' => 'global_options',\n\t\t\t\t\t'settings' => $color['slug'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'priority' => $priority,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}//end of foreach\n\t\t\t\t\t\n\t\t\t\t\n\t\t/**** Business Info ****/\n\t\t$wp_customize->add_setting('enableBusinessInfoHeader', array(\n\t\t\t'default' => 'off',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableBusinessInfoHeader', array(\n\t\t\t'label' => esc_html__('Display phone and email in header area?', 'luxortheme'),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'enableBusinessInfoHeader',\n\t\t\t'priority' => 1,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_section( 'business_info' , array(\n\t\t\t'title' => esc_html__( 'Business Info', 'luxortheme' ),\n\t\t\t'priority' => 100,\n\t\t));\n\t\t\n\t\t//Textfields\n\t\t$wp_customize->add_setting(\n\t\t\t'businessPhone', array(\n\t\t\t\t'default' => '1-888-555-6548',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'businessPhone', array(\n\t\t\t'label' => esc_html__( 'Business Phone', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'businessPhone',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'businessEmail', array(\n\t\t\t\t'default' => 'info@luxorrealty.com',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'businessEmail', array(\n\t\t\t'label' => esc_html__( 'Email Address', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'businessEmail',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Facebook Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'facebooklink', array(\n\t\t\t\t'default' => 'http://www.facebook.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'facebooklink', array(\n\t\t\t'label' => esc_html__( 'Facebook URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'facebooklink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Twitter Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'twitterlink', array(\n\t\t\t\t'default' => 'http://www.twitter.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'twitterlink', array(\n\t\t\t'label' => esc_html__( 'Twitter URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'twitterlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Google Plus Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'googlelink', array(\n\t\t\t\t'default' => 'http://www.googleplus.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'googlelink', array(\n\t\t\t'label' => esc_html__( 'Google Plus URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'googlelink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Linkedin Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'linkedinLink', array(\n\t\t\t\t'default' => 'http://www.linkedin.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'linkedinLink', array(\n\t\t\t'label' => esc_html__( 'Linkedin URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'linkedinLink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Vimeo Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'vimeolink', array(\n\t\t\t\t'default' => 'http://www.vimeo.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'vimeolink', array(\n\t\t\t'label' => esc_html__( 'Vimeo URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'vimeolink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Youtube Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'youtubelink', array(\n\t\t\t\t'default' => 'http://www.youtube.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'youtubelink', array(\n\t\t\t'label' => esc_html__( 'YouTube URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'youtubelink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Dribbble Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'dribbblelink', array(\n\t\t\t\t'default' => 'http://www.dribbble.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'dribbblelink', array(\n\t\t\t'label' => esc_html__( 'Dribbble URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'dribbblelink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Pinterest Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'pinterestlink', array(\n\t\t\t\t'default' => 'http://www.pinterest.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'pinterestlink', array(\n\t\t\t'label' => esc_html__( 'Pinterest URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'pinterestlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Instagram Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'instagramlink', array(\n\t\t\t\t'default' => 'http://www.instagram.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'instagramlink', array(\n\t\t\t'label' => esc_html__( 'Instagram URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'instagramlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\n\t\t\n\t\t//Skype Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'skypelink', array(\n\t\t\t\t'default' => '',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'skypelink', array(\n\t\t\t'label' => esc_html__( 'Skype Name', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'skypelink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Flickr Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'flickrlink', array(\n\t\t\t\t'default' => 'http://www.flickr.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'flickrlink', array(\n\t\t\t'label' => esc_html__( 'Flickr URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'flickrlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Tumblr Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'tumblrlink', array(\n\t\t\t\t'default' => 'http://www.tumblr.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'tumblrlink', array(\n\t\t\t'label' => esc_html__( 'Tumblr URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'tumblrlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Stumbleupon\n\t\t$wp_customize->add_setting(\n\t\t\t'stumbleuponlink', array(\n\t\t\t\t'default' => 'http://www.stumbleupon.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'stumbleuponlink', array(\n\t\t\t'label' => esc_html__( 'StumbleUpon URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'stumbleuponlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//Reddit\n\t\t$wp_customize->add_setting(\n\t\t\t'redditlink', array(\n\t\t\t\t'default' => 'http://www.reddit.com',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'redditlink', array(\n\t\t\t'label' => esc_html__( 'Reddit URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'redditlink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t//RSS Icon\n\t\t$wp_customize->add_setting(\n\t\t\t'rssLink', array(\n\t\t\t\t'default' => '',\n\t\t\t\t'sanitize_callback' => 'esc_html'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$wp_customize->add_control( 'rssLink', array(\n\t\t\t'label' => esc_html__( 'RSS URL', 'luxortheme' ),\n\t\t\t'section' => 'business_info',\n\t\t\t'settings' => 'rssLink',\n\t\t\t'type' => 'text',\n\t\t) );\n\t\t\n\t\t\n\t\t\n\t\t/**** Post Options ****/\n\t\t$wp_customize->add_section( 'post_options' , array(\n\t\t\t'title' => esc_html__( 'Post Options', 'luxortheme' ),\n\t\t\t'priority' => 120,\n\t\t));\n\t\t\n\t\t/* Upload options */\n\t\t$wp_customize->add_setting( 'authorBackgroundImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'authorBackgroundImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Author Background Image', 'luxortheme' ),\n\t\t\t\t'section' => 'post_options',\n\t\t\t\t'settings' => 'authorBackgroundImage',\n\t\t\t\t'priority' => 1,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t$wp_customize->add_setting( 'commentsBackgroundImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'commentsBackgroundImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Comments Background Image', 'luxortheme' ),\n\t\t\t\t'section' => 'post_options',\n\t\t\t\t'settings' => 'commentsBackgroundImage',\n\t\t\t\t'priority' => 1,\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\t\t\t\t\n\t\t//Textfields\n\t\t\n\t\t//Radio options\n\t\t$wp_customize->add_setting('displayAuthorProfile', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayAuthorProfile', array(\n\t\t\t'label' => esc_html__('Display Author Profile?', 'luxortheme'),\n\t\t\t'section' => 'post_options',\n\t\t\t'settings' => 'displayAuthorProfile',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 3,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('toggleParallaxAuthor', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('toggleParallaxAuthor', array(\n\t\t\t'label' => esc_html__('Enable Parallax on Author and Comments?', 'luxortheme'),\n\t\t\t'section' => 'post_options',\n\t\t\t'settings' => 'toggleParallaxAuthor',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 4,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displaySocialFeatures', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displaySocialFeatures', array(\n\t\t\t'label' => esc_html__('Display Social Features?', 'luxortheme'),\n\t\t\t'section' => 'post_options',\n\t\t\t'settings' => 'displaySocialFeatures',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 5,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayRelatedPosts', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayRelatedPosts', array(\n\t\t\t'label' => esc_html__('Display Related Posts?', 'luxortheme'),\n\t\t\t'section' => 'post_options',\n\t\t\t'settings' => 'displayRelatedPosts',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 6,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('displayComments', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('displayComments', array(\n\t\t\t'label' => esc_html__('Display Comments?', 'luxortheme'),\n\t\t\t'section' => 'post_options',\n\t\t\t'settings' => 'displayComments',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 7,\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\n\t\t$wp_customize->add_setting(\n\t\t\t'relatedPropertiesTitle', array(\n\t\t\t\t'default' => esc_html__(\"Similar Properties\", 'luxortheme'),\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'relatedPropertiesTitle',\n\t\t\t array(\n\t\t\t\t'label' => esc_html__( 'Related Properties title', 'luxortheme' ),\n\t\t\t \t'section' => 'post_options',\n\t\t\t\t'priority' => 8,\n\t\t\t )\n\t\t);\n\t\t\n\t\t\n\t\t$PostColors = array();\n\t\t\n\t\t\n\t\t$PostColors[] = array(\n\t\t\t'slug'=>'authorCommentsBoxColor', \n\t\t\t'default' => '#2B2B2B',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Author/Comments Box Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the author profile container and the comments box container.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$PostColors[] = array(\n\t\t\t'slug'=>'featuredPropertyRibbon', \n\t\t\t'default' => '#EA3D36',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Featured Property Ribbon', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the ribbon which appears on featured properties.', 'luxortheme')\n\t\t);\n\t\t\t\t\n\t\tforeach( $PostColors as $color ) {\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'section' => 'post_options',\n\t\t\t\t\t'settings' => $color['slug'],\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t}//end of foreach\n\t\t\n\t\t\n\t\t/**** Custom Post Type Options ****/\n\t\t$wp_customize->add_section( 'custom_post_type_options' , array(\n\t\t\t'title' => esc_html__( 'Custom Post Type Options', 'luxortheme' ),\n\t\t\t'priority' => 130,\n\t\t));\n\t\t\t\t\n\t\t$wp_customize->add_setting('agent_posts_per_load',\n\t\t\tarray(\n\t\t\t\t'default' => '3',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control('agent_posts_per_load',\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'priority' => 4,\n\t\t\t\t'label' => esc_html__( 'Agent Posts Per Load', 'luxortheme' ),\n\t\t\t\t'section' => 'custom_post_type_options',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'3' => '3',\n\t\t\t\t\t'6' => '6',\n\t\t\t\t\t'9' => '9',\n\t\t\t\t\t'12' => '12',\n\t\t\t\t\t'15' => '15',\n\t\t\t\t\t'-1' => esc_html__('View All','luxortheme')\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_setting('agentPostOrder', array(\n\t\t\t'default' => 'DESC',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('agentPostOrder', array(\n\t\t\t'label' => esc_html__('Agent Post Order', 'luxortheme'),\n\t\t\t'section' => 'custom_post_type_options',\n\t\t\t'settings' => 'agentPostOrder',\n\t\t\t'type' => 'radio',\n\t\t\t'priority' => 5,\n\t\t\t'choices' => array(\n\t\t\t\t'ASC' => esc_html__('Ascending','luxortheme'),\n\t\t\t\t'DESC' => esc_html__('Descending','luxortheme')\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('properties_posts_per_load',\n\t\t\tarray(\n\t\t\t\t'default' => '4',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control('properties_posts_per_load',\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'priority' => 6,\n\t\t\t\t'label' => esc_html__( 'Property Posts Per Load', 'luxortheme' ),\n\t\t\t\t'section' => 'custom_post_type_options',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'4' => '4',\n\t\t\t\t\t'8' => '8',\n\t\t\t\t\t'12' => '12',\n\t\t\t\t\t'16' => '16',\n\t\t\t\t\t'19' => '19',\n\t\t\t\t\t'21' => '21',\n\t\t\t\t\t'-1' => esc_html__('View All','luxortheme')\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_setting('agencies_posts_per_load',\n\t\t\tarray(\n\t\t\t\t'default' => '4',\n\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control('agencies_posts_per_load',\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'priority' => 7,\n\t\t\t\t'label' => esc_html__( 'Agencies Posts Per Load', 'luxortheme' ),\n\t\t\t\t'section' => 'custom_post_type_options',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'4' => '4',\n\t\t\t\t\t'8' => '8',\n\t\t\t\t\t'12' => '12',\n\t\t\t\t\t'16' => '16',\n\t\t\t\t\t'19' => '19',\n\t\t\t\t\t'21' => '21',\n\t\t\t\t\t'-1' => esc_html__('View All','luxortheme')\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\t\t\t\t\n\t\t\n\t\t/**** Shortcode Options ****/\n\t\t$wp_customize->add_section( 'shortcode_options' , array(\n\t\t\t'title' => esc_html__( 'Shortcode Options', 'luxortheme' ),\n\t\t));\n\t\t\n\t\t/* Upload options */\n\t\t\n\t\t\n\t\t//slider options\n\t\t$wp_customize->add_setting( 'postCarouselSpeed', array(\n\t\t\t'default' => 0,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'postCarouselSpeed', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'shortcode_options',\n\t\t\t'label' => esc_html__( 'Post Items Carousel Speed', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the carousel speed of the news posts shortcode. Leave this value all the way to the left to disable the carousel feature. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 8,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 0,\n\t\t\t\t'max' => 10000,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\t\t\t\t\n\t\t//Shortcode Option Colors\n\t\t$shortcodeOptionColors = array();\n\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'accordionContentBgColor', \n\t\t\t'default' => '#f4f4f4',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Accordion content background color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the accordion menu content area.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'tabContentBgColor', \n\t\t\t'default' => '#f4f4f4',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Tab content background color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the tab system content area.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'quote_box_color', \n\t\t\t'default' => '#7f6631',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Quote box color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the quote box shortcode. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'data_table_title_color', \n\t\t\t'default' => '#7f6631',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Data Table title color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the data table title column.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'data_table_info_color', \n\t\t\t'default' => '#f4f4f4',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Data Table info color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the data table info column.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'testimonials_carousel_color', \n\t\t\t'default' => '#ffffff',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Testimonials Carousel color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the testimonials carousel.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'timetable_font_color', \n\t\t\t'default' => '#ffffff',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Time Table font color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the time table content.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$shortcodeOptionColors[] = array(\n\t\t\t'slug'=>'timetable_border_color', \n\t\t\t'default' => '#efefef',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Time Table border color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the border color of the time table shortcode.', 'luxortheme')\n\t\t);\n\n\t\t\t\t\n\t\t$shortcodeOptionColorsCounter = 50;\n\t\t\t\t\n\t\tforeach( $shortcodeOptionColors as $color ) {\n\t\t\t\n\t\t\t$shortcodeOptionColorsCounter += 10;\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t\t)\n\t\t\t);\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'section' => 'shortcode_options',\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'priority' => $shortcodeOptionColorsCounter,\n\t\t\t\t\t'settings' => $color['slug'])\n\t\t\t\t)\n\t\t\t);\n\t\t}//end of foreach\n\t\t\n\t\t\n\t\t/**** Woocommerce Options ****/\n\t\t \n\t\t$wp_customize->add_section( 'woo_options' , array(\n\t\t\t'title' => esc_attr__( 'Woocommerce Options', 'luxortheme' ),\n\t\t\t'priority' => 100,\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('products_per_page',\n\t\t\tarray(\n\t\t\t\t'default' => '8',\n\t\t\t\t'sanitize_callback' => 'esc_attr',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control('products_per_page',\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'label' => esc_attr__( 'Products Per Page', 'luxortheme' ),\n\t\t\t\t'section' => 'woo_options',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'4' => '4',\n\t\t\t\t\t'8' => '8',\n\t\t\t\t\t'12' => '12',\n\t\t\t\t\t'16' => '16',\n\t\t\t\t\t'20' => '20',\n\t\t\t\t\t'24' => '24',\n\t\t\t\t\t'28' => '28',\n\t\t\t\t\t'32' => '32',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\n\t\t\n\t\t//Radio Options\t\t\n\t\t$wp_customize->add_setting(\n\t\t\t'woocommShopLayout', array(\n\t\t\t\t'default' => 'no-sidebar',\n\t\t\t\t'sanitize_callback' => 'esc_attr',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( new pm_ln_Customize_Radio_Control( \n\t\t\t$wp_customize, 'woocommShopLayout', \n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_attr__('Woocommerce layout', 'luxortheme' ),\n\t\t\t\t\t'section' => 'woo_options',\n\t\t\t\t\t'settings' => 'woocommShopLayout',\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'mode' => 'image',\n\t\t\t\t\t'description' => esc_attr__('Applies to all Woocommerce templates.', 'luxortheme' ),\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'no-sidebar' => get_template_directory_uri() . '/css/img/layouts/no-sidebar.png',\n\t\t\t\t\t\t'left-sidebar' => get_template_directory_uri() . '/css/img/layouts/left-sidebar.png',\n\t\t\t\t\t\t'right-sidebar' => get_template_directory_uri() . '/css/img/layouts/right-sidebar.png',\n\t\t\t\t\t),\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t\n\t\t//Upload Options\n\t\t$wp_customize->add_setting( 'wooCategoryHeaderImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'wooCategoryHeaderImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_attr__( 'Category/Tag Page Header Image', 'luxortheme' ),\n\t\t\t\t'section' => 'woo_options',\n\t\t\t\t'settings' => 'wooCategoryHeaderImage',\n\t\t\t\t) \n\t\t\t) \n\t\t);\n\t\t\n\t\t\n\t\t/**** Alert Options ****/\n\t\t$wp_customize->add_section( 'alert_options' , array(\n\t\t\t'title' => esc_html__( 'Alert Options', 'luxortheme' ),\n\t\t));\n\t\t\t\t\n\t\t$alertColors = array();\n\t\t\n\t\t$alertColors[] = array(\n\t\t\t'slug'=>'alert_success_color', \n\t\t\t'default' => '#2c5e83',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Success Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the success alert element.', 'luxortheme')\n\t\t);\n\t\t$alertColors[] = array(\n\t\t\t'slug'=>'alert_info_color', \n\t\t\t'default' => '#cbb35e',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Info Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the info alert element.', 'luxortheme')\n\t\t);\n\t\t$alertColors[] = array(\n\t\t\t'slug'=>'alert_warning_color', \n\t\t\t'default' => '#ea6872',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Warning Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the warning alert element.', 'luxortheme')\n\t\t);\n\t\t$alertColors[] = array(\n\t\t\t'slug'=>'alert_danger_color', \n\t\t\t'default' => '#5f3048',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Danger Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the danger alert element.', 'luxortheme')\n\t\t);\n\t\t$alertColors[] = array(\n\t\t\t'slug'=>'alert_notice_color', \n\t\t\t'default' => '#49c592',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'label' => esc_html__('Notice Color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the notice alert element.', 'luxortheme')\n\t\t);\n\t\t\n\t\t$alertColorsCounter = 50;\n\t\t\n\t\tforeach( $alertColors as $color ) {\n\t\t\t\n\t\t\t$alertColorsCounter += 10;\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t\t)\n\t\t\t);\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'section' => 'alert_options',\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'settings' => $color['slug'],\n\t\t\t\t\t'priority' => $alertColorsCounter,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}//end of foreach\n\t\t\n\t\t/**** Micro Slider Options ****/\n\t\t$wp_customize->add_section( 'pulseslider_options' , array(\n\t\t\t'title' => esc_html__( 'Micro Slider Options', 'luxortheme' ),\n\t\t));\n\t\t\n\t\t//Upload Options\n\t\t$wp_customize->add_setting( 'sliderBackgroundImage', array(\n\t\t\t'sanitize_callback' => 'esc_url_raw'\n\t\t\t)\n\t\t);\n\n\t\t\n\t\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control( \n\t\t\t$wp_customize, \n\t\t\t'sliderBackgroundImage', \n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Slider Background Image', 'luxortheme' ),\n\t\t\t\t'section' => 'pulseslider_options',\n\t\t\t\t'settings' => 'sliderBackgroundImage',\n\t\t\t\t'priority' => 1,\n\t\t\t\t) \n\t\t\t) \n\t\t);\t\t\n\t\t\n\t\t$wp_customize->add_setting('enablePulseSlider', array(\n\t\t\t'default' => 'on',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enablePulseSlider', array(\n\t\t\t'label' => esc_html__('Enable Micro Slider?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'enablePulseSlider',\n\t\t\t'priority' => 2,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'on' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'off' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t\n\t\t$wp_customize->add_setting('enableSlideShow', array(\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableSlideShow', array(\n\t\t\t'label' => esc_html__('Enable SlideShow?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'enableSlideShow',\n\t\t\t'priority' => 3,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'false' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('slideLoop', array(\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('slideLoop', array(\n\t\t\t'label' => esc_html__('Loop Slides?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'slideLoop',\n\t\t\t'priority' => 4,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'false' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t$wp_customize->add_setting('enableControlNav', array(\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('enableControlNav', array(\n\t\t\t'label' => esc_html__('Enable Bullets?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'enableControlNav',\n\t\t\t'priority' => 5,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'false' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('pauseOnHover', array(\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('pauseOnHover', array(\n\t\t\t'label' => esc_html__('Pause on hover?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'pauseOnHover',\n\t\t\t'priority' => 6,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'false' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('showArrows', array(\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('showArrows', array(\n\t\t\t'label' => esc_html__('Display arrows?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'showArrows',\n\t\t\t'priority' => 7,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'false' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\t\t\n\t\t$wp_customize->add_setting('showBulletThumbs', array(\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('showBulletThumbs', array(\n\t\t\t'label' => esc_html__('Display Bullet Thumbs?', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'showBulletThumbs',\n\t\t\t'priority' => 8,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'ON', 'luxortheme' ),\n\t\t\t\t'false' => esc_html__( 'OFF', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t$wp_customize->add_setting('animationType', array(\n\t\t\t'default' => 'slide',\n\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control('animationType', array(\n\t\t\t'label' => esc_html__('Animation Type', 'luxortheme'),\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'settings' => 'animationType',\n\t\t\t'priority' => 9,\n\t\t\t'type' => 'radio',\n\t\t\t'choices' => array(\n\t\t\t\t'fade' => esc_html__( 'Fade', 'luxortheme' ),\n\t\t\t\t'slide' => esc_html__( 'Slide', 'luxortheme' ),\n\t\t\t),\n\t\t));\n\n\t\t\n\t\t\n\t\t$wp_customize->add_setting( 'slideShowSpeed', array(\n\t\t\t'default' => 8000,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'slideShowSpeed', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'label' => esc_html__( 'Slide Show Speed', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the slideshow speed of the Micro Slider. Only applies if the Slideshow option is enabled. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 10,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 1000,\n\t\t\t\t'max' => 10000,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\n\t\t\n\t\t$wp_customize->add_setting( 'slideSpeed', array(\n\t\t\t'default' => 800,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'slideSpeed', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'label' => esc_html__( 'Slide Speed', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the slide speed of the Micro Slider. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 11,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 500,\n\t\t\t\t'max' => 1000,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\n\t\t\n\t\t$wp_customize->add_setting( 'sliderTitleOpacity', array(\n\t\t\t'default' => 100,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'sliderTitleOpacity', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'label' => esc_html__( 'Title / Sub-Title opacity', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the background opacity of the slider title and message. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 12,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 1,\n\t\t\t\t'max' => 100,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\t\t$wp_customize->add_setting( 'sliderButtonBGOpacity', array(\n\t\t\t'default' => 0,\n\t\t\t'type' => 'theme_mod',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'transport' => 'refresh',\n\t\t\t'sanitize_callback' => 'absint'\n\t\t) );\n\t\t\n\t\t$wp_customize->add_control( 'sliderButtonBGOpacity', array(\n\t\t\t'type' => 'range',\n\t\t\t'section' => 'pulseslider_options',\n\t\t\t'label' => esc_html__( 'Button Background Opacity', 'luxortheme' ),\n\t\t\t'description' => esc_html__('Adjust the background opacity of the slider button. (Requires window refresh)', 'luxortheme'),\n\t\t\t'priority' => 13,\n\t\t\t'input_attrs' => array(\n\t\t\t\t'min' => 0,\n\t\t\t\t'max' => 100,\n\t\t\t\t'step' => 1,\n\t\t\t\t'class' => 'example-class',\n\t\t\t\t'style' => 'color: #0a0',\n\t\t\t),\n\t\t) );\n\t\t\n\t\t\n\t\t\t\t\n\t\t$PulseSliderColors = array();\n\t\t\n\t\t$PulseSliderColors[] = array(\n\t\t\t'slug'=>'sliderTitleBackgroundColor', \n\t\t\t'default' => '#000000',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Title / Message background color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the Micro Slider title and message. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\t\t\n\t\t$PulseSliderColors[] = array(\n\t\t\t'slug'=>'sliderButtonColor', \n\t\t\t'default' => '#ffffff',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Button color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the color of the Micro Slider button. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\n\t\t$PulseSliderColors[] = array(\n\t\t\t'slug'=>'sliderButtonBGColor', \n\t\t\t'default' => '#000000',\n\t\t\t'transport' => 'refresh',\n\t\t\t'label' => esc_html__('Button Background color', 'luxortheme'),\n\t\t\t'description' => esc_html__('Adjust the background color of the Micro Slider button. (Requires window refresh)', 'luxortheme')\n\t\t);\n\t\t\n\t\t$PulseSliderColorsCounter = 50;\n\t\t\t\t\n\t\tforeach( $PulseSliderColors as $color ) {\n\t\t\t\n\t\t\t$PulseSliderColorsCounter += 10;\n\t\t\t\n\t\t\t// SETTINGS\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$color['slug'], array(\n\t\t\t\t\t'default' => $color['default'],\n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t\t'sanitize_callback' => 'esc_attr'\n\t\t\t\t)\n\t\t\t);\n\t\t\t// CONTROLS\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$color['slug'], \n\t\t\t\t\tarray(\n\t\t\t\t\t'label' => $color['label'], \n\t\t\t\t\t'transport' => $color['transport'],\n\t\t\t\t\t'description' => $color['description'],\n\t\t\t\t\t'section' => 'pulseslider_options',\n\t\t\t\t\t'priority' => $PulseSliderColorsCounter,\n\t\t\t\t\t'settings' => $color['slug'])\n\t\t\t\t)\n\t\t\t);\n\t\t}//end of foreach\n\t\t\t\t\n }", "function political_theme_customize_register( $wp_customize ) {\n\n $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';\n\n if ( isset( $wp_customize->selective_refresh ) ) {\n $wp_customize->selective_refresh->add_partial( 'blogname', array(\n 'selector' => '.site-title a',\n 'render_callback' => 'political_customize_partial_blogname',\n ) );\n $wp_customize->selective_refresh->add_partial( 'blogdescription', array(\n 'selector' => '.site-description',\n 'render_callback' => 'political_customize_partial_blogdescription',\n ) );\n }\n\n // Header Links Colors\n $wp_customize->add_setting( 'header_links_colors', array(\n 'default' => '',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'sanitize_hex_color',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_links_colors', array(\n 'section' => 'colors',\n 'label' => esc_html__( 'Header Links Colors', 'political' ),\n ) ) );\n // Header Background Color\n $wp_customize->add_setting( 'header_background_color', array(\n 'default' => '',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'sanitize_hex_color',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array(\n 'section' => 'colors',\n 'label' => esc_html__( 'Header Background Color', 'political' ),\n ) ) );\n // Primary Color\n $wp_customize->add_setting( 'primary_color', array(\n 'default' => '',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'sanitize_hex_color',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_color', array(\n 'section' => 'colors',\n 'label' => esc_html__( 'Primary Color', 'political' ),\n ) ) );\n // Primary Hover Color\n $wp_customize->add_setting( 'primary_hover_color', array(\n 'default' => '',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'sanitize_hex_color',\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_hover_color', array(\n 'section' => 'colors',\n 'label' => esc_html__( 'Primary Hover Color', 'political' ),\n ) ) );\n // Header Ads Image\n $wp_customize->add_setting( 'political_ad_image', array(\n 'default' => get_template_directory_uri() . '/images/728x90.jpg',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'political_ad_image', array(\n 'label' => __('Header Ad Image', 'political'),\n 'section' => 'ads',\n )));\n // Header Ads Link\n $wp_customize->add_setting( 'political_ad_link', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'political_ad_link', array(\n 'type' => 'text',\n 'section' => 'ads', // Add a default or your own section\n 'label' => esc_html__( 'Header Ad Link' ,'political'),\n ) );\n\n $posts_list = array();\n $args = array('post_type' => 'post','posts_per_page' => -1);\n $posts = get_posts( $args ); \n foreach($posts as $post) {\n $posts_list[$post->post_title] = $post->post_title;\n }\n\n $wp_customize->add_section( 'homepage_slider' , array(\n 'title' => __('Homepage slider','political'),\n 'priority' => 50,\n ) );\n $wp_customize->add_section( 'ads' , array(\n 'title' => __('Ads','political'),\n 'priority' => 50,\n ) );\n /* First post slide */\n $wp_customize->add_setting( 'first_post_slide', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'political_sanitize_select',\n ) );\n $wp_customize->add_control( 'first_post_slide', array(\n 'type' => 'select',\n 'section' => 'homepage_slider', // Add a default or your own section\n 'label' => esc_html__( 'First post slide' ,'political'),\n 'choices' => $posts_list,\n ) );\n /* Second post slide */\n $wp_customize->add_setting( 'second_post_slide', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'political_sanitize_select',\n ) );\n $wp_customize->add_control( 'second_post_slide', array(\n 'type' => 'select',\n 'section' => 'homepage_slider', // Add a default or your own section\n 'label' => esc_html__( 'Second post slide' ,'political'),\n 'choices' => $posts_list,\n ) );\n /* Third post slide */\n $wp_customize->add_setting( 'third_post_slide', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'political_sanitize_select',\n ) );\n $wp_customize->add_control( 'third_post_slide', array(\n 'type' => 'select',\n 'section' => 'homepage_slider', // Add a default or your own section\n 'label' => esc_html__( 'Third post slide' ,'political'),\n 'choices' => $posts_list,\n ) );\n /* Uncheck to show slider */ \n $wp_customize->add_setting( 'themecheck_checkbox_setting_id', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'themecheck_checkbox_setting_id', array(\n 'type' => 'checkbox',\n 'section' => 'homepage_slider', // Add a default or your own section\n 'label' => esc_html__( 'Check to show slider' ,'political'),\n ) );\n\n\n /* Footer */ \n $wp_customize->add_section( 'footer_section' , array(\n 'title' => __('Footer','political'),\n 'priority' => 50,\n ) );\n\n /* Column 1 */\n /* Title 1 */\n $wp_customize->add_setting( 'footer_title1_id', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'footer_title1_id', array(\n 'type' => 'text',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => __( 'Footer Title 1st column' ,'political'),\n ) );\n\n /* Textarea description */\n $wp_customize->add_setting( 'footer_widget_column1', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n ) );\n $wp_customize->add_control( 'footer_widget_column1', array(\n 'type' => 'select',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Select Widget 1st column' ,'political'),\n 'choices' => array(\n 'WP_Widget_Archives' => esc_html__( 'WP Widget Archives','political'),\n 'WP_Widget_Calendar' => esc_html__( 'WP Widget Calendar','political'),\n 'WP_Widget_Categories' => esc_html__( 'WP Widget Categories','political'),\n 'WP_Widget_Meta' => esc_html__( 'WP Widget Meta','political'),\n 'WP_Widget_Pages' => esc_html__( 'WP Widget Pages','political'),\n 'WP_Widget_Recent_Comments' => esc_html__( 'WP Widget Recent Comments','political'),\n 'WP_Widget_Recent_Posts' => esc_html__( 'WP Widget Recent Posts','political'),\n 'WP_Widget_Search' => esc_html__( 'WP Widget Search ','political'),\n 'WP_Widget_Tag_Cloud' => esc_html__( 'WP Widget Tag Cloud ','political'),\n ),\n ) );\n\n /* Column 2 */\n $wp_customize->add_setting( 'footer_title2_id', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'footer_title2_id', array(\n 'type' => 'text',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer Title 2nd column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_widget_column2', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'political_sanitize_select',\n ) );\n $wp_customize->add_control( 'footer_widget_column2', array(\n 'type' => 'select',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Select Widget 2nd column' ,'political'),\n 'choices' => array(\n 'WP_Widget_Archives' => esc_html__( 'WP Widget Archives','political'),\n 'WP_Widget_Calendar' => esc_html__( 'WP Widget Calendar','political'),\n 'WP_Widget_Categories' => esc_html__( 'WP Widget Categories','political'),\n 'WP_Widget_Meta' => esc_html__( 'WP Widget Meta','political'),\n 'WP_Widget_Pages' => esc_html__( 'WP Widget Pages','political'),\n 'WP_Widget_Recent_Comments' => esc_html__( 'WP Widget Recent Comments','political'),\n 'WP_Widget_Recent_Posts' => esc_html__( 'WP Widget Recent Posts','political'),\n 'WP_Widget_Search' => esc_html__( 'WP Widget Search ','political'),\n 'WP_Widget_Tag_Cloud' => esc_html__( 'WP Widget Tag Cloud ','political'),\n ),\n ) );\n\n\n /* Column 3 */\n $wp_customize->add_setting( 'footer_title3_id', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'footer_title3_id', array(\n 'type' => 'text',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer Title 3rd column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_widget_column3', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'political_sanitize_select',\n ) );\n $wp_customize->add_control( 'footer_widget_column3', array(\n 'type' => 'select',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Select Widget 3rd column' ,'political'),\n 'choices' => array(\n 'WP_Widget_Archives' => esc_html__( 'WP Widget Archives','political'),\n 'WP_Widget_Calendar' => esc_html__( 'WP Widget Calendar','political'),\n 'WP_Widget_Categories' => esc_html__( 'WP Widget Categories','political'),\n 'WP_Widget_Meta' => esc_html__( 'WP Widget Meta','political'),\n 'WP_Widget_Pages' => esc_html__( 'WP Widget Pages','political'),\n 'WP_Widget_Recent_Comments' => esc_html__( 'WP Widget Recent Comments','political'),\n 'WP_Widget_Recent_Posts' => esc_html__( 'WP Widget Recent Posts','political'),\n 'WP_Widget_Search' => esc_html__( 'WP Widget Search ','political'),\n 'WP_Widget_Tag_Cloud' => esc_html__( 'WP Widget Tag Cloud ','political'),\n ),\n ) );\n\n /* Column 4 */\n $wp_customize->add_setting( 'footer_title4_id', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'footer_title4_id', array(\n 'type' => 'text',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer Title 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_phone', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'footer_phone', array(\n 'type' => 'text',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer phone 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_email', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n $wp_customize->add_control( 'footer_email', array(\n 'type' => 'text',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer email 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_facebook', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n $wp_customize->add_control( 'footer_facebook', array(\n 'type' => 'url',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer facebook link 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_twitter', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n $wp_customize->add_control( 'footer_twitter', array(\n 'type' => 'url',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer twitter link 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_linkedin', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n $wp_customize->add_control( 'footer_linkedin', array(\n 'type' => 'url',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer linkedin link 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_telegram', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n $wp_customize->add_control( 'footer_telegram', array(\n 'type' => 'url',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer telegram link 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_google', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url_raw',\n ) );\n $wp_customize->add_control( 'footer_google', array(\n 'type' => 'url',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Footer google link 4th column' ,'political'),\n ) );\n $wp_customize->add_setting( 'footer_copyright', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n ) );\n $wp_customize->add_control( 'footer_copyright', array(\n 'type' => 'textarea',\n 'section' => 'footer_section', // Add a default or your own section\n 'label' => esc_html__( 'Before Footer copyright' ,'political'),\n ) );\n\n\n}", "function wft_register_stuff() {\n wp_register_script( 'respond', '//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js', array(), null );\n wp_register_script( 'main', SCRIPTS . '/wft-theme-boilerplate.1.0.0.js', array( 'jquery' ), null, true );\n wp_register_script( 'modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js', array(), null );\n wp_register_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', array(), null, 'screen' );\n wp_register_style( 'style', get_template_directory_uri() . '/style.css', array(), null, 'screen' );\n wp_register_style( 'open-sans', 'http://fonts.googleapis.com/css?family=Open+Sans', array(), null, 'screen' );\n // register any google fonts\n }" ]
[ "0.8223232", "0.81122184", "0.79611725", "0.7928084", "0.78955877", "0.7780384", "0.76977473", "0.76077163", "0.74667335", "0.73673767", "0.7273176", "0.72201043", "0.7114443", "0.7112139", "0.7098685", "0.7098354", "0.7028856", "0.69865394", "0.6973265", "0.6971825", "0.6937481", "0.6917907", "0.69011605", "0.684991", "0.683029", "0.67694366", "0.67575794", "0.6750532", "0.67456025", "0.67195255", "0.66751575", "0.6671974", "0.6666674", "0.66648203", "0.6632986", "0.6628403", "0.6623777", "0.6606038", "0.660115", "0.6595373", "0.658596", "0.6582772", "0.657809", "0.65729886", "0.6568063", "0.65289176", "0.6528181", "0.65256864", "0.65182304", "0.6492568", "0.6461616", "0.6451219", "0.64239", "0.6420066", "0.64093447", "0.6405311", "0.6405241", "0.6380941", "0.63671", "0.63569885", "0.63381845", "0.6333627", "0.63182044", "0.63132083", "0.63123953", "0.629804", "0.6296706", "0.6277476", "0.62753904", "0.62585723", "0.6252528", "0.6246509", "0.6237622", "0.6237605", "0.6226007", "0.62230176", "0.62187904", "0.62176454", "0.6217525", "0.621157", "0.6189122", "0.6184993", "0.6180551", "0.6175006", "0.6167095", "0.61660326", "0.6163346", "0.61565495", "0.6152632", "0.6148484", "0.6143148", "0.61357784", "0.6133681", "0.6131013", "0.6130249", "0.6124555", "0.6124113", "0.6118964", "0.6113964", "0.61096483" ]
0.8138355
1
Callback function for outputting the custom header CSS to `wp_head`.
Функция обратного вызова для вывода кастомного CSS заголовка в `wp_head`.
function w4ptheme_custom_header_wp_head() { if ( ! display_header_text() ) { return; } $hex = get_header_textcolor(); if ( ! $hex ) { return; } $style = "body.custom-header #site-title a { color: #{$hex}; }"; echo "\n" . '<style type="text/css" id="custom-header-css">' . esc_html( trim( $style ) ) . '</style>' . "\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function head_css() {\r\n\r\n\t\tglobal $data;\r\n\r\n\t\t$output = '';\r\n\t\t\r\n\t\t$custom_css = $data['custom_css'];\r\n\t\t\r\n\t\tif ($custom_css <> '') {\r\n\t\t\t$output .= $custom_css . \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t// Output styles\r\n\t\tif ($output <> '') {\r\n\t\t\t$output = \"<!-- Custom Styling -->\\n<style type=\\\"text/css\\\">\\n\" . $output . \"</style>\\n\";\r\n\t\t\techo $output;\r\n\t\t}\r\n\t\r\n}", "public static function custom_head_css() {\n\t\t\n\t\t\tslp_pvw_plugin_framework::pvw_head_css();\n\t\t\n\t\t}", "function gkp_insert_css_in_head() {\n wp_register_style('style', get_bloginfo( 'style.css' ),'',false,'screen');\n wp_enqueue_style( 'style' );\n}", "function wpselect_custom_header_style() {\n\tif ( HEADER_TEXTCOLOR == get_header_textcolor() && HEADER_IMAGE == get_header_image() )\n\t\treturn;\n\t/** Header image CSS */\n\t$output = sprintf( '#header .wrap { background-image: url(%s); min-height: %spx }', esc_url( get_header_image() ), get_custom_header()->height );\n\t/** Header text color CSS, if showing text */\n\tif ( 'blank' != get_header_textcolor() )\n\t\t$output .= sprintf( '#title a, #title a:hover, #description { color: #%s; }', esc_html( get_header_textcolor() ) );\n\tprintf( '<style type=\"text/css\">%s</style>', $output );\n}", "public function header_styles() {\n\n\t\t\t// Use filter to add styles\n\t\t\t$header_styles = apply_filters( 'ipress_header_styles', get_theme_mod( 'ipress_header_styles', '' ) );\n\t\t\tif ( ! $header_styles ) { return; }\n\t\t\t\n\t\t\t// Capture output\t\n\t\t\twp_add_inline_style( 'style', $header_styles );\n\t\t}", "function estore_header_style() {\n\t\t$header_text_color = get_header_textcolor();\n\n\t\t/*\n\t\t * If no custom options for text are set, let's bail.\n\t\t * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ).\n\t\t */\n\t\tif ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If we get this far, we have custom styles. Let's do this.\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t<?php\n\t\t// Has the text been hidden?\n\t\tif ( ! display_header_text() ) :\n\t\t\t?>\n\t\t\t.site-title,\n\t\t\t.site-description {\n\t\t\t\tposition: absolute;\n\t\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\t\t}\n\t\t\t<?php\n\t\t\t// If the user has set a custom color for the text use that.\n\t\telse :\n\t\t\t?>\n\t\t\t.site-title a,\n\t\t\t.site-description {\n\t\t\t\tcolor: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t\t}\n\t\t<?php endif; ?>\n\t\t</style>\n\t\t<?php\n\t}", "public static function header_output() {\r\n ?>\r\n <!--Customizer CSS--> \r\n <style type=\"text/css\">\r\n <?php self::generate_css('#site-title a', 'color', 'header_textcolor', '#'); ?> \r\n <?php self::generate_css('body', 'background-color', 'background_color', '#'); ?> \r\n <?php self::generate_css('a', 'color', 'mytheme_options[link_textcolor]'); ?>\r\n </style> \r\n <!--/Customizer CSS-->\r\n <?php\r\n }", "function shoper_header_style() {\n\t\t$header_text_color = get_header_textcolor();\n\t\t$header_image\t = get_header_image();\n\t\t\n\t\tif( !empty( $header_image ) ){\n\t\t?>\n\t\t\t<style type=\"text/css\">\n\t\t\t\t#masthead .container.header-middle{\n\t\t\t\t\tbackground: url( <?php echo esc_url( $header_image );?> ) center center no-repeat;\n\t\t\t\t\tbackground-size: cover;\n\t\t\t\t}\n\t\t\t</style>\n\t\t<?php\n\t\t}\n\t\t/*\n\t\t * If no custom options for text are set, let's bail.\n\t\t * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ).\n\t\t */\n\t\tif ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If we get this far, we have custom styles. Let's do this.\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t<?php\n\t\t// Has the text been hidden?\n\t\tif ( ! display_header_text() ) :\n\t\t\t?>\n\t\t\t.site-title,\n\t\t\t.site-description {\n\t\t\t\tposition: absolute;\n\t\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\t}\n\t\t<?php\n\t\t// If the user has set a custom color for the text use that.\n\t\telse :\n\t\t\t?>\n\t\t\ta.site-title,\n\t\t\t.site-description {\n\t\t\t\tcolor: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t\t}\n\t\t<?php endif; ?>\n\t\t</style>\n\t\t<?php\n\t}", "public function setup_header() {\n\t\twp_enqueue_style( 'wsu-style-common', 'http://designer.wsu.edu/template/css2.aspx?key=0eab28zs011' );\n\t\twp_enqueue_style( 'wsu-news-parent-style', get_template_directory_uri() . '/style.css' );\n\t}", "function add_wphead() {\n\n // Include main screen styles css\n $content = \"\\t\";\n $content .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\";\n $content .= get_bloginfo('stylesheet_directory');\n $content .= '/styles/grid.css';\n $content .= \"\\\" media=\\\"grid\\\" />\";\n $content .= \"\\n\";\n \n // Include print css\n $content .= \"\\t\";\n $content .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\";\n $content .= get_bloginfo('stylesheet_directory');\n $content .= '/styles/print.css';\n $content .= \"\\\" media=\\\"print\\\" />\";\n $content .= \"\\n\";\n \n // Include IE-specific CSS fix\n $content .= \"\\t\";\n $content .= \"<!--[if lt IE 8]><link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\";\n $content .= get_bloginfo('stylesheet_directory');\n $content .= '/styles/ie.css';\n $content .= \"\\\" /><![endif]-->\";\n $content .= \"\\n\";\n \n // Include any other stylesheet you are using\n $content .= \"\\t\";\n $content .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\";\n $content .= get_bloginfo('stylesheet_directory');\n $content .= '/styles/upgradethematic.css';\n $content .= \"\\\" media=\\\"upgradethematic\\\" />\";\n $content .= \"\\n\";\n \n // Include the original style.css again so it overides the blueprint code\n // Ideally we would've also found a way to remove the first reference to styles.css. If there's a better way, please share.\n $content .= \"\\t\";\n $content .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\";\n $content .= get_bloginfo('stylesheet_url');\n $content .= \"'\\\" media=\\\"style\\\" />\";\n $content .= \"\\n\";\n \n // Call color codes inputted in Node Settings menu on Dashboard\n ?>\n <style>\n <?php echo nodeStyles() ?>\n </style>\n <?php\n\n // Echo the whole thing\n echo $content;\n\n}", "public function theme_header()\n\t{\n\t\tStack::add('template_stylesheet', $this->get_url() . '/style.css');\n\t}", "function admin_register_head() {\n $siteurl = get_option('siteurl');\n $url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/css/style.css';\n echo \"<link rel='stylesheet' type='text/css' href='$url' />\\n\";\n\t}", "public static function header_output() {\n\t\t?>\n\t\t<!-- Customizer CSS -->\n\t\t<style type=\"text/css\">\n\t\t\t#text-logo, #tagline { display: <?php echo get_theme_mod('FCN_hide_header_text'); ?>}\n\t\t\t<?php self::generate_css('.site-footer .site-info a, .site-footer .site-info, .site-header, .site-header a', 'color', 'header_footer_link_color' ); ?>\n\t\t\t<?php self::generate_css('body.login div#login h1 a', 'background-image', 'header_image'); ?>\n\t\t\t<?php self::generate_css('.site-main', 'color', 'content_text_color'); ?>\n\t\t\t<?php self::generate_css('.site-main a, .site-main a:visited', 'color', 'content_link_color'); ?>\n\t\t\t<?php self::generate_css('.site-title #logo', 'color', 'logo_text_color'); ?>\n\t\t\t<?php self::generate_css('#tagline', 'color', 'tagline_text_color'); ?>\n\t\t\t<?php self::generate_css('.site-content h1, .site-content h2, .site-content h3, .site-content h4, .site-content h5, .site-content h6, .site-content h1 a, .site-content h2 a, .site-content h3 a, .site-content h4 a, .site-content h5 a, .site-content h6 a, .entry-meta', 'color', 'article_header_color' ); ?>\n\t\t\t<?php self::generate_css('.site-header, .site-footer', 'background-color', 'header_footer_background_color'); ?>\n\t\t\t<?php self::generate_css('.site-header, .site-footer', 'border-color', 'header_footer_border_color'); ?>\n\t\t\t.site-content .page-side-bar h1, .site-content .page-side-bar h2, .site-content .page-side-bar h3, .site-content .page-side-bar h4, .site-content .page-side-bar h5, .site-content .page-side-bar h6 { color: <?php echo get_theme_mod('side_bar_heading_color'); ?>;}\n\t\t</style>\n\t\t<!-- End Customizer CSS -->\n\t\t<?php\n\t}", "function childtheme_admin_header_style() {\n\t?>\n\t<style type=\"text/css\">\n\t#headimg {\n\t\twidth: <?php echo HEADER_IMAGE_WIDTH; ?>px;\n\t\theight: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\n\t}\n\t#headimg h1,\n\t#headimg div {\n\tborder:0;\n\t}\n\t#headimg h1 {\n\t font-family:Arial,sans-serif;\n\t font-size:34px;\n\t font-weight:bold;\n\t line-height:40px;\n\t\tpadding-top:88px;\n\t\tmargin:0;\n\t}\n\t#headimg h1 a {\n\t\ttext-decoration: none;\n\t}\n\t#headimg div {\n\t font-size:13px;\n\t font-style:italic;\n\t}\n\t</style>\n\t<?php\n}", "public static function header_output() {\n ?>\n <!--Customizer CSS--> \n <style type=\"text/css\">\n <?php self::generate_css('#site-title', 'color', 'header_textcolor', '#'); ?>\n <?php self::generate_css('.post-date', 'background-color', 'accent_color'); ?>\n <?php self::generate_css('a', 'color', 'accent_color'); ?>\n <?php self::generate_css('.blog h2 a:hover', 'color', 'accent_color'); ?>\n <?php self::generate_css('ul.dropdown-menu li a:hover', 'background', 'accent_color'); ?>\n <?php self::generate_css('.btn-primary', 'background-color', 'accent_color'); ?>\n <?php self::generate_css('.btn-primary:hover', 'background-color', 'accent_color'); ?>\n <?php self::generate_css('.btn-default:hover', 'border-color', 'accent_color'); ?>\n <?php self::generate_css('input#submit', 'background-color', 'accent_color'); ?>\n <?php self::generate_css('input#submit:hover', 'background-color', 'accent_color'); ?>\n \n </style> \n <!--/Customizer CSS-->\n <?php\n }", "function gogreen_custom_head_script(){ \n ob_start();\n include_once( get_template_directory() .'/css/custom-css.php' );\n $head_content = ob_get_clean();\n echo '<style type=\"text/css\" data-name=\"gogreen-color-scheme\">' .$head_content.'</style>';\n\n if( gogreen_get_option('head_script') ){\n /**\n *Extra HTML/JavaScript/Stylesheet from theme options > advanced - head content\n */\n echo apply_filters('gogreen_head_content', gogreen_get_option('head_script') ); \n } \n}", "public static function header_output() {\n ?>\n <!--Customizer CSS--> \n <style type=\"text/css\">\n <?php self::generate_css($gold, 'color', 'primary_color'); ?> \n\t\t <?php self::generate_css($green, 'color', 'secondary_color'); ?> \n\t\t <?php self::generate_css($grey, 'color', 'tertiary_color'); ?> \n </style> \n <!--/Customizer CSS-->\n <?php\n }", "function mbe_wp_head(){\n echo '<style>'.PHP_EOL;\n echo 'body{ padding-top: 70px !important; }'.PHP_EOL;\n // Using custom CSS class name.\n echo 'body.body-logged-in .navbar-fixed-top{ top: 28px !important; }'.PHP_EOL;\n // Using WordPress default CSS class name.\n echo 'body.logged-in .navbar-fixed-top{ top: 28px !important; }'.PHP_EOL;\n echo '</style>'.PHP_EOL;\n}", "function childtheme_header_style() {\n\t?>\t\n\t<style type=\"text/css\">\n\t/* Sets header image as background for div#branding */\n\t<?php\n\tif ( get_header_image() && HEADER_IMAGE != get_header_image() ) {\n\t\t?>\n\t\t#branding {\n\t\t\tbackground:url('<?php header_image(); ?>') no-repeat center top;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t<?php if ( 'blank' != get_header_textcolor() ) { ?>\n\t\t#blog-title, #blog-title a {\n\t\t\tcolor:#000;\n\t\t}\n\t\t<?php\n\t\t}\t\n\t}\n\t?>\n\t/* Sets text color for #blog-title and #blog-description */\n\t<?php\n\tif ( get_header_textcolor() ) {\n\t\t?>\n\t\t#blog-title, #blog-title a, #blog-description {\n\t\t\tcolor:#<?php header_textcolor(); ?>;\n\t\t}\n\t\t<?php\n\t}\n\t?>\n\t</style>\n\t<?php\n}", "public static function header_output( $wp_customize ) {\n\n\t?>\n\n\t\t<style type=\"text/css\">\n\n\t\t\t<?php // CSS\n\n\t\t\t// Accent\n\t\t\tif( get_theme_mod( 'accent' ) != $GLOBALS['accent'] ) {\n\n\t\t\t\t// Background\n\t\t\t\tself::generate_css( '.button:hover, input[type=\"button\"]:hover, input[type=\"reset\"]:hover, input[type=\"submit\"]:hover, .button:focus, input[type=\"button\"]:focus, input[type=\"reset\"]:focus, input[type=\"submit\"]:focus, table caption, .post-navigation .nav-previous .post-title, .post-navigation .nav-next .post-title, .comment-navigation .nav-previous .post-title, .comment-navigation .nav-next .post-title, .image-navigation .nav-previous .post-title, .image-navigation .nav-next .post-title, .posts-navigation .nav-previous .post-title, .posts-navigation .nav-next .post-title, .sidebar-toggle:hover, .viewer .close:hover', 'background-color', 'accent' );\n\n\t\t\t\t// Color\n\t\t\t\tself::generate_css( 'a:hover, a:focus, a:active, .widget_tva_icon_text_widget .fa, .site-branding .site-title a:hover, .main-navigation a:hover, .main-navigation .current-menu-item > a, .clone .main-navigation .trigger-menu-wrap .trigger-menu.active, .hero-area a:hover, .entry-header .entry-title a:hover, .entry-content a:hover, .entry-summary a:hover, .entry-footer a:hover, .post-navigation a:hover, .comment-navigation a:hover, .image-navigation a:hover, .pagination a:hover, .posts-navigation a:hover, .secondary a:hover, .comment-metadata a:hover, .pingback .edit-link a:hover, .required, .site-subfooter a:hover, .site-footer a:hover, .site-info .trigger-subfooter-wrap .trigger-subfooter.active, .tva_share .trigger-share-panel.active', 'color', 'accent' );\n\n\t\t\t\t// Border\n\t\t\t\tself::generate_css( 'thead tr, input[type=\"text\"]:focus, input[type=\"email\"]:focus, input[type=\"url\"]:focus, input[type=\"password\"]:focus, input[type=\"search\"]:focus, select:focus, textarea:focus, .clone .main-navigation .trigger-menu-wrap .trigger-menu, .entry-content a, .entry-summary a, .entry-footer a, .comment-list .reply a, .site-footer a', 'border-color', 'accent' );\n\n\t\t\t}\n\n\n\t\t\t// ------------------------------------------------------------\n\n\n\t\t\t// Footer background\n\t\t\tif( get_theme_mod( 'footer_background' ) != $GLOBALS['footer_background'] ) {\n\n\t\t\t\tself::generate_css( '.site-footer', 'background-color', 'footer_background' );\n\n\t\t\t}\n\n\n\t\t\t// ------------------------------------------------------------\n\n\n\t\t\t// Site title\n\t\t\tif( get_theme_mod( 'site_title_link' ) != $GLOBALS['site_title_link'] ) {\n\n\t\t\t\tself::generate_css( '.site-branding .site-title, .site-branding .site-title a', 'color', 'site_title_link' );\n\n\t\t\t}\n\n\t\t\t// Tagline\n\t\t\tif( get_theme_mod( 'tagline_text' ) != $GLOBALS['tagline_text'] ) {\n\n\t\t\t\tself::generate_css( '.site-branding .site-description', 'color', 'tagline_text' );\n\n\t\t\t}\n\n\n\t\t\t// Primary navigation link\n\t\t\tif( get_theme_mod( 'primary_navigation_link' ) != $GLOBALS['primary_navigation_link'] ) {\n\n\t\t\t\tself::generate_css( '.main-navigation, .main-navigation a', 'color', 'primary_navigation_link' );\n\n\t\t\t}\n\n\n\t\t\t// Primary text\n\t\t\tif( get_theme_mod( 'primary_text' ) != $GLOBALS['primary_text'] ) {\n\n\t\t\t\tself::generate_css( 'body, input, select, textarea, label', 'color', 'primary_text' );\n\n\t\t\t}\n\n\t\t\t// Primary link\n\t\t\tif( get_theme_mod( 'primary_link' ) != $GLOBALS['primary_link'] ) {\n\n\t\t\t\tself::generate_css( 'a, .entry-content a, .entry-summary a', 'color', 'primary_link' );\n\n\t\t\t}\n\n\n\t\t\t// Primary headings\n\t\t\tif( get_theme_mod( 'primary_headings' ) != $GLOBALS['primary_headings'] ) {\n\n\t\t\t\tself::generate_css( 'h1, h2, h3, h4, h5, h6, .entry-header .entry-title, .entry-header .entry-title a, .page-header .page-title, .page-header .page-title a', 'color', 'primary_headings' );\n\n\t\t\t}\n\n\t\t\t// Secondary headings\n\t\t\tif( get_theme_mod( 'secondary_headings' ) != $GLOBALS['secondary_headings'] ) {\n\n\t\t\t\tself::generate_css( '.secondary .widget-area .widget .widget-title', 'color', 'secondary_headings' );\n\n\t\t\t}\n\n\t\t\t// Footer headings\n\t\t\tif( get_theme_mod( 'footer_headings' ) != $GLOBALS['footer_headings'] ) {\n\n\t\t\t\tself::generate_css( '.site-subfooter .widget-area .widget .widget-title', 'color', 'footer_headings' );\n\n\t\t\t}\n\n\n\t\t\t// Meta text\n\t\t\tif( get_theme_mod( 'meta_text' ) != $GLOBALS['meta_text'] ) {\n\n\t\t\t\tself::generate_css( '.entry-footer, .comment-metadata, .pingback .edit-link', 'color', 'meta_text' );\n\n\t\t\t}\n\n\t\t\t// Meta link\n\t\t\tif( get_theme_mod( 'meta_link' ) != $GLOBALS['meta_link'] ) {\n\n\t\t\t\tself::generate_css( '.entry-footer a, .comment-metadata a, .pingback .edit-link a', 'color', 'meta_link' );\n\n\t\t\t}\n\n\n\t\t\t// Secondary text\n\t\t\tif( get_theme_mod( 'secondary_text' ) != $GLOBALS['secondary_text'] ) {\n\n\t\t\t\tself::generate_css( '.secondary', 'color', 'secondary_text' );\n\n\t\t\t}\n\n\t\t\t// Secondary link\n\t\t\tif( get_theme_mod( 'secondary_link' ) != $GLOBALS['secondary_link'] ) {\n\n\t\t\t\tself::generate_css( '.secondary a', 'color', 'secondary_link' );\n\n\t\t\t}\n\n\n\t\t\t// Page navigation text\n\t\t\t/*if( get_theme_mod( 'page_navigation_text' ) != $GLOBALS['page_navigation_text'] ) {\n\n\t\t\t\tself::generate_css( '.post-navigation, .comment-navigation, .image-navigation, .pagination, .posts-navigation', 'color', 'page_navigation_text' );\n\n\t\t\t}*/\n\n\t\t\t// Page navigation link\n\t\t\t/*if( get_theme_mod( 'page_navigation_link' ) != $GLOBALS['page_navigation_link'] ) {\n\n\t\t\t\tself::generate_css( '.post-navigation a, .comment-navigation a, .image-navigation a, .pagination a, .posts-navigation a', 'color', 'page_navigation_link' );\n\n\t\t\t}*/\n\n\n\t\t\t// Subfooter text\n\t\t\t/*if( get_theme_mod( 'subfooter_text' ) != $GLOBALS['subfooter_text'] ) {\n\n\t\t\t\tself::generate_css( '.site-subfooter', 'color', 'subfooter_text' );\n\n\t\t\t}\n\n\t\t\t// Subfooter link\n\t\t\tif( get_theme_mod( 'subfooter_link' ) != $GLOBALS['subfooter_link'] ) {\n\n\t\t\t\tself::generate_css( '.site-subfooter a', 'color', 'subfooter_link' );\n\n\t\t\t}*/\n\n\n\t\t\t// Footer text\n\t\t\tif( get_theme_mod( 'footer_text' ) != $GLOBALS['footer_text'] ) {\n\n\t\t\t\tself::generate_css( '.site-footer, .site-subfooter', 'color', 'footer_text' );\n\n\t\t\t}\n\n\t\t\t// Footer link\n\t\t\tif( get_theme_mod( 'footer_link' ) != $GLOBALS['footer_link'] ) {\n\n\t\t\t\tself::generate_css( '.site-footer a, .site-subfooter a', 'color', 'footer_link' );\n\n\t\t\t}\n\n\t\t\t// Footer link\n\t\t\tif( get_theme_mod( 'footer_link' ) != $GLOBALS['footer_link'] ) {\n\n\t\t\t\tself::generate_css( '.site-footer a:hover', 'border-color', 'footer_link' );\n\n\t\t\t}\n\n\n\t\t\tif( get_theme_mod( 'custom_css' ) ) {\n\n\t\t\t\techo wp_kses_post( get_theme_mod( 'custom_css' ) );\n\n\t\t\t}\n\n\t\t?>\n\n\t\t</style>\n\n\t<?php echo \"\\n\";\n\n\t}", "function materialdesign_header_style() {\n\t$header_text_color = get_header_textcolor();\n\n\t// If no custom options for text are set, let's bail\n\t// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value.\n\tif ( HEADER_TEXTCOLOR == $header_text_color ) {\n\t\treturn;\n\t}\n\n\t// If we get this far, we have custom styles. Let's do this.\n\t?>\n\t<style type=\"text/css\">\n\t<?php if ( 'blank' != $header_text_color ) : ?>\n\t\t.brand-logo.header-color {\n\t\t\tcolor: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t}\n\t<?php endif; ?>\n\t</style>\n\t<?php\n}", "function shoper_custom_header_setup() {\n\tadd_theme_support( 'custom-header', apply_filters( 'shoper_custom_header_args', array(\n\t\t'default-image' => get_template_directory_uri() . '/assets/image/custom-header.jpg',\n\t\t'default-text-color' => '000000',\n\t\t'width' => 1000,\n\t\t'height' => 350,\n\t\t'flex-height' => true,\n\t\t'wp-head-callback' => 'shoper_header_style',\n\t) ) );\n\t\n\tregister_default_headers( array(\n\t\t'default-image' => array(\n\t\t'url' => '%s/assets/image/custom-header.jpg',\n\t\t'thumbnail_url' => '%s/assets/image/custom-header.jpg',\n\t\t'description' => esc_html__( 'Default Header Image', 'shoper' ),\n\t\t),\n\t));\n\t\n}", "function happy_admin_header_style() {\n?>\n\t<style type=\"text/css\">\n\t.appearance_page_custom-header #headimg {\n\t\tborder: none;\n\t}\n\t#headimg img {\n\t\tmax-width: <?php echo get_theme_support( 'custom-header', 'max-width' ); ?>px;\n\t}\n\t</style>\n<?php\n}", "function materialdesign_admin_header_style() {\n?>\n\t<style type=\"text/css\">\n\t\t.appearance_page_custom-header #headimg {\n\t\t\tborder: none;\n\t\t}\n\t\t#headimg h1,\n\t\t#desc {\n\t\t}\n\t\t#headimg h1 {\n\t\t}\n\t\t#headimg h1 a {\n\t\t}\n\t\t#desc {\n\t\t}\n\t\t#headimg img {\n\t\t}\n\t</style>\n<?php\n}", "function _custom_logo_header_styles()\n{\n}", "function overlap_custom_head_script(){ \r\n ob_start();\r\n include_once get_template_directory() .'/css/custom-css.php';\r\n $head_content = ob_get_clean();\r\n echo '<style type=\"text/css\" data-name=\"overlap-color-scheme\">' .$head_content.'</style>';\r\n\r\n if( overlap_get_option('head_script') ){\r\n /**\r\n *Extra HTML/JavaScript/Stylesheet from theme options > advanced - head content\r\n */\r\n echo apply_filters('overlap_head_content', overlap_get_option('head_script') ); \r\n } \r\n}", "function _clm_wp_head() {\n?>\n <link rel=\"claim\" href=\"<?= bloginfo('wpurl') ?>/wp-content/plugins/claim/request.php\" title=\"Claim URL\"/>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?= bloginfo('wpurl') ?>/wp-content/plugins/claim/ui/style.css\"/>\n<?php\n}", "function twentyfifteen_header_style() {\n\t$header_image = get_header_image();\n\n\t// If no custom options for text are set, let's bail.\n\tif ( empty( $header_image ) && display_header_text() ) {\n\t\treturn;\n\t}\n\n\t// If we get this far, we have custom styles. Let's do this.\n\t?>\n\t<style type=\"text/css\" id=\"twentyfifteen-header-css\">\n\t<?php\n\t\t// Short header for when there is no Custom Header and Header Text is hidden.\n\t\tif ( empty( $header_image ) && ! display_header_text() ) :\n\t?>\n\t\t.site-header {\n\t\t\tpadding-top: 14px;\n\t\t\tpadding-bottom: 14px;\n\t\t}\n\n\t\t.site-branding {\n\t\t\tmin-height: 42px;\n\t\t}\n\n\t\t@media screen and (min-width: 46.25em) {\n\t\t\t.site-header {\n\t\t\t\tpadding-top: 21px;\n\t\t\t\tpadding-bottom: 21px;\n\t\t\t}\n\t\t\t.site-branding {\n\t\t\t\tmin-height: 56px;\n\t\t\t}\n\t\t}\n\t\t@media screen and (min-width: 55em) {\n\t\t\t.site-header {\n\t\t\t\tpadding-top: 25px;\n\t\t\t\tpadding-bottom: 25px;\n\t\t\t}\n\t\t\t.site-branding {\n\t\t\t\tmin-height: 62px;\n\t\t\t}\n\t\t}\n\t\t@media screen and (min-width: 59.6875em) {\n\t\t\t.site-header {\n\t\t\t\tpadding-top: 0;\n\t\t\t\tpadding-bottom: 0;\n\t\t\t}\n\t\t\t.site-branding {\n\t\t\t\tmin-height: 0;\n\t\t\t}\n\t\t}\n\t<?php\n\t\tendif;\n\n\t\t// Has a Custom Header been added?\n\t\tif ( ! empty( $header_image ) ) :\n\t\t\t$header_image_url = get_header_image();\n\t\t\t$header_image_width = get_custom_header()->width; // default values\n\t\t\t$header_image_height = get_custom_header()->height;\n\t\t\tif ( class_exists ( 'xili_language' ) ) {\n\t\t\t\t$xili_theme_options = get_theme_xili_options() ;\n\t\t\t\tif ( isset ( $xili_theme_options['xl_header'] ) && $xili_theme_options['xl_header'] ) {\n\t\t\t\tglobal $xili_language, $xili_language_theme_options ;\n\t\t\t\t// check if image exists in current language\n\t\t\t\t// 2013-10-10 - Tiago suggestion\n\t\t\t\t$curlangslug = ( '' == xili_curlang() ) ? strtolower( $xili_language->default_lang ) : xili_curlang() ;\n\n\n\t\t\t\t\t$headers = get_uploaded_header_images(); // search in uploaded header list\n\n\t\t\t\t\t$this_default_headers = $xili_language_theme_options->get_processed_default_headers () ;\n\t\t\t\t\tif ( ! empty( $this_default_headers ) ) {\n\t\t\t\t\t\t$headers = array_merge( $this_default_headers, $headers );\n\t\t\t\t\t}\n\t\t\t\t\tforeach ( $headers as $header_key => $header ) {\n\n\t\t\t\t\t\tif ( isset ( $xili_theme_options['xl_header_list'][$curlangslug] ) && $header_key == $xili_theme_options['xl_header_list'][$curlangslug] ) {\n\t\t\t\t\t\t\t$header_image_url = $header['url'];\n\n\t\t\t\t\t\t\t$header_image_width = ( isset($header['width']) ) ? $header['width']: get_custom_header()->width;\n\t\t\t\t\t\t\t$header_image_height = ( isset($header['height']) ) ? $header['height']: get_custom_header()->height; // not in default (but in uploaded)\n\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t?>\n\t\t.site-header {\n\t\t\tbackground: url(<?php echo $header_image_url; ?>) no-repeat 50% 50%; /*changed for child*/\n\t\t\t-webkit-background-size: cover;\n\t\t\t-moz-background-size: cover;\n\t\t\t-o-background-size: cover;\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t@media screen and (min-width: 59.6875em) {\n\t\t\tbody:before {\n\t\t\t\tbackground: url(<?php echo $header_image_url; ?>) no-repeat 100% 50%; /*changed for child*/\n\t\t\t\t-webkit-background-size: cover;\n\t\t\t\t-moz-background-size: cover;\n\t\t\t\t-o-background-size: cover;\n\t\t\t\tbackground-size: cover;\n\t\t\t\tborder-right: 0;\n\t\t\t}\n\n\t\t\t.site-header {\n\t\t\t\tbackground: transparent;\n\t\t\t}\n\t\t}\n\t<?php\n\t\tendif;\n\n\t\t// Has the text been hidden?\n\t\tif ( ! display_header_text() ) :\n\t?>\n\t\t.site-title,\n\t\t.site-description {\n\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\tposition: absolute;\n\t\t}\n\t<?php endif; ?>\n\t</style>\n\t<?php\n}", "function wp_css_admin_head() { ?>\n<link rel=\"stylesheet\" href=\"<?php echo bb_get_plugin_uri(); ?>wp-css/wp-css.css.php\" type=\"text/css\" />\n<?php }", "function w4ptheme_custom_header_setup() {\n\n\tadd_theme_support(\n\t\t'custom-header',\n\t\tarray(\n\t\t\t'default-image' => '',\n\t\t\t'random-default' => false,\n\t\t\t'width' => 1280,\n\t\t\t'height' => 400,\n\t\t\t'flex-width' => true,\n\t\t\t'flex-height' => true,\n\t\t\t'header-text' => false,\n\t\t\t'uploads' => true,\n\t\t\t'wp-head-callback' => 'w4ptheme_custom_header_wp_head',\n\t\t)\n\t);\n\n}", "function materialdesign_custom_header_setup() {\n\tadd_theme_support( 'custom-header', apply_filters( 'materialdesign_custom_header_args', array(\n\t\t'default-image' => '',\n\t\t'default-text-color' => 'ffffff',\n\t\t'width' => 1600,\n\t\t'height' => 250,\n\t\t'flex-height' => true,\n\t\t'wp-head-callback' => 'materialdesign_header_style',\n\t\t'admin-head-callback' => 'materialdesign_admin_header_style',\n\t\t'admin-preview-callback' => 'materialdesign_admin_header_image',\n\t) ) );\n}", "function codium_extend_header_style() {\n if (get_header_image() != ''){\n ?><style type=\"text/css\">\n div#header {\n background: url(<?php header_image(); ?>); height :230px; -moz-border-radius-topleft:6px;border-top-left-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;\n }\n <?php if ( 'blank' == get_header_textcolor() ) { ?>\n\t\th1.blogtitle,.description { display: none; }\n\t\t<?php } else { ?>\n\t\th1.blogtitle a,.description { color:#<?php header_textcolor() ?>; }\n \t<?php\n\t\t} ?>\n\t\t</style><?php\n\t\t}\n\t}", "function registerHead()\r\n\t{\r\n\t\t$url = WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/auto-content-links.css';\r\n\t\techo \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\".$url.\"\\\" />\\n\";\t\r\n\t}", "function get_custom_header()\n{\n}", "function scm_test_admin_header_style()\n { ?>\n <style type=\"text/css\">\n .appearance_page_custom-header #headimg {\n border: none;\n }\n #headimg h1,\n #desc {\n }\n #headimg h1 {\n }\n #headimg h1 a {\n }\n #desc {\n }\n #headimg img {\n }\n </style>\n <?php\n }", "private function header_style() {\n\n\t\t// Check URL\n\t\tif ( ! empty( $_GET['header_style'] ) ) {\n\t\t\treturn esc_html( $_GET['header_style'] );\n\t\t}\n\n\t\t// Get header style from customizer setting\n\t\t$style = get_theme_mod( 'header_style', 'minimal' );\n\n\t\t// Check for custom header style defined in meta options\n\t\tif ( $meta = get_post_meta( $this->post_id, 'pluton_header_style', true ) ) {\n\t\t\t$style = $meta;\n\t\t}\n\n\t\t// Sanitize style to make sure it isn't empty\n\t\t$style = $style ? $style : 'minimal';\n\n\t\t// Apply filters and return\n\t\treturn apply_filters( 'pluton_header_style', $style );\n\n\t}", "function custom_theme_header() {\r\n\r\n\t// Add theme support for Custom Header\r\n\t$header_args = array(\r\n\t\t'default-image' => get_template_directory_uri() . '/images/default_header.jpg',\r\n\t\t'width' => 1170,\r\n\t\t'height' => 350,\r\n\t\t'flex-width' => false,\r\n\t\t'flex-height' => false,\r\n\t\t'random-default' => false,\r\n\t\t'header-text' => false,\r\n\t\t'default-text-color' => '',\r\n\t\t'uploads' => true,\r\n\t\t'wp-head-callback' => '',\r\n\t\t'admin-head-callback' => '',\r\n\t\t'admin-preview-callback' => '',\r\n\t);\r\n\tadd_theme_support( 'custom-header', $header_args );\r\n}", "function estore_custom_header_setup() {\n\tadd_theme_support(\n\t\t'custom-header',\n\t\tapply_filters(\n\t\t\t'estore_custom_header_args',\n\t\t\tarray(\n\t\t\t\t'default-image' => '',\n\t\t\t\t'default-text-color' => '000000',\n\t\t\t\t'width' => 1000,\n\t\t\t\t'height' => 250,\n\t\t\t\t'flex-height' => true,\n\t\t\t\t'wp-head-callback' => 'estore_header_style',\n\t\t\t)\n\t\t)\n\t);\n}", "function s4o_custom_header() {\n // INJECTION OF CUSTOM CSS IS NOW IN /classes/class-fl-child-theme.php\n\n // INSERT TEMPLATE NAME FOR REFERENCE\n echo \"\\n<!-- Template is : \" . get_current_template() . \" -->\\n\";\n\n}", "function respHeader_load_before_customizer() {\n\t$headerSize = get_theme_support( 'custom-header' );\n\t// set header img width\n\tif(!cs_get_mods( 'respheader_width' ) ) {\n\t\tset_theme_mod( 'respheader_width', $headerSize[0]['width'] );\n\t}\n\t// set header img height\n\tif(!cs_get_mods( 'respheader_height' ) ) {\n\t\tset_theme_mod( 'respheader_height', $headerSize[0]['height'] );\n\t}\n\n}", "function wtdb_character_register_head() {\n $siteurl = get_option('siteurl');\n $url = $siteurl . '/wp-content/themes/' . basename(dirname(__FILE__)) . '/admin.css';\n echo \"<link rel='stylesheet' type='text/css' href='$url' />\\n\";\n\t}", "public function adminHead()\n {\n $siteurl = get_option('siteurl');\n $css_url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/css/main.css';\n\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $css_url . '\" />';\n }", "function rivendellweb_header_style() {\n\t\t$header_text_color = get_header_textcolor();\n\t\t$header_bg_color = get_theme_mod( 'theme_bg_color' );\n\t\t$interactive_color = get_theme_mod( 'interactive_color' );\n\n\t\t/*\n\t\t * If no custom options for text are set, let's bail.\n\t\t * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: HEADER_TEXTCOLOR.\n\t\t */\n\t\tif ( HEADER_TEXTCOLOR != $header_text_color ) {\n\n\t\t\t// If we get this far, we have custom styles. Let's do this.\n\t\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t<?php\n\t\t\t// Has the text been hidden?\n\t\t\tif ( ! display_header_text() ) :\n\t\t\t\t?>\n\t\t\t.site-title,\n\t\t\t.site-description {\n\t\t\t\tposition: absolute;\n\t\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\t}\n\t\t\t\t<?php\n\t\t\t\t// If the user has set a custom color for the text use that.\n\t\t\t\telse :\n\t\t\t\t\t?>\n\t\t\t.site-title a,\n\t\t\t.site-description {\n\t\t\t\tcolor: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t\t}\n\t\t<?php endif; ?>\n\t\t\t.main-navigation a,\n\t\t\tbutton.dropdown-toggle,\n\t\t\t.menu-toggle,\n\t\t\t.site-footer,\n\t\t\t.site-footer a {\n\t\t\t\tcolor: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t\t}\n\n\t\t\t.menu-toggle,\n\t\t\t.custom-logo-link:focus > img, .custom-logo-link:hover > img {\n\t\t\t\toutline-color: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t\t}\n\n\t\t\tbutton.menu-toggle:hover,\n\t\t\tbutton.menu-toggle:focus {\n\t\t\t\tcolor: <?php echo esc_attr( $header_bg_color ); ?>;\n\t\t\t\tbackground-color: #<?php echo esc_attr( $header_text_color ); ?>;\n\t\t\t}\n\t\t</style>\n\t\t\t<?php\n\t\t}\n\n\t\t/*\n\t\t * Do we have a custom header background color?\n\t\t */\n\t\tif ( '#002254' != $header_bg_color ) {\n\t\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t.site-header,\n\t\t\t.site-footer {\n\t\t\t\tbackground-color: <?php echo esc_attr( $header_bg_color ); ?>;\n\t\t\t}\n\t\t</style>\n\t\t\t<?php\n\t\t}\n\n\t\t/*\n\t\t * Do we have a custom interactive color?\n\t\t */\n\t\tif ( '#b51c35' != $interactive_color ) {\n\t\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\ta:hover,\n\t\t\ta:focus,\n\t\t\ta:active,\n\t\t\t.page-content a:focus, .page-content a:hover,\n\t\t\t.entry-content a:focus,\n\t\t\t.entry-content a:hover,\n\t\t\t.entry-summary a:focus,\n\t\t\t.entry-summary a:hover,\n\t\t\t.comment-content a:focus,\n\t\t\t.comment-content a:hover,\n\t\t\t.cat-links a {\n\t\t\t\tcolor: <?php echo esc_attr( $interactive_color ); ?>;\n\t\t\t}\n\n\t\t\t.page-content a,\n\t\t\t.entry-content a,\n\t\t\t.entry-summary a,\n\t\t\t.comment-content a,\n\t\t\t.post-navigation .post-title,\n\t\t\t.comment-navigation a:hover,\n\t\t\t.comment-navigation a:focus,\n\t\t\t.posts-navigation a:hover,\n\t\t\t.posts-navigation a:focus,\n\t\t\t.post-navigation a:hover,\n\t\t\t.post-navigation a:focus,\n\t\t\t.paging-navigation a:hover,\n\t\t\t.paging-navigation a:focus,\n\t\t\t.entry-title a:hover,\n\t\t\t.entry-title a:focus,\n\t\t\t.entry-meta a:focus,\n\t\t\t.entry-meta a:hover,\n\t\t\t.entry-footer a:focus,\n\t\t\t.entry-footer a:hover,\n\t\t\t.reply a:hover,\n\t\t\t.reply a:focus,\n\t\t\t.comment-form .form-submit input:hover,\n\t\t\t.comment-form .form-submit input:focus,\n\t\t\t.widget a:hover,\n\t\t\t.widget a:focus {\n\t\t\t\tborder-color: <?php echo esc_attr( $interactive_color ); ?>;\n\t\t\t}\n\n\t\t\t.comment-navigation a:hover,\n\t\t\t.comment-navigation a:focus,\n\t\t\t.posts-navigation a:hover,\n\t\t\t.posts-navigation a:focus,\n\t\t\t.post-navigation a:hover,\n\t\t\t.post-navigation a:focus,\n\t\t\t.paging-navigation a:hover,\n\t\t\t.paging-navigation a:focus,\n\t\t\t.continue-reading a:focus,\n\t\t\t.continue-reading a:hover,\n\t\t\t.cat-links a:focus,\n\t\t\t.cat-links a:hover,\n\t\t\t.reply a:hover,\n\t\t\t.reply a:focus,\n\t\t\t.comment-form .form-submit input:hover,\n\t\t\t.comment-form .form-submit input:focus {\n\t\t\t\tbackground-color: <?php echo esc_attr( $interactive_color ); ?>;\n\t\t\t}\n\n\t\t\t@media screen and (min-width: 900px) {\n\t\t\t\t.no-sidebar .post-content__wrap .entry-meta a:hover,\n\t\t\t\t.no-sidebar .post-content__wrap .entry-meta a:focus {\n\t\t\t\t\tborder-color: <?php echo esc_attr( $interactive_color ); ?>;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t\t\t<?php\n\t\t}\n\t}", "function twentyten_admin_header_style() {\n?>\n<style type=\"text/css\">\n/* Shows the same border as on front end */\n#headimg {\n\tborder-bottom: 1px solid #000;\n\tborder-top: 4px solid #000;\n}\n/* If NO_HEADER_TEXT is false, you would style the text with these selectors:\n\t#headimg #name { }\n\t#headimg #desc { }\n*/\n</style>\n<?php\n}", "function twentyten_admin_header_style() {\n?>\n<style type=\"text/css\">\n/* Shows the same border as on front end */\n#headimg {\n\tborder-bottom: 1px solid #000;\n\tborder-top: 4px solid #000;\n}\n/* If NO_HEADER_TEXT is false, you would style the text with these selectors:\n\t#headimg #name { }\n\t#headimg #desc { }\n*/\n</style>\n<?php\n}", "function wpo_custom_header_setup() {\n /**\n * Filter Twenty Fourteen custom-header support arguments.\n *\n * @since Twenty Fourteen 1.0\n *\n * @param array $args {\n * An array of custom-header support arguments.\n *\n * @type bool $header_text Whether to display custom header text. Default false.\n * @type int $width Width in pixels of the custom header image. Default 1260.\n * @type int $height Height in pixels of the custom header image. Default 240.\n * @type bool $flex_height Whether to allow flexible-height header images. Default true.\n * @type string $admin_head_callback Callback function used to style the image displayed in\n * the Appearance > Header screen.\n * @type string $admin_preview_callback Callback function used to create the custom header markup in\n * the Appearance > Header screen.\n * }\n */\n add_theme_support( 'custom-header', apply_filters( 'wpo_custom_header_args', array(\n 'default-text-color' => 'fff',\n 'width' => 1260,\n 'height' => 240,\n 'flex-height' => true,\n 'wp-head-callback' => 'wpo_header_style',\n 'admin-head-callback' => 'wpo_admin_header_style',\n 'admin-preview-callback' => 'wpo_admin_header_image',\n ) ) );\n}", "function css_includes() {\n wp_enqueue_style( 'cs_styles' );\n }", "public function header_output() {\n\n\t\t?><!-- Customizer CSS -->\n\t\t<style type=\"text/css\"><?php\n\n\t\t\t// pattern:\n\t\t\t// $this->generate_css( 'selector', 'style', 'mod_name', 'prefix', 'postfix', true );\n\t\t\t//\n\t\t\t// background-image example:\n\t\t\t// $this->generate_css( '.class', 'background-image', 'background_image_example', 'url(', ')' );\n\n\n\t\t?></style><!-- Customizer CSS --><?php\n\n\t\t/**\n\t\t * Hides all but the first Soliloquy slide while using Customizer previewer.\n\t\t */\n\t\tif ( is_customize_preview() ) {\n\n\t\t\t?><style type=\"text/css\">\n\n\t\t\t\tli.soliloquy-item:not(:first-child) {\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t}\n\n\t\t\t</style><!-- Customizer CSS --><?php\n\n\t\t}\n\n\t}", "function wp_print_head_scripts()\n{\n}", "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n <link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n <link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "function add_wp_head() {\n return; /* not use theme */\n /*\n $theme = 'vrin_01';\n $theme = 'vrnn_01';\n $theme = 'vrnq_01';\n $theme = 'vlin_01';\n $theme = 'vliq_01';\n $theme = 'vlnq_01';\n $theme = 'vlnn_01';\n $theme = 'hlnq_01';\n $theme = 'vriq_01';\n $basedir = WP_PLUGIN_URL . '/fixed-menu/themes';\n $themedir = $basedir . '/' . $theme;\n $js = $themedir . '/fm.js';\n $css = $themedir . '/fm.css';\n \n echo '<script type=\"text/javascript\" src=\"' . $js . '\"></script>' . \"\\n\";\n echo '<link rel=\"stylesheet\" href=\"' . $css . '\" type=\"text/css\" />'.\"\\n\";\n */\n}", "protected function render_wp_head()\n {\n ob_start();\n wp_head();\n return ob_get_clean();\n }", "function dfd_stylecharger_return_header() {\n get_template_part('templates/header/style', dfd_get_header_style_option());\n exit;\n}", "function enqueue_scripts_header_inline_css(){\n\n $debug = false;\n if (defined('WP_DEBUG') && true === WP_DEBUG) {\n $debug = true;\n }\n\n //Set the CSS directory for this theme\n $CSS_theme_dir = get_stylesheet_directory_uri() . '/assets/css/';\n $CSS_direct_path = get_stylesheet_directory() . '/assets/css/';\n\n\n /**\n * CSS Style Enqueuing\n *\n * If Debug is set, the file that is enqueued is an unminified\n *\n * The file is unminified, but compressed. The version number applied is also specific for a debug file.\n * This means when it goes live the version is smaller, and related to actual production versions.\n **/\n\n if ( $debug ){\n $critical_css_string = file_get_contents( $CSS_direct_path . 'critical.css' );\n } else {\n $critical_css_string = file_get_contents( $CSS_direct_path . 'critical.min.css' );\n }\n\n ?>\n\n <style><?php echo $critical_css_string;?></style>\n\n <?php\n\n}", "public static function esig_head() {\n\n wp_print_styles(self::esig_header_style());\n\n wp_print_scripts(self::esig_header_scripts());\n //add_action(\"wp_enqueue_scripts\",array(__CLASS__,\"esig_header_scripts\"));\n do_action('esig_head');\n }", "function admin_header_style() {\r\n ?><!--<style type=\"text/css\">\r\n #headimg {\r\n width: <?php echo HEADER_IMAGE_WIDTH; ?>px;\r\n height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\r\n background: no-repeat;\r\n }\r\n </style>--><?php\r\n}", "function fotografie_custom_header_setup() {\n\tadd_theme_support( 'custom-header', apply_filters( 'fotografie_custom_header_args', array(\n\t\t'default-image' => get_stylesheet_directory_uri() . '/assets/images/header.jpg',\n\t\t'default-text-color' => 'ffffff',\n\t\t'width' => 1920,\n\t\t'height' => 1080,\n\t\t'flex-height' => true,\n\t\t'flex-width' => true,\n\t\t'wp-head-callback' => 'fotografie_header_style',\n\t\t'video' => true,\n\t) ) );\n\n\tregister_default_headers( array(\n\t\t'blond' => array(\n\t\t\t'thumbnail_url' => get_stylesheet_directory_uri() . '/assets/images/header-thumb.jpg',\n\t\t\t'url' => get_stylesheet_directory_uri() . '/assets/images/header.jpg',\n\t\t\t'description' => esc_html__( 'Blond', 'clean-fotografie' ),\n\t\t),\n\t\t'closeup' => array(\n\t\t\t'thumbnail_url' => get_stylesheet_directory_uri() . '/assets/images/header2-thumb.jpg',\n\t\t\t'url' => get_stylesheet_directory_uri() . '/assets/images/header2.jpg',\n\t\t\t'description' => esc_html__( 'Closeup', 'clean-fotografie' ),\n\t\t),\n\t) );\n}", "function happy_custom_header_setup() {\n\t$args = array(\n\t\t// Text color and image (empty to use none).\n\t\t'header-text' => false,\n\t\t'default-image' => '',\n\n\t\t// Set height and width, with a maximum value for the width.\n\t\t'height' => 250,\n\t\t'width' => 1140,\n\t\t'max-width' => 2000,\n\n\t\t// Support flexible height and width.\n\t\t'flex-height' => true,\n\t\t'flex-width' => true,\n\n\t\t// Random image rotation off by default.\n\t\t'random-default' => false,\n\n\t\t// Callbacks for styling the header and the admin preview.\n\t\t'wp-head-callback' => 'happy_admin_header_style',\n\t\t'admin-head-callback' => '',\n\t\t'admin-preview-callback' => 'happy_admin_header_image',\n\t);\n\n\tadd_theme_support( 'custom-header', $args );\n}", "function id_custom_header_setup() {\r\n\tadd_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(\r\n\t\t'default-image' => get_stylesheet_directory_uri().'/assets/images/header.jpg',\r\n\t\t'width' => 2000,\r\n\t\t'height' => 300,\r\n\t\t'flex-height' => true,\r\n\t\t'video' => true,\r\n\t\t'wp-head-callback' => 'twentyseventeen_header_style',\r\n\t) ) );\r\n\tregister_default_headers( array(\r\n\t\t'default-image' => array(\r\n\t\t\t'url' => '%s/assets/images/header.jpg',\r\n\t\t\t'thumbnail_url' => '%s/assets/images/header.jpg',\r\n\t\t\t'description' => __( 'Default Header Image', 'twentyseventeen' ),\r\n\t\t),\r\n\t) );\r\n}", "function _frozen_header_style_admin() {\n\t\t\t?>\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t\theader[role=banner] {\n\t\t\t\t\t\tbackground-image: url('<?php print(get_template_directory_uri()); ?>/images/logo.png');\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t<?php\n\t\t}", "function bl_page_header() {\r\n\t\t$genoptions = get_option( 'BugLibraryGeneral' );\r\n\t\t$genoptions = wp_parse_args( $genoptions, $this->bl_reset_gen_settings( 'return' ) );\r\n\r\n\t\techo \"<style id='BugLibraryStyle' type='text/css'>\\n\";\r\n\t\techo stripslashes( $genoptions['fullstylesheet'] );\r\n\t\techo \"</style>\\n\";\r\n\t}", "function twentyten_admin_header_style() {\n?>\n<style type=\"text/css\">\n /* Shows the same border as on front end */\n #headimg {\n border-bottom: 1px solid #000;\n border-top: 4px solid #000;\n }\n /* If NO_HEADER_TEXT is false, you would style the text with these selectors:\n #headimg #name { }\n #headimg #desc { }\n */\n</style>\n<?php\n}", "function admin_head() { ?>\n <style>\n .blah { background: #f00; }\n </style>\n <?php }", "function wp_custom_css_cb()\n{\n}", "function custom_css()\n{\n wp_enqueue_style('custom_css', get_stylesheet_uri());\n}", "function future_admin_header_style() {\n?>\n<style type=\"text/css\">\n.appearance_page_custom-header #header-image-wrapper {\n\twidth: 940px;\n\theight: 80px;\n\toverflow: hidden;\n\tborder: none;\n\tbackground-color: #e21c2b;\n}\n\n#header-image-wrapper img {\n\tmax-width: 100%;\n\theight: auto;\n}\n\n#header-custom-text-wrapper {\n\tmargin: 18px 0;\n}\n\n#header-custom-text-wrapper a {\n\ttext-decoration: none;\n}\n\n#header-custom-text-wrapper .site-name {\n\tdisplay: block;\n\tfont-family: 'Oswald', sans-serif;\n\tfont-size: 28px;\n\tline-height: 34px;\n\tpadding: 5px 0 0 15px;\n}\n\n#header-custom-text-wrapper .site-name a {\n\tcolor: #fff;\n}\n\n#header-custom-text-wrapper .site-description {\n\tdisplay: block;\n}\n</style>\n<?php\n}", "public function setup_admin_head() {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . plugins_url( 'css/clockwork.css', __FILE__ ) . '\">';\n }", "function custom_header() {\n\t\t$h_el = \"branding\";\n\t\t$background = ( get_header_image() ) ? 'h_el hgroup a{display:block;}' : '';\n\t\t$color = get_header_textcolor();\n\t\t\n\t\tif ( !$background && !$color )\n\t\t\treturn false;\n\t\t\n\t\t$text = ( 'blank' == $color ) ? '#header hgroup h1,#header hgroup h2{display:none}' : \"#header hgroup,#header hgroup a{color:#$color}\";\n\t\t\n\t\techo '<style>' . $background . $text . \"</style>\\n\";\n\t}", "function wp_ktml_insert_head() {\r\n$siteurl = get_settings('siteurl');\r\n$ktml_plugin_path = $siteurl . '/wp-content/plugins/ktml/';\r\necho '\r\n<link href=\"'.$ktml_plugin_path.'includes/ktm/styles/KT_styles.css\" rel=\"stylesheet\"\r\ntype=\"text/css\">\r\n';\r\n}", "function theme_styles() \n{\n // (First the unique name for the style (custom-style) then the src, \n // then dependencies and ver no. and media type)\n wp_register_style( 'custom-style', \n get_template_directory_uri() . '/css/custom-style.css', \n array(), \n '20120208', \n 'all' );\n\n // enqueing:\n wp_enqueue_style( 'custom-style' );\n}", "function admin_register_head() {\n $siteurl = get_option('siteurl');\n $url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/css/tabinfo.css';\n echo \"<link rel='stylesheet' type='text/css' href='$url' />\\n\";\n echo '<link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\" integrity=\"sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN\" crossorigin=\"anonymous\">';\n}", "function admin_custom_header() {\n\t\techo '<style>#headimg{height:' . HEADER_IMAGE_HEIGHT . 'px;width:' . HEADER_IMAGE_WIDTH . 'px}</style>';\n\t}", "function css_render_shopstyler_header(){\n $css = '';\n $var = get_option ( 'shopstyler');\n \n $bg = ss_generic_background_wrapper_css ( $var['woo_shopheader_background'] );\n \n $max_height = $var['woo_shopheader_height'];\n $color = $var['woo_shopheader_text_color'];\n $css .= '.ss-shopheader-wrapper { ' .$bg. ' height: '. $max_height .'px!important; }';\n $css .= '.ss-shopheader-content { color: ' .$color. '!important; }';\n return $css;\t\t\n}", "public function customizer_css() {\n\t\t\t$header_link_color = get_theme_mod( 'storefront_header_link_color' );\n\t\t\t$tagline_font_size = get_theme_mod('tagline_font_size');\n\t\t\t$header_logo_size = get_theme_mod('header_logo_size');\n\t\t\t$social_media_color = get_theme_mod('social_media_color');\n\t\t\t$heading_color = get_theme_mod( 'storefront_heading_color' );\n\t\t\t$sub_heading_color = get_theme_mod('sub_heading_color');\n\t\t\t$button_color = get_theme_mod('storefront_button_background_color');\n\t\t\t$button_text_color = get_theme_mod('storefront_button_text_color');\n\t\t\t$icons_vertical_pos = get_theme_mod('icons_vertical_pos');\n\t\t\t$header_link_hover_color = get_theme_mod('header_link_hover_color');\n\n $style = '\n .site-header-cart, .site-header-cart > li > a {\n color: ' . $header_link_color . ' !important;\n\t\t\t}\n .site-header-cart:focus, .site-header-cart:focus > li > a {\n color: ' . $header_link_color . ' !important;\n }\n \n .site-header-cart:hover > li > a {\n color: ' . $header_link_color . ' !important;\n }\n a.cart-contents:hover {\n\t\t\t\tcolor: ' . $header_link_color . ' !important;\n\t\t\t}\n\t\t\t.site-header .site-search .widget_product_search form label {\n\t\t\t\tcolor: ' . $header_link_color . ' !important;\n\t\t\t}\n\t\t\t.site-header .header-icons-container .my-account {\n\t\t\t\tcolor: ' . $header_link_color . ' !important;\n\t\t\t}\n\t\t\tp.site-description{\n\t\t\t\tfont-size: ' . $tagline_font_size . 'px !important;\n\t\t\t}\n\t\t\t.site-header .custom-logo-link img, .site-header .site-logo-anchor img, .site-header .site-logo-link img {\n\t\t\t\twidth: ' . $header_logo_size . 'em;\n\t\t\t}\n\t\t\t.site-footer .social-media-menu{\n\t\t\t\tcolor: ' . $social_media_color . ';\n\t\t\t}\n\t\t\t.site-footer .social-media-menu a{\n\t\t\t\tcolor: ' . $social_media_color . ' !important;\n\t\t\t}\n\t\t\t.sub-heading, .entry-content .wpforms-title {\n\t\t\t\tcolor: ' . $sub_heading_color . ' ;\n\t\t\t}\n\t\t\t.contact-us-form .wpforms-submit-container .contact-us-send {\n\t\t\t\tbackground-color: ' . $button_color . ' !important;\n\t\t\t\tcolor: ' . $button_text_color . ' !important;\n\t\t\t}\n\t\t\t.contact-us-form .wpforms-head-container, .phone-enquiries-container .phone-enquiries-header-container {\n\t\t\t\tborder-bottom-color: ' . $button_color . ' !important;\n\t\t\t\tfilter:brightness(1.3);\n\t\t\t}\n\t\t\t.header-icons-container {\n\t\t\t\ttop: ' . $icons_vertical_pos . '%;\n\t\t\t}\n\t\t\t.site-header-cart, .site-header-cart > li > a:hover {\n color: ' . $header_link_hover_color . ' !important;\n\t\t\t}\n\t\t\t.site-header .header-icons-container .my-account:hover {\n\t\t\t\tcolor: ' . $header_link_hover_color . ' !important;\n\t\t\t}\n\t\t\t.site-header .site-search .widget_product_search form label:hover {\n\t\t\t\tcolor: ' . $header_link_hover_color . ' !important;\n\t\t\t}\n\t\t\t';\n\n\t\t\twp_add_inline_style( 'storefront-child-style', $style );\n\t\t}", "function header_style() {\n if (get_header_image() != ''){\n ?><style type=\"text/css\">\n div#header {\n background: url(<?php header_image(); ?>); height :230px; -moz-border-radius-topleft:6px;border-top-left-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;\n }\n <?php if ( 'blank' == get_header_textcolor() ) { ?>\n\t\th1.blogtitle,.description { display: none; }\n\t\t<?php } else { ?>\n\t\th1.blogtitle a,.description { color:#<?php header_textcolor() ?>; }\n \t<?php\n\t\t} ?>\n\t\t</style><?php\n\t\t}\n\t}", "function add_custom_css() {\n wp_enqueue_style( 'theme-style', get_stylesheet_directory_uri() . '/style.min.css' );\n wp_dequeue_style( 'twentythirteen-style' );\n\n // fonts\n wp_dequeue_style( 'twentythirteen-fonts' );\n wp_deregister_style( 'open-sans' );\n wp_register_style( 'open-sans', false ); // dependency workaround from https://gist.github.com/thetrickster/8946567\n wp_dequeue_style( 'bitter' );\n}", "function future_header_style() {\n}", "function admin_header_style() {\n ?><style type=\"text/css\">\n #heading {\n width: <?php echo HEADER_IMAGE_WIDTH; ?>px;\n height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\n background: no-repeat;\n }\n </style><?php\n}", "function housico_custom_css() {\n\t\t\techo '<style type=\"text/css\" id=\"housico_custom-css\">'. housico_custom_css() .'</style>';\n\t\t}", "function admin_header_style() {\r\n ?><style type=\"text/css\">\r\n #headimg {\r\n width: <?php echo HEADER_IMAGE_WIDTH; ?>px;\r\n height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\r\n background: no-repeat;\r\n }\r\n </style><?php\r\n}", "function cfct_wp_head() {\n\techo cfct_get_option('wp_head');\n}", "function _frozen_header_style() {\n\t\t\t?>\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t\theader[role=banner] {\n\t\t\t\t\t\tbackground-image: url('<?php header_image(); ?>');\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t<?php\n\t\t}", "function wp_head() {\n\t\\do_action( 'gnist/wp/head' );\n}", "public function modify_header() {\n\t\twp_dequeue_style( 'twentythirteen-fonts' );\n\t\twp_enqueue_style( 'wsu-news-fonts', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic|Bitter:400,700|Open+Sans+Condensed:300,700,300italic', array(), null );\n\t}", "function af_ela_header() {\n global $ela_plugin_basename;\n\t// loading stuff\n\t$settings = get_option('af_ela_options');\n\t$plugin_path = WP_PLUGIN_URL . '/'. $ela_plugin_basename;\n\tif ($settings['use_default_style']) {\n\t\tif (file_exists(ABSPATH . 'wp-content/themes/' . get_template() . '/ela.css')) {\n\t\t\t$csspath = get_bloginfo('template_url').\"/ela.css\";\n\t\t} else {\n\t\t\t$csspath =$plugin_path.\"/includes/af-ela-style.css\";\n\t\t}\n\t\n\t\t$text = <<<TEXT\n\n\t<link rel=\"stylesheet\" href=\"$csspath\" type=\"text/css\" media=\"screen\" />\n\nTEXT;\n\t} else { \n\t\t$text ='';\n\t}\n\n\techo $text;\n}", "function bimber_essb_enqueue_head_styles() {\n\t$version = bimber_get_theme_version();\n\t$stack = bimber_get_current_stack();\n\t$skin = bimber_get_theme_option( 'global', 'skin' );\n\n\t$uri = trailingslashit( get_template_directory_uri() );\n\n\t// Global styles.\n\twp_enqueue_style( 'bimber-essb', $uri . 'css/' . bimber_get_css_theme_ver_directory() . '/styles/' . $stack . '/essb-' . $skin . '.min.css', array(), $version );\n\twp_style_add_data( 'bimber-essb', 'rtl', 'replace' );\n}", "public function add_customizer_css() {\n\t\t\t$header_text_color = get_theme_mod( 'storefront_header_text_color' );\n\n\t\t\t$style = '\n\t\t\t\t.main-navigation ul li.smm-active li ul.products li.product h3 {\n\t\t\t\t\tcolor: ' . $header_text_color . ';\n\t\t\t\t}';\n\n\t\t\twp_add_inline_style( 'storefront-child-style', $style );\n\t\t}", "function tiga_custom_css() {\n\n\t$custom_css = of_get_option( 'tiga_custom_css' );\n\tif ( $custom_css != '' ) {\n\t\techo \"<!-- Custom style -->\\n<style type=\\\"text/css\\\">\\n\" . wp_filter_nohtml_kses( $custom_css ) . \"\\n</style>\\n\";\n\t}\n\n}", "function admin_header_style() {\n\t?><style type=\"text/css\">\n#headimg {\n width: 5px;\n height: <?php echo HEADER_IMAGE_HEIGHT; ?> px;\n background: no-repeat;\n}\n</style><?php\n}", "public function admin_head_css() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t.appearance_page_shop-isle-pro-welcome li[data-tab-id=\"sites_library\"] {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t.appearance_page_shop-isle-pro-welcome #changelog .changelog {\n\t\t\t\tmargin-left: 30px;\n\t\t\t}\n\n\t\t\t.appearance_page_shop-isle-pro-welcome #changelog .changelog h2 {\n\t\t\t\ttext-align: left;\n\t\t\t\tfont-size: 23px;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tmargin-left: -20px;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}", "function client_side_print_compose_head() {\n $this->head_print_js_css();\n // wp_print_scripts( array( 'sack' )); // Define custom A J A X respond at Client side\n }", "function _head_styles()\n {\n\t\t$screen = get_current_screen();\n\t\t\n\t\t// only load our styles if on one of our screens\n\t\tif ( strpos($screen->base,'pagely') !== false ) \n\t\t{\n $src = plugin_dir_url(dirname(__DIR__).'/foo').'css/pagely_styles.css';\n\t\t\twp_enqueue_style( 'pagely-styles', $src, false, false, false ); \n\t\t\tpagely_load_font_awesome();\n\t\t}\n\t}", "function admin_header_style() {\n ?><style type=\"text/css\">\n #headimg {\n width: <?php echo HEADER_IMAGE_WIDTH; ?>px;\n height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\n }\n </style><?php\n}", "function minimum_admin_style() {\n\n\t$headimg = sprintf( '.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Oswald, arial, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT );\n\t$h1 = sprintf( '#headimg h1, #headimg h1 a { color: #%s; font-size: 48px; font-weight: normal; line-height: 48px; margin: 25px 0 0; text-decoration: none; }', esc_html( get_header_textcolor() ) );\n\t$desc = sprintf( '#headimg #desc { color: #%s; display: none; }', esc_html( get_header_textcolor() ) );\n\n\tprintf( '<style type=\"text/css\">%1$s %2$s %3$s background: #7f7f7f;</style>', $headimg, $h1, $desc );\n\n}", "public static function header_output() {\r\n\t\t\t$theme_nav_type = '';\r\n\t\t\tglobal $post, $theme_options; \r\n\t\t\techo '<style type=\"text/css\">';\r\n\t\t\t\r\n\t\t\t// Go up arrow\r\n\t\t\tmanual__gouparrow_settings();\r\n\t\t\t// menu navigation style control\r\n\t\t\tmanual_menu_navigation_control();\r\n\t\t\t// control header\r\n\t\t\tmanual_header_control_global();\r\n\t\t\t// remaining global\r\n\t\t\tmanual_customizer_enhance(); \r\n\t\t\t\r\n\t\t\techo '</style>';\r\n\t }", "function nacc_head ( )\n\t{\n\tglobal $wp_query;\n\t$page_obj_id = $wp_query->get_queried_object_id();\n\tif ( $page_obj_id )\n\t\t{\n\t\t$page_obj = get_page ( $page_obj_id );\n $shortcode_obj = get_shortcode ( $page_obj->post_content );\n \n if ( $shortcode_obj )\n\t\t\t{\n\t\t\techo \"<!-- Added by the NACC plugin. -->\\n\";\n\t\t\techo '<link rel=\"stylesheet\" href=\"'.plugin_dir_url(__FILE__).'nacc2/nacc.css\" type=\"text/css\" />'.\"\\n\";\n\t\t\techo '<script type=\"text/javascript\" src=\"'.plugin_dir_url(__FILE__).'nacc2/nacc.js\"></script>'.\"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function manuscript_customize_css( $is_header_preview ) {\n\t// Accent Color\n\tif( '#b5e7fc' !== get_theme_mod('accent_color') && false !== get_theme_mod('accent_color') ) {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t.site-title .background-path {\n\t\t\t\tfill: <?php echo get_theme_mod('accent_color'); ?>; \n\t\t\t}\n\t\t\t.sticky {\n\t\t\t\tborder-color: <?php echo get_theme_mod('accent_color'); ?>;\n\t\t\t}\n\t\t\t.bypostauthor .fn {\n\t\t\t\tbackground-color: <?php echo get_theme_mod('accent_color'); ?>;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}\n\t// Link Color\n\tif( '#ffef8b' !== get_theme_mod('link_color') && false !== get_theme_mod('accent_color') ) {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t<?php if( $is_header_preview !== true ) { ?>\n\n\t\t\ta, .entry-footer .comments-link a {\n\t\t\t\tbox-shadow: inset 0 -2px 0 <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\t\t\t.entry-title a {\n\t\t\t\tbox-shadow: inset 0 -.4em 0 <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\t\t\t.entry-content a,\n\t\t\t.comment-content a {\n\t\t\t\tbox-shadow: inset 0 -5px 0 <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\t\t\ta:hover,\n\t\t\ta:focus,\n\t\t\ta:active,\n\t\t\t.main-navigation ul ul li:hover > a,\n\t\t\t.page-links a {\n\t\t\t\tbackground-color: <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\n\t\t\t.post-format-link a:hover,\n\t\t\t.post-format-link a:focus,\n\t\t\t.post-format-link a:active {\n\t\t\t\tcolor: <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\t\t\t\n\t\t\t.site-main .attachment-navigation .nav-previous a::after,\n\t\t\t.site-main .attachment-navigation .nav-next a::after {\n\t\t\t\tcolor: <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\t\t\t\n\t\t\t<?php } ?>\n\n\t\t\t.site-title a:hover .background-path,\n\t\t\t.site-title a:focus .background-path,\n\t\t\t.site-title a:active .background-path {\n\t\t\t\tfill: <?php echo get_theme_mod('link_color'); ?>;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}\n}", "function addHeaderCode() {\r\n\twp_enqueue_style('socialConnect-style', plugins_url('/social-connect-widget/css/socialConnect-style.php'));\r\n\twp_enqueue_style('tipTip-style', plugins_url('/social-connect-widget/css/tipTip.css'));\r\n\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('tipTip', plugins_url('/social-connect-widget/js/jquery.tipTip.js'), __FILE__, '' , 'all');\r\n\twp_enqueue_script('socialConnectScripts', plugins_url('/social-connect-widget/js/socialConnect.scripts.js'), __FILE__, '' , 'all');\r\n\tif (get_option('sc_displayModal')) {\r\n\t\twp_enqueue_style('simpleModal-style', plugins_url('/social-connect-widget/css/simpleModal.php'));\r\n\t\twp_enqueue_script('simpleModal', plugins_url('/social-connect-widget/js/jquery.simplemodal.js'), __FILE__, '' , 'all');\r\n\t}\r\n}", "public function hookBackOfficeHeader()\r\n\t{\r\n\t\tif(version_compare(_PS_VERSION_, '1.6','>=')) $this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/ps_style.16.css');\r\n\r\n\t\telseif (version_compare(_PS_VERSION_, '1.5', '<'))\r\n\t\t\treturn '<link rel=\"stylesheet\" type=\"text/css\" href=\"'._MODULE_DIR_.$this->name.'/css/ps_style.css\" />';\r\n\t\telseif (method_exists($this->context->controller, 'addCSS'))\r\n\t\t\t$this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/ps_style.css');\r\n\t\telse\r\n\t\t\tTools::addCSS(_MODULE_DIR_.$this->name.'/css/ps_style.css');\r\n\t}" ]
[ "0.78723997", "0.77426934", "0.7717478", "0.7651154", "0.7436728", "0.74191785", "0.7364968", "0.7358153", "0.7331597", "0.72673047", "0.72112656", "0.7157266", "0.7094987", "0.7089266", "0.7082801", "0.70644635", "0.7059461", "0.70139855", "0.7008724", "0.6998029", "0.6994637", "0.699074", "0.6978088", "0.69525874", "0.69301534", "0.6926316", "0.69199216", "0.6918342", "0.6914301", "0.6904843", "0.69044065", "0.69011325", "0.6898344", "0.68959713", "0.685508", "0.68545425", "0.6838904", "0.6826292", "0.68244153", "0.68202055", "0.6816067", "0.6802319", "0.6796597", "0.6791947", "0.6791947", "0.6787377", "0.6787064", "0.67842454", "0.67840284", "0.6783211", "0.6783211", "0.6778966", "0.67693037", "0.6758992", "0.6756636", "0.67555887", "0.6754518", "0.6738405", "0.67346174", "0.6731983", "0.67203623", "0.6716488", "0.6711111", "0.6706471", "0.670593", "0.6701501", "0.6701232", "0.6693933", "0.6685009", "0.66763484", "0.6658408", "0.66576284", "0.6645539", "0.6641961", "0.6639749", "0.66341335", "0.66299635", "0.6628464", "0.6627264", "0.6614946", "0.6613414", "0.6610793", "0.65923864", "0.65917766", "0.65836674", "0.6571097", "0.6569083", "0.6562518", "0.65620583", "0.6561578", "0.65491897", "0.654802", "0.65435", "0.65424174", "0.65411174", "0.6484171", "0.6481577", "0.6474522", "0.6466827", "0.6465727" ]
0.82597667
0
Return default copyright field text.
Вернуть текст поля по умолчанию "авторские права".
public function get_default_copyright() { return sprintf( esc_html__( 'Copyright © %d. %s. All Rights Reserved.', 'w4ptheme' ), date( 'Y' ), get_bloginfo( 'name' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start_get_copyright_text() {\n\t$copyright_text = get_field( 'copyright_text', 'option' );\n\t// Replace [year] with the year.\n\t$copyright_text = str_replace( '[year]', date( 'Y' ), $copyright_text );\n\treturn $copyright_text;\n}", "public function copyright_callback() {\n\t\t?>\n\t\t<div class=\"w4p-copyright-wrapper\">\n\t\t\t<label for=\"w4p_copyright\" class=\"w4p-option-label\"><?php esc_html_e( 'Copyright:', 'w4ptheme' ); ?></label>\n\t\t\t<input\n\t\t\t\ttype=\"text\"\n\t\t\t\tid=\"w4p_copyright\"\n\t\t\t\tname=\"w4p_copyright\"\n\t\t\t\tvalue=\"<?php echo ! empty( $this->options['w4p_copyright'] ) ? esc_attr( $this->options['w4p_copyright'] ) : '' ?>\"\n\t\t\t\tplaceholder=\"<?php echo esc_attr( $this->get_default_copyright() ); ?>\"\n\t\t\t/>\n\t\t</div>\n\t<?php }", "public function get_copyright()\n {\n }", "public function get_copyright()\n {\n }", "public function get_copyright()\n {\n }", "public static function getCopyright () {}", "private function getCopyright() {\r\r\n $meta = '';\r\r\n\r\r\n $name = $this->getAuthor('display_name');\r\r\n if ($name == '') {\r\r\n $name = $this->meta['blogname'];\r\r\n }\r\r\n\r\r\n if ($name <> '') {\r\r\n $meta = sprintf(\"<meta name=\\\"dcterms.rightsHolder\\\" content=\\\"%s\\\" />\" . \"\\n\", apply_filters('sq_copyright', $name));\r\r\n }\r\r\n\r\r\n return apply_filters('sq_copyright_meta', $meta);\r\r\n }", "public function copyright(): ?string\n {\n return $this->copyright;\n }", "public function Copyright()\n {\n $config = SiteConfig::current_site_config();\n return $config->Copyright ?: $config->DefaultCopyright();\n }", "function client_portal_customize_copyright_text( $wp_customize ) {\n\n\t// Register a setting.\n\t$wp_customize->add_setting(\n\t\t'client_portal_copyright_text',\n\t\tarray(\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'wp_kses_post',\n\t\t)\n\t);\n\n\t// Create the setting field.\n\t$wp_customize->add_control(\n\t\tnew Text_Editor_Custom_Control(\n\t\t\t$wp_customize,\n\t\t\t'client_portal_copyright_text',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Copyright Text', 'client-portal' ),\n\t\t\t\t'description' => esc_html__( 'The copyright text will be displayed in the footer. Basic HTML tags allowed.', 'client-portal' ),\n\t\t\t\t'section' => 'client_portal_footer_section',\n\t\t\t\t'type' => 'textarea',\n\t\t\t)\n\t\t)\n\t);\n}", "public function get_Copyright() {\n return $this->copyright;\n }", "public function cszCopyright(){\n /* Please do not remove or change this function */\n $csz_copyright = '<br><span class=\"copyright\">'.$this->cszCredit().'</span>';\n return $csz_copyright;\n }", "function displayCopyrightInfo()\r\n\t{\r\n\t\t# string contains copyright symbol. current date, and company name\r\n\t\t$copyrightLine = (\"&copy;\" . \" \" . date('Y') . \" \" . \"Peas In a Pod\");\r\n\t\treturn $copyrightLine;\r\n\t}", "function start_copyright_text() {\n\t// Escape output (allowing basic markup) & prettify dashes, apostrophes, etc.\n\techo wp_kses_post( wptexturize( start_get_copyright_text() ) );\n}", "public function getCopyright()\n {\n return $this->copyright;\n }", "public function getCopyright()\n {\n return $this->copyright;\n }", "public function getCopyright()\n {\n return $this->copyright;\n }", "public function getCopyright()\n {\n return $this->copyright;\n }", "public function getCopyright()\n {\n return $this->copyright;\n }", "function GetCopyright() {\n\t\treturn $this->copyright;\n\t}", "function comicpress_copyright() {\n global $wpdb;\n $copyright_dates = $wpdb->get_results(\"\nSELECT\nYEAR(max(post_date_gmt)) AS lastdate\nFROM\n$wpdb->posts\nWHERE\npost_status = 'publish'\n\");\n $output = '';\n if($copyright_dates) {\n $copyright = \"&copy; \" . $copyright_dates[0]->lastdate;\n $output = $copyright;\n }\n return $output;\n}", "function simple_copyright () {\n\treturn \"&copy; \" . get_bloginfo('name') .\" \". date(\"Y\");\n}", "protected function getCopyrightWidget($value=null)\n\t{\n\t\t$widget = new TextField();\n\n\t\t$widget->id = 'copyright';\n\t\t$widget->name = 'copyright';\n\t\t$widget->mandatory = true;\n\t\t$widget->maxlength = 80;\n\t\t$widget->value = $value;\n\t\t$widget->required = true;\n\n\t\t$widget->label = $GLOBALS['TL_LANG']['tl_member_fields']['copyright'][0];\n\n\t\tif ($GLOBALS['TL_CONFIG']['showHelp'] && strlen($GLOBALS['TL_LANG']['tl_member_fields']['copyright'][1]))\n\t\t{\n\t\t\t$widget->help = $GLOBALS['TL_LANG']['tl_member_fields']['copyright'][1];\n\t\t}\n\n\t\t// Valiate input\n\t\tif (\\Input::post('FORM_SUBMIT') == 'tl_export_memberfields')\n\t\t{\n\t\t\t$widget->validate();\n\n\t\t\tif ($widget->hasErrors())\n\t\t\t{\n\t\t\t\t$this->blnSave = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $widget;\n\t}", "function display_copyright()\n{\n\t$name=\"Hector Mariscal, Michelle Kirwood - Group 09\";\n\t$footerStrip='&copy;'. date('Y').' ' . $name;\n\t\t\n\treturn $footerStrip;\n}", "protected function getLicenseText()\n {\n return $this->wrapStringIntoCommentPhpBlock($this->replacePlaceholders($this->_contentData['license']), $this->_contentData['type']);\n }", "function wpb_copyright() {\n\tglobal $wpdb;\n\t$copyright_dates = $wpdb->get_results(\"\n\t\tSELECT\n\t\t\tYEAR(min(post_date_gmt)) AS firstdate,\n\t\t\tYEAR(max(post_date_gmt)) AS lastdate\n\t\tFROM\n\t\t\t$wpdb->posts\n\t\tWHERE\n\t\t\tpost_status = 'publish'\n\t\");\n\t$output = '';\n\tif($copyright_dates) {\n\t\t$copyright = \"© \" . $copyright_dates[0]->firstdate;\n\t\tif($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {\n\t\t\t$copyright .= '-' . $copyright_dates[0]->lastdate;\n\t\t}\n\t\t$output = $copyright;\n\t}\n\treturn $output;\n}", "public static function Copyright( $year = NULL )\n {\n if ( NULL === $year )\n {\n $year = date( \"Y\" );\n }\n \n $companyName = Config::Get( \"website/companyName\" );\n \n return \"Copyright &copy; $year $companyName\";\n }", "function displayCopyright(){\n \n echo \"<span id='copyright'> &copy; Ayesha Begum Shaik (2013800) \".date(\"Y\").\"</span>\";\n \n}", "public function getHeaderText()\n {\n if ($this->getLicense()->getId()) {\n return $this->getLicense()->getLicenseKey();\n } else {\n return __('New License');\n }\n }", "function copyright(){\n echo \"<center><p> Copyright (c) 2018 Copyright Holder All Rights Reserved. </p></center><br></br>\";\n}", "public function getCopyright() {\r\n\t\tif (array_key_exists ( 'copyright', $this->data )) {\r\n\t\t\treturn $this->data ['copyright'];\r\n\t\t}\r\n\t\t\r\n\t\t$copyright = $this->getExtension ( 'Atom' )->getCopyright ();\r\n\t\t\r\n\t\tif (! $copyright) {\r\n\t\t\t$copyright = null;\r\n\t\t}\r\n\t\t\r\n\t\t$this->data ['copyright'] = $copyright;\r\n\t\t\r\n\t\treturn $this->data ['copyright'];\r\n\t}", "function mw_Copyright() {\n\tglobal $settings;\n\tif (file_exists(INFUSIONS.\"mw_premium_panel/locale/\".$settings['locale'].\".php\")) {\n\t\tinclude INFUSIONS.\"mw_premium_panel/locale/\".$settings['locale'].\".php\";\n\t} else {\n\t\tinclude INFUSIONS.\"mw_premium_panel/locale/German.php\";\n\t}\n\t//Infusion title\n\t$title = $locale['MWP_title'];\n\t//Gets Infusion version change 'your_panel' to the folder of the infusion\n\t$data_version = dbarray(dbquery(\"SELECT inf_version FROM \".DB_INFUSIONS.\" WHERE inf_folder = 'mw_premium_panel'\"));\n\t$version = $data_version['inf_version'];\n\t//Copyright Output\n\treturn $copyright = \"<br /><div class='small' align='right'><a href='http://www.DeeoNe.de' target='_blank' title='\".$title.\" v\".$version.\" &copy; \".showdate(\"%Y\",time()).\" by Matze-W'><span class='small'>&copy;</span></a></div>\";\n\t// End copyright info\n}", "function display_copyright($content) {\n if (BsaUtil::is_enabled(self::OPTION_NAME) && is_single()) {\n $copyright = BsaUtil::get_value(self::OPTION_INFO, '');\n if (strpos($copyright, self::VAR_LINK)) {\n // Replace the reserved viarable with blog name and article link\n $blog_link = '<a href=\"' . get_permalink() . '\">' . get_bloginfo('name') . '</a>';\n $copyright = str_replace(self::VAR_LINK, $blog_link, $copyright);\n\n }\n\n $content = $content . $copyright;\n }\n\n return $content;\n }", "function add_copyright() {\n\t$copyright_message = \"Copyright \".date('Y').\" Falkon Productions, All Rights Reserved\";\n\techo $copyright_message;\n}", "function get_app_copyright($isFooter = false)\n{\n $ret = APP_COPYRIGHT;\n $ret .= ($isFooter && OPT_SHOW_LICENSE_ON_FOOTER) ? \" \".get_app_license() :\n \"\";\n\n return apply_filters($ret, \"a\");\n}", "function gf_dynamic_copyright( $args = '' ) {\n\n\t\t/** Initialize variables */\n\t\t$initialize_values = array(\n\t\t\t'start' => '',\n\t\t\t'copy_years' => '',\n\t\t\t'url' => '',\n\t\t\t'end' => ''\n\t\t);\n\t\t$args = wp_parse_args( $args, $initialize_values );\n\t\t$output = '';\n\n\t\t/** Start common copyright notice */\n\t\tempty( $args['start'] )\n\t\t\t? $output .= sprintf( __( 'Copyright', 'ground-floor' ) )\n\t\t\t: $output .= $args['start'];\n\n\t\t/* Calculate Copyright Years; and, prefix with Copyright Symbol */\n\t\tif ( empty( $args['copy_years'] ) ) {\n\n\t\t\t/** Get all posts */\n\t\t\t$all_posts = get_posts( 'post_status=publish&order=ASC' );\n\t\t\t/** Get first post */\n\t\t\t$first_post = $all_posts[0];\n\t\t\t/** Get date of first post */\n\t\t\t$first_date = $first_post->post_date_gmt;\n\t\t\t/** First post year versus current year */\n\t\t\t$first_year = substr( $first_date, 0, 4 );\n\t\t\tif ( $first_year == '' ) {\n\t\t\t\t$first_year = date( 'Y' );\n\t\t\t}\n\n\t\t\t/** Add to output string */\n\t\t\tif ( $first_year == date( 'Y' ) ) {\n\t\t\t\t/** Only use current year if no posts in previous years */\n\t\t\t\t$output .= ' &copy; ' . date( 'Y' );\n\t\t\t} else {\n\t\t\t\t$output .= ' &copy; ' . $first_year . \"-\" . date( 'Y' );\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$output .= ' &copy; ' . $args['copy_years'];\n\n\t\t}\n\n\t\t/** Create URL to link back to home of website */\n\t\tempty( $args['url'] )\n\t\t\t? $output .= ' <a href=\"' . home_url( '/' ) . '\" title=\"' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '\" rel=\"home\">' . get_bloginfo( 'name', 'display' ) . '</a> '\n\t\t\t: $output .= ' ' . $args['url'];\n\n\t\tempty( $args['end'] )\n\t\t\t? $output .= ' ' . sprintf( __( 'All rights reserved.', 'ground-floor' ) )\n\t\t\t: $output .= ' ' . $args['end'];\n\n\t\t/** Construct and sprintf the copyright notice */\n\t\t$output = '<span id=\"gf-dynamic-copyright\">' . $output . '</span><!-- #gf-dynamic-copyright -->';\n\n\t\techo apply_filters( 'gf_dynamic_copyright', $output, $args );\n\n\t}", "function copyright_notice( $wp_customize ) {\n\t$wp_customize->add_section(\n \t'Intellectual Property',\n \tarray(\n\t\t\t'title' => 'Intellectual Property',\n \t\t'description' => 'Steal stuff from Chris',\n \t\t'priority' => 35,\n \t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'copyright_textbox',\n\t\tarray(\n \t\t\t'default' => '2018 SILO GROUP, LTD',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'copyright_textbox',\n\t\tarray(\n \t\t\t'label' => 'Copyright Notice',\n \t\t\t'section' => 'Intellectual Property',\n \t\t\t'type' => 'text',\n\t\t)\n\t);\n}", "function copyrightYear(){\nreturn date('Y');\n}", "function frmw_copyright() {\n global $wpdb;\n $copyright_dates = $wpdb->get_results(\"\n SELECT\n YEAR(min(post_date_gmt)) AS firstdate,\n YEAR(max(post_date_gmt)) AS lastdate\n FROM\n $wpdb->posts\n WHERE\n post_status = 'publish'\n \");\n\n $output = '';\n\n if($copyright_dates) {\n $copyright = \"© \" . $copyright_dates[0]->firstdate;\n if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {\n $copyright .= '-' . $copyright_dates[0]->lastdate;\n }\n $output = $copyright;\n }\n return $output;\n}", "public function viewCopyright() {\n return [\n '#theme' => 'udb3_copyright',\n ];\n }", "protected function parseCopyright() {\n\t\treturn null;\n\t}", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function sanitize_copyright( $input ) {\n\t\t// Sanitize Copyright value.\n\t\tif ( isset( $input ) ) {\n\t\t\t$new_input = ! empty( $input ) ? esc_html( $input ) : $this->get_default_copyright();\n\t\t} else {\n\t\t\t$new_input = $this->get_default_copyright();\n\t\t}\n\n\t\treturn $new_input;\n\t}", "function gen_htmlhead_copyright($text){\n\treturn preg_replace('/(<head[^>]*>)/',\n\t\t\t\"$1\\n\\t<!--\\n\\n\"\n\t\t\t.\"\\tThis website is powered by EQDKP-PLUS Gamers CMS :: Licensed under Creative Commons by-nc-sa 3.0\\n\"\n\t\t\t.\"\\tCopyright © 2006-\" . date('Y') . \" by EQDKP-PLUS Dev Team :: Plugins are copyright of their authors\\n\"\n\t\t\t.\"\\tVisit the project website at \".EQDKP_PROJECT_URL.\" for more information\\n\\n\"\n\t\t\t.\"\\t//-->\",\n\t\t\t$text, 1);\n}", "function showCopyright($indent) {\n Html::showLine($indent, '<p class=\"copyright\">');\n $runtime = number_format(\n array_sum(explode(' ', microtime())) - DAWN_TIME_BEGIN, 4\n );\n Html::showLine(\n ++$indent,\n str_replace('%2', $runtime, $this->getProperty('generated')),\n '<br />'\n );\n if (($text =& $this->getProperty('developed_by')) != '') {\n Html::showLine($indent, $text, '<br />');\n }\n if (($text =& $this->getProperty('supported_by')) != '') {\n Html::showLine($indent, $text);\n }\n Html::showLine(--$indent, '</p>');\n }", "function px_dynamic_copyright()\n{\n\tglobal $wpdb;\n\n\t$copyright_dates = $wpdb->get_results(\"\n\t\tSELECT\n\t\tYEAR(min(post_date_gmt)) AS firstdate,\n\t\tYEAR(max(post_date_gmt)) AS lastdate\n\t\tFROM\n\t\t\t$wpdb->posts\n\t\tWHERE\n\t\t\tpost_status = 'publish'\n\t\");\n\n\t$output = '';\n\n\tif( $copyright_dates ) :\n\t\t$copyright = \"&copy; \" . $copyright_dates[0]->firstdate;\n\n\t\tif ($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate ) :\n\t\t\t$copyright .= '-' . $copyright_dates[0]->lastdate;\n\t\tendif;\n\n\t\t$output = $copyright;\n\tendif;\n\treturn $output;\n}", "public function getHeaderText()\n {\n return \"BloggsCal врехний колонтитул \\n\";\n }", "public function get_licence()\n {\n return 'GPL';\n }", "public function getCopyrightUrl() \n {\n return $this->_copyrightUrl; \n }", "public function getHeaderText()\n {\n if (Mage::registry('auit_publicationbasic_project') && Mage::registry('auit_publicationbasic_project')->getId()) {\n return Mage::helper('auit_publicationbasic')->__(\"Edit Project '%s'\", $this->htmlEscape(Mage::registry('auit_publicationbasic_project')->getName()));\n }\n else {\n return Mage::helper('auit_publicationbasic')->__('New Project');\n }\n }", "public static function getDefaultLicense()\n {\n return self::$default_license;\n }", "function lic_button($license) {\n if ($license == 0) {\n $logo = '<span class=\"copyright-logo\">&copy</span>';\n } elseif ($license == 7) {\n $logo = '<img src=\"http://i.creativecommons.org/p/zero/1.0/88x31.png\"\n style=\"border-style: none;\" alt=\"CC0\">';\n } else {\n $abbrev = lic_abbrv($license);\n $logo = '<img alt=\"Creative Commons License\" style=\"border-width:0\"\n src=\"https://i.creativecommons.org/l/$abbrev/4.0/88x31.png\"\n style=\"border-width:0\">';\n }\n return $logo;\n}", "public function customFooterText() {\r\n\t\t$theme\t= wp_get_theme();\r\n\r\n\t\treturn\t$theme->display('Name') . ' by <a href=\"' . $theme->display('AuthorURI') . '\" target=\"_blank\">' . $theme->display('Author') . '</a>';\r\n\t}", "function getLicense() {\n\t\treturn $this->_licensetext;\n\t}", "public function set_Copyright($str_Copyright_In) {\n $this->copyright = $str_Copyright_In;\n }", "private function auto_copyright($year = 'auto') {\r\n \r\n if(intval($year) == 'auto'){\r\n return date('Y');\r\n }\r\n\r\n if(intval($year) == date('Y')){\r\n return intval($year);\r\n }\r\n\r\n if(intval($year) < date('Y')){\r\n return intval($year) . ' - ' . date('Y');\r\n }\r\n\r\n if(intval($year) > date('Y')){\r\n return date('Y');\r\n }\r\n }", "public function getHeaderText()\n {\n if ($this->getEditMode()) {\n return Mage::helper('pdfgenerator')->__('Edit PDF Template');\n }\n\n return Mage::helper('pdfgenerator')->__('New PDF Template');\n }", "function theme_copyright_customizer($wp_customize) {\n $wp_customize->add_section('footer_copyright_section', array(\n 'title' => 'Footer Settings',\n 'priority' => 33,\n ));\n\n //adding setting for copyright text\n $wp_customize->add_setting('footer_copyright_text', array(\n 'default' => '<p>\n <strong>Bulma</strong> by <a href=\"https://jgthms.com\" class=\"customize-unpreviewable\">Jeremy Thomas</a>. The source code is licensed\n <a href=\"http://opensource.org/licenses/mit-license.php\" class=\"customize-unpreviewable\">MIT</a>. The website content\n is licensed <a href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\" class=\"customize-unpreviewable\">CC BY NC SA 4.0</a>.\n </p>',\n 'transport' => 'refresh',\n\n ));\n\n $wp_customize->add_control('footer_copyright_text', array(\n 'label' => 'Copyright text',\n 'section' => 'footer_copyright_section',\n 'type' => 'textarea',\n ));\n}", "function default_link_text( $field = '' ) {\n\t\t//Just use the field name. There's no way to know how the links inside custom fields are\n\t\t//used, so no way to know the \"real\" link text. Displaying the field name at least gives\n\t\t//the user a clue where to look if they want to find/modify the field.\n\t\treturn $field;\n\t}", "function getMitLicenseTextAsComment()\n{\n return '/**\n * The MIT License (MIT)\n * Copyright (c) 2015 - '.date('Y').' Pulse Storm LLC, Alan Storm\n * \n * Permission is hereby granted, free of charge, to any person obtaining \n * a copy of this software and associated documentation files (the \n * \"Software\"), to deal in the Software without restriction, including \n * without limitation the rights to use, copy, modify, merge, publish, \n * distribute, sublicense, and/or sell copies of the Software, and to \n * permit persons to whom the Software is furnished to do so, subject to \n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be included \n * in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS \n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY \n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT \n * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR \n * THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */';\n \n}", "function getMitLicenseTextAsComment()\n{\n return '/**\n * The MIT License (MIT)\n * Copyright (c) 2015 - '.date('Y').' Pulse Storm LLC, Alan Storm\n * \n * Permission is hereby granted, free of charge, to any person obtaining \n * a copy of this software and associated documentation files (the \n * \"Software\"), to deal in the Software without restriction, including \n * without limitation the rights to use, copy, modify, merge, publish, \n * distribute, sublicense, and/or sell copies of the Software, and to \n * permit persons to whom the Software is furnished to do so, subject to \n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be included \n * in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS \n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY \n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT \n * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR \n * THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */';\n \n}", "function freshio_credit()\n\t{\n\t\t?>\n\t\t<div class=\"site-info\">\n\t\t\t<?php echo apply_filters('freshio_copyright_text', $content = esc_html__('Coppyright', 'freshio') . ' &copy; ' . date('Y') . ' ' . '<a class=\"site-url\" href=\"' . site_url() . '\">' . get_bloginfo('name') . '</a>' . esc_html__('. All Rights Reserved.', 'freshio')); ?>\n\t\t</div><!-- .site-info -->\n\t\t<?php\n\t}", "function wo_license_information() {\n\treturn get_option( \"wo_license_information\" );\n}", "public function copyright(){\n\t\t$this->load->view('copyright');\n\t}", "function app_copyright($isFooter)\n{\n echo get_app_copyright($isFooter);\n}", "public function getHeaderText()\n {\n if (Mage::registry('admin_data')->getId()) {\n return Mage::helper('blog')->__(\"Edit Entry '%s'\", $this->escapeHtml(Mage::registry('admin_data')->getTitle()));\n }\n else {\n return Mage::helper('blog')->__('New Entry');\n }\n }", "function license_for_table ($work_license) {\n $lic = \"All rights reserved\";\n if ($work_license > 0) {\n if ($work_license == 7) {\n $license_url = 'http://creativecommons.org/publicdomain/zero/1.0/';\n $license_name = 'Creative Commons Zero';\n } else {\n $abbrev = lic_abbrv($work_license);\n $name = lic_name($work_license);\n $license_url = \"http://creativecommons.org/licenses/$abbrev/4.0/\";\n $license_naame = \"$name 4.0 International\";\n }\n $lic = \"<a href=\\\"$license_url\\\">$license_name</a>\";\n }\n return $lic;\n}", "protected function renderCopyrightSection(){\n echo CHtml::openTag( \"div\", array('class'=>'copyright'));\n \n echo CHtml::openTag( \"span\", $this->copyrightTextOptions);\n echo \"Copyright &copy;\" . date('Y'). \" by\";\n echo CHtml::closeTag( \"span\" );\n \n echo CHtml::openTag( \"span\", array('class'=>'company') );\n echo Chtml::link( $this->companyLabel, $this->companyUrl, $this->companyAnchorOptions );\n echo CHtml::closeTag( \"span\" );\n \n echo CHtml::openTag( \"span\", $this->copyrightTextOptions);\n echo \"All Rights Reserved.\";\n echo CHtml::closeTag( \"span\" );\n \n echo CHtml::closeTag( \"div\" );\n }", "function db_admin_edit_footer () {\n echo get_option('db_footer_text') . ' © ' . date('Y');\n }", "public function getLicenseName() : string {\n return $this->themeLicense;\n }", "function acc_credits()\n{\n $txt = sprintf('<div id=\"acc-footer\">Copyright &copy; 2012-%s, %s - All rights reserved.<br>',\n date('Y'), get_bloginfo('name')) ;\n $txt .= sprintf('The <a href=\"http://michaelwalsh.org/wordpress-themes/twentyten-acc/\" title=\"TwentyTen-ACC\">TwentyTen-ACC</a> theme (v%s.%s) is a child theme of the <a href=\"http://theme.wordpress.com/themes/twentyten/\">Twenty Ten</a> theme.</div>', ACC_MAJOR_RELEASE, ACC_MINOR_RELEASE) ;\n\n echo $txt ;\n}", "public function getHeaderText()\r\r\n {\r\r\n $pric = $this->_coreRegistry->registry('price_data');\r\r\n if ($storeRegistry->getId()) {\r\n return __(\"Edit Price\");\r\r\n } else {\r\r\n return __('Add Price');\r\r\n }\r\r\n }", "function wc_checkout_privacy_policy_text()\n {\n }", "public function fieldText();", "protected function defaultText(): string\n {\n return 'Are you sure? Please confirm this action.';\n }", "public function getFooterText()\n {\n return \"BloggsCal нижний колонтитул \\n\";\n }", "public function getImgCopyright()\n\t{\n\t\treturn $this->imgCopyright;\n\t}", "function ylt_admin_footer_text( $default_text )\n{\n return '<span id=\"footer-thankyou\">Website ontwikkeld door <a href=\"http://www.yellowlemontree.nl\" target=\"_blank\">Yellow Lemon Tree</a><span> | Mede mogelijk gemaakt door <a href=\"http://www.wordpress.org\">WordPress</a>';\n\n}", "function bibTex()\n {\n $bibtex = '';\n foreach ($this->data as $entry) {\n //Intro\n $bibtex .= '@'.strtolower($entry['entryType']).' { '.$entry['cite'].\",\\n\";\n //Other fields except author\n foreach ($entry as $key=>$val) {\n if ($this->_options['wordWrapWidth']>0) {\n $val = $this->_wordWrap($val);\n }\n if (!in_array($key, array('cite','entryType','author'))) {\n $bibtex .= \"\\t\".$key.' = {'.$val.\"},\\n\";\n }\n }\n //Author\n if (array_key_exists('author', $entry)) {\n if ($this->_options['extractAuthors']) {\n $tmparray = array(); //In this array the authors are saved and the joind with an and\n foreach ($entry['author'] as $authorentry) {\n $tmparray[] = $this->_formatAuthor($authorentry);\n }\n $author = join(' and ', $tmparray);\n } else {\n $author = $entry['author'];\n }\n } else {\n $author = '';\n }\n $bibtex .= \"\\tauthor = {\".$author.\"}\\n\";\n $bibtex.=\"}\\n\\n\";\n }\n return $bibtex;\n }", "function SimplePie_Copyright($url = null, $label = null)\n {\n $this->url = $url;\n $this->label = $label;\n }", "public static function getCopyright($period = '', $before = 'Copyright &copy; ', $after = '')\n {\n $year = date('Y');\n\n $period = empty($period)\n ? $year\n : $period . ' - ' . $year;\n\n $copyright = $before . $period . $after;\n\n return $copyright;\n }", "public static function getCopyright($period = '', $before = 'Copyright &copy; ', $after = '')\n {\n $year = date('Y');\n\n $period = empty($period)\n ? $year\n : $period . ' - ' . $year;\n\n $copyright = $before . $period . $after;\n\n return $copyright;\n }", "function _hrb_customize_footer( $wp_customize ) {\n\tglobal $hrb_options;\n\n\t// Add the footer copyright text setting.\n\t$wp_customize->add_setting( 'footer_copyright_text', array(\n\t\t'default' => '',\n\t) );\n\n\t// Add footer copyright text field.\n\t$wp_customize->add_control( 'footer_copyright_text', array(\n\t\t'label' => __( 'Footer Copyright', APP_TD ),\n\t\t'type' => 'text',\n\t\t'priority' => 20,\n\t\t'section' => 'title_tagline',\n\t) );\n}", "public static function copyright($author, $lang_string, $start_year = NULL)\n\t{\n\t\tif ( ! empty($author))\n\t\t{\n\t\t\t$start_year = empty($start_year) ? date('Y') : $start_year;\n\t\t\t$end_year = $start_year == date('Y') ? FALSE : date('Y');\n\t\t\t$date = $end_year ? $start_year.'-'.$end_year : $start_year;\n\t\t\t$copyright = Kohana::lang($lang_string, array($author, $date));\n\t\t}\n\n\t\treturn ! empty($copyright) ? $copyright : FALSE;\n\t}", "public function getCustomText()\n {\n $text = $this->getOption('text');\n\n if ($this->provider->supportsCustomText()) {\n return $text;\n }\n\n return null;\n }", "function pfund_field_section_text() {\n\techo '<p>'.__( 'Define your fields for personal fundraisers', 'pfund' ).'</p>';\n}", "function pfund_field_section_text() {\n\techo '<p>'.__( 'Define your fields for personal fundraisers', 'pfund' ).'</p>';\n}", "public function getLicenseString() {\n\t\treturn $this->licenseString;\n\t}", "function bfg_admin_footer_text() {\n\n\t$text = __( 'Built by <a href=\"%s\" target=\"_blank\">Cooper Dukes @CDBTech, LLC</a>', CHILD_THEME_TEXT_DOMAIN );\n\n\treturn sprintf(\n\t\t$text,\n\t\t'https://cdbtech.com/'\n\t);\n\n}", "function __( $text ) {\n\tif ( empty( $text ) )\n\t\treturn '';\n\telse\n\t\treturn gettext( $text );\n}", "function snax_slog_gdpr_consent_text() {\n\t$text = get_option( 'snax_slog_gdpr_consent_text', '' );\n\n\treturn apply_filters( 'snax_slog_gdpr_consent_text', $text );\n}", "protected function get_default() {\n\t\treturn '';\n\t}", "public function getHeaderText()\n {\n if( Mage::registry('workslip_material') && Mage::registry('workslip_material')->getId() )\n {\n return $this->__('Edit') . ' ' . $this->__('Material');\n }\n else\n {\n return $this->__('New') . ' ' . $this->__('Material');\n }\n }", "function payment_fields() {\n if ( $description = $this->get_description() )\n \techo wpautop( wptexturize( $description ) );\n }", "function wc_registration_privacy_policy_text()\n {\n }", "function GetAuthor()\n\t{\n\t\treturn '';\n\t}", "private function author()\n {\n $authors = array(\n '&nbsp;' => '',\n $this->lang->get(\"Calculation.Form.author.cd\") => 'cd',\n $this->lang->get(\"Calculation.Form.author.khe\") => 'khe',\n $this->lang->get(\"Calculation.Form.author.gk\") => 'gk',\n $this->lang->get(\"Calculation.Form.author.ts\") => 'ts',\n $this->lang->get(\"Calculation.Form.author.pt\") => 'pt',\n $this->lang->get(\"Calculation.Form.author.bz\") => 'bz'\n );\n\n $out = \"\\t\\t\" . '<div id=\"authors\">' . \"\\n\";\n $out .= \"\\t\\t \" . '<label for=\"author\">' . $this->lang->get(\"Calculation.Form.author\") . '</label>' . \"\\n\";\n $out .= \"\\t\\t\\t\" . $this->selectbox(\"author\", \"\", \"author\", $authors, $this->author);\n $out .= \"\\t\\t\" . '</div><!-- #authors -->' . \"\\n\\n\";\n\n return $out;\n }" ]
[ "0.79768765", "0.7305704", "0.7177782", "0.7177782", "0.7174993", "0.71328837", "0.71229285", "0.7116132", "0.70709795", "0.69358873", "0.6879632", "0.6799877", "0.67802745", "0.67332244", "0.6728104", "0.6728104", "0.6728104", "0.6728104", "0.6728104", "0.6722721", "0.67218506", "0.6719119", "0.66972506", "0.66870797", "0.6676776", "0.6671226", "0.66348875", "0.6582137", "0.65489894", "0.6480944", "0.6479998", "0.6470417", "0.64099616", "0.64018685", "0.63806754", "0.6379559", "0.6322018", "0.62813437", "0.6277684", "0.6277302", "0.6205241", "0.6195936", "0.6195936", "0.6195936", "0.6195936", "0.6168301", "0.6156661", "0.61515677", "0.6110076", "0.6096371", "0.6092142", "0.6067457", "0.60565025", "0.602991", "0.6027895", "0.6012336", "0.5994459", "0.5927444", "0.591089", "0.5905531", "0.5901727", "0.58929354", "0.5844024", "0.5844024", "0.5841847", "0.58038145", "0.57966346", "0.57839805", "0.5772528", "0.5767641", "0.57435954", "0.5735197", "0.57341295", "0.5725946", "0.57185435", "0.57121724", "0.5700909", "0.56937367", "0.568222", "0.5679596", "0.5666031", "0.56255996", "0.56221664", "0.56165457", "0.56165457", "0.5613745", "0.5604993", "0.56032926", "0.55977386", "0.55977386", "0.5597227", "0.5589467", "0.55570006", "0.5553336", "0.55470985", "0.5539169", "0.55264914", "0.55224645", "0.5516852", "0.55165195" ]
0.7695846
1
/ Method to return the last occurrence of a substring within a string
Метод для возвращения последнего вхождения подстроки внутри строки
function last_index_of($sub_str,$instr) { if(strstr($instr,$sub_str)!="") { return(strlen($instr)-strpos(strrev($instr),$sub_str)); } return(-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lastIndexOf(string $string)\n {\n return strrpos($this->_content, $string);\n }", "public function lastIndexOf($string){\n\t\tif (is_object($string) && $string instanceof Customweb_Core_String) {\n\t\t\t$string = $string->convertTo($this->getCharset());\n\t\t}\n\t\treturn $this->getCharset()->getLastStringPosition($this->string, (string) $string);\n\t}", "function strlastpos($haystack, $needle) {\n\t\treturn strlen($haystack) - strlen($needle) - strpos(strrev($haystack), strrev($needle)); \n\t\t}", "function strpos_last($haystack, $needle) {\n\tif(strlen($needle) === 0) {\n\t\treturn false;\n\t}\n\t$len_haystack = strlen($haystack);\n\t$len_needle = strlen($needle);\t\t\n\t$pos = strpos(strrev($haystack), strrev($needle));\n\tif($pos === false) {\n\t\treturn false;\n\t}\n\treturn $len_haystack - $pos - $len_needle;\n}", "function strpos_last($haystack, $needle) {\n\tif(strlen($needle) === 0) {\n\t\treturn false;\n\t}\n\t$len_haystack = strlen($haystack);\n\t$len_needle = strlen($needle);\t\t\n\t$pos = strpos(strrev($haystack), strrev($needle));\n\tif($pos === false) {\n\t\treturn false;\n\t}\n\treturn $len_haystack - $pos - $len_needle;\n}", "public function _lastIndexOf($string, $item)\n\t{\n\t\t$index = strpos(strrev($string), strrev($item));\n\t\tif ($index)\n\t\t{\n\t\t\t$index = strlen($string) - strlen($item) - $index;\n\t\t\treturn $index;\n\t\t}\n\t\telse\n\t\t\treturn -1;\n\t}", "function str_after_last($character,$string){\n\treturn substr($string, strrpos($string, \"$character\")+1, strlen($string) );\n}", "protected function afterLast($str, string $needle = '/'): string\n {\n return substr($str, strrpos($str, $needle) + 1);\n }", "public function last_index_of($str, $offset = 0) {\n\n $offset = intval($offset);\n\n $index = mb_strrpos($this->toString(), $str, $offset, \"UTF-8\");\n\n if($index === false) {\n $index = -1;\n }\n\n return $index;\n }", "function biagiotti_mikado_strafter( $string, $substring ) {\n\t\t$pos = strpos( $string, $substring );\n\t\tif ( $pos === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ( substr( $string, $pos + strlen( $substring ) ) );\n\t}", "public static function subStringAfterLast($path, $sub)\n {\n $tmp = explode($sub, $path);\n\n return $tmp[\\count($tmp) - 1];\n }", "public function getRefString($refstring) {\n $splitarrayitem = explode(\"/\", $refstring);\n return end($splitarrayitem);\n}", "function getLastPart($str,$separator='.') {\n\t\t\t$rchr = strrchr($str,$separator);\n\t\t\t\n\t\t\tif($rchr === false)\n\t\t\t\treturn $str;\n\t\t\telse\n\t\t\t\treturn substr($rchr,1);\n\t\t}", "public function lastIndexOf($string, int $offset = 0): int\n {\n Assert::typeOf(['string', __CLASS__], $string);\n\n $pos = mb_strrpos($this->data, (string) $string, $offset, $this->encoding);\n\n return $pos > -1 ? $pos : -1;\n }", "function str_end($string, $delimiter = '/')\n {\n return substr($string, ($pos = strrpos($string, $delimiter)) === false ? 0 : $pos + 1);\n }", "public static function isMatchLast($match,$string){\n if (substr($string, (-1 * abs(strlen($match)))) == $match) return true;\n return false;\n }", "function lastCharacter($str) {\r\n return substr($str,0,-1);\r\n}", "public function lastIndexOf($string, $offset = null)\n\t{\n\t\t$string = static::_convertString($string, $this->encoding);\n\t\t$offset = $offset !== null ? (int) $offset : null;\n\n\t\tif ($offset !== null && ($offset < 0 || $offset >= $this->length())) {\n\t\t\tthrow new OutOfBoundsException();\n\t\t}\n\n\t\treturn mb_strrpos($this->string, $string, $offset, $this->encoding);\n\t}", "function last_word($phrase)\r\n// **********************************************************************\r\n{\r\n $phrase = trim($phrase);\r\n if ($phrase==\"\") return false;\r\n if (instr($phrase,\" \")) return trim(substr($phrase,strrpos($phrase,\" \")+1,1024));\r\n else return $phrase;\r\n}", "public static function afterLast(string $subject, string $search): string\n {\n if ($search === '') {\n return $subject;\n }\n\n $position = strrpos($subject, (string) $search);\n\n if ($position === false) {\n return $subject;\n }\n\n return substr($subject, $position + strlen($search));\n }", "function str_before_last($character,$string){\n\treturn substr($string, 0, strrpos($string, \"$character\"));\n}", "public function lastIndexOfIgnoreCase($string){\n\t\tif (is_object($string) && $string instanceof Customweb_Core_String) {\n\t\t\t$string = $string->convertTo($this->getCharset())->toLowerCase();\n\t\t}\n\t\telse {\n\t\t\t$string = self::_((string) $string, $this->getCharset(), true)->toLowerCase();\n\t\t}\n\t\treturn $this->getCharset()->getLastStringPosition($this->toLowerCase()->string, (string) $string);\n\t}", "public function getSuffix($string)\n {\n $dotloc = strrpos($string, '.');\n\n // The length of the suffix is the length of the string\n // minus the numeric value of the last location of \".\" in the string\n $suffix_len = strlen($string) - $dotloc;\n\n // Find the suffix\n $suffix = substr($string, $dotloc, $suffix_len);\n return $suffix;\n }", "public static function getLastPosition($haystack, $needle, $offset = 0)\n\t{\n\t\treturn strrpos($haystack, $needle, $offset);\n\t}", "function str_endswith($needle, $haystack)\r\n{\r\n return strrpos($haystack, $needle) === strlen($haystack)-strlen($needle);\r\n}", "public static function afterOfLast(string $string, string $given) : string\n {\n if (false !== $pos = mb_strrpos($string, $given)) {\n return self::substr($string, $pos + self::length($given));\n }\n\n return '';\n }", "function str_cut_end(\n string $str,\n string $subString = ' ',\n bool $repeat = false,\n bool $caseSensitive = false\n ) : string {\n return Str::cutEnd($str, $subString, $repeat, $caseSensitive);\n }", "public function getLastRestString() {\n\t\treturn $this->lastRestString;\n\t}", "function get_last_enclosed_string($haystack, $needle1, $needle2=\"\") {\r\n\t//position of first needle is as close to the end of the haystack as possible\r\n\t//position of second needle is as close to the first needle as possible\r\n\tif ($needle2 == \"\") {\r\n\t\t$needle2_pos = strlen($haystack);\r\n\t} else {\r\n\t\t$needle2_pos = strrpos($haystack, $needle2);\r\n\t\tif ($needle2_pos === FALSE) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tif ($needle1 == \"\") {\r\n\t\t$needle1_pos = 0;\r\n\t} else {\r\n\t\t$needle1_pos = strrpos(substr($haystack, 0, $needle2_pos), $needle1) + strlen($needle1);\r\n\t\tif ($needle1_pos === FALSE) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tif ($needle2 != \"\") {\r\n\t\t$needle2_pos = strpos($haystack, $needle2, $needle1_pos);\r\n\t\tif ($needle2_pos === FALSE) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n $enclosed_string = substr($haystack, $needle1_pos, $needle2_pos - $needle1_pos);\r\n return $enclosed_string;\r\n}", "public static function isLastPartOfStr($haystack, $needle)\n {\n return Tx_Rnbase_Utility_Strings::isLastPartOfStr($haystack, $needle);\n }", "function strstr_after($haystack, $needle, bool $case_insensitive = false)\n {\n $strpos = $case_insensitive ? 'stripos': 'strpos';\n $pos = $strpos($haystack, $needle);\n if (is_int($pos)) {\n return substr($haystack, $pos + strlen($needle));\n }\n\n // Most likely false or null\n return $pos;\n }", "function get_last_word($sentance){\n\t$wordArr = explode(' ', $sentance);\n\t$last_word = trim($wordArr[count($wordArr) - 1]);\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"Sentance: $sentance. Last word:$last_word\",4);\n\treturn $last_word;\n}", "function getUrlLastPart($url)\n{\n return end(explode('/', $url));\n}", "function getString($string, $start, $end) {\r\n if ($start == \"\") {\r\n $startpos = 0;\r\n } else {\r\n $startpos = strpos($string, $start);\r\n }\r\n $endpos = strpos($string, $end, $startpos);\r\n // echo $startpos-;\r\n return substr($string, $startpos, $endpos - $startpos + 1);\r\n}", "function lengthOfLongestSubstring($s)\n{\n if (!$s) return 0;\n\n $max = 0;\n\n $chars = str_split($s);\n $sub[$chars[0]] = 1;\n for ($i = 1; $i < count($chars); $i++) {\n $char = $chars[$i];\n if (array_key_exists($char, $sub)) {\n $max = max($max, count($sub));\n// var_dump($sub);\n\n if ($chars[$i - 1] == $char) {\n unset($sub);\n } else {\n $sub[$char] = -1; //flag\n //delete all items in front of the flag\n foreach ($sub as $key => $val) {\n if($val == -1)\n break;\n array_shift($sub);\n }\n //delete flag it self\n unset($sub[$char]);\n }\n }\n $sub[$char] = 1;\n }\n var_dump($sub);\n return max($max, count($sub));\n\n}", "function cut_string_using_last($character, $string, $side, $keep_character = true)\n{\n $offset = ($keep_character ? 1 : 0);\n $whole_length = strlen($string);\n $right_length = (strlen(strrchr($string, $character)) - 1);\n $left_length = ($whole_length - $right_length - 1);\n switch ($side) {\n case 'left':\n $piece = substr($string, 0, ($left_length + $offset));\n break;\n case 'right':\n $start = (0 - ($right_length + $offset));\n $piece = substr($string, $start);\n break;\n default:\n $piece = false;\n break;\n }\n return ($piece);\n}", "function endWith($str, $ending)\n{\n $length = strlen($ending);\n $start = $length * -1;\n return (substr($str, $start) === $ending);\n}", "public static function getLastPositionIgnoreCase($haystack, $needle, $offset = 0)\n\t{\n\t\treturn strripos($haystack, $needle, $offset);\n\t}", "public function parseEndsWith($string, $substring)\n\t{\n\t\treturn $this->generateEndsWith($string, $substring, true);\n\t}", "function ends_with($string, $endString) { \r\n $len = strlen($endString); \r\n if ($len == 0) { \r\n return true; \r\n } \r\n return (substr($string, -$len) === $endString); \r\n}", "private function getLast(String $start){\n $end = '';\n foreach(range(0,6) as $j){\n $end = $end.$start[$j];\n }\n if($end[-1]!='-'){\n $end=$end.'-';\n }\n $end = $end.date('t',strtotime($start)).' 23:59:59';\n return $end;\n }", "public static function ends_with($substring, $string)\n {\n // search forward starting from end minus needle length characters\n return\n ($substring === '')\n or (($temp = strlen($string) - strlen($substring)) >= 0\n and strpos($string, $substring, $temp) !== FALSE);\n }", "public function get_last_word($name) {\n\n\t\t\t$name = trim($name);\n\t\t\t$pos = strrpos($name, ' ');\n\n\t\t\tif ($pos === false) {\n\t\t\t\t$last_word = $name;\n\t\t\t}\n\n\t\t\t$last_word = substr($name, $pos);\n\t\t\t\n\t\t\t//return trim($first_word);\n\t\t\treturn trim($last_word);\n\t\t\t\n\t\t}", "public function get_last_word($name) {\n\n\t\t\t$name = trim($name);\n\t\t\t$pos = strrpos($name, ' ');\n\n\t\t\tif ($pos === false) {\n\t\t\t\t$last_word = $name;\n\t\t\t}\n\n\t\t\t$last_word = substr($name, $pos);\n\t\t\t\n\t\t\t//return trim($first_word);\n\t\t\treturn trim($last_word);\n\t\t\t\n\t\t}", "static private function replaceLast(string $search, string $replace, string $subject): string\n {\n $pos = strrpos($subject, $search);\n if ($pos !== false) {\n $subject = substr_replace($subject, $replace, $pos, strlen($search));\n }\n\n return $subject;\n }", "function returnMostCommonLetter($string)\n {\n \t$unreplaced = $string;\n \t$unreplaced = str_replace(\",,\",\",\",$string);\n \t$string = str_replace(\",,\",\",\",$string);\t\n \t$string = str_replace(\",\",\"\",$string);\t\n \t$arrayLettersInString = str_split($string);\n \t$arrayLetterOccurance = array();\n \t\n \tforeach ($arrayLettersInString as $letter) \n \t{\n \t\t$occurance = substr_count($string, $letter);\n \t\t$arrayLetterOccurance[$letter] = $occurance;\n \t}\n \t\n \t$lastLetter = \"\";\n \t$lastOccurance = 1;\n \tforeach ($arrayLetterOccurance as $letter=>$occuranceNumber)\n \t{\n \t\tif($lastLetter != $letter)\n \t\t{\n \t\t\t$lastLetter = $letter;\n \t\t\tif($lastOccurance <= $occuranceNumber)\n \t\t\t{\n \t\t\t\t$lastOccurance = $occuranceNumber;\n \t\t\t}\n \t\t}\n \t}\n \t\n \tif($lastOccurance > 1)\n \t\treturn array_search($lastOccurance,$arrayLetterOccurance);\n \telse \n \t\treturn $unreplaced;\n }", "function str_last($sSubject)\n{\n\tif (!settype($sSubject, 'string')) {\n\t\tthrow new InvalidArgumentException();\n\t}\n\n\treturn strlen($sSubject) > 0 ? (string)$sSubject[strlen($sSubject) - 1] : false;\n}", "function strrpos($haystack,$needle)\n{\n\treturn 0;\n}", "function lastPosition(string $needle, int $offset = 0, int $flags = STRINGS_CASE_SENSITIVE): Closure\n{\n $caseSensitive = ! (bool) ($flags & STRINGS_CASE_INSENSITIVE); // Assumes true unless INSESNITVE passed\n\n /**\n * @param string $haystack The haystack to look through.\n * @return int|null\n */\n return function (string $haystack) use ($needle, $offset, $caseSensitive): ?int {\n $pos = $caseSensitive\n ? strrpos($haystack, $needle, $offset)\n : strripos($haystack, $needle, $offset);\n return is_int($pos) ? (int) $pos : null;\n };\n}", "function strrchr($haystack,$needle)\n{\n\treturn '';\n}", "function strrchr($haystack, $needle)\n{\n return '';\n}", "public static function ends($string, $look){\n\t\t$Fn = self::$Fn;\n\t\t\n\t\treturn $Fn['strrpos']($string, $look)===$Fn['strlen']($string)-$Fn['strlen']($look);\n\t}", "static function replaceLast($search, $replace, $subject)\n\t{\n\t\t$pos = strrpos($subject, $search);\n\t\n\t\tif($pos !== false) \n\t\t\t$subject = substr_replace($subject, $replace, $pos, strlen($search));\n\t\t\n\t\treturn $subject;\n\t}", "function strrpos($haystack, $needle)\n{\n return 0;\n}", "public static function beforeOfLast(string $string, string $given) : string\n {\n return self::substr($string, 0, mb_strrpos($string, $given));\n }", "function last_chars($str, $count = 1)\n {\n return \\LaraAreaSupport\\Str::lastChars($str, $count);\n }", "function lastChars($str, $count = 1)\n\t{\n\t\treturn mb_substr($str, -$count, $count);\n\t}", "public function last(string $type)\n {\n $list = $this->list($type);\n\n return end($list);\n }", "function endsWith($string, $toCheck) {\n // search forward starting from end minus needle length characters\n return $toCheck === \"\" || strpos($string, $toCheck, strlen($string) - strlen($toCheck)) !== FALSE;\n}", "public function parseSubstringAfter($expr, $str)\n\t{\n\t\treturn 'substr(strstr(' . $this->recurse($expr) . ',' . $this->recurse($str) . '),' . (strlen($str) - 2) . ')';\n\t}", "public function parseNotEndsWith($string, $substring)\n\t{\n\t\treturn $this->generateEndsWith($string, $substring, false);\n\t}", "function EndsWith($Haystack, $Needle){\n return strrpos($Haystack, $Needle) === strlen($Haystack)-strlen($Needle);\n}", "public function get_tail() {\n $this->is_complete = true;\n return substr( $this->subject, $this->offset );\n }", "function getStringByStartEnd($haystack='',$startString='',$endString='',$offset=0) {\r\n\t$startPos = strpos($haystack,$startString,$offset);\r\n\tif ($startPos !== FALSE) {\r\n\t\t$haystackSub = $startString.substr($haystack,$startPos+strlen($startString),strpos(substr($haystack,$startPos+strlen($startString)),$endString)+strlen($endString));\r\n\t} else {\r\n\t\t$haystackSub = '';\r\n\t}\r\n\treturn $haystackSub;\r\n}", "public function lastIndex($needle, $offset = 0, $caseSensitive = false) {\n if($needle instanceof AdvanceStringProcesser) {\n $needle = $needle->get();\n }\n return PortableStringProcesser::lastIndex($this->_s, $needle, $offset, $caseSensitive, $this->_encoding);\n }", "function lengthOfLastWord($s) {\n $newArr = explode(\" \",trim($s));\n $count = count($newArr);\n $len = strlen($newArr[$count-1]);\n return $len;\n}", "function strrevpos($instr, $needle)\n{\n $rev_pos = strpos(strrev($instr), strrev($needle));\n if ($rev_pos===false) {\n return false;\n } else {\n return strlen($instr) - $rev_pos - strlen($needle);\n }\n}", "function stir_get_extension($str){\n $parts = explode('.', $str);\n return end($parts);\n}", "public function findLast() {\n\t\t\n\t}", "public function getLastSegment()\n {\n return $this->segments[count($this->segments) - 1];\n }", "public function last($n)\n {\n $stringy = static::create($this->str, $this->encoding);\n\n if ($n <= 0) {\n $stringy->str = '';\n } else {\n return $stringy->substr(-$n);\n }\n\n return $stringy;\n }", "public function afterSubstringAt($index);", "public static function substring_index()\n\t{\n\t}", "function lastChar(string $char): Closure\n{\n /**\n * @param string $haystack\n * @return string\n */\n return function (string $haystack) use ($char): string {\n $result = strrchr($haystack, $char);\n return is_string($result) ? $result : '';\n };\n}", "public function last()\n {\n return $this->parts[count($this->parts) - 1];\n }", "public static function pop(&$string, $index = 1)\n {\n $substr = substr($string, -$index);\n $string = substr($string, 0, -$index);\n return $substr;\n }", "function stringEndsWith($whole, $end)\n{\n return (strpos($whole, $end, strlen($whole) - strlen($end)) !== false);\n}", "public function getLastOccurrence() {\n return $this->lastOccurrence;\n }", "public static function beforeLast(string $subject, string $search): string\n {\n if ($search === '') {\n return $subject;\n }\n\n $pos = mb_strrpos($subject, $search);\n\n if ($pos === false) {\n return $subject;\n }\n\n return static::substr($subject, 0, $pos);\n }", "public static function after($string, $char) {\n $pos = strpos($string, $char);\n if($pos !== false) {\n return static::substr($string, $pos + str::length($char)); \n } else {\n return false;\n }\n }", "function SubString($string1, $string2)\n {\n $string1Lowercase = strtolower($string1);\n $string2Lowercase = strtolower($string2);\n if (strpos($string1Lowercase, $string2Lowercase) != false) {\n return strpos($string1Lowercase, $string2Lowercase);\n } else {\n return -1;\n }\n }", "function read_after($str, $del, $from_begin = false) {\r\n if ($from_begin) $i = strpos($str, $del);\r\n else $i = strrpos($str, $del);\r\n if ($i === false) return null;\r\n return substr($str, $i + strlen($del));\r\n }", "function strrevpos($instr, $needle)\n {\n $rev_pos = strpos (strrev($instr), strrev($needle));\n if ($rev_pos===false) return false;\n else return strlen($instr) - $rev_pos - strlen($needle);\n }", "public static function afterLast(string $string, string $separator = '.'): string\n {\n $exploded = explode($separator, $string);\n return $exploded[count($exploded) - 1];\n }", "public static function lastLetterMatch($string, $letter)\n\t{\n\t\treturn (substr(Str::lower($string), -1) === Str::lower($letter));\n\t}", "function str_after_first($character,$string){\n\treturn substr($string, strpos($string, \"$character\")+1, strlen($string) );\n}", "function getStr($string, $start, $end) {\n $str = explode($start, $string);\n $str = explode($end, $str[1]);\n return $str[0];\n}", "function find($searchString, $inString, $nStart)\t\t// returns the index of the character after the search string\n{\t$searchState = 0;\n\t$contentLength = strlen($inString);\n\t$searchStringLen = strlen($searchString);\n\tfor($n=$nStart; $n<$contentLength; $n++)\t\t// search for \"Alexatrafficrankbased\"\n\t{\tif($searchState == $searchStringLen)\n\t\t{\treturn $n;\n\t\t}\n\t\telse if($inString[$n] == $searchString[$searchState])\n\t\t{\t$searchState++;\n\t\t}\n\t\telse \n\t\t{\t$searchState = 0;\n\t\t}\n\t}\n\t\n\treturn -1;\n}", "private function findEndIndex()\n {\n return $this->findLine($this->endMarker);\n }", "function ends_with($string, $sub = '', $strict = true)\n{\n if (empty($sub)) {\n throw new Exception('Parameter 2 of ends_with with type string cannot be empty');\n }\n\n if (empty($sub) || strpos($string, $sub) < 0) {\n return false;\n }\n\n $str = substr($string, strlen($string) - strlen($sub));\n if (!$strict) {\n $sub = strtolower($sub);\n $str = strtolower($str);\n }\n return $str === $sub;\n}", "public static function removeLastCharacter ($str) {\n\t\treturn substr($str, 0, -1);\n\t}", "public static function replaceLast(string $search, string $replace, string $subject): string\n {\n if ($search === '') {\n return $subject;\n }\n\n $position = strrpos($subject, $search);\n\n if ($position !== false) {\n return substr_replace($subject, $replace, $position, strlen($search));\n }\n\n return $subject;\n }", "function rtRemoveLastToken( $str, $sep )\n{\n\t$pos = strrpos( $str, $sep );\n\tif( $pos === false )\n\t\treturn $str;\n\treturn substr( $str, 0, $pos );\n}", "public function getLast()\n {\n $lastToken = end($this->items);\n return ($lastToken !== false) ? $lastToken : null;\n }", "public function lastIndexOf($element):int\n {\n $lastIndex = -1;\n for ($i = 0; $i < $this->size(); $i++) {\n if ($element === $this->get($i)) {\n $lastIndex = $i;\n }\n }\n\n return $lastIndex;\n }", "public function getOneInner($string, $start, $end)\n {\n $string = \" \".$string;\n $ini = strpos($string,$start);\n if ($ini == 0) return \"\";\n $ini += strlen($start);\n $len = strpos($string,$end,$ini) - $ini;\n return substr($string,$ini,$len);\n }", "function get_first_string ($text,$openingMarker, $closingMarker) {\n $out_ar = returnSubstrings($text, $openingMarker, $closingMarker);\n $out = $out_ar[0];\n return($out);\n}", "function get_first_string ($text,$openingMarker, $closingMarker) {\n $out_ar = returnSubstrings($text, $openingMarker, $closingMarker);\n $out = $out_ar[0];\n return($out);\n}", "function get_first_string ($text,$openingMarker, $closingMarker) {\n $out_ar = returnSubstrings($text, $openingMarker, $closingMarker);\n $out = $out_ar[0];\n return($out);\n}", "function get_first_string ($text,$openingMarker, $closingMarker) {\n $out_ar = returnSubstrings($text, $openingMarker, $closingMarker);\n $out = $out_ar[0];\n return($out);\n}" ]
[ "0.7512298", "0.7367442", "0.72743255", "0.7060898", "0.7060898", "0.69271886", "0.6838302", "0.68128514", "0.68055165", "0.67803353", "0.675341", "0.6752113", "0.6744634", "0.66752976", "0.66131157", "0.66031414", "0.65876836", "0.6568287", "0.6544374", "0.6469237", "0.6460355", "0.6391412", "0.6346071", "0.6297133", "0.6279086", "0.6275885", "0.62539625", "0.6243726", "0.62347585", "0.616685", "0.61646944", "0.6152709", "0.6111979", "0.60838306", "0.6076945", "0.60654354", "0.6049216", "0.60367376", "0.6033406", "0.6023538", "0.60058254", "0.5979747", "0.5966543", "0.5966543", "0.596617", "0.5950482", "0.5942134", "0.5940096", "0.593097", "0.59012794", "0.58913666", "0.5887302", "0.5881989", "0.58801824", "0.5871814", "0.586917", "0.5844024", "0.5808105", "0.5806243", "0.5802195", "0.58019686", "0.5801753", "0.58013994", "0.5795312", "0.579104", "0.57318634", "0.5720659", "0.57175255", "0.57100207", "0.5703475", "0.56978714", "0.56925523", "0.569146", "0.56892735", "0.56819165", "0.56716084", "0.56644064", "0.56616163", "0.566072", "0.56258726", "0.5605045", "0.5604823", "0.55970824", "0.5593738", "0.55840224", "0.55793315", "0.55670476", "0.55644757", "0.55639416", "0.5560345", "0.55603075", "0.5559945", "0.5547918", "0.55404633", "0.55308086", "0.552194", "0.55188894", "0.55188894", "0.55188894", "0.55188894" ]
0.7977743
0
function This method defines, if the hypergate needs to be included for this request.
функция Этот метод определяет, нужно ли включать гипервентиль для этого запроса.
public static function needs_hypergate() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function has_enabled_additional_gateways()\n {\n }", "public static function has_gateways()\n {\n }", "function canHandleRequest() ;", "public function isEndpointRequested() : bool;", "public static function is_requested()\n {\n }", "public function isHeadRequest () {\r\n return $this->_is_head_request;\r\n }", "private function isSetHeaderRequestWith()\n {\n if(isset($this->header['X-Requested-With'])){\n return $this->__customtrim($this->header['X-Requested-With']); \n }\n }", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "function check_auth_required() {\n global $blsr, $bcr, $img, $auto;\n\n\t\t\t$parts = explode('/', $this->app->request->getResourceUri());\n\t\t if (sizeof($parts)) array_shift($parts);\n\n\t\t $need_auth = true;\n\t\t # Work around to allow beamline sample registration without CAS authentication\n\t\t if (sizeof($parts) >= 3) {\n\t\t \tif (\n\t\t # Calendar ICS export\n\t\t ($parts[0] == 'cal' && $parts[1] == 'ics' && $parts[2] == 'h') || \n\n # Allow formulatrix machines unauthorised access to inspections, certain IPs only\n ($parts[0] == 'imaging' && $parts[1] == 'inspection' && in_array($_SERVER[\"REMOTE_ADDR\"], $img)) ||\n\n\t\t\t\t\t# For use on the touchscreen computers in the hutch.\n\t\t\t\t\t# Handles api calls: /assign/visits/<vist> e.g./assign/visits/mx1234-1\n\t\t ($parts[0] == 'assign' && $parts[1] == 'visits' && in_array($_SERVER[\"REMOTE_ADDR\"], $blsr)) ||\n\n\t\t\t\t\t# Allow barcode reader ips unauthorised access to add history\n\t\t ($parts[0] == 'shipment' && $parts[1] == 'dewars' && $parts[2] == 'history' && in_array($_SERVER[\"REMOTE_ADDR\"], $bcr)) ||\n\n\t\t\t\t\t# Allow barcode reader ips unauthorised access to add comments\n\t\t ($parts[0] == 'shipment' && $parts[1] == 'dewars' && $parts[2] == 'comments' && in_array($_SERVER[\"REMOTE_ADDR\"], $bcr)) ||\n\n\t\t # Container notification: allow beamlines running in automated mode to notify users\n\t\t\t\t\t($parts[0] == 'shipment' && $parts[1] == 'containers' && $parts[2] == 'notify' && in_array($_SERVER[\"REMOTE_ADDR\"], $auto)) ||\n\n\t\t\t\t\t# Allow barcode reader ips unauthorised access to add container history\n\t\t ($parts[0] == 'shipment' && $parts[1] == 'containers' && $parts[2] == 'history' && in_array($_SERVER[\"REMOTE_ADDR\"], $bcr))\n\t\t \t) {\n\t\t \t\t$need_auth = false;\n\t\t \t}\n\n\t\t } else if (sizeof($parts) >= 2) {\n\t\t if (\n\t\t\t\t\t# For use on the touchscreen computers in the hutch\n\t\t\t\t\t# Handles api calls: /assign/assign, /assign/unassign, /assign/deact, /assign/visits\n\t\t (($parts[0] == 'assign') && in_array($_SERVER[\"REMOTE_ADDR\"], $blsr)) ||\n\t\t (($parts[0] == 'shipment' && $parts[1] == 'containers') && in_array($_SERVER[\"REMOTE_ADDR\"], $blsr)) ||\n\n\t\t # Allow barcode reader unauthorised access, same as above, certain IPs only\n\t\t ($parts[0] == 'shipment' && $parts[1] == 'dewars' && in_array($_SERVER[\"REMOTE_ADDR\"], $bcr)) ||\n\n # Allow formulatrix machines unauthorised access to inspections, certain IPs only\n ($parts[0] == 'imaging' && $parts[1] == 'inspection' && in_array($_SERVER[\"REMOTE_ADDR\"], $img)) ||\n\n # Allow EPICS machines to create and close auto collect visits, certain IPs only.\n # Permitted IPs listed in global variable $auto in config.php.\n ($parts[0] == 'proposal' && $parts[1] == 'auto' && in_array($_SERVER[\"REMOTE_ADDR\"], $auto))\n\t\t ) {\n\t\t $need_auth = false;\n\t\t }\n\n\t\t }\n\n\t\t if (sizeof($parts) > 0) {\n\t\t \tif ($parts[0] == 'authenticate' || $parts[0] == 'options') $need_auth = false;\n\t\t }\n\n\t\t # One time use tokens\n\t\t $once = $this->app->request->get('token');\n\t\t if ($once) {\n\t\t \t$token = $this->db->pq(\"SELECT o.validity, pe.personid, pe.login, CONCAT(p.proposalcode, p.proposalnumber) as prop \n\t\t \t\tFROM SW_onceToken o\n\t\t \t\tINNER JOIN proposal p ON p.proposalid = o.proposalid\n\t\t \t\tINNER JOIN person pe ON pe.personid = o.personid\n\t\t \t\tWHERE token=:1\", array($once));\n\t\t \tif (sizeof($token)) {\n\t\t \t\t$token = $token[0];\n\t\t \t\t$qs = $_SERVER['QUERY_STRING'] ? (preg_replace('/(&amp;)?token=\\w+/', '', str_replace('&', '&amp;', $_SERVER['QUERY_STRING']))) : null;\n\t\t \t\tif ($qs) $qs = '?'.$qs;\n\n\t\t \t\tif ($this->app->request->getResourceUri().$qs == $token['VALIDITY']) {\n\t\t \t\t\t$_REQUEST['prop'] = $token['PROP'];\n\t\t \t\t\t$this->user = $token['LOGIN'];\n\t\t \t\t\t$need_auth = false;\n\t\t \t\t\t$this->db->pq(\"DELETE FROM SW_onceToken WHERE token=:1\", array($once));\n\t\t \t\t}\n\t\t \t} else {\n\t\t \t\t$this->_error(400, 'Invalid one time authorisation token');\n\t\t \t}\n\t\t }\n\n\t\t # Remove tokens more than 10 seconds old, they should have been used\n\t\t $this->db->pq(\"DELETE FROM SW_onceToken WHERE TIMESTAMPDIFF('SECOND', recordTimeStamp, CURRENT_TIMESTAMP) > 10\");\n\n if ($need_auth) $this->check_auth();\n\t\t}", "public function includes() {\n\n\t\t\tif( $this->meets_requirements() ) {\n\n\t\t\t}\n\n\t\t}", "public function matchesRequest()\n {\n return $this->data->has('additional');\n }", "public function isOnRequest() {\n \treturn $this->attributes['status'] == 2;\n }", "protected function is_base_request()\n {\n }", "public function isEnabled() {\n // OR if the 'reports' param is set\n if(\t( isset($_SERVER[\"HTTP_REFERER\"]) && strstr($_SERVER[\"HTTP_REFERER\"], '/equipment/' ) ) || isset($_GET['equipment']))\n return true;\n\n return false;\n }", "public static function isSiteRequest() {}", "public function hasRequests(){\n return $this->_has(6);\n }", "public function isMainRequest();", "public function requestsRelationships(): bool\n {\n return ($this->requestsAttributes() || $this->requestsMetaInformation()) || \\count($this->includes) > 0;\n }", "public function canHandleRequest() {\n\t\treturn ($this->utilityEnvironment->getSAPIName() === 'cli');\n\t}", "public static function include_header(){\n\t\t\t$method_name \t= Controller::format_url(Accretion::$method_name);\n\t\t\t$template_name \t= Controller::format_url(Accretion::$template_name);\n\t\t\t$controller \t= Accretion::$controller;\n\t\t\t$headers \t\t= array();\n\t\t\tif(isset($controller->disabled_headers)){\n\t\t\t\tforeach($controller->disabled_headers as $k => $v){\n\t\t\t\t\t$headers[] = Controller::format_url($v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(in_array($method_name, $headers)){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif(in_array($template_name, $headers)){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function hasRequests(){\n return $this->_has(1);\n }", "public function __HasRequests()\n {\n $requests = $this->getUrlInfo(self::URL_REQUESTS);\n return !\\POPS\\Utils\\ARRAYS::__IsEmpty($requests);\n }", "public function isHaulerNeeded()\n {\n return $this->status_id == self::STATUS_HAULER_NEEDED;\n }", "public function isWithPolicy(): bool;", "public function hasRequestInspectConfig(){\n return $this->_has(5);\n }", "private static function has_enabled_gateways($filter = null)\n {\n }", "public function hasEndpoints(){\n return $this->_has(18);\n }", "public function hasRequestOutputConfig(){\n return $this->_has(7);\n }", "function is_request($meta = array())\n {\n }", "public function shouldAppearInHerald() {\n if ($this->proxy) {\n return $this->proxy->shouldAppearInHerald();\n }\n return false;\n }", "public function is_staging_need_request() {\n\t\t$staging = \\WPTC_Pro_Factory::get( 'Wptc_Staging' );\n\t\t$staging->is_staging_need_request();\n\t\tdie();\n\t}", "function mb_home_condition() {\n\n\t\tglobal $post;\n\n\t\treturn $post && get_option( 'page_on_front' ) == $post->ID && method_exists( 'IR_CPT_Service', 'mb_services' );\n\t}", "public static function is_needed(): bool {\n\t\treturn \\function_exists( '\\newrelic_disable_autorum' );\n\t}", "public static function available()\n\t{\n\t\treturn (isset($_GET['auth_id']) && isset($_GET['auth_abort']) && self::getState($_GET['auth_id']) !== null);\n\t}", "protected function useCustomRequest()\n\t{\n\t\treturn (\n\t\t\t$this->paymentIsActive()\n\t\t\t&& ! is_null($this->getPaymentResultInput())\n\t\t);\n\t}", "public function isSwitchRequired() : bool\n {\n return !$this->isSSLActive() && !$this->isLocalhost() && !$this->isCLI();\n }", "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'cache-enabler/cache-enabler.php' );\n\t}", "public function canHandleRequest()\n {\n return $this->environmentService->isEnvironmentInFrontendMode();\n }", "public function canHandle()\n {\n if (\n array_key_exists('body', $this->payload) &&\n array_key_exists('path', $this->payload) &&\n array_key_exists('headers', $this->payload) &&\n array_key_exists('requestContext', $this->payload) &&\n !array_key_exists('elb', $this->payload['requestContext'])\n ) {\n return true;\n }\n return false;\n }", "public function canShowInHRrest() {\n\t\treturn $this->knowsAthlete() && $this->Athlete->knowsRestingHeartRate();\n\t}", "function isCacheable(&$request) {\n\t\tif (defined('SESSION_DISABLE_INIT')) return false;\n\t\tif (!Config::getVar('general', 'installed')) return false;\n\t\tif (!empty($_POST) || Validation::isLoggedIn()) return false;\n\n\t\tif ($request->isPathInfoEnabled()) {\n\t\t\tif (!empty($_GET)) return false;\n\t\t} else {\n\t\t\t$application =& $this->getApplication();\n\t\t\t$ok = array_merge($application->getContextList(), array('page', 'op', 'path'));\n\t\t\tif (!empty($_GET) && count(array_diff(array_keys($_GET), $ok)) != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (in_array($this->getRequestedPage($request), $this->getCacheablePages())) return true;\n\n\t\treturn false;\n\t}", "public function conditional_includes()\n {\n }", "public function canHandleRequest() {\n\t\treturn (FLOW3_SAPITYPE === 'Web');\n\t}", "public static function isHMVCRequest()\n\t{\n\t\t$stack = static::getDic()->get('requeststack');\n\t\treturn count($stack) !== 1;\n\t}", "public function hasSwitchParam()\n {\n return ($this->request->query->has(self::SWITCH_PARAM));\n }", "public function hasRequest()\n {\n return !is_null($this->request());\n }", "private static function is_user_request(){\n\t\t//bail if we already know this request is not valid\n\t\tif ( static::$is_excluded ){\n\t\t\treturn false;\n\t\t}\n\n\t\t$is_bot_test = 'return stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"googlebot\" ) !== false || ' .\n\t\t\t'stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"bingbot\" ) !== false || ' .\n\t\t\t'stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"msnbot\" ) !== false || ' .\n\t\t\t'stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"slurp\" ) !== false || ' .\n\t\t\t'stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"feedburner\" ) !== false || ' .\n\t\t\t'stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"facebook\" ) !== false || ' .\n\t\t\t'stripos( $_SERVER[ \"HTTP_USER_AGENT\" ], \"technoratisnoop\" ) !== false;';\n\n\t\t$is_bot = static::run_vary_cache_func( $is_bot_test );\n\n\t\tif ( ( defined( 'DOING_CRON' ) && DOING_CRON )\n\t\t\t|| ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )\n\t\t\t|| ( defined( 'WP_ADMIN' ) && WP_ADMIN )\n\t\t\t|| is_admin()\n\t\t\t|| $is_bot ) {\n\t\t\tstatic::$is_excluded = true;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isGetRequest(){\n return $this->route->method=='GET';\n }", "function is_get_request(){\n return $_SERVER['REQUEST_METHOD'] == 'GET';\n }", "public function requestsMetaInformation(): bool\n {\n return $this->requestsMetaInformation;\n }", "protected static function is_request_to_wccom_site_rest_api()\n {\n }", "private function isPageIncluded(): bool\n {\n $ret = false;\n if (isset($_SESSION['err']) || isset($_SESSION['mex'])) {\n $ret = true;\n } else {/* Is false*/\n }\n\n return $ret;\n }", "public function useHeaders()\r\n {\r\n return !($this->_preferNotToUseHeaders() && !$this->_isHeadersRequired());\r\n }", "public function isAllowed()\n {\n $storeId = $this->getStoreId();\n\n return\n $this->configHelper->getApplicationID($storeId)\n && $this->configHelper->getAPIKey($storeId)\n && $this->configHelper->isEnabledFrontEnd($storeId)\n && $this->configHelper->makeSeoRequest($storeId);\n }", "public static function hyperthreading_enabled() : ?bool\n {\n $ret = NULL;\n $cpu_threads = self::get_cpu_threads();\n $cpu_cores = self::get_cpu_cores();\n if ($cpu_threads && $cpu_cores) {\n if ($cpu_cores < $cpu_threads) {\n $ret = TRUE;\n } else {\n $ret = FALSE;\n }\n }\n return $ret;\n }", "public function isServiceRequest() {\n return $this->isWorkerRequest() || $this->isWarmupRequest() || $this->isLighthouseRequest();\n }", "public function hasIncludes()\n {\n return $this->hasIncludes;\n }", "protected function isGetRequest()\n {\n return Input::server(\"REQUEST_METHOD\") == \"GET\";\n }", "public function shouldLoadOnRequest(RequestContext $request);", "public function isFustyFlowRequest();", "private function gateway_enabled()\n {\n return (($this->get_option('enabled') == 'yes') &&\n !empty($this->cin) &&\n !empty($this->user) &&\n !empty($this->entity) &&\n !empty($this->country) &&\n !empty($this->language) &&\n ($this->use_multibanco || $this->use_credit_card || $this->use_boleto) &&\n $this->is_valid_for_use()) ? 'yes' : 'no';\n }", "public function hasFeaturesEnabled(){\n return $this->_has(5);\n }", "function emarking_is_regrade_requests_allowed($emarking) {\n $requestswithindate = false;\n if (!$emarking->regraderestrictdates) {\n $requestswithindate = true;\n } else \n if ($emarking->regradesopendate < time() && $emarking->regradesclosedate > time()) {\n $requestswithindate = true;\n }\n return $requestswithindate;\n}", "public function hasAgent() : bool;", "function mace_network_hotlink_allow_direct_requests() {\n\treturn 'standard' === get_option( 'mace_network_hotlink_allow_direct_requests', 'standard' );\n}", "public function hasConditions ()\n {\n return true;\n }", "public function sideloadIncludes()\n {\n return false;\n }", "public function isAuthorizationNeeded(): bool\n {\n $answer = FALSE;\n if($this->isInstanceFunction(end(explode('::', __METHOD__)))){\n $answer = $this->_function_decorations[end(explode('::', __METHOD__))](func_get_args());\n }\n if(!isset($answer)){\n $answer = FALSE;\n }\n return $answer;\n }", "public function hasApiEndpoint(){\n return $this->_has(4);\n }", "public static function hasHyperscalerIpMapping(): bool { }", "private static function __isDebugKitRequested() {\n\t\treturn isset($_GET['debug']) && 'true' == $_GET['debug'];\n\t}", "public function getIsSiteRequest(): bool\n {\n return !$this->_isCpRequest;\n }", "public function enableDetection() {\n\n\t\tforeach ($this->_detection as $key => $val) {\n\n\t\t\tif ($val === TRUE && !in_array($_SERVER['REQUEST_URI'], $this->_excludes) ) {\n\n\t\t\t\tif (method_exists($this,$key)) {\n\t\t\t\t\tcall_user_func(get_class($this).\"::\".$key);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public function isActive ()\n {\n return function_exists( 'akismet_http_post' );\n }", "function mace_network_expiry_is_headers_enabled() {\n\treturn 'standard' === get_option( 'mace_network_expiry_headers', 'standard' );\n}", "public function isHvc()\r\n {\r\n if (isset($_SERVER['HVC_REQUEST'])) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function isEnabled() {\n // OR if the 'reports' param is set\n if(\t( isset($_SERVER[\"HTTP_REFERER\"]) && strstr($_SERVER[\"HTTP_REFERER\"], '/rad/' ) ) || isset($_GET['rad']) )\n return true;\n\n return false;\n }", "public function hasWebDetection(){\n return $this->_has(13);\n }", "public function shouldLoadOnRequest(RequestContext $request)\n\t{\n\t\treturn true;\n\t}", "public function isHead()\n {\n return (isset($this->server['REQUEST_METHOD']) && ($this->server['REQUEST_METHOD'] == 'HEAD'));\n }", "protected function is_request_to_rest_api()\n {\n }", "private function is_cot_in_use() : bool\n {\n }", "public function getIncludeFlagForURLRelations(): bool\n {\n return $this->UrlRelations;\n }", "function shouldServe()\n {\n return ('XMLHttpRequest' == getenv('HTTP_X_REQUESTED_WITH'))\n && ('POST'=== strtoupper(getenv('REQUEST_METHOD')))\n && (!empty($_POST['persona_action']));\n }", "public function hasPreemptible(){\n return $this->_has(2);\n }", "public function authenticationStrategyHasRequiredData(): bool;", "public function isTaxIncluded()\n\t\t{\n\t\t\treturn $this->is_tax_included;\n\t\t}", "public function meets_requirements() {\n\t\treturn is_multisite() && is_network_admin();\n\t}", "public function isHead()\n {\n return (Request::METHOD_HEAD == $this->method);\n }", "public function identifyRequest()\r\n\t{\r\n\t\treturn false;\r\n\t}", "function has_custom_header()\n{\n}", "private function has_page_header() {\n\t\t\n\t\t// Define vars\n\t\t$return = true;\n\t\t$style = $this->page_header_style;\n\n\t\t// Return if page header is disabled via custom field\n\t\tif ( $this->post_id ) {\n\n\t\t\t// Return if page header is disabled and there isn't a page header background defined\n\t\t\tif ( 'on' == get_post_meta( $this->post_id, 'pluton_disable_title', true )\n\t\t\t\t&& 'background-image' != $style ) {\n\t\t\t\t$return\t= false;\n\t\t\t}\n\n\t\t}\n\n\t\t// Check if page header style is set to hidden\n\t\tif ( 'hidden' == $style || is_page_template( 'templates/landing.php' ) ) {\n\t\t\t$return = false;\n\t\t}\n\n\t\t// Apply filters and return\n\t\treturn apply_filters( 'pluton_display_page_header', $return );\n\n\t}", "public function authorizable()\n {\n return ! is_null(Gate::getPolicyFor($this->model()));\n }", "public function gatewayEnabled()\n\t{\n\t\tglobal $modSettings;\n\n\t\treturn !empty($modSettings['2co_id']) && !empty($modSettings['2co_password']);\n\t}", "function has_halloween_image(){\n\t\treturn (isset($_GET['halloween_image'])) ? true : false;\n\t}", "public function isRequestProcessible() {\r\n /* @var $event Tx_Extracache_System_Event_Events_EventOnStaticCacheRequest */\r\n $event = GeneralUtility::makeInstance('Tx_Extracache_System_Event_Events_EventOnStaticCacheRequest');\r\n $event->setFrontendUser( $this->getFrontendUser() );\r\n $event->setRequest( $this->getRequest() );\r\n $this->getDispatcher()->triggerEvent( $event );\r\n /**\r\n * it's important, that we check if cached representation is available AFTER we have checked if we can respond\r\n * the request (otherwise a fatal-error can occur if FE-user is logging in or out; for more informations take a\r\n * look at: Tx_Extracache_System_StaticCache_EventHandler->__construct())!\r\n */\r\n if($event->isCanceled() === FALSE && $this->isCachedRepresentationAvailable () === FALSE) {\r\n $event->cancel();\r\n $event->setReasonForCancelation( 'Check \"isCachedRepresentationAvailable\" prevents from using static caching' );\r\n }\r\n\r\n if ($event->isCanceled()) {\r\n if (NULL !== $reasonForCancelation = $event->getReasonForCancelation()) {\r\n $this->getDispatcher()->triggerEvent ( 'onStaticCacheInfo', $this, array ('message' => $reasonForCancelation ) );\r\n }\r\n return false;\r\n }\r\n return true;\r\n\t}", "public function hasHttp(){\n return $this->_has(9);\n }" ]
[ "0.6697458", "0.62316537", "0.622705", "0.6122181", "0.6050328", "0.60443485", "0.602339", "0.5977858", "0.5977858", "0.5977858", "0.5977858", "0.5865124", "0.5854373", "0.5829296", "0.58189183", "0.57980585", "0.57950467", "0.5790497", "0.57880646", "0.57667387", "0.5756057", "0.57448953", "0.57271516", "0.5723155", "0.5722731", "0.5711755", "0.57022136", "0.5694373", "0.5692993", "0.56910104", "0.5677646", "0.56716007", "0.5653034", "0.56473166", "0.5637437", "0.5633718", "0.5631654", "0.5623526", "0.561104", "0.5593656", "0.55903435", "0.5589681", "0.55786693", "0.55779827", "0.55775845", "0.5567545", "0.5564301", "0.55642045", "0.55614316", "0.55397606", "0.55263686", "0.5521989", "0.5509084", "0.55068433", "0.5503086", "0.5501495", "0.54922676", "0.5478183", "0.54764324", "0.54659986", "0.5462808", "0.54616934", "0.5459025", "0.54561806", "0.5447358", "0.54459774", "0.542941", "0.54286766", "0.5424808", "0.54240865", "0.5421725", "0.5419429", "0.54170316", "0.5413763", "0.54080564", "0.5404606", "0.5402436", "0.53877175", "0.53807056", "0.53777605", "0.5375247", "0.53735125", "0.53708243", "0.5351943", "0.5351243", "0.5344938", "0.5341393", "0.5341133", "0.5336395", "0.53320235", "0.5330579", "0.53261125", "0.5326062", "0.5323472", "0.5320609", "0.531881", "0.5317183", "0.53127193", "0.5304083", "0.5296569" ]
0.7329863
0
Fetch the internal fieldset.
Извлечь внутреннее поле.
public function getFieldset() { return $this->fieldset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFieldsets($getField = false)\n {\n $this->fieldset = array();\n $result = self::$driver->query(\" SELECT * \"\n . \" FROM \".self::$table_fieldset\n . \" WHERE \".self::$appCondition.\" `type_id`= '\".intval($this->id).\"'\"\n . \" ORDER BY `priority` ASC; \");\n while($row = self::$driver->fetch($result))\n {\n if($getField)\n $row['fields'] = $this->getFields($row['id']);\n $this->fieldset[] = $row; \n }\n \n return $this->fieldset;\n }", "public function getFieldsets()\n {\n return $this->fieldsets;\n }", "function fieldset($params = array()) {\n\n if (!isset($params['fieldsetOptions'])){\n $params['fieldsetOptions'] = array();\n }\n // calling from a View, these values might not be set\n // but in the element they exist but may or may not get a value.\n // so if they didn't get a good value in the Element\n // we normalize make it look the same as a View call for simplicity\n if (isset($params['prefix']) && $params['prefix'] === false) {\n unset($params['prefix']);\n }\n\n if (isset($params['linkNumber']) && $params['linkNumber'] === false) {\n unset($params['linkNumber']);\n }\n\n if (isset($params['record']) && $params['record'] === false) {\n unset($params['record']);\n }\n\n // arrbitrary content to insert before and after the fields\n $this->pre_fields = (!isset($params['pre_fields'])) ? '' : $params['pre_fields'];\n $this->post_fields = (!isset($params['post_fields'])) ? '' : $params['post_fields'];\n\n $this->display = (isset($params['display']) && $params['display'] == 'show') ? 'toggleShow' : 'toggleHide';\n\n $this->unique = String::uuid(); // uniquely target fieldset for show/hide\n $this->inputs = array(); // collect the input-html\n // assemble the 'prefix' portion of the 'name' attribute\n $this->prefixName = (isset($params['prefix'])) ? 'data[' . implode('][', $params['prefix']) . ']' : 'data';\n\n // assemble the 'prefix' portion of an id\n $this->prefixId = (isset($params['prefix'])) ? implode('', $params['prefix']) : null;\n\n // would there ever NOT be a model?\n $this->model = (isset($params['model'])) ? $params['model'] : null;\n\n // the related record number in a hasMany relationship\n $this->linkNumber = (isset($params['linkNumber'])) ? $params['linkNumber'] : null;\n\n // flesh out the basic legend with prefix identifier strings\n $this->legend = (isset($params['legend'])) ? $params['legend'] : '';\n $this->legend =\n ((!is_null($this->prefixId)) ? 'Record ' . $this->prefixId . ':' : '')\n . $this->legend .\n ((!is_null($this->linkNumber)) ? ':Link ' . $this->linkNumber : '');\n\n // turn the legend+prefix into a slug for attribute use\n $this->legendSlug = str_replace(' ', '_', $this->legend);\n\n // the requested fields to render\n $fields = $params['fields'];\n\n // the array of data\n $this->record = (isset($params['record'])) ? $params['record'] : array();\n\n //compile the set of input tags\n foreach ($fields as $index => $field) {\n if (is_string($params['fields'][$index])) {\n //just a field name\n $this->inputs[$index] = $this->countingInput($params['fields'][$index]);\n } else {\n //a field name as index and its options as an array\n $this->inputs[$index] = $this->countingInput($index, $params['fields'][$index]);\n }\n }\n\n //create the fieldset legend hml\n $this->legendTag = $this->Html->tag('legend', $this->legend, array('id' => $this->unique, 'class' => 'toggle'));\n\n //Bundle the legend and inputs into a fieldset, wrapping \n // the inputs in a div that keys to the legend\n // for show/hide toggling\n $this->fieldset = $this->Html->tag('fieldset', $this->legendTag . $this->Html->div(\n $this->unique . ' ' . $this->display, $this->pre_fields . implode('', $this->inputs) . $this->post_fields\n ),\n $params['fieldsetOptions']\n );\n\n //return the assembled fieldset\n return $this->fieldset;\n }", "function _webform_submission_display_fieldset($data, $component, $enabled = FALSE) {\r\n $form_item = _webform_render_fieldset($component);\r\n return $form_item;\r\n}", "function _webform_edit_fieldset($currfield) {\r\n $edit_fields = array();\r\n $edit_fields['extra']['collapsible'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('Collapsible'),\r\n '#default_value' => $currfield['extra']['collapsible'],\r\n '#description' => t('If this fieldset is collapsible, the user may open or close the fieldset.'),\r\n '#weight' => 0,\r\n );\r\n $edit_fields['extra']['collapsed'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('Collapsed by Default'),\r\n '#default_value' => $currfield['extra']['collapsed'],\r\n '#description' => t('Collapsible fieldsets are \"open\" by default. Select this option to default the fieldset to \"closed.\"'),\r\n '#weight' => 3,\r\n );\r\n $edit_fields['advanced']['mandatory'] = array();\r\n return $edit_fields;\r\n}", "public function getFormFieldSetId() {\n return @$this->attributes['form_field_set_id'];\n }", "public function fieldset($fieldset = null)\n {\n if (is_null($fieldset)) {\n return ($this->fieldset) ? Fieldset::get($this->fieldset) : null;\n }\n\n if ($fieldset === false) {\n return $this->fieldset = null;\n }\n\n $this->fieldset = $fieldset;\n }", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\t\t$fieldset = $this->getForm()->addFieldset('splash_design_page_layout', array(\n\t\t\t'legend'=> $this->helper('adminhtml')->__('Page Layout'),\n\t\t\t'class' => 'fieldset-wide',\n\t\t));\n\n\t\t$fieldset->addField('page_layout', 'select', array(\n\t\t\t'name' => 'page_layout',\n\t\t\t'label' => $this->__('Page Layout'),\n\t\t\t'title' => $this->__('Page Layout'),\n\t\t\t'values' => Mage::getSingleton('attributeSplash/system_config_source_layout')->toOptionArray(),\n\t\t));\n\t\t\n\t\t$fieldset->addField('layout_update_xml', 'editor', array(\n\t\t\t'name' => 'layout_update_xml',\n\t\t\t'label' => $this->__('Layout Update XML'),\n\t\t\t'title' => $this->__('Layout Update XML'),\n\t\t\t'style' => 'width:600px;',\n\t\t));\n\n\t\t$fieldset = $this->getForm()->addFieldset('splash_design_display_settings', array(\n\t\t\t'legend'=> $this->helper('adminhtml')->__('Display Settings'),\n\t\t\t'class' => 'fieldset-wide',\n\t\t));\n\t\t\n\t\t$fieldset->addField('display_mode', 'select', array(\n\t\t\t'name' => 'display_mode',\n\t\t\t'label' => $this->__('Display Mode'),\n\t\t\t'title' => $this->__('Display Mode'),\n\t\t\t'values' => Mage::getModel('catalog/category_attribute_source_mode')->getAllOptions(),\n\t\t));\n\t\t\n\t\t$fieldset->addField('cms_block', 'select', array(\n\t\t\t'name' => 'cms_block',\n\t\t\t'label' => $this->__('CMS Block'),\n\t\t\t'title' => $this->__('CMS Block'),\n\t\t\t'values' => Mage::getModel('catalog/category_attribute_source_page')->getAllOptions(),\n\t\t));\n\n\t\t$this->getForm()->setValues($this->_getFormData());\n\t\t\n\t\treturn $this;\n\t}", "public function getDomObject()\n\t\t{\n\t\t\t$fieldset = $this->createDomObject( 'fieldset' );\n\t\t\t$fieldset->innerHtml .= \"<legend><span>{$this->legend}</span></legend>\";\n\t\t\t$dl = '<dl>';\n\n\t\t\tfor( $i = 0, $count = $this->controls->count; $i < $count; $i++ )\n\t\t\t{\n\t\t\t\t$childControl = $this->controls->itemAt( $i );\n\n\t\t\t\t// create list item\n\t\t\t\tif( !$childControl->visible )\n\t\t\t\t{\n\t\t\t\t\t$dt = '<dt style=\"display:none;\">';\n\t\t\t\t\t$dd = '<dd style=\"display:none;\">';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$dt = '<dt>';\n\t\t\t\t\t$dd = '<dd>';\n\t\t\t\t}\n\n\t\t\t\t// create label\n\t\t\t\t$dt .= '<label class=\"'.($childControl->attributes->contains(\"class\")?$childControl->attributes[\"class\"]:'').'\" for=\"'.$childControl->defaultHTMLControlId.'\">' . $childControl->label . '</label>';\n\n\t\t\t\t// Get input control\n\t\t\t\t$dd .= $childControl->fetch();\n\n\t\t\t\t// create validation message span tag\n\t\t\t\t$errMsg = '';\n\t\t\t\tif( $this->getParentByType('\\System\\Web\\WebControls\\Form')->submitted )\n\t\t\t\t{\n\t\t\t\t\t$childControl->validate($errMsg);\n\t\t\t\t}\n\n\t\t\t\t$dd .= $childControl->fetchError();\n\n\t\t\t\t$dl .= $dt . '</dt>';\n\t\t\t\t$dl .= $dd . '</dd>';\n\t\t\t}\n\n\t\t\t$dl .= '</dl>';\n\n\t\t\t$fieldset->innerHtml .= $dl;\n\n\t\t\treturn $fieldset;\n\t\t}", "function _webform_defaults_fieldset() {\r\n return array(\r\n 'name' => '',\r\n 'form_key' => NULL,\r\n 'pid' => 0,\r\n 'weight' => 0,\r\n 'extra' => array(\r\n 'collapsible' => 0,\r\n 'collapsed' => 0,\r\n 'description' => '',\r\n ),\r\n );\r\n}", "public function closeFieldSet()\n {\n $open = false;\n foreach ($this->elements as $element) {\n if ($element instanceof FieldSet) $open = $element;\n elseif ($element == '</fieldset>') $open = false;\n }\n if ($open) {\n $this->elements[] = '</fieldset>';\n return $element;\n } else throw new FormException('before calling closeFieldSet must be fieldset opened.');\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form();\n $form->setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));\n $form->setFieldsetElementRenderer($this->getLayout()\n ->createBlock('adminhtml/widget_form_renderer_fieldset_element'));\n\n /**\n * if there is a parent element defined, it will be replaced by a hidden element with the same name\n * and overriden by the form elements\n * It is needed to maintain HTML consistency of the parent element's form\n */\n if ($this->_parentElement) {\n $form->setHtmlIdPrefix($this->_parentElement->getHtmlId())\n ->setFieldNameSuffix($this->_parentElement->getName());\n $form->addField('', 'hidden', array('name' => ''));\n }\n\n $noYes = array(Mage::helper('adminhtml')->__('No'), Mage::helper('adminhtml')->__('Yes'));\n\n // schedule\n $schedule = $form->addFieldset('schedule_fieldset', array(\n 'legend' => Mage::helper('sales')->__('Schedule'),\n 'disabled' => $this->_isReadOnly\n ));\n $schedule->addField('start_date_is_editable', 'select', array(\n 'name' => 'start_date_is_editable',\n 'label' => Mage::helper('sales')->__('Customer Can Define Start Date'),\n 'comment' => Mage::helper('sales')->__('Whether buyer can define the date when billing for the profile begins.'),\n 'options' => $noYes,\n 'disabled' => $this->_isReadOnly\n ));\n $this->_addField($schedule, 'schedule_description');\n $this->_addField($schedule, 'suspension_threshold');\n $this->_addField($schedule, 'bill_failed_later', array('options' => $noYes), 'select');\n\n // billing\n $billing = $form->addFieldset('billing_fieldset', array(\n 'legend' => Mage::helper('sales')->__('Billing'),\n 'disabled' => $this->_isReadOnly\n ));\n $this->_addField($billing, 'period_unit', array(\n 'options' => $this->_getPeriodUnitOptions(Mage::helper('adminhtml')->__('-- Please Select --')),\n ), 'select');\n $this->_addField($billing, 'period_frequency');\n $this->_addField($billing, 'period_max_cycles');\n\n // trial\n $trial = $form->addFieldset('trial_fieldset', array(\n 'legend' => Mage::helper('sales')->__('Trial Period'),\n 'disabled' => $this->_isReadOnly\n ));\n $this->_addField($trial, 'trial_period_unit', array(\n 'options' => $this->_getPeriodUnitOptions(Mage::helper('adminhtml')->__('-- Not Selected --')),\n ), 'select');\n $this->_addField($trial, 'trial_period_frequency');\n $this->_addField($trial, 'trial_period_max_cycles');\n $this->_addField($trial, 'trial_billing_amount');\n\n // initial fees\n $initial = $form->addFieldset('initial_fieldset', array(\n 'legend' => Mage::helper('sales')->__('Initial Fees'),\n 'disabled' => $this->_isReadOnly\n ));\n $this->_addField($initial, 'init_amount');\n $this->_addField($initial, 'init_may_fail', array('options' => $noYes), 'select');\n\n return $form;\n }", "function describe_fieldset($oFieldset) { \n $this->oFieldset = $oFieldset;\n \n // don't let people think this fieldset will work when it won't.\n $this->statuswarnings(); \n \n $this->persistParams(array('fFieldsetId','action')); \n $oTemplate =& $this->oValidator->validateTemplate('ktcore/metadata/conditional/conditional_admin_overview');\n $oTemplate->setData(array(\n 'context' => $this,\n 'fields' => $oFieldset->getFields(),\n 'oFieldset' => $oFieldset,\n ));\n return $oTemplate->render();\n }", "abstract public function getFormFields();", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form();\n $this->setForm($form);\n $fieldset = $form->addFieldset('offermanager_form', array('legend'=>Mage::helper('offermanager')->__('Offer information')));\n\n $fieldset->addField('offer_name', 'text', array(\n 'label' => Mage::helper('offermanager')->__('Offer Name'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'offer_name',\n ));\n\n $fieldset->addField('description', 'textarea', array(\n 'label' => Mage::helper('offermanager')->__('Description'),\n 'required' => false,\n 'name' => 'description',\n ));\n\n $fieldset->addField('offer_image', 'image', array(\n 'label' => Mage::helper('offermanager')->__('Offer Banner'),\n 'required' => false,\n 'name' => 'offer_image',\n\t\t\t'note' => 'Allowed image extension jpg, jpeg, gif, png'\n ));\n\n\n $fieldset->addField('offer_icon', 'image', array(\n 'label' => Mage::helper('offermanager')->__('Offer Icon'),\n\t 'required'\t=> false,\n\t 'name'\t\t=>'offer_icon',\n 'note' => 'Allowed image extension jpg, jpeg, gif, png'\n ));\n\n $rules = Mage::getSingleton('offermanager/rules')->getOptionArray();\n\n $fieldset->addField('rule_id', 'select', array(\n 'label' => Mage::helper('offermanager')->__('Select Rule'),\n 'name' => 'rule_id',\n 'values' => $rules,\n 'class' => 'required-entry',\n 'required'\t=> true,\n ));\n\n $fieldset->addField('status', 'select', array(\n 'label' => Mage::helper('offermanager')->__('Status'),\n 'name' => 'status',\n 'values' => array(\n\t array(\n\t\t 'value' => 1,\n\t\t 'label' => Mage::helper('offermanager')->__('Enabled'),\n\t ),\n\t array(\n\t\t 'value' => 2,\n\t\t 'label' => Mage::helper('offermanager')->__('Disabled'),\n\t ),\n ),\n ));\n\n $fieldset->addField('url_key', 'text', array(\n 'label' => Mage::helper('offermanager')->__('Url Key'),\n 'name' => 'url_key',\n 'required'\t=> false,\n ));\n\n if ( Mage::getSingleton('adminhtml/session')->getOffermanagerData() ) {\n $form->setValues(Mage::getSingleton('adminhtml/session')->getOffermanagerData());\n Mage::getSingleton('adminhtml/session')->setOffermanagerData(null);\n } elseif ( Mage::registry('offermanager_data') ) {\n $form->setValues(Mage::registry('offermanager_data')->getData());\n }\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$fieldset = $this->getForm()\n\t\t\t->addFieldset('splash_page_information', array(\n\t\t\t\t'legend'=> $this->__('Page Information')\n\t\t\t));\n\t\t\n\t\t$fieldset->addField('display_name', 'text', array(\n\t\t\t'name' \t\t=> 'display_name',\n\t\t\t'label' \t=> $this->__('Name'),\n\t\t\t'title' \t=> $this->__('Name'),\n\t\t\t'required'\t=> true,\n\t\t\t'class'\t\t=> 'required-entry',\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n \n\t\t$field = $fieldset->addField('url_key', 'text', array(\n\t\t\t'name' => 'url_key',\n\t\t\t'label' => $this->__('URL Key'),\n\t\t\t'title' => $this->__('URL Key'),\n\t\t\t'required'\t=> true,\n\t\t\t'class'\t\t=> 'required-entry',\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_urlkey')\n\t\t\t\t->setSplashType('page')\n\t\t);\n if ($page = Mage::registry('splash_page')) {\n $fieldset->addField('filter_rules', 'hidden', array(\n\t\t\t\t'name' \t\t=> 'filter_rules',\n\t\t\t\t'value' => $page->getFilterRules(),\n\t\t\t));\n }\n\t\t$fieldset->addField('is_enabled', 'select', array(\n\t\t\t'name' => 'is_enabled',\n\t\t\t'title' => $this->__('Enabled'),\n\t\t\t'label' => $this->__('Enabled'),\n\t\t\t'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(),\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n \n\t\t$fieldset->addField('is_featured', 'select', array(\n\t\t\t'name' => 'is_featured',\n\t\t\t'title' => $this->__('Brand Page'),\n\t\t\t'label' => $this->__('Brand Page'),\n\t\t\t'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(),\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n\t\t$this->getForm()->setValues($this->_getFormData());\n if ($page = Mage::registry('splash_page')) {\n $fieldset->addField('store_id', 'hidden', array(\n 'name' \t\t=> 'store_id',\n 'value' => ((Mage::app()->getRequest()->getParam('store'))? Mage::app()->getRequest()->getParam('store') : Mage::app()->getStore(true)->getId()),\n ));\n }\n\t\treturn $this;\n\t}", "protected function _prepareForm()\n {\n $model = Mage::registry('flubitlog_data');\n $form = new Varien_Data_Form();\n $this->setForm($form);\n $fieldset = $form->addFieldset('flubitlog_form', array('legend'=>Mage::helper('flubitlog')->__('Request')));\n $fieldset->addField('request_xml', 'editor', array(\n 'name' => 'request_xml',\n 'style' => 'width:900px; height:250px;resize: none;',\n 'wysiwyg' => false,\n 'readonly' => true,\n 'value' => $model['request_xml'],\n ));\n \n $fieldset->addField('response_xml', 'editor', array(\n 'name' => 'response_xml',\n 'style' => 'width:900px; height:250px;resize: none;',\n 'wysiwyg' => false,\n 'readonly' => true,\n 'value' => $model['response_xml'],\n ));\n\t \n\treturn parent::_prepareForm();\n }", "public function openFieldSet($fieldSet)\n {\n if ($fieldSet instanceof FieldSet) {\n $this->elements[] = $fieldSet;\n return $fieldSet;\n } else\n throw new FormException('param fieldset is not instance of class FieldSet!');\n }", "protected function _prepareForm()\n {\n $dateFormat = $this->_localeDate->getDateFormat(\\IntlDateFormatter::SHORT);\n $model = $this->_coreRegistry->registry('row_data');\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('Item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Cooking Information')]);\n if ($model->getEntityId()) {\n \n $fieldset->addField('entity_id', 'hidden', ['name' => 'entity_id']);\n } \n \n\n $fieldset->addField(\n 'first_name',\n 'text',\n [\n 'name' => 'first_name',\n 'label' => __('First Name'),\n 'id' => 'first_name',\n 'title' => __('First_Name'),\n 'class' => 'required-entry',\n 'required' => true,\n ]\n );\n\n $fieldset->addField(\n 'last_name',\n 'text',\n [\n 'name' => 'last_name',\n 'label' => __('Last Name'),\n 'id' => 'last_name',\n 'title' => __('Last_Name'),\n 'class' => 'required-entry',\n 'required' => true,\n ]\n );\n\n $fieldset->addField(\n 'email',\n 'text',\n [\n 'name' => 'email',\n 'label' => __('Email'),\n 'id' => 'email',\n 'title' => __('Email'),\n 'class'=>'validate-email',\n 'required' => true,\n ]\n );\n\n\n $fieldset->addField(\n 'telephone',\n 'text',\n [\n 'name' => 'telephone',\n 'label' => __('Telephone'),\n 'id' => 'telephone',\n 'title' => __('Telephone'),\n 'class'=> 'validate-number',\n 'required' => true,\n ]\n );\n\n $fieldset->addField(\n 'no_of_people',\n 'text',\n [\n 'name' => 'no_of_people',\n 'label' => __('No Of People'),\n 'id' => 'no_of_people',\n 'title' => __('No_Of_People'),\n 'class' => 'required-entry',\n 'required' => true,\n ]\n );\n $fieldset->addField(\n 'course',\n 'text',\n [\n 'name' => 'course',\n 'label' => __('Course'),\n 'id' => 'course',\n 'title' => __('Course'),\n 'class' => 'required-entry',\n 'required' => true,\n ]\n );\n\n \n $fieldset->addField(\n 'description',\n 'editor',\n [\n 'name' => 'description',\n 'label' => __('Description'),\n 'style' => 'height:36em;',\n 'required' => true,\n \n ]\n );\n\n \n \n $form->setValues($model->getData());\n // $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function do_editFieldset() {\n $fieldset_id = $this->oFieldset->getId();\n $oTemplating =& KTTemplating::getSingleton();\n $oTemplate = $oTemplating->loadTemplate(\"ktcore/metadata/conditional/editsimple\");\n /* alright: to \"do\" this we need at least:\n * 1. the list of all the columns (id, name) and their available values.\n * 2. the fieldset_id.\n * we can then render in/out. Everything \"intelligent\" happens\n * in AJAX (doing it with submits sucks arse.\n * \n */\n \n $oFieldset =& $this->oFieldset;\n $aFields =& $oFieldset->getFields();\n\n $this->oPage->setBreadcrumbDetails(_kt('Manage simple conditional'));\n $sTable = KTUtil::getTableName('field_orders');\n $aQuery = array(\n \"SELECT parent_field_id, child_field_id FROM $sTable WHERE fieldset_id = ?\",\n array($oFieldset->getId())\n );\n $aFieldOrders = DBUtil::getResultArray($aQuery); \n $aOrders = array();\n foreach ($aFieldOrders as $row) {\n $aChildren = KTUtil::arrayGet($aOrders, $row['parent_field_id'], array());\n $aChildren[] = $row['child_field_id'];\n $aOrders[$row['parent_field_id']] = $aChildren;\n } \n \n // for useability, they can go in any order\n // but master field should be first. beyond that \n // it can get odd anyway. \n \n $aKeyedFields = array();\n $aOrderedFields = array();\n $aStack = array($oFieldset->getMasterFieldId());\n \n // first, key\n foreach ($aFields as $oField) {\n $aKeyedFields[$oField->getId()] = $oField;\n }\n \n while (!empty($aStack)) {\n $iKey = array_shift($aStack);\n // this shouldn't happen, but avoid it anyway.\n if (!is_null($aKeyedFields[$iKey])) {\n $aOrderedFields[] = $aKeyedFields[$iKey];\n unset($aKeyedFields[$iKey]);\n }\n // add children to stack\n $aStack = kt_array_merge($aStack, $aOrders[$iKey]);\n }\n \n $aTemplateData = array(\n \"context\" => &$this,\n \"fieldset_id\" => $fieldset_id,\n \"ordering\" => $aOrders,\n \"aFields\" => $aOrderedFields,\n \"iMasterFieldId\" => $oFieldset->getMasterFieldId(),\n );\n return $oTemplate->render($aTemplateData);\n }", "private function checkOpenedFieldSet()\n {\n $open = false;\n foreach ($this->elements as $element) {\n if ($element instanceof FieldSet) $open = true;\n elseif ($element == '</fieldset>') $open = false;\n }\n return $open ? '</fieldset>' : '';\n }", "protected function fieldsets()\r\n {\r\n $attributes = ['rows' => 20, 'cols' => 80];\r\n $this->grid->fieldset('Header', function (Fieldset $fieldset) use($attributes) {\r\n $control = $fieldset->control('input:hidden', 'area');\r\n if (!is_null($area = from_route('area'))) {\r\n $control->value($area->getId());\r\n }\r\n\r\n $fieldset->attributes(['panel_id' => 'header-panel']);\r\n $fieldset->control('textarea', 'header')\r\n ->label(trans('antares/brands::label.brand.header'))\r\n ->attributes($attributes + ['id' => 'email-header-html', 'panel_id' => 'header-panel'])\r\n ->value(is_null($this->model->options) ? $this->getDefault('header') : $this->model->options->header);\r\n });\r\n\r\n $this->grid->fieldset('Styles', function (Fieldset $fieldset) use($attributes) {\r\n $fieldset->attributes(['panel_id' => 'styles-panel']);\r\n $fieldset->control('textarea', 'styles')\r\n ->label(trans('antares/brands::label.brand.styles'))\r\n ->attributes($attributes + ['id' => 'email-styles'])\r\n ->value(is_null($this->model->options) ? $this->getDefault('styles') : $this->model->options->styles);\r\n });\r\n $this->grid->fieldset('Footer', function (Fieldset $fieldset) use($attributes) {\r\n $fieldset->attributes(['panel_id' => 'footer-panel']);\r\n $fieldset->control('textarea', 'footer')\r\n ->label(trans('antares/brands::label.brand.footer'))\r\n ->attributes($attributes + ['id' => 'email-footer-html', 'panel_id' => 'footer-panel'])\r\n ->value(is_null($this->model->options) ? $this->getDefault('footer') : $this->model->options->footer);\r\n\r\n $fieldset->control('button', 'button')\r\n ->attributes(['type' => 'submit', 'class' => 'btn btn--md btn--primary mdl-button mdl-js-button'])\r\n ->value(trans('antares/brands::label.brand.save_changes'));\r\n if (extension_active('multibrand')) {\r\n $fieldset->control('button', 'cancel')\r\n ->field(function() {\r\n return app('html')->link(handles(\"antares::multibrand/index\"), trans('antares/brands::label.brand.cancel'), ['class' => 'btn btn--md btn--default mdl-button mdl-js-button']);\r\n });\r\n }\r\n });\r\n return $this->grid;\r\n }", "public function getFields($fieldset = false)\n {\n if($fieldset)\n $fieldsetCondition = ' AND `fieldset_id` = \"'.intval($fieldset).'\" ';\n else\n $fieldsetCondition = '';\n \n $list = array();\n $result = self::$driver->query(\" SELECT * \"\n . \" FROM \".self::$table_fields\n . \" WHERE \".self::$appCondition.\" `type_id`= '\".intval($this->id).\"' \"\n . $fieldsetCondition\n . \" ORDER BY `priority` ASC; \");\n while($row = self::$driver->fetch($result))\n {\n if($row['options'])\n $row['options'] = json_decode($row['options']);\n $list[] = $row;\n }\n \n return $this->fields = $list;\n }", "private function _render_fieldset_open($field = array())\n\t{\n\t\t// Name of the fieldset\n\t\tif ( ! array_key_exists('id', $field['attributes']))\n\t\t{\n\t\t\t$field['attributes']['id'] = $this->_field_id($field['legend']);\n\t\t}\n\n\t\treturn form_fieldset($field['legend'], $field['attributes']);\n\t}", "public function _prepareForm()\n {\n $model = $this->getModel();\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n $fieldset = $form->addFieldset(\n 'base_fieldset',\n ['legend' => __('Testimonial Information'), 'class' => 'fieldset-wide']\n );\n if ($model->getTestimonialId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id', 'value' => $model->getTestimonialId()]);\n }\n\n if ($model->getImage() == \"\") {\n $img=\"\";\n } else {\n $img=\"ck/testimonial/\".$model->getImage();\n }\n\n $fieldset->addField(\n 'Title',\n 'text',\n [\n 'name' => 'company_name',\n 'label' => __('Title'),\n 'title' => __('Title'),\n 'required' => true,\n 'value' => $model->getCompanyName()\n ]\n );\n\n $fieldset->addField(\n 'Name',\n 'text',\n [\n 'name' => 'name',\n 'label' => __('Name'),\n 'title' => __('Name'),\n 'required' => true,\n 'value' => $model->getName()\n ]\n );\n $fieldset->addField(\n 'Email',\n 'text',\n [\n 'name' => 'email',\n 'label' => __('Email'),\n 'title' => __('Email'),\n 'required' => true,\n 'value' => $model->getEmail(),\n 'class' => 'validate-email'\n ]\n );\n\n \n // $fieldset->addField(\n // 'Website',\n // 'text',\n // [\n // 'name' => 'website',\n // 'label' => __('Website'),\n // 'title' => __('Website'),\n // 'value' => $model->getWebsite()\n // ]\n // );\n $fieldset->addField(\n 'Content',\n 'textarea',\n [\n 'name' => 'content',\n 'label' => __('Message'),\n 'title' => __('Message'),\n 'required' => true,\n 'value' => $model->getContent()\n ]\n );\n $fieldset->addField(\n 'Testimonial Image',\n 'image',\n [\n 'title' => __('Profile image'),\n 'label' => __('Profile image'),\n 'name' => 'image',\n 'note' => 'Allow image type: jpg, jpeg, gif, png',\n 'required' => false,\n 'value' => $img\n \n ]\n );\n \n $fieldset->addField(\n 'rate',\n 'select',\n [\n 'label' => __('Rating Star'),\n 'title' => __('Rating Star'),\n 'name' => 'rate',\n 'required' => true,\n 'options' => [\n '1' => __('1 Star'),\n '2' => __('2 Star'),\n '3'=> __('3 Star'),\n '4'=> __('4 Star'),\n '5'=> __('5 Star')\n ],\n 'value' => $model->getRate()\n ]\n );\n $fieldset->addField(\n 'status',\n 'select',\n [\n 'label' => __('Status'),\n 'title' => __('Status'),\n 'name' => 'status',\n 'required' => true,\n 'options' => ['1' => __('Enable'), '0' => __('Disable'),'2'=> __('Pending')],\n 'value' => $model->getStatus()\n ]\n );\n\n $form->setAction($this->getUrl('*/*/delete'));\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function getFields() {\n\n\t\t$aFieldTypes \t= $this->oField->getFieldTypes();\n\t\t$aFields \t\t= $this->oField->select()\n\t\t\t\t\t\t\t->columns('id, type_id, name, label')\n\t\t\t\t\t\t\t->from($this->oField->_name)\n\t\t\t\t\t\t\t->where(\"form_name = '\".$this->_formName.\"'\")\n\t\t\t\t\t\t\t->order('`order`')\n\t\t\t\t\t\t\t->getList();\n\n\t\t// Do the field type mapping\n\t\tforeach($aFields as $key => $aField) {\n\t\t\t$aFields[$key]['type'] = $aFieldTypes[$aField['type_id']]; // Set the field type\n\t\t\tforeach(array('type_id', 'id') as $unsetField) {\n\t\t\t\tunset($aFields[$key][$unsetField]);\n\t\t\t}\n\t\t\t$iFieldID = $aField['id'];\n\t\t\t// Get all the attributes and assign it to the\n\t\t\t$aFieldAttributes = $this->oField->getAttributes($iFieldID);\n\t\t\tforeach($aFieldAttributes as $attrkey => $attrval) {\n\t\t\t\t$aFields[$key][$attrkey] = $attrval;\n\t\t\t}\n\n\t\t}\n\t\t$this->_formFields = $aFields;\n\t}", "private function getFields()\n\t{\n\t\t$form = \\GFAPI::get_form($this->form_id);\n\t\tif ( !$form ) return $this->error(__('The form was not found.', 'gfpd'));\n\t\t$fields = $form['fields'];\n\t\tforeach ( $fields as $key => $field ){\n\t\t\t$this->fields[$key]['id'] = $field['id'];\n\t\t\t$this->fields[$key]['title'] = $field['label'];\n\t\t}\n\t}", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\t\t\n\t\t$fieldset = $this->getForm()->addFieldset('splash_page_meta', array(\n\t\t\t'legend'=> $this->helper('adminhtml')->__('Meta Data'),\n\t\t\t'class' => 'fieldset-wide',\n\t\t));\n\n\n\t\t$fieldset->addField('page_title', 'text', array(\n\t\t\t'name' => 'page_title',\n\t\t\t'label' => $this->__('Page Title'),\n\t\t\t'title' => $this->__('Page Title'),\n\t\t));\n\t\t\n\t\t$fieldset->addField('meta_description', 'editor', array(\n\t\t\t'name' => 'meta_description',\n\t\t\t'label' => $this->__('Description'),\n\t\t\t'title' => $this->__('Description'),\n\t\t\t'style' => 'width:98%; height:110px;',\n\t\t));\n\t\t\n\t\t$fieldset->addField('meta_keywords', 'editor', array(\n\t\t\t'name' => 'meta_keywords',\n\t\t\t'label' => $this->__('Keywords'),\n\t\t\t'title' => $this->__('Keywords'),\n\t\t\t'style' => 'width:98%; height:110px;',\n\t\t));\n\t\t\n\t\t$this->getForm()->setValues($this->_getFormData());\n\t\t\n\t\treturn $this;\n\t}", "protected function _prepareForm()\r\n {\r\n $this->getForm()->setUseContainer(false);\r\n $form = $this->getForm();\r\n $data = $this->getWidgetValues();\r\n $vesCoreHelper = Mage::helper('ves_core');\r\n \r\n $fieldset = $this->getMainFieldset();\r\n\t\tforeach(array('header','row') as $item) {\r\n\t\t\t$item == 'header' ? $label = 'Table Header' : $label = 'Item Row';\r\n\t\t\t\r\n\t\t\t$fieldset->addField($item.'_heading', 'text', array(\r\n\t\t 'label' => Mage::helper('advancedpdfprocessor')->__($label),\r\n \t));\r\n\t\t\t//set renderer\r\n\t\t\t$form->getElement($item.'_heading')->setRenderer(\r\n \t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_heading')\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fieldset->addField($item.'_font_family', 'select', array(\r\n\t\t 'label' => Mage::helper('advancedpdfprocessor')->__('Font family'),\r\n\t\t 'class' => 'required-entry',\r\n\t\t 'required' => true,\r\n\t\t 'name' => 'parameters['.$item.'_font_family]',\r\n\t\t\t\t 'values'\t => VES_AdvancedPdfProcessor_Model_Source_Data::toOptionArray(VES_AdvancedPdfProcessor_Model_Source_Data::FONT_FAMILY),\r\n\t\t\t\t 'value'\t => $data[$item.'_font_family'],\t\r\n \t));\r\n\t\t\t//set renderer\r\n\t\t\t$form->getElement($item.'_font_family')->setRenderer(\r\n\t\t\t\t\t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_element')\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fieldset->addField($item.'_font_size', 'select', array(\r\n\t\t\t\t\t'label' => Mage::helper('advancedpdfprocessor')->__('Font size'),\r\n\t\t\t\t\t'class' => 'required-entry',\r\n\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t'name' => 'parameters['.$item.'_font_size]',\r\n\t\t\t\t \t'values'\t => VES_AdvancedPdfProcessor_Model_Source_Data::toOptionArray(VES_AdvancedPdfProcessor_Model_Source_Data::FONT_SIZE),\r\n\t\t\t\t\t'value'\t => $data[$item.'_font_size'],\r\n\t\t\t));\r\n\t\t\t//set renderer\r\n\t\t\t$form->getElement($item.'_font_size')->setRenderer(\r\n\t\t\t\t\t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_element')\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fieldset->addField($item.'_font_italic', 'select', array(\r\n\t\t\t\t\t'label' => Mage::helper('advancedpdfprocessor')->__('Italic'),\r\n\t\t\t\t\t'name' => 'parameters['.$item.'_font_italic]',\r\n\t\t\t\t\t'values'\t => VES_AdvancedPdfProcessor_Model_Source_Data::toOptionArray(VES_AdvancedPdfProcessor_Model_Source_Data::FONT_ITALIC),\r\n\t\t\t\t\t'value'\t => isset($data[$item.'_font_italic'])?$data[$item.'_font_italic']:'0',\r\n\t\t\t));\r\n\t\t\t//set renderer\r\n\t\t\t$form->getElement($item.'_font_italic')->setRenderer(\r\n\t\t\t\t\t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_element')\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fieldset->addField($item.'_font_bold', 'select', array(\r\n\t\t\t\t\t'label' => Mage::helper('advancedpdfprocessor')->__('Bold'),\r\n\t\t\t\t\t'name' => 'parameters['.$item.'_font_bold]',\r\n\t\t\t\t\t'values'\t => VES_AdvancedPdfProcessor_Model_Source_Data::toOptionArray(VES_AdvancedPdfProcessor_Model_Source_Data::FONT_BOLD),\r\n\t\t\t\t\t'value'\t => isset($data[$item.'_font_bold'])?$data[$item.'_font_bold']:0,\r\n\t\t\t));\r\n\t\t\t//set renderer\r\n\t\t\t$form->getElement($item.'_font_bold')->setRenderer(\r\n\t\t\t\t\t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_element')\r\n\t\t\t);\r\n\t\t}\r\n\t\t//for column\r\n\t\t$fieldset->addField('column_heading', 'text', array(\r\n\t\t\t\t'label' => Mage::helper('advancedpdfprocessor')->__('Columns'),\r\n\t\t));\r\n\t\t//set renderer\r\n\t\t$form->getElement('column_heading')->setRenderer(\r\n\t\t\t\t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_heading')\r\n\t\t);\r\n\t\t\r\n\t\t$fieldset->addField('column', 'text', array(\r\n\t\t\t\t'name'=>'column',\r\n\t\t\t\t'value'\t => $data['column'],\r\n\t\t\t\t'editor'\t=> $this->getEditor(),\r\n\t\t));\r\n\t\t\r\n\t\t$form->getElement('column')->setRenderer(\r\n\t\t\t\t$this->getLayout()->createBlock('advancedpdfprocessor/adminhtml_widget_form_renderer_fieldset_column')\r\n\t\t);\r\n return $this;\r\n }", "public function getFields(DataContainer $dc)\n\t{\n\t\t$arrFields = $GLOBALS['TL_FFL'];\n\t\t$intPid = $dc->activeRecord->pid;\n\n\t\tif (Input::get('act') == 'overrideAll')\n\t\t{\n\t\t\t$intPid = Input::get('id');\n\t\t}\n\n\t\t$objForm = $this->Database->prepare(\"SELECT tableless FROM tl_form WHERE id=?\")\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->execute($intPid);\n\n\t\t// Fieldsets are only supported in tableless forms\n\t\tif (!$objForm->tableless)\n\t\t{\n\t\t\tunset($arrFields['fieldset']);\n\t\t}\n\n\t\t// Add the translation\n\t\tforeach (array_keys($arrFields) as $key)\n\t\t{\n\t\t\t$arrFields[$key] = $GLOBALS['TL_LANG']['FFL'][$key][0];\n\t\t}\n\n\t\treturn $arrFields;\n\t}", "function do_editComplexFieldset() {\n $fieldset_id = $this->oFieldset->getId();\n $oTemplating =& KTTemplating::getSingleton();\n $oTemplate = $oTemplating->loadTemplate(\"ktcore/metadata/conditional/editcomplex\");\n /* alright: to \"do\" this we need at least:\n * 1. the list of all the columns (id, name) and their available values.\n * 2. the fieldset_id.\n * we can then render in/out. Everything \"intelligent\" happens\n * in AJAX (doing it with submits sucks arse.\n * \n * FIXME we fake it here with nested arrays...\n */\n $oFieldset =& $this->oFieldset;\n $aFields =& $oFieldset->getFields(); \n \n $sTable = KTUtil::getTableName('field_orders');\n $aQuery = array(\n \"SELECT parent_field_id, child_field_id FROM $sTable WHERE fieldset_id = ?\",\n array($oFieldset->getId())\n );\n $aFieldOrders = DBUtil::getResultArray($aQuery); \n $aOrders = array();\n foreach ($aFieldOrders as $row) {\n $aChildren = KTUtil::arrayGet($aOrders, $row['parent_field_id'], array());\n $aChildren[] = $row['child_field_id'];\n $aOrders[$row['parent_field_id']] = $aChildren;\n } \n \n\n $aKeyedFields = array();\n $aOrderedFields = array();\n $aStack = array($oFieldset->getMasterFieldId());\n \n // first, key\n foreach ($aFields as $oField) {\n $aKeyedFields[$oField->getId()] = $oField;\n }\n \n while (!empty($aStack)) {\n $iKey = array_shift($aStack);\n // this shouldn't happen, but avoid it anyway.\n if (!is_null($aKeyedFields[$iKey])) {\n $aOrderedFields[] = $aKeyedFields[$iKey];\n unset($aKeyedFields[$iKey]);\n }\n // add children to stack\n $aStack = kt_array_merge($aStack, $aOrders[$iKey]);\n } \n \n $this->oPage->setBreadcrumbDetails(_kt('Manage complex conditional'));\n $aTemplateData = array(\n \"context\" => &$this,\n \"fieldset_id\" => $fieldset_id,\n \"ordering\" => $aOrders,\n \"aFields\" => $aOrderedFields,\n \"iMasterFieldId\" => $oFieldset->getMasterFieldId(),\n );\n return $oTemplate->render($aTemplateData);\n }", "function _webform_render_fieldset($component) {\r\n $form_item = array(\r\n '#type' => $component['type'],\r\n '#title' => htmlspecialchars($component['name'], ENT_QUOTES),\r\n '#weight' => $component['weight'],\r\n '#description' => _webform_filter_descriptions($component['extra']['description']),\r\n '#collapsible' => $component['extra']['collapsible'],\r\n '#collapsed' => $component['extra']['collapsed'],\r\n '#attributes' => array('class' => 'webform-component-'. $component['type'], 'id' => 'webform-component-'. $component['form_key']),\r\n );\r\n\r\n return $form_item;\r\n}", "function getFormField() {\n\t}", "public function get_fields()\n {\n\n return array(\n 'key' => 'group_5fb04144c3ffd',\n 'title' => ucwords(str_replace(array('-', '_'), ' ', $this->name())),\n 'fields' => array(\n array(\n 'key' => 'field_5fb0415413092',\n 'label' => 'Resources Preview',\n 'name' => 'resources_preview',\n 'type' => 'group',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'layout' => 'block',\n 'sub_fields' => array(\n array(\n 'key' => 'field_1ec43e0cf1619',\n 'label' => 'Show Description',\n 'name' => 'show_description',\n 'type' => 'button_group',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'choices' => array(\n 'Yes' => 'Yes',\n 'No' => 'No',\n ),\n 'allow_null' => 0,\n 'default_value' => '',\n 'layout' => 'horizontal',\n 'return_format' => 'value',\n ),\n array(\n 'key' => 'field_5fb047151d6dc',\n 'label' => 'Title',\n 'name' => 'title',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '40',\n 'class' => '',\n 'id' => '',\n ),\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_5fb047201d6dd',\n 'label' => 'Description',\n 'name' => 'description',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => array(\n array(\n array(\n 'field' => 'field_1ec43e0cf1619',\n 'operator' => '==',\n 'value' => 'Yes',\n ),\n ),\n ),\n 'wrapper' => array(\n 'width' => '60',\n 'class' => '',\n 'id' => '',\n ),\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_5fb0417d13093',\n 'label' => 'Selector',\n 'name' => 'selector',\n 'type' => 'button_group',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'choices' => array(\n 'latest' => 'Latest',\n 'manual' => 'Manual',\n ),\n 'allow_null' => 0,\n 'default_value' => '',\n 'layout' => 'horizontal',\n 'return_format' => 'value',\n ),\n array(\n 'key' => 'field_5fb041d813094',\n 'label' => 'Manual Articles',\n 'name' => 'manual_articles',\n 'type' => 'relationship',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => array(\n array(\n array(\n 'field' => 'field_5fb0417d13093',\n 'operator' => '==',\n 'value' => 'manual',\n ),\n ),\n ),\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'post_type' => array(\n 0 => 'article',\n ),\n 'taxonomy' => '',\n 'filters' => array(\n 0 => 'search',\n ),\n 'elements' => '',\n 'min' => '',\n 'max' => 3,\n 'return_format' => 'object',\n ),\n ),\n ),\n ),\n 'location' => array(\n array(\n array(\n 'param' => 'post_taxonomy',\n 'operator' => '==',\n 'value' => 'module-taxonomy:' . $this->name(),\n ),\n ),\n ),\n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'top',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => '',\n 'active' => true,\n 'description' => '',\n );\n }", "protected function placeFieldsetElements()\n {\n if(!$this->_fieldsetCollection->isEmpty())\n {\n foreach($this->_fieldsetCollection as /* @var $element FieldsetElement */ $element)\n {\n $element->build();\n $fieldset_parts = $element->getOpenAndCloseTag();\n \n $this->_template_stream = str_replace(\"{%fieldset-\" . $element->get_mId() . \"%}\", $fieldset_parts[0], $this->_template_stream);\n $this->_template_stream = str_replace(\"{%/fieldset-\" . $element->get_mId() . \"%}\", $fieldset_parts[1], $this->_template_stream);\n\n if($element->get_mLegend() instanceof LegendElement)\n {\n $tag = \"{%legend-\" . $element->get_mId() . \"%}\";\n $this->_template_stream = str_replace($tag, $element->get_mLegend()->build(), $this->_template_stream);\n }\n }\n }\n }", "function &getFormGroupElementData()\r\n {\r\n $formModel =& $this->getForm();\r\n return $formModel->getGroupsHiarachy();\r\n }", "public function get_checkout_fields($fieldset = '')\n {\n }", "public function getFormFields();", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setFieldNameSuffix('type');\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('General Information')]);\n\n if ($this->getType()->getId()) {\n $fieldset->addField('type_id', 'hidden', ['name' => 'type_id']);\n }\n\n $fieldset->addField(\n 'code',\n 'text',\n ['name' => 'code', 'label' => __('Code'), 'required' => true, 'class' => 'validate-code']\n );\n\n $fieldset->addField(\n 'label',\n 'text',\n ['name' => 'label', 'label' => __('Label'), 'required' => true, 'scope' => 'store']\n );\n\n $fieldset->addField(\n 'sort_order',\n 'text',\n ['name' => 'sort_order', 'label' => __('Sort Order'), 'scope' => 'store']\n );\n\n $fieldset->addField(\n 'is_listed',\n 'select',\n [\n 'label' => __('Is Listed'),\n 'name' => 'is_listed',\n 'values' => $this->sourceYesNo->toOptionArray(),\n 'scope' => 'store'\n ]\n );\n\n $form->setValues($this->getType()->getData());\n $this->setForm($form);\n $form->setDataObject($this->getType());\n\n return parent::_prepareForm();\n }", "public function transaction_formGetVisibleFields () {\n }", "public function get_form_fields()\n {\n }", "function &getFormFields() {\n return $this->formFields;\n }", "function template_preprocess_fieldset(&$variables) {\n $element = $variables['element'];\n Element::setAttributes($element, ['id']);\n RenderElement::setAttributes($element);\n $variables['attributes'] = $element['#attributes'] ?? [];\n $variables['prefix'] = $element['#field_prefix'] ?? NULL;\n $variables['suffix'] = $element['#field_suffix'] ?? NULL;\n $variables['title_display'] = $element['#title_display'] ?? NULL;\n $variables['children'] = $element['#children'];\n $variables['required'] = !empty($element['#required']) ? $element['#required'] : NULL;\n\n if (isset($element['#title']) && $element['#title'] !== '') {\n $variables['legend']['title'] = ['#markup' => $element['#title']];\n }\n\n $variables['legend']['attributes'] = new Attribute();\n // Add 'visually-hidden' class to legend span.\n if ($variables['title_display'] == 'invisible') {\n $variables['legend_span']['attributes'] = new Attribute(['class' => ['visually-hidden']]);\n }\n else {\n $variables['legend_span']['attributes'] = new Attribute();\n }\n\n if (!empty($element['#description'])) {\n $description_id = $element['#attributes']['id'] . '--description';\n $description_attributes['id'] = $description_id;\n $variables['description_display'] = $element['#description_display'];\n if ($element['#description_display'] === 'invisible') {\n $description_attributes['class'][] = 'visually-hidden';\n }\n $description_attributes['data-drupal-field-elements'] = 'description';\n $variables['description']['attributes'] = new Attribute($description_attributes);\n $variables['description']['content'] = $element['#description'];\n\n // Add the description's id to the fieldset aria attributes.\n $variables['attributes']['aria-describedby'] = $description_id;\n }\n\n // Suppress error messages.\n $variables['errors'] = NULL;\n}", "function &getAsFields()\r\n {\r\n if (is_null( $this->fields )) {\r\n $this->fields = array();\r\n }\r\n if (is_null( $this->asfields )) {\r\n $this->asfields = array();\r\n }\r\n //test to load all fields\r\n $key = \"0\";\r\n\r\n if (array_key_exists( $key, $this->asfields )) {\r\n return $this->asfields[$key];\r\n }\r\n $this->asfields[$key] = array();\r\n $this->fields[$key] = array();\r\n\r\n $form \t\t\t=& $this->getForm();\r\n $table \t\t\t=& $this->getTable();\r\n $aJoinObjs \t=& $this->getJoins();\r\n $this->_temp_db_key_addded = false;\r\n $groups =& $form->getGroupsHiarachy();\r\n foreach ($groups as $groupModel) {\r\n $table_name = $table->db_table_name;\r\n $group =& $groupModel->getGroup();\r\n if ($group->is_join) {\r\n foreach ($aJoinObjs as $join) {\r\n //also ignore any joins that are elements\r\n if (array_key_exists( 'group_id', $join ) && $join->group_id == $group->id && $join->element_id == 0 ) {\r\n $table_name = $join->table_join;\r\n }\r\n }\r\n }\r\n $elementModels =& $groupModel->getPublishedElements();\r\n foreach ($elementModels as $elementModel) {\r\n $method = \"getAsField_\" . $this->_outPutFormat;\r\n if (!method_exists( $elementModel, $method )) {\r\n $method = \"getAsField_html\";\r\n }\r\n $elementModel->$method( $this->asfields[$key], $this->fields[$key], $table_name );\r\n }\r\n }\r\n //temporaraily add in the db key so that the edit links work, must remove it before final return\r\n //\tof getData();\r\n\r\n if (!$this->isView()) {\r\n if (!$this->_temp_db_key_addded && $table->db_primary_key != '') {\r\n $str = str_replace( '___', '.', $table->db_primary_key ) . \" AS \" . str_replace( '.', '___', $table->db_primary_key );\r\n //if we are quoting the primary key in the db then we need to remove these quotes\r\n $str = str_replace( '`___`', '___', $str );\r\n //$this->fields[$key][] = $str;\r\n $this->fields[$key][] = str_replace( '`.`', '___', $table->db_primary_key );\r\n $this->asfields[$key][] = $table->db_primary_key;\r\n }\r\n }\r\n //for raw data in packages\r\n\r\n if ($this->_outPutFormat == 'raw') {\r\n $str = str_replace( '___', '.', $table->db_primary_key ) . \" AS __pk_val\";\r\n $str = str_replace( '`___`', '___', $str );\r\n $this->fields[$key][] = $str;\r\n }\r\n\r\n //end\r\n\r\n $this->_group_by_added = false;\r\n //if the group by element isnt in the fields add it (otherwise group by wont work)\r\n if (is_array($this->fields) && array_key_exists($key, $this->fields) && is_array($this->fields[$key]) && !in_array( $table->group_by, $this->fields[$key] ) && trim( $table->group_by ) != '') {\r\n //test this - asfields as fields were the other way round but that doesnt make sense!\r\n $this->asfields[$key][] = str_replace( '___', '.', $table->group_by ) . \" AS `$table->group_by`\";\r\n $this->fields[$key] = $table->group_by;\r\n $this->_group_by_added = true;\r\n }\r\n return $this->asfields[$key];\r\n }", "protected function _prepareForm()\n {\n $job = $this->getJob();\n $form = new Varien_Data_Form(\n array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post'\n )\n );\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => $this->__('General')));\n $this->_addElementTypes($fieldset);\n\n $fieldset->addField(\n 'job_code',\n 'text',\n array(\n 'name' => 'job_code',\n 'label' => $this->__('Job code'),\n 'title' => $this->__('Job code'),\n 'class' => '',\n 'required' => true,\n 'disabled' => $job->getJobCode() ? true : false,\n )\n );\n\n $fieldset->addField(\n 'name',\n 'text',\n array(\n 'name' => 'name',\n 'label' => $this->__('Name'),\n 'title' => $this->__('Name'),\n 'class' => '',\n 'required' => false,\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'name'),\n )\n );\n\n $fieldset->addField(\n 'short_description',\n 'textarea',\n array(\n 'name' => 'short_description',\n 'label' => $this->__('Short description'),\n 'title' => $this->__('Short description'),\n 'class' => '',\n 'required' => false,\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'short_description'),\n )\n );\n\n $fieldset->addField(\n 'description',\n 'textarea',\n array(\n 'name' => 'description',\n 'label' => $this->__('Description'),\n 'title' => $this->__('Description'),\n 'class' => '',\n 'required' => false,\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'description'),\n )\n );\n\n $fieldset->addField(\n 'run_model',\n 'text',\n array(\n 'name' => 'run_model',\n 'label' => $this->__('Run model'),\n 'title' => $this->__('Run model'),\n 'class' => '',\n 'required' => true,\n 'note' => $this->__('e.g. \"aoe_scheduler/task_heartbeat::run\"'),\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'run/model'),\n )\n );\n\n $fieldset->addField(\n 'is_active',\n 'select',\n array(\n 'name' => 'is_active',\n 'label' => $this->__('Status'),\n 'title' => $this->__('Status'),\n 'required' => true,\n 'options' => array(\n 0 => $this->__('Disabled'),\n 1 => $this->__('Enabled')\n ),\n 'after_element_html' => $this->getOriginalValueSnippetFlag($job, 'is_active', 'Enabled', 'Disabled'),\n )\n );\n\n $fieldset = $form->addFieldset('cron_fieldset', array('legend' => $this->__('Scheduling')));\n $this->_addElementTypes($fieldset);\n\n $fieldset->addField(\n 'schedule_config_path',\n 'text',\n array(\n 'name' => 'schedule_config_path',\n 'label' => $this->__('Cron configuration path'),\n 'title' => $this->__('Cron configuration path'),\n 'class' => '',\n 'required' => false,\n 'note' => $this->__(\n 'Path to system configuration containing the cron configuration for this job. (e.g. system/cron/scheduler_cron_expr_heartbeat) This configuration - if set - has a higher priority over the cron expression configured with the job directly.'\n ),\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'schedule/config_path'),\n )\n );\n\n $fieldset->addField(\n 'schedule_cron_expr',\n 'text',\n array(\n 'name' => 'schedule_cron_expr',\n 'label' => $this->__('Cron expression'),\n 'title' => $this->__('Cron expression'),\n 'required' => false,\n 'note' => $this->__('e.g \"*/5 * * * *\" or \"always\"'),\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'schedule/cron_expr'),\n )\n );\n\n $fieldset = $form->addFieldset('parameter_fieldset', array('legend' => $this->__('Extras')));\n $this->_addElementTypes($fieldset);\n\n $fieldset->addField(\n 'parameters',\n 'textarea',\n array(\n 'name' => 'parameters',\n 'label' => $this->__('Parameters'),\n 'title' => $this->__('Parameters'),\n 'class' => 'textarea',\n 'required' => false,\n 'note' => $this->__('These parameters will be passed to the model. It is up to the model to specify the format of these parameters (e.g. json/xml/...'),\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'parameters'),\n )\n );\n\n $fieldset->addField(\n 'groups',\n 'textarea',\n array(\n 'name' => 'groups',\n 'label' => $this->__('Groups'),\n 'title' => $this->__('Groups'),\n 'class' => 'textarea',\n 'required' => false,\n 'note' => $this->__('Comma-separated list of groups (tags) that can be used with the include/exclude command line options of scheduler.php'),\n 'after_element_html' => $this->getOriginalValueSnippet($job, 'groups'),\n )\n );\n\n $fieldset = $form->addFieldset('dependency_fieldset', array('legend' => $this->__('Dependencies')));\n $this->_addElementTypes($fieldset);\n\n $fieldset->addField(\n 'on_success',\n 'textarea',\n array(\n 'name' => 'on_success',\n 'label' => $this->__('Run jobs on success'),\n 'title' => $this->__('Run jobs on success'),\n 'class' => 'textarea',\n 'required' => false,\n 'note' => $this->__('Comma-separated list of job codes that will be scheduled after the current cron job has completed successfully.')\n )\n );\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public static function closeFieldSet(){\n echo '</fieldset>';\n //echo '</div>';\n\n }", "public function getForm()\n {\n $cModField = ContentModuleField::curr();\n\n if ($cModField) {\n return $cModField->getForm();\n }\n\n return parent::getForm();\n }", "protected function lazy_get_form()\r\n\t{\r\n\t\t$form = parent::lazy_get_form();\r\n\r\n\t\tif ($form)\r\n\t\t{\r\n\t\t\treturn $form;\r\n\t\t}\r\n\r\n\t\t$block = $this->module->getBlock('edit', $this->key);\r\n\r\n\t\treturn $block->element;\r\n\t}", "public function get_definition() {\n require_once(__DIR__ . '/elements/hidden_form_element.php');\n require_once(__DIR__ . '/elements/text_form_element.php');\n require_once(__DIR__ . '/elements/selection_popup_form_element.php');\n require_once(__DIR__ . '/elements/select_form_element.php');\n require_once(__DIR__ . '/elements/checkbox_form_element.php');\n\n $isinlineonly = plugin_supports('mod', $this->object->cminfo->modname, FEATURE_NO_VIEW_LINK, false);\n $sectionidx = $this->object->section->dbrecord->section;\n $elements = [];\n\n // Course module id.\n $id = $this->object->id;\n $elements[] = new hidden_form_element('id', 'course-module-id', $id, 0);\n\n // Course module name.\n $elements[] = new text_form_element(\n 'name',\n 'course-module-title',\n $this->object->name,\n '',\n get_string('label-course-module-title', 'format_ludic'),\n ['required' => true]\n );\n\n\n // Course module skin id.\n\n if (!$isinlineonly) {\n $editinfo = $this->object->skin->get_edit_info();\n $elements[] = new selection_popup_form_element(\n 'skinid',\n 'course-module-skinid',\n $this->object->skinid,\n 0,\n get_string('label-skin-selection', 'format_ludic'),\n [],\n [\n 'icon' => (object)[ 'imgsrc' => $editinfo->imgsrc, 'imgalt' => '' ],\n 'itemid' => $id,\n 'itemcontroller' => 'skin',\n 'itemaction' => ($sectionidx == 0) ?\n 'get_course_module_skin_selector_section_zero'\n : 'get_course_module_skin_selector_main',\n 'popuptitle' => get_string('course-module-skin-selection', 'format_ludic'),\n 'skintitle' => $editinfo->title,\n 'skindescription' => $editinfo->description,\n ]\n );\n }else{\n $elements[] = new hidden_form_element('skinid', 'course-module-skinid', $this->object->skinid, 0);\n }\n\n // Course module weight.\n $elements[] = new text_form_element(\n 'weight',\n 'coursemodule-weight',\n $this->object->get_weight(),\n format_ludic_get_default_weight(),\n get_string('label-weight', 'format_ludic'),\n ['required' => true]\n );\n\n // Course module target min value (if there is one).\n $targetminid = $this->object->skin->get_targetmin_string_id();\n if ($targetminid) {\n $elements[] = new text_form_element(\n 'targetmin',\n 'coursemodule-target-min',\n $this->object->get_targetmin(),\n '',\n get_string($targetminid . '-title', 'format_ludic'),\n []\n );\n } else {\n $elements[] = new hidden_form_element('targetmin', 'coursemodule-target-min', $this->object->get_targetmin(), 0);\n }\n\n // Course module target max value (if there is one).\n $targetmaxid = $this->object->skin->get_targetmax_string_id();\n if ($targetmaxid) {\n $elements[] = new text_form_element(\n 'targetmax',\n 'coursemodule-target-max',\n $this->object->get_targetmax(),\n '',\n get_string($targetmaxid . '-title', 'format_ludic'),\n []\n );\n } else {\n $elements[] = new hidden_form_element('targetmax', 'coursemodule-target-max', $this->object->get_targetmax(), 0);\n }\n\n // Course module access.\n $elements[] = new checkbox_form_element(\n 'visible',\n 'coursemodule-visible',\n $this->object->visible,\n 1,\n get_string('label-section-visible', 'format_ludic'),\n []\n );\n\n // Course module section.\n $sections = $this->contexthelper->get_course()->get_sections(true);\n $options = [];\n foreach ($sections as $section) {\n $options[] = [\n 'value' => $section->id,\n 'name' => $section->name,\n ];\n }\n $elements[] = new select_form_element(\n 'section',\n 'coursemodule-section',\n $this->object->sectionid,\n null,\n get_string('label-move-section', 'format_ludic'),\n [],\n ['options' => $options]\n );\n\n return $elements;\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form();\n $this->setForm($form);\n\n if (Mage::getSingleton('adminhtml/session')->getShoppingcartruleData()) {\n $data = Mage::getSingleton('adminhtml/session')->getShoppingcartruleData();\n Mage::getSingleton('adminhtml/session')->setShoppingcartruleData(null);\n } elseif (Mage::registry('shoppingcartrule_data')) {\n $data = Mage::registry('shoppingcartrule_data')->getData();\n }\n $fieldset = $form->addFieldset('shoppingcartrule_form', array(\n 'legend' => Mage::helper('promotionalgift')->__('Rule information')\n ));\n\n $inStore = $this->getRequest()->getParam('store');\n $defaultLabel = Mage::helper('promotionalgift')->__('Use Default');\n $defaultTitle = Mage::helper('promotionalgift')->__('-- Please Select --');\n $scopeLabel = Mage::helper('promotionalgift')->__('STORE VIEW');\n\n $fieldset->addField('name', 'text', array(\n 'label' => Mage::helper('promotionalgift')->__('Rule Name'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'name',\n ));\n\n $fieldset->addField('description', 'textarea', array(\n 'name' => 'description',\n 'label' => Mage::helper('promotionalgift')->__('Description'),\n 'title' => Mage::helper('promotionalgift')->__('Description'),\n 'style' => 'width: 274px; height: 100px;',\n 'wysiwyg' => false,\n 'required' => true,\n ));\n\n $fieldset->addField('status', 'select', array(\n 'label' => Mage::helper('promotionalgift')->__('Status'),\n 'name' => 'status',\n 'values' => Mage::getSingleton('promotionalgift/status')->getOptionHash(),\n ));\n\n if (!Mage::app()->isSingleStoreMode()) {\n $fieldset->addField('website_ids', 'multiselect', array(\n 'name' => 'website_ids[]',\n 'label' => Mage::helper('promotionalgift')->__('Websites'),\n 'title' => Mage::helper('promotionalgift')->__('Websites'),\n 'required' => true,\n 'values' => Mage::getSingleton('adminhtml/system_config_source_website')->toOptionArray(),\n ));\n } else {\n $fieldset->addField('website_ids', 'hidden', array(\n 'name' => 'website_ids[]',\n 'value' => Mage::app()->getStore(true)->getWebsiteId()\n ));\n $data['website_ids'] = Mage::app()->getStore(true)->getWebsiteId();\n }\n\n $customerGroups = Mage::getResourceModel('customer/group_collection')\n ->load()->toOptionArray();\n $found = false;\n foreach ($customerGroups as $group) {\n if ($group['value'] == 0) {\n $found = true;\n }\n }\n if (!$found) {\n array_unshift($customerGroups, array('value' => 0, 'label' => Mage::helper('promotionalgift')->__('NOT LOGGED IN')));\n }\n\n $fieldset->addField('customer_group_ids', 'multiselect', array(\n 'name' => 'customer_group_ids[]',\n 'label' => Mage::helper('promotionalgift')->__('Customer Groups'),\n 'title' => Mage::helper('promotionalgift')->__('Customer Groups'),\n 'required' => true,\n 'values' => $customerGroups,\n ));\n\n $couponTypeFiled = $fieldset->addField('coupon_type', 'select', array(\n 'name' => 'coupon_type',\n 'label' => Mage::helper('promotionalgift')->__('Coupon Type'),\n 'title' => Mage::helper('promotionalgift')->__('Coupon Type'),\n 'required' => true,\n 'options' => Mage::getModel('salesrule/rule')->getCouponTypes(),\n // 'values' => array(\n // array(\n // 'value' => '0',\n // 'label' => Mage::helper('promotionalgift')->__('No Coupon'),\n // ),\n // array(\n // 'value' => '1',\n // 'label' => Mage::helper('promotionalgift')->__('Specific Coupon'),\n // ),\n // ),\n ));\n\n $couponCodeFiled = $fieldset->addField('coupon_code', 'text', array(\n 'name' => 'coupon_code',\n 'label' => Mage::helper('promotionalgift')->__('Coupon Code'),\n 'title' => Mage::helper('promotionalgift')->__('Coupon Code'),\n 'required' => true,\n 'note' => Mage::helper('promotionalgift')->__('Used to apply this rule')\n ));\n\n $usesPerCouponFiled = $fieldset->addField('uses_per_coupon', 'text', array(\n 'name' => 'uses_per_coupon',\n 'label' => Mage::helper('promotionalgift')->__('Usage Limit'),\n 'title' => Mage::helper('promotionalgift')->__('Usage Limit'),\n 'required' => false,\n 'note' => Mage::helper('promotionalgift')->__('Number of times that the rule is applied. If empty, there is no limitation.'),\n ));\n\n /* $fieldset->addField('time_used', 'text', array(\n 'label' => Mage::helper('promotionalgift')->__('Time Used'),\n //'class' => 'required-entry',\n //'required' => true,\n 'name' => 'time_used',\n )); */\n\n $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);\n $fieldset->addField('from_date', 'date', array(\n 'name' => 'from_date',\n 'label' => Mage::helper('promotionalgift')->__('Start Date'),\n 'title' => Mage::helper('promotionalgift')->__('Start Date'),\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'time' => false,\n 'format' => $dateFormatIso\n ));\n $fieldset->addField('to_date', 'date', array(\n 'name' => 'to_date',\n 'label' => Mage::helper('promotionalgift')->__('End Date'),\n 'title' => Mage::helper('promotionalgift')->__('End Date'),\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'time' => false,\n 'format' => $dateFormatIso\n ));\n\n $price_type = $fieldset->addField('price_type', 'select', array(\n 'label' => Mage::helper('promotionalgift')->__('Choose discount type'),\n 'name' => 'price_type',\n 'values' => array(\n '1' => 'Per Cent',\n '2' => 'Fixed'\n )\n ));\n $discount_product = $fieldset->addField('discount_product', 'text', array(\n 'label' => Mage::helper('promotionalgift')->__('Discount Percent of Gift Items'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'discount_product',\n ));\n $discount_product_fixed = $fieldset->addField('discount_product_fixed', 'text', array(\n 'label' => Mage::helper('promotionalgift')->__('Fixed amount discount of Gift Items'),\n 'class' => 'required-entry',\n 'required' => true,\n 'disabled' => true,\n 'name' => 'discount_product_fixed',\n ));\n $fieldset->addField('free_shipping', 'select', array(\n 'label' => Mage::helper('promotionalgift')->__('Free Shipping for Gift Items'),\n 'name' => 'free_shipping',\n 'values' => array(\n 1 => 'Yes',\n 0 => 'No',\n ),\n ));\n\n $gift_calendar = $fieldset->addField('gift_calendar', 'select', array(\n 'name' => 'gift_calendar',\n 'label' => Mage::helper('promotionalgift')->__('Promotion Event Calendar'),\n 'title' => Mage::helper('promotionalgift')->__('Promotion Event Calendar'),\n 'note' => Mage::helper('promotionalgift')->__('Auto-enable this promotion on selected time within the period set above (e.g. every Monday, Oct 1 - Oct 25).'),\n 'options' => array(\n 'all' => Mage::helper('promotionalgift')->__('All Days'),\n 'weekly' => Mage::helper('promotionalgift')->__('Day of week'),\n 'daily' => Mage::helper('promotionalgift')->__('Day of month'),\n 'monthly' => Mage::helper('promotionalgift')->__('Week of month'),\n 'yearly' => Mage::helper('promotionalgift')->__('Month of year'),\n )));\n\n //daily\n $daily = Mage::getModel('promotionalgift/freegiftcalendar')->getDaily();\n $dailyfield = $fieldset->addField('daily', 'multiselect', array(\n 'name' => 'daily[]',\n 'title' => Mage::helper('promotionalgift')->__('Day of month'),\n 'values' => $daily,\n ));\n //weekly\n $weekly = Mage::getModel('promotionalgift/freegiftcalendar')->getWeekly();\n $weeklyfield = $fieldset->addField('weekly', 'multiselect', array(\n 'name' => 'weekly[]',\n 'title' => Mage::helper('promotionalgift')->__('Day of week'),\n 'values' => $weekly,\n ));\n //monthly\n $monthly = Mage::getModel('promotionalgift/freegiftcalendar')->getMonthly();\n $monthlyfield = $fieldset->addField('monthly', 'multiselect', array(\n 'name' => 'monthly[]',\n 'title' => Mage::helper('promotionalgift')->__('Week of month'),\n 'values' => $monthly,\n ));\n //yearly\n $yearly = Mage::getModel('promotionalgift/freegiftcalendar')->getYearly();\n $yearlyfield = $fieldset->addField('yearly', 'multiselect', array(\n 'name' => 'yearly[]',\n 'title' => Mage::helper('promotionalgift')->__('Month of year'),\n 'values' => $yearly,\n ));\n $fieldset->addField('show_before_date', 'select', array(\n 'name' => 'show_before_date',\n 'label' => Mage::helper('promotionalgift')->__('Show Calendar in frontend before Start Date'),\n 'values' => array(\n '1' => 'Yes',\n '2' => 'No'\n )\n ));\n $fieldset->addField('priority', 'text', array(\n 'name' => 'priority',\n 'label' => Mage::helper('promotionalgift')->__('Priority'),\n 'note' => Mage::helper('promotionalgift')->__('The smaller the value, the higher the priority.'),\n ));\n\n $form->setValues($data);\n\n // field dependencies\n $this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')\n //depend coupon\n ->addFieldMap($couponTypeFiled->getHtmlId(), $couponTypeFiled->getName())\n ->addFieldMap($couponCodeFiled->getHtmlId(), $couponCodeFiled->getName())\n //depend price\n ->addFieldMap($price_type->getHtmlId(), $price_type->getName())\n ->addFieldMap($discount_product->getHtmlId(), $discount_product->getName())\n ->addFieldMap($discount_product_fixed->getHtmlId(), $discount_product_fixed->getName())\n //depend calendar\n ->addFieldMap($gift_calendar->getHtmlId(), $gift_calendar->getName())\n ->addFieldMap($dailyfield->getHtmlId(), $dailyfield->getName())\n ->addFieldMap($weeklyfield->getHtmlId(), $weeklyfield->getName())\n ->addFieldMap($monthlyfield->getHtmlId(), $monthlyfield->getName())\n ->addFieldMap($yearlyfield->getHtmlId(), $yearlyfield->getName())\n //->addFieldMap($usesPerCouponFiled->getHtmlId(), $usesPerCouponFiled->getName())\n ->addFieldDependence(\n $dailyfield->getName(),\n $gift_calendar->getName(),\n 'daily')\n ->addFieldDependence(\n $weeklyfield->getName(),\n $gift_calendar->getName(),\n 'weekly')\n ->addFieldDependence(\n $monthlyfield->getName(),\n $gift_calendar->getName(),\n 'monthly')\n ->addFieldDependence(\n $yearlyfield->getName(),\n $gift_calendar->getName(),\n 'yearly')\n //->addFieldMap($usesPerCouponFiled->getHtmlId(), $usesPerCouponFiled->getName())\n ->addFieldDependence(\n $couponCodeFiled->getName(),\n $couponTypeFiled->getName(),\n Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC)\n // ->addFieldDependence(\n // $usesPerCouponFiled->getName(),\n // $couponTypeFiled->getName(),\n // Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC)\n ->addFieldDependence(\n $discount_product->getName(),\n $price_type->getName(),\n '1')\n ->addFieldDependence(\n $discount_product_fixed->getName(),\n $price_type->getName(),\n '2')\n );\n\n return parent::_prepareForm();\n }", "protected function _prepareForm() {\r\n $form = new Varien_Data_Form ();\r\n $this->setForm ( $form );\r\n $fieldset = $form->addFieldset ( 'deliveryschedule_form', array ('legend' => Mage::helper ( 'deliveryschedule' )->__ ( 'Schedule Types' )) );\r\n \r\n $fieldset->addField ( 'monday', 'select', array ('label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Monday' ),'name' => 'monday','values' => array ( array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ('value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' )))) );\r\n $fieldset->addField ( 'tuesday', 'select', array ('label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Tuesday' ),'name' => 'tuesday','values' => array (array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ('value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' )))) );\r\n $fieldset->addField ( 'wednesday', 'select', array ('label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Wednesday' ),'name' => 'wednesday','values' => array (array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ('value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' )))) );\r\n $fieldset->addField ( 'thursday', 'select', array ( 'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Thursday' ),'name' => 'thursday','values' => array ( array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ( 'value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' ) )) ) );\r\n $fieldset->addField ( 'friday', 'select', array ( 'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Friday' ), 'name' => 'friday','values' => array (array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ('value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' )))) );\r\n $fieldset->addField ( 'saturday', 'select', array ('label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Saturday' ),'name' => 'saturday','values' => array (array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ('value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' )))) );\r\n $fieldset->addField ( 'sunday', 'select', array ('label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Sunday' ),'name' => 'sunday','values' => array (array ('value' => 1,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Enabled' )),array ('value' => 2,'label' => Mage::helper ( 'deliveryschedule' )->__ ( 'Disabled' )))\r\n ) );\r\n /**\r\n * check the deliveryscheduletypes_data session\r\n */\r\n if (Mage::getSingleton ( 'adminhtml/session' )->getDeliverydateData ()) {\r\n $form->setValues ( Mage::getSingleton ( 'adminhtml/session' )->getDeliverydateData () );\r\n Mage::getSingleton ( 'adminhtml/session' )->setDeliverydateData ( null );\r\n } if (Mage::registry ( 'deliveryscheduletypes_data' )) {\r\n $form->setValues ( Mage::registry ( 'deliveryscheduletypes_data' )->getData () );\r\n }\r\n /**\r\n * return _prepareForm ()\r\n */\r\n return parent::_prepareForm ();\r\n }", "private function get_form_definition()\n {\n // retrieve object describing definition file\n $rxml = $this->xml_to_object(file_get_contents($this->get_defn_file()));\n // get the binds compononent of xform\n $binds = $rxml->children [0]->children [1]->children;\n // get the body section of xform\n $tmp2 = $rxml->children [0]->children [1]->children [1]->children [0]->children;\n // container\n $xarray = array();\n foreach ($binds as $key => $val) {\n if ($val->name == 'bind') {\n $attributes = $val->attributes;\n $nodeset = $attributes ['nodeset'];\n $xarray [$nodeset] = array();\n $xarray [$nodeset] ['field_name'] = str_replace(\"/\", \"_\", substr($nodeset, 6));\n // set each attribute key and corresponding value\n foreach ($attributes as $k2 => $v2) {\n $xarray [$nodeset] [$k2] = $v2;\n }\n }\n }\n foreach ($tmp2 as $val) {\n $att = $val->attributes ['id'];\n $id = explode(\":\", $att);\n $nodeset = $id [0];\n $label = $id [1];\n $detail = $val->children [0]->content;\n // if its an option for select/select1\n if (substr($label, 0, 6) == 'option') {\n $xarray [$nodeset] ['option'] [substr($label, 6)] = $detail;\n } else {\n $xarray [$nodeset] [$label] = $detail;\n }\n }\n return $xarray;\n }", "protected function _prepareForm()\n {\n // Create a new form\n $form = new Varien_Data_Form(array(\n 'id' => 'view_form',\n 'method' => 'post',\n\t\t\t\t\t\t\t\t\t\t'enctype' => 'multipart/form-data'\n )\n );\n\n // Create a fieldset\n $fieldset = $form->addFieldset('reports_form', array(\n 'legend' => Mage::helper('reportsviewer')->__('General Information'),\n 'class' => 'fieldset-wide'\n )\n );\n\n // We retrieve the data from the registered data set in the controller\n if (Mage::registry('report_data'))\n {\n $data = Mage::registry('report_data')->getData();\n }\n\n // Field for the report_id of the report\n $fieldset->addField('report_id', 'text', array(\n 'label' => Mage::helper('reportsviewer')->__('Report #'),\n 'disabled' => true,\n 'name' => 'report_id'\n ));\n\n // Field for the error of the report\n $fieldset->addField('error', 'textarea', array(\n 'label' => Mage::helper('reportsviewer')->__('Error'),\n 'disabled' => true,\n 'name' => 'error'\n ));\n\n // Field for the trace of the report\n $fieldset->addField('trace', 'textarea', array(\n 'label' => Mage::helper('reportsviewer')->__('Trace'),\n 'disabled' => true,\n 'name' => 'trace'\n ));\n\n // Field for the URL\n $fieldset->addField('url', 'text', array(\n 'label' => Mage::helper('reportsviewer')->__('URL'),\n 'disabled' => true,\n 'name' => 'url'\n )\n );\n\n // Field for the skin\n $fieldset->addField('skin', 'text', array(\n 'label' => Mage::helper('reportsviewer')->__('Skin'),\n 'disabled' => true,\n 'name' => 'skin'\n )\n );\n\n // Field for the script_name\n $fieldset->addField('script_name', 'text', array(\n 'label' => Mage::helper('reportsviewer')->__('Script Name'),\n 'disabled' => true,\n 'name' => 'script_name'\n )\n );\n\n // Format the timestamp date to a viewable date\n $data['added'] = Mage::getModel('core/date')->date(null,$data['added']);\n\n // Field for the added date\n $fieldset->addField('added', 'text', array(\n 'label' => Mage::helper('reportsviewer')->__('Created At'),\n 'disabled' => true,\n 'name' => 'added'\n )\n );\n\n $form->setUseContainer(true);\n // We fill the form based on the retrieved data\n $form->setValues($data);\n $this->setForm($form);\n\t\t\n return parent::_prepareForm();\n }", "function getFormFields() {\n return $this->formFields;\n }", "function fieldsets($fieldsets) {\n\n if (is_array($fieldsets) and count($fieldsets) > 0) {\n foreach ($fieldsets as $key => $value) {\n $id = \"\";\n if (!Helpers\\Numeros::validarInt($value)) {\n $id = $key;\n $fieldset = new Selector('fieldset', ['id' => 'field' . ucwords($this->_id) . '-' . $key]);\n\n $legend = new Selector('legend');\n $legend->innerHTML($value);\n $fieldset->legend = $legend;\n\n } else {\n $id = $value;\n $fieldset = new Selector('fieldset', ['id' => $this->_id . '-' . $value]);\n }\n $this->_fieldsets[$id] = $fieldset;\n\n }\n\n }\n\n }", "protected function _prepareForm() {\n $id = $this->getRequest()->getParam('membership_id');\n\n $this->setEntityId($id);\n $data = $this->_prepareCollection();\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('membership_id' => $id)),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data',\n ));\n $form->setUseContainer(true);\n $this->setForm($form);\n $fieldset = $form->addFieldset('edit_form_fieldset', array(\n 'legend' => Mage::helper('mycloset_membership')->__('Membership plan information')\n ));\n $fieldset->addField('membership_id', 'hidden', array(\n 'label' => Mage::helper('mycloset_membership')->__('Plan Id'),\n 'class' => 'textbox',\n 'required' => false,\n 'name' => 'membership_id',\n ));\n $fieldset->addField('membership_type', 'text', array(\n 'label' => Mage::helper('mycloset_membership')->__('Plan name'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'membership_type',\n ));\n $fieldset->addField('membership_price', 'text', array(\n 'label' => Mage::helper('mycloset_membership')->__('Membership Price'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'membership_price',\n ));\n\n $form->setValues($data);\n return parent::_prepareForm();\n }", "function renderFieldset(\\stdClass &$fieldset, Form &$form, DataModel $model, $formType, $showHeader = true)\n\t{\n\t\tthrow new \\LogicException(sprintf('renderFieldset() method in AdminRenderer is deprecated'));\n }", "function _webform_help_fieldset($section) {\r\n switch ($section) {\r\n case 'admin/settings/webform#fieldset_description':\r\n return t('Fieldsets allow you to organize multiple fields into groups.');\r\n }\r\n}", "protected function _prepareForm()\n {\n parent::_prepareForm();\n\n $form = $this->getForm();\n $fieldset = $form->getElement('base_fieldset');\n $taxSchemes = $this->taxSchemes->toOptionArray();\n array_unshift($taxSchemes, ['value' => null, 'label' => 'Not Linked']);\n\n $fieldset->addField(\n 'tax_scheme_id',\n 'select',\n ['name' => 'tax_scheme_id', 'label' => __('Tax Scheme'), 'required' => false, 'values' => $taxSchemes]\n );\n\n $taxRateId = $this->_coreRegistry->registry(RegistryConstants::CURRENT_TAX_RATE_ID);\n\n try {\n if ($taxRateId) {\n $taxRateDataObject = $this->_taxRateRepository->get($taxRateId);\n }\n // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock\n } catch (NoSuchEntityException $e) {\n //tax rate not found//\n }\n\n $sessionFormValues = (array)$this->_coreRegistry->registry(RegistryConstants::CURRENT_TAX_RATE_FORM_DATA);\n $formData = isset($taxRateDataObject)\n ? $this->_taxRateConverter->createArrayFromServiceObject($taxRateDataObject)\n : [];\n $formData = array_merge($formData, $sessionFormValues);\n $form->setValues($formData);\n return $this;\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('export_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Export Category')]);\n\n $fieldset->addField(\n 'export',\n 'button',\n [\n 'name' => 'export',\n 'label' => __('Category'),\n 'title' => __('Category'),\n 'value' => 'Export csv file',\n 'class' => 'action-default',\n 'onclick' => \"setLocation('\" . $this->getUrl('sm_iecategory/export/exportCsv') . \"')\",\n ]\n );\n\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function close_fieldset($extra=''){\n return form_fieldset_close($extra);\n }", "public function close_fieldset($extra=''){\n return form_fieldset_close($extra);\n }", "public function fieldset_close(){\n return \"</fieldset>\";\n }", "public function getForm() {\r\n return $this->dbConn->queryFirstRow(\"SELECT `forms`.`id`, `forms`.`name` FROM `form_entries` LEFT OUTER JOIN `forms` ON `forms`.`id` = `form_entries`.`form_id` WHERE `form_entries`.`id` = \".intval($this->id));\r\n }", "public function getFormField()\n {\n throw new Exception(\n 'You must implemented getFormField() in your metadata field type.'\n );\n }", "function getCMSFields(){\t\n\t\t$fields = parent::GetCMSFields();\n\t\treturn $fields;\n\t\t}", "public function readForm()\n {\n if ($this->debugLevel > self::DEBUG_HIDE_STRUCTURE) {\n echo \"Entered readForm<br />\\n\";\n }\n\n //readPDF may have already extracted the structure\n if (count($this->Xrefs) < 1) {\n $this->extractStructure();\n }\n $formFields = $this->readFormFields();\n\n return $formFields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Define Placeholder:\n \n $placeholder = _t(__CLASS__ . '.DROPDOWNDEFAULT', '(default)');\n \n // Create Options Tab:\n \n $fields->findOrMakeTab('Root.Options', $this->fieldLabel('Options'));\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'StaffCategoryOptions',\n $this->fieldLabel('StaffCategory'),\n [\n DropdownField::create(\n 'MemberSummary',\n $this->fieldLabel('MemberSummary'),\n $this->getMemberSummaryOptions()\n )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder),\n CheckboxField::create(\n 'ShowContent',\n $this->fieldLabel('ShowContent')\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "protected function _prepareForm() {\n $form = new Varien_Data_Form();\n\n\n if (Mage::getSingleton('adminhtml/session')->getFormData()) {\n $data = Mage::getSingleton('adminhtml/session')->getFormData();\n Mage::getSingleton('adminhtml/session')->setFormData(null);\n } elseif (Mage::registry('vendor_data')) {\n $data = Mage::registry('vendor_data')->getData();\n }\n $fieldset = $form->addFieldset('retailerkittools_form', array(\n 'legend' => Mage::helper('retailerkittools')->__('Vendor Information')\n ));\n\n $dataObj = new Varien_Object($data);\n\n $data = $dataObj->getData();\n\n $fieldset->addField('vendor_name', 'text', array(\n 'name' => 'vendor_name',\n 'label' => Mage::helper('retailerkittools')->__('Name'),\n 'title' => Mage::helper('retailerkittools')->__('Name'),\n 'required' => true\n ));\n\n $fieldset->addField('vendor_email', 'text', array(\n 'name' => 'vendor_email',\n 'label' => Mage::helper('retailerkittools')->__('Email'),\n 'title' => Mage::helper('retailerkittools')->__('Email'),\n 'required' => true,\n 'class' => 'validate-email'\n ));\n\n $fieldset->addField('vendor_phone', 'text', array(\n 'name' => 'vendor_phone',\n 'label' => Mage::helper('retailerkittools')->__('Phone'),\n 'title' => Mage::helper('retailerkittools')->__('Phone'),\n 'required' => true\n ));\n\n $fieldset->addField('vendor_address', 'text', array(\n 'name' => 'vendor_address',\n 'label' => Mage::helper('retailerkittools')->__('Address'),\n 'title' => Mage::helper('retailerkittools')->__('Address'),\n 'required' => true\n ));\n\n $fieldset->addField('vendor_city', 'text', array(\n 'name' => 'vendor_city',\n 'label' => Mage::helper('retailerkittools')->__('City'),\n 'title' => Mage::helper('retailerkittools')->__('City'),\n 'required' => true\n ));\n\n // $fieldset->addField('vendor_country', 'text', array(\n // 'name' => 'vendor_country',\n // 'label' => Mage::helper('retailerkittools')->__('Country'),\n // 'title' => Mage::helper('retailerkittools')->__('Country'),\n // 'required' => true\n // ));\n\n $country = $fieldset->addField('vendor_country', 'select', array(\n 'name' => 'vendor_country',\n 'label' => Mage::helper('retailerkittools')->__('Country'),\n 'values' => Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(),\n 'class' => 'required-entry',\n 'required' => true,\n 'onchange' => 'getstate(this)',\n ));\n\n /** Add Ajax to the Country select box html output **/ \n\n\n $fieldset->addField('vendor_state', 'text', array(\n 'name' => 'vendor_state',\n 'required' => true,\n 'label' => $this->__('State'),\n 'values' => '--Please Select Country--',\n ));\n\n $countrycode = Mage::registry('vendor_data')->getData('vendor_country');\n $statearray = array();\n $states = array();\n if($countrycode){\n $statearray = Mage::getModel('directory/region_api')->items($countrycode);\n\n foreach ($statearray as $_state) {\n $states[$_state['region_id']] = array(\n 'label' => $_state['name'],\n 'value' => $_state['region_id']\n );\n }\n $fieldset->addField('vendor_state_id', 'select', array(\n 'name' => 'vendor_state_id',\n 'required' => true,\n 'label' => $this->__('State'),\n 'values' => $states\n ));\n }else{\n $fieldset->addField('vendor_state_id', 'select', array(\n 'name' => 'vendor_state_id',\n 'required' => true,\n 'label' => $this->__('State'),\n 'values' => $states\n ));\n }\n\n $fieldset->addField('vendor_zipcode', 'text', array(\n 'name' => 'vendor_zipcode',\n 'label' => Mage::helper('retailerkittools')->__('Zip/Postcode'),\n 'title' => Mage::helper('retailerkittools')->__('Zip/Postcode'),\n 'required' => true\n ));\n // $stateid = Mage::registry('vendor_data')->getData('vendor_state_id');\n $country->setAfterElementHtml(\"<script type=\\\"text/javascript\\\">\n function getstate(selectElement){\n var reloadurl = '\". $this->getUrl('adminhtml/retailerkittools_vendor/state') . \"country/' + selectElement.value;\n new Ajax.Request(reloadurl, {\n method: 'get',\n onComplete: function(transport){\n var response = transport.responseText; \n if(response == ''){\n $('vendor_state').up('tr').show();\n $('vendor_state').addClassName('required-entry'); \n $('vendor_state_id').up('tr').hide();\n $('vendor_state_id').removeClassName('required-entry');\n }else{\n $('vendor_state_id').update(response);\n $('vendor_state').up('tr').hide();\n $('vendor_state').removeClassName('required-entry');\n $('vendor_state_id').up('tr').show();\n $('vendor_state_id').addClassName('required-entry');\n $('vendor_state').value = '';\n } \n }\n });\n }\n window.onload = function(){\n var statearray = '\".json_encode($statearray) .\"';\n if(statearray.length > 2){\n $('vendor_state').up('tr').hide();\n $('vendor_state_id').up('tr').show();\n \n }else{\n $('vendor_state').up('tr').show();\n $('vendor_state_id').up('tr').hide();\n }\n }\n </script>\");\n // $fieldset->addField('vendor_state', 'text', array(\n // 'name' => 'vendor_state',\n // 'label' => Mage::helper('retailerkittools')->__('State'),\n // 'title' => Mage::helper('retailerkittools')->__('State'),\n // 'required' => true\n // ));\n\n $form->setValues($data);\n $this->setForm($form);\n return parent::_prepareForm();\n }", "protected function _getElements()\n\t{\n\t\treturn $this->_arrFormElements;\n\t}", "protected function _prepareLayout() {\n\t\t\tparent::_prepareLayout();\n\n\t\t\t$form = new Varien_Data_Form(array(\n\t\t\t\t'id'\t\t=> 'setupForm',\n \t\t\t'action'\t=> $this->getUrl('*/*/run'),\n \t\t\t'method'\t=> 'post',\n\t\t\t\t'enctype'\t=> 'multipart/form-data'\n\t\t\t));\n\n\t\t\t$fieldset = $form->addFieldset('info_fieldset', array(\n\t\t\t\t'legend'\t=> Mage::helper('magefontello')->__('General Information'),\n\t\t\t\t'comment'\t=> 'This tool lets you combine icon webfonts for your own project. With fontello you can: shrink glyph collections, minimizing font size merge symbols from several fonts into a single file access large sets of professional-grade open source icons Now it\\'s trivial to make a custom icon webfont, exactly for your needs. First, select the icons you like. Then update glyph codes (optional), and download your webfont bundle. We generate everything you need, ready for publishing on your website!'\n\t\t\t));\n\n\t\t\t$fieldset = $form->addFieldset('base_fieldset', array(\n\t\t\t\t'legend'\t=> Mage::helper('magefontello')->__('Fontello Configuration')\n\t\t\t));\n\n\t\t\t$isRequired = true;\n\t\t\t$note = Mage::helper('magefontello')->__('Please upload a valid config file!');\n\n\t\t\tif(file_exists(Mage::getBaseDir('media') . DS . 'magefontello' . DS . $this->currentStoreId . DS .'config.json')) {\n\t\t\t\t$isRequired = false;\n\t\t\t\t$note = Mage::helper('magefontello')->__('Current config file: %s', 'media' . DS . 'magefontello' . DS . $this->currentStoreId . DS . 'config.json');\n\t\t\t}\n\n\t\t\t$fieldset->addField('store_view', 'select', array(\n\t\t\t\t'label'\t\t=> Mage::helper('magefontello')->__('Store View'),\n\t\t\t\t'name'\t\t=> 'store_view',\n\t\t\t\t'required'\t=> true,\n\t\t\t\t'class'\t\t=> 'required-entry',\n\t\t\t\t'values'\t=> $this->_getOptionsForStoreViewSwitcher(),\n\t\t\t\t'value'\t\t=> $this->getUrl('*/*/*', array('current_store_id' => $this->currentStoreId)),\n\t\t\t\t'onchange'\t=> 'location.href=this.options[this.selectedIndex].value'\n\t\t\t));\n\n\t\t\t$fieldset->addField('store_id', 'hidden', array(\n\t\t\t\t'name'\t\t=> 'store_id',\n\t\t\t\t'value'\t\t=> $this->currentStoreId\n\t\t\t));\n\n\t\t\t$fieldset->addField('config', 'file', array(\n\t\t\t\t'label'\t\t=> Mage::helper('magefontello')->__('Config File'),\n\t\t\t\t'name'\t\t=> 'config',\n\t\t\t\t'note'\t\t=> $note,\n\t\t\t\t'required'\t=> $isRequired,\n\t\t\t\t'class'\t\t=> $isRequired ? 'required-entry' : ''\n\t\t\t));\n\n\t\t\t$form->setUseContainer(true);\n\t\t\t$form->setId('setupForm');\n\t\t\t$form->setAction($this->getUrl('*/*/run'));\n\t\t\t$this->setForm($form);\n\t\t}", "protected function getFormIntroductionFields()\n {\n return [\n (new Panel(__('Base page attributes'), $this->getBaseAttributeFields()))->withToolbar(),\n ];\n }", "function FieldHolder() {\n\t\t$this->columnCount = $this->ShowTitle ? 3 : 2;\n\t\treturn $this->getFieldHolderContent('Field');\n\t}", "public function getFormFields()\n {\n\n $modelInstance = $this->getModel();\n// $rules = collect($modelInstance->rules());\n\n\n $this->add('display_name', 'text')->add('name', 'text');\n\n if ($modelInstance->id) {\n $this->modify('name', 'text', [\n 'attr' => ['readonly' => true]\n ]);\n }\n $this->add('description', 'textarea');\n// $this->add('permission_group_id', 'text' );\n\n\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'TitleOptions',\n $this->fieldLabel('TitleOptions'),\n [\n CheckboxField::create(\n 'ShowTitle',\n $this->fieldLabel('ShowTitle')\n )\n ]\n ),\n FieldSection::create(\n 'SearchOptions',\n $this->fieldLabel('SearchOptions'),\n [\n DropdownField::create(\n 'ModeExpanded',\n $this->fieldLabel('ModeExpanded'),\n $this->getModeExpandedOptions()\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "private function _GetFields()\n\t\t{\n\t\t\treturn $this->_fields;\n\t\t}", "public function panel (\\stdClass $param)\n {\n $panel = new Fieldset( $this->safeToggle($param, 'title') );\n $content = $this->safeToggle($param, 'content');\n\n if ($content) {\n foreach ((array) $content as $elm) {\n\n # @todo verificar se cada um dos elementos informado eh do tipo ElementAbstract\n $panel->add($elm);\n }\n }\n\n return $panel;\n }", "public function getFormField() {\n\t\tuser_error(\"Please implement a getFormField() on your EditableFormClass \". $this->ClassName, E_USER_ERROR);\n\t}", "function form_fieldset($legend_text = '', $attributes = array())\n\t{\n\t\t$fieldset = '<fieldset'._attributes_to_string($attributes).\">\\n\";\n\t\tif ($legend_text !== '')\n\t\t{\n\t\t\treturn $fieldset.'<legend>'.$legend_text.\"</legend>\\n\";\n\t\t}\n\n\t\treturn $fieldset;\n\t}", "public function getFields()\r\n {\r\n $fields = [\r\n [\r\n 'name' => 'basic_information',\r\n 'type' => 'group',\r\n 'visible' => 'ce',\r\n 'tabs'=> [\r\n [\r\n 'name' => 'slider_information',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'id',\r\n 'type' => 'text',\r\n 'visible' => 'io',\r\n ],\r\n [\r\n 'name' => 'name',\r\n 'type' => 'text',\r\n 'visible' => 'ice',\r\n ],\r\n [\r\n 'name' => 'autoplay',\r\n 'type' => 'select',\r\n 'data' => ['1'=>trans('slider::panel.yes'),'0'=>trans('slider::panel.no')],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'autoplay_speed',\r\n 'type' => 'number',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'arrows',\r\n 'type' => 'select',\r\n 'data' => ['1'=>trans('slider::panel.yes'),'0'=>trans('slider::panel.no')],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'dots',\r\n 'type' => 'select',\r\n 'data' => ['1'=>trans('slider::panel.yes'),'0'=>trans('slider::panel.no')],\r\n 'visible' => 'ce',\r\n ],\r\n\r\n\r\n ]\r\n ]\r\n ]\r\n ]\r\n ];\r\n return $fields;}", "public function getFormElement()\n {\n \n }", "abstract protected function getFields();", "abstract protected function getFields();", "protected function _prepareForm()\n {\n $model = Mage::registry('psfaq_post');\n Mage::unregister('psfaq_post');\n\n /**\n * @var $helper Plumrocket_FAQ_Helper_Data\n */\n $helper = Mage::helper('psfaq');\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post',\n ));\n\n $fieldSet = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('checkout')->__('Post Information'),\n 'class' => 'fieldset-wide',\n ));\n\n if ($model->getId()) {\n $fieldSet->addField('post_id', 'hidden', array(\n 'name' => 'post_id',\n ));\n }\n\n $fieldSet->addField('title', 'text', array(\n 'name' => 'title',\n 'label' => $helper->__('Title'),\n 'title' => $helper->__('Title'),\n 'required' => true,\n ));\n\n $fieldSet->addField('status', 'select', array(\n 'name' => 'status',\n 'label' => $helper->__('Status'),\n 'title' => $helper->__('Status'),\n 'options' => $helper->getPostStatusOptions(),\n ));\n\n $fieldSet->addField('content', 'editor', array(\n 'name' => 'content',\n 'label' => $helper->__('Content'),\n 'title' => $helper->__('Content'),\n 'required' => true,\n 'wysiwyg' => true,\n 'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),\n ));\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function getCMSFields() {\n \t\t$fields = parent::getCMSFields();\n\t\t\n\t\t\n\t\treturn $fields;\t\t\n }", "function &getForm()\r\n {\r\n if (is_null( $this->_oForm )) {\r\n $this->_oForm =& JModel::getInstance( 'Form', 'FabrikModel' );\r\n $table =& $this->getTable();\r\n $this->_oForm->setId( $table->form_id );\r\n $this->_oForm->getForm();\r\n $this->_oForm->setTableModel( $this );\r\n //ensure joins are loaded\r\n }\r\n return $this->_oForm;\r\n }", "public function open_fieldset($legend_text, $attrs=array()){\n return form_fieldset($legend_text, $attrs);\n }", "public function open_fieldset($legend_text, $attrs=array()){\n return form_fieldset($legend_text, $attrs);\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n ));\n\n $fieldset = $form->addFieldset('import_general', array(\n 'legend' => Mage::helper('core')->__('Import Orders')\n ));\n\n $fieldset->addField('xml_file', 'file', array(\n 'label' => Mage::helper('core')->__('XML file'),\n 'name' => 'xml_file',\n 'value' => 'Upload',\n 'disabled' => false,\n 'required' => true,\n ));\n\n\n $fieldset = $form->addFieldset('import_additional', array(\n 'legend' => Mage::helper('core')->__('Additional Settings')\n ));\n\n $fieldset->addField('import_invoice', 'select', array(\n 'name' => 'import_invoice',\n 'label' => Mage::helper('orderexport2')->__('Import Invoice'),\n 'title' => Mage::helper('orderexport2')->__('Import Invoice'),\n 'required' => true,\n 'value' => 1,\n 'options' => array(\n '1' => Mage::helper('orderexport2')->__('Yes'),\n '0' => Mage::helper('orderexport2')->__('No'),\n ),\n ));\n\n $fieldset->addField('import_creditmemo', 'select', array(\n 'name' => 'import_creditmemo',\n 'label' => Mage::helper('orderexport2')->__('Import Credit Memo'),\n 'title' => Mage::helper('orderexport2')->__('Import Credit Memo'),\n 'required' => true,\n 'value' => 1,\n 'options' => array(\n '1' => Mage::helper('orderexport2')->__('Yes'),\n '0' => Mage::helper('orderexport2')->__('No'),\n ),\n ));\n\n $fieldset->addField('import_shipment', 'select', array(\n 'name' => 'import_shipment',\n 'label' => Mage::helper('orderexport2')->__('Import Shipment'),\n 'title' => Mage::helper('orderexport2')->__('Import Shipment'),\n 'required' => true,\n 'value' => 1,\n 'options' => array(\n '1' => Mage::helper('orderexport2')->__('Yes'),\n '0' => Mage::helper('orderexport2')->__('No'),\n ),\n ));\n \n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "protected function _prepareForm()\n {\n $model = $this->getModel();\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n ));\n\n // SETUP FIELDSETS\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('rsuess_cmsimport')->__('Server Information'),\n 'class' => 'fieldset-wide'\n ));\n\n \n\n if ($model->getServerId()) {\n $fieldset->addField('server_id', 'hidden', array(\n 'name' => 'server_id',\n 'value' => $model->getServerId(),\n ));\n }\n\n $fieldset->addField('is_active', 'select', array(\n 'name' => 'is_active',\n 'label' => Mage::helper('rsuess_cmsimport')->__('Status'),\n 'title' => Mage::helper('rsuess_cmsimport')->__('Status'),\n 'required' => true,\n 'value' => $model->getIsActive(),\n 'options' => array(1 => 'Active', 0 => 'Inactive')\n ));\n\n $fieldset->addField('server_name', 'text', array(\n 'name' => 'server_name',\n 'label' => Mage::helper('rsuess_cmsimport')->__('Server Name'),\n 'title' => Mage::helper('rsuess_cmsimport')->__('Server Name'),\n 'required' => true,\n 'value' => $model->getServerName(),\n ));\n\n $fieldset->addField('api_url', 'text', array(\n 'name' => 'api_url',\n 'label' => Mage::helper('rsuess_cmsimport')->__('Server Url'),\n 'title' => Mage::helper('rsuess_cmsimport')->__('Server Url'),\n 'required' => true,\n 'value' => $model->getApiUrl(),\n ));\n\n $fieldset->addField('api_user', 'text', array(\n 'name' => 'api_user',\n 'label' => Mage::helper('rsuess_cmsimport')->__('API User'),\n 'title' => Mage::helper('rsuess_cmsimport')->__('API User'),\n 'required' => true,\n 'value' => $model->getApiUser(),\n ));\n \n \n\n $fieldset->addField('api_key', 'text', array(\n 'name' => 'api_key',\n 'label' => Mage::helper('rsuess_cmsimport')->__('API Key'),\n 'title' => Mage::helper('rsuess_cmsimport')->__('API Key'),\n 'required' => true,\n 'value' => $model->getApiKey(),\n )); \n \n\n \n\n \n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function getSetupForm() {\n\n $form = new CMS_Form_SubForm;\n\n\n return $form;\n }", "function getFields ()\n {\n \treturn $this->fields ;\n }", "function _prepareForm() {\n\t\t\tparent::_prepareForm( );\n\t\t\t$helper = $this->getWarehouseHelper( );\n\t\t\t$model = $this->getModel( );\n\t\t\t$isElementDisabled = ($this->isSaveAllowed( ) ? false : true);\n\t\t\t$fieldset = $this->getFieldset( );\n\t\t\t$currenciesElement = $fieldset->addField( 'currencies', 'text', array( 'name' => 'currencies', 'label' => $helper->__( 'Currencies' ), 'title' => $helper->__( 'Currencies' ), 'required' => false, 'value' => $model->getCurrencies( ) ) );\n\t\t\t$currenciesElement->setRenderer( $this->getLayout( )->createBlock( 'warehouse/adminhtml_warehouse_edit_tab_currency_renderer' ) );\n\t\t\t$this->dispatchPrepareFormEvent( );\n\t\t\treturn $this;\n\t\t}", "public function get_instance_form_fields()\n {\n }", "function fieldset($fieldname, $value)\r\n {\r\n \tif ($this->_rs!=null)\r\n {\r\n \tif ($this->Active)\r\n {\r\n \tif ((is_array(($this->_rs->fields))) && (array_key_exists($fieldname,$this->_rs->fields)))\r\n {\r\n \t$this->fieldbuffer[$fieldname]=$value;\r\n $this->Modified=true;\r\n if ($this->State==dsBrowse)\r\n {\r\n \t$this->State=dsEdit;\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n\t\tthrow new EPropertyNotFound($this->ClassName().'->'.$fieldname);\r\n }", "public function get_instance_form_fields()\n {\n }", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$this->title(\n\t\t\t$this->_object->id\n\t\t\t\t? Core::_('Chartaccount_Correct_Entry.edit_title')\n\t\t\t\t: Core::_('Chartaccount_Correct_Entry.add_title')\n\t\t);\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$oMainTab\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$oAdditionalTab\n\t\t\t->delete($this->getField('debit'))\n\t\t\t->delete($this->getField('credit'));\n\n\t\t$aOptions = Chartaccount_Controller::getOptions();\n\n\t\t$oDebitSelect = Admin_Form_Entity::factory('Select')\n\t\t\t->caption(Core::_('Chartaccount_Correct_Entry.debit'))\n\t\t\t->class('form-control input-lg')\n\t\t\t->options($aOptions)\n\t\t\t->name('debit')\n\t\t\t->value($this->_object->debit)\n\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-sm-6'));\n\n\t\t$oMainRow1->add($oDebitSelect);\n\n\t\t$oCreditSelect = Admin_Form_Entity::factory('Select')\n\t\t\t->caption(Core::_('Chartaccount_Correct_Entry.credit'))\n\t\t\t->class('form-control input-lg')\n\t\t\t->options($aOptions)\n\t\t\t->name('credit')\n\t\t\t->value($this->_object->credit)\n\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-sm-6'));\n\n\t\t$oMainRow1->add($oCreditSelect);\n\n\t\treturn $this;\n\t}", "public function fieldset ($value, $fullRecord = null) {\n\t\t$fieldset = array();\n\t\t$fieldset[\"value\"] = $value;\n\t\t$fieldset[\"label\"] = $this->description;\n\t\t// prepare replTable from fullRecord for use by strtr()\n\t\tif ( is_array($fullRecord) ) {\n\t\t\t$replTable = array();\n\t\t\tforeach ($fullRecord as $other_field => $other_value) {\n\t\t\t\t$replTable['%%'.$other_field.'%%'] = $other_value;\n\t\t\t}\n\t\t}\n\t\t// mark if this is the record name (used e.g. as dialog title)\n\t\tif ($this->name == $this->T->defName) {\n\t\t\t$fieldset[\"isName\"] = true;\n\t\t}\n\t\t// handle whether PRIMARY KEY, FOREIGN KEY or regular column\n\t\tif ($this->name == $this->T->priKey) {\n\t\t\t$fieldset[\"type\"] = \"readonly\";\n\t\t\t$fieldset[\"size\"] = 5;\n\t\t} elseif (isset($this->foreign_key)) {\n\t\t\tif ($this->T->allowEdit) {\n\t\t\t\t$fieldset[\"type\"] = \"select\";\n\t\t\t\t$query =\t'SELECT '.$this->foreign_key.' AS fkey, '.\n\t\t\t\t\t\t$this->D->T($this->foreign_table)->defName.' AS fvalue '.\n\t\t\t\t\t\t' FROM '.$this->foreign_table.\n\t\t\t\t\t\t( isset($this->foreign_select_condition) // use condition, if exits\n\t\t\t\t\t\t? ' WHERE ('. ( is_array($fullRecord) // apply replacement, if given\n\t\t\t\t\t\t? strtr($this->foreign_select_condition, $replTable)\n\t\t\t\t\t\t: $this->foreign_select_condition ).\n\t\t\t\t\t\t') OR ( '.$this->foreign_key.' = '.$this->D->quote($value).' )' : '' ).\n\t\t\t\t\t\t' ORDER BY fvalue';\n\t\t\t\t$fkl = $this->D->query($query);\n\t\t\t\tif ($fkl == false) {\t\t// record not found *** CHECK THIS ***\n\t\t\t\t\t$this->D->error(\"record $key not found\",404);\n\t\t\t\t}\n\t\t\t\tif ($this->is_nullable) {\n\t\t\t\t\t$fieldset[\"options\"][] = array(null, '[not assigned]');\n\t\t\t\t}\n\t\t\t\tforeach ($fkl as $entry) {\n\t\t\t\t\t$fieldset[\"options\"][] = array($entry['fkey'], $entry['fvalue']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$fieldset[\"type\"] = \"readonly\";\n\t\t\t\t$fkValue = $this->D->query('SELECT '.$this->D->T($this->foreign_table)->defName.' FROM '.\n\t\t\t\t\t$this->foreign_table.' WHERE ('.$this->foreign_key.' = '.$this->D->quote($value).' )')\n\t\t\t\t\t->fetchColumn();\n\t\t\t\t$fieldset[\"foreign_value\"] = $fkValue;\n\t\t\t\t$fieldset[\"size\"] = ( strlen($fkValue) > $this->D->conf(\"maxinputsize\") ? $this->D->conf(\"maxinputsize\") : strlen($fkValue) );\n\t\t\t}\n\t\t\t// pass info needed for edit/related button\n\t\t\t$fieldset[\"foreign_table\"] = $this->foreign_table;\n\t\t\t$fieldset[\"foreign_key\"] = $this->foreign_key;\n\t\t} else {\n\t\t\t$fieldset[\"type\"] = ( $this->T->allowEdit ? $this->fe_type : 'readonly' );\n\t\t\t$fieldset[\"size\"] = $this->fe_size;\n\t\t\t$fieldset[\"placeholder\"] = $this->placeholder;\n\t\t\t$fieldset[\"options\"] = $this->choices;\n\t\t} // if\n\t\treturn($fieldset);\n\t}", "function initData() {\n\t\t$this->_metadataFormImplem->initData($this->submission);\n\t\treturn parent::initData();\n\t}", "public function getForm()\n {\n $form = $this->getFormDefination();\n if($this->data){\n $form->populate($this->data);\n }\n $count = $this->countElement($this->element->getClassName());\n return $form;\n }" ]
[ "0.65303224", "0.6390399", "0.6336714", "0.62990755", "0.6286167", "0.62735575", "0.627331", "0.6267038", "0.6157846", "0.61358553", "0.60495394", "0.60112065", "0.6001162", "0.5896892", "0.58804923", "0.5871192", "0.5867787", "0.5844958", "0.583637", "0.5832287", "0.58176327", "0.58154947", "0.58071053", "0.5776159", "0.57562673", "0.5737485", "0.5725615", "0.57253784", "0.5718497", "0.5705288", "0.56947774", "0.5671005", "0.56661534", "0.5644205", "0.560503", "0.56023437", "0.5598789", "0.55978096", "0.55822736", "0.5576885", "0.557681", "0.5560357", "0.5551108", "0.5544138", "0.5532969", "0.5522825", "0.54996175", "0.5489944", "0.5486979", "0.5471416", "0.5461946", "0.54395276", "0.5410612", "0.540412", "0.5389412", "0.5389001", "0.538761", "0.5386322", "0.5386121", "0.53554404", "0.53554034", "0.53554034", "0.5354896", "0.53542256", "0.53540045", "0.53372633", "0.5336985", "0.532725", "0.5320235", "0.5317476", "0.531606", "0.53109634", "0.53041726", "0.529964", "0.5293812", "0.5287926", "0.528541", "0.5283483", "0.5283196", "0.52763814", "0.5274542", "0.5267906", "0.5267906", "0.5260887", "0.5258739", "0.5258499", "0.52395314", "0.52395314", "0.52355546", "0.52354187", "0.5232843", "0.52316177", "0.52285194", "0.5219785", "0.5218339", "0.5217718", "0.52170694", "0.5216949", "0.52050275", "0.5199977" ]
0.74459875
0
Sort array of entities in ascending order based on the given property
Сортировать массив сущностей в порядке возрастания по заданному свойству
private function sortAscending(array &$entities, string $property): void { usort($entities, function($entityA, $entityB) use ($property) { return $entityA->{$property} <=> $entityB->{$property}; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_sort_by_property($array, $key) {\n if(empty ($array)) return $array;\n\n $final_sorted_array = array();\n $key_array = array();\n\n for ($i = 0 ; $i < count($array) ; $i++) {\n $key_array[$i] = $array[$i]->{$key};\n }\n asort($key_array);\n\n foreach ($key_array as $key_num => $value) {\n array_push($final_sorted_array, $array[ $key_num] );\n }\n return $final_sorted_array;\n }", "function arraySortProperty(&$array, $property, $sort = SORT_ASC){\n if(!$array || !is_array($array)) return array();\n $map = arrayMapProperty($array, $property);\n array_multisort($map, $sort, $array);\n}", "public function sortBy($array, $property)\n {\n usort($array, function ($valueA, $valueB) use ($property) {\n $valueAl = strtolower($valueA->$property);\n $valueBl = strtolower($valueB->$property);\n\n if ($valueAl == $valueBl) {\n return 0;\n }\n\n return ($valueAl > $valueBl) ? +1 : -1;\n });\n\n return $array;\n }", "public function addOrdering($property, $isAscending = true);", "public function sort(array $entities, string $property, ?string $dir): array\n {\n if (is_null($dir) || $dir === 'asc') {\n $this->sortAscending($entities, $property);\n } else if ($dir === 'desc') {\n $this->sortDescending($entities, $property);\n }\n\n return $entities;\n }", "public function sortArrayOfArrayByKey($array, $property, $order = \"desc\", $cmp = \"numeric\")\n\t{\n\t\tuasort($array, function ($a, $b) use ($property, $order, $cmp) {\n\n\t\t\t$dateElements = array(\"created_time\");\n\n\t\t\tif (is_array($a)) {\n\t\t\t\t$a_val = $a[$property];\n\t\t\t\t$b_val = $b[$property];\n\t\t\t} else {\n\t\t\t\t$a_val = $a->$property;\n\t\t\t\t$b_val = $b->$property;\n\t\t\t}\n\n\t\t\tif ($cmp == \"numeric\") {\n\t\t\t\tif ($order == \"asc\") {\n\t\t\t\t\treturn $a_val < $b_val;\n\t\t\t\t} elseif ($order == \"desc\") {\n\t\t\t\t\treturn $b_val > $a_val;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif ($order == \"asc\") {\n\t\t\t\t\treturn strcmp($a_val, $b_val);\n\t\t\t\t} elseif ($order == \"desc\") {\n\t\t\t\t\treturn strcmp($b_val, $a_val);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\n\t\treturn $array;\n\t}", "public static function orderByProperty(array $objects, $property)\n {\n if (empty($objects) || !is_array($objects)) {\n return $objects;\n }\n\n $cur = 1;\n $stack[1]['l'] = 0;\n $stack[1]['r'] = count($objects) - 1;\n\n do {\n $l = $stack[$cur]['l'];\n $r = $stack[$cur]['r'];\n $cur--;\n\n do {\n $i = $l;\n $j = $r;\n $tmp = $objects[(int)(($l + $r) / 2)];\n\n // Partition the array in two parts.\n // Left from $tmp are with smaller values,\n // Right from $tmp are with bigger ones\n do {\n while ($objects[$i]->{$property} < $tmp->{$property}) {\n $i++;\n }\n\n while ($tmp->{$property} < $objects[$j]->{$property}) {\n $j--;\n }\n\n // Swap elements from the two sides\n if ($i <= $j) {\n $w = $objects[$i];\n $objects[$i] = $objects[$j];\n $objects[$j] = $w;\n\n $i++;\n $j--;\n }\n } while ($i <= $j);\n\n if ($i < $r) {\n $cur++;\n $stack[$cur]['l'] = $i;\n $stack[$cur]['r'] = $r;\n }\n $r = $j;\n } while ($l < $r);\n } while ($cur != 0);\n\n return $objects;\n }", "public abstract function gdoSortObjects();", "public static function sortDataBy($field,$order=\"ASC\",array &$arrayOfObjectVO){\n \tself::$sortField = $field;\n \tusort($arrayOfObjectVO,array(\"\\zion\\orm\\ObjectVO\",\"sortString\"));\n \t\n \tif($order == \"DESC\"){\n \t\t$arrayOfObjectVO = array_reverse($arrayOfObjectVO);\n \t}\n }", "public function sortByValue();", "private function sortDescending(array &$entities, string $property): void\n {\n usort($entities, function($entityA, $entityB) use ($property) {\n return $entityB->{$property} <=> $entityA->{$property};\n });\n }", "public function asort() {}", "function ascending_sort(DatastoreClient $datastore)\n{\n // [START ascending_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->order('created');\n // [END ascending_sort]\n return $query;\n}", "abstract public function getOrderByAsc() ;", "public function getOrderBy();", "public function getOrderBy();", "function OrderBy();", "public function sortByField(array $objects, $field)\n {\n $acc = PropertyAccess::createPropertyAccessor();\n usort($objects, function ($a, $b) use ($acc, $field) {\n $av = $acc->getValue($a, $field);\n $bv = $acc->getValue($b, $field);\n return ($av == $bv) ? 0 : ($av < $bv ? -1 : 1);\n });\n return $objects;\n }", "function sortBy($field, &$array)\n {\n usort($array, create_function('$a, $b', '\n $a = $a[\"' . $field . '\"];\n $b = $b[\"' . $field . '\"];\n\n if($a==\"servicio\" && $b == \"servicio\" || $a==\"dependencia\" && $b == \"servicio\" )\n {\n return 0;\n }\n elseif ($a==\"servicio\" && $b == \"dependencia\" )\n {\n return 1;\n }\n else\n return -1;\n '));\n\n return true;\n }", "public function expressionSort()\n {\n foreach ($this->query->expressions() as $attribute => $realAttribute) {\n $this->sort['attributes'][$attribute] = [\n 'asc' => [$realAttribute => SORT_ASC],\n 'desc' => [$realAttribute => SORT_DESC]\n ];\n }\n }", "protected function _sort() {}", "function findAllBySorted(array $attributes, $sort = 'id', $dir = 'asc');", "public function sortBy($property)\n {\n // make sure that the api supports sorting for this kind of object\n if(property_exists($this->schema->links['instances']->properties,\"sort_by\"))\n {\n // make sure that we have a valid property\n if(in_array($property,$this->schema->links['instances']->properties->sort_by->enum))\n {\n $this->sort_by = $property;\n return $this;\n }\n else\n {\n throw new SaleskingException(\"SORTBY_INVALIDPROPERTY\",\"Invalid property for sorting\");\n }\n }\n else\n {\n throw new SaleskingException(\"SORTBY_CANNOTSORT\",\"object type doesnt support sorting\");\n }\n }", "function sort_on_field(&$objects, $on, $order = 'ASC') {\n $comparer = ($order === 'DESC')\n ? \"return -strcmp(\\$a->{$on},\\$b->{$on});\"\n : \"return strcmp(\\$a->{$on},\\$b->{$on});\";\n usort($objects, create_function('$a,$b', $comparer));\n }", "function orderBy($team_data, $field)\n {\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($team_data, create_function('$a,$b', $code));\n return $team_data;\n }", "function orderBy($team_data, $field)\n {\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($team_data, create_function('$a,$b', $code));\n return $team_data;\n }", "public function providesOrderBySingleFieldAsc()\n {\n return [\n 'default' => [\n 'default',\n 'sort=name asc'\n ],\n 'json api' => [\n 'json_api',\n 'sort=name'\n ],\n 'odata' => [\n 'odata',\n '$orderby=name asc'\n ],\n ];\n }", "function array_sort_by_field(&$array, $field = 0, $order = \"ASC\") {\n $oper = ($order == \"ASC\") ? \">\" : \"<\";\n if (!is_array($array)) {\n return;\n }\n usort($array, create_function('$a,$b', \"return (\\$a['$field'] $oper \\$b['$field']);\"));\n reset($array);\n}", "function sortBook(&$arr, $prop)\n{\n for ($i = 1; $i < count($arr); $i++) {\n\n // getting value for back element\n $j = ($i - 1);\n\n //saving it in temperary variable;\n $temp = $arr[$i];\n\n //looping to sort using swap\n while ($j >= 0 && $arr[$j]->{$prop} >= $temp->{$prop}) {\n\n $arr[$j + 1] = $arr[$j];\n $j--; //decrementing j value by 1\n }\n $arr[$j + 1] = $temp; // copying from temp to arary\n }\n}", "public function sort() {\n usort($this->records, function($a, $b) {\n return $a->sortorder - $b->sortorder; \n });\n }", "function multi_sort(DatastoreClient $datastore)\n{\n // [START multi_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->order('priority', Query::ORDER_DESCENDING)\n ->order('created');\n // [END multi_sort]\n return $query;\n}", "function orderBy(&$data, $field)\n{\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($data, create_function('$a,$b', $code));\n}", "public static function object_order($aObj, $property) {\n\t\t$cursor = 1;\n\t\t$comparison = 1;\n\t\twhile ($cursor <= count($aObj)) {\n\t\t\tif ($aObj[$comparison]->$property > $aObj[$comparison-1]->$property) {\n\t\t\t\t//If property of the higher object is less than lower one swap\n\t\t\t\t$temp = $aObj[$comparison-1];\n\t\t\t\t$aObj[$comparison-1] = $aObj[$comparison];\n\t\t\t\t$aObj[$comparison] = $temp;\n\n\n\n\t\t\t\t//Compare two below next cycle\n\t\t\t\t$comparison--;\n\t\t\t} else {\n\t\t\t\t//If not, increase the cursor and begin comparing again\n\t\t\t\t$cursor++;\n\t\t\t\t$comparison = $cursor;\n\t\t\t}\n\n\t\t\t//If we have reached the last item to be compared increase the cursor\n\t\t\tif ($comparison == 0) {\n\t\t\t\t$cursor++;\n\t\t\t\t$comparison = $cursor;\n\t\t\t}\n\n\t\t}\n\t\treturn $aObj;\n\t}", "function findAllSorted($sort = 'id', $dir = 'asc');", "public function sort();", "public function sort();", "public function doSort();", "public function sorting($key=null);", "public function getSortBy();", "public static function asc($array, $field, $type = null)\n\t{\n\t return self::by($array, $field, null, $type);\n\t}", "protected function recalculateSortingProperty($property, $repository)\n {\n $accessor = PropertyAccess::createPropertyAccessor();\n\n // Get all objects, preserve order where possible\n $allEntities = $repository->findBy(array(), array($property => 'ASC'));\n\n // Replace position value with distinct ascending number\n $i = 0;\n foreach($allEntities as $resource) {\n $accessor->setValue(\n $resource,\n $property,\n $i++\n );\n }\n\n $this->em->flush();\n }", "public function orderBy($data, $field){\n\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($data, create_function('$a,$b', $code));\n return $data;\n\n }", "public function sort_by_properties(array $properites) {\n return $this->sort(function ($a, $b) use ($properites) {\n foreach ($properites as $property => $direction) {\n $a_value = $this->pluck_property($a, $property);\n $b_value = $this->pluck_property($b, $property);\n\n $ordering = Crankshaft::compare($a_value, $b_value);\n if ($ordering !== 0) {\n return $direction * $ordering;\n }\n }\n return 0;\n });\n }", "protected function processRelationOrderBy($entities) {\n if($this->orderBy && strpos($this->orderBy, '.') !== FALSE) {\n $orderBy = $this->preProcessOrderBy();\n foreach ($entities as $key => $value) {\n $value = array_make_plain_with_dots($value);\n foreach ($orderBy as $ok => $ov) {\n if (array_key_exists($ok, $value)) {\n $entities[$key][$ok] = $value[$ok];\n }\n }\n }\n foreach ($orderBy as $ok => $ov) {\n if ($ov === -1) {\n $entities = array_sort($entities, $ok, SORT_DESC);\n }\n if ($ov === 1) {\n $entities = array_sort($entities, $ok, SORT_ASC);\n }\n }\n foreach ($entities as &$e) {\n foreach ($orderBy as $ok => $ov) {\n unset($e[$ok]);\n }\n }\n }\n\n return $entities;\n }", "function array_orderby() {\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp = array();\n foreach ($data as $key => $row)\n $tmp[$key] = $row[$field];\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n}", "function array_orderby(){\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp = array();\n foreach ($data as $key => $row)\n $tmp[$key] = $row[$field];\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n}", "function array_orderby() {\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp = array();\n foreach ($data as $key => $row)\n $tmp[$key] = $row[$field];\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n}", "function testSortProperty()\n {\n $dataobject = new TestDataObject();\n $dataobject->fb_linkOrderFields = array('num');\n $this->datasource->bind($dataobject);\n $this->datasource->fetch();\n $this->assertEquals('ORDER BY num',\n trim($dataobject->lastQuery['order_by']));\n\n // Testing that sort() overrides sort property (see bug #12942)\n $dataobject = new TestDataObject();\n $dataobject->fb_linkOrderFields = array('the_str');\n $this->datasource->bind($dataobject);\n $this->datasource->sort('the_str');\n $this->datasource->fetch();\n // With bug #12942 the following equaled to 'ORDER BY \"the_str\", the_str'\n $this->assertEquals('ORDER BY \"the_str\"',\n trim($dataobject->lastQuery['order_by']));\n\n // Testing that sort() overrides sort property when passed an array\n $dataobject = new TestDataObject();\n $dataobject->fb_linkOrderFields = array('the_str');\n $this->datasource->bind($dataobject);\n $this->datasource->sort(array('the_str' => 'ASC'));\n $this->datasource->fetch();\n $this->assertEquals('ORDER BY \"the_str\" ASC',\n trim($dataobject->lastQuery['order_by']));\n }", "private function orderedEntityClassesProperties(array $entityClasses){\r\n\r\n $filters = $this->em->getFilters();\r\n $filters->disable('softdeleteable');\r\n\r\n $orderedEntityClasses = array(); \r\n\r\n foreach($entityClasses as $entityClass){\r\n $entityClass = $this->em->getRepository('SLCoreBundle:EntityClass\\EntityClass')->fullFindById($entityClass->getId());\r\n $orderedEntityClasses[] = $entityClass;\r\n }\r\n\r\n $filters->enable('softdeleteable');\r\n\r\n return $orderedEntityClasses; \r\n }", "public function orderBy($expression, string $direction = self::ASC): ICollection;", "function arrSortObjsByKey($key, $order = 'ASC') {\n\treturn function($a, $b) use ($key, $order) {\n\n\t\t// Swap order if necessary\n\t\tif ($order == 'DESC') {\n \t \t\tlist($a, $b) = array($b, $a);\n \t\t} \n\n \t\t// Check data type\n \t\tif (is_numeric($a->$key)) {\n \t\t\treturn $a->$key - $b->$key; // compare numeric\n \t\t} else {\n \t\t\treturn strnatcasecmp($a->$key, $b->$key); // compare string\n \t\t}\n\t};\n}", "function findAllByPaginatedSorted(array $attributes, $perPage = 20, $sort = 'id', $dir = 'asc');", "public function sort($data);", "function array_sort_by()\n{\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field)\n {\n if (is_string($field))\n {\n $tmp = array();\n foreach ($data as $key => $row)\n {\n $tmp[$key] = $row[$field];\n }\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n}", "public function orderByAscending($field) {\r\n\t$this->parseQuery->orderByAscending($field);\r\n }", "public function data_wp_list_util_sort_object_arrays() {\n\t\treturn array(\n\t\t\t'object[], no keys, no ordering' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t(object) array( 'four' ),\n\t\t\t\t\t(object) array( 'two' ),\n\t\t\t\t\t(object) array( 'three' ),\n\t\t\t\t\t(object) array( 'one' ),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t(object) array( 'four' ),\n\t\t\t\t\t(object) array( 'two' ),\n\t\t\t\t\t(object) array( 'three' ),\n\t\t\t\t\t(object) array( 'one' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'object[], int keys, no ordering' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t4 => (object) array( 'four' ),\n\t\t\t\t\t2 => (object) array( 'two' ),\n\t\t\t\t\t3 => (object) array( 'three' ),\n\t\t\t\t\t1 => (object) array( 'one' ),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t4 => (object) array( 'four' ),\n\t\t\t\t\t2 => (object) array( 'two' ),\n\t\t\t\t\t3 => (object) array( 'three' ),\n\t\t\t\t\t1 => (object) array( 'one' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'object[], int keys, $orderby an existing field, $order = ASC and $preserve_keys = false' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t4 => (object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t2 => (object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t3 => (object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t1 => (object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'orderby' => 'id',\n\t\t\t\t'order' => 'ASC',\n\t\t\t\t'preserve_keys' => false,\n\t\t\t),\n\t\t\t'object[], int keys, $orderby an existing field, $order = DESC and $preserve_keys = true' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t3 => (object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t2 => (object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t1 => (object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t0 => (object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'orderby' => 'id',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'preserve_keys' => true,\n\t\t\t),\n\t\t\t'object[], string keys, no ordering' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t'four' => (object) array( 'value' => 'four' ),\n\t\t\t\t\t'two' => (object) array( 'value' => 'two' ),\n\t\t\t\t\t'three' => (object) array( 'value' => 'three' ),\n\t\t\t\t\t'one' => (object) array( 'value' => 'one' ),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t'four' => (object) array( 'value' => 'four' ),\n\t\t\t\t\t'two' => (object) array( 'value' => 'two' ),\n\t\t\t\t\t'three' => (object) array( 'value' => 'three' ),\n\t\t\t\t\t'one' => (object) array( 'value' => 'one' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'object[], string keys, $orderby a non-existent field, $order = DESC and $preserve_keys = true' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t'four' => (object) array( 'value' => 'four' ),\n\t\t\t\t\t'two' => (object) array( 'value' => 'two' ),\n\t\t\t\t\t'three' => (object) array( 'value' => 'three' ),\n\t\t\t\t\t'one' => (object) array( 'value' => 'one' ),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t'four' => (object) array( 'value' => 'four' ),\n\t\t\t\t\t'two' => (object) array( 'value' => 'two' ),\n\t\t\t\t\t'three' => (object) array( 'value' => 'three' ),\n\t\t\t\t\t'one' => (object) array( 'value' => 'one' ),\n\t\t\t\t),\n\t\t\t\t'orderby' => 'id',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'preserve_keys' => true,\n\t\t\t),\n\t\t\t'object[], string keys, $orderby an existing field, $order = ASC and $preserve_keys = false' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t(object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t'four' => (object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t'two' => (object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t'three' => (object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t'one' => (object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'orderby' => 'id',\n\t\t\t\t'order' => 'ASC',\n\t\t\t\t'preserve_keys' => false,\n\t\t\t),\n\t\t\t'object[], string keys, $orderby an existing field, $order = DESC and $preserve_keys = true' => array(\n\t\t\t\t'expected' => array(\n\t\t\t\t\t'four' => (object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t'three' => (object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t'two' => (object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t'one' => (object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'target_array' => array(\n\t\t\t\t\t'one' => (object) array(\n\t\t\t\t\t\t'id' => 1,\n\t\t\t\t\t\t'value' => 'one',\n\t\t\t\t\t),\n\t\t\t\t\t'two' => (object) array(\n\t\t\t\t\t\t'id' => 2,\n\t\t\t\t\t\t'value' => 'two',\n\t\t\t\t\t),\n\t\t\t\t\t'three' => (object) array(\n\t\t\t\t\t\t'id' => 3,\n\t\t\t\t\t\t'value' => 'three',\n\t\t\t\t\t),\n\t\t\t\t\t'four' => (object) array(\n\t\t\t\t\t\t'id' => 4,\n\t\t\t\t\t\t'value' => 'four',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'orderby' => 'id',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'preserve_keys' => true,\n\t\t\t),\n\t\t);\n\t}", "function sort_by($array, $key, $sort_type = SORT_ASC)\n{\n\t$temp = array();\n\tforeach ($array as $i => $row)\n\t{\n\t\t$temp[$i] = $row[$key];\n\t}\n\tarray_multisort($temp, $sort_type, $array);\n\t\n\treturn $array;\n}", "function cmp($a, $b)\n{\n return strcmp($a->nome, $b->nome);\n}", "protected function sortDataArray() {}", "function sort_array_by_array($array, $fields) {\n $sorted = array_merge(array_flip($fields), $array);\n return $sorted;\n}", "public static function sortFieldsByKey($array, $key) {\n uasort($array, function ($a, $b) use ($key) {\n if (!isset($a[$key])) {\n $a[$key] = 0;\n }\n if (!isset($b[$key])) {\n $b[$key] = 0;\n }\n if ($a[$key] === $b[$key]) {\n return 0;\n }\n return ($a[$key] < $b[$key]) ? -1 : 1;\n });\n return $array;\n }", "public static function orderBy()\n {\n return ['id', 'ASC'];\n }", "public function setOrderBy($field, $sort = 'desc');", "function inequality_sort(DatastoreClient $datastore)\n{\n // [START inequality_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->filter('priority', '>', 3)\n ->order('priority')\n ->order('created');\n // [END inequality_sort]\n return $query;\n}", "private function sortOnField(&$objects, $onClass, $order = 'ASC')\n {\n $comparer = ($order === 'DESC')\n ? \"return -strcmp(\\$a->{$onClass},\\$b->{$onClass});\"\n : \"return strcmp(\\$a->{$onClass},\\$b->{$onClass});\";\n usort($objects, create_function('$a,$b', $comparer));\n }", "public function test_sorting_tasklists_ascending()\n {\n $this->make(TaskList::class, [], 2);\n\n $taskList = new Tasklist;\n\n $this->assertCount(2, $taskList->with('tasks')->ascending()->get());\n }", "public function sort($videotype, $property, $order)\n\t{\n\t\t$query = \"SELECT * FROM {$this->table} \n\t\twhere video_type= :video_type ORDER BY $property $order\";\n\t\t$params = array(':video_type' => $videotype);\n\t\t$stmt = static::$dbh->prepare($query);\n\t\t$stmt->execute($params);\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "public function getSort();", "public function sort() {\n\t\tusort( $this->items, array( 'AtomizerItem', 'compare' ) );\n\t}", "public function getSortFields(): array {}", "public function getSortFields(): array {}", "static function orderBy(array $items, $keyToSortWith = 'id', $orderType = 'asc'){\n $sortedItems = [];\n foreach ($items as $item) {\n $key = is_object($item) ? $item->{$keyToSortWith} : $item[$keyToSortWith];\n $sortedItems[$key] = $item;\n }\n if ($orderType === 'desc') {\n krsort($sortedItems);\n } else {\n ksort($sortedItems);\n }\n return array_values($sortedItems);\n }", "public function orderBy($field, $sort);", "public function order_ASC(){\n return $this->order('ASC');\n }", "function sort_relationship_field_lists_chronologically( $args, $field, $post ) {\n $args['orderby'] = 'post_date';\n $args['order'] = 'DESC';\n return $args;\n}", "public function getOrderBy(): array\n {\n return parent::getOrderBy();\n }", "function my_epl_listing_sort_property_unique_id( $query ) {\n\t// Do nothing if in dashboard or not an archive page\n\tif ( is_admin() || ! $query->is_main_query() )\n\t\treturn;\n\n\t// Do nothing if Easy Property Listings is not active\n\tif ( ! function_exists( 'epl_all_post_types' ) )\n\t\treturn;\n\n\t// Sort EPL listings by price on archive page and search results\n\tif ( is_post_type_archive( epl_all_post_types() == 'true' ) || is_search() ) {\n\n\t\t$query->set( 'meta_key', 'property_unique_id' );\n\t \t$query->set( 'orderby', 'property_unique_id' );\n\t \t$query->set( 'order', 'DESC' );\n\t\treturn;\n\t}\n}", "public function getSorting();", "function sort($arr, $keys, $descent = false) {\r\n $_REQUEST['_xpAS_sort'] = array('key' => $keys, 'descent' => $descent);\r\n function cmp($a, $b) {\r\n $va = xpAS::get($a, $_REQUEST['_xpAS_sort']['key']);\r\n $vb = xpAS::get($b, $_REQUEST['_xpAS_sort']['key']);\r\n if ($va == $vb) return 0;\r\n $sign = $_REQUEST['_xpAS_sort']['descent'] ? -1 : 1;\r\n return $va < $vb ? -1 : 1;\r\n };\r\n usort($arr, 'cmp');\r\n return $arr;\r\n }", "public function sort($fields);", "function sort() { }", "public function sortByKeys()\r\n {\r\n $valesForSorting = [];\r\n foreach ($this->nestedArr as $key => $value) {\r\n $valesForSorting[$key] = $this->findSortingFields($value);\r\n }\r\n\r\n foreach($this->sortingKeys as $sortingKey){\r\n $a = array_column($valesForSorting, $sortingKey);\r\n array_multisort(\r\n $a,\r\n SORT_ASC,\r\n SORT_NATURAL,\r\n $this->nestedArr,\r\n $valesForSorting\r\n );\r\n }\r\n }", "function cmp($a, $b)\n {\n return strcmp($a->first_name, $b->first_name);\n }", "public function getUsedForSortBy();", "public function order();", "public function order();", "function mySort(array $a){\n \n }", "private function getOrderBy(array &$params)\n {\n $orderBy = array();\n if (array_key_exists('_orderBy', $params)) {\n foreach (preg_split('/[,\\s]+/', $params['_orderBy']) as $propertyOrder) {\n $property = preg_split('/:/', $propertyOrder);\n $orderBy[$property[0]] = count($property) === 1 ? 'ASC' : $property[1];\n }\n unset($params['_orderBy']);\n }\n return $orderBy;\n }", "function sort_by_name($object1, $object2) { \n\t\t\treturn $object1->p_name > $object2->p_name; \n\t\t}", "function msort($array, $id=\"id\", $sort_ascending=true) {\n\t$temp_array = array();\n\twhile(count($array)>0) {\n\t\t$lowest_id = 0;\n\t\t$index=0;\n\t\tforeach ($array as $item) {\n\t\t\tif (isset($item[$id])) {\n\t\t\t\tif ($array[$lowest_id][$id]) {\n\t\t\t\t\tif (strtolower($item[$id]) < strtolower($array[$lowest_id][$id])) {\n\t\t\t \t\t\t$lowest_id = $index;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$index++;\n\t\t}\n\t\t$temp_array[] = $array[$lowest_id];\n\t\t$array = array_merge(array_slice($array, 0,$lowest_id), array_slice($array, $lowest_id+1));\n\t}\n\tif ($sort_ascending) {\n\t\treturn $temp_array;\n\t} else {\n\t\treturn array_reverse($temp_array);\n\t}\n}", "function sortByAttributes($unordered_ids, $sortby_name = null, $sortby_key = null, $direction = 0)\n {\n return $unordered_ids;\n }", "function tfuse_aasort ($array, $key) {\n $sorter=array();\n $ret=array();\n if (!$array){$array = array();}\n reset($array);\n foreach ($array as $ii => $va) {\n $sorter[$ii]=$va[$key];\n }\n asort($sorter);\n foreach ($sorter as $ii => $va) {\n $ret[$ii]=$array[$ii];\n }\n return $ret;\n }", "public static function orderBy(): array\n {\n $args = \\func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (\\is_string($field)) {\n $tmp = [];\n foreach ($data as $key => $row) {\n $tmp[$key] = $row[$field];\n }\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n array_multisort($args);\n return array_pop($args);\n }", "function ProductByASC($data, $method)\n{\n\treturn ($data[\"id\"] <= $method[\"id\"]) ? -1: 1;\n}", "abstract public function sortBy($f): self;", "public function sort(array &$array);", "public function sortGrouped();", "function addAsc($field) {\n\t\t$this->orders = array_merge($this->orders, array($field => '')); // ASC not mandatory\n\t}", "public function orderBy($field) {\r\n\t$this->parseQuery->orderBy($field);\r\n }", "function sort_on($arr, $keyname, $descent = false, $temp_key = 'temp_key_for_sort') {\r\n foreach ($arr as $k => $v) {\r\n $key = implode(chr(1), xpAS::round_up($v, $keyname));\r\n //_debug($key);\r\n $arr[$k][$temp_key] = preg_replace('/[\\.|\\s]+/', '', $key . '.' . microtime());\r\n }\r\n $arr = self::key($arr, $temp_key);\r\n $a = $descent ? krsort($arr) : ksort($arr);\r\n $arr = self::cuts($arr, $temp_key);\r\n return array_values($arr);\r\n }" ]
[ "0.675521", "0.6619765", "0.6590064", "0.63448477", "0.6341168", "0.62786007", "0.6194895", "0.6189013", "0.61668843", "0.6058951", "0.6038172", "0.60030633", "0.5995882", "0.5973803", "0.59737813", "0.59737813", "0.5937562", "0.590816", "0.58792156", "0.5878214", "0.5847589", "0.58311784", "0.5828806", "0.5807598", "0.57967776", "0.57967776", "0.5776644", "0.5772221", "0.57681024", "0.5759927", "0.5756657", "0.5748508", "0.5722193", "0.56760335", "0.5672773", "0.5672773", "0.5668891", "0.5659518", "0.5655984", "0.5653604", "0.5649975", "0.56418294", "0.5610729", "0.5590195", "0.5585571", "0.5583106", "0.5581704", "0.5581532", "0.55269766", "0.5519533", "0.5499065", "0.5493011", "0.5475942", "0.54647374", "0.54526645", "0.54465485", "0.5442753", "0.54373395", "0.541399", "0.5405884", "0.54021895", "0.5401215", "0.5396162", "0.53919405", "0.539006", "0.53814864", "0.5381427", "0.5378002", "0.537686", "0.5367587", "0.5367587", "0.53587943", "0.5341811", "0.5339307", "0.5333996", "0.53304535", "0.532173", "0.53091544", "0.530818", "0.5307662", "0.5306276", "0.52931017", "0.5282729", "0.5281629", "0.52794474", "0.52794474", "0.5268424", "0.526721", "0.5261828", "0.5256778", "0.525581", "0.5254736", "0.52545816", "0.5249848", "0.5243122", "0.52418035", "0.5231931", "0.5223075", "0.5200336", "0.5197986" ]
0.73115295
0
Sort array of entities in descending order based on the given property
Сортировать массив сущностей в порядке убывания по заданному свойству
private function sortDescending(array &$entities, string $property): void { usort($entities, function($entityA, $entityB) use ($property) { return $entityB->{$property} <=> $entityA->{$property}; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sortDesc(){\n\n usort($this->Results, array('arrayResults', 'sortResultDesc'));\n }", "abstract public function getOrderByDesc() ;", "function descending_sort(DatastoreClient $datastore)\n{\n // [START descending_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->order('create', Query::ORDER_DESCENDING);\n // [END descending_sort]\n return $query;\n}", "public function sortBy($array, $property)\n {\n usort($array, function ($valueA, $valueB) use ($property) {\n $valueAl = strtolower($valueA->$property);\n $valueBl = strtolower($valueB->$property);\n\n if ($valueAl == $valueBl) {\n return 0;\n }\n\n return ($valueAl > $valueBl) ? +1 : -1;\n });\n\n return $array;\n }", "public function asort() {}", "function sortDesc(array $frequencyList)\n{\n arsort($frequencyList);\n return $frequencyList;\n}", "public function sortByValue();", "function sortBook(&$arr, $prop)\n{\n for ($i = 1; $i < count($arr); $i++) {\n\n // getting value for back element\n $j = ($i - 1);\n\n //saving it in temperary variable;\n $temp = $arr[$i];\n\n //looping to sort using swap\n while ($j >= 0 && $arr[$j]->{$prop} >= $temp->{$prop}) {\n\n $arr[$j + 1] = $arr[$j];\n $j--; //decrementing j value by 1\n }\n $arr[$j + 1] = $temp; // copying from temp to arary\n }\n}", "public function desc(array $collection)\n {\n $this->changeDirection(false);\n $collection = $this->asc($collection);\n $this->changeDirection(true);\n return $collection;\n }", "public function orderByDescending($field) {\r\n\t$this->parseQuery->orderByDescending($field);\r\n }", "public function providesOrderBySingleFieldDesc()\n {\n return [\n 'default' => [\n 'default',\n 'sort=name desc'\n ],\n 'json api' => [\n 'json_api',\n 'sort=-name'\n ],\n 'odata' => [\n 'odata',\n '$orderby=name desc'\n ],\n ];\n }", "function array_sort_by_property($array, $key) {\n if(empty ($array)) return $array;\n\n $final_sorted_array = array();\n $key_array = array();\n\n for ($i = 0 ; $i < count($array) ; $i++) {\n $key_array[$i] = $array[$i]->{$key};\n }\n asort($key_array);\n\n foreach ($key_array as $key_num => $value) {\n array_push($final_sorted_array, $array[ $key_num] );\n }\n return $final_sorted_array;\n }", "public function sortArrayByAgeDesc($people, $orderby = 'age')\n {\n if (!is_array($people)) {\n return;\n }\n foreach ($people as $snKey => $ssValue) {\n $people[$snKey]['name'] = $people[$snKey]['first_name'].' '.$people[$snKey]['last_name'];\n }\n array_multisort(array_column($people, $orderby), SORT_DESC, $people);\n return $people;\n }", "public function order_DESC(){\n return $this->order('DESC');\n }", "private function sortItemsDesc(): void\n {\n usort($this->items, function ($item1, $item2) {\n return ($item1->getValue() > $item2->getValue()) ? -1 :\n (($item1->getValue() < $item2->getValue()) ? 1 : 0);\n });\n }", "public function orderByDesc($column);", "private function sortByHeightReverse(): void\n {\n foreach ($this->articles_by_position as $articles) {\n $this->reverseSortArticles($articles);\n }\n }", "public static function sortDesc(array $list)\n {\n usort($list, array(\"Base36\", \"_sortDesc\"));\n return $list;\n }", "public function sort() {\n usort($this->records, function($a, $b) {\n return $a->sortorder - $b->sortorder; \n });\n }", "public function sortDescending($value) {\n return $this->setProperty('sortDescending', $value);\n }", "function multi_sort(DatastoreClient $datastore)\n{\n // [START multi_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->order('priority', Query::ORDER_DESCENDING)\n ->order('created');\n // [END multi_sort]\n return $query;\n}", "public function sortArrayOfArrayByKey($array, $property, $order = \"desc\", $cmp = \"numeric\")\n\t{\n\t\tuasort($array, function ($a, $b) use ($property, $order, $cmp) {\n\n\t\t\t$dateElements = array(\"created_time\");\n\n\t\t\tif (is_array($a)) {\n\t\t\t\t$a_val = $a[$property];\n\t\t\t\t$b_val = $b[$property];\n\t\t\t} else {\n\t\t\t\t$a_val = $a->$property;\n\t\t\t\t$b_val = $b->$property;\n\t\t\t}\n\n\t\t\tif ($cmp == \"numeric\") {\n\t\t\t\tif ($order == \"asc\") {\n\t\t\t\t\treturn $a_val < $b_val;\n\t\t\t\t} elseif ($order == \"desc\") {\n\t\t\t\t\treturn $b_val > $a_val;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif ($order == \"asc\") {\n\t\t\t\t\treturn strcmp($a_val, $b_val);\n\t\t\t\t} elseif ($order == \"desc\") {\n\t\t\t\t\treturn strcmp($b_val, $a_val);\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\n\t\treturn $array;\n\t}", "final public function getDeactivatedUsersOrderByDesc(): object\n {\n return $this->model->where('status', 0)\n ->orderBy('id', 'desc')\n ->paginate(App::DEFAULT_PAGINATE);\n }", "function arraySortProperty(&$array, $property, $sort = SORT_ASC){\n if(!$array || !is_array($array)) return array();\n $map = arrayMapProperty($array, $property);\n array_multisort($map, $sort, $array);\n}", "public function setOrderBy($field, $sort = 'desc');", "function sort_relationship_field_lists_chronologically( $args, $field, $post ) {\n $args['orderby'] = 'post_date';\n $args['order'] = 'DESC';\n return $args;\n}", "function OrderBy();", "public abstract function gdoSortObjects();", "public static function object_order($aObj, $property) {\n\t\t$cursor = 1;\n\t\t$comparison = 1;\n\t\twhile ($cursor <= count($aObj)) {\n\t\t\tif ($aObj[$comparison]->$property > $aObj[$comparison-1]->$property) {\n\t\t\t\t//If property of the higher object is less than lower one swap\n\t\t\t\t$temp = $aObj[$comparison-1];\n\t\t\t\t$aObj[$comparison-1] = $aObj[$comparison];\n\t\t\t\t$aObj[$comparison] = $temp;\n\n\n\n\t\t\t\t//Compare two below next cycle\n\t\t\t\t$comparison--;\n\t\t\t} else {\n\t\t\t\t//If not, increase the cursor and begin comparing again\n\t\t\t\t$cursor++;\n\t\t\t\t$comparison = $cursor;\n\t\t\t}\n\n\t\t\t//If we have reached the last item to be compared increase the cursor\n\t\t\tif ($comparison == 0) {\n\t\t\t\t$cursor++;\n\t\t\t\t$comparison = $cursor;\n\t\t\t}\n\n\t\t}\n\t\treturn $aObj;\n\t}", "public function sort(array $entities, string $property, ?string $dir): array\n {\n if (is_null($dir) || $dir === 'asc') {\n $this->sortAscending($entities, $property);\n } else if ($dir === 'desc') {\n $this->sortDescending($entities, $property);\n }\n\n return $entities;\n }", "function inequality_sort(DatastoreClient $datastore)\n{\n // [START inequality_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->filter('priority', '>', 3)\n ->order('priority')\n ->order('created');\n // [END inequality_sort]\n return $query;\n}", "private function sortAscending(array &$entities, string $property): void\n {\n usort($entities, function($entityA, $entityB) use ($property) {\n return $entityA->{$property} <=> $entityB->{$property};\n });\n }", "protected function _sort() {}", "public static function orderByProperty(array $objects, $property)\n {\n if (empty($objects) || !is_array($objects)) {\n return $objects;\n }\n\n $cur = 1;\n $stack[1]['l'] = 0;\n $stack[1]['r'] = count($objects) - 1;\n\n do {\n $l = $stack[$cur]['l'];\n $r = $stack[$cur]['r'];\n $cur--;\n\n do {\n $i = $l;\n $j = $r;\n $tmp = $objects[(int)(($l + $r) / 2)];\n\n // Partition the array in two parts.\n // Left from $tmp are with smaller values,\n // Right from $tmp are with bigger ones\n do {\n while ($objects[$i]->{$property} < $tmp->{$property}) {\n $i++;\n }\n\n while ($tmp->{$property} < $objects[$j]->{$property}) {\n $j--;\n }\n\n // Swap elements from the two sides\n if ($i <= $j) {\n $w = $objects[$i];\n $objects[$i] = $objects[$j];\n $objects[$j] = $w;\n\n $i++;\n $j--;\n }\n } while ($i <= $j);\n\n if ($i < $r) {\n $cur++;\n $stack[$cur]['l'] = $i;\n $stack[$cur]['r'] = $r;\n }\n $r = $j;\n } while ($l < $r);\n } while ($cur != 0);\n\n return $objects;\n }", "public static function sortDataBy($field,$order=\"ASC\",array &$arrayOfObjectVO){\n \tself::$sortField = $field;\n \tusort($arrayOfObjectVO,array(\"\\zion\\orm\\ObjectVO\",\"sortString\"));\n \t\n \tif($order == \"DESC\"){\n \t\t$arrayOfObjectVO = array_reverse($arrayOfObjectVO);\n \t}\n }", "public function sortByDesc($callback, $options = SORT_REGULAR);", "function findAllBySorted(array $attributes, $sort = 'id', $dir = 'asc');", "public function getOrderBy();", "public function getOrderBy();", "public function getDescending(): array\n {\n return parent::getDescending();\n }", "function descPopSortFunc($a, $b)\n{\n $a_pop = $a->population;\n $b_pop = $b->population;\n\n if ($a_pop == $b_pop) {\n return 0;\n }\n return ($a_pop > $b_pop) ? -1 : 1;\n\n}", "public function sort_csv_data_descending($delimeter, $csv_array)\n {\n $temp = array();\n //Loop to get State names from data_array \n foreach ($csv_array as $key => $row)\n {\n $temp[$key] = $row[$delimeter];\n }\n /**\n * Used array_multisort function to sort data\n * Passing State names and Sorting order so it will arrange data according to State names\n */\n array_multisort($temp, SORT_DESC, $csv_array);\n\n $json_output_array=json_encode($csv_array); //Storing data into Json format\n\n return $json_output_array;\n\n }", "public function testSortDesc()\n {\n $this->generate(\n $this->getSuiteDocument(),\n array(\n 'sort' => array('time' => 'desc'),\n )\n );\n\n $output = $this->getOutput()->fetch();\n preg_match_all('/75\\.00|100\\.00/m', $output, $matches);\n $this->assertEquals(array(array(\n '100.00', '75.00',\n )), $matches);\n }", "function orderDescending() {\n \treturn strpos($this->getOrderBy(), 'DESC') !== false;\n }", "public function addOrdering($property, $isAscending = true);", "public function descending($column);", "public function desc($fields)\n {\n return $this->sort($fields, false);\n }", "final public function getActiveUsersOrderByDesc(): object\n {\n return $this->model->where('status', 1)\n ->orderBy('id', 'desc')\n ->paginate(App::DEFAULT_PAGINATE);\n }", "public function desc($field)\n {\n return $this->addOrderBy($field, 'DESC');\n }", "public static function desc($array, $field, $type = null)\n\t{\n\t return self::by($array, $field, self::DESC, $type);\n\t}", "public function sort();", "public function sort();", "public function desc()\n {\n $model = $this->modelClass;\n $this->orderBy([$model::primaryKey()[0] => SORT_DESC]);\n return $this;\n }", "public function expressionSort()\n {\n foreach ($this->query->expressions() as $attribute => $realAttribute) {\n $this->sort['attributes'][$attribute] = [\n 'asc' => [$realAttribute => SORT_ASC],\n 'desc' => [$realAttribute => SORT_DESC]\n ];\n }\n }", "function addDesc($field) {\n\t\t$this->orders = array_merge($this->orders, array($field => OrmOrderBy::$DESC));\n\t}", "public function order_desc( $column )\n {\n $this->order( $column, true );\n }", "public function getSortBy();", "function ProductByDESC($data, $method)\n{\n\treturn ($data[\"id\"] >= $method[\"id\"]) ? -1 : 1;\n}", "function findAllSorted($sort = 'id', $dir = 'asc');", "public function doSort();", "public function testDesc()\n {\n $sort = $this->_commonField->desc();\n $this->assertType('\\Xyster\\Data\\Symbol\\Sort', $sort);\n $this->assertSame($this->_commonField, $sort->getField());\n $this->assertFalse($sort->isAscending());\n }", "public function getSortReverse()\n {\n return $this->sortReverse;\n }", "public function getSort();", "function sortBy($field, &$array)\n {\n usort($array, create_function('$a, $b', '\n $a = $a[\"' . $field . '\"];\n $b = $b[\"' . $field . '\"];\n\n if($a==\"servicio\" && $b == \"servicio\" || $a==\"dependencia\" && $b == \"servicio\" )\n {\n return 0;\n }\n elseif ($a==\"servicio\" && $b == \"dependencia\" )\n {\n return 1;\n }\n else\n return -1;\n '));\n\n return true;\n }", "function custom_sort($a,$b) {\r\n return $b->donation_amount>$a->donation_amount;\r\n }", "function cmp($a, $b) {\n return $a[\"Urgency\"] - $b[\"Urgency\"];\n}", "function sortByOrder($a, $b) {\n return $a['rating'] - $b['rating'];\n}", "protected function getAllAvailableSortDescendingOptions() {}", "function wc_products_array_orderby($products, $orderby = 'date', $order = 'desc')\n {\n }", "public function reverse()\n {\n return Ordering::from(Collections::reverseOrder($this));\n }", "function orderBy($team_data, $field)\n {\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($team_data, create_function('$a,$b', $code));\n return $team_data;\n }", "function orderBy($team_data, $field)\n {\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($team_data, create_function('$a,$b', $code));\n return $team_data;\n }", "function sortByAttributes($unordered_ids, $sortby_name = null, $sortby_key = null, $direction = 0)\n {\n return $unordered_ids;\n }", "function ascending_sort(DatastoreClient $datastore)\n{\n // [START ascending_sort]\n $query = $datastore->query()\n ->kind('Task')\n ->order('created');\n // [END ascending_sort]\n return $query;\n}", "public function sortNegativeArray(array $array)\n {\n uasort(\n $array, function ($left, $right) {\n if ($left['amount'] == $right['amount']) {\n return 0;\n }\n\n return ($left['amount'] < $right['amount']) ? -1 : 1;\n }\n );\n\n return $array;\n }", "protected function sortDataArray() {}", "public function sortBy($property)\n {\n // make sure that the api supports sorting for this kind of object\n if(property_exists($this->schema->links['instances']->properties,\"sort_by\"))\n {\n // make sure that we have a valid property\n if(in_array($property,$this->schema->links['instances']->properties->sort_by->enum))\n {\n $this->sort_by = $property;\n return $this;\n }\n else\n {\n throw new SaleskingException(\"SORTBY_INVALIDPROPERTY\",\"Invalid property for sorting\");\n }\n }\n else\n {\n throw new SaleskingException(\"SORTBY_CANNOTSORT\",\"object type doesnt support sorting\");\n }\n }", "public function sort_by_properties(array $properites) {\n return $this->sort(function ($a, $b) use ($properites) {\n foreach ($properites as $property => $direction) {\n $a_value = $this->pluck_property($a, $property);\n $b_value = $this->pluck_property($b, $property);\n\n $ordering = Crankshaft::compare($a_value, $b_value);\n if ($ordering !== 0) {\n return $direction * $ordering;\n }\n }\n return 0;\n });\n }", "static function sort_pdf_array_by_date($file_obj_array){\n\t\tfor($j = 0; $j < count($file_obj_array); $j++){\n\t\t\tfor($i = 0; $i < count($file_obj_array) - 1; $i++){ //Will run on all items except the last one\n\t\t\t\tif($file_obj_array[$i]->date < $file_obj_array[$i + 1]->date){\n\t\t\t\t\tarray_splice($file_obj_array, $i + 2, 0, array($file_obj_array[$i]));\n\t\t\t\t\tunset($file_obj_array[$i]);\n\t\t\t\t\t$file_obj_array = array_values($file_obj_array);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $file_obj_array;\n\t}", "public function thenByDescending(callable $function);", "public function getSorting();", "public static function arraySortByColumn($data, $column, $orderTypeKey)\n {\n// 'DESC' => SORT_DESC];\n// $sortCol = array();\n// foreach ($data as $key => $row)\n// {\n// $sortCol[$key] = $row->$column;\n// }\n// array_multisort($sortCol, $orderType[$orderTypeKey], $data);\n//\n// return $data;\n }", "function sort() { }", "public function sortByField(array $objects, $field)\n {\n $acc = PropertyAccess::createPropertyAccessor();\n usort($objects, function ($a, $b) use ($acc, $field) {\n $av = $acc->getValue($a, $field);\n $bv = $acc->getValue($b, $field);\n return ($av == $bv) ? 0 : ($av < $bv ? -1 : 1);\n });\n return $objects;\n }", "function sort_by_name($object1, $object2) { \n\t\t\treturn $object1->p_name > $object2->p_name; \n\t\t}", "function orderBy(&$data, $field)\n{\n $code = \"return strnatcmp(\\$a['$field'], \\$b['$field']);\";\n usort($data, create_function('$a,$b', $code));\n}", "function array_sort_by_field(&$array, $field = 0, $order = \"ASC\") {\n $oper = ($order == \"ASC\") ? \">\" : \"<\";\n if (!is_array($array)) {\n return;\n }\n usort($array, create_function('$a,$b', \"return (\\$a['$field'] $oper \\$b['$field']);\"));\n reset($array);\n}", "function mysortimages($array) {\n asort($array);\n return $array;\n }", "public function sortDescending(array $prefList)\n {\n $comparator = new MatchedPreferenceComparator();\n\n usort(\n $prefList,\n function (MatchedPreferenceInterface $lValue, MatchedPreferenceInterface $rValue) use ($comparator) {\n return $comparator->compare($lValue, $rValue);\n }\n );\n\n return $prefList;\n }", "function testSortProperty()\n {\n $dataobject = new TestDataObject();\n $dataobject->fb_linkOrderFields = array('num');\n $this->datasource->bind($dataobject);\n $this->datasource->fetch();\n $this->assertEquals('ORDER BY num',\n trim($dataobject->lastQuery['order_by']));\n\n // Testing that sort() overrides sort property (see bug #12942)\n $dataobject = new TestDataObject();\n $dataobject->fb_linkOrderFields = array('the_str');\n $this->datasource->bind($dataobject);\n $this->datasource->sort('the_str');\n $this->datasource->fetch();\n // With bug #12942 the following equaled to 'ORDER BY \"the_str\", the_str'\n $this->assertEquals('ORDER BY \"the_str\"',\n trim($dataobject->lastQuery['order_by']));\n\n // Testing that sort() overrides sort property when passed an array\n $dataobject = new TestDataObject();\n $dataobject->fb_linkOrderFields = array('the_str');\n $this->datasource->bind($dataobject);\n $this->datasource->sort(array('the_str' => 'ASC'));\n $this->datasource->fetch();\n $this->assertEquals('ORDER BY \"the_str\" ASC',\n trim($dataobject->lastQuery['order_by']));\n }", "public function orderBy($expression, string $direction = self::ASC): ICollection;", "private function orderByDesc(string $value) : void\n {\n $this->result = $this->result->orderByDesc($value);\n }", "public function sort() {\n\t\tusort( $this->items, array( 'AtomizerItem', 'compare' ) );\n\t}", "public function getUsedForSortBy();", "public function orderByDesc($field)\n {\n $this->delegate->orderByDesc($field);\n return $this;\n }", "function sortByHeight($a) {\n for($i = 0; $i < count($a); $i++)\n {\n for($j = $i+1; $j < count($a); $j++)\n {\n if(($a[$i] > $a[$j])&&($a[$j] != (-1)))\n {\n $f = $a[$j];\n $a[$j] = $a[$i];\n $a[$i] = $f;\n }\n }\n }\n return $a;\n}", "public function sort($data);", "public function orderByDesc($column_name)\n\t{\n\t\treturn $this->_addOrderBy($column_name, 'DESC');\n\t}", "public function getAllDesc() {\r\n $orderBy = array(\r\n \"sentDate\" => \"desc\"\r\n );\r\n \r\n return $this->mailEntity->findBy(array(), $orderBy);\r\n \r\n }", "function array_orderby(){\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp = array();\n foreach ($data as $key => $row)\n $tmp[$key] = $row[$field];\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n}" ]
[ "0.6305585", "0.6154013", "0.6066055", "0.57591414", "0.5719242", "0.5716573", "0.56776106", "0.566698", "0.5662546", "0.56394243", "0.5636819", "0.56325287", "0.5606843", "0.5592246", "0.5581835", "0.5567922", "0.5561989", "0.5540196", "0.55331475", "0.5532559", "0.5503394", "0.5498327", "0.5458886", "0.54395014", "0.54326725", "0.5369483", "0.5366988", "0.534466", "0.5338471", "0.53160733", "0.53044826", "0.5297061", "0.52864665", "0.5253325", "0.52346313", "0.52300525", "0.5225212", "0.5210649", "0.5210649", "0.5201496", "0.5191517", "0.5187192", "0.5183824", "0.51824534", "0.5177054", "0.51745963", "0.51692104", "0.5169156", "0.51624095", "0.5156382", "0.51344967", "0.51344967", "0.5134479", "0.51229143", "0.5120534", "0.5098986", "0.50891054", "0.5082819", "0.505812", "0.5050713", "0.50502306", "0.5049783", "0.5022782", "0.5009646", "0.5006989", "0.49986538", "0.4998086", "0.4988908", "0.49739614", "0.49675032", "0.49585733", "0.49585733", "0.4954284", "0.49528494", "0.49468777", "0.49401954", "0.49311715", "0.4929226", "0.4908364", "0.49035174", "0.48873392", "0.48865715", "0.4879572", "0.4879036", "0.48711342", "0.48689395", "0.48655847", "0.48633784", "0.4861752", "0.485829", "0.48549336", "0.48443502", "0.48424765", "0.48399353", "0.4826397", "0.4825296", "0.48247477", "0.48143688", "0.4812656", "0.48083583" ]
0.7453939
0
Add to job list appointment reminder
Добавить в список задач напоминание о встрече
public function regularAppointmentReminder() { $command = 'task:appointment:reminder'; $this->addRegularJob($command); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function regularAppointmentAutoReminder()\r\n {\r\n $command = 'task:appointment:reminder:auto';\r\n $this->addRegularJob($command);\r\n }", "function addReminderSchedule() {\n //echo $this->value('reminder_set');\n if ($this->value('patient_id') != \"\" && $this->value('scheduled_date') != \"\") {\n $status = $this->userInfo(\"status\", $this->value(\"patient_id\"));\n if ($status == \"1\" || $status == \"2\") {\n $reminder_arr = array(\n 'patient_id' => $this->value('patient_id'),\n 'scheduled_date' => $this->value('scheduled_date'),\n 'status' => 'pending',\n 'reminder_set' => $this->value('reminder_set')\n );\n $this->insert(\"reminder_schedule\", $reminder_arr);\n $this->output = true;\n return;\n } else {\n $this->output = false;\n return;\n }\n } else {\n $this->output = false;\n return;\n }\n }", "function addReminderScheduleEhs() {\n if ($this->value('therpaistId') != \"\" && $this->value('scheduled_date') != \"\") {\n $status = $this->userInfo(\"status\", $this->value(\"therpaistId\"));\n $clinicId = $this->clinicInfo('clinic_id');\n if ($status == \"1\" || $status == \"2\") {\n $reminder_arr = array(\n 'patient_id' => '0',\n 'clinicId' => $clinicId,\n 'therapistId' => $this->value('therpaistId'),\n 'parent_reminder_schedule_id' => '0',\n 'scheduled_date' => $this->value('scheduled_date'),\n 'reminderEhsFlag' => '1',\n // 'scheduler_status' => '1',\n 'status' => 'pending',\n 'reminder_set' => $this->value('reminder_set')\n );\n $this->insert(\"reminder_schedule\", $reminder_arr);\n $insertId = $this->insert_id();\n\n\n if ($this->is_corporate($clinicId) == 1) {\n $ehsPatientArr = $this->get_paitent_list($clinicId);\n } else {\n $ehsPatientArr = $this->getProviderEHSPatients($this->value('patient_id'));\n }\n $patientCount = count($ehsPatientArr);\n $pat = 0;\n //echo $this->value('scheduled_date'); \n while ($pat < $patientCount) {\n $date = substr($this->value('scheduled_date'), 0, 10);\n $sql = \"select * from reminder_schedule where DATEDIFF(DATE_FORMAT(scheduled_date,'%Y-%m-%d'),'{$date}') =0 and reminder_set=1 and patient_id=\" . $ehsPatientArr[$pat];\n $res = $this->execute_query($sql);\n $num = $this->num_rows($res);\n if ($num == 0) {\n $reminder_arr1 = array(\n 'patient_id' => $ehsPatientArr[$pat],\n 'therapistId' => $this->value('therpaistId'),\n 'parent_reminder_schedule_id' => $insertId,\n 'scheduled_date' => $this->value('scheduled_date'),\n 'reminderEhsFlag' => '1',\n 'status' => 'pending',\n 'reminder_set' => $this->value('reminder_set')\n );\n $this->insert(\"reminder_schedule\", $reminder_arr1);\n }\n $pat++;\n }\n\n $this->output = true;\n return;\n } else {\n $this->output = false;\n return;\n }\n } else {\n $this->output = false;\n return;\n }\n }", "public function finish()\n {\n $db_assignment = $this->get_record()->get_assignment();\n\n // don't allow editing if the appointment has been assigned\n if( true == $this->editable ) $this->editable = is_null( $db_assignment );\n\n parent::finish();\n\n $db_participant = lib::create( 'database\\participant', $this->get_record()->participant_id );\n \n // determine the time difference\n $db_phone = $this->get_record()->get_phone();\n\n // go with the phone's address if there is one, and the first address if not\n $db_address = is_null( $db_phone )\n ? $db_participant->get_first_address()\n : $db_phone->get_address();\n $time_diff = is_null( $db_address ) ? NULL : $db_address->get_time_diff();\n\n // need to add the participant's timezone information as information to the date item\n $site_name = lib::create( 'business\\session' )->get_site()->name;\n if( is_null( $time_diff ) )\n $note = 'The participant\\'s time zone is not known.';\n else if( 0 == $time_diff )\n $note = sprintf( 'The participant is in the same time zone as the %s site.',\n $site_name );\n else if( 0 < $time_diff )\n $note = sprintf( 'The participant\\'s time zone is %s hours ahead of %s\\'s time.',\n $time_diff,\n $site_name );\n else if( 0 > $time_diff )\n $note = sprintf( 'The participant\\'s time zone is %s hours behind of %s\\'s time.',\n abs( $time_diff ),\n $site_name );\n\n $this->add_item( 'datetime', 'datetime', 'Date', $note );\n \n // create enum arrays\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'active', '=', true );\n $modifier->order( 'rank' );\n $phones = array();\n foreach( $db_participant->get_phone_list( $modifier ) as $db_phone )\n $phones[$db_phone->id] = $db_phone->rank.\". \".$db_phone->number;\n \n if( !is_null( $db_assignment ) )\n {\n $this->set_item( 'assignment.user', $db_assignment->get_user()->name, false );\n\n $this->add_item( 'assignment.start_datetime', 'constant', 'Started' );\n $this->set_item( 'assignment.start_datetime',\n util::get_formatted_time( $db_assignment->start_datetime ), false );\n \n $this->add_item( 'assignment.end_datetime', 'constant', 'Finished' );\n $this->set_item( 'assignment.end_datetime',\n util::get_formatted_time( $db_assignment->end_datetime ), false );\n }\n else\n {\n $this->set_item( 'assignment.user', 'unassigned', false );\n }\n\n $appointment_class_name = lib::get_class_name( 'database\\appointment' );\n $types = $appointment_class_name::get_enum_values( 'type' );\n $types = array_combine( $types, $types );\n\n // set the view's items\n $this->set_item( 'phone_id', $this->get_record()->phone_id, false, $phones );\n $this->set_item( 'datetime', $this->get_record()->datetime, true );\n $this->set_item( 'state', $this->get_record()->get_state(), false );\n $this->set_item( 'type', $this->get_record()->type, false, $types );\n\n $this->finish_setting_items();\n\n // hide the calendar if requested to\n $this->set_variable( 'hide_calendar', $this->get_argument( 'hide_calendar', false ) );\n }", "public function addAppointment($data = null){\n\t\t\t$timeSlots = $this->SplitTime('09:00 AM', '05:00 PM', 60);\n\t\t\t// $day = Carbon::now();\n\t\t\t$day = Carbon::now()->addDays(1);\n\t\t\t$this->checkTimeAvailability($day, $timeSlots, $data);\n\n\t\t}", "public function add_appointment($args) {\n global $wpdb;\n $datetime_now = date('Y-m-d') . 'T' . date('H:m:i') . 'Z';\n $defaults = array(\n 'beginning' => $datetime_now,\n 'end' => $datetime_now,\n 'full_day' => FALSE,\n 'title' => 'title',\n 'description' => '',\n 'location' => '',\n 'category' => '0'\n );\n\n $args = wp_parse_args($args, $defaults);\n return $wpdb -> insert($this -> tableDatesName, $args);\n }", "public function orderReminder();", "public function regularAppointmentComplete()\r\n {\r\n $command = 'task:appointment:complete';\r\n $this->addRegularJob($command);\r\n }", "public function reviewReminder();", "public function push(Reminder $reminder);", "public function addToWaitList() {\n // The user has a program in their cart that is full.\n // We need to add them to the wait list and remove the\n // item from their cart.\n die(\"Not Implemented\");\n \n $rowid = $this->getRowId();\n $programId = $this->getProgramId();\n \n // TODO\n // Add them to the waitlist, howeve we do that...\n \n // Remove the program from their shopping cart\n $this->cart->update(array('rowid' => $rowid, 'qty' => 0));\n \n // TODO Send Email ???\n \n // Tell the client-side the waitlist entry is created\n $this->output->set_status_header(HTTP_CREATED);\n }", "public function addAction()\n\t{\t// TODO: add event to google calendars\t\n\t}", "function regenerate_event_reminder_jobs($id,$force=false)\n{\n\t$events=$GLOBALS['SITE_DB']->query_select('calendar_events',array('*'),array('id'=>$id),'',1);\n\n\tif (!array_key_exists(0,$events)) return;\n\t$event=$events[0];\n\n\t$GLOBALS['SITE_DB']->query_delete('calendar_jobs',array('j_event_id'=>$id));\n\n\t$period_start=$force?0:NULL;\n\t$recurrences=find_periods_recurrence($event['e_timezone'],$event['e_do_timezone_conv'],$event['e_start_year'],$event['e_start_month'],$event['e_start_day'],is_null($event['e_start_hour'])?0:$event['e_start_hour'],is_null($event['e_start_minute'])?0:$event['e_start_minute'],$event['e_end_year'],$event['e_end_month'],$event['e_end_day'],is_null($event['e_end_hour'])?23:$event['e_end_hour'],is_null($event['e_end_minute'])?0:$event['e_end_minute'],$event['e_recurrence'],min(1,$event['e_recurrences']),$period_start);\n\tif ((array_key_exists(0,$recurrences)) && ($recurrences[0][0]==$recurrences[0][2]/*really starts in window, not just spanning it*/))\n\t{\n\t\tif ($event['e_type']==db_get_first_id()) // Add system command job if necessary\n\t\t{\n\t\t\t$GLOBALS['SITE_DB']->query_insert('calendar_jobs',array(\n\t\t\t\t'j_time'=>usertime_to_utctime($recurrences[0][0]),\n\t\t\t\t'j_reminder_id'=>NULL,\n\t\t\t\t'j_member_id'=>NULL,\n\t\t\t\t'j_event_id'=>$id\n\t\t\t));\n\t\t} else\n\t\t{\n\t\t\tif (function_exists('set_time_limit')) @set_time_limit(0);\n\n\t\t\t$start=0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$reminders=$GLOBALS['SITE_DB']->query_select('calendar_reminders',array('*'),array('e_id'=>$id),'',500,$start);\n\n\t\t\t\tforeach ($reminders as $reminder)\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('calendar_jobs',array(\n\t\t\t\t\t\t'j_time'=>usertime_to_utctime($recurrences[0][0],$reminder['n_member_id'])-$reminder['n_seconds_before'],\n\t\t\t\t\t\t'j_reminder_id'=>$reminder['id'],\n\t\t\t\t\t\t'j_member_id'=>$reminder['n_member_id'],\n\t\t\t\t\t\t'j_event_id'=>$event['id']\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t$start+=500;\n\t\t\t}\n\t\t\twhile (array_key_exists(0,$reminders));\n\t\t}\n\t}\n}", "public function approval_reminder() {\n //send email and notification to renew application and persist reminder\n //Reminders should not be sent to completed studies\n \t$this->out('Starting...');\n\n $options['conditions'] = array(\n 'Application.submitted' => 1, \n 'Application.approved' => 2, \n 'Application.final_date IS ' => null, //Final report not completed\n // 'Application.trial_status_id' => 5,\n 'Application.deactivated' => 0,\n ''\n );\n $options['contain'] = array('AnnualLetter' => array('limit' => 1, 'order' => array('AnnualLetter.id DESC')));\n $applications = $this->Application->find('all', $options);\n\n // Remind applicants and managers approval pending \n $html = new HtmlHelper(new ThemeView());\n $type = 'reminder_approval_letter ';\n $message = $this->Message->find('first', array('conditions' => array('name' => $type)));\n foreach ($applications as $application) { \n //*************************** Send Email and Notifications Managers *****************************\n \t\t$this->out('Application: ' . $application['Application']['user_id']);\n \n $users = $this->User->find('all', array(\n 'contain' => array('Group'),\n 'conditions' => array('OR' => array('User.id' => $application['Application']['user_id'], 'User.group_id' => 2)) //Applicant and managers\n ));\n foreach ($users as $user) {\n \t$this->out('User: ' . $user['User']['name']);\n if (isset($application['AnnualLetter'][0])) {\n \t$this->out('AnnualLetter ' . $application['AnnualLetter'][0]['expiry_date']);\n \t$variables = array(\n\t\t 'name' => $user['User']['name'], 'protocol_no' => $application['Application']['protocol_no'],\n\t\t 'protocol_link' => $html->link($application['Application']['protocol_no'], array('controller' => 'applications', 'action' => 'view', $application['Application']['id'], $user['Group']['redir'] => true, \n\t\t 'full_base' => true), array('escape' => false)),\n\t\t 'approval_date' => $application['Application']['approval_date'], 'expiry_date' => $application['AnnualLetter'][0]['expiry_date']\n\t\t );\n\t $datum = array(\n\t 'email' => $user['User']['email'],\n\t 'id' => $application['Application']['id'], 'user_id' => $user['User']['id'], 'type' => $type, 'model' => 'AnnaulLetter',\n\t 'subject' => String::insert($message['Message']['subject'], $variables),\n\t 'message' => String::insert($message['Message']['content'], $variables)\n\t );\n\t $this->sendEmail($datum);\n\t $this->sendNotification($datum);\n\t $this->log($datum, 'approval_reminder');\n } \n }\n //********************************** END *********************************\n //end\n }\n }", "function meeting_agenda_items_template_add() {\n // Use standard meeting form, which will be altered later\n return meeting_agenda_items_add('template~0');\n}", "public function addJob($job = []) {\n if(!isset($job['msg']))\n throw new RuntimeException('Job without a message');\n\n if(!isset($job['schedule']))\n throw new RuntimeException('Job without a CRON expression');\n\n if(!isset($job['function']))\n throw new RuntimeException('Job without a function');\n\n if($this->isDue($job['schedule']))\n $this->jobs[] = $job;\n }", "function eventclass_Backup_Notified_Jobs()\n\t{\n\n//\tonscreen events\n\t\t$this->events[\"Backup_Notified_Jobs_snippet\"] = true;\n\n\t}", "public static function show_reminder()\n {\n }", "public function addAppointment(Appointment $l)\n\t{\n\t\tif ($this->collAppointments === null) {\n\t\t\t$this->initAppointments();\n\t\t}\n\t\tif (!in_array($l, $this->collAppointments, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collAppointments, $l);\n\t\t\t$l->setsfGuardUser($this);\n\t\t}\n\t}", "public function run()\n {\n $items = [\n \n ['id' => 1, 'patient_id' => 1, 'doctor_id' => 1, 'appointment' => '2018-07-18 22:26:45',],\n\n ];\n\n foreach ($items as $item) {\n \\App\\Appointment::create($item);\n }\n }", "public function bookAppointmentManually(Request $request){\n $starting_hour = Setting::where('settings_name','starting_hour')->first();\n $office_duration = Setting::where('settings_name','office_duration')->first();\n\n //google calender date & time format\n $date = Carbon::createFromFormat('d/m/Y', $request->date)->format('Y-m-d');\n $time12=$starting_hour->settings_value;\n $time24 = date(\"H:i\", strtotime( $time12 ));\n\n //saving date to db\n $appointment=new Appointment;\n $appointment->name= $request->name;\n $appointment->phone= $request->phone;\n $appointment->email= $request->email;\n $appointment->gender= $request->gender;\n $appointment->date= $date;\n $appointment->time= $time24;\n $appointment->save();\n\n \n\n \n //google calender settings\n $startTime=Carbon::parse($date.' '.$time24.'Asia/Dhaka');\n $endTime=(clone $startTime)->addHour();\n $event = new Event;\n $event->name = 'Appointment: '.$request->name;\n $event->startDateTime = $startTime;\n $event->endDateTime = $endTime;\n $event->save();\n\n return redirect()->route('appointments')->with('msg','Appointment saved successfully...!');\n \n \n \n }", "public function store(Request $request)\n {\n\n\n // dd( Appointment::where('delivered', 'NO')->where('date_string' ,'<=', date(\"Y-m-d H:i\"))->exists());\n $appointment = new Appointment();\n $appointment->title = $request->title;\n $appointment->body = $request->body;\n $appointment->save();\n\n if($request->item == \"now\") {\n\n $appointment->delivered = 'YES';\n $appointment->send_date = date(\"Y-m-d H:i\");\n auth('api')->user()->appointments()->save($appointment);\n\n $users = User::all();\n\n foreach($users as $user) {\n AppointmentDue::dispatch($appointment);\n }\n\n return response()->json('Mail sent.', 201);\n\n } else {\n $appointment->date_string = date(\"Y-m-d H:i\", strtotime($request->send_date));\n $appointment->date_send = $request->send_date;\n $appointment->date_issue = $request->date_issue;\n auth('api')->user()->appointments()->save($appointment);\n\n return response()->json('Notification will be sent later.', 201);\n }\n }", "public function add($id=null) {\n\t\t\n\t\t$appt = new Appt;\n\t\t// copy details from this appointment to new appointment\n\t\tif(!empty($id)) {\n\t\t\t$old = Appt::findOrFail($id);\n\t\t\t$appt->client_id = $old->client_id;\n\t\t\t$appt->therapist_id = $old->therapist_id;\n\t\t\t// copy the notes - possibly should insert on date\n\t\t\t\n\t\t\t// make it a link toprevious appt\n\t\t\t$prev = HTML::linkRoute('apptDisplay', \"Previous Appointment : \" . $old->date ,$old->id ); \n\t\t\t\n\t\t\t$appt->notes = \"<br><hr> \" . $prev . \"<br><hr>\" . $old->notes;\n\t\t} else {\n\t\t\t// add an appointment to the logged in user's\n\t\t\t$appt->therapist_id = userId();\n\t\t}\n\n\t\t$therapists = Therapist::lists('name','id');\t// $appt->therapists;\n\n\t\t$clients = Client::lists('name','id'); // $appt->clients;\n\n\t\treturn View::make('appts.add',array(\n\t\t\t'appt'\t\t\t=> $appt,\n\t\t\t'therapists' \t=> $therapists,\n\t\t\t'clients' \t\t=> $clients,\n\t\t))->with(\"title\",\"Appointment Add\");\t\n\t}", "function addTask($taskListId, $title, $note, $taskDate, $isImportant) {\n global $settings;\n\n $headers = array(\n \"User-Agent: php-tutorial/1.0\",\n \"Authorization: Bearer \".token()->access_token,\n \"Accept: application/json\",\n \"Content-Type: application/json\",\n \"client-request-id: \".makeGuid(),\n \"return-client-request-id: true\"\n );\n $post_body = '{\"title\": ' . json_encode($title) .',';\n $post_body .= '\"body\": {\"contentType\": \"text\",\"content\": '. json_encode($note) .'}';\n if ($taskDate != '') {\n $post_body .= ',\"dueDateTime\": {\"dateTime\": \"' . $taskDate . 'T08:00:00.0000000\",\"timeZone\": \"UTC\"}';\n }\n\tif ($isImportant == 'true') {\n\t\t$post_body .= ',\"importance\": \"high\"';\n\t}\n $post_body .= '}';\n $outlookApiUrl = $settings[\"api_url\"] . \"/me/todo/lists/\" . $taskListId .\"/tasks\";\n $response = runCurl($outlookApiUrl, $post_body, $headers);\n echo \"<pre>\"; print_r($response); echo \"</pre>\";\n return;\n}", "public function addJob(Job $job);", "static function addAppointment(RowUpdate &$contact_upd, $data, $account_id) {\n \tglobal $timedate;\n $app_upd = RowUpdate::for_model($data['model']);\n $app_upd->loadBlankRecord();\n\n $data['direction'] = 'Outbound';\n $data['status'] = 'Planned';\n $data['duration'] = 60;\n $data['assigned_user_id'] = AppConfig::current_user_id();\n $data['date_start'] = $timedate->to_db($data['date_start']);\n\n if ($account_id) {\n $data['parent_type'] = 'Accounts';\n $data['parent_id'] = $account_id;\n } else {\n $data['parent_type'] = 'Contacts';\n $data['parent_id'] = $contact_upd->getPrimaryKeyValue();\n }\n\n $app_upd->set($data);\n\n\t\tif (! $app_upd->validate()) {\n\t\t\t$GLOBALS['log']->error('appointment validate failed');\n\t\t\t$GLOBALS['log']->error($app_upd->errors);\n\t\t\treturn null;\n\t\t}\n if ($app_upd->save()) {\n \t$app_upd->addUpdateLink('users', array('id' => $data['assigned_user_id'], 'accept_status' => 'accept'));\n $app_upd->addUpdateLink('contacts', $contact_upd->getPrimaryKeyValue());\n \n return $app_upd->getPrimaryKeyValue();\n }\n\n return null;\n }", "function _setAppointment($mapimessage, $appointment) {\n // non-leapyear. Why this is, is totally unclear.\n $monthminutes = array(0,44640,84960,129600,172800,217440,260640,305280,348480,393120,437760,480960);\n\n // Get timezone info\n if(isset($appointment->timezone))\n $tz = $this->_getTZFromSyncBlob(base64_decode($appointment->timezone));\n else\n $tz = false;\n\n //calculate duration because without it some webaccess views are broken. duration is in min\n $localstart = $this->_getLocaltimeByTZ($appointment->starttime, $tz);\n $localend = $this->_getLocaltimeByTZ($appointment->endtime, $tz);\n $duration = ($localend - $localstart)/60;\n\n //nokia sends an yearly event with 0 mins duration but as all day event,\n //so make it end next day\n if ($appointment->starttime == $appointment->endtime && isset($appointment->alldayevent) && $appointment->alldayevent) {\n $duration = 1440;\n $appointment->endtime = $appointment->starttime + 24 * 60 * 60;\n $localend = $localstart + 24 * 60 * 60;\n }\n\n // is the transmitted UID OL compatible?\n // if not, encapsulate the transmitted uid\n $appointment->uid = getOLUidFromICalUid($appointment->uid);\n\n mapi_setprops($mapimessage, array(PR_MESSAGE_CLASS => \"IPM.Appointment\"));\n\n $this->_setPropsInMAPI($mapimessage, $appointment, $this->_appointmentmapping);\n\n //we also have to set the responsestatus and not only meetingstatus, so we use another mapi tag\n if (isset($appointment->meetingstatus))\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_LONG:{00062002-0000-0000-C000-000000000046}:0x8218\") => $appointment->meetingstatus));\n\n //sensitivity is not enough to mark an appointment as private, so we use another mapi tag\n if (isset($appointment->sensitivity) && $appointment->sensitivity == 0) $private = false;\n else $private = true;\n\n // Set commonstart/commonend to start/end and remindertime to start, duration, private and cleanGlobalObjectId\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8516\") => $appointment->starttime,\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8517\") => $appointment->endtime,\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8502\") => $appointment->starttime,\n $this->_getPropIDFromString(\"PT_LONG:{00062002-0000-0000-C000-000000000046}:0x8213\") => $duration,\n $this->_getPropIDFromString(\"PT_BOOLEAN:{00062008-0000-0000-C000-000000000046}:0x8506\") => $private,\n $this->_getPropIDFromString(\"PT_BINARY:{6ED8DA90-450B-101B-98DA-00AA003F1305}:0x23\") => $appointment->uid,\n ));\n\n // Set named prop 8510, unknown property, but enables deleting a single occurrence of a recurring\n // type in OLK2003.\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_LONG:{00062008-0000-0000-C000-000000000046}:0x8510\") => 369));\n\n // Set reminder boolean to 'true' if reminder is set\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_BOOLEAN:{00062008-0000-0000-C000-000000000046}:0x8503\") => isset($appointment->reminder) ? true : false));\n\n if(isset($appointment->reminder) && $appointment->reminder > 0) {\n //start is in seconds and reminder in minutes, so it needs to be multiplied by 60\n // Set 'flagdueby' to correct value (start - reminderminutes)\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8560\") => ($appointment->starttime - $appointment->reminder * 60)));\n }\n\n if(isset($appointment->recurrence)) {\n // Set PR_ICON_INDEX to 1025 to show correct icon in category view\n mapi_setprops($mapimessage, array(PR_ICON_INDEX => 1025));\n\n $recurrence = new Recurrence($this->_store, $mapimessage);\n\n if(!isset($appointment->recurrence->interval))\n $appointment->recurrence->interval = 1;\n\n switch($appointment->recurrence->type) {\n case 0:\n $recur[\"type\"] = 10;\n if(isset($appointment->recurrence->dayofweek))\n $recur[\"subtype\"] = 1;\n else\n $recur[\"subtype\"] = 0;\n\n $recur[\"everyn\"] = $appointment->recurrence->interval * (60 * 24);\n break;\n case 1:\n $recur[\"type\"] = 11;\n $recur[\"subtype\"] = 1;\n $recur[\"everyn\"] = $appointment->recurrence->interval;\n break;\n case 2:\n $recur[\"type\"] = 12;\n $recur[\"subtype\"] = 2;\n $recur[\"everyn\"] = $appointment->recurrence->interval;\n break;\n case 3:\n $recur[\"type\"] = 12;\n $recur[\"subtype\"] = 3;\n $recur[\"everyn\"] = $appointment->recurrence->interval;\n break;\n case 4:\n $recur[\"type\"] = 13;\n $recur[\"subtype\"] = 1;\n $recur[\"everyn\"] = $appointment->recurrence->interval * 12;\n break;\n case 5:\n $recur[\"type\"] = 13;\n $recur[\"subtype\"] = 2;\n $recur[\"everyn\"] = $appointment->recurrence->interval * 12;\n break;\n case 6:\n $recur[\"type\"] = 13;\n $recur[\"subtype\"] = 3;\n $recur[\"everyn\"] = $appointment->recurrence->interval * 12;\n break;\n }\n\n $starttime = $this->gmtime($localstart);\n $endtime = $this->gmtime($localend);\n\n $recur[\"startocc\"] = $starttime[\"tm_hour\"] * 60 + $starttime[\"tm_min\"];\n $recur[\"endocc\"] = $recur[\"startocc\"] + $duration; // Note that this may be > 24*60 if multi-day\n\n // \"start\" and \"end\" are in GMT when passing to class.recurrence\n $recur[\"start\"] = $this->_getDayStartOfTimestamp($this->_getGMTTimeByTz($localstart, $tz));\n $recur[\"end\"] = $this->_getDayStartOfTimestamp(0x7fffffff); // Maximum GMT value for end by default\n\n if(isset($appointment->recurrence->until)) {\n $recur[\"term\"] = 0x21;\n $recur[\"end\"] = $appointment->recurrence->until;\n } else if(isset($appointment->recurrence->occurrences)) {\n $recur[\"term\"] = 0x22;\n $recur[\"numoccur\"] = $appointment->recurrence->occurrences;\n } else {\n $recur[\"term\"] = 0x23;\n }\n\n if(isset($appointment->recurrence->dayofweek))\n $recur[\"weekdays\"] = $appointment->recurrence->dayofweek;\n if(isset($appointment->recurrence->weekofmonth))\n $recur[\"nday\"] = $appointment->recurrence->weekofmonth;\n if(isset($appointment->recurrence->monthofyear))\n $recur[\"month\"] = $monthminutes[$appointment->recurrence->monthofyear-1];\n if(isset($appointment->recurrence->dayofmonth))\n $recur[\"monthday\"] = $appointment->recurrence->dayofmonth;\n\n // Process exceptions. The PDA will send all exceptions for this recurring item.\n if(isset($appointment->exceptions)) {\n foreach($appointment->exceptions as $exception) {\n // we always need the base date\n if(!isset($exception->exceptionstarttime))\n continue;\n\n if(isset($exception->deleted) && $exception->deleted) {\n // Delete exception\n if(!isset($recur[\"deleted_occurences\"]))\n $recur[\"deleted_occurences\"] = array();\n\n array_push($recur[\"deleted_occurences\"], $this->_getDayStartOfTimestamp($exception->exceptionstarttime));\n } else {\n // Change exception\n $mapiexception = array(\"basedate\" => $this->_getDayStartOfTimestamp($exception->exceptionstarttime));\n\n if(isset($exception->starttime))\n $mapiexception[\"start\"] = $this->_getLocaltimeByTZ($exception->starttime, $tz);\n if(isset($exception->endtime))\n $mapiexception[\"end\"] = $this->_getLocaltimeByTZ($exception->endtime, $tz);\n if(isset($exception->subject))\n $mapiexception[\"subject\"] = u2w($exception->subject);\n if(isset($exception->location))\n $mapiexception[\"location\"] = u2w($exception->location);\n if(isset($exception->busystatus))\n $mapiexception[\"busystatus\"] = $exception->busystatus;\n if(isset($exception->reminder)) {\n $mapiexception[\"reminder_set\"] = 1;\n $mapiexception[\"remind_before\"] = $exception->reminder;\n }\n if(isset($exception->alldayevent))\n $mapiexception[\"alldayevent\"] = $exception->alldayevent;\n\n if(!isset($recur[\"changed_occurences\"]))\n $recur[\"changed_occurences\"] = array();\n\n array_push($recur[\"changed_occurences\"], $mapiexception);\n\n }\n }\n }\n\n $recurrence->setRecurrence($tz, $recur);\n\n }\n else {\n $isrecurringtag = $this->_getPropIDFromString(\"PT_BOOLEAN:{00062002-0000-0000-C000-000000000046}:0x8223\");\n mapi_setprops($mapimessage, array($isrecurringtag => false));\n }\n\n // Do attendees\n if(isset($appointment->attendees) && is_array($appointment->attendees)) {\n $recips = array();\n //open addresss book for user resolve\n $addrbook = mapi_openaddressbook($this->_session);\n foreach($appointment->attendees as $attendee) {\n $recip = array();\n $recip[PR_EMAIL_ADDRESS] = u2w($attendee->email);\n\n // lookup information in GAB if possible so we have up-to-date name for given address\n $userinfo = array( array( PR_DISPLAY_NAME => $recip[PR_EMAIL_ADDRESS] ) );\n $userinfo = mapi_ab_resolvename($addrbook, $userinfo, EMS_AB_ADDRESS_LOOKUP);\n if(mapi_last_hresult() == NOERROR) {\n $recip[PR_DISPLAY_NAME] = $userinfo[0][PR_DISPLAY_NAME];\n $recip[PR_EMAIL_ADDRESS] = $userinfo[0][PR_EMAIL_ADDRESS];\n $recip[PR_SEARCH_KEY] = $userinfo[0][PR_SEARCH_KEY];\n $recip[PR_ADDRTYPE] = $userinfo[0][PR_ADDRTYPE];\n $recip[PR_ENTRYID] = $userinfo[0][PR_ENTRYID];\n $recip[PR_RECIPIENT_TYPE] = MAPI_TO;\n }\n else {\n $recip[PR_DISPLAY_NAME] = u2w($attendee->name);\n $recip[PR_SEARCH_KEY] = $recip[PR_EMAIL_ADDRESS];\n $recip[PR_ADDRTYPE] = \"SMTP\";\n $recip[PR_RECIPIENT_TYPE] = MAPI_TO;\n $recip[PR_ENTRYID] = mapi_createoneoff($recip[PR_DISPLAY_NAME], $recip[PR_ADDRTYPE], $recip[PR_EMAIL_ADDRESS]);\n }\n\n array_push($recips, $recip);\n }\n\n mapi_message_modifyrecipients($mapimessage, 0, $recips);\n mapi_setprops($mapimessage, array(\n PR_ICON_INDEX => 1026,\n $this->_getPropIDFromString(\"PT_BOOLEAN:{00062002-0000-0000-C000-000000000046}:0x8229\") => true\n ));\n }\n }", "public function add()\n\t{\n\t\tif ( !$this->Auth->user('is_admin') ) {\n\t\t\t$this->Flash->error(\"Sorry, you do not have access to this module.\");\n\t\t\treturn $this->redirect([\"action\" => \"index\"]);\n\t\t}\n\n\t\t$this->loadModel(\"Users\");\n\n\t\t$users = $this->Users->find(\"all\")\n\t\t\t->where([\"is_active\" => 1])\n\t\t\t->order([\"last\" => \"ASC\", \"first\" => \"ASC\"]);\n\t\t\n\t\t$reminder = $this->Reminders->newEntity();\n\t\tif ($this->request->is('post')) {\n\t\t\t$reminder = $this->Reminders->patchEntity($reminder, $this->request->getData());\n\t\t\t$users = $this->request->getData();\n\t\t\t$usersToSend = [];\n\n\t\t\tforeach ( $users as $name => $value ) {\n\t\t\t\tif ( preg_match(\"/^user_.+?/\", $name ) && $value == 1 ) {\n\t\t\t\t\t$usersToSend[] = substr($name,5);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$reminder->toUsers = json_encode($usersToSend);\n\n\t\t\tif ($this->Reminders->save($reminder)) {\n\t\t\t\t$this->Flash->success(__('The reminder has been saved.'));\n\n\t\t\t\treturn $this->redirect(['action' => 'index']);\n\t\t\t}\n\t\t\t$this->Flash->error(__('The reminder could not be saved. Please, try again.'));\n\t\t}\n\n\t\t$this->set('crumby', [\n\t\t\t[\"/\", __(\"Dashboard\")],\n\t\t\t[\"/reminders/\", __(\"Reminders\")],\n\t\t\t[null, __(\"Add Reminder\")]\n\t\t]);\n\t\t\n\t\t$this->set(compact('reminder', 'users'));\n\t}", "function calendar_set($data)\n\t{\n\t\tif (!($infolog = $this->bo->read($data['entry_id'])))\n\t\t{\n\t\t\treturn $data;\n\t\t}\n\t\t$event = array_merge($data,array(\n\t\t\t'category'\t=> $GLOBALS['egw']->categories->check_list(EGW_ACL_READ, $infolog['info_cat']),\n\t\t\t'priority'\t=> $infolog['info_priority'] + 1,\n\t\t\t'public'\t=> $infolog['info_access'] != 'private',\n\t\t\t'title'\t\t=> $infolog['info_subject'],\n\t\t\t'description'\t=> $infolog['info_des'],\n\t\t\t'location'\t=> $infolog['info_location'],\n\t\t\t'start'\t\t=> $infolog['info_startdate'],\n\t\t\t'end'\t\t=> $infolog['info_enddate'] ? $infolog['info_enddate'] : $infolog['info_datecompleted']\n\t\t));\n\t\tunset($event['entry_id']);\n\t\tif (!$event['end']) $event['end'] = $event['start'] + (int) $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength']*60;\n\n\t\t// Match categories by name\n\t\t$event['category'] = $GLOBALS['egw']->categories->name2id(categories::id2name($infolog['info_cat']));\n\n\t\t// make current user the owner of the new event, not the selected calendar, if current user has rights for it\n\t\t$event['owner'] = $user = $GLOBALS['egw_info']['user']['account_id'];\n\n\t\t// add/modify participants according to prefs\n\t\t$prefs = explode(',',$this->prefs['calendar_set'] ? $this->prefs['calendar_set'] : 'responsible,contact,user');\n\n\t\t// if no default participants (selected calendars) --> remove all\n\t\tif (!in_array('selected',$prefs))\n\t\t{\n\t\t\t$event['participants'] = $event['participant_types'] = array();\n\t\t}\n\t\t// Add responsible as participant\n\t\tif (in_array('responsible',$prefs))\n\t\t{\n\t\t\tforeach($infolog['info_responsible'] as $responsible)\n\t\t\t{\n\t\t\t\t$event['participants'][$responsible] = $event['participant_types']['u'][$responsible] =\n\t\t\t\t\tcalendar_so::combine_status($user==$responsible?'A':'U');\n\t\t\t}\n\t\t}\n\t\t// Add linked contact as participant\n\t\tif (in_array('contact',$prefs) && $infolog['info_link']['app'] == 'addressbook')\n\t\t{\n\t\t\t$event['participants'][calendar_so::combine_user('c',$infolog['info_link']['id'])] =\n\t\t\t\t$event['participant_types']['c'][$infolog['info_link']['id']] = calendar_so::combine_status('U');\n\t\t}\n\t\tif (in_array('owner',$prefs))\n\t\t{\n\t\t\t$event['participants'][$infolog['info_owner']] = $event['participant_types']['u'][$infolog['info_owner']] =\n\t\t\t\tcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\t\t// Add current user, if set or no other participants, which is not allowed\n\t\tif (in_array('user',$prefs))\n\t\t{\n\t\t\t$event['participants'][$user] = $event['participant_types']['u'][$user] =\n\t\t\t\tcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\n\t\t// Add infolog link to calendar entry\n\t\t$event['link_app'][] = $infolog['info_link']['app'];\n\t\t$event['link_id'][] = $infolog['info_link']['id'];\n\n\t\t// Copy infolog's links\n\t\tforeach(egw_link::get_links('infolog',$infolog['info_id'],'','link_lastmod DESC',true) as $link)\n\t\t{\n\t\t\tif ($link['app'] != egw_link::VFS_APPNAME)\n\t\t\t{\n\t\t\t\t$event['link_app'][] = $link['app'];\n\t\t\t\t$event['link_id'][] = $link['id'];\n\t\t\t}\n\t\t}\n\t\t// Copy same custom fields\n\t\tforeach(array_keys(config::get_customfields('calendar')) as $name)\n\t\t{\n\t\t\tif ($this->bo->customfields[$name]) $event['#'.$name] = $infolog['#'.$name];\n\t\t}\n\t\t//error_log(__METHOD__.'('.array2string($data).') infolog='.array2string($infolog).' returning '.array2string($event));\n\t\treturn $event;\n\t}", "public function testPatientAppointmentAdd()\n \t{\n \t\t$user = ParseUser::logIn(\"janet\", \"qwe123\");\n $response = $this->call('GET', 'patient/appointments/add');\n \t\t$this->assertEquals(200, $response->getStatusCode());\n ParseUser::logOut();\n \t}", "public function run()\n {\n $appointment = ([\n [\n 'name' => 'Ram',\n 'address' => 'thaiba',\n 'phone' => '9863283764',\n 'date' => '9/14/2017',\n 'time' => '10:12',\n 'doctor_id' => '1'\n ], [\n 'name' => 'Hari',\n 'address' => 'kalimati',\n 'phone' => '986833034',\n 'date' => '9/14/2017',\n 'time' => '10:13',\n 'doctor_id' => '2'\n ], [\n 'name' => 'Meera',\n 'address' => 'patan',\n 'phone' => '982329923',\n 'date' => '9/14/2017',\n 'time' => '12:01',\n 'doctor_id' => '3'\n ]\n ]);\n\n App\\Appointment::insert($appointment);\n }", "public function add()\n {\n // Fetch Doctor Deatil\n $Doctor = TableRegistry::get('Users');\n $doctor = $Doctor->find()\n ->where(['usertype' => 1])\n ->all();\n\n $this->set('Doctor',$doctor); \n \n if ($this->request->is('post')) {\n\n $Appointments = TableRegistry::get('Appointments');\n\n $change_date = date('Y-m-d H:i:s',strtotime($this->request->data['appointment_date'])); \n $doctor_id = $this->request->data['doctor_id'];\n\n $this->request->data = $Appointments->newEntity();\n\n $this->request->data['doctor_id'] = $doctor_id;\n $this->request->data['appointment_date'] = $change_date;\n $this->request->data['patient_id'] = $this->Auth->user('id');\n $this->request->data['created'] = date('Y-m-d H:i:s');\n $this->request->data['modified'] = date('Y-m-d H:i:s');\n\n if ($Appointments->save($this->request->data)) {\n\n // Send Email Notification When Patient create new Appointment \n $email = new Email('default');\n \n $email->from(['test2@teknomines.com' => 'support@appointment.com'])\n ->to('bharat.tecknomines@gmail.com')\n ->subject('New Appointment')\n ->send('New Appointment is created by Bharat on Date : '.$change_date);\n\n $this->Flash->success(__('Appointment create successfully'));\n \n return $this->redirect(['action'=>'index']);\n \n } else {\n\n $this->Flash->error(__('Something went wrong'));\n \n return $this->redirect(['action'=>'index']);\n \n }\n\n\n\n }\n }", "public static function add_sendmail_job(){\r\n\t\t$current_time = current_time(\"timestamp\");\r\n\t\t$cut_off_time = 20 * 60; // 20 minutes\r\n\t\t$timestamp = $current_time + $cut_off_time;\r\n\t\t$recurrence = true;\r\n\r\n\t\tMainController::getInstance()->logger->debug(\"cron add_sendmail_job run at: \" . current_time( \"mysql\",1 ) );\r\n\t\twp_schedule_single_event( $timestamp, self::HOOK_PROCESS_MAIL );\r\n\t}", "public function meeting(){\n // $meetings = Meeting::get();\n $meetings=DB::table('meetings')->where('partyId',Auth::user()->id)\n ->where('partyRole','Land Surveyor')\n ->where('MeetingStatus','Confirmed') \n ->get();\n\n $meetingReqFromClient=DB::table('meetings')->where('requestorId',Auth::user()->id)\n ->where('reqFrom','Land Surveyor')\n ->where('MeetingStatus','Confirmed') \n ->get(); \n $meeting_list = [];\n foreach ($meetings as $key => $meeting) {\n $meeting_list[] = Calendar::event(\n $meeting->meetingReason,\n false, //to enable the user to view the date and time as well on the calendar\n new \\DateTime($meeting->startTime),\n new \\DateTime($meeting->endTime.' +1 day')\n );\n }\n\n $meeting_list2 = [];\n foreach ( $meetingReqFromClient as $key => $meetingReqFromClients) {\n \n $meeting_list2[] = Calendar::event(\n $meetingReqFromClients->meetingReason,\n false, //to enable the user to view the date and time as well on the calendar\n new \\DateTime($meetingReqFromClients->startTime),\n new \\DateTime($meetingReqFromClients->endTime.' +1 day')\n );\n }\n\n $ls=DB::table('land_surveyors')->get();\n $calendar_details = Calendar::addEvents($meeting_list); \n $calendar_details2 = Calendar::addEvents($meeting_list2); \n \n return view('landSurveyor.lsMeetings', compact('calendar_details','land_surveyors','calendar_details2') );\n }", "public function appointmentDate(Request $request){\n $date = Carbon::createFromFormat('d/m/Y', $request->date)->format('Y-m-d');\n $time12=$request->time;\n $time24 = date(\"H:i\", strtotime( $time12 ));\n\n //updating time and date for appointment date\n Appointment::where('id', $request->id)\n ->update([\n 'time' =>$time24,\n 'date' => $date,\n ]);\n\n //google calender settings\n $startTime=Carbon::parse($date.' '.$time24.'Asia/Dhaka');\n $endTime=(clone $startTime)->addHour();\n $event = new Event;\n $event->name = 'Appointment: '.$request->name;\n $event->startDateTime = $startTime;\n $event->endDateTime = $endTime;\n $event->save();\n //generating data for email\n $data = [\n 'name' => $request->name,\n 'date' => $request->date,\n 'time' => $request->time,\n ];\n Mail::to($request->email)->send(new ConfirmMail($data));\n\n return redirect()->route('activities')->with('msg','Appointment saved successfully...!');\n }", "public function addUpdatejob(array $job)\n {\n }", "function reservationGroupReminder()\n {\n if (in_array($this->session->userdata('group'),array(1, 20,21))){\n $tomorrow_date = mktime(0, 0, 0, date('m'), (date('d') + 1));\n $conditions = array('reservation_date'=>$tomorrow_date, 'closed'=>0, 'reminded'=>0);\n $reservations = $this->Appointment_admin_model->getReservation(NULL, NULL, $conditions);\n $i=0;\n foreach($reservations as $item){\n $provider = @reset($this->Appointment_admin_model->getProviderById($item['provider_id']));\n $email_data = array(\n \"company\"=>$this->_website_info['company'],\n \"email\"=>$item['email'],\n \"first_name\"=>$item['fname'],\n \"last_name\"=>$item['lname'],\n \"reservation_date\"=>my_int_date($item['reservation_date']),\n \"reservation_time\"=>my_int_justTime($item['reservation_date_time']),\n \"provider_name\"=>$provider['provider_name'],\n \"provider_phone\"=>$provider['phone'],\n \"provider_address\"=>$provider['address'],\n \"service_name\"=>$item['service_name'],\n \"provider_url\"=>base_url().$item['lang'].'/provider/'.$provider['provider_username'],\n );\n // Send reminder email\n $this->sendNotificationEmail('reservation_reminder', $item['language_id'], $item['email'], $email_data);\n // Add one more time reminded\n $this->Appointment_admin_model->reservationUpdateRemind($item['reservation_id'], $item['reminded']+1);\n $i++;\n }\n if($i!=0){\n $result = array(\"status\"=>\"success\");\n }else{\n $result = array(\"status\"=>\"error\",\"error\"=>_l(\"There wasn't any email, ready to remind!\",$this));\n }\n }else{\n // Show to demo account\n $result = array(\"status\"=>\"error\",\"error\"=>_l(\"Unfortunately you do not have permission to this part of system.\",$this));\n }\n if($this->input->is_ajax_request()){\n echo json_encode($result);\n }else{\n if($result[\"status\"]==\"success\"){\n $this->session->set_flashdata('success', _l('Your request was successful!',$this));\n }else{\n if(in_array('static_error',$result))\n $this->session->set_flashdata('static_error', $result[\"error\"]);\n else\n $this->session->set_flashdata('error', $result[\"error\"]);\n }\n redirect(APPOINTMENT_ADMIN_URL.'dashboard');\n }\n }", "function eventattendees()\n{\n}", "function run()\r\n {\r\n\r\n $appointment_id = Request :: get(self :: PARAM_APPOINTMENT_ID);\r\n\r\n if (! InternshipOrganizerRights :: is_allowed_in_internship_organizers_subtree(InternshipOrganizerRights :: RIGHT_EDIT, $appointment_id, InternshipOrganizerRights :: TYPE_APPOINTMENT))\r\n {\r\n $this->display_header();\r\n $this->display_error_message(Translation :: get('NotAllowed'));\r\n $this->display_footer();\r\n exit();\r\n }\r\n\r\n $appointment = $this->retrieve_appointment($appointment_id);\r\n\r\n $form = new InternshipOrganizerAppointmentForm(InternshipOrganizerAppointmentForm :: TYPE_EDIT, $appointment, $this->get_url(array(\r\n self :: PARAM_APPOINTMENT_ID => $appointment->get_id())), $this->get_user());\r\n\r\n if ($form->validate())\r\n {\r\n $success = $form->update_appointment();\r\n $this->redirect($success ? Translation :: get('InternshipOrganizerAppointmentUpdated') : Translation :: get('InternshipOrganizerAppointmentNotUpdated'), ! $success, array(\r\n self :: PARAM_ACTION => self :: ACTION_VIEW_MOMENT,\r\n self :: PARAM_MOMENT_ID => $appointment->get_moment_id(),\r\n DynamicTabsRenderer :: PARAM_SELECTED_TAB => InternshipOrganizerAppointmentManagerBrowserComponent :: TAB_APPOINTMENTS));\r\n }\r\n else\r\n {\r\n $this->display_header();\r\n $form->display();\r\n $this->display_footer();\r\n }\r\n }", "function schedulerAddEhsReminder($day,$pid,$clinicId) {\n global $date ;\n $query = \"SELECT * FROM patient_reminder where ehsReminder = '2' AND schduleday = {$day} AND clinicId={$clinicId}\";\n $result = @mysql_query($query);\n $numRows = @mysql_num_rows($result);\n\n if($numRows > 0) { \n $sqlcheck=\"select * from automaticscheduling_content where patient_id={$pid} and clinic_id={$clinicId} and day={$day}\";\n $querycheck= mysql_query($sqlcheck);\n $rowcheck= mysql_fetch_assoc($querycheck);\n if($rowcheck['reminder']==0){ \n \n $i = 0;\n while($i < $numRows) { \n \n $row = @mysql_fetch_assoc($result);\n $patient_reminder_id = $row['patient_reminder_id'];\n $clinicId = $row['clinicId'];\n $status = $row['status'];\n // while($pat < $patientCount) { \n \n $data = array(\n\t\t\t\t\t 'parent_reminder_id' => $row['patient_reminder_id'],\n\n\t\t\t\t\t 'clinicId' => $row['clinicId'],\n \n 'user_id' =>$row['user_id'],\n \n 'patient_id' => $pid,\n\n\t\t\t\t\t 'reminder' => $row['reminder'],\n\n 'status' => '1',\n\n\t\t\t\t\t 'creation_date' => date(\"Y-m-d\"),\n\n 'modified' => date(\"Y-m-d\"),\n\n\t\t\t\t\t 'ehsReminder' => '2'\n\n\t\t\t\t );\n\n $sqlinsert = \"INSERT INTO patient_reminder SET\n\t\t\t\t\t\t\t parent_reminder_id = '\".$data['parent_reminder_id'].\"',\n\t\t\t\t\t\t\t patient_id = '\".$data['patient_id'].\"',\n\t\t\t\t\t\t\t user_id = '\".$data['user_id'].\"',\n\t\t\t\t\t\t\t clinicId = '\".$data['clinicId'].\"',\n\t\t\t\t\t\t\t reminder ='\".$data['reminder'].\"',\n\t\t\t\t\t\t\t creation_date = '\".$data['creation_date'].\"',\n modified = '\".$data['modified'].\"',\n status = '1',\n\t\t\t\t\t\t\t ehsReminder = '\".$data['ehsReminder'].\"',\n assignday='\".$day.\"'\";\n\n\t\t\t\t $result1 = @mysql_query($sqlinsert);\n $insertId= mysql_insert_id();\n // $date = date(\"Y-m-d\");\n $sql = \"select * from reminder_schedule where DATEDIFF(DATE_FORMAT(scheduled_date,'%Y-%m-%d'),'{$date}') =0 and reminder_set=1 and patient_id=\" .$pid;\n $res = mysql_query($sql);\n $num = mysql_num_rows($res);\n if ($num == 0) {\n $reminder_arr1 = array(\n 'patient_id' => $pid,\n 'therapistId' => 0,\n 'parent_reminder_schedule_id' => $insertId,\n 'scheduled_date' => $date,\n 'reminderEhsFlag' => '2',\n 'status' => 'pending',\n 'reminder_set' => 1,\n 'assignday'=>$day\n );\n $sqlreminder=\"INSERT INTO reminder_schedule SET\n patient_id= '\".$reminder_arr1['patient_id'].\"',\n therapistId= '\".$reminder_arr1['therapistId'].\"',\n parent_reminder_schedule_id= '\".$reminder_arr1['parent_reminder_schedule_id'].\"',\n scheduled_date= '\".$reminder_arr1['scheduled_date'].\"',\n reminderEhsFlag= '\".$reminder_arr1['reminderEhsFlag'].\"',\n status= '\".$reminder_arr1['status'].\"',\n reminder_set= '\".$reminder_arr1['reminder_set'].\"',\n assignday='\".$reminder_arr1['assignday'].\"'\";\n $res1= mysql_query($sqlreminder);\n }\n \n $pat++;\n\n //}\n\n \n\n // $queryUpdate = \"UPDATE patient_reminder SET status = '1' , scheduler_status = '2' ,schdulerAction = '0' where patient_reminder_id = \".$patient_reminder_id;\n\t\t // @mysql_query($queryUpdate);\n\n $i++;\n\n }\n \n $sqlupdate=\"update automaticscheduling_content set reminder=1 where id={$rowcheck['id']}\";\n $queryupdate= mysql_query($sqlupdate);\n }\n echo $i.\"Times scheduler run\";\n echo $pat. \"Patient Reminders added by scheduler\";echo \"<br>\";\n \n }\n\n }", "public function initAppointments()\n\t{\n\t\t$this->collAppointments = array();\n\t}", "function _getAppointment($mapimessage, $truncsize, $mimesupport = 0) {\n $message = new SyncAppointment();\n\n // Standard one-to-one mappings first\n $this->_getPropsFromMAPI($message, $mapimessage, $this->_appointmentmapping);\n\n // Disable reminder if it is off\n $reminderset = $this->_getPropIDFromString(\"PT_BOOLEAN:{00062008-0000-0000-C000-000000000046}:0x8503\");\n $remindertime = $this->_getPropIDFromString(\"PT_LONG:{00062008-0000-0000-C000-000000000046}:0x8501\");\n $messageprops = mapi_getprops($mapimessage, array ( $reminderset, $remindertime ));\n\n if(!isset($messageprops[$reminderset]) || $messageprops[$reminderset] == false)\n $message->reminder = \"\";\n else {\n if ($messageprops[$remindertime] == 0x5AE980E1)\n $message->reminder = 15;\n else\n $message->reminder = $messageprops[$remindertime];\n }\n\n $messageprops = mapi_getprops($mapimessage, array ( PR_SOURCE_KEY ));\n\n if(!isset($message->uid))\n $message->uid = bin2hex($messageprops[PR_SOURCE_KEY]);\n else\n $message->uid = getICalUidFromOLUid($message->uid);\n\n // Get organizer information if it is a meetingrequest\n $meetingstatustag = $this->_getPropIDFromString(\"PT_LONG:{00062002-0000-0000-C000-000000000046}:0x8217\");\n $messageprops = mapi_getprops($mapimessage, array($meetingstatustag, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_NAME));\n\n if(isset($messageprops[$meetingstatustag]) && $messageprops[$meetingstatustag] > 0 && isset($messageprops[PR_SENT_REPRESENTING_ENTRYID]) && isset($messageprops[PR_SENT_REPRESENTING_NAME])) {\n $message->organizeremail = w2u($this->_getSMTPAddressFromEntryID($messageprops[PR_SENT_REPRESENTING_ENTRYID]));\n $message->organizername = w2u($messageprops[PR_SENT_REPRESENTING_NAME]);\n }\n\n $isrecurringtag = $this->_getPropIDFromString(\"PT_BOOLEAN:{00062002-0000-0000-C000-000000000046}:0x8223\");\n $recurringstate = $this->_getPropIDFromString(\"PT_BINARY:{00062002-0000-0000-C000-000000000046}:0x8216\");\n $timezonetag = $this->_getPropIDFromString(\"PT_BINARY:{00062002-0000-0000-C000-000000000046}:0x8233\");\n $recurrenceend = $this->_getPropIDFromString(\"PT_SYSTIME:{00062002-0000-0000-C000-000000000046}:0x8236\");\n\n // Now, get and convert the recurrence and timezone information\n $recurprops = mapi_getprops($mapimessage, array($isrecurringtag, $recurringstate, $timezonetag, $recurrenceend));\n\n if(isset($recurprops[$timezonetag]))\n $tz = $this->_getTZFromMAPIBlob($recurprops[$timezonetag]);\n else\n $tz = $this->_getGMTTZ();\n\n $message->timezone = base64_encode($this->_getSyncBlobFromTZ($tz));\n\n if(isset($recurprops[$isrecurringtag]) && $recurprops[$isrecurringtag]) {\n // Process recurrence\n $message->recurrence = new SyncRecurrence();\n $this->_getRecurrence($mapimessage, $recurprops, $message, $message->recurrence, $tz);\n }\n\n // Do attendees\n $reciptable = mapi_message_getrecipienttable($mapimessage);\n $rows = mapi_table_queryallrows($reciptable, array(PR_DISPLAY_NAME, PR_EMAIL_ADDRESS, PR_SMTP_ADDRESS, PR_ADDRTYPE));\n if(count($rows) > 0)\n $message->attendees = array();\n\n foreach($rows as $row) {\n $attendee = new SyncAttendee();\n\n $attendee->name = w2u($row[PR_DISPLAY_NAME]);\n //smtp address is always a proper email address\n if(isset($row[PR_SMTP_ADDRESS]))\n $attendee->email = w2u($row[PR_SMTP_ADDRESS]);\n elseif (isset($row[PR_ADDRTYPE]) && isset($row[PR_EMAIL_ADDRESS])) {\n //if address type is SMTP, it's also a proper email address\n if ($row[PR_ADDRTYPE] == \"SMTP\")\n $attendee->email = w2u($row[PR_EMAIL_ADDRESS]);\n //if address type is ZARAFA, the PR_EMAIL_ADDRESS contains username\n elseif ($row[PR_ADDRTYPE] == \"ZARAFA\") {\n $userinfo = mapi_zarafa_getuser_by_name($this->_store, $row[PR_EMAIL_ADDRESS]);\n if (is_array($userinfo) && isset($userinfo[\"emailaddress\"]))\n $attendee->email = w2u($userinfo[\"emailaddress\"]);\n }\n }\n // Some attendees have no email or name (eg resources), and if you\n // don't send one of those fields, the phone will give an error ... so\n // we don't send it in that case.\n // also ignore the \"attendee\" if the email is equal to the organizers' email\n if(isset($attendee->name) && isset($attendee->email) && $attendee->email != \"\" && (!isset($message->organizeremail) || (isset($message->organizeremail) && $attendee->email != $message->organizeremail)))\n array_push($message->attendees, $attendee);\n }\n // Force the 'alldayevent' in the object at all times. (non-existent == 0)\n if(!isset($message->alldayevent) || $message->alldayevent == \"\")\n $message->alldayevent = 0;\n\n return $message;\n }", "function os2dagsorden_create_agenda_meeting_submit_add_edit_bullet_point($form, &$form_state) {\n $node = os2dagsorden_create_agenda_save_meeting($form, $form_state);\n\n $form_state['meeting_id'] = $node->nid;\n // If empty - will be treated as new node creation.\n $form_state['bullet_point_id'] = $form_state['triggering_element']['#bp_nid'];\n\n $form_state['page_num'] = 2;\n $form_state['rebuild'] = TRUE;\n}", "public function setAlarms($data)\n {\n $events = $data['event'];\n $alarms = $data['alarm'];\n $dates = $data['date'];\n\n foreach ($events as $key => $event) {\n $pieces = explode('/',$event);\n\n $setAlarm = new Alarms();\n $setAlarm->user_id = $this->user_id;\n $setAlarm->event_id = $pieces[0];\n $setAlarm->calendar_id = $pieces[1];\n $setAlarm->start = $pieces[2];\n $setAlarm->end = $pieces[3];\n $setAlarm->summary = $pieces[4];\n $setAlarm->alarmTime = $alarms[$key];\n $setAlarm->alarmDate = $dates[$key];\n $setAlarm->save();\n }\n }", "function queue_emails(){\n\t global $EM_Event, $wpdb;\n\t $old_EM_Event = !empty($EM_Event) ? clone($EM_Event):null; //save old event in case already set\n\t\t//disable the current events are past rule\n\t add_filter('option_pre_dbem_events_current_are_past', 'em_emails_return_false', create_function('$a', 'return false;'));\n\t //For each event x days on\n\t $days = get_option('dbem_emp_emails_reminder_days',1);\n\t $scope = ($days > 0) ? date('Y-m-d', current_time('timestamp') + (86400*$days)):date('Y-m-d', current_time('timestamp')+86400);\n\t //make sure we don't get past events, only events starting that specific date\n\t $events_are_past = get_option('dbem_events_current_are_past');\n\t update_option('dbem_events_current_are_past', true);\n\t\t$output_type = get_option('dbem_smtp_html') ? 'html':'email';\n\t foreach( EM_Events::get(array('scope'=>$scope,'private'=>1,'blog'=>false)) as $EM_Event ){\n\t /* @var $EM_Event EM_Event */\n\t $emails = array();\n\t \t//get ppl attending\n\t \tforeach( $EM_Event->get_bookings()->get_bookings()->bookings as $EM_Booking ){ //get confirmed bookings\n\t \t /* @var $EM_Booking EM_Booking */\n\t \t if( is_email($EM_Booking->get_person()->user_email) ){\n\t\t\t \t$subject = $EM_Booking->output(get_option('dbem_emp_emails_reminder_subject'),'raw');\n\t\t\t \t$message = $EM_Booking->output(get_option('dbem_emp_emails_reminder_body'),$output_type);\n\t\t \t $emails[] = array($EM_Booking->get_person()->user_email, $subject, $message, $EM_Booking->booking_id);\n\t \t }\n\t \t}\n\t \tif(count($emails) > 0){\n\t \t $attachments = serialize(array());\n\t \t if( get_option('dbem_emp_emails_reminder_ical') ){\n\t\t \t //create invite ical\n\t\t \t $upload_dir = wp_upload_dir();\n\t\t \t $icalfilename = trailingslashit($upload_dir['basedir']).\"em-cache/invite_\".$EM_Event->event_id.\".ics\";\n\t\t \t $icalfile = fopen($icalfilename,'w+');\n\t\t \t if( $icalfile ){\n\t\t\t\t\t\tob_start();\n\t\t\t\t\t\tem_locate_template('templates/ical-event.php', true);\n\t\t\t\t\t\t$icalcontent = preg_replace(\"/([^\\r])\\n/\", \"$1\\r\\n\", ob_get_clean());\n\t\t\t\t\t\tfwrite($icalfile, $icalcontent);\n\t\t\t\t\t\tfclose($icalfile);\n\t\t\t\t\t\t$ical_file_array = array('name'=>'invite.ics', 'type'=>'text/calendar','path'=>$icalfilename);\n\t\t\t\t\t\t$attachments = serialize(array($ical_file_array));\n\t\t \t }\n\t \t }\n\t \t foreach($emails as $email){\n\t\t\t \t$wpdb->insert(EM_EMAIL_QUEUE_TABLE, array('email'=>$email[0],'subject'=>$email[1],'body'=>$email[2],'attachment'=>$attachments,'event_id'=>$EM_Event->event_id,'booking_id'=>$email[3]));\n\t \t }\n\t \t}\n\t \t\n\t }\n\t //cleanup\n\t update_option('dbem_events_current_are_past', $events_are_past); //reset previous current events are past setting\n\t $EM_Event = $old_EM_Event; //reset global\n\t remove_filter('option_pre_dbem_events_current_are_past', 'em_emails_return_false');\n\t}", "public function bkap_add_reschedule_order_note( $order_id, $old_bookings, $new_bookings, $item_name, $additional_note ) {\n\n $order_obj = wc_get_order( $order_id );\n\n if( isset( $old_bookings['booking_date'] ) && $old_bookings['booking_date'] !== '' &&\n isset( $new_bookings['booking_date'] ) && $new_bookings['booking_date'] !== '' && \n isset( $old_bookings['booking_date_checkout'] ) && $old_bookings['booking_date_checkout'] !== '' &&\n isset( $new_bookings['booking_date_checkout'] ) && $new_bookings['booking_date_checkout'] !== '' ) {\n\n $note_details_old = $old_bookings['booking_date'] . ' - ' . $old_bookings['booking_date_checkout'];\n $note_details_new = $new_bookings['booking_date'] . ' - ' . $new_bookings['booking_date_checkout'];\n }else if( isset( $old_bookings['booking_date'] ) && $old_bookings['booking_date'] !== '' &&\n isset( $new_bookings['booking_date'] ) && $new_bookings['booking_date'] !== '' && \n isset( $old_bookings['time_slot'] ) && $old_bookings['time_slot'] !== '' &&\n isset( $new_bookings['time_slot'] ) && $new_bookings['time_slot'] !== '' ) {\n\n $note_details_old = $old_bookings['booking_date'] . ' ' . $old_bookings['time_slot'];\n $note_details_new = $new_bookings['booking_date'] . ' ' . $new_bookings['time_slot'];\n }else {\n\n $note_details_old = $old_bookings['booking_date'];\n $note_details_new = $new_bookings['booking_date'];\n }\n\n $order_note = sprintf( __( 'Booking has been rescheduled from <strong>%s</strong> to <strong>%s</strong> for <strong>%s</strong>.', 'woocommerce-booking' ), $note_details_old, $note_details_new, $item_name );\n\n $order_note = $order_note . $additional_note;\n $order_obj->add_order_note( $order_note, 1, false );\n }", "public function claim_submission_reminder(){\n \n $this->load->model('employee_model');\n $all_employees = $this->employee_model->get_all_employees();\n \n if(date('d') >= 1 && date('d') <= 5){\n //echo \"hello\";\n $month = date('F', mktime(0, 0, 0, date('m',strtotime(date('Y-m').\" -1 month\")), 10));\n }else{\n $month = date('F', mktime(0, 0, 0, date('m'), 10));\n }\n foreach($all_employees as $employee){\n\n $subject = \"Monthly Expense Submission Reminder\";\n $message = \"Hi \".$employee['first_name'].\" \".$employee['last_name'].\",<br>\n <br>Kindly submit your expenses for the month of \".$month.\".\n <br>Please ignore this email if already submitted.<br><br>\n Regards<br>\n Admin<br>\";\n $this->sendMail($employee['gi_email'], $subject, $message);\n //echo \"<br>\".$subject.\"<br>\".$message.\"<br>\"; exit;\n\n }\n return true;\n }", "protected function appointment($data) {\r\n if ($this->method == 'GET') {\r\n //return based on date or id\r\n return \"NotImplementedYet\";\r\n } else if($this->method == 'POST') {\r\n //$client = getclient();\r\n $dt = new DateTime(); //TODO figure out how to sort datetime $data['date'], $data['time']\r\n $appt = new Appointment($client, $dt); //TODO add this constructor\r\n return \"NotImplementedYet\"; //addAppointment\r\n } else if($this->method == 'DELETE') {\r\n return \"NotImplementedYet\"; //deleteAppt($data[id]);\r\n } else {\r\n return \"Does not accept this type of request.\";\r\n }\r\n }", "function recordNewAppointment($appointment) {\n $json = new JsonStorage('date.json');\n $year = $appointment->year;\n $month = $appointment->month;\n $day = $appointment->day;\n $elements = $json->query(function ($elem) use ($year, $month, $day) {\n return ($elem['year'] == $year) && ($elem['month'] == $month) && ($elem['day'] == $day);\n });\n\n //If more then one day was found\n if (count($elements) > 1) {\n echo \"Hiba!\";\n return;\n }\n //Creating appointment data\n $app = new stdClass();\n $app->hour = $appointment->hour;\n $app->minute = $appointment->min;\n $app->limit = $appointment->limit;\n $app->attendees = [];\n $app->id = uniqid();\n $app->dayid = \"no_id\";\n\n //If the day has already has been set\n if (count($elements) == 1) {\n $newRecord = array_values($elements)[0];\n\n //Adding new appointment to that day\n $app->dayid = $newRecord[\"id\"];\n $newRecord[\"appointments\"][$app->id] = $app;\n $json->update($newRecord[\"id\"],$newRecord);\n $json->save();\n }\n\n //If the day has not been created\n else if(count($elements) == 0) {\n //Creating day structure\n $info = new stdClass();\n $info->id = \"no_id\";\n $info->year = $appointment->year;\n $info->month = $appointment->month;\n $info->day = $appointment->day;\n $info->appointments = [];\n\n //Adding appointment\n $info->appointments[$app->id] = $app;\n $id = $json->add($info);\n\n //Cross referencing\n $info->appointments[$app->id]->dayid = $id;\n $json->findById($id)->id = $id;\n\n }\n\n}", "function new_appointment() {\n $owners = $this->person->get_all_with_vehicles();\n\n //$vehicles = $this->vehicle->get_by_owner($this->client['person_id'], false);\n if ($owners) {\n $this->load_view_admin('appointment/new_appointment', ['owners' => $owners]);\n } else {\n $this->load->view(\"errors/error_404\");\n }\n }", "public function add(MailableInterface $mail, $date = 'now', array $context = []): int;", "public function personal(){\n\t\t$this->checkVetLogin();\n\t\tConfigure::write('debug', 2);\n \t\t$this->autoRender = false;\n\t\t$data = array();\n\t\t// check for proper form submit.\n\t\tif ( $this->request->is('ajax') && $this->request->is('post') ){\n\t\t\t$data = $this->validatePersonal($this->request->data);\t\t\t\n\t\t\tif(empty($data)){\n\t\t\t\t$appointments = array();\n\t\t\t\t$filter_start = str_replace('/', '-', $this->request->data['Appointment']['filter_start']);\n\t\t\t\t$filter_end = str_replace('/', '-', $this->request->data['Appointment']['filter_end']);\n\t\t\t\t\n\t\t\t\t$start_date = strtotime($filter_start);\n\t\t\t\t$end_date = strtotime($filter_end);\t\t\t\n\t\t\t\tfor( $i = $start_date; $i <= $end_date; ){\n\t\t\t\t\t$save = array(\n\t\t\t\t\t\t'title' \t\t\t=> $this->request->data['Appointment']['description'],\n\t\t\t\t\t\t'vet_id' \t\t\t=> $this->Session->read('vet.id'),\n\t\t\t\t\t\t'client_id' \t\t=> 0,\n\t\t\t\t\t\t'pet_id' \t\t\t=> 0,\n\t\t\t\t\t\t'appointment_type_id' => 0,\n\t\t\t\t\t\t'appointment_date' \t=> date('Y-m-d',$i),\n\t\t\t\t\t\t'slot_start' \t\t=> $this->request->data['Appointment']['appoint_start_time'],\n\t\t\t\t\t\t'slot_end' \t\t\t=> $this->request->data['Appointment']['appoint_end_time'],\n\t\t\t\t\t\t'status' \t\t\t=> 1\n\t\t\t\t\t);\n\t\t\t\t\t$this->Appointment->create();\n\t\t\t\t\t$this->Appointment->save($save);\n\t\t\t\t\t\n\t\t\t\t\t$this->Appointment->id = $this->Appointment->getLastInsertId();\n\t\t\t\t\t$appointment = $this->Appointment->field('Appointment.appointment_id');\n\t\t\t\t\t\n\t\t\t\t\t$stdate = date_create( date('Y-m-d',$i). $this->request->data['Appointment']['appoint_start_time']);\n\t\t\t\t\t$start = date_sub($stdate, date_interval_create_from_date_string('2 hours'));\n\t\t\t\t\t$edate = date_create( date('Y-m-d',$i). $this->request->data['Appointment']['appoint_end_time']);\n\t\t\t\t\t$end = date_sub($edate, date_interval_create_from_date_string('2 hours'));\n\t\t\t\t\t\n\t\t\t\t\t$appointments[$appointment] = array(\n\t\t\t\t\t\t\t'summary' => $this->request->data['Appointment']['description'],\n\t\t\t\t\t\t\t'start' => array(\n\t\t\t\t\t\t\t\t'dateTime' => date_format($start,DATE_ATOM),\n\t\t\t\t\t\t\t\t'timeZone' => 'Europe/Paris'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'end' => array(\n\t\t\t\t\t\t\t\t'dateTime' => date_format($end,DATE_ATOM),\n\t\t\t\t\t\t\t\t'timeZone' => 'Europe/Paris'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t$i = strtotime(\"+1 day\", $i);\n\t\t\t\t}\n\n\t\t\t\t$dbo = $this->AvailabilitySetting->getDatasource();\n\t\t\t\t$value = $dbo->value('Doctor\\'s Personal Appointment', 'string');\n\t\t\t\t$this->AvailabilitySetting->updateAll(\n\t\t\t\t\tarray('AvailabilitySetting.status' => 2, 'AvailabilitySetting.comment' => $value),\n\t\t\t\t\t// conditions\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'AvailabilitySetting.available_date BETWEEN ? AND ?' => array(\n\t\t\t\t\t\t\tdate('Y-m-d',strtotime($filter_start)), \n\t\t\t\t\t\t\tdate('Y-m-d',strtotime($filter_end))\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'AvailabilitySetting.vet_id' => $this->Session->read('vet.id'),\n\t\t\t\t\t\t'AvailabilitySetting.status' => 1,\n\t\t\t\t\t\t\n\t\t\t\t\t\t'TIME(AvailabilitySetting.slots) >=' =>date('H:i:s',strtotime($this->request->data['Appointment']['appoint_start_time'])),\n\t\t\t\t\t\t'TIME(AvailabilitySetting.slots) <=' =>date('H:i:s',strtotime('+ 5 mins', strtotime($this->request->data['Appointment']['appoint_end_time'])))\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$data = $appointments;\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\t$data['message'] = 'Unable to find details. Please try again later.';\n\t\t}\n\t\techo json_encode($data);\n\t}", "public function store(Request $request)\n {\n $start_date = Carbon::parse($request->start_date)->format('Y-m-d');\n $starttime = date(\"G:i\", strtotime($request->starttime));\n\n session_start();\n $appointee_id = $request->appointee;\n $appointee = User::find($appointee_id);\n $client = User::where('email', $request->client_email)->first();\n $startDateTime = $start_date. 'T' .$starttime . ':00+06:00';\n $endtime = $dt = Carbon::parse($start_date . ' ' .$starttime. ':00')->addMinutes(30);\n $endDateTime = $start_date. 'T' .$endtime->toTimeString(). '+06:00';\n\n if (isset($_SESSION['access_token']) && $_SESSION['access_token']) {\n $this->client->setAccessToken($_SESSION['access_token']);\n $service = new Google_Service_Calendar($this->client);\n $sendNotifications = array('sendNotifications' => true);\n\n $calendarId = 'primary';\n $event = new Google_Service_Calendar_Event([\n 'summary' => $request->title,\n 'description' => $request->description,\n 'start' => ['dateTime' => $startDateTime],\n // 'sendNotifications' => true,\n 'overrides' => array(\n array('method' => 'email', 'minutes' => 24 * 60),\n array('method' => 'popup', 'minutes' => 1),\n ),\n 'end' => ['dateTime' => $endDateTime],\n 'reminders' => ['useDefault' => true],\n 'attendees' => [\n [\n 'email' => $request->client_email, \n 'responseStatus' => 'needsAction'\n ],\n [\n 'email' => $appointee->email,\n 'responseStatus' => 'needsAction'\n ],\n ],\n \"extendedProperties\" =>\n [\"private\" => [\"everyoneDeclinedDismissed\" => -1],\n \"useDefault\" => true]\n \n ]);\n\n\n $results = $service->events->insert($calendarId, $event, $sendNotifications);\n // if ($results) {\n // // return response()->json(['status' => 'error', 'message' => 'Something went wrong']);\n // // return redirect()->back();\n // return view('appointment.acknowledgement');\n // }\n\n\n // return response()->json(['status' => 'success', 'message' => 'Event Created']);\n Appointment::updateOrCreate(\n [\n 'title' => $request->title,\n 'appointer_id' => $appointee->id,\n 'client_id' => $client->id,\n\n ],\n [\n 'title' => $request->title,\n 'appointer_id' => $appointee->id,\n 'client_id' => $client->id,\n 'app_date' => $start_date,\n 'app_time' => $starttime,\n ]);\n\n $appointment = Appointment::where([\n 'appointer_id' => $appointee->id,\n 'client_id' => $client->id,\n 'app_date' => $start_date,\n 'app_time' => $starttime,\n ])->first();\n\n // return redirect()->route('email', [$appointee->id, $client->id, $appointment->id]);\n return view('appointment.acknowledgement');\n\n } else {\n \n return redirect()->route('oauthCallback');\n \n }\n\n }", "public function set_date_reminder($date)\n {\n }", "function meeting_agenda_items() {\n return meeting_agenda_items_list();\n}", "function afterSave() {\n\t\t$d = $this->data[$this->alias];\n\t\t$appointment_model = ClassRegistry::init('Appointment');\n\n\t\tif(preg_match(\"/yes/i\", $this->leaver($this->data))) {\n\t\t\t$appts = $appointment_model->find('all', array(\n\t\t\t\t'contain' => array(),\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'person_id' => $this->data[$this->alias]['person_id'],\n\t\t\t\t\t'from_date >=' => date('Y-m-d H:i:s', strtotime($this->data[$this->alias]['employment_end_date'])\n\t\t\t\t)\n\t\t\t)));\n\t\t\tif(!empty($appts)) {\n\t\t\t\t$diagnosis_query = \"SELECT id FROM diagnoses WHERE description LIKE 'unable to code'\";\n\t\t\t\t$diagnosis = $this->query($diagnosis_query);\n\n\t\t\t\t$outcome_query = \"SELECT id FROM attendance_outcomes WHERE title LIKE 'left company'\";\n\t\t\t\t$outcome = $this->query($outcome_query);\n\t\t\t}\n\t\t\tforeach ($appts as $a) {\n\t\t\t\tif($a['Appointment']['passes_late_cancelation_condition'] == 0) {\n\t\t\t\t\t$review = $a['Appointment']['new_or_review'] == \"review\" ? 'Y' : 'N';\n\n\t\t\t\t\t// Create 'Late Cancellation' attendance\n\t\t\t\t\t$attendanceData = array(\n\t\t\t\t\t\t'seen_at_time' => $a['Appointment']['from_date'],\n\t\t\t\t\t\t'attendance_result_code' => 'LC',\n\t\t\t\t\t\t'clinic_staff_id' => $this->current_user_id,\n\t\t\t\t\t\t'review_attendance' => $review,\n\t\t\t\t\t\t'diagnosis_id' => $diagnosis[0]['diagnoses']['id'],\n\t\t\t\t\t\t'is_discharged' => true,\n\t\t\t\t\t\t'outcome_id' => $outcome[0]['attendance_outcomes']['id']\n\t\t\t\t\t);\n\n\t\t\t\t\t$appointment_model->makeAttendance($a['Appointment']['id'], $attendanceData);\n\t\t\t\t}\n\t\t\t\t$appointment_model->delete($a['Appointment']['id'], \"Employee is a leaver\");\n\t\t\t}\n\t\t}\n\t}", "public function message()\n {\n return 'You already have an appointment scheduled at this time.';\n }", "public function addAppointment($appId,$date,$startTime,$endTime,$description,$custId){\n $data = array(\n 'appointment_id' => $appId,\n 'appointment_date' => $date,\n 'start_time' => $startTime,\n 'end_time' => $endTime,\n 'description' => $description,\n 'cust_id' => $custId,\n );\n try{\n $result=$this->db->insert('appointment',$data);\n }\n catch (Exception $e){\n echo $e;\n }\n }", "public function addJob( Erfurt_Worker_Job_Container $job )\n {\n $this->jobs[] = $job;\n }", "public function addFromList(Request $request)\n {\n $task = new TaskAdd();\n $request->reward = json_decode($request->reward);\n $task->name = $request->reward->name;\n $task->description = $request->reward->description;\n $task->goal_id = $request->reward->goal_id;\n $task->user_id = Auth::id();\n $task->points = $request->reward->points;\n $task->done = 0;\n $task->due_date = $request->due_date;\n $task->save();\n $notification=array(\n 'messege'=>'Task From The List Added',\n 'alert-type'=>'success'\n );\n return Redirect()->back()->with($notification);\n \n \n }", "function pt_add() {\n\t\t$this->_clean_cron_array();\n\t\twp_schedule_event( time(), 'every_50', $this->_hook, array() );\n\t}", "public function bkap_add_reschedule_link( $item_id, $item, $order ) {\n\n $book_item_meta_date = ( '' == get_option( 'book_item-meta-date' ) ) ? __( 'Start Date', 'woocommerce-booking' ) : get_option( 'book_item-meta-date' ) ;\n $checkout_item_meta_date = ( '' == get_option( 'checkout_item-meta-date' ) ) ? __( 'End Date', 'woocommerce-booking' ) : get_option( 'checkout_item-meta-date' );\n $book_item_meta_time = ( '' == get_option( 'book_item-meta-time' ) ) ? __( 'Booking Time', 'woocommerce-booking' ) : get_option( 'book_item-meta-time' );\n\n if ( is_wc_endpoint_url( 'view-order' ) ) {\n\n $order_status = $order->get_status();\n\n if( isset( $order_status ) && ( $order_status !== 'cancelled' ) && ( $order_status !== 'refunded' ) && ( $order_status !== 'trash' ) && ( $order_status !== '' ) && ( $order_status !== 'failed' ) && ( 'auto-draft' !== $order_status ) && !bkap_common::bkap_is_orderitem_bundled( $item ) && !bkap_common::bkap_is_orderitem_composite( $item ) ) {\n\n $booking_details = array(\n 'date' => '',\n 'hidden_date' => '',\n 'date_checkout' => '',\n 'hidden_date_checkout' => '',\n 'price' => '' );\n\n foreach ( $item->get_meta_data() as $meta_index => $meta ) {\n \n if ( $meta->key === $book_item_meta_date ) {\n $booking_details['date'] = $meta->value;\n }elseif ( $meta->key === '_wapbk_booking_date' ) {\n $hidden_date = explode( '-', $meta->value );\n $booking_details['hidden_date'] = $hidden_date[2] . '-' . $hidden_date[1] . '-' . $hidden_date[0];\n }elseif ( $meta->key === $checkout_item_meta_date ) {\n $booking_details['date_checkout'] = $meta->value;\n }elseif ( $meta->key === '_wapbk_checkout_date' ) {\n $hidden_date_checkout = explode( '-', $meta->value );\n $booking_details['hidden_date_checkout'] = $hidden_date_checkout[2] . '-' . $hidden_date_checkout[1] . '-' . $hidden_date_checkout[0];\n }elseif ( $meta->key === $book_item_meta_time ){\n $booking_details['time_slot'] = $meta->value;\n }elseif( $meta->key == '_resource_id' ) {\n $booking_details['resource_id'] = $meta->value;\n }\n }\n\n $diff_days = (strtotime($booking_details['hidden_date']) - current_time('timestamp'))/60/60/24;\n $global_settings = json_decode( get_option( 'woocommerce_booking_global_settings' ) );\n\n if( isset( $global_settings->bkap_enable_booking_reschedule ) &&\n isset( $global_settings->bkap_booking_reschedule_days ) &&\n $diff_days >= $global_settings->bkap_booking_reschedule_days && \n $global_settings->bkap_enable_booking_reschedule === 'on' &&\n $booking_details['date'] !== '' ) {\n\n printf( '<input type=\"button\" class=\"bkap_edit_bookings\" onclick=\"bkap_edit_booking_class.bkap_edit_bookings(%d,%s)\" value=\"%s\">', $item->get_product_id( 'view' ), $item_id, __( 'Edit Bookings', 'woocommerce-booking' ) );\n\n $localized_array = array( \n 'bkap_booking_params' => $booking_details,\n 'bkap_cart_item' => $item,\n 'bkap_cart_item_key' => $item_id,\n 'bkap_order_id' => $order->get_id(),\n 'bkap_page_type' => 'view-order'\n );\n\n // Additional Data for addons\n $additional_addon_data = bkap_common::bkap_get_order_item_addon_data( $item );\n\n self::bkap_load_template( \n $booking_details, \n $item->get_product(), \n $item->get_product_id( 'view' ), \n $localized_array,\n $item_id,\n $item->get_variation_id( 'view' ),\n $additional_addon_data );\n }\n }\n }\n }", "public function appointment_reminder_lanlord(Request $request){\r\n\t\t$appoint_information = User::with(array(\r\n\t\t\t'landlord_appointment'=>function($query){\r\n\t\t\t\t$query->select('id','property_id','landlord_id','date','landlord_reminder','time');\r\n\t\t\t},'landlord_appointment.property'))->orderBy('id', 'Asc')\r\n\t\t\t->has('landlord_appointment')->get()->toArray();\r\n\t\t\t//echo '<pre>',print_r($appoint_information),'</pre>';die;\r\n\t\t\t if(isset($appoint_information) && count($appoint_information)>0 ){\r\n\t\t\t\t// for each lanlord \r\n\t\t\t\tforeach($appoint_information as $landlord_appoint_info){\r\n\t\t\t\t\t$lanlord_data = array();\r\n\t\t\t\t\t$lanlord_data['email'] = $landlord_appoint_info['email'];\r\n\t\t\t\t\t$lanlord_data['name'] = $landlord_appoint_info['name'];\r\n\t\t\t\t\t// echo '<pre>',print_r($landlord_appoint_info),'</pre>';die;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// for each property\r\n\t\t\t\t\t$property_data = array();\r\n\t\t\t\t\tforeach($landlord_appoint_info['landlord_appointment'] as $property_info){\r\n\t\t\t\t\t\t// echo '<pre>',print_r($property_info),'</pre>';die;\r\n\t\t\t\t\t\t$property_data_info['appointment_date'] = $property_info['date'];\r\n\t\t\t\t\t\t$property_data_info['time'] = $property_info['time'];\r\n\t\t\t\t\t\t$property_data_info['property_name'] = $property_info['property']['property_name'];\r\n\t\t\t\t\t\t$property_data[] = $property_data_info;\r\n\r\n\t\t\t\t\t\t$insert_data['landlord_reminder'] = '1';\r\n\t\t\t\t\t\t$insert_data['updated_at'] = date('Y-m-d H:i:s');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// update appointments table\r\n\t\t\t\t\t\tDB::table('appointments')\r\n\t\t\t\t\t\t\t->where('id',$property_info['id'])\r\n\t\t\t\t\t\t\t->update($insert_data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// echo '<pre>',print_r($property_data),'</pre>';die;\r\n\r\n\t\t\t\t\t/* Email Notification to Landlord*/\r\n\t\t\t\t\t$email_information = array('to_name'=>$lanlord_data['name'],'to_email'=>$lanlord_data['email'],'from_name'=>config('app.name'),'from_email'=>config('app.email'),'subject'=>'Appointment Reminder');\r\n\t\t\t\t\t$email_content = array('property_data'=>$property_data,'to_name'=>$lanlord_data['name']);\r\n\t\t\t\t\tMail::send(['html' => 'emails.appointment_reminder'], $email_content, function($message) use ($email_information)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$message->to($email_information['to_email'], $email_information['to_name'])->subject\r\n\t\t\t\t\t\t\t($email_information['subject']);\r\n\t\t\t\t\t\t$message->from($email_information['from_email'],$email_information['from_name']);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Email Notification to Lanlord */\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t}", "public function addAppointment() {\n $query = $this->db->prepare('INSERT INTO `appointments` (`dateHour`, `idPatients`) VALUES (:dateHour, :idPatients)');\n $query->bindValue(':dateHour', $this->dateHour, PDO::PARAM_STR);\n $query->bindValue(':idPatients', $this->idPatients, PDO::PARAM_INT);\n return $query->execute();\n }", "protected function register_cron_jobs()\n\t\t{ \n\t\t\tif( wp_next_scheduled( self::PREFIX . 'cron_import_meetup_events' ) === false )\n\t\t\t{\n\t\t\t\twp_schedule_event(\n\t\t\t\t\tcurrent_time( 'timestamp' ),\n\t\t\t\t\tself::PREFIX . 'debug', // TODO: set to 'hourly' when done testing\n\t\t\t\t\tself::PREFIX . 'cron_import_meetup_events'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "function addScheduledJob() {\n try {\n $jobView = new ScheduledJobViewData();\n\t $jobView->addScheduledJob(\n $_POST['classname'], $_POST['repeat_every_min'], $_POST['daily_at'], $_POST['params'] ?? array() );\n $jobView->doView();\n\n ?>\n <script type=\"text/javascript\">\n jQuery(\"#job_schedule_table\")\n .html('<?php echo preg_replace('#\\R+#', '', $jobView->toHtml()); ?>');\n jQuery(\"#add_job_button\").css(\"visibility\", \"visible\");\n </script>\n <?php\n }\n catch( Exception $e ) {\n ?> \n <script type=\"text/javascript\">\n jQuery(\"#ajax_response\")\n .html('<?php echo $e->getMessage(); ?>')\n .css({ 'color': 'red' });\n jQuery(\"#add_job_button\").css(\"visibility\", \"visible\");\n </script>\n <?php\n }\n }", "static function valid_appointment($data)\n\t{\n\t\t$db = &JFactory::getDbo();\n\t\t$db->setQuery('select * from #__pbbooking_config');\n\t\t$config = $db->loadObject();\n\t\t$db->setQuery('select * from #__pbbooking_treatments where id = '.$db->escape($data['treatment_id']));\n\t\t$treatment = $db->loadObject();\n\t\t\n\t\t$joom_config =&JFactory::getConfig();\n \tdate_default_timezone_set($joom_config->get('offset'));\t\n\n\t\t//load up the calendar for the nominated treatment\n\t\t$cal = new calendar();\n\t\t$cal->loadCalendarFromDbase(array($data['cal_id']));\n\t\t\n\t\t$treatment_start = date_create($data['date'],new DateTimeZone(PBBOOKING_TIMEZONE));\n\t\t$start_time = str_split($data['treatment_time'],2);\n\t\t$treatment_start->setTime((int)ltrim($start_time[0],'0'),(int)ltrim($start_time[1],'0'));\n\t\t$treatment_end = date_create($treatment_start->format(DATE_ATOM),new DateTimeZone(PBBOOKING_TIMEZONE));\n\t\t$treatment_end->modify('+'.$treatment->duration.' minutes');\n\t\tif (!$cal->is_free_from_to($treatment_start,$treatment_end)) {\n\t\t\t//error_log ('cal is free');\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//error_log('cal is busy');\n\t\t\treturn false;\n\t\t}\n\t}", "public static function bookAppointment($data) {\n // Validate the user's given times\n $valid = self::validateAppointment($data);\n\n if ($valid) {\n try {\n $appointment_data = array();\n\n // Set parameters and values for each detail\n foreach (array_keys($data) as $detail) {\n $appointment_data[$detail] = array(\n 'param' => \":$detail\",\n 'value' => $data[$detail],\n );\n }\n\n // Add unique ID to the appointment\n $appointment_data['id'] = array(\n 'param' => \":id\",\n 'value' => uniqid('ap-', true),\n );\n\n // Remove unneeded details for insertion\n unset($appointment_data['patient_id']);\n unset($appointment_data['contact_by_email']);\n unset($appointment_data['contact_by_text']);\n\n // Insert record for the booked appointment\n $appointment_result = $GLOBALS['app']->getDB()->insert('appointment', $appointment_data);\n\n if ($appointment_result) {\n // Retrieve the details of the patient's facility\n $facility_details = UserManager::getUserFacility($data['patient_id']);\n\n $GLOBALS['successes'][] = 'The appointment has been successfully booked.';\n\n // Define message to be sent via the user's contact preferences\n $message = 'Your requested appointment with ';\n $message .= isset($facility_details['name']) ? $facility_details['name'] : 'us';\n $message .= ' has been booked. Please log on to see the confirmed details.';\n\n if ($data['contact_by_email']) {\n UserManager::receiveEmail($data['patient_id'], $message);\n }\n if ($data['contact_by_text']) {\n UserManager::receiveSms($data['patient_id'], $message);\n }\n } else {\n $GLOBALS['errors'][] = 'An unexpected error has occurred. Please check your input and try again.';\n }\n } catch (PDOException $e) {\n $GLOBALS['errors'][] = $e->getMessage();\n }\n } else {\n $GLOBALS['errors'][] = 'Sorry, your selections were in an incorrect format. Please check them and try again.';\n }\n }", "public function api_setNoContactsReminder() {\n //successivamente i metodi NoContacts7 e NoContacts15 invieranno i template mandrill\n \n \n $jobs='reminder';\n $template='ImportaContatti';\n $reason='7gg NoContacts';\n $days=7;\n \n $db = $this->Member->getDataSource();\n \n /* SUPERQUERY ESTRAE I MEMBRI REGISTRATI 7GG FA CHE NON HANNO CONDIVISO I CONTATTI.*/ \n \n $query=\"INSERT INTO tmp_cronjobs(membig,name,surname,email,jobs,template,reason,user_created,job_created) \".\n \"SELECT m.big,m.name,m.surname,m.email,'$jobs','$template','$reason', m.created, CURRENT_DATE \".\n \"FROM members m \".\n \"LEFT JOIN contacts c ON m.big=c.member_big \".\n \"WHERE DATE(created) = DATE(NOW() - interval '$days days') \".\n \"AND c.name IS NULL AND status<255 \".\n \"ORDER BY big ASC\";\n \n //print($query);\n try {\n $db->fetchAll($query);\n }\n catch (Exception $e)\n {\n debug($e);\n return false;\n }\n \n \n \n $jobs='reminder';\n $template='ImportaContatti_reminder';\n $reason='15gg NoContacts';\n $days=15;\n \n \n $query=\"INSERT INTO tmp_cronjobs(membig,name,surname,email,jobs,template,reason,user_created,job_created) \".\n \"SELECT m.big,m.name,m.surname,m.email,'$jobs','$template','$reason', m.created, CURRENT_DATE \".\n \"FROM members m \".\n \"LEFT JOIN contacts c ON m.big=c.member_big \".\n \"WHERE DATE(created) = DATE(NOW() - interval '$days days') \".\n \"AND c.name IS NULL AND status<255 \".\n \"ORDER BY big ASC\";\n \n //print($query);\n try {\n $db->fetchAll($query);\n }\n catch (Exception $e)\n {\n debug($e);\n return false;\n }\n \n \n \n //print_r($members); \n return true;\n }", "public function approval_generate_old() {\n //send email and notification to renew application and persist reminder\n //Reminders should not be sent to completed studies\n \t$this->out('Starting...');\n $options['joins'] = array(\n array('table' => 'annual_letters',\n 'alias' => 'AnnualLetter',\n 'type' => 'INNER',\n 'conditions' => array(\n 'Application.id = AnnualLetter.application_id',\n )\n )\n );\n $options['conditions'] = array(\n 'Application.submitted' => 1, \n // 'Application.trial_status_id' => 5,\n 'Application.deactivated' => 0,\n );\n $options['contain'] = array('AnnualLetter' => array('limit' => 1, 'order' => array('AnnualLetter.id DESC')), 'InvestigatorContact', 'AnnualApproval');\n $applications = $this->Application->find('all', $options);\n\n // Notify managers approval generated awaiting approval\n $html = new HtmlHelper(new ThemeView());\n $type = 'manager_approve_letter';\n $message = $this->Message->find('first', array('conditions' => array('name' => $type)));\n foreach ($applications as $application) {\n \t\t//Create annual approval letter\n\t $approval_letter = $this->Pocket->find('first', array('conditions' => array('Pocket.name' => 'annual_approval_letter')));\n\n\t $checklist = array();\n\t foreach ($application['AnnualApproval'] as $formdata) { \n\t $file_link = $html->link(__($formdata['basename']), array('controller' => 'attachments', 'action' => 'download', $formdata['id'], 'admin' => false));\n\t (isset($checklist[$formdata['pocket_name']])) ? \n\t $checklist[$formdata['pocket_name']] .= $file_link.' dated '.date('jS F Y', strtotime($formdata['file_date'])).' Version '.$formdata['version_no'].'<br>' : \n\t $checklist[$formdata['pocket_name']] = $file_link.' dated '.date('jS F Y', strtotime($formdata['file_date'])).' Version '.$formdata['version_no'].'<br>';\n\t }\n\t $deeds = $this->Pocket->find('list', array(\n\t 'fields' => array('Pocket.name', 'Pocket.content'),\n\t 'conditions' => array('Pocket.type' => 'annual'),\n\t 'recursive' => 0\n\t ));\n\t // debug($deeds);\n\t $checkstring='';\n\t $cnt = 0;\n\t foreach ($checklist as $kech => $check) {\n\t $cnt++;\n\t $checkstring .= $cnt.'. '.$deeds[$kech].'<br>'.$check;\n\t }\n\n\t $cnt = $this->Application->AnnualLetter->find('count', array('conditions' => array('AnnualLetter.application_id' => $application['Application']['id'])));\n\t $cnt++;\n\t $year = date('Y', strtotime($this->Application->field('approval_date')));\n\t $approval_no = 'APL/'.$cnt.'/'.$year.'-'.$application['Application']['protocol_no'];\n\t $expiry_date = date('jS F Y', strtotime($application['Application']['approval_date'] . \" +1 year\"));\n\t $variables = array(\n\t 'approval_no' => $approval_no, 'protocol_no' => $application['Application']['protocol_no'], \n\t 'letter_date' => date('jS F Y', strtotime($application['Application']['approval_date'])),\n\t 'qualification' => $application['InvestigatorContact'][0]['qualification'],\n\t 'names' => $application['InvestigatorContact'][0]['given_name'].' '.$application['InvestigatorContact'][0]['middle_name'].' '.$application['InvestigatorContact'][0]['family_name'],\n\t 'professional_address' => $application['InvestigatorContact'][0]['professional_address'],\n\t 'telephone' => $application['InvestigatorContact'][0]['telephone'],\n\t 'study_title' => $application['Application']['short_title'],\n\t 'checklist' => $checkstring,\n\t 'status' => $application['TrialStatus']['name'], \n\t 'expiry_date' => $expiry_date\n\t );\n\t $save_data = array('AnnualLetter' => array(\n\t 'application_id' => $application['Application']['id'],\n\t 'approval_no' => $approval_no,\n\t 'approver' => $this->Session->read('Auth.User.name'),\n\t 'approval_date' => date('Y-m-d H:i:s'),\n\t 'expiry_date' => $expiry_date,\n\t 'status' => 'AnnualApprovalLetter',\n\t 'content' => String::insert($approval_letter['Pocket']['content'], $variables)\n\t ),\n\t );\n\t $this->set('save_data', $save_data);\n\n //*************************** Send Email and Notifications Managers *****************************\n \t\t$this->out('Application: ' . $application['Application']['user_id']);\n \n $users = $this->User->find('all', array(\n 'contain' => array('Group'),\n 'conditions' => array('User.group_id' => 2) //Managers\n ));\n foreach ($users as $user) {\n \t$this->out('User: ' . $user['User']['name']);\n if (isset($application['AnnualLetter'][0])) {\n \t$this->out('AnnualLetter ' . $application['AnnualLetter'][0]['expiry_date']);\n \t$variables = array(\n\t\t 'name' => $user['User']['name'], 'protocol_no' => $application['Application']['protocol_no'],\n\t\t 'protocol_link' => $html->link($application['Application']['protocol_no'], array('controller' => 'applications', 'action' => 'view', $application['Application']['id'], $user['Group']['redir'] => true, \n\t\t 'full_base' => true), array('escape' => false)),\n\t\t 'approval_date' => $application['Application']['approval_date'], 'expiry_date' => $application['AnnualLetter'][0]['expiry_date']\n\t\t );\n\t $datum = array(\n\t 'email' => $user['User']['email'],\n\t 'id' => $application['Application']['id'], 'user_id' => $user['User']['id'], 'type' => $type, 'model' => 'AnnaulLetter',\n\t 'subject' => String::insert($message['Message']['subject'], $variables),\n\t 'message' => String::insert($message['Message']['content'], $variables)\n\t );\n\t $this->sendEmail($datum);\n\t $this->sendNotification($datum);\n\t $this->log($datum, 'approval_reminder');\n } \n }\n //********************************** END *********************************\n //end\n }\n }", "function specialist_appointment_reminder_template($event_info, $location, $date_time) {\r\n $name = $event_info[0];\r\n $name_2 = $event_info[1];\r\n $phone = $event_info[2];\r\n $date = $date_time['date'];\r\n $time = $date_time['time'];\r\n return \"Reminder of your appointment with \" . $name . \" on \" . $date . \" at \" . $time . \" at \" . $location . \". Any questions call \" . $name_2 . \", Victoria Legal Aid on \" . $phone . \".\";\r\n}", "function vla_apoint_reminder_template($event_info, $location, $date_time) { \r\n $name = $event_info[0];\r\n $phone = $event_info[1];\r\n $date = $date_time['date'];\r\n $time = $date_time['time'];\r\n return \"Hi, reminder to attend your appointment with Victoria Legal Aid at \" . $location . \" on \" . $date . \" at \" . $time . \". To change, call \" . $name . \" on \" . $phone . \".\";\r\n}", "public function add_appointment($docname, $patname, $patemail, $patcontactno, $patAge, $fees, $appdate, $apptime)\r\n {\r\n $d1 = Database::GetInstance();\r\n\r\n $query = \"INSERT INTO `appointment`( `doctorName`, `patientName`, `patientEmail`, `patientNumber`, `patientAge`, `consultancyFees`, `appointmentDate`, `appointmentTime`) VALUES ('$docname','$patname','$patemail','$patcontactno','$patAge','$fees','$appdate','$apptime')\";\r\n $ret = mysqli_query($d1->GetConnection(), $query);\r\n\r\n return $ret;\r\n }", "public function addEventAction()\n {\n $messages = array();\n \n $get = Zend_Registry::get('getFilter');\n \n $event = new Event();\n \n $values = array();\n if (isset($get->date)) {\n $values['date'] = $get->date; \n }\n \n $form = $event->form($values);\n \n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n $workshopId = $form->getValue('workshop');\n $locationId = $form->getValue('location');\n $startTime = $form->getValue('startTime');\n $endTime = $form->getValue('endTime');\n $date = $form->getValue('date');\n $minSize = $form->getValue('minSize');\n $maxSize = $form->getValue('maxSize');\n $waitlistSize = $form->getValue('waitlistSize');\n $instructors = $form->getValue('instructors');\n $password = $form->getValue('password');\n $evaluationType = $form->getValue('evaluationType');\n $formKey = $form->getValue('formKey');\n $answerKey = $form->getValue('answerKey'); \n \n if (isset($formKey) && $formKey != '') {\n $regex = '(?<=key\\=)\\w*';\n $matches = array();\n preg_match_all (\"/\".$regex.\"/is\", $form->getValue('formKey'), $matches);\n $formKey = $matches[0][0];\n }\n \n if (isset($answerKey) && $answerKey != '') {\n $regex = '(?<=key\\=)\\w*';\n $matches = array();\n preg_match_all (\"/\".$regex.\"/is\", $form->getValue('answerKey'), $matches);\n $answerKey = $matches[0][0];\n }\n \n $date = strtotime($date);\n $date = strftime('%Y', $date) . \"-\" . strftime('%m', $date) . \"-\" . strftime('%d', $date);\n \n if (strtolower($startTime['meridian']) == \"pm\" && $startTime['hour'] < 12) {\n $startTime['hour'] += 12;\n }\n \n if (strtolower($startTime['meridian']) == \"am\" && $startTime['hour'] == 12) {\n $startTime['hour'] = 0;\n }\n \n if (strtolower($endTime['meridian']) == \"pm\" && $endTime['hour'] < 12) {\n $endTime['hour'] += 12;\n }\n \n if (strtolower($endTime['meridian']) == \"am\" && $endTime['hour'] == 12) {\n $endTime['hour'] = 0;\n }\n \n $timesOk = true;\n \n $st = new Zend_Date($date);\n $st->setHour($startTime['hour'])->setMinute($startTime['minute']);\n $et = new Zend_Date($date);\n $et->setHour($endTime['hour'])->setMinute($endTime['minute']);\n \n if ($st->isLater($et)) {\n $timesOk = false;\n $messages[] = \"msg-error-eventStartsAfter\";\n } else if ($st->equals($et)) {\n $timesOk = false;\n $messages[] = \"msg-error-eventTimesEqual\";\n }\n \n $startTime = $startTime['hour'] . \":\" . $startTime['minute'] . \":00\";\n $endTime = $endTime['hour'] . \":\" . $endTime['minute'] . \":00\";\n \n $where = $event->getAdapter()->quoteInto('date = ?', $date)\n . \" AND \" . $event->getAdapter()->quoteInto('locationId = ?', $locationId)\n . \" AND \" . $event->getAdapter()->quoteInto('status = ?', 'open');\n \n $possibleConflicts = $event->fetchAll($where);\n \n $conflictFound = false;\n \n if ($possibleConflicts->count() > 0) {\n \n $startTs = strtotime($startTime);\n $endTs = strtoTime($endTime);\n \n foreach($possibleConflicts as $pc) {\n \n $pcStart = strtotime($pc->startTime);\n $pcEnd = strtotime($pc->endTime);\n \n if ($startTs == $pcStart) {\n $conflictFound = true;\n } else if (($startTs < $pcStart) && ($endTs > $pcStart)) {\n $conflictFound = true;\n } else if (($startTs >= $pcStart) && ($endTs <= $pcEnd)) { \n $conflictFound = true;\n } else if (($startTs < $pcEnd) && ($endTs >= $pcEnd)) {\n $conflictFound = true;\n } else if (($startTs < $pcStart) && ($endTime > $pcEnd)) {\n $conflictFound = true;\n } \n \n if ($conflictFound) {\n $messages[] = \"msg-error-eventAlreadyScheduled\";\n break;\n }\n }\n }\n \n $evaluationCheck = true;\n \n if ($evaluationType == 'google') {\n $evaluationCheck = isset($formKey) && isset($answerKey);\n } else {\n $evaluationCheck = $evaluationType == 'default';\n }\n \n if (!$evaluationCheck) {\n $messages[] = 'msg-error-eventFormKeyMissing';\n }\n\n if (!$conflictFound && $timesOk && $evaluationCheck) {\n \n $data = array('locationId' => $locationId,\n 'workshopId' => $workshopId,\n 'startTime' => $startTime,\n 'endTime' => $endTime,\n 'date' => $date,\n 'minSize' => $minSize,\n 'maxSize' => $maxSize,\n 'waitlistSize' => $waitlistSize,\n 'password' => $password,\n 'evaluationType' => $evaluationType,\n 'formKey' => $formKey,\n 'answerKey' => $answerKey\n );\n \n $eventId = $event->insert($data);\n \n $instructor = new Event_Instructor();\n \n foreach ($instructors as $i) {\n $instructor->insert(array('accountId' => $i, 'eventId' => $eventId));\n }\n \n $this->_helper->flashMessenger->addMessage('msg-info-eventAdded');\n $date = explode('-', $date);\n $this->_helper->redirector->gotoUrl('/workshop/schedule?startYear=' . $date[0] . '&startMonth=' . (int)$date[1]);\n }\n } else {\n $messages[] = \"msg-error-formSubmitProblem\";\n }\n }\n \n $this->view->messages = $messages;\n $this->view->headScript()->appendFile($this->view->baseUrl() . '/scripts/jquery.autocomplete.js');\n $this->view->headScript()->appendFile($this->view->baseUrl() . '/scripts/workshop/schedule/help.js');\n $this->view->headLink()->appendStylesheet($this->view->baseUrl() . '/css/jquery.autocomplete.css');\n $this->view->headLink()->appendStylesheet($this->view->baseUrl() . '/css/workshop/schedule/help.css');\n $this->view->form = $form;\n $this->_helper->pageTitle('workshop-schedule-addEvent:title');\n }", "function &default_add_event()\n\t{\n\t\t$extra_participants = $_GET['participants'] ? explode(',',$_GET['participants']) : array();\n\n\t\tif (isset($_GET['owner']))\n\t\t{\n\t\t\t$owner = $_GET['owner'];\n\t\t}\n\t\t// dont set the planner start group as owner/participants if called from planner\n\t\telseif ($this->view != 'planner' || $this->owner != $this->cal_prefs['planner_start_with_group'])\n\t\t{\n\t\t\t$owner = $this->owner;\n\t\t}\n\n\t\tif (!$owner || !is_numeric($owner) || $GLOBALS['egw']->accounts->get_type($owner) != 'u' ||\n\t\t\t!$this->bo->check_perms(EGW_ACL_ADD,0,$owner))\n\t\t{\n\t\t\tif ($owner)\t// make an owner who is no user or we have no add-rights a participant\n\t\t\t{\n\t\t\t\t// if we come from ressources we don't need any users selected in bcalendar\n\t\t\t\tif (!isset($_GET['participants']) || $_GET['participants'][0] != 'r')\n\t\t\t\t{\n\t\t\t\t\tforeach(explode(',',$owner) as $uid)\n\t\t\t\t\t{\n\t\t\t\t\t\t// only add users or a single ressource, not all ressources displayed by a category\n\t\t\t\t\t\tif (is_numeric($uid) || $owner == $uid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extra_participants[] = $uid;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$owner = $this->user;\n\t\t}\n\t\t//echo \"<p>this->owner=$this->owner, _GET[owner]=$_GET[owner], user=$this->user => owner=$owner, extra_participants=\".implode(',',$extra_participants).\"</p>\\n\";\n\n\t\t// by default include the owner as participant (the user can remove him)\n\t\t$extra_participants[] = $owner;\n\n\t\t$start = $this->bo->date2ts(array(\n\t\t\t'full' => isset($_GET['date']) && (int) $_GET['date'] ? (int) $_GET['date'] : $this->date,\n\t\t\t'hour' => (int) (isset($_GET['hour']) && (int) $_GET['hour'] ? $_GET['hour'] : $this->bo->cal_prefs['workdaystarts']),\n\t\t\t'minute' => (int) $_GET['minute'],\n\t\t));\n\t\t//echo \"<p>_GET[date]=$_GET[date], _GET[hour]=$_GET[hour], _GET[minute]=$_GET[minute], this->date=$this->date ==> start=$start=\".date('Y-m-d H:i',$start).\"</p>\\n\";\n\n\t\t$participant_types['u'] = $participant_types = $participants = array();\n\t\tforeach($extra_participants as $uid)\n\t\t{\n\t\t\tif (isset($participants[$uid])) continue;\t// already included\n\n\t\t\tif (!$this->bo->check_acl_invite($uid)) continue;\t// no right to invite --> ignored\n\n\t\t\tif (is_numeric($uid))\n\t\t\t{\n\t\t\t\t$participants[$uid] = $participant_types['u'][$uid] =\n\t\t\t\t\tcalendar_so::combine_status($uid == $this->user ? 'A' : 'U',1,\n\t\t\t\t\t($uid == $this->user || ($uid == $owner && $this->bo->check_perms(EGW_ACL_ADD,0,$owner))) ? 'CHAIR' : 'REQ-PARTICIPANT');\n\t\t\t}\n\t\t\telseif (is_array($this->bo->resources[$uid[0]]))\n\t\t\t{\n\t\t\t\t$res_data = $this->bo->resources[$uid[0]];\n\t\t\t\tlist($id,$quantity) = explode(':',substr($uid,1));\n\t\t\t\tif (($status = $res_data['new_status'] ? ExecMethod($res_data['new_status'],$id) : 'U'))\n\t\t\t\t{\n\t\t\t\t\t$participants[$uid] = $participant_types[$uid[0]][$id] =\n\t\t\t\t\t\tcalendar_so::combine_status($status,$quantity,'REQ-PARTICIPANT');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!$participants)\t// if all participants got removed, include current user\n\t\t{\n\t\t\t$participants[$this->user] = $participant_types['u'][$this->user] = bcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\t\treturn array(\n\t\t\t'participant_types' => $participant_types,\n\t\t\t'participants' => $participants,\n\t\t\t'owner' => $owner,\n\t\t\t'start' => $start,\n\t\t\t'end' => $start + (int) $this->bo->cal_prefs['defaultlength']*60,\n\t\t\t'tzid' => $this->bo->common_prefs['tz'],\n\t\t\t'priority' => 2,\t// normal\n\t\t\t'public'=> $this->cal_prefs['default_private'] ? 0 : 1,\n\t\t\t'alarm' => array(),\n\t\t);\n\t}", "function scheduleMeeting($bean) {\n $bean->join_url = $this->api_data['joinURL'].'&TagCode=SugarCRM&TagID='.$bean->id;\n $bean->host_url = $this->api_data['hostURL'].'?TagCode=SugarCRM&TagID='.$bean->id;\n $bean->creator = $this->account_name;\n return array('success'=>TRUE);\n }", "public function onHourlyJob()\n {\n $remindersSent = $this->automator->sendReminders();\n\n if ($remindersSent > 0) {\n System::log(\n sprintf('A total number of %s event reminders have been sent', $remindersSent),\n __METHOD__,\n TL_CRON\n );\n }\n }", "function meeting_meetings_template_add() {\n // Use standard meeting form, which will be altered later\n return meeting_meetings_add('template~0');\n}", "public function addAppointmentForServiceJobByServiceJobIdRequest($serviceJobId, $body)\n {\n // verify the required parameter 'serviceJobId' is set\n if ($serviceJobId === null || (is_array($serviceJobId) && count($serviceJobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $serviceJobId when calling addAppointmentForServiceJobByServiceJobId'\n );\n }\n if (strlen($serviceJobId) > 100) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.addAppointmentForServiceJobByServiceJobId, must be smaller than or equal to 100.');\n }\n if (strlen($serviceJobId) < 1) {\n throw new \\InvalidArgumentException('invalid length for \"$serviceJobId\" when calling ServiceApi.addAppointmentForServiceJobByServiceJobId, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addAppointmentForServiceJobByServiceJobId'\n );\n }\n\n $resourcePath = '/service/v1/serviceJobs/{serviceJobId}/appointments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($serviceJobId !== null) {\n $resourcePath = str_replace(\n '{' . 'serviceJobId' . '}',\n ObjectSerializer::toPathValue($serviceJobId),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function add() {\n $request = $this->request;\n $hours = array();\n $uid = intval($this->Session->read('user_id'));\n \n $this->set('hours', $this->getHours());\n\n $friends = $this->getFriends(true, $uid);\n $this->set('friends', $friends);\n\n if ($request->is('post')) {\n $data = $request->data;\n $receivers = array();\n \n if($data['is_alert_mail'] == 1) { // nu are cum sa fie si privat\n if($data['friends'] !== '') {\n $exp = explode(',', $data['friends']);\n foreach($exp as $fid) {\n $receivers['emails'][] = $friends[$fid]['email'];\n $receivers['users'][] = $friends[$fid]['username'];\n }\n } else {\n foreach($friends as $friend) {\n $receivers['emails'][] = $friend['email'];\n $receivers['users'][] = $friend['username'];\n }\n }\n }\n \n $event_from = strtotime($data['from_date'] . ' ' . $data['from_hour']);\n $event_to = strtotime($data['to_date'] . ' ' . $data['to_hour']);\n $eventArr = array(\n 'event_from' => $event_from,\n 'event_to' => $event_to,\n 'friends' => $data['friends'],\n 'description' => $data['description'],\n 'is_private' => $data['is_private'],\n 'is_alert_mail' => $data['is_alert_mail'],\n 'uid' => $uid\n );\n $this->Event->set($eventArr);\n $this->Event->save();\n \n if(!empty($receivers)) { \n $this->email($receivers, $eventArr);\n }\n \n $this->redirect('all');\n }\n }", "public function newDayoffList()\n\t{\n\t\t\t$data[\"state\"] = 1;//new\n\t\t\t$data['dayoffList'] = $this->general_model->get_day_off($data);\n\t\t\t\n\t\t\t$data[\"tittle\"] = \"New Request\";\n\t\t\t$data[\"icon\"] = \"fa-hand-o-right\";\n\t\t\t$data[\"view\"] = 'admin_dayoff_list';\n\t\t\t$this->load->view(\"layout\", $data);\n\t}", "private function pushSchedule($job)\n {\n $runTime = $job->getRunTime($this->currTime);\n\n if (array_key_exists($runTime, $this->schedule)) {\n $this->schedule = [$runTime => $job];\n } else {\n $this->schedule[$runTime][] = $job;\n }\n }", "public function run()\n {\n //\n $appointments=[\n \t \t[1, 1],\n \t \t[2, 1],\n \t \t[2, 1],\n \t ];\n\n \t $count = count($appointments);\n\n\t foreach ($appointments as $key => $appointmentData) {\n\t $appointment = new Appointment();\n\n\t $appointment->created_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n\t $appointment->updated_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n\t $appointment->goal_id = $appointmentData[0];\n $appointment->user_id = $appointmentData[0];\n\n\t $appointment->save();\n\t $count--;\n //\n }\n }", "public function addAction() \n {\n $objTranslate = Zend_Registry::get(PS_App_Zend_Translate);\n $objError = new Zend_Session_Namespace(PS_App_Error); \n $objSess = new Zend_Session_Namespace(PS_App_Auth);\n $objRequest = $this->getRequest(); \n $this->view->siteTitle = $objTranslate->translate('employer - post Job'); \n \n $objModel = new Models_Job();\n $objForm = new Models_Form_Job(); \n \n $objJobcategory = new Models_Jobcategory(); \n $objForm->category_id->addMultiOptions($objJobcategory->getListdata());\n \n $objCurrency = new Models_Currency(); \n $objForm->currency_id->addMultiOptions($objCurrency->getCurrencylist());\n \n if ($objRequest->isPost ()) {\n $formData = $objRequest->getPost ();\n if ($objForm->isValid ( $formData )) {\n if($formData['type'] == '2'){\n $objForm->hourly_rate->setRequired(true);\n }\n $formData['employer_id'] = $objSess->user_id;\n $isvalid = $objModel->saveData( $formData );\n if($isvalid){ \n //send notification mail \n $bodyHtml = $this->view->partial('email/_newjob.phtml', array('data'=>$formData)); \n $mail = new Zend_Mail('utf-8'); \n $res = $mail->addTo($objSess->email)\n ->setSubject('connectica - newjob confirmation')\n ->setFrom('support@connectica.de','Connectica support')\n ->setBodyHtml($bodyHtml)\n ->send();\n \n $objError->message = $objTranslate->translate('job posted succesfully');\n $objError->messageType = 'success';\n $this->_redirect(\"/employer/job/index\");\n }\n }else {\t\n $objForm->populate($formData);\n $objError->message = formatErrorMessage ( $objForm->getMessages () );\n $objError->messageType = 'error';\n }\t\t\t\n }\n \n $this->view->message = $objError->message;\n $this->view->messageType = $objError->messageType;\n $objError->message = \"\";\n $objError->messageType = '';\n $this->view->objForm = $objForm; \n }", "function addEventItem() {\r\n\t\t# Record Event\r\n\t\t$event = new \\Event\\Item();\r\n\t\t$event->add(\r\n\t\t\t\"MonitorAsset\",\r\n\t\t\t[\t\"code\" => uniqid(),\r\n\t\t\t\t\"timestamp\" => date(\"c\"),\r\n\t\t\t\t\"user\" => $GLOBALS['_SESSION_']->customer->code,\r\n\t\t\t\t\"description\" => \"Test Event Created\",\r\n\t\t\t]\r\n\t\t);\r\n\t\tif ($event->error) {\r\n\t\t\tapp_log(\"Failed to add change to history: \".$event->error,'error',__FILE__,__LINE__);\r\n\t\t}\r\n\r\n\t\t$response = new \\HTTP\\Response();\r\n\t\t$response->success = 1;\r\n\t\t$response->role = $result;\r\n\r\n\t\theader('Content-Type: application/xml');\r\n\t\tprint XMLout($response);\r\n\t}", "public function addEventMeeting(){\r\n\t\t// data\r\n\t\t$data = array();\r\n\r\n\t\t//logedin user\r\n\t\t$user_id = $this->flexi_auth->get_user_id();\r\n\t\t//uacc_uid\r\n\t\t$user = $this->flexi_auth->get_user_by_id_query($user_id,'uacc_uid')->row();\r\n\r\n\t\t$where_arr = array('uacc_id <>' => $user_id);\r\n\t\t$users = $this->flexi_auth->get_users_query(array(\"uacc_uid,CONCAT(upro_first_name, ' ', upro_last_name) AS name\", FALSE), $where_arr)->result_array();\r\n\r\n\t\t// set\r\n\t $data['users'] = $users;\r\n\r\n\t\t// save\r\n\t\tif( 'save' == $this->input->post('act', true) ){\r\n\t\t\t// post\r\n\t\t\t$post = $this->input->post(null, true);\r\n\r\n\t\t\t// date_start\r\n\t\t\t$post['date_start'] = gmdate('Y-m-d H:i', strtotime($post['date_start']));\r\n\t\t\t// date_end\r\n\t\t\t$post['date_end'] = gmdate('Y-m-d H:i', strtotime($post['date_end']));\r\n\r\n\t\t\t// new\r\n\t\t\t$meetg = new Meeting();\r\n\r\n\t\t\t// Enter values into required fields\r\n\t\t\t$meetg->meeting_id = $this->uuid->v4();\r\n\t\t\t$meetg->date_start = $post['date_start'];\r\n\t\t\t$meetg->date_end = $post['date_end'] ;\r\n\t\t\t$meetg->subject = $post['subject'];\r\n\t\t\t$meetg->created_by = $user->uacc_uid;\r\n\t\t\t$meetg->assigned_user_id = $post['assigned_user_id'];\r\n\t\t\t$meetg->location = $post['location'];\r\n\t\t\t$meetg->event_type = (int)$post['event_type'];\r\n\t\t\t$meetg->company_id = $post['company_id'];\r\n\t\t\t$meetg->people_id = $post['people_id'];\r\n\t\t\t$meetg->status = 1;\r\n\t\t\t$meetg->description = $post['description'];\r\n\r\n\t\t\t// find duplicate\r\n\t\t\t$subject = $post['subject'];\r\n\t\t\t$this->db->select('meeting_id')->from('sc_meetings')->where('subject', $subject);\r\n\t\t\t$rs = $this->db->get();\r\n \t\t$duplicate_check = $rs->num_rows();\r\n\r\n\t\t\t// Save new user if there were no duplicates\r\n\t\t\tif($duplicate_check == 0){\r\n\t\t\t\tif( $meetg->save() ){\r\n\t\t\t\t\t// set flash\r\n\t\t\t\t\tnotify_set( array('status'=>'success', 'message'=>'Successfully created new meeting schedule.') );\r\n\r\n\t\t\t\t\t// redirect\r\n\t\t\t\t\tredirect( 'meetings' );\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// set flash\r\n\t\t\t\tnotify_set( array('status'=>'error', 'message'=>'Subject Exists.') );\r\n\t\t\t\t// redirect\r\n\t\t\t\tredirect( 'meetings' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// fetch company name\r\n\t\t$people_names = dropdownpeople();\r\n\t\t$data['people_names'] = $people_names;\r\n\r\n\t\t// load view\r\n\t\t$this->layout->view('/meetings/add', $data);\r\n\t}", "public function send_notif_day_before(){\n $details = $this->job_model->get_hdf_cutoff_details(date('Y-m-d', strtotime(' +1 day')));\n $details[0]['CUTOFF_TIME'] = date(\"g:i A\", strtotime($details[0]['CUTOFF_TIME']));\n if(count($details) > 0){\n if($details[0]['EMP_FLAG'] == 1){\n $employees = $this->job_model->get_all_emp_info();\n for($x = 0; $x < count($employees); $x++){\n if(isset($employees[$x]['EMAIL_ADDRESS']) || !empty($employees[$x]['EMAIL_ADDRESS'])){\n $email_headers = array(\n 'recipient' => $employees[$x]['EMAIL_ADDRESS'],\n 'subject' => 'ETS - HEALTH DECLARATION FORM COMPLETION - REMINDER',\n 'msg' => 'Dear '.$employees[$x]['EMP_FNAME'].' '.$employees[$x]['EMP_LNAME'].':<br><br>This is a gentle reminder to answer the Health Declaration Form.<br>Please submit it on '.$details[0]['SUBMISSION_DATE'].' until '.$details[0]['CUTOFF_TIME'].' only.<br><br>To complete the Health Declaration Form, please copy the link below and paste it into your browser\\'s address bar.<br><br>'.base_url('login').'.<br><br>Please disregard this message if you already answered the HDF.<br><br>Thank you and stay safe!<br><br>Human Resources<br><br>Disclaimer: This communication is intended solely for the individual to whom it is addressed. If you are not the intended recipient of this communication, you may not disseminate, distribute, copy or otherwise disclose or use the contents of this communication without the written authority of Federal Land, Inc (FLI). If you have received this communication in error, please delete and destroy all copies and kindly notify the sender by return email or telephone immediately. Thank you!'\n );\n $this->send_hdf_email($email_headers);\n\n $this->job_model->update_sent_hdf_notif($employees[$x]['EMP_CODE']);\n }\n \n if(isset($employees[$x]['MOBILE_NO']) || !empty($employees[$x]['MOBILE_NO'])){\n $sms_headers = array(\n 'recipient' => $employees[$x]['MOBILE_NO'],\n 'msg' => 'Good day, '.$employees[$x]['EMP_FNAME'].' '.$employees[$x]['EMP_LNAME'].'! This is a gentle reminder to answer the Health Declaration Form. Please submit it on '.$details[0]['SUBMISSION_DATE'].' until '.$details[0]['CUTOFF_TIME'].' only. Here’s the link to access: '.base_url('login').'. Please disregard this message if you already answered the HDF. Thank you and stay safe!'\n );\n $this->send_hdf_sms($sms_headers);\n \n $this->job_model->update_sent_hdf_notif($employees[$x]['EMP_CODE']);\n }\n }\n }\n else if($details[0]['EMP_FLAG'] == 2){\n $login_ids = $this->job_model->get_hdf_required_employee($details[0]['CUTOFFID']);\n $emp_code = array_column($login_ids, 'EMP_CODE');\n $employees = $this->job_model->get_info_required_emps($emp_code);\n for($x = 0; $x < count($employees); $x++){\n if(isset($employees[$x]['EMAIL_ADDRESS']) || !empty($employees[$x]['EMAIL_ADDRESS'])){\n $email_headers = array(\n 'recipient' => $employees[$x]['EMAIL_ADDRESS'],\n 'subject' => 'ETS - HEALTH DECLARATION FORM COMPLETION - REMINDER',\n 'msg' => 'Dear '.$employees[$x]['EMP_FNAME'].' '.$employees[$x]['EMP_LNAME'].':<br><br>This is a gentle reminder to answer the Health Declaration Form.<br>Please submit it on '.$details[0]['SUBMISSION_DATE'].' until '.$details[0]['CUTOFF_TIME'].' only. <br><br>To complete the Health Declaration Form, please copy the link below and paste it into your browser\\'s address bar.<br>'.base_url('login').'.<br><br>Thank you and stay safe!<br><br>Human Resources<br><br>Disclaimer: This communication is intended solely for the individual to whom it is addressed. If you are not the intended recipient of this communication, you may not disseminate, distribute, copy or otherwise disclose or use the contents of this communication without the written authority of Federal Land, Inc (FLI). If you have received this communication in error, please delete and destroy all copies and kindly notify the sender by return email or telephone immediately. Thank you!'\n );\n $this->send_hdf_email($email_headers);\n\n $this->job_model->update_sent_hdf_notif($employees[$x]['EMP_CODE']);\n }\n\n if(isset($employees[$x]['MOBILE_NO']) || !empty($employees[$x]['MOBILE_NO'])){\n $sms_headers = array(\n 'recipient' => $employees[$x]['MOBILE_NO'],\n 'msg' => 'Good day, '.$employees[$x]['EMP_FNAME'].' '.$employees[$x]['EMP_LNAME'].'! This is a gentle reminder to answer the Health Declaration Form. Please submit it on '.$details[0]['SUBMISSION_DATE'].' until '.$details[0]['CUTOFF_TIME'].' only. Here’s the link to access: '.base_url('login').'. Thank you and stay safe!'\n );\n $this->send_hdf_sms($sms_headers);\n $this->job_model->update_sent_hdf_notif($employees[$x]['EMP_CODE']);\n }\n }\n }\n }\n }", "public function storeAppointment(Request $request){\n \t$this->validate($request, [\n \t\t'goal_id'=> 'required|numeric',\n 'user_id'=> 'required|numeric',\n \t]);\n\n $goal_id= $request->input('goal_id');\n $priorAppointment=Appointment::where('goal_id', $goal_id)->latest()->first();\n\n \t$appointment =new Appointment();\n \t$appointment->goal_id=$goal_id;\n $appointment->user_id=$request->input('user_id');\n \t$appointment->save();\n\n if(!empty($priorAppointment)){\n $problemlist=$priorAppointment->problems()->where('cleared', false)->get();\n $appointment->problems()->sync($problemlist);\n }\n\n \treturn \\Redirect::route('navigation.show', $appointment);\n }", "public function store(StoreAppointment $request)\n {\n $time_array = array('08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00');\n $users = User::whereIn('role', [1, 2])->get();\n\n $previous_temp_appointment = Appointment::query()->userCreated(auth()->user()->id)->temp(1)->get();\n if(!$previous_temp_appointment->isEmpty()){\n Appointment::destroy($previous_temp_appointment);\n }\n\n $data = $request->input();\n\n $used_times = Appointment::query()->doctor($data['doctor_id'])->datetime($data['date'])->get();\n foreach ($used_times as $time){\n $exploded_time = explode(\" \", $time['datetime']);\n $explode = explode(\":\", $exploded_time[1]);\n $times[] = $explode[0].\":\".$explode[1];\n if($data['time'] == $explode[0].\":\".$explode[1]){\n $appointments = Appointment::query()->temp(0)->paginate(9);\n return view('receptionists.index', compact('time_array', 'users', 'appointments'))->with('status', 'This time is taken, please select other time or date for this doctor');\n }\n }\n\n $data['datetime'] = $data['date'] . ' ' . $data['time'];\n $data['user_created'] = auth()->user()->id;\n unset($data['date']);\n unset($data['time']);\n\n Appointment::create($data);\n\n if (auth()->user()->role == User::RECEPTIONIST){\n $appointments = Appointment::query()->temp(0)->paginate(9);\n return view('receptionists.index', compact('time_array', 'users', 'appointments'))->with('status', 'Appointment made');\n }\n }", "public function addTask()\n\t{\n\t\t$this->editTask();\n\t}", "public function action_retainapps()\n\t{\n\t\t$startdate = $_POST[\"startdate\"];\n\t\t$startdate = date('Y-m-d',strtotime($startdate));\n\t\t$enddate = $_POST[\"enddate\"];\n\t\t$enddate = date('Y-m-d',strtotime($enddate));\n\t\t$doccalendarid = $_POST[\"calid\"];\n\t\t$docid = $_POST[\"docid\"];\n\t\t$shortvisit = $_POST[\"shortvisit\"];\n\t\t$longvisit = $_POST[\"longvisit\"];\n\t\t$appstartegy = $_POST[\"appstartegy\"];\n\t\t$restricteddates = $_POST[\"restricteddates\"];\t\t\n\t\t$mondaydata = $_POST[\"monday\"];\t\t\n\t\t$tuesdaydata = $_POST[\"tuesday\"];\n\t\t$wednesdaydata = $_POST[\"wednesday\"];\n\t\t$thursdaydata = $_POST[\"thursday\"];\n\t\t$fridaydata = $_POST[\"friday\"];\n\t\t$saturdaydata = $_POST[\"saturday\"];\n\t\t$sundaydata = $_POST[\"sunday\"];\n\t\t$chargetype = $_POST[\"chargetype\"];\n\t\t$schedulename = $_POST[\"schedulename\"];\n\t\tif($appstartegy == \"blockslot\")\n\t\t\t$blockval = $_POST[\"blockval\"];\n\t\telse\n\t\t\t$blockval =\"\";\t\t\n\t\n\t\t//get all dates in the range of start date and end date\t\n\t\t$completedatearr = $this->getdatesinrange($startdate,$enddate) ;\n\t\t\n\t\t//find all overlapping appointments\t\n\t\t$objdocscheduleovrlappingapps = new Model_Docscheduleoverlappingapp;\n\t\t$objdocscheduleovrlappingapps=$objdocscheduleovrlappingapps->where('startdate_c',\">=\", $startdate)->where('enddate_c','<=',$enddate)->where('refdocschedulecalendarid_c','=',$doccalendarid )->find_all();\n\t\t\n\t\t//put info of overlapping appointments in $arapps and $arappdate\n\t\t$arapps = array();\n\t\t$arappdate = array();\n\t\tforeach($objdocscheduleovrlappingapps as $result)\n\t\t{\n\t\t\t//array_push($arapps,($result->scheduledstarttime_c));\t\t\t\t\t\n\t\t\t$arappdtls['apptime'] = $result->scheduledstarttime_c;\n\t\t\t$arappdtls['appduration'] = $result->appdurationinmins_c;\n\t\t\t$arappdtls['slottype'] = ucwords($result->slottype_c);\n\t\t\t$arappdtls['consultationmode'] = ucwords($result->consultationmode_c);\n\t\t\tarray_push($arapps,$arappdtls);\n\t\t\tarray_push($arappdate,date('Y-m-d', strtotime($result->scheduledstarttime_c)));\t\t\t\t\t\n\t\t}\n\t\t$arappdate = (array_unique($arappdate));\n\t\t\n\t\t//get all non overlapping dates and put it in $ardiff\n\t\t$arrdiff=array();\n\t\t$arrdiff = array_diff($completedatearr,$arappdate);\n\t\t$ardiff = array();\n\t\tforeach($arrdiff as $ad)\n\t\t{\n\t\t\tarray_push( $ardiff,$ad);\n\t\t}\n\t\t\n\t\t//put all dates from $arappdate to $arappdates\n\t\t$arappdates =array();\n\t\tforeach($arappdate as $d )\n\t\t{\n\t\t\tarray_push($arappdates,$d);\n\t\t}\n\t\t\n\t\t//find all overlapping schedules and delete them\n\t\t$objdoctorschedule = new Model_Doctorschedule;\n\t\t$objdoctorschedule=$objdoctorschedule-> where('refdocschedulecalendarid_c','=',$doccalendarid )->where('status_c','=','active')->where('startdate_c' ,'>=',$startdate) ->find_all();\n\t\t\n\t\t\n\t\tforeach($objdoctorschedule as $res)\n\t\t{\n\t\t\tfor($i=0;$i<sizeof($completedatearr);$i++ )\n\t\t\t{\n\t\t\t\tif($res->startdate_c <= $completedatearr[$i] && $completedatearr[$i]<=$res->enddate_c )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$oldscheduleid =$res->id;\n\t\t\t\t\t$objdoctorschedule = new Model_Doctorschedule;\n\t\t\t\t\t$objdoctorschedule-> where('id','=',$oldscheduleid );\n\t\t\t\t\t\n\t\t\t\t\tforeach($objdoctorschedule->find_all() as $res)\n\t\t\t\t\t{\n\t\t\t\t\t\t$objdoctorscheduleslots = new Model_Doctorscheduleslot;\t\t\t\n\t\t\t\t\t\t$objdoctorscheduleslots->where('refdoctorscheduleslotid_c','=',$res->id);\n\t\t\t\t\t\tforeach($objdoctorscheduleslots->find_all() as $r )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$r->delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$res->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$arrappointmenttime =array();\n\t\t//save and check schedule for all dates between start and end date\n\t\tfor($i=0;$i<sizeof($completedatearr);$i++ )\n\t\t{\n\t\t\t$arnewdaydata =array();\n\t\t\t$ardaydata =array();\n\t\t\t$daynm = date('l',strtotime($completedatearr[$i] ) );\n\t\t\t//get day data for specific [$completedatearr] date\n\t\t\n\t\t\t$ardaydata= json_decode( $this->getdayscheduleslots($daynm,$mondaydata,$tuesdaydata,$wednesdaydata,$thursdaydata,$fridaydata,$saturdaydata,$sundaydata));\n\t\t\t$result = $this->savedocschedule($doccalendarid,$completedatearr[$i] ,$completedatearr[$i] ,$shortvisit,$longvisit,$blockval,$appstartegy,$restricteddates,$schedulename);\n\t\t\t\n\t\t\t$a = 0;\n\t\t\t$finaldatedataarr \t\t= array();\n\t\t\t$finaldatedataarr[$completedatearr[$i]]\t= array();\n\t\t\t$arrappointmentdata= array();\n\t\t\t\n\t\t\tfor($j=0;$j<sizeof($arapps);$j++ )\n\t\t\t{\n\t\t\t\t$appointmenttime = $arapps[$j]['apptime'];\n\t\t\t\t$appointmentduration = $arapps[$j]['appduration'];\n\t\t\t\tarray_push($arrappointmenttime, date('H:i', strtotime($appointmenttime )) );\n\t\t\t\tif(strtotime($completedatearr[$i])== strtotime( date('Y-m-d', strtotime( $appointmenttime ) ) ) )\n\t\t\t\t{\n\t\t\t\t\t$today = $completedatearr[$i];\n\t\t\t\t\t\n\t\t\t\t\tif(sizeof($ardaydata)>=1 || !empty($ardaydata) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif(! array_key_exists($completedatearr[$i],$arrappointmentdata ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arrappointmentdata[$completedatearr[$i]]=$ardaydata;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$arslots = array();\n\t\t\t\t\t\t$duparray= array();\n\t\t\t\t\t\t$time = date('H:i',strtotime($appointmenttime));\n\t\t\t\t\t\t$m1 = explode(\":\",$time);\n\t\t\t\t\t\t$t= date( 'Y-m-d H:i', mktime( (int) $m1[0],(int) $m1[1],0 ,date( 'm',strtotime($today)) ,date( 'd',strtotime($today)) ,date( 'Y',strtotime($today)))); //appointment time\n\t\t\t\t\t\tforeach ( $ardaydata as $daydata)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$timeinternal1 = $daydata[0];//slot start time\n\t\t\t\t\t\t\t$timeinternal2 = $daydata[1];//slot end time\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$timeinternal = explode(':', $timeinternal1);\n\t\t\t\t\t\t\t$timeinternal3 = explode(':', $timeinternal2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$newdaydata = array();\n\t\t\t\t\t\t\t$newdaydata = $daydata;\n\t\t\t\t\t\t\t$arslots = $daydata[4];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$enddurationarslots = $this->create_endtimeslots($arslots,$appointmentduration) ;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$starttime = date( 'Y-m-d H:i',mktime( (int) $timeinternal[0] ,(int) $timeinternal[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t$endtime = date( 'Y-m-d H:i',mktime( (int) $timeinternal3[0] ,(int) $timeinternal3[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t\t$arslotsnew = $arslots;\n\t\t\t\t\t\t\tif( $this->check_in_range($starttime,$endtime, $t) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor($n=0;$n<sizeof($arslots);$n++ )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$m1 = explode(\":\",$arslots[$n] );\t\t\t\n\t\t\t\t\t\t\t\t\t$m2 = explode(\":\",$enddurationarslots[$n] );\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$stt1= date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t\t\t$edt2 = date('Y-m-d H:i',mktime( (int) $m2[0] ,(int) $m2[1] ,0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t\t\tif(strtotime($t) != strtotime($stt1) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($this->check_in_range($stt1,$edt2,$t ) == 1)\n\t\t\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t\t\t$flag = true;\n\t\t\t\t\t\t\t\t\t\t\tarray_push($duparray ,$arslotsnew[$n]);\t\n\t\t\t\t\t\t\t\t\t\t\t$arslotsnew[$n] =\"\";\n\t\t\t\t\t\t\t\t\t\t\tif( $n+1 <=sizeof($arslots) )\n\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$m1 = explode(\":\",$arslots[$n+1] );\t\n\t\t\t\t\t\t\t\t\t\t\t\tif( ((strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) - strtotime($t) ) /60) <$appointmentduration && ((strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) - strtotime($t) ) /60)>0 )\n\t\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_push($duparray ,$arslotsnew[$n+1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arslotsnew[$n+1] =\"\";\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\telse if($n-1 > 0 )\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$m1 = explode(\":\",$arslots[$n-1] );\t\n\t\t\t\t\t\t\t\t\t\t\t\tif( (( strtotime($t) - strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) ) /60) <$appointmentduration && (( strtotime($t) - strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) ) /60)>0 )\t\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_push($duparray ,$arslotsnew[$n-1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arslotsnew[$n-1] =\"\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arslotsnew,$time);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse if(strtotime( $starttime)> strtotime( $t) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($arslotsnew,date('h:i',strtotime($t)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif( strtotime($endtime)< strtotime($t))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($arslotsnew,date('h:i',strtotime($t)));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($finaldatedataarr[$completedatearr[$i]],array_unique($arslotsnew));//slots with blocked time for retaining apps\n\t\t\t\t\t\t\tarray_push($finaldatedataarr[$completedatearr[$i]],array_unique($duparray));//slots with appoitnment\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// save schedule for restricted dates\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$slotstartime =date('H:i',strtotime( $arapps[$j]['apptime']));\n\t\t\t\t\t\t$t1time = strtotime( $arapps[$j]['apptime']);\n\t\t\t\t\t\t$t1time = $t1time+(60*$appointmentduration);\n\t\t\t\t\t\t$slotendtime = date('H:i',$t1time);\n\t\t\t\t\t\t$modetype = $arapps[$j]['consultationmode'];\n\t\t\t\t\t\t$chargetype = $arapps[$j]['slottype'];\n\t\t\t\t\t\t$slot = date('h:i',strtotime($appointmenttime));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->saveschedulefornonsetdate($slotstartime,$slotendtime,$modetype,$chargetype,$slot,$daynm ,$result);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$arslotsunique=array();\n\t\t\t$arslotsuniquedup=array();\n\t\t\tforeach($finaldatedataarr as $fkey => $finaldates )\n\t\t\t{\n\t\t\t\tif( !empty($finaldates) && in_array($fkey, $arappdate ))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tfor($k=0;$k<sizeof($finaldates); $k=$k+2)\n\t\t\t\t\t{\n\t\t\t\t\t\t//merge array both slots (arslots) and retained apps ( duparray)\t\t\t\t\n\t\t\t\t\t\t$arslotsunique = array_unique( array_merge($arslotsunique, $finaldates[$k]));\n\t\t\t\t\t\t$arslotsuniquedup = array_unique( array_merge($arslotsuniquedup,$finaldates[$k+1]));\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$arslotsunique =array_diff( array_unique($arslotsunique),array_unique($arslotsuniquedup));\n\t\t\t\t\t\n\t\t\t\t\t$arslotsuniquenew = array();\n\t\t\t\t\t$arslotsuniquenew1 = array();\n\t\t\t\t\tarray_push($arslotsuniquenew,'');\n\t\t\t\t\t$arslotsuniquenew = array_diff($arslotsunique ,$arslotsuniquenew);\n\t\t\t\t\tforeach($arslotsuniquenew as $arsnew )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($arslotsuniquenew1, strtotime($arsnew) );\n\t\t\t\t\t}\n\t\t\t\t\tarsort($arslotsuniquenew1);\n\t\t\t\t\t$arslotsuniquenew = array();\n\t\t\t\t\tforeach($arslotsuniquenew1 as $arsnew )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($arslotsuniquenew, date('H:i', $arsnew) );\n\t\t\t\t\t}\n\t\t\t\t\t$arslotsuniquenew = array_reverse($arslotsuniquenew);\t\n\t\t\t\t\t\n\t\t\t\t\tforeach($arrappointmentdata as $key=> $arappsdata)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sizeof($arappsdata)>0 || ! empty($arappsdata) )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$x = 0;\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($arappsdata as $arddata )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$arrappointmentdatanew =array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor($y=0;$y<sizeof($arslotsuniquenew);$y++ )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($arslotsuniquenew[$y]!=\"\" )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//seperate entire array according to its time slots\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif((strtotime($arddata[0]) <= strtotime($arslotsuniquenew[$y] ) && strtotime($arslotsuniquenew[$y] ) <= strtotime($arddata[1]) ) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arrappointmentdatanew,$arslotsuniquenew[$y]);\n\t\t\t\t\t\t\t\t\t\t\t$arslotsuniquenew[$y]=\"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\telse if( (strtotime($arddata[0]) < strtotime($arslotsuniquenew[$y] ) && strtotime($arslotsuniquenew[$y] ) > strtotime($arddata[1]) ) && in_array($arslotsuniquenew[$y],$arrappointmenttime) )\t\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arrappointmentdatanew,$arslotsuniquenew[$y]);\n\t\t\t\t\t\t\t\t\t\t\t$arslotsuniquenew[$y]=\"\";\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\telse if((strtotime($arddata[0]) >strtotime($arslotsuniquenew[$y] ) && strtotime($arslotsuniquenew[$y] ) < strtotime($arddata[1]) ) && in_array($arslotsuniquenew[$y],$arrappointmenttime))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arrappointmentdatanew,$arslotsuniquenew[$y]);\n\t\t\t\t\t\t\t\t\t\t\t$arslotsuniquenew[$y]=\"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t$arappsdata[$x][4] =$arrappointmentdatanew;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$x++;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t//var_dump($arappsdata);\n\t\t\t\t\t\t\t$this->saveschedule($arappsdata,$daynm,$result );\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t//save schedule for dates with no appointment that date\n\t\t\tfor($x=0;$x< sizeof($ardiff);$x++ )\n\t\t\t{\n\t\t\t\tif( strtotime($completedatearr[$i])== strtotime($ardiff[$x] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->adddayschedule($result,date('l',strtotime($completedatearr[$i] )) ,$mondaydata,$tuesdaydata,$wednesdaydata,$thursdaydata,$fridaydata,$saturdaydata,$sundaydata );\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function showTodayAppointments()\n{\n // make sure request is for appointment-list not progress-note-list\n $today = getDefaultDate();\n $appointments = getAppointments(['param' => 'AppointmentDate', 'operator' => '==', 'value' => $today]);\n $tableRows = '';\n foreach ($appointments as $appointment) {\n $rowData = json_encode($appointment);\n $rowId = $appointment['FirebaseId'];\n\n // set parameters for ajax calls\n $deleteActionUrl = APPOINTMENTS_CONTROLLER;\n $nextUrl = ADD_APPOINTMENT;\n $editAction = 'storeTableRowData(' . $rowData . ',\"' . $nextUrl . '\")';\n $deleteAction = 'deleteTableRowData(\"' . $rowId . '\",\"' . $deleteActionUrl . '\")';\n\n $id = $appointment['AppointmentId'];\n $dentistName = $appointment['DentistName'];\n $patientName = $appointment['PatientName'];\n $phoneNo = $appointment['PatientNo'];\n $date = $appointment['AppointmentDate'];\n $time = $appointment['AppointmentTime'];\n $tableRows .= \"<tr>\n <td>\" . $id . \"</td>\n <td>\" . $dentistName . \"</td>\n <td>\" . $patientName . \"</td>\n <td>\" . $phoneNo . \"</td>\n <td>\" . $date . \"</td>\n <td>\" . $time . \"</td>\n <td><span class='fa fa-pencil-square-o text-success' id='edit' onclick='$editAction'></span>\n <span class='fa fa-remove text-danger' id='delete' onclick='$deleteAction'></span>\n </td>\n </tr>\";\n }\n echo $tableRows;\n return null;\n}", "function custom_mail($event,$added)\n\t{\n\t\t$to = array();\n\n\t\tforeach($event['participants'] as $uid => $status)\n\t\t{\n\t\t\t$toadd = '';\n\t\t\tif ($status == 'R' || $uid == $this->user) continue;\n\n\t\t\tif (is_numeric($uid) && $GLOBALS['egw']->accounts->get_type($uid) == 'u')\n\t\t\t{\n\t\t\t\tif (!($email = $GLOBALS['egw']->accounts->id2name($uid,'account_email'))) continue;\n\n\t\t\t\t$GLOBALS['egw']->accounts->get_account_name($uid,$lid,$firstname,$lastname);\n\n\t\t\t\t$toadd = $firstname.' '.$lastname.' <'.$email.'>';\n\t\t\t\tif (!in_array($toadd,$to)) $to[] = $toadd;\n\t\t\t}\n\t\t\telseif ($uid < 0)\n\t\t\t{\n\t\t\t\tforeach($GLOBALS['egw']->accounts->members($uid,true) as $uid)\n\t\t\t\t{\n\t\t\t\t\tif (!($email = $GLOBALS['egw']->accounts->id2name($uid,'account_email'))) continue;\n\n\t\t\t\t\t$GLOBALS['egw']->accounts->get_account_name($uid,$lid,$firstname,$lastname);\n\n\t\t\t\t\t$toadd = $firstname.' '.$lastname.' <'.$email.'>';\n\t\t\t\t\t// dont add groupmembers if they already rejected the event, or are the current user\n\t\t\t\t\tif (!in_array($toadd,$to) && ($event['participants'][$uid] !== 'R' && $uid != $this->user)) $to[] = $toadd;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif(($info = $this->bo->resource_info($uid)))\n\t\t\t{\n\t\t\t\t$to[] = $info['email'];\n\t\t\t}\n\t\t}\n\t\tlist($subject,$body) = $this->bo->get_update_message($event,$added ? MSG_ADDED : MSG_MODIFIED);\t// update-message is in TZ of the user\n\t\t#error_log(__METHOD__.print_r($event,true));\n\t\t$boical = new bcalendar_ical();\n\t\t// we need to pass $event[id] so iCal class reads event again,\n\t\t// as event is in user TZ, but iCal class expects server TZ!\n\t\t$ics = $boical->exportVCal(array($event['id']),'2.0','request',false);\n\n\t\t$ics_file = tempnam($GLOBALS['egw_info']['server']['temp_dir'],'ics');\n\t\tif(($f = fopen($ics_file,'w')))\n\t\t{\n\t\t\tfwrite($f,$ics);\n\t\t\tfclose($f);\n\t\t}\n\t\t$vars = array(\n\t\t\t'menuaction' => 'felamimail.uicompose.compose',\n\t\t\t'preset[to]' => $to,\n\t\t\t'preset[subject]' => $subject,\n\t\t\t'preset[body]' => $body,\n\t\t\t'preset[name]' => 'event.ics',\n\t\t\t'preset[file]' => $ics_file,\n\t\t\t'preset[type]' => 'text/calendar; method=request',\n\t\t\t'preset[size]' => filesize($ics_file),\n\t\t);\n\t\treturn \"window.open('\".egw::link('/index.php',$vars).\"','_blank','width=700,height=700,scrollbars=yes,status=no');\";\n\t}", "function create_list_mailchimp($api_key, $list_name, $permission_reminder){\n \n $type = 'POST';\n $timeout = 30;\n $target = 'lists';\n $data = array(\n 'name' => $list_name,\n 'contact' => array('company' => 'Wine Lover Alleys', \n 'address1' => 'somewhere in the heaven',\n 'city' => 'heaven city',\n 'state' => 'heaven state',\n 'zip' => '00001',\n 'country' => 'Utopia'\n ),\n 'permission_reminder' => $permission_reminder,\n 'campaign_defaults'=> array('from_name' => 'Angel',\n 'from_email' => 'Angel@wineloveralleys.com',\n 'subject' => 'News from Wine Lover Alleys',\n 'language' => 'en'\n ),\n 'email_type_option' => TRUE\n );\n $result = mailchimp_api_request($api_key, $type, $target, $timeout, $data);\n return $result;\n}", "public function saveAdd()\n {\n //Validate the form\n $errors = $this->validateForm();\n $post = $this->post['job'];\n\n if (count($errors) == 0){\n //Add User Id to new job only\n $post['userId'] = $this->authentication->getUser()->id;\n //Format the date to SQL format\n $closingDate = new DateTime($this->post['closingDate']);\n $post['closingDate'] = $closingDate->format('Y-m-d');\n\n $this->jobTable->save($post);\n header('location: /admin/jobs/list');\n } else {\n return $this->add($errors);\n }\n }", "private function addTaskToEndOfSchedule($task) {\r\n\t\t$taskDuration = $this->getTaskDurationS($task);\r\n\t\tsm_debug::write(\"Task duration: $taskDuration s\", 7);\r\n\t\t\r\n\t\t// User ID\r\n\t\t$userID = $task['owner_id'];\r\n\r\n\t\t// Initialize scheduleEndTime and scheduleStartTime\r\n\t\tif (!isset($this->scheduleEndTime[$userID])) $this->scheduleEndTime[$userID] = 0;\r\n\t\t\r\n\t\t// Set task actual start and end time/date\r\n\t\t$actualStartTimestamp = $this->getEndOfScheduleUnixTime($userID);\r\n\t\t$newEndOfSchedule = $this->scheduleEndTime[$userID] + $taskDuration;\r\n\t\t$actualEndTimestamp = $actualStartTimestamp + $taskDuration;\r\n\t\tsm_debug::write(\"Old EndOfSchedule: \".$this->scheduleEndTime[$userID], 7);\r\n\t\tsm_debug::write(\"newEndOfSchedule: $newEndOfSchedule s\", 7);\r\n\t\tsm_debug::write(\"actualStartTimestamp: $actualStartTimestamp\", 7);\r\n\t\t\r\n\t\t$se1 = explode('#', date(\"Y-m-d#H:i:s\", $actualStartTimestamp));\r\n\t\t$task['actual_start_date'] = $se1[0];\r\n\t\t$task['actual_start_time'] = $se1[1];\r\n\t\t\r\n\t\t$se2 = explode('#', date(\"Y-m-d#H:i:s\", $actualEndTimestamp));\r\n\t\t$task['actual_end_date'] = $se2[0];\r\n\t\t$task['actual_end_time'] = $se2[1];\r\n\t\t\r\n\t\t// Add task to the end of queue\r\n\t\tif (!isset($scheduledTasks[$userID])) $scheduledTasks[$userID] = array();\r\n\t\t$this->scheduledTasks[$userID][] = $task;\r\n\t\t$this->scheduleEndTime[$userID] = $newEndOfSchedule;\r\n\t\tsm_debug::write(\"Task \".$task['id'].\"(\".$task['name'].\") added to the schedule. Actual start: \".date(\"Y-m-d H:i:s\", $actualStartTimestamp).\", actual end: \".date(\"Y-m-d H:i:s\", $actualEndTimestamp), 7);\r\n\t}", "function as_add_new_schedule(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'schedule_type' => trim($_POST['type']),\n\t\t\t'schedule_worker' => trim($_POST['workerid']),\n\t\t\t'schedule_day' => trim($_POST['day']),\n\t\t\t'schedule_starttime' => trim($_POST['starttime']),\n\t\t\t'schedule_stoptime' => trim($_POST['stoptime']),\n\t\t\t'schedule_place' => trim($_POST['place']),\n\t\t 'schedule_created' => date('Y-m-d H:i:s'),\n\t\t 'schedule_createdby' => \"1\",\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_schedule', $New_Item_Details ); \n\t}", "function daily_reminder_mailer(){\t\t\t\t\r\r\n\t\tmgm_check_expiring_memberships();\t\r\r\n\t}", "public function addAppointment(Appointment $AppointmentObj)\r\n {\r\n //SQL statement\r\n $stmt = $this->conn->prepare(\"INSERT INTO \" . $this->table . \"(AppointmentID, UserID, Date, Time, Reason, Checked_IN) VALUES (?,?,?,?,?,?)\");\r\n //Query excuted\r\n $stmt->execute([$AppointmentObj->getAppointmentID(), $AppointmentObj->getUserID(), $AppointmentObj->getDate(), $AppointmentObj->getTime(), $AppointmentObj->getReason(), $AppointmentObj->getcheckIn()]);\r\n $AppointmentObj->setAppointmentID($this->conn->lastInsertId());\r\n }", "public function hdf_reminder_within_day(){\n $details = $this->job_model->get_hdf_cutoff_details(date('Y-m-d'));\n $details[0]['CUTOFF_TIME'] = date(\"g:i A\", strtotime($details[0]['CUTOFF_TIME']));\n $employees = $this->job_model->get_employees_with_no_hdf();\n for($x = 0; $x < count($employees); $x++){\n if(isset($employees[$x]['EMAIL_ADDRESS']) || !empty($employees[$x]['EMAIL_ADDRESS'])){\n $email_headers = array(\n 'recipient' => $employees[$x]['EMAIL_ADDRESS'],\n 'subject' => 'ETS - HEALTH DECLARATION FORM COMPLETION - REMINDER',\n 'msg' => 'Dear '.$employees[$x]['EMP_FNAME'].' '.$employees[$x]['EMP_LNAME'].':<br><br>Please be advised that you failed to complete the Health Declaration Form for '.$details[0]['SUBMISSION_DATE'].'. You can answer the HDF until '.$details[0]['CUTOFF_TIME'].'.<br><br>Submission after the cutoff time will require you to state your reason for late submission and will be subject for approval of your Immediate Head and Group/Division Head in Rush.Net.<br><br>We are hoping for your cooperation on this matter.<br><br>Please disregard this message if you already complied.<br><br>Thank you and stay safe!<br><br>Human Resources<br><br>Disclaimer: This communication is intended solely for the individual to whom it is addressed. If you are not the intended recipient of this communication, you may not disseminate, distribute, copy or otherwise disclose or use the contents of this communication without the written authority of Federal Land, Inc (FLI). If you have received this communication in error, please delete and destroy all copies and kindly notify the sender by return email or telephone immediately. Thank you!'\n );\n $this->send_hdf_email($email_headers);\n\n $this->job_model->update_sent_hdf_notif($employees[$x]['EMP_CODE']);\n }\n\n if(isset($employees[$x]['MOBILE_NO']) || !empty($employees[$x]['MOBILE_NO'])){\n $sms_headers = array(\n 'recipient' => $employees[$x]['MOBILE_NO'],\n 'msg' => 'Good day, '.$employees[$x]['EMP_FNAME'].' '.$employees[$x]['EMP_LNAME'].'! Please be advised that you failed to answer the Health Declaration Form today, '.$details[0]['SUBMISSION_DATE'].'. Kindly check your e-mail for further details. Please disregard this message if you already complied. Thank you and stay safe!'\n );\n $this->send_hdf_sms($sms_headers);\n\n $this->job_model->update_sent_hdf_notif($employees[$x]['EMP_CODE']);\n }\n }\n }" ]
[ "0.66057575", "0.6470599", "0.60472673", "0.6000309", "0.59866726", "0.58705634", "0.5827722", "0.5771401", "0.5764176", "0.57166404", "0.5649111", "0.5545858", "0.5531203", "0.55164266", "0.54245543", "0.5408093", "0.53870606", "0.5381558", "0.5351181", "0.5328094", "0.52898014", "0.52802885", "0.5271602", "0.5239897", "0.52363765", "0.52330273", "0.52099305", "0.5207573", "0.51925737", "0.51855505", "0.5185394", "0.51539767", "0.5144813", "0.51358557", "0.51340675", "0.513205", "0.51310176", "0.5130686", "0.51271605", "0.51227635", "0.5120213", "0.512002", "0.51170003", "0.51118165", "0.51065993", "0.5098201", "0.5097322", "0.5093746", "0.5093109", "0.50926965", "0.50894475", "0.50870556", "0.5082978", "0.5069405", "0.50675625", "0.50632524", "0.5056034", "0.50440294", "0.5043066", "0.50420225", "0.50366855", "0.5031113", "0.50307196", "0.5026451", "0.5025464", "0.5021344", "0.50203234", "0.5006926", "0.5006877", "0.5004456", "0.50023586", "0.4985724", "0.49763018", "0.49722126", "0.49642152", "0.4955509", "0.49550182", "0.49526328", "0.49495152", "0.49493963", "0.49412054", "0.49352616", "0.49324983", "0.49288175", "0.492432", "0.49190545", "0.49181688", "0.49179557", "0.49140385", "0.49097383", "0.4905494", "0.4900994", "0.49002832", "0.49001282", "0.4895717", "0.4893175", "0.48918453", "0.48877874", "0.48845667", "0.48843786" ]
0.7188809
0
Add to job list appointment auto reminder
Добавить в список задач автоматическое напоминание о встрече
public function regularAppointmentAutoReminder() { $command = 'task:appointment:reminder:auto'; $this->addRegularJob($command); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function regularAppointmentReminder()\r\n {\r\n $command = 'task:appointment:reminder';\r\n $this->addRegularJob($command);\r\n }", "function addReminderSchedule() {\n //echo $this->value('reminder_set');\n if ($this->value('patient_id') != \"\" && $this->value('scheduled_date') != \"\") {\n $status = $this->userInfo(\"status\", $this->value(\"patient_id\"));\n if ($status == \"1\" || $status == \"2\") {\n $reminder_arr = array(\n 'patient_id' => $this->value('patient_id'),\n 'scheduled_date' => $this->value('scheduled_date'),\n 'status' => 'pending',\n 'reminder_set' => $this->value('reminder_set')\n );\n $this->insert(\"reminder_schedule\", $reminder_arr);\n $this->output = true;\n return;\n } else {\n $this->output = false;\n return;\n }\n } else {\n $this->output = false;\n return;\n }\n }", "function addReminderScheduleEhs() {\n if ($this->value('therpaistId') != \"\" && $this->value('scheduled_date') != \"\") {\n $status = $this->userInfo(\"status\", $this->value(\"therpaistId\"));\n $clinicId = $this->clinicInfo('clinic_id');\n if ($status == \"1\" || $status == \"2\") {\n $reminder_arr = array(\n 'patient_id' => '0',\n 'clinicId' => $clinicId,\n 'therapistId' => $this->value('therpaistId'),\n 'parent_reminder_schedule_id' => '0',\n 'scheduled_date' => $this->value('scheduled_date'),\n 'reminderEhsFlag' => '1',\n // 'scheduler_status' => '1',\n 'status' => 'pending',\n 'reminder_set' => $this->value('reminder_set')\n );\n $this->insert(\"reminder_schedule\", $reminder_arr);\n $insertId = $this->insert_id();\n\n\n if ($this->is_corporate($clinicId) == 1) {\n $ehsPatientArr = $this->get_paitent_list($clinicId);\n } else {\n $ehsPatientArr = $this->getProviderEHSPatients($this->value('patient_id'));\n }\n $patientCount = count($ehsPatientArr);\n $pat = 0;\n //echo $this->value('scheduled_date'); \n while ($pat < $patientCount) {\n $date = substr($this->value('scheduled_date'), 0, 10);\n $sql = \"select * from reminder_schedule where DATEDIFF(DATE_FORMAT(scheduled_date,'%Y-%m-%d'),'{$date}') =0 and reminder_set=1 and patient_id=\" . $ehsPatientArr[$pat];\n $res = $this->execute_query($sql);\n $num = $this->num_rows($res);\n if ($num == 0) {\n $reminder_arr1 = array(\n 'patient_id' => $ehsPatientArr[$pat],\n 'therapistId' => $this->value('therpaistId'),\n 'parent_reminder_schedule_id' => $insertId,\n 'scheduled_date' => $this->value('scheduled_date'),\n 'reminderEhsFlag' => '1',\n 'status' => 'pending',\n 'reminder_set' => $this->value('reminder_set')\n );\n $this->insert(\"reminder_schedule\", $reminder_arr1);\n }\n $pat++;\n }\n\n $this->output = true;\n return;\n } else {\n $this->output = false;\n return;\n }\n } else {\n $this->output = false;\n return;\n }\n }", "public function addAppointment($data = null){\n\t\t\t$timeSlots = $this->SplitTime('09:00 AM', '05:00 PM', 60);\n\t\t\t// $day = Carbon::now();\n\t\t\t$day = Carbon::now()->addDays(1);\n\t\t\t$this->checkTimeAvailability($day, $timeSlots, $data);\n\n\t\t}", "public function regularAppointmentComplete()\r\n {\r\n $command = 'task:appointment:complete';\r\n $this->addRegularJob($command);\r\n }", "public function add_appointment($args) {\n global $wpdb;\n $datetime_now = date('Y-m-d') . 'T' . date('H:m:i') . 'Z';\n $defaults = array(\n 'beginning' => $datetime_now,\n 'end' => $datetime_now,\n 'full_day' => FALSE,\n 'title' => 'title',\n 'description' => '',\n 'location' => '',\n 'category' => '0'\n );\n\n $args = wp_parse_args($args, $defaults);\n return $wpdb -> insert($this -> tableDatesName, $args);\n }", "public function orderReminder();", "function regenerate_event_reminder_jobs($id,$force=false)\n{\n\t$events=$GLOBALS['SITE_DB']->query_select('calendar_events',array('*'),array('id'=>$id),'',1);\n\n\tif (!array_key_exists(0,$events)) return;\n\t$event=$events[0];\n\n\t$GLOBALS['SITE_DB']->query_delete('calendar_jobs',array('j_event_id'=>$id));\n\n\t$period_start=$force?0:NULL;\n\t$recurrences=find_periods_recurrence($event['e_timezone'],$event['e_do_timezone_conv'],$event['e_start_year'],$event['e_start_month'],$event['e_start_day'],is_null($event['e_start_hour'])?0:$event['e_start_hour'],is_null($event['e_start_minute'])?0:$event['e_start_minute'],$event['e_end_year'],$event['e_end_month'],$event['e_end_day'],is_null($event['e_end_hour'])?23:$event['e_end_hour'],is_null($event['e_end_minute'])?0:$event['e_end_minute'],$event['e_recurrence'],min(1,$event['e_recurrences']),$period_start);\n\tif ((array_key_exists(0,$recurrences)) && ($recurrences[0][0]==$recurrences[0][2]/*really starts in window, not just spanning it*/))\n\t{\n\t\tif ($event['e_type']==db_get_first_id()) // Add system command job if necessary\n\t\t{\n\t\t\t$GLOBALS['SITE_DB']->query_insert('calendar_jobs',array(\n\t\t\t\t'j_time'=>usertime_to_utctime($recurrences[0][0]),\n\t\t\t\t'j_reminder_id'=>NULL,\n\t\t\t\t'j_member_id'=>NULL,\n\t\t\t\t'j_event_id'=>$id\n\t\t\t));\n\t\t} else\n\t\t{\n\t\t\tif (function_exists('set_time_limit')) @set_time_limit(0);\n\n\t\t\t$start=0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$reminders=$GLOBALS['SITE_DB']->query_select('calendar_reminders',array('*'),array('e_id'=>$id),'',500,$start);\n\n\t\t\t\tforeach ($reminders as $reminder)\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('calendar_jobs',array(\n\t\t\t\t\t\t'j_time'=>usertime_to_utctime($recurrences[0][0],$reminder['n_member_id'])-$reminder['n_seconds_before'],\n\t\t\t\t\t\t'j_reminder_id'=>$reminder['id'],\n\t\t\t\t\t\t'j_member_id'=>$reminder['n_member_id'],\n\t\t\t\t\t\t'j_event_id'=>$event['id']\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t$start+=500;\n\t\t\t}\n\t\t\twhile (array_key_exists(0,$reminders));\n\t\t}\n\t}\n}", "public function reviewReminder();", "public function finish()\n {\n $db_assignment = $this->get_record()->get_assignment();\n\n // don't allow editing if the appointment has been assigned\n if( true == $this->editable ) $this->editable = is_null( $db_assignment );\n\n parent::finish();\n\n $db_participant = lib::create( 'database\\participant', $this->get_record()->participant_id );\n \n // determine the time difference\n $db_phone = $this->get_record()->get_phone();\n\n // go with the phone's address if there is one, and the first address if not\n $db_address = is_null( $db_phone )\n ? $db_participant->get_first_address()\n : $db_phone->get_address();\n $time_diff = is_null( $db_address ) ? NULL : $db_address->get_time_diff();\n\n // need to add the participant's timezone information as information to the date item\n $site_name = lib::create( 'business\\session' )->get_site()->name;\n if( is_null( $time_diff ) )\n $note = 'The participant\\'s time zone is not known.';\n else if( 0 == $time_diff )\n $note = sprintf( 'The participant is in the same time zone as the %s site.',\n $site_name );\n else if( 0 < $time_diff )\n $note = sprintf( 'The participant\\'s time zone is %s hours ahead of %s\\'s time.',\n $time_diff,\n $site_name );\n else if( 0 > $time_diff )\n $note = sprintf( 'The participant\\'s time zone is %s hours behind of %s\\'s time.',\n abs( $time_diff ),\n $site_name );\n\n $this->add_item( 'datetime', 'datetime', 'Date', $note );\n \n // create enum arrays\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'active', '=', true );\n $modifier->order( 'rank' );\n $phones = array();\n foreach( $db_participant->get_phone_list( $modifier ) as $db_phone )\n $phones[$db_phone->id] = $db_phone->rank.\". \".$db_phone->number;\n \n if( !is_null( $db_assignment ) )\n {\n $this->set_item( 'assignment.user', $db_assignment->get_user()->name, false );\n\n $this->add_item( 'assignment.start_datetime', 'constant', 'Started' );\n $this->set_item( 'assignment.start_datetime',\n util::get_formatted_time( $db_assignment->start_datetime ), false );\n \n $this->add_item( 'assignment.end_datetime', 'constant', 'Finished' );\n $this->set_item( 'assignment.end_datetime',\n util::get_formatted_time( $db_assignment->end_datetime ), false );\n }\n else\n {\n $this->set_item( 'assignment.user', 'unassigned', false );\n }\n\n $appointment_class_name = lib::get_class_name( 'database\\appointment' );\n $types = $appointment_class_name::get_enum_values( 'type' );\n $types = array_combine( $types, $types );\n\n // set the view's items\n $this->set_item( 'phone_id', $this->get_record()->phone_id, false, $phones );\n $this->set_item( 'datetime', $this->get_record()->datetime, true );\n $this->set_item( 'state', $this->get_record()->get_state(), false );\n $this->set_item( 'type', $this->get_record()->type, false, $types );\n\n $this->finish_setting_items();\n\n // hide the calendar if requested to\n $this->set_variable( 'hide_calendar', $this->get_argument( 'hide_calendar', false ) );\n }", "public function addAction()\n\t{\t// TODO: add event to google calendars\t\n\t}", "public function run()\n {\n $items = [\n \n ['id' => 1, 'patient_id' => 1, 'doctor_id' => 1, 'appointment' => '2018-07-18 22:26:45',],\n\n ];\n\n foreach ($items as $item) {\n \\App\\Appointment::create($item);\n }\n }", "public function addToWaitList() {\n // The user has a program in their cart that is full.\n // We need to add them to the wait list and remove the\n // item from their cart.\n die(\"Not Implemented\");\n \n $rowid = $this->getRowId();\n $programId = $this->getProgramId();\n \n // TODO\n // Add them to the waitlist, howeve we do that...\n \n // Remove the program from their shopping cart\n $this->cart->update(array('rowid' => $rowid, 'qty' => 0));\n \n // TODO Send Email ???\n \n // Tell the client-side the waitlist entry is created\n $this->output->set_status_header(HTTP_CREATED);\n }", "function meeting_agenda_items_template_add() {\n // Use standard meeting form, which will be altered later\n return meeting_agenda_items_add('template~0');\n}", "public static function add_sendmail_job(){\r\n\t\t$current_time = current_time(\"timestamp\");\r\n\t\t$cut_off_time = 20 * 60; // 20 minutes\r\n\t\t$timestamp = $current_time + $cut_off_time;\r\n\t\t$recurrence = true;\r\n\r\n\t\tMainController::getInstance()->logger->debug(\"cron add_sendmail_job run at: \" . current_time( \"mysql\",1 ) );\r\n\t\twp_schedule_single_event( $timestamp, self::HOOK_PROCESS_MAIL );\r\n\t}", "public function approval_reminder() {\n //send email and notification to renew application and persist reminder\n //Reminders should not be sent to completed studies\n \t$this->out('Starting...');\n\n $options['conditions'] = array(\n 'Application.submitted' => 1, \n 'Application.approved' => 2, \n 'Application.final_date IS ' => null, //Final report not completed\n // 'Application.trial_status_id' => 5,\n 'Application.deactivated' => 0,\n ''\n );\n $options['contain'] = array('AnnualLetter' => array('limit' => 1, 'order' => array('AnnualLetter.id DESC')));\n $applications = $this->Application->find('all', $options);\n\n // Remind applicants and managers approval pending \n $html = new HtmlHelper(new ThemeView());\n $type = 'reminder_approval_letter ';\n $message = $this->Message->find('first', array('conditions' => array('name' => $type)));\n foreach ($applications as $application) { \n //*************************** Send Email and Notifications Managers *****************************\n \t\t$this->out('Application: ' . $application['Application']['user_id']);\n \n $users = $this->User->find('all', array(\n 'contain' => array('Group'),\n 'conditions' => array('OR' => array('User.id' => $application['Application']['user_id'], 'User.group_id' => 2)) //Applicant and managers\n ));\n foreach ($users as $user) {\n \t$this->out('User: ' . $user['User']['name']);\n if (isset($application['AnnualLetter'][0])) {\n \t$this->out('AnnualLetter ' . $application['AnnualLetter'][0]['expiry_date']);\n \t$variables = array(\n\t\t 'name' => $user['User']['name'], 'protocol_no' => $application['Application']['protocol_no'],\n\t\t 'protocol_link' => $html->link($application['Application']['protocol_no'], array('controller' => 'applications', 'action' => 'view', $application['Application']['id'], $user['Group']['redir'] => true, \n\t\t 'full_base' => true), array('escape' => false)),\n\t\t 'approval_date' => $application['Application']['approval_date'], 'expiry_date' => $application['AnnualLetter'][0]['expiry_date']\n\t\t );\n\t $datum = array(\n\t 'email' => $user['User']['email'],\n\t 'id' => $application['Application']['id'], 'user_id' => $user['User']['id'], 'type' => $type, 'model' => 'AnnaulLetter',\n\t 'subject' => String::insert($message['Message']['subject'], $variables),\n\t 'message' => String::insert($message['Message']['content'], $variables)\n\t );\n\t $this->sendEmail($datum);\n\t $this->sendNotification($datum);\n\t $this->log($datum, 'approval_reminder');\n } \n }\n //********************************** END *********************************\n //end\n }\n }", "public static function show_reminder()\n {\n }", "protected function register_cron_jobs()\n\t\t{ \n\t\t\tif( wp_next_scheduled( self::PREFIX . 'cron_import_meetup_events' ) === false )\n\t\t\t{\n\t\t\t\twp_schedule_event(\n\t\t\t\t\tcurrent_time( 'timestamp' ),\n\t\t\t\t\tself::PREFIX . 'debug', // TODO: set to 'hourly' when done testing\n\t\t\t\t\tself::PREFIX . 'cron_import_meetup_events'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "public function onHourlyJob()\n {\n $remindersSent = $this->automator->sendReminders();\n\n if ($remindersSent > 0) {\n System::log(\n sprintf('A total number of %s event reminders have been sent', $remindersSent),\n __METHOD__,\n TL_CRON\n );\n }\n }", "function eventclass_Backup_Notified_Jobs()\n\t{\n\n//\tonscreen events\n\t\t$this->events[\"Backup_Notified_Jobs_snippet\"] = true;\n\n\t}", "function pt_add() {\n\t\t$this->_clean_cron_array();\n\t\twp_schedule_event( time(), 'every_50', $this->_hook, array() );\n\t}", "public function bookAppointmentManually(Request $request){\n $starting_hour = Setting::where('settings_name','starting_hour')->first();\n $office_duration = Setting::where('settings_name','office_duration')->first();\n\n //google calender date & time format\n $date = Carbon::createFromFormat('d/m/Y', $request->date)->format('Y-m-d');\n $time12=$starting_hour->settings_value;\n $time24 = date(\"H:i\", strtotime( $time12 ));\n\n //saving date to db\n $appointment=new Appointment;\n $appointment->name= $request->name;\n $appointment->phone= $request->phone;\n $appointment->email= $request->email;\n $appointment->gender= $request->gender;\n $appointment->date= $date;\n $appointment->time= $time24;\n $appointment->save();\n\n \n\n \n //google calender settings\n $startTime=Carbon::parse($date.' '.$time24.'Asia/Dhaka');\n $endTime=(clone $startTime)->addHour();\n $event = new Event;\n $event->name = 'Appointment: '.$request->name;\n $event->startDateTime = $startTime;\n $event->endDateTime = $endTime;\n $event->save();\n\n return redirect()->route('appointments')->with('msg','Appointment saved successfully...!');\n \n \n \n }", "public function push(Reminder $reminder);", "function eventattendees()\n{\n}", "public function initAppointments()\n\t{\n\t\t$this->collAppointments = array();\n\t}", "public function store(Request $request)\n {\n\n\n // dd( Appointment::where('delivered', 'NO')->where('date_string' ,'<=', date(\"Y-m-d H:i\"))->exists());\n $appointment = new Appointment();\n $appointment->title = $request->title;\n $appointment->body = $request->body;\n $appointment->save();\n\n if($request->item == \"now\") {\n\n $appointment->delivered = 'YES';\n $appointment->send_date = date(\"Y-m-d H:i\");\n auth('api')->user()->appointments()->save($appointment);\n\n $users = User::all();\n\n foreach($users as $user) {\n AppointmentDue::dispatch($appointment);\n }\n\n return response()->json('Mail sent.', 201);\n\n } else {\n $appointment->date_string = date(\"Y-m-d H:i\", strtotime($request->send_date));\n $appointment->date_send = $request->send_date;\n $appointment->date_issue = $request->date_issue;\n auth('api')->user()->appointments()->save($appointment);\n\n return response()->json('Notification will be sent later.', 201);\n }\n }", "function addTask($taskListId, $title, $note, $taskDate, $isImportant) {\n global $settings;\n\n $headers = array(\n \"User-Agent: php-tutorial/1.0\",\n \"Authorization: Bearer \".token()->access_token,\n \"Accept: application/json\",\n \"Content-Type: application/json\",\n \"client-request-id: \".makeGuid(),\n \"return-client-request-id: true\"\n );\n $post_body = '{\"title\": ' . json_encode($title) .',';\n $post_body .= '\"body\": {\"contentType\": \"text\",\"content\": '. json_encode($note) .'}';\n if ($taskDate != '') {\n $post_body .= ',\"dueDateTime\": {\"dateTime\": \"' . $taskDate . 'T08:00:00.0000000\",\"timeZone\": \"UTC\"}';\n }\n\tif ($isImportant == 'true') {\n\t\t$post_body .= ',\"importance\": \"high\"';\n\t}\n $post_body .= '}';\n $outlookApiUrl = $settings[\"api_url\"] . \"/me/todo/lists/\" . $taskListId .\"/tasks\";\n $response = runCurl($outlookApiUrl, $post_body, $headers);\n echo \"<pre>\"; print_r($response); echo \"</pre>\";\n return;\n}", "public function store(Request $request)\n {\n $start_date = Carbon::parse($request->start_date)->format('Y-m-d');\n $starttime = date(\"G:i\", strtotime($request->starttime));\n\n session_start();\n $appointee_id = $request->appointee;\n $appointee = User::find($appointee_id);\n $client = User::where('email', $request->client_email)->first();\n $startDateTime = $start_date. 'T' .$starttime . ':00+06:00';\n $endtime = $dt = Carbon::parse($start_date . ' ' .$starttime. ':00')->addMinutes(30);\n $endDateTime = $start_date. 'T' .$endtime->toTimeString(). '+06:00';\n\n if (isset($_SESSION['access_token']) && $_SESSION['access_token']) {\n $this->client->setAccessToken($_SESSION['access_token']);\n $service = new Google_Service_Calendar($this->client);\n $sendNotifications = array('sendNotifications' => true);\n\n $calendarId = 'primary';\n $event = new Google_Service_Calendar_Event([\n 'summary' => $request->title,\n 'description' => $request->description,\n 'start' => ['dateTime' => $startDateTime],\n // 'sendNotifications' => true,\n 'overrides' => array(\n array('method' => 'email', 'minutes' => 24 * 60),\n array('method' => 'popup', 'minutes' => 1),\n ),\n 'end' => ['dateTime' => $endDateTime],\n 'reminders' => ['useDefault' => true],\n 'attendees' => [\n [\n 'email' => $request->client_email, \n 'responseStatus' => 'needsAction'\n ],\n [\n 'email' => $appointee->email,\n 'responseStatus' => 'needsAction'\n ],\n ],\n \"extendedProperties\" =>\n [\"private\" => [\"everyoneDeclinedDismissed\" => -1],\n \"useDefault\" => true]\n \n ]);\n\n\n $results = $service->events->insert($calendarId, $event, $sendNotifications);\n // if ($results) {\n // // return response()->json(['status' => 'error', 'message' => 'Something went wrong']);\n // // return redirect()->back();\n // return view('appointment.acknowledgement');\n // }\n\n\n // return response()->json(['status' => 'success', 'message' => 'Event Created']);\n Appointment::updateOrCreate(\n [\n 'title' => $request->title,\n 'appointer_id' => $appointee->id,\n 'client_id' => $client->id,\n\n ],\n [\n 'title' => $request->title,\n 'appointer_id' => $appointee->id,\n 'client_id' => $client->id,\n 'app_date' => $start_date,\n 'app_time' => $starttime,\n ]);\n\n $appointment = Appointment::where([\n 'appointer_id' => $appointee->id,\n 'client_id' => $client->id,\n 'app_date' => $start_date,\n 'app_time' => $starttime,\n ])->first();\n\n // return redirect()->route('email', [$appointee->id, $client->id, $appointment->id]);\n return view('appointment.acknowledgement');\n\n } else {\n \n return redirect()->route('oauthCallback');\n \n }\n\n }", "public function run()\n {\n $appointment = ([\n [\n 'name' => 'Ram',\n 'address' => 'thaiba',\n 'phone' => '9863283764',\n 'date' => '9/14/2017',\n 'time' => '10:12',\n 'doctor_id' => '1'\n ], [\n 'name' => 'Hari',\n 'address' => 'kalimati',\n 'phone' => '986833034',\n 'date' => '9/14/2017',\n 'time' => '10:13',\n 'doctor_id' => '2'\n ], [\n 'name' => 'Meera',\n 'address' => 'patan',\n 'phone' => '982329923',\n 'date' => '9/14/2017',\n 'time' => '12:01',\n 'doctor_id' => '3'\n ]\n ]);\n\n App\\Appointment::insert($appointment);\n }", "public function message()\n {\n return 'You already have an appointment scheduled at this time.';\n }", "public function add($id=null) {\n\t\t\n\t\t$appt = new Appt;\n\t\t// copy details from this appointment to new appointment\n\t\tif(!empty($id)) {\n\t\t\t$old = Appt::findOrFail($id);\n\t\t\t$appt->client_id = $old->client_id;\n\t\t\t$appt->therapist_id = $old->therapist_id;\n\t\t\t// copy the notes - possibly should insert on date\n\t\t\t\n\t\t\t// make it a link toprevious appt\n\t\t\t$prev = HTML::linkRoute('apptDisplay', \"Previous Appointment : \" . $old->date ,$old->id ); \n\t\t\t\n\t\t\t$appt->notes = \"<br><hr> \" . $prev . \"<br><hr>\" . $old->notes;\n\t\t} else {\n\t\t\t// add an appointment to the logged in user's\n\t\t\t$appt->therapist_id = userId();\n\t\t}\n\n\t\t$therapists = Therapist::lists('name','id');\t// $appt->therapists;\n\n\t\t$clients = Client::lists('name','id'); // $appt->clients;\n\n\t\treturn View::make('appts.add',array(\n\t\t\t'appt'\t\t\t=> $appt,\n\t\t\t'therapists' \t=> $therapists,\n\t\t\t'clients' \t\t=> $clients,\n\t\t))->with(\"title\",\"Appointment Add\");\t\n\t}", "static function addAppointment(RowUpdate &$contact_upd, $data, $account_id) {\n \tglobal $timedate;\n $app_upd = RowUpdate::for_model($data['model']);\n $app_upd->loadBlankRecord();\n\n $data['direction'] = 'Outbound';\n $data['status'] = 'Planned';\n $data['duration'] = 60;\n $data['assigned_user_id'] = AppConfig::current_user_id();\n $data['date_start'] = $timedate->to_db($data['date_start']);\n\n if ($account_id) {\n $data['parent_type'] = 'Accounts';\n $data['parent_id'] = $account_id;\n } else {\n $data['parent_type'] = 'Contacts';\n $data['parent_id'] = $contact_upd->getPrimaryKeyValue();\n }\n\n $app_upd->set($data);\n\n\t\tif (! $app_upd->validate()) {\n\t\t\t$GLOBALS['log']->error('appointment validate failed');\n\t\t\t$GLOBALS['log']->error($app_upd->errors);\n\t\t\treturn null;\n\t\t}\n if ($app_upd->save()) {\n \t$app_upd->addUpdateLink('users', array('id' => $data['assigned_user_id'], 'accept_status' => 'accept'));\n $app_upd->addUpdateLink('contacts', $contact_upd->getPrimaryKeyValue());\n \n return $app_upd->getPrimaryKeyValue();\n }\n\n return null;\n }", "function schedulerAddEhsReminder($day,$pid,$clinicId) {\n global $date ;\n $query = \"SELECT * FROM patient_reminder where ehsReminder = '2' AND schduleday = {$day} AND clinicId={$clinicId}\";\n $result = @mysql_query($query);\n $numRows = @mysql_num_rows($result);\n\n if($numRows > 0) { \n $sqlcheck=\"select * from automaticscheduling_content where patient_id={$pid} and clinic_id={$clinicId} and day={$day}\";\n $querycheck= mysql_query($sqlcheck);\n $rowcheck= mysql_fetch_assoc($querycheck);\n if($rowcheck['reminder']==0){ \n \n $i = 0;\n while($i < $numRows) { \n \n $row = @mysql_fetch_assoc($result);\n $patient_reminder_id = $row['patient_reminder_id'];\n $clinicId = $row['clinicId'];\n $status = $row['status'];\n // while($pat < $patientCount) { \n \n $data = array(\n\t\t\t\t\t 'parent_reminder_id' => $row['patient_reminder_id'],\n\n\t\t\t\t\t 'clinicId' => $row['clinicId'],\n \n 'user_id' =>$row['user_id'],\n \n 'patient_id' => $pid,\n\n\t\t\t\t\t 'reminder' => $row['reminder'],\n\n 'status' => '1',\n\n\t\t\t\t\t 'creation_date' => date(\"Y-m-d\"),\n\n 'modified' => date(\"Y-m-d\"),\n\n\t\t\t\t\t 'ehsReminder' => '2'\n\n\t\t\t\t );\n\n $sqlinsert = \"INSERT INTO patient_reminder SET\n\t\t\t\t\t\t\t parent_reminder_id = '\".$data['parent_reminder_id'].\"',\n\t\t\t\t\t\t\t patient_id = '\".$data['patient_id'].\"',\n\t\t\t\t\t\t\t user_id = '\".$data['user_id'].\"',\n\t\t\t\t\t\t\t clinicId = '\".$data['clinicId'].\"',\n\t\t\t\t\t\t\t reminder ='\".$data['reminder'].\"',\n\t\t\t\t\t\t\t creation_date = '\".$data['creation_date'].\"',\n modified = '\".$data['modified'].\"',\n status = '1',\n\t\t\t\t\t\t\t ehsReminder = '\".$data['ehsReminder'].\"',\n assignday='\".$day.\"'\";\n\n\t\t\t\t $result1 = @mysql_query($sqlinsert);\n $insertId= mysql_insert_id();\n // $date = date(\"Y-m-d\");\n $sql = \"select * from reminder_schedule where DATEDIFF(DATE_FORMAT(scheduled_date,'%Y-%m-%d'),'{$date}') =0 and reminder_set=1 and patient_id=\" .$pid;\n $res = mysql_query($sql);\n $num = mysql_num_rows($res);\n if ($num == 0) {\n $reminder_arr1 = array(\n 'patient_id' => $pid,\n 'therapistId' => 0,\n 'parent_reminder_schedule_id' => $insertId,\n 'scheduled_date' => $date,\n 'reminderEhsFlag' => '2',\n 'status' => 'pending',\n 'reminder_set' => 1,\n 'assignday'=>$day\n );\n $sqlreminder=\"INSERT INTO reminder_schedule SET\n patient_id= '\".$reminder_arr1['patient_id'].\"',\n therapistId= '\".$reminder_arr1['therapistId'].\"',\n parent_reminder_schedule_id= '\".$reminder_arr1['parent_reminder_schedule_id'].\"',\n scheduled_date= '\".$reminder_arr1['scheduled_date'].\"',\n reminderEhsFlag= '\".$reminder_arr1['reminderEhsFlag'].\"',\n status= '\".$reminder_arr1['status'].\"',\n reminder_set= '\".$reminder_arr1['reminder_set'].\"',\n assignday='\".$reminder_arr1['assignday'].\"'\";\n $res1= mysql_query($sqlreminder);\n }\n \n $pat++;\n\n //}\n\n \n\n // $queryUpdate = \"UPDATE patient_reminder SET status = '1' , scheduler_status = '2' ,schdulerAction = '0' where patient_reminder_id = \".$patient_reminder_id;\n\t\t // @mysql_query($queryUpdate);\n\n $i++;\n\n }\n \n $sqlupdate=\"update automaticscheduling_content set reminder=1 where id={$rowcheck['id']}\";\n $queryupdate= mysql_query($sqlupdate);\n }\n echo $i.\"Times scheduler run\";\n echo $pat. \"Patient Reminders added by scheduler\";echo \"<br>\";\n \n }\n\n }", "public function addJob($job = []) {\n if(!isset($job['msg']))\n throw new RuntimeException('Job without a message');\n\n if(!isset($job['schedule']))\n throw new RuntimeException('Job without a CRON expression');\n\n if(!isset($job['function']))\n throw new RuntimeException('Job without a function');\n\n if($this->isDue($job['schedule']))\n $this->jobs[] = $job;\n }", "public function addAppointment(Appointment $l)\n\t{\n\t\tif ($this->collAppointments === null) {\n\t\t\t$this->initAppointments();\n\t\t}\n\t\tif (!in_array($l, $this->collAppointments, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collAppointments, $l);\n\t\t\t$l->setsfGuardUser($this);\n\t\t}\n\t}", "public function run()\n {\n //\n $appointments=[\n \t \t[1, 1],\n \t \t[2, 1],\n \t \t[2, 1],\n \t ];\n\n \t $count = count($appointments);\n\n\t foreach ($appointments as $key => $appointmentData) {\n\t $appointment = new Appointment();\n\n\t $appointment->created_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n\t $appointment->updated_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n\t $appointment->goal_id = $appointmentData[0];\n $appointment->user_id = $appointmentData[0];\n\n\t $appointment->save();\n\t $count--;\n //\n }\n }", "function new_appointment() {\n $owners = $this->person->get_all_with_vehicles();\n\n //$vehicles = $this->vehicle->get_by_owner($this->client['person_id'], false);\n if ($owners) {\n $this->load_view_admin('appointment/new_appointment', ['owners' => $owners]);\n } else {\n $this->load->view(\"errors/error_404\");\n }\n }", "public function api_setNoContactsReminder() {\n //successivamente i metodi NoContacts7 e NoContacts15 invieranno i template mandrill\n \n \n $jobs='reminder';\n $template='ImportaContatti';\n $reason='7gg NoContacts';\n $days=7;\n \n $db = $this->Member->getDataSource();\n \n /* SUPERQUERY ESTRAE I MEMBRI REGISTRATI 7GG FA CHE NON HANNO CONDIVISO I CONTATTI.*/ \n \n $query=\"INSERT INTO tmp_cronjobs(membig,name,surname,email,jobs,template,reason,user_created,job_created) \".\n \"SELECT m.big,m.name,m.surname,m.email,'$jobs','$template','$reason', m.created, CURRENT_DATE \".\n \"FROM members m \".\n \"LEFT JOIN contacts c ON m.big=c.member_big \".\n \"WHERE DATE(created) = DATE(NOW() - interval '$days days') \".\n \"AND c.name IS NULL AND status<255 \".\n \"ORDER BY big ASC\";\n \n //print($query);\n try {\n $db->fetchAll($query);\n }\n catch (Exception $e)\n {\n debug($e);\n return false;\n }\n \n \n \n $jobs='reminder';\n $template='ImportaContatti_reminder';\n $reason='15gg NoContacts';\n $days=15;\n \n \n $query=\"INSERT INTO tmp_cronjobs(membig,name,surname,email,jobs,template,reason,user_created,job_created) \".\n \"SELECT m.big,m.name,m.surname,m.email,'$jobs','$template','$reason', m.created, CURRENT_DATE \".\n \"FROM members m \".\n \"LEFT JOIN contacts c ON m.big=c.member_big \".\n \"WHERE DATE(created) = DATE(NOW() - interval '$days days') \".\n \"AND c.name IS NULL AND status<255 \".\n \"ORDER BY big ASC\";\n \n //print($query);\n try {\n $db->fetchAll($query);\n }\n catch (Exception $e)\n {\n debug($e);\n return false;\n }\n \n \n \n //print_r($members); \n return true;\n }", "public function set_date_reminder($date)\n {\n }", "function _setAppointment($mapimessage, $appointment) {\n // non-leapyear. Why this is, is totally unclear.\n $monthminutes = array(0,44640,84960,129600,172800,217440,260640,305280,348480,393120,437760,480960);\n\n // Get timezone info\n if(isset($appointment->timezone))\n $tz = $this->_getTZFromSyncBlob(base64_decode($appointment->timezone));\n else\n $tz = false;\n\n //calculate duration because without it some webaccess views are broken. duration is in min\n $localstart = $this->_getLocaltimeByTZ($appointment->starttime, $tz);\n $localend = $this->_getLocaltimeByTZ($appointment->endtime, $tz);\n $duration = ($localend - $localstart)/60;\n\n //nokia sends an yearly event with 0 mins duration but as all day event,\n //so make it end next day\n if ($appointment->starttime == $appointment->endtime && isset($appointment->alldayevent) && $appointment->alldayevent) {\n $duration = 1440;\n $appointment->endtime = $appointment->starttime + 24 * 60 * 60;\n $localend = $localstart + 24 * 60 * 60;\n }\n\n // is the transmitted UID OL compatible?\n // if not, encapsulate the transmitted uid\n $appointment->uid = getOLUidFromICalUid($appointment->uid);\n\n mapi_setprops($mapimessage, array(PR_MESSAGE_CLASS => \"IPM.Appointment\"));\n\n $this->_setPropsInMAPI($mapimessage, $appointment, $this->_appointmentmapping);\n\n //we also have to set the responsestatus and not only meetingstatus, so we use another mapi tag\n if (isset($appointment->meetingstatus))\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_LONG:{00062002-0000-0000-C000-000000000046}:0x8218\") => $appointment->meetingstatus));\n\n //sensitivity is not enough to mark an appointment as private, so we use another mapi tag\n if (isset($appointment->sensitivity) && $appointment->sensitivity == 0) $private = false;\n else $private = true;\n\n // Set commonstart/commonend to start/end and remindertime to start, duration, private and cleanGlobalObjectId\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8516\") => $appointment->starttime,\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8517\") => $appointment->endtime,\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8502\") => $appointment->starttime,\n $this->_getPropIDFromString(\"PT_LONG:{00062002-0000-0000-C000-000000000046}:0x8213\") => $duration,\n $this->_getPropIDFromString(\"PT_BOOLEAN:{00062008-0000-0000-C000-000000000046}:0x8506\") => $private,\n $this->_getPropIDFromString(\"PT_BINARY:{6ED8DA90-450B-101B-98DA-00AA003F1305}:0x23\") => $appointment->uid,\n ));\n\n // Set named prop 8510, unknown property, but enables deleting a single occurrence of a recurring\n // type in OLK2003.\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_LONG:{00062008-0000-0000-C000-000000000046}:0x8510\") => 369));\n\n // Set reminder boolean to 'true' if reminder is set\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_BOOLEAN:{00062008-0000-0000-C000-000000000046}:0x8503\") => isset($appointment->reminder) ? true : false));\n\n if(isset($appointment->reminder) && $appointment->reminder > 0) {\n //start is in seconds and reminder in minutes, so it needs to be multiplied by 60\n // Set 'flagdueby' to correct value (start - reminderminutes)\n mapi_setprops($mapimessage, array(\n $this->_getPropIDFromString(\"PT_SYSTIME:{00062008-0000-0000-C000-000000000046}:0x8560\") => ($appointment->starttime - $appointment->reminder * 60)));\n }\n\n if(isset($appointment->recurrence)) {\n // Set PR_ICON_INDEX to 1025 to show correct icon in category view\n mapi_setprops($mapimessage, array(PR_ICON_INDEX => 1025));\n\n $recurrence = new Recurrence($this->_store, $mapimessage);\n\n if(!isset($appointment->recurrence->interval))\n $appointment->recurrence->interval = 1;\n\n switch($appointment->recurrence->type) {\n case 0:\n $recur[\"type\"] = 10;\n if(isset($appointment->recurrence->dayofweek))\n $recur[\"subtype\"] = 1;\n else\n $recur[\"subtype\"] = 0;\n\n $recur[\"everyn\"] = $appointment->recurrence->interval * (60 * 24);\n break;\n case 1:\n $recur[\"type\"] = 11;\n $recur[\"subtype\"] = 1;\n $recur[\"everyn\"] = $appointment->recurrence->interval;\n break;\n case 2:\n $recur[\"type\"] = 12;\n $recur[\"subtype\"] = 2;\n $recur[\"everyn\"] = $appointment->recurrence->interval;\n break;\n case 3:\n $recur[\"type\"] = 12;\n $recur[\"subtype\"] = 3;\n $recur[\"everyn\"] = $appointment->recurrence->interval;\n break;\n case 4:\n $recur[\"type\"] = 13;\n $recur[\"subtype\"] = 1;\n $recur[\"everyn\"] = $appointment->recurrence->interval * 12;\n break;\n case 5:\n $recur[\"type\"] = 13;\n $recur[\"subtype\"] = 2;\n $recur[\"everyn\"] = $appointment->recurrence->interval * 12;\n break;\n case 6:\n $recur[\"type\"] = 13;\n $recur[\"subtype\"] = 3;\n $recur[\"everyn\"] = $appointment->recurrence->interval * 12;\n break;\n }\n\n $starttime = $this->gmtime($localstart);\n $endtime = $this->gmtime($localend);\n\n $recur[\"startocc\"] = $starttime[\"tm_hour\"] * 60 + $starttime[\"tm_min\"];\n $recur[\"endocc\"] = $recur[\"startocc\"] + $duration; // Note that this may be > 24*60 if multi-day\n\n // \"start\" and \"end\" are in GMT when passing to class.recurrence\n $recur[\"start\"] = $this->_getDayStartOfTimestamp($this->_getGMTTimeByTz($localstart, $tz));\n $recur[\"end\"] = $this->_getDayStartOfTimestamp(0x7fffffff); // Maximum GMT value for end by default\n\n if(isset($appointment->recurrence->until)) {\n $recur[\"term\"] = 0x21;\n $recur[\"end\"] = $appointment->recurrence->until;\n } else if(isset($appointment->recurrence->occurrences)) {\n $recur[\"term\"] = 0x22;\n $recur[\"numoccur\"] = $appointment->recurrence->occurrences;\n } else {\n $recur[\"term\"] = 0x23;\n }\n\n if(isset($appointment->recurrence->dayofweek))\n $recur[\"weekdays\"] = $appointment->recurrence->dayofweek;\n if(isset($appointment->recurrence->weekofmonth))\n $recur[\"nday\"] = $appointment->recurrence->weekofmonth;\n if(isset($appointment->recurrence->monthofyear))\n $recur[\"month\"] = $monthminutes[$appointment->recurrence->monthofyear-1];\n if(isset($appointment->recurrence->dayofmonth))\n $recur[\"monthday\"] = $appointment->recurrence->dayofmonth;\n\n // Process exceptions. The PDA will send all exceptions for this recurring item.\n if(isset($appointment->exceptions)) {\n foreach($appointment->exceptions as $exception) {\n // we always need the base date\n if(!isset($exception->exceptionstarttime))\n continue;\n\n if(isset($exception->deleted) && $exception->deleted) {\n // Delete exception\n if(!isset($recur[\"deleted_occurences\"]))\n $recur[\"deleted_occurences\"] = array();\n\n array_push($recur[\"deleted_occurences\"], $this->_getDayStartOfTimestamp($exception->exceptionstarttime));\n } else {\n // Change exception\n $mapiexception = array(\"basedate\" => $this->_getDayStartOfTimestamp($exception->exceptionstarttime));\n\n if(isset($exception->starttime))\n $mapiexception[\"start\"] = $this->_getLocaltimeByTZ($exception->starttime, $tz);\n if(isset($exception->endtime))\n $mapiexception[\"end\"] = $this->_getLocaltimeByTZ($exception->endtime, $tz);\n if(isset($exception->subject))\n $mapiexception[\"subject\"] = u2w($exception->subject);\n if(isset($exception->location))\n $mapiexception[\"location\"] = u2w($exception->location);\n if(isset($exception->busystatus))\n $mapiexception[\"busystatus\"] = $exception->busystatus;\n if(isset($exception->reminder)) {\n $mapiexception[\"reminder_set\"] = 1;\n $mapiexception[\"remind_before\"] = $exception->reminder;\n }\n if(isset($exception->alldayevent))\n $mapiexception[\"alldayevent\"] = $exception->alldayevent;\n\n if(!isset($recur[\"changed_occurences\"]))\n $recur[\"changed_occurences\"] = array();\n\n array_push($recur[\"changed_occurences\"], $mapiexception);\n\n }\n }\n }\n\n $recurrence->setRecurrence($tz, $recur);\n\n }\n else {\n $isrecurringtag = $this->_getPropIDFromString(\"PT_BOOLEAN:{00062002-0000-0000-C000-000000000046}:0x8223\");\n mapi_setprops($mapimessage, array($isrecurringtag => false));\n }\n\n // Do attendees\n if(isset($appointment->attendees) && is_array($appointment->attendees)) {\n $recips = array();\n //open addresss book for user resolve\n $addrbook = mapi_openaddressbook($this->_session);\n foreach($appointment->attendees as $attendee) {\n $recip = array();\n $recip[PR_EMAIL_ADDRESS] = u2w($attendee->email);\n\n // lookup information in GAB if possible so we have up-to-date name for given address\n $userinfo = array( array( PR_DISPLAY_NAME => $recip[PR_EMAIL_ADDRESS] ) );\n $userinfo = mapi_ab_resolvename($addrbook, $userinfo, EMS_AB_ADDRESS_LOOKUP);\n if(mapi_last_hresult() == NOERROR) {\n $recip[PR_DISPLAY_NAME] = $userinfo[0][PR_DISPLAY_NAME];\n $recip[PR_EMAIL_ADDRESS] = $userinfo[0][PR_EMAIL_ADDRESS];\n $recip[PR_SEARCH_KEY] = $userinfo[0][PR_SEARCH_KEY];\n $recip[PR_ADDRTYPE] = $userinfo[0][PR_ADDRTYPE];\n $recip[PR_ENTRYID] = $userinfo[0][PR_ENTRYID];\n $recip[PR_RECIPIENT_TYPE] = MAPI_TO;\n }\n else {\n $recip[PR_DISPLAY_NAME] = u2w($attendee->name);\n $recip[PR_SEARCH_KEY] = $recip[PR_EMAIL_ADDRESS];\n $recip[PR_ADDRTYPE] = \"SMTP\";\n $recip[PR_RECIPIENT_TYPE] = MAPI_TO;\n $recip[PR_ENTRYID] = mapi_createoneoff($recip[PR_DISPLAY_NAME], $recip[PR_ADDRTYPE], $recip[PR_EMAIL_ADDRESS]);\n }\n\n array_push($recips, $recip);\n }\n\n mapi_message_modifyrecipients($mapimessage, 0, $recips);\n mapi_setprops($mapimessage, array(\n PR_ICON_INDEX => 1026,\n $this->_getPropIDFromString(\"PT_BOOLEAN:{00062002-0000-0000-C000-000000000046}:0x8229\") => true\n ));\n }\n }", "function queue_emails(){\n\t global $EM_Event, $wpdb;\n\t $old_EM_Event = !empty($EM_Event) ? clone($EM_Event):null; //save old event in case already set\n\t\t//disable the current events are past rule\n\t add_filter('option_pre_dbem_events_current_are_past', 'em_emails_return_false', create_function('$a', 'return false;'));\n\t //For each event x days on\n\t $days = get_option('dbem_emp_emails_reminder_days',1);\n\t $scope = ($days > 0) ? date('Y-m-d', current_time('timestamp') + (86400*$days)):date('Y-m-d', current_time('timestamp')+86400);\n\t //make sure we don't get past events, only events starting that specific date\n\t $events_are_past = get_option('dbem_events_current_are_past');\n\t update_option('dbem_events_current_are_past', true);\n\t\t$output_type = get_option('dbem_smtp_html') ? 'html':'email';\n\t foreach( EM_Events::get(array('scope'=>$scope,'private'=>1,'blog'=>false)) as $EM_Event ){\n\t /* @var $EM_Event EM_Event */\n\t $emails = array();\n\t \t//get ppl attending\n\t \tforeach( $EM_Event->get_bookings()->get_bookings()->bookings as $EM_Booking ){ //get confirmed bookings\n\t \t /* @var $EM_Booking EM_Booking */\n\t \t if( is_email($EM_Booking->get_person()->user_email) ){\n\t\t\t \t$subject = $EM_Booking->output(get_option('dbem_emp_emails_reminder_subject'),'raw');\n\t\t\t \t$message = $EM_Booking->output(get_option('dbem_emp_emails_reminder_body'),$output_type);\n\t\t \t $emails[] = array($EM_Booking->get_person()->user_email, $subject, $message, $EM_Booking->booking_id);\n\t \t }\n\t \t}\n\t \tif(count($emails) > 0){\n\t \t $attachments = serialize(array());\n\t \t if( get_option('dbem_emp_emails_reminder_ical') ){\n\t\t \t //create invite ical\n\t\t \t $upload_dir = wp_upload_dir();\n\t\t \t $icalfilename = trailingslashit($upload_dir['basedir']).\"em-cache/invite_\".$EM_Event->event_id.\".ics\";\n\t\t \t $icalfile = fopen($icalfilename,'w+');\n\t\t \t if( $icalfile ){\n\t\t\t\t\t\tob_start();\n\t\t\t\t\t\tem_locate_template('templates/ical-event.php', true);\n\t\t\t\t\t\t$icalcontent = preg_replace(\"/([^\\r])\\n/\", \"$1\\r\\n\", ob_get_clean());\n\t\t\t\t\t\tfwrite($icalfile, $icalcontent);\n\t\t\t\t\t\tfclose($icalfile);\n\t\t\t\t\t\t$ical_file_array = array('name'=>'invite.ics', 'type'=>'text/calendar','path'=>$icalfilename);\n\t\t\t\t\t\t$attachments = serialize(array($ical_file_array));\n\t\t \t }\n\t \t }\n\t \t foreach($emails as $email){\n\t\t\t \t$wpdb->insert(EM_EMAIL_QUEUE_TABLE, array('email'=>$email[0],'subject'=>$email[1],'body'=>$email[2],'attachment'=>$attachments,'event_id'=>$EM_Event->event_id,'booking_id'=>$email[3]));\n\t \t }\n\t \t}\n\t \t\n\t }\n\t //cleanup\n\t update_option('dbem_events_current_are_past', $events_are_past); //reset previous current events are past setting\n\t $EM_Event = $old_EM_Event; //reset global\n\t remove_filter('option_pre_dbem_events_current_are_past', 'em_emails_return_false');\n\t}", "public function personal(){\n\t\t$this->checkVetLogin();\n\t\tConfigure::write('debug', 2);\n \t\t$this->autoRender = false;\n\t\t$data = array();\n\t\t// check for proper form submit.\n\t\tif ( $this->request->is('ajax') && $this->request->is('post') ){\n\t\t\t$data = $this->validatePersonal($this->request->data);\t\t\t\n\t\t\tif(empty($data)){\n\t\t\t\t$appointments = array();\n\t\t\t\t$filter_start = str_replace('/', '-', $this->request->data['Appointment']['filter_start']);\n\t\t\t\t$filter_end = str_replace('/', '-', $this->request->data['Appointment']['filter_end']);\n\t\t\t\t\n\t\t\t\t$start_date = strtotime($filter_start);\n\t\t\t\t$end_date = strtotime($filter_end);\t\t\t\n\t\t\t\tfor( $i = $start_date; $i <= $end_date; ){\n\t\t\t\t\t$save = array(\n\t\t\t\t\t\t'title' \t\t\t=> $this->request->data['Appointment']['description'],\n\t\t\t\t\t\t'vet_id' \t\t\t=> $this->Session->read('vet.id'),\n\t\t\t\t\t\t'client_id' \t\t=> 0,\n\t\t\t\t\t\t'pet_id' \t\t\t=> 0,\n\t\t\t\t\t\t'appointment_type_id' => 0,\n\t\t\t\t\t\t'appointment_date' \t=> date('Y-m-d',$i),\n\t\t\t\t\t\t'slot_start' \t\t=> $this->request->data['Appointment']['appoint_start_time'],\n\t\t\t\t\t\t'slot_end' \t\t\t=> $this->request->data['Appointment']['appoint_end_time'],\n\t\t\t\t\t\t'status' \t\t\t=> 1\n\t\t\t\t\t);\n\t\t\t\t\t$this->Appointment->create();\n\t\t\t\t\t$this->Appointment->save($save);\n\t\t\t\t\t\n\t\t\t\t\t$this->Appointment->id = $this->Appointment->getLastInsertId();\n\t\t\t\t\t$appointment = $this->Appointment->field('Appointment.appointment_id');\n\t\t\t\t\t\n\t\t\t\t\t$stdate = date_create( date('Y-m-d',$i). $this->request->data['Appointment']['appoint_start_time']);\n\t\t\t\t\t$start = date_sub($stdate, date_interval_create_from_date_string('2 hours'));\n\t\t\t\t\t$edate = date_create( date('Y-m-d',$i). $this->request->data['Appointment']['appoint_end_time']);\n\t\t\t\t\t$end = date_sub($edate, date_interval_create_from_date_string('2 hours'));\n\t\t\t\t\t\n\t\t\t\t\t$appointments[$appointment] = array(\n\t\t\t\t\t\t\t'summary' => $this->request->data['Appointment']['description'],\n\t\t\t\t\t\t\t'start' => array(\n\t\t\t\t\t\t\t\t'dateTime' => date_format($start,DATE_ATOM),\n\t\t\t\t\t\t\t\t'timeZone' => 'Europe/Paris'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'end' => array(\n\t\t\t\t\t\t\t\t'dateTime' => date_format($end,DATE_ATOM),\n\t\t\t\t\t\t\t\t'timeZone' => 'Europe/Paris'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t$i = strtotime(\"+1 day\", $i);\n\t\t\t\t}\n\n\t\t\t\t$dbo = $this->AvailabilitySetting->getDatasource();\n\t\t\t\t$value = $dbo->value('Doctor\\'s Personal Appointment', 'string');\n\t\t\t\t$this->AvailabilitySetting->updateAll(\n\t\t\t\t\tarray('AvailabilitySetting.status' => 2, 'AvailabilitySetting.comment' => $value),\n\t\t\t\t\t// conditions\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'AvailabilitySetting.available_date BETWEEN ? AND ?' => array(\n\t\t\t\t\t\t\tdate('Y-m-d',strtotime($filter_start)), \n\t\t\t\t\t\t\tdate('Y-m-d',strtotime($filter_end))\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'AvailabilitySetting.vet_id' => $this->Session->read('vet.id'),\n\t\t\t\t\t\t'AvailabilitySetting.status' => 1,\n\t\t\t\t\t\t\n\t\t\t\t\t\t'TIME(AvailabilitySetting.slots) >=' =>date('H:i:s',strtotime($this->request->data['Appointment']['appoint_start_time'])),\n\t\t\t\t\t\t'TIME(AvailabilitySetting.slots) <=' =>date('H:i:s',strtotime('+ 5 mins', strtotime($this->request->data['Appointment']['appoint_end_time'])))\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$data = $appointments;\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\t$data['message'] = 'Unable to find details. Please try again later.';\n\t\t}\n\t\techo json_encode($data);\n\t}", "function recordNewAppointment($appointment) {\n $json = new JsonStorage('date.json');\n $year = $appointment->year;\n $month = $appointment->month;\n $day = $appointment->day;\n $elements = $json->query(function ($elem) use ($year, $month, $day) {\n return ($elem['year'] == $year) && ($elem['month'] == $month) && ($elem['day'] == $day);\n });\n\n //If more then one day was found\n if (count($elements) > 1) {\n echo \"Hiba!\";\n return;\n }\n //Creating appointment data\n $app = new stdClass();\n $app->hour = $appointment->hour;\n $app->minute = $appointment->min;\n $app->limit = $appointment->limit;\n $app->attendees = [];\n $app->id = uniqid();\n $app->dayid = \"no_id\";\n\n //If the day has already has been set\n if (count($elements) == 1) {\n $newRecord = array_values($elements)[0];\n\n //Adding new appointment to that day\n $app->dayid = $newRecord[\"id\"];\n $newRecord[\"appointments\"][$app->id] = $app;\n $json->update($newRecord[\"id\"],$newRecord);\n $json->save();\n }\n\n //If the day has not been created\n else if(count($elements) == 0) {\n //Creating day structure\n $info = new stdClass();\n $info->id = \"no_id\";\n $info->year = $appointment->year;\n $info->month = $appointment->month;\n $info->day = $appointment->day;\n $info->appointments = [];\n\n //Adding appointment\n $info->appointments[$app->id] = $app;\n $id = $json->add($info);\n\n //Cross referencing\n $info->appointments[$app->id]->dayid = $id;\n $json->findById($id)->id = $id;\n\n }\n\n}", "public function bkap_add_reschedule_link( $item_id, $item, $order ) {\n\n $book_item_meta_date = ( '' == get_option( 'book_item-meta-date' ) ) ? __( 'Start Date', 'woocommerce-booking' ) : get_option( 'book_item-meta-date' ) ;\n $checkout_item_meta_date = ( '' == get_option( 'checkout_item-meta-date' ) ) ? __( 'End Date', 'woocommerce-booking' ) : get_option( 'checkout_item-meta-date' );\n $book_item_meta_time = ( '' == get_option( 'book_item-meta-time' ) ) ? __( 'Booking Time', 'woocommerce-booking' ) : get_option( 'book_item-meta-time' );\n\n if ( is_wc_endpoint_url( 'view-order' ) ) {\n\n $order_status = $order->get_status();\n\n if( isset( $order_status ) && ( $order_status !== 'cancelled' ) && ( $order_status !== 'refunded' ) && ( $order_status !== 'trash' ) && ( $order_status !== '' ) && ( $order_status !== 'failed' ) && ( 'auto-draft' !== $order_status ) && !bkap_common::bkap_is_orderitem_bundled( $item ) && !bkap_common::bkap_is_orderitem_composite( $item ) ) {\n\n $booking_details = array(\n 'date' => '',\n 'hidden_date' => '',\n 'date_checkout' => '',\n 'hidden_date_checkout' => '',\n 'price' => '' );\n\n foreach ( $item->get_meta_data() as $meta_index => $meta ) {\n \n if ( $meta->key === $book_item_meta_date ) {\n $booking_details['date'] = $meta->value;\n }elseif ( $meta->key === '_wapbk_booking_date' ) {\n $hidden_date = explode( '-', $meta->value );\n $booking_details['hidden_date'] = $hidden_date[2] . '-' . $hidden_date[1] . '-' . $hidden_date[0];\n }elseif ( $meta->key === $checkout_item_meta_date ) {\n $booking_details['date_checkout'] = $meta->value;\n }elseif ( $meta->key === '_wapbk_checkout_date' ) {\n $hidden_date_checkout = explode( '-', $meta->value );\n $booking_details['hidden_date_checkout'] = $hidden_date_checkout[2] . '-' . $hidden_date_checkout[1] . '-' . $hidden_date_checkout[0];\n }elseif ( $meta->key === $book_item_meta_time ){\n $booking_details['time_slot'] = $meta->value;\n }elseif( $meta->key == '_resource_id' ) {\n $booking_details['resource_id'] = $meta->value;\n }\n }\n\n $diff_days = (strtotime($booking_details['hidden_date']) - current_time('timestamp'))/60/60/24;\n $global_settings = json_decode( get_option( 'woocommerce_booking_global_settings' ) );\n\n if( isset( $global_settings->bkap_enable_booking_reschedule ) &&\n isset( $global_settings->bkap_booking_reschedule_days ) &&\n $diff_days >= $global_settings->bkap_booking_reschedule_days && \n $global_settings->bkap_enable_booking_reschedule === 'on' &&\n $booking_details['date'] !== '' ) {\n\n printf( '<input type=\"button\" class=\"bkap_edit_bookings\" onclick=\"bkap_edit_booking_class.bkap_edit_bookings(%d,%s)\" value=\"%s\">', $item->get_product_id( 'view' ), $item_id, __( 'Edit Bookings', 'woocommerce-booking' ) );\n\n $localized_array = array( \n 'bkap_booking_params' => $booking_details,\n 'bkap_cart_item' => $item,\n 'bkap_cart_item_key' => $item_id,\n 'bkap_order_id' => $order->get_id(),\n 'bkap_page_type' => 'view-order'\n );\n\n // Additional Data for addons\n $additional_addon_data = bkap_common::bkap_get_order_item_addon_data( $item );\n\n self::bkap_load_template( \n $booking_details, \n $item->get_product(), \n $item->get_product_id( 'view' ), \n $localized_array,\n $item_id,\n $item->get_variation_id( 'view' ),\n $additional_addon_data );\n }\n }\n }\n }", "function &default_add_event()\n\t{\n\t\t$extra_participants = $_GET['participants'] ? explode(',',$_GET['participants']) : array();\n\n\t\tif (isset($_GET['owner']))\n\t\t{\n\t\t\t$owner = $_GET['owner'];\n\t\t}\n\t\t// dont set the planner start group as owner/participants if called from planner\n\t\telseif ($this->view != 'planner' || $this->owner != $this->cal_prefs['planner_start_with_group'])\n\t\t{\n\t\t\t$owner = $this->owner;\n\t\t}\n\n\t\tif (!$owner || !is_numeric($owner) || $GLOBALS['egw']->accounts->get_type($owner) != 'u' ||\n\t\t\t!$this->bo->check_perms(EGW_ACL_ADD,0,$owner))\n\t\t{\n\t\t\tif ($owner)\t// make an owner who is no user or we have no add-rights a participant\n\t\t\t{\n\t\t\t\t// if we come from ressources we don't need any users selected in bcalendar\n\t\t\t\tif (!isset($_GET['participants']) || $_GET['participants'][0] != 'r')\n\t\t\t\t{\n\t\t\t\t\tforeach(explode(',',$owner) as $uid)\n\t\t\t\t\t{\n\t\t\t\t\t\t// only add users or a single ressource, not all ressources displayed by a category\n\t\t\t\t\t\tif (is_numeric($uid) || $owner == $uid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extra_participants[] = $uid;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$owner = $this->user;\n\t\t}\n\t\t//echo \"<p>this->owner=$this->owner, _GET[owner]=$_GET[owner], user=$this->user => owner=$owner, extra_participants=\".implode(',',$extra_participants).\"</p>\\n\";\n\n\t\t// by default include the owner as participant (the user can remove him)\n\t\t$extra_participants[] = $owner;\n\n\t\t$start = $this->bo->date2ts(array(\n\t\t\t'full' => isset($_GET['date']) && (int) $_GET['date'] ? (int) $_GET['date'] : $this->date,\n\t\t\t'hour' => (int) (isset($_GET['hour']) && (int) $_GET['hour'] ? $_GET['hour'] : $this->bo->cal_prefs['workdaystarts']),\n\t\t\t'minute' => (int) $_GET['minute'],\n\t\t));\n\t\t//echo \"<p>_GET[date]=$_GET[date], _GET[hour]=$_GET[hour], _GET[minute]=$_GET[minute], this->date=$this->date ==> start=$start=\".date('Y-m-d H:i',$start).\"</p>\\n\";\n\n\t\t$participant_types['u'] = $participant_types = $participants = array();\n\t\tforeach($extra_participants as $uid)\n\t\t{\n\t\t\tif (isset($participants[$uid])) continue;\t// already included\n\n\t\t\tif (!$this->bo->check_acl_invite($uid)) continue;\t// no right to invite --> ignored\n\n\t\t\tif (is_numeric($uid))\n\t\t\t{\n\t\t\t\t$participants[$uid] = $participant_types['u'][$uid] =\n\t\t\t\t\tcalendar_so::combine_status($uid == $this->user ? 'A' : 'U',1,\n\t\t\t\t\t($uid == $this->user || ($uid == $owner && $this->bo->check_perms(EGW_ACL_ADD,0,$owner))) ? 'CHAIR' : 'REQ-PARTICIPANT');\n\t\t\t}\n\t\t\telseif (is_array($this->bo->resources[$uid[0]]))\n\t\t\t{\n\t\t\t\t$res_data = $this->bo->resources[$uid[0]];\n\t\t\t\tlist($id,$quantity) = explode(':',substr($uid,1));\n\t\t\t\tif (($status = $res_data['new_status'] ? ExecMethod($res_data['new_status'],$id) : 'U'))\n\t\t\t\t{\n\t\t\t\t\t$participants[$uid] = $participant_types[$uid[0]][$id] =\n\t\t\t\t\t\tcalendar_so::combine_status($status,$quantity,'REQ-PARTICIPANT');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!$participants)\t// if all participants got removed, include current user\n\t\t{\n\t\t\t$participants[$this->user] = $participant_types['u'][$this->user] = bcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\t\treturn array(\n\t\t\t'participant_types' => $participant_types,\n\t\t\t'participants' => $participants,\n\t\t\t'owner' => $owner,\n\t\t\t'start' => $start,\n\t\t\t'end' => $start + (int) $this->bo->cal_prefs['defaultlength']*60,\n\t\t\t'tzid' => $this->bo->common_prefs['tz'],\n\t\t\t'priority' => 2,\t// normal\n\t\t\t'public'=> $this->cal_prefs['default_private'] ? 0 : 1,\n\t\t\t'alarm' => array(),\n\t\t);\n\t}", "public function addTask()\n\t{\n\t\t$this->editTask();\n\t}", "public function addAppointment($appId,$date,$startTime,$endTime,$description,$custId){\n $data = array(\n 'appointment_id' => $appId,\n 'appointment_date' => $date,\n 'start_time' => $startTime,\n 'end_time' => $endTime,\n 'description' => $description,\n 'cust_id' => $custId,\n );\n try{\n $result=$this->db->insert('appointment',$data);\n }\n catch (Exception $e){\n echo $e;\n }\n }", "function scheduleMeeting($bean) {\n $bean->join_url = $this->api_data['joinURL'].'&TagCode=SugarCRM&TagID='.$bean->id;\n $bean->host_url = $this->api_data['hostURL'].'?TagCode=SugarCRM&TagID='.$bean->id;\n $bean->creator = $this->account_name;\n return array('success'=>TRUE);\n }", "public function appointmentDate(Request $request){\n $date = Carbon::createFromFormat('d/m/Y', $request->date)->format('Y-m-d');\n $time12=$request->time;\n $time24 = date(\"H:i\", strtotime( $time12 ));\n\n //updating time and date for appointment date\n Appointment::where('id', $request->id)\n ->update([\n 'time' =>$time24,\n 'date' => $date,\n ]);\n\n //google calender settings\n $startTime=Carbon::parse($date.' '.$time24.'Asia/Dhaka');\n $endTime=(clone $startTime)->addHour();\n $event = new Event;\n $event->name = 'Appointment: '.$request->name;\n $event->startDateTime = $startTime;\n $event->endDateTime = $endTime;\n $event->save();\n //generating data for email\n $data = [\n 'name' => $request->name,\n 'date' => $request->date,\n 'time' => $request->time,\n ];\n Mail::to($request->email)->send(new ConfirmMail($data));\n\n return redirect()->route('activities')->with('msg','Appointment saved successfully...!');\n }", "public function approval_generate_old() {\n //send email and notification to renew application and persist reminder\n //Reminders should not be sent to completed studies\n \t$this->out('Starting...');\n $options['joins'] = array(\n array('table' => 'annual_letters',\n 'alias' => 'AnnualLetter',\n 'type' => 'INNER',\n 'conditions' => array(\n 'Application.id = AnnualLetter.application_id',\n )\n )\n );\n $options['conditions'] = array(\n 'Application.submitted' => 1, \n // 'Application.trial_status_id' => 5,\n 'Application.deactivated' => 0,\n );\n $options['contain'] = array('AnnualLetter' => array('limit' => 1, 'order' => array('AnnualLetter.id DESC')), 'InvestigatorContact', 'AnnualApproval');\n $applications = $this->Application->find('all', $options);\n\n // Notify managers approval generated awaiting approval\n $html = new HtmlHelper(new ThemeView());\n $type = 'manager_approve_letter';\n $message = $this->Message->find('first', array('conditions' => array('name' => $type)));\n foreach ($applications as $application) {\n \t\t//Create annual approval letter\n\t $approval_letter = $this->Pocket->find('first', array('conditions' => array('Pocket.name' => 'annual_approval_letter')));\n\n\t $checklist = array();\n\t foreach ($application['AnnualApproval'] as $formdata) { \n\t $file_link = $html->link(__($formdata['basename']), array('controller' => 'attachments', 'action' => 'download', $formdata['id'], 'admin' => false));\n\t (isset($checklist[$formdata['pocket_name']])) ? \n\t $checklist[$formdata['pocket_name']] .= $file_link.' dated '.date('jS F Y', strtotime($formdata['file_date'])).' Version '.$formdata['version_no'].'<br>' : \n\t $checklist[$formdata['pocket_name']] = $file_link.' dated '.date('jS F Y', strtotime($formdata['file_date'])).' Version '.$formdata['version_no'].'<br>';\n\t }\n\t $deeds = $this->Pocket->find('list', array(\n\t 'fields' => array('Pocket.name', 'Pocket.content'),\n\t 'conditions' => array('Pocket.type' => 'annual'),\n\t 'recursive' => 0\n\t ));\n\t // debug($deeds);\n\t $checkstring='';\n\t $cnt = 0;\n\t foreach ($checklist as $kech => $check) {\n\t $cnt++;\n\t $checkstring .= $cnt.'. '.$deeds[$kech].'<br>'.$check;\n\t }\n\n\t $cnt = $this->Application->AnnualLetter->find('count', array('conditions' => array('AnnualLetter.application_id' => $application['Application']['id'])));\n\t $cnt++;\n\t $year = date('Y', strtotime($this->Application->field('approval_date')));\n\t $approval_no = 'APL/'.$cnt.'/'.$year.'-'.$application['Application']['protocol_no'];\n\t $expiry_date = date('jS F Y', strtotime($application['Application']['approval_date'] . \" +1 year\"));\n\t $variables = array(\n\t 'approval_no' => $approval_no, 'protocol_no' => $application['Application']['protocol_no'], \n\t 'letter_date' => date('jS F Y', strtotime($application['Application']['approval_date'])),\n\t 'qualification' => $application['InvestigatorContact'][0]['qualification'],\n\t 'names' => $application['InvestigatorContact'][0]['given_name'].' '.$application['InvestigatorContact'][0]['middle_name'].' '.$application['InvestigatorContact'][0]['family_name'],\n\t 'professional_address' => $application['InvestigatorContact'][0]['professional_address'],\n\t 'telephone' => $application['InvestigatorContact'][0]['telephone'],\n\t 'study_title' => $application['Application']['short_title'],\n\t 'checklist' => $checkstring,\n\t 'status' => $application['TrialStatus']['name'], \n\t 'expiry_date' => $expiry_date\n\t );\n\t $save_data = array('AnnualLetter' => array(\n\t 'application_id' => $application['Application']['id'],\n\t 'approval_no' => $approval_no,\n\t 'approver' => $this->Session->read('Auth.User.name'),\n\t 'approval_date' => date('Y-m-d H:i:s'),\n\t 'expiry_date' => $expiry_date,\n\t 'status' => 'AnnualApprovalLetter',\n\t 'content' => String::insert($approval_letter['Pocket']['content'], $variables)\n\t ),\n\t );\n\t $this->set('save_data', $save_data);\n\n //*************************** Send Email and Notifications Managers *****************************\n \t\t$this->out('Application: ' . $application['Application']['user_id']);\n \n $users = $this->User->find('all', array(\n 'contain' => array('Group'),\n 'conditions' => array('User.group_id' => 2) //Managers\n ));\n foreach ($users as $user) {\n \t$this->out('User: ' . $user['User']['name']);\n if (isset($application['AnnualLetter'][0])) {\n \t$this->out('AnnualLetter ' . $application['AnnualLetter'][0]['expiry_date']);\n \t$variables = array(\n\t\t 'name' => $user['User']['name'], 'protocol_no' => $application['Application']['protocol_no'],\n\t\t 'protocol_link' => $html->link($application['Application']['protocol_no'], array('controller' => 'applications', 'action' => 'view', $application['Application']['id'], $user['Group']['redir'] => true, \n\t\t 'full_base' => true), array('escape' => false)),\n\t\t 'approval_date' => $application['Application']['approval_date'], 'expiry_date' => $application['AnnualLetter'][0]['expiry_date']\n\t\t );\n\t $datum = array(\n\t 'email' => $user['User']['email'],\n\t 'id' => $application['Application']['id'], 'user_id' => $user['User']['id'], 'type' => $type, 'model' => 'AnnaulLetter',\n\t 'subject' => String::insert($message['Message']['subject'], $variables),\n\t 'message' => String::insert($message['Message']['content'], $variables)\n\t );\n\t $this->sendEmail($datum);\n\t $this->sendNotification($datum);\n\t $this->log($datum, 'approval_reminder');\n } \n }\n //********************************** END *********************************\n //end\n }\n }", "function init() {\n\t\t//enable custom emails\n\t\tif( get_option('dbem_custom_emails') ){\n\t\t\tinclude('custom-emails.php');\n\t\t}\n\t //email reminders\n\t add_action('update_option_dbem_emp_emails_reminder_time', array('EM_Emails','clear_crons'));\n\t\tif( get_option('dbem_cron_emails', 1) ) {\n\t\t\t//set up cron for addint to email queue\n\t\t\tif( !wp_next_scheduled('emp_cron_emails_queue') ){\n\t\t\t $todays_time_to_run = strtotime(date('Y-m-d', current_time('timestamp')).' '. get_option('dbem_emp_emails_reminder_time'));\n\t\t\t $tomorrows_time_to_run = strtotime(date('Y-m-d', current_time('timestamp')+(86400)).' '. get_option('dbem_emp_emails_reminder_time'));\n\t\t\t $time = $todays_time_to_run > current_time('timestamp') ? $todays_time_to_run:$tomorrows_time_to_run;\n\t\t\t\t$result = wp_schedule_event( $time,'daily','emp_cron_emails_queue');\n\t\t\t}\n\t\t\tadd_action('emp_cron_emails_queue', array('EM_Emails','queue_emails') );\n\t\t\t//set up cron for clearing email queue\n\t\t\tif( !wp_next_scheduled('emp_cron_emails_process_queue') ){\n\t\t\t\t$result = wp_schedule_event( time(),'em_minute','emp_cron_emails_process_queue');\n\t\t\t}\n\t\t\tadd_action('emp_cron_emails_process_queue', array('EM_Emails','process_queue') );\n\t\t\tif( get_option('dbem_emp_emails_reminder_ical') ){\n\t\t\t\t//set up emails for ical cleaning\n\t\t\t\tif( !wp_next_scheduled('emp_cron_emails_ical_cleanup') ){\n\t\t\t\t $todays_time_to_run = strtotime(date('Y-m-d', current_time('timestamp')).' '. get_option('dbem_emp_emails_reminder_time'));\n\t\t\t\t $tomorrows_time_to_run = strtotime(date('Y-m-d', current_time('timestamp')+(86400)).' '. get_option('dbem_emp_emails_reminder_time'));\n\t\t\t\t $time = $todays_time_to_run > current_time('timestamp') ? $todays_time_to_run:$tomorrows_time_to_run;\n\t\t\t\t\t$result = wp_schedule_event( $time,'daily','emp_cron_emails_ical_cleanup');\n\t\t\t\t}\n\t\t\t\tadd_action('emp_cron_emails_ical_cleanup', array('EM_Emails','clean_icals') );\n\t\t\t}else{\n\t\t\t\twp_clear_scheduled_hook('emp_cron_emails_ical_cleanup');\n\t\t\t}\n\t\t}else{\n\t\t\t//unschedule the crons\n\t\t\twp_clear_scheduled_hook('emp_cron_emails_process_queue');\n\t\t\twp_clear_scheduled_hook('emp_cron_emails_queue');\n\t\t\twp_clear_scheduled_hook('emp_cron_emails_ical_cleanup');\n\t\t}\n\t\t//admin area\n\t\tif( is_admin() ){\n\t\t include('emails-admin.php');\n\t\t}\n\t}", "public function addJob(Job $job);", "function run()\r\n {\r\n\r\n $appointment_id = Request :: get(self :: PARAM_APPOINTMENT_ID);\r\n\r\n if (! InternshipOrganizerRights :: is_allowed_in_internship_organizers_subtree(InternshipOrganizerRights :: RIGHT_EDIT, $appointment_id, InternshipOrganizerRights :: TYPE_APPOINTMENT))\r\n {\r\n $this->display_header();\r\n $this->display_error_message(Translation :: get('NotAllowed'));\r\n $this->display_footer();\r\n exit();\r\n }\r\n\r\n $appointment = $this->retrieve_appointment($appointment_id);\r\n\r\n $form = new InternshipOrganizerAppointmentForm(InternshipOrganizerAppointmentForm :: TYPE_EDIT, $appointment, $this->get_url(array(\r\n self :: PARAM_APPOINTMENT_ID => $appointment->get_id())), $this->get_user());\r\n\r\n if ($form->validate())\r\n {\r\n $success = $form->update_appointment();\r\n $this->redirect($success ? Translation :: get('InternshipOrganizerAppointmentUpdated') : Translation :: get('InternshipOrganizerAppointmentNotUpdated'), ! $success, array(\r\n self :: PARAM_ACTION => self :: ACTION_VIEW_MOMENT,\r\n self :: PARAM_MOMENT_ID => $appointment->get_moment_id(),\r\n DynamicTabsRenderer :: PARAM_SELECTED_TAB => InternshipOrganizerAppointmentManagerBrowserComponent :: TAB_APPOINTMENTS));\r\n }\r\n else\r\n {\r\n $this->display_header();\r\n $form->display();\r\n $this->display_footer();\r\n }\r\n }", "function afterSave() {\n\t\t$d = $this->data[$this->alias];\n\t\t$appointment_model = ClassRegistry::init('Appointment');\n\n\t\tif(preg_match(\"/yes/i\", $this->leaver($this->data))) {\n\t\t\t$appts = $appointment_model->find('all', array(\n\t\t\t\t'contain' => array(),\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'person_id' => $this->data[$this->alias]['person_id'],\n\t\t\t\t\t'from_date >=' => date('Y-m-d H:i:s', strtotime($this->data[$this->alias]['employment_end_date'])\n\t\t\t\t)\n\t\t\t)));\n\t\t\tif(!empty($appts)) {\n\t\t\t\t$diagnosis_query = \"SELECT id FROM diagnoses WHERE description LIKE 'unable to code'\";\n\t\t\t\t$diagnosis = $this->query($diagnosis_query);\n\n\t\t\t\t$outcome_query = \"SELECT id FROM attendance_outcomes WHERE title LIKE 'left company'\";\n\t\t\t\t$outcome = $this->query($outcome_query);\n\t\t\t}\n\t\t\tforeach ($appts as $a) {\n\t\t\t\tif($a['Appointment']['passes_late_cancelation_condition'] == 0) {\n\t\t\t\t\t$review = $a['Appointment']['new_or_review'] == \"review\" ? 'Y' : 'N';\n\n\t\t\t\t\t// Create 'Late Cancellation' attendance\n\t\t\t\t\t$attendanceData = array(\n\t\t\t\t\t\t'seen_at_time' => $a['Appointment']['from_date'],\n\t\t\t\t\t\t'attendance_result_code' => 'LC',\n\t\t\t\t\t\t'clinic_staff_id' => $this->current_user_id,\n\t\t\t\t\t\t'review_attendance' => $review,\n\t\t\t\t\t\t'diagnosis_id' => $diagnosis[0]['diagnoses']['id'],\n\t\t\t\t\t\t'is_discharged' => true,\n\t\t\t\t\t\t'outcome_id' => $outcome[0]['attendance_outcomes']['id']\n\t\t\t\t\t);\n\n\t\t\t\t\t$appointment_model->makeAttendance($a['Appointment']['id'], $attendanceData);\n\t\t\t\t}\n\t\t\t\t$appointment_model->delete($a['Appointment']['id'], \"Employee is a leaver\");\n\t\t\t}\n\t\t}\n\t}", "private function fix_appoitnment(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$user_id = $_GET['user_id'];\n\t\t\t$doc_id = $_GET['doctor_id'];\n\t\t\t$created_at = date('Y-m-d H:i:s');\n\t\t\t$updated_at = date('Y-m-d H:i:s');\n\t\t\tif(isset($user_id)) {\n\t\t\t\t\t$availability = $this->_request['doctor_availability_time'];\n\t\t\t\t\tif(!isset($_POST['doctor_availability_time'])){\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter specializaton is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($availability) && $availability=''){\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Time is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t} else{\n\t\t\t\t\t\t\t$sql = \"SELECT `doctor_ava_time` FROM doctor_timeslot WHERE `doctor_id` = \".$doc_id.\" \";\n\t\t\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t\t$searchResult = $stmt->execute();\n\t\t\t\t\t\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t//If time is selected by another user\n\t\t\t\t\t\t\tforeach($results as $res){\n\t\t\t\t\t\t\t\t$res = array_merge($res);\n\t\t\t\t\t\t\t\t\tif(in_array($_POST['doctor_availability_time'], $res)) {\n\t\t\t\t\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Please select another time as doctor is busy\");\n\t\t\t\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t//Lunch time\n\t\t\t\t\t\t$lunch_st = \"01:00:00\";\n\t\t\t\t\t\t$lunch_end = \"02:00:00\";\n\t\t\t\t\t\t$inuput_val = DateTime::createFromFormat('H:i:s', $_POST['doctor_availability_time']);\n\t\t\t\t\t\t$lts = DateTime::createFromFormat('H:i:s', $lunch_st);\n\t\t\t\t\t\t$lte = DateTime::createFromFormat('H:i:s', $lunch_end);\n\t\t\t\t\t\tif($inuput_val >= $lts && $inuput_val <= $lte) {\n\t\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Lunch time, please select another time\");\n\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sql = \"INSERT INTO doctor_timeslot (`doctor_id`, `doctor_ava_time`, `patient_id`, `created_at`, `updated_at`) VALUES ( \".$doc_id.\",'\".$_POST['doctor_availability_time'].\"',\".$user_id.\", '\".$created_at.\"', '\".$updated_at.\"')\";\n\t\t\t\t\t\t$execute = $this->db->query($sql);\n\t\t\t\t\t\tprint_r($execute);\n\t\t\t\t\t\t\tif($execute) {\n\t\t\t\t\t\t\t\t$error = array('status' => \"Sucess\", \"msg\" => \"Appoitment fixed\");\n\t\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Session expired\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t}", "public function testPatientAppointmentAdd()\n \t{\n \t\t$user = ParseUser::logIn(\"janet\", \"qwe123\");\n $response = $this->call('GET', 'patient/appointments/add');\n \t\t$this->assertEquals(200, $response->getStatusCode());\n ParseUser::logOut();\n \t}", "public function getAutomaiticReminders(){\n\t\treturn $this->email_reminders;\n\t}", "public function add()\n {\n // Fetch Doctor Deatil\n $Doctor = TableRegistry::get('Users');\n $doctor = $Doctor->find()\n ->where(['usertype' => 1])\n ->all();\n\n $this->set('Doctor',$doctor); \n \n if ($this->request->is('post')) {\n\n $Appointments = TableRegistry::get('Appointments');\n\n $change_date = date('Y-m-d H:i:s',strtotime($this->request->data['appointment_date'])); \n $doctor_id = $this->request->data['doctor_id'];\n\n $this->request->data = $Appointments->newEntity();\n\n $this->request->data['doctor_id'] = $doctor_id;\n $this->request->data['appointment_date'] = $change_date;\n $this->request->data['patient_id'] = $this->Auth->user('id');\n $this->request->data['created'] = date('Y-m-d H:i:s');\n $this->request->data['modified'] = date('Y-m-d H:i:s');\n\n if ($Appointments->save($this->request->data)) {\n\n // Send Email Notification When Patient create new Appointment \n $email = new Email('default');\n \n $email->from(['test2@teknomines.com' => 'support@appointment.com'])\n ->to('bharat.tecknomines@gmail.com')\n ->subject('New Appointment')\n ->send('New Appointment is created by Bharat on Date : '.$change_date);\n\n $this->Flash->success(__('Appointment create successfully'));\n \n return $this->redirect(['action'=>'index']);\n \n } else {\n\n $this->Flash->error(__('Something went wrong'));\n \n return $this->redirect(['action'=>'index']);\n \n }\n\n\n\n }\n }", "protected function appointment($data) {\r\n if ($this->method == 'GET') {\r\n //return based on date or id\r\n return \"NotImplementedYet\";\r\n } else if($this->method == 'POST') {\r\n //$client = getclient();\r\n $dt = new DateTime(); //TODO figure out how to sort datetime $data['date'], $data['time']\r\n $appt = new Appointment($client, $dt); //TODO add this constructor\r\n return \"NotImplementedYet\"; //addAppointment\r\n } else if($this->method == 'DELETE') {\r\n return \"NotImplementedYet\"; //deleteAppt($data[id]);\r\n } else {\r\n return \"Does not accept this type of request.\";\r\n }\r\n }", "function addScheduledJob() {\n try {\n $jobView = new ScheduledJobViewData();\n\t $jobView->addScheduledJob(\n $_POST['classname'], $_POST['repeat_every_min'], $_POST['daily_at'], $_POST['params'] ?? array() );\n $jobView->doView();\n\n ?>\n <script type=\"text/javascript\">\n jQuery(\"#job_schedule_table\")\n .html('<?php echo preg_replace('#\\R+#', '', $jobView->toHtml()); ?>');\n jQuery(\"#add_job_button\").css(\"visibility\", \"visible\");\n </script>\n <?php\n }\n catch( Exception $e ) {\n ?> \n <script type=\"text/javascript\">\n jQuery(\"#ajax_response\")\n .html('<?php echo $e->getMessage(); ?>')\n .css({ 'color': 'red' });\n jQuery(\"#add_job_button\").css(\"visibility\", \"visible\");\n </script>\n <?php\n }\n }", "function reservationGroupReminder()\n {\n if (in_array($this->session->userdata('group'),array(1, 20,21))){\n $tomorrow_date = mktime(0, 0, 0, date('m'), (date('d') + 1));\n $conditions = array('reservation_date'=>$tomorrow_date, 'closed'=>0, 'reminded'=>0);\n $reservations = $this->Appointment_admin_model->getReservation(NULL, NULL, $conditions);\n $i=0;\n foreach($reservations as $item){\n $provider = @reset($this->Appointment_admin_model->getProviderById($item['provider_id']));\n $email_data = array(\n \"company\"=>$this->_website_info['company'],\n \"email\"=>$item['email'],\n \"first_name\"=>$item['fname'],\n \"last_name\"=>$item['lname'],\n \"reservation_date\"=>my_int_date($item['reservation_date']),\n \"reservation_time\"=>my_int_justTime($item['reservation_date_time']),\n \"provider_name\"=>$provider['provider_name'],\n \"provider_phone\"=>$provider['phone'],\n \"provider_address\"=>$provider['address'],\n \"service_name\"=>$item['service_name'],\n \"provider_url\"=>base_url().$item['lang'].'/provider/'.$provider['provider_username'],\n );\n // Send reminder email\n $this->sendNotificationEmail('reservation_reminder', $item['language_id'], $item['email'], $email_data);\n // Add one more time reminded\n $this->Appointment_admin_model->reservationUpdateRemind($item['reservation_id'], $item['reminded']+1);\n $i++;\n }\n if($i!=0){\n $result = array(\"status\"=>\"success\");\n }else{\n $result = array(\"status\"=>\"error\",\"error\"=>_l(\"There wasn't any email, ready to remind!\",$this));\n }\n }else{\n // Show to demo account\n $result = array(\"status\"=>\"error\",\"error\"=>_l(\"Unfortunately you do not have permission to this part of system.\",$this));\n }\n if($this->input->is_ajax_request()){\n echo json_encode($result);\n }else{\n if($result[\"status\"]==\"success\"){\n $this->session->set_flashdata('success', _l('Your request was successful!',$this));\n }else{\n if(in_array('static_error',$result))\n $this->session->set_flashdata('static_error', $result[\"error\"]);\n else\n $this->session->set_flashdata('error', $result[\"error\"]);\n }\n redirect(APPOINTMENT_ADMIN_URL.'dashboard');\n }\n }", "public function setAlarms($data)\n {\n $events = $data['event'];\n $alarms = $data['alarm'];\n $dates = $data['date'];\n\n foreach ($events as $key => $event) {\n $pieces = explode('/',$event);\n\n $setAlarm = new Alarms();\n $setAlarm->user_id = $this->user_id;\n $setAlarm->event_id = $pieces[0];\n $setAlarm->calendar_id = $pieces[1];\n $setAlarm->start = $pieces[2];\n $setAlarm->end = $pieces[3];\n $setAlarm->summary = $pieces[4];\n $setAlarm->alarmTime = $alarms[$key];\n $setAlarm->alarmDate = $dates[$key];\n $setAlarm->save();\n }\n }", "public function add()\n\t{\n\t\tif ( !$this->Auth->user('is_admin') ) {\n\t\t\t$this->Flash->error(\"Sorry, you do not have access to this module.\");\n\t\t\treturn $this->redirect([\"action\" => \"index\"]);\n\t\t}\n\n\t\t$this->loadModel(\"Users\");\n\n\t\t$users = $this->Users->find(\"all\")\n\t\t\t->where([\"is_active\" => 1])\n\t\t\t->order([\"last\" => \"ASC\", \"first\" => \"ASC\"]);\n\t\t\n\t\t$reminder = $this->Reminders->newEntity();\n\t\tif ($this->request->is('post')) {\n\t\t\t$reminder = $this->Reminders->patchEntity($reminder, $this->request->getData());\n\t\t\t$users = $this->request->getData();\n\t\t\t$usersToSend = [];\n\n\t\t\tforeach ( $users as $name => $value ) {\n\t\t\t\tif ( preg_match(\"/^user_.+?/\", $name ) && $value == 1 ) {\n\t\t\t\t\t$usersToSend[] = substr($name,5);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$reminder->toUsers = json_encode($usersToSend);\n\n\t\t\tif ($this->Reminders->save($reminder)) {\n\t\t\t\t$this->Flash->success(__('The reminder has been saved.'));\n\n\t\t\t\treturn $this->redirect(['action' => 'index']);\n\t\t\t}\n\t\t\t$this->Flash->error(__('The reminder could not be saved. Please, try again.'));\n\t\t}\n\n\t\t$this->set('crumby', [\n\t\t\t[\"/\", __(\"Dashboard\")],\n\t\t\t[\"/reminders/\", __(\"Reminders\")],\n\t\t\t[null, __(\"Add Reminder\")]\n\t\t]);\n\t\t\n\t\t$this->set(compact('reminder', 'users'));\n\t}", "public function add_appointment($docname, $patname, $patemail, $patcontactno, $patAge, $fees, $appdate, $apptime)\r\n {\r\n $d1 = Database::GetInstance();\r\n\r\n $query = \"INSERT INTO `appointment`( `doctorName`, `patientName`, `patientEmail`, `patientNumber`, `patientAge`, `consultancyFees`, `appointmentDate`, `appointmentTime`) VALUES ('$docname','$patname','$patemail','$patcontactno','$patAge','$fees','$appdate','$apptime')\";\r\n $ret = mysqli_query($d1->GetConnection(), $query);\r\n\r\n return $ret;\r\n }", "public function addUpdatejob(array $job)\n {\n }", "public function claim_submission_reminder(){\n \n $this->load->model('employee_model');\n $all_employees = $this->employee_model->get_all_employees();\n \n if(date('d') >= 1 && date('d') <= 5){\n //echo \"hello\";\n $month = date('F', mktime(0, 0, 0, date('m',strtotime(date('Y-m').\" -1 month\")), 10));\n }else{\n $month = date('F', mktime(0, 0, 0, date('m'), 10));\n }\n foreach($all_employees as $employee){\n\n $subject = \"Monthly Expense Submission Reminder\";\n $message = \"Hi \".$employee['first_name'].\" \".$employee['last_name'].\",<br>\n <br>Kindly submit your expenses for the month of \".$month.\".\n <br>Please ignore this email if already submitted.<br><br>\n Regards<br>\n Admin<br>\";\n $this->sendMail($employee['gi_email'], $subject, $message);\n //echo \"<br>\".$subject.\"<br>\".$message.\"<br>\"; exit;\n\n }\n return true;\n }", "public function addAppointment() {\n $query = $this->db->prepare('INSERT INTO `appointments` (`dateHour`, `idPatients`) VALUES (:dateHour, :idPatients)');\n $query->bindValue(':dateHour', $this->dateHour, PDO::PARAM_STR);\n $query->bindValue(':idPatients', $this->idPatients, PDO::PARAM_INT);\n return $query->execute();\n }", "function cron_add_minute( $schedules ) {\n\t!empty(get_option('cron_mint'))?$inter=(get_option('cron_mint')*60):$inter=7200;\n $schedules['everyminute'] = array(\n\t 'interval' => $inter,\n\t 'display' => __( 'Actualizar Stock' )\n );\n return $schedules;\n}", "function SetSuggestedtimeList(&$list)\n\t{\n\t\t$this->_suggestedtimeList = array();\n\t\t$existingSuggestedtimeList = $this->GetSuggestedtimeList();\n\t\tforeach ($existingSuggestedtimeList as $suggestedtime)\n\t\t{\n\t\t\t$suggestedtime->eventId = '';\n\t\t\t$suggestedtime->Save(false);\n\t\t}\n\t\t$this->_suggestedtimeList = $list;\n\t}", "function scheduleApp($db, $employee_id, $customer_id, $appointment) {\n $approve = 0;\n $sql = $db->prepare(\"INSERT INTO appointments VALUES (null, :appointment, :employee_id, :customer_id, :approve)\");\n\n $sql->bindParam(':appointment', $appointment);\n $sql->bindParam(':employee_id', $employee_id);\n $sql->bindParam(':customer_id', $customer_id);\n $sql->bindParam(':approve', $approve);\n\n $sql->execute();\n $ret = $sql->RowCount() . \" appoint requested\";\n\n return $ret;\n}", "public function bkap_add_reschedule_order_note( $order_id, $old_bookings, $new_bookings, $item_name, $additional_note ) {\n\n $order_obj = wc_get_order( $order_id );\n\n if( isset( $old_bookings['booking_date'] ) && $old_bookings['booking_date'] !== '' &&\n isset( $new_bookings['booking_date'] ) && $new_bookings['booking_date'] !== '' && \n isset( $old_bookings['booking_date_checkout'] ) && $old_bookings['booking_date_checkout'] !== '' &&\n isset( $new_bookings['booking_date_checkout'] ) && $new_bookings['booking_date_checkout'] !== '' ) {\n\n $note_details_old = $old_bookings['booking_date'] . ' - ' . $old_bookings['booking_date_checkout'];\n $note_details_new = $new_bookings['booking_date'] . ' - ' . $new_bookings['booking_date_checkout'];\n }else if( isset( $old_bookings['booking_date'] ) && $old_bookings['booking_date'] !== '' &&\n isset( $new_bookings['booking_date'] ) && $new_bookings['booking_date'] !== '' && \n isset( $old_bookings['time_slot'] ) && $old_bookings['time_slot'] !== '' &&\n isset( $new_bookings['time_slot'] ) && $new_bookings['time_slot'] !== '' ) {\n\n $note_details_old = $old_bookings['booking_date'] . ' ' . $old_bookings['time_slot'];\n $note_details_new = $new_bookings['booking_date'] . ' ' . $new_bookings['time_slot'];\n }else {\n\n $note_details_old = $old_bookings['booking_date'];\n $note_details_new = $new_bookings['booking_date'];\n }\n\n $order_note = sprintf( __( 'Booking has been rescheduled from <strong>%s</strong> to <strong>%s</strong> for <strong>%s</strong>.', 'woocommerce-booking' ), $note_details_old, $note_details_new, $item_name );\n\n $order_note = $order_note . $additional_note;\n $order_obj->add_order_note( $order_note, 1, false );\n }", "function os2dagsorden_create_agenda_meeting_submit_add_edit_bullet_point($form, &$form_state) {\n $node = os2dagsorden_create_agenda_save_meeting($form, $form_state);\n\n $form_state['meeting_id'] = $node->nid;\n // If empty - will be treated as new node creation.\n $form_state['bullet_point_id'] = $form_state['triggering_element']['#bp_nid'];\n\n $form_state['page_num'] = 2;\n $form_state['rebuild'] = TRUE;\n}", "public function insertScheduleAuto() {\n $date = '2020-09-01'; // guardamos fecha inicio curso\n \n while ($date <= '2021-06-30') { // condicion fecha fin curso\n $day = date('l', strtotime($date));\n switch ($day) {\n case \"Monday\":\n // llamar a funcion MONDAY schedule\n break;\n case \"Tuesday\":\n // llamar a funcion TUESDAY schedule\n break;\n case \"Wednesday\":\n // llamar a funcion WEDNESDAY schedule\n break;\n case \"Thursday\":\n // llamar a funcion THURSDAY schedule\n break;\n case \"Friday\":\n // llamar a funcion FRIDAY schedule\n break;\n }\n $date++;\n }\n }", "public function autoemail(){\n\t\t\t/*if(date('H') != 9){\n\t\t\t\texit();\n\t\t\t}*/\n\n\t\t\t//if cli\n\t\t\tif(!is_cli()){\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$this->load->model('autoreportemail_model');\n\t\t\t$milist = $this->autoreportemail_model->get_milist(array('status' => 'active','client' => 'adidata'));\n\t\t\t$email =array();\n\t\t\tforeach($milist as $value)\n\t\t\t{\n\t\t\t\t$email[]=$value['email'];\n\t\t\t}\n\t\t\t$date = '';\n\t\t\tif(date('j') == 1){\n\t\t\t\t$date = date('Y-m',strtotime('-1 month')).'-01 00:00:00 - '.date('Y-m-d H:i:s');\n\t\t\t}else{\n\t\t\t\t$date = date('Y-m').'-01 00:00:00'.' - '.date('Y-m-d H:i:s');\n\t\t\t}\n\n\t\t\t$holiday_date = array();\n\t\t\t$this->load->model('holiday_model');\n\t\t\tforeach($this->holiday_model->get_holiday(array('status' => 'active')) as $holiday)\n\t\t\t{\n\t\t\t\t$holiday_date[] = $holiday['date'];\n\t\t\t}\n\n\t\t\tif(in_array(date('Y-m-d'), $holiday_date))\n\t\t\t{\n\t\t\t\treturn 'Today is holiday';\n\t\t\t}else{\n\t\t\t\tif(!$this->isWeekend(date('Y-m-d')))\n\t\t\t\t{\n\t\t\t\t return $this->sending_email( 'admin@hrm.adi-internal.com', 'Adidata - miniHRM App', $email, array(), 'Contract Summary Report '.date('d M Y'), \"Dear Admin Adidata, \\n\\n This system was generate about employee that has ending contract in next \".$this->months_end.\" months. \\n\\n Thanks & Regards, \\n admin@Adidata.co.id \\n\\n\\n\\n Adidata - miniHRM App - by Garpepi\", './genreports/Summary Employee Contract Report '.date('d M Y').'.xls');\n\t\t\t\t}else{\n\t\t\t\t return 'Today is weekend';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "function add_schedule($hook, $time) {\n\t\t$data = array('hook' => $hook, 'scheduled_time' => $time);\n\t\t$this->wpdb->insert($this->cron_table, $data);\n\t}", "function postSchedulerAddCronMinutes($array) {\n $array['postschedulerminute'] = array(\n 'interval' => 60,\n 'display' => __('Once a Minute','post-scheduler')\n );\n\treturn $array;\n}", "function vla_apoint_reminder_template($event_info, $location, $date_time) { \r\n $name = $event_info[0];\r\n $phone = $event_info[1];\r\n $date = $date_time['date'];\r\n $time = $date_time['time'];\r\n return \"Hi, reminder to attend your appointment with Victoria Legal Aid at \" . $location . \" on \" . $date . \" at \" . $time . \". To change, call \" . $name . \" on \" . $phone . \".\";\r\n}", "function meeting_meetings_template_add() {\n // Use standard meeting form, which will be altered later\n return meeting_meetings_add('template~0');\n}", "function daily_reminder_mailer(){\t\t\t\t\r\r\n\t\tmgm_check_expiring_memberships();\t\r\r\n\t}", "function create_list_mailchimp($api_key, $list_name, $permission_reminder){\n \n $type = 'POST';\n $timeout = 30;\n $target = 'lists';\n $data = array(\n 'name' => $list_name,\n 'contact' => array('company' => 'Wine Lover Alleys', \n 'address1' => 'somewhere in the heaven',\n 'city' => 'heaven city',\n 'state' => 'heaven state',\n 'zip' => '00001',\n 'country' => 'Utopia'\n ),\n 'permission_reminder' => $permission_reminder,\n 'campaign_defaults'=> array('from_name' => 'Angel',\n 'from_email' => 'Angel@wineloveralleys.com',\n 'subject' => 'News from Wine Lover Alleys',\n 'language' => 'en'\n ),\n 'email_type_option' => TRUE\n );\n $result = mailchimp_api_request($api_key, $type, $target, $timeout, $data);\n return $result;\n}", "public static function bookAppointment($data) {\n // Validate the user's given times\n $valid = self::validateAppointment($data);\n\n if ($valid) {\n try {\n $appointment_data = array();\n\n // Set parameters and values for each detail\n foreach (array_keys($data) as $detail) {\n $appointment_data[$detail] = array(\n 'param' => \":$detail\",\n 'value' => $data[$detail],\n );\n }\n\n // Add unique ID to the appointment\n $appointment_data['id'] = array(\n 'param' => \":id\",\n 'value' => uniqid('ap-', true),\n );\n\n // Remove unneeded details for insertion\n unset($appointment_data['patient_id']);\n unset($appointment_data['contact_by_email']);\n unset($appointment_data['contact_by_text']);\n\n // Insert record for the booked appointment\n $appointment_result = $GLOBALS['app']->getDB()->insert('appointment', $appointment_data);\n\n if ($appointment_result) {\n // Retrieve the details of the patient's facility\n $facility_details = UserManager::getUserFacility($data['patient_id']);\n\n $GLOBALS['successes'][] = 'The appointment has been successfully booked.';\n\n // Define message to be sent via the user's contact preferences\n $message = 'Your requested appointment with ';\n $message .= isset($facility_details['name']) ? $facility_details['name'] : 'us';\n $message .= ' has been booked. Please log on to see the confirmed details.';\n\n if ($data['contact_by_email']) {\n UserManager::receiveEmail($data['patient_id'], $message);\n }\n if ($data['contact_by_text']) {\n UserManager::receiveSms($data['patient_id'], $message);\n }\n } else {\n $GLOBALS['errors'][] = 'An unexpected error has occurred. Please check your input and try again.';\n }\n } catch (PDOException $e) {\n $GLOBALS['errors'][] = $e->getMessage();\n }\n } else {\n $GLOBALS['errors'][] = 'Sorry, your selections were in an incorrect format. Please check them and try again.';\n }\n }", "public function twitter_event_add()\n {\n // only execute when invoked from a cron job\n if (!defined('IS_CRON')) {\n return false;\n }\n\n $this->load->library('twitter');\n $this->load->model('event_model');\n\n $events = $this->event_model->getUpcomingEvents(null);\n $msg = $this->config->item('site_name') . \" Update: There are \" .\n count($events) . \" great events coming up soon! \";\n $msg .= \"Check them out! \" . $this->config->site_url() .\n \"event/upcoming\";\n\n // @todo: shorten this URL to help fit inside a Twitter message\n $this->twitter->sendMsg($msg);\n }", "function as_add_new_schedule(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'schedule_type' => trim($_POST['type']),\n\t\t\t'schedule_worker' => trim($_POST['workerid']),\n\t\t\t'schedule_day' => trim($_POST['day']),\n\t\t\t'schedule_starttime' => trim($_POST['starttime']),\n\t\t\t'schedule_stoptime' => trim($_POST['stoptime']),\n\t\t\t'schedule_place' => trim($_POST['place']),\n\t\t 'schedule_created' => date('Y-m-d H:i:s'),\n\t\t 'schedule_createdby' => \"1\",\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_schedule', $New_Item_Details ); \n\t}", "public function run()\n {\n $items = [\n ['name' => 'Face to Face'],\n ['name' => 'Over the Phone'],\n ];\n\n foreach ($items as $item) {\n \\App\\AppointmentType::create($item);\n }\n }", "static function valid_appointment($data)\n\t{\n\t\t$db = &JFactory::getDbo();\n\t\t$db->setQuery('select * from #__pbbooking_config');\n\t\t$config = $db->loadObject();\n\t\t$db->setQuery('select * from #__pbbooking_treatments where id = '.$db->escape($data['treatment_id']));\n\t\t$treatment = $db->loadObject();\n\t\t\n\t\t$joom_config =&JFactory::getConfig();\n \tdate_default_timezone_set($joom_config->get('offset'));\t\n\n\t\t//load up the calendar for the nominated treatment\n\t\t$cal = new calendar();\n\t\t$cal->loadCalendarFromDbase(array($data['cal_id']));\n\t\t\n\t\t$treatment_start = date_create($data['date'],new DateTimeZone(PBBOOKING_TIMEZONE));\n\t\t$start_time = str_split($data['treatment_time'],2);\n\t\t$treatment_start->setTime((int)ltrim($start_time[0],'0'),(int)ltrim($start_time[1],'0'));\n\t\t$treatment_end = date_create($treatment_start->format(DATE_ATOM),new DateTimeZone(PBBOOKING_TIMEZONE));\n\t\t$treatment_end->modify('+'.$treatment->duration.' minutes');\n\t\tif (!$cal->is_free_from_to($treatment_start,$treatment_end)) {\n\t\t\t//error_log ('cal is free');\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//error_log('cal is busy');\n\t\t\treturn false;\n\t\t}\n\t}", "private static function create_cron_jobs()\n {\n }", "function _getAppointment($mapimessage, $truncsize, $mimesupport = 0) {\n $message = new SyncAppointment();\n\n // Standard one-to-one mappings first\n $this->_getPropsFromMAPI($message, $mapimessage, $this->_appointmentmapping);\n\n // Disable reminder if it is off\n $reminderset = $this->_getPropIDFromString(\"PT_BOOLEAN:{00062008-0000-0000-C000-000000000046}:0x8503\");\n $remindertime = $this->_getPropIDFromString(\"PT_LONG:{00062008-0000-0000-C000-000000000046}:0x8501\");\n $messageprops = mapi_getprops($mapimessage, array ( $reminderset, $remindertime ));\n\n if(!isset($messageprops[$reminderset]) || $messageprops[$reminderset] == false)\n $message->reminder = \"\";\n else {\n if ($messageprops[$remindertime] == 0x5AE980E1)\n $message->reminder = 15;\n else\n $message->reminder = $messageprops[$remindertime];\n }\n\n $messageprops = mapi_getprops($mapimessage, array ( PR_SOURCE_KEY ));\n\n if(!isset($message->uid))\n $message->uid = bin2hex($messageprops[PR_SOURCE_KEY]);\n else\n $message->uid = getICalUidFromOLUid($message->uid);\n\n // Get organizer information if it is a meetingrequest\n $meetingstatustag = $this->_getPropIDFromString(\"PT_LONG:{00062002-0000-0000-C000-000000000046}:0x8217\");\n $messageprops = mapi_getprops($mapimessage, array($meetingstatustag, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_NAME));\n\n if(isset($messageprops[$meetingstatustag]) && $messageprops[$meetingstatustag] > 0 && isset($messageprops[PR_SENT_REPRESENTING_ENTRYID]) && isset($messageprops[PR_SENT_REPRESENTING_NAME])) {\n $message->organizeremail = w2u($this->_getSMTPAddressFromEntryID($messageprops[PR_SENT_REPRESENTING_ENTRYID]));\n $message->organizername = w2u($messageprops[PR_SENT_REPRESENTING_NAME]);\n }\n\n $isrecurringtag = $this->_getPropIDFromString(\"PT_BOOLEAN:{00062002-0000-0000-C000-000000000046}:0x8223\");\n $recurringstate = $this->_getPropIDFromString(\"PT_BINARY:{00062002-0000-0000-C000-000000000046}:0x8216\");\n $timezonetag = $this->_getPropIDFromString(\"PT_BINARY:{00062002-0000-0000-C000-000000000046}:0x8233\");\n $recurrenceend = $this->_getPropIDFromString(\"PT_SYSTIME:{00062002-0000-0000-C000-000000000046}:0x8236\");\n\n // Now, get and convert the recurrence and timezone information\n $recurprops = mapi_getprops($mapimessage, array($isrecurringtag, $recurringstate, $timezonetag, $recurrenceend));\n\n if(isset($recurprops[$timezonetag]))\n $tz = $this->_getTZFromMAPIBlob($recurprops[$timezonetag]);\n else\n $tz = $this->_getGMTTZ();\n\n $message->timezone = base64_encode($this->_getSyncBlobFromTZ($tz));\n\n if(isset($recurprops[$isrecurringtag]) && $recurprops[$isrecurringtag]) {\n // Process recurrence\n $message->recurrence = new SyncRecurrence();\n $this->_getRecurrence($mapimessage, $recurprops, $message, $message->recurrence, $tz);\n }\n\n // Do attendees\n $reciptable = mapi_message_getrecipienttable($mapimessage);\n $rows = mapi_table_queryallrows($reciptable, array(PR_DISPLAY_NAME, PR_EMAIL_ADDRESS, PR_SMTP_ADDRESS, PR_ADDRTYPE));\n if(count($rows) > 0)\n $message->attendees = array();\n\n foreach($rows as $row) {\n $attendee = new SyncAttendee();\n\n $attendee->name = w2u($row[PR_DISPLAY_NAME]);\n //smtp address is always a proper email address\n if(isset($row[PR_SMTP_ADDRESS]))\n $attendee->email = w2u($row[PR_SMTP_ADDRESS]);\n elseif (isset($row[PR_ADDRTYPE]) && isset($row[PR_EMAIL_ADDRESS])) {\n //if address type is SMTP, it's also a proper email address\n if ($row[PR_ADDRTYPE] == \"SMTP\")\n $attendee->email = w2u($row[PR_EMAIL_ADDRESS]);\n //if address type is ZARAFA, the PR_EMAIL_ADDRESS contains username\n elseif ($row[PR_ADDRTYPE] == \"ZARAFA\") {\n $userinfo = mapi_zarafa_getuser_by_name($this->_store, $row[PR_EMAIL_ADDRESS]);\n if (is_array($userinfo) && isset($userinfo[\"emailaddress\"]))\n $attendee->email = w2u($userinfo[\"emailaddress\"]);\n }\n }\n // Some attendees have no email or name (eg resources), and if you\n // don't send one of those fields, the phone will give an error ... so\n // we don't send it in that case.\n // also ignore the \"attendee\" if the email is equal to the organizers' email\n if(isset($attendee->name) && isset($attendee->email) && $attendee->email != \"\" && (!isset($message->organizeremail) || (isset($message->organizeremail) && $attendee->email != $message->organizeremail)))\n array_push($message->attendees, $attendee);\n }\n // Force the 'alldayevent' in the object at all times. (non-existent == 0)\n if(!isset($message->alldayevent) || $message->alldayevent == \"\")\n $message->alldayevent = 0;\n\n return $message;\n }", "private function addTaskToEndOfSchedule($task) {\r\n\t\t$taskDuration = $this->getTaskDurationS($task);\r\n\t\tsm_debug::write(\"Task duration: $taskDuration s\", 7);\r\n\t\t\r\n\t\t// User ID\r\n\t\t$userID = $task['owner_id'];\r\n\r\n\t\t// Initialize scheduleEndTime and scheduleStartTime\r\n\t\tif (!isset($this->scheduleEndTime[$userID])) $this->scheduleEndTime[$userID] = 0;\r\n\t\t\r\n\t\t// Set task actual start and end time/date\r\n\t\t$actualStartTimestamp = $this->getEndOfScheduleUnixTime($userID);\r\n\t\t$newEndOfSchedule = $this->scheduleEndTime[$userID] + $taskDuration;\r\n\t\t$actualEndTimestamp = $actualStartTimestamp + $taskDuration;\r\n\t\tsm_debug::write(\"Old EndOfSchedule: \".$this->scheduleEndTime[$userID], 7);\r\n\t\tsm_debug::write(\"newEndOfSchedule: $newEndOfSchedule s\", 7);\r\n\t\tsm_debug::write(\"actualStartTimestamp: $actualStartTimestamp\", 7);\r\n\t\t\r\n\t\t$se1 = explode('#', date(\"Y-m-d#H:i:s\", $actualStartTimestamp));\r\n\t\t$task['actual_start_date'] = $se1[0];\r\n\t\t$task['actual_start_time'] = $se1[1];\r\n\t\t\r\n\t\t$se2 = explode('#', date(\"Y-m-d#H:i:s\", $actualEndTimestamp));\r\n\t\t$task['actual_end_date'] = $se2[0];\r\n\t\t$task['actual_end_time'] = $se2[1];\r\n\t\t\r\n\t\t// Add task to the end of queue\r\n\t\tif (!isset($scheduledTasks[$userID])) $scheduledTasks[$userID] = array();\r\n\t\t$this->scheduledTasks[$userID][] = $task;\r\n\t\t$this->scheduleEndTime[$userID] = $newEndOfSchedule;\r\n\t\tsm_debug::write(\"Task \".$task['id'].\"(\".$task['name'].\") added to the schedule. Actual start: \".date(\"Y-m-d H:i:s\", $actualStartTimestamp).\", actual end: \".date(\"Y-m-d H:i:s\", $actualEndTimestamp), 7);\r\n\t}", "public function sendalert(){\n $this->AppointmentService->changeappointmentexpiry();\n }", "public function createSchedule(): void\n {\n wp_schedule_event(\n $this->start->getTimestamp(),\n $this->recurrence,\n $this->getHook(),\n $this->args );\n }", "function specialist_appointment_reminder_template($event_info, $location, $date_time) {\r\n $name = $event_info[0];\r\n $name_2 = $event_info[1];\r\n $phone = $event_info[2];\r\n $date = $date_time['date'];\r\n $time = $date_time['time'];\r\n return \"Reminder of your appointment with \" . $name . \" on \" . $date . \" at \" . $time . \" at \" . $location . \". Any questions call \" . $name_2 . \", Victoria Legal Aid on \" . $phone . \".\";\r\n}", "function ciniki_poma_dateRepeatsAdd(&$ciniki, $tnid, $date_id) {\n\n //\n // The repeat items will also be added by the dateLock function from cron if missed here\n //\n\n //\n // Load the date\n //\n $strsql = \"SELECT id, status, order_date, autolock_dt, flags \"\n . \"FROM ciniki_poma_order_dates \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $date_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND status < 20 \"\n . \"AND repeats_dt <= UTC_TIMESTAMP() \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.poma', 'date');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['date']) ) {\n return array('stat'=>'ok');\n }\n $date = $rc['date'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQueryList');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'poma', 'private', 'orderRepeatItemsAdd');\n\n //\n // Get the list of repeat items for this date\n //\n $strsql = \"SELECT DISTINCT customer_id \"\n . \"FROM ciniki_poma_customer_items \"\n . \"WHERE next_order_date <= '\" . ciniki_core_dbQuote($ciniki, $date['order_date']) . \"' \"\n . \"AND itype = 40 \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbQueryList($ciniki, $strsql, 'ciniki.poma', 'customers', 'customer_id');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $repeat_customers = $rc['customers'];\n foreach($repeat_customers as $customer_id) {\n //\n // Apply the standing order items\n //\n error_log(\"Applying repeats for customer: $date_id <- $customer_id\\n\");\n $rc = ciniki_poma_orderRepeatItemsAdd($ciniki, $tnid, array(\n 'date'=>$date,\n 'date_id'=>$date_id,\n 'customer_id'=>$customer_id,\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n\n //\n // Lock the date\n //\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.poma.orderdate', $date['id'], array('status'=>20), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n return array('stat'=>'ok');\n}", "public function onCreateEvent(){\n $this->planEmailAlerts();\n }", "public function onSchedulerInitialized(Event $e): void\n {\n $config = $this->config();\n if ($config['scheduled_jobs']['enabled']) { // this is also necessary\n if (!empty($config['calendars']) && ($config['scheduled_jobs']['enabled'])) {\n $scheduler = $e['scheduler'];\n $at = $config['scheduled_jobs']['at'] ?? '* * * * *';\n $logs = $config['scheduled_jobs']['logs'] ?? '';\n\n $VendorJobFile = pathinfo(__FILE__, PATHINFO_DIRNAME).\"/jobs/create_calendars.php\";\n $RealJobFile = pathinfo(__FILE__, PATHINFO_DIRNAME).\"/jobs/job.php\";\n if (file_exists($RealJobFile)) {\n $JobFile = $RealJobFile;\n } else {\n $JobFile = $VendorJobFile;\n }\n // see php.net:\n // When trying to make a callable from a function name located in a namespace, you MUST give the fully qualified function name (regardless of the current namespace or use statements).\n // $job = $scheduler->addCommand('Grav\\Plugin\\Caldav2icsPlugin::createCalendars', $CalendarsFile); // this does not (yet) work !\n // $job = $scheduler->addFunction('Grav\\Plugin\\Caldav2icsPlugin::createCalendars', $CalendarsFile); // same as addCommand()...\n \n $job = $scheduler->addCommand($JobFile, USER_DIR); // new approach (08.04.21): only pass USER_DIR to create_calendars.php\n \n $job->at($at);\n $job->output($logs);\n $job->backlink('/plugins/caldav2ics');\n }\n }\n }", "function calendar_set($data)\n\t{\n\t\tif (!($infolog = $this->bo->read($data['entry_id'])))\n\t\t{\n\t\t\treturn $data;\n\t\t}\n\t\t$event = array_merge($data,array(\n\t\t\t'category'\t=> $GLOBALS['egw']->categories->check_list(EGW_ACL_READ, $infolog['info_cat']),\n\t\t\t'priority'\t=> $infolog['info_priority'] + 1,\n\t\t\t'public'\t=> $infolog['info_access'] != 'private',\n\t\t\t'title'\t\t=> $infolog['info_subject'],\n\t\t\t'description'\t=> $infolog['info_des'],\n\t\t\t'location'\t=> $infolog['info_location'],\n\t\t\t'start'\t\t=> $infolog['info_startdate'],\n\t\t\t'end'\t\t=> $infolog['info_enddate'] ? $infolog['info_enddate'] : $infolog['info_datecompleted']\n\t\t));\n\t\tunset($event['entry_id']);\n\t\tif (!$event['end']) $event['end'] = $event['start'] + (int) $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength']*60;\n\n\t\t// Match categories by name\n\t\t$event['category'] = $GLOBALS['egw']->categories->name2id(categories::id2name($infolog['info_cat']));\n\n\t\t// make current user the owner of the new event, not the selected calendar, if current user has rights for it\n\t\t$event['owner'] = $user = $GLOBALS['egw_info']['user']['account_id'];\n\n\t\t// add/modify participants according to prefs\n\t\t$prefs = explode(',',$this->prefs['calendar_set'] ? $this->prefs['calendar_set'] : 'responsible,contact,user');\n\n\t\t// if no default participants (selected calendars) --> remove all\n\t\tif (!in_array('selected',$prefs))\n\t\t{\n\t\t\t$event['participants'] = $event['participant_types'] = array();\n\t\t}\n\t\t// Add responsible as participant\n\t\tif (in_array('responsible',$prefs))\n\t\t{\n\t\t\tforeach($infolog['info_responsible'] as $responsible)\n\t\t\t{\n\t\t\t\t$event['participants'][$responsible] = $event['participant_types']['u'][$responsible] =\n\t\t\t\t\tcalendar_so::combine_status($user==$responsible?'A':'U');\n\t\t\t}\n\t\t}\n\t\t// Add linked contact as participant\n\t\tif (in_array('contact',$prefs) && $infolog['info_link']['app'] == 'addressbook')\n\t\t{\n\t\t\t$event['participants'][calendar_so::combine_user('c',$infolog['info_link']['id'])] =\n\t\t\t\t$event['participant_types']['c'][$infolog['info_link']['id']] = calendar_so::combine_status('U');\n\t\t}\n\t\tif (in_array('owner',$prefs))\n\t\t{\n\t\t\t$event['participants'][$infolog['info_owner']] = $event['participant_types']['u'][$infolog['info_owner']] =\n\t\t\t\tcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\t\t// Add current user, if set or no other participants, which is not allowed\n\t\tif (in_array('user',$prefs))\n\t\t{\n\t\t\t$event['participants'][$user] = $event['participant_types']['u'][$user] =\n\t\t\t\tcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\n\t\t// Add infolog link to calendar entry\n\t\t$event['link_app'][] = $infolog['info_link']['app'];\n\t\t$event['link_id'][] = $infolog['info_link']['id'];\n\n\t\t// Copy infolog's links\n\t\tforeach(egw_link::get_links('infolog',$infolog['info_id'],'','link_lastmod DESC',true) as $link)\n\t\t{\n\t\t\tif ($link['app'] != egw_link::VFS_APPNAME)\n\t\t\t{\n\t\t\t\t$event['link_app'][] = $link['app'];\n\t\t\t\t$event['link_id'][] = $link['id'];\n\t\t\t}\n\t\t}\n\t\t// Copy same custom fields\n\t\tforeach(array_keys(config::get_customfields('calendar')) as $name)\n\t\t{\n\t\t\tif ($this->bo->customfields[$name]) $event['#'.$name] = $infolog['#'.$name];\n\t\t}\n\t\t//error_log(__METHOD__.'('.array2string($data).') infolog='.array2string($infolog).' returning '.array2string($event));\n\t\treturn $event;\n\t}", "function meeting_agenda_items() {\n return meeting_agenda_items_list();\n}", "public function autoCreateWorkSchedule() {\n $fromDate = $this->date_from;\n $toDate = $this->date_to;\n $period = CommonProcess::getDatePeriod($fromDate, $toDate);\n $arrWorkShifts = HrWorkShifts::getArrayByRole($this->role_id);\n $arrUserId = $this->getUserIdArray();\n $this->removeOldWorkSchedule();\n foreach ($period as $dt) {\n $date = $dt->format(DomainConst::DATE_FORMAT_DB);\n $workShift = CommonProcess::getRandomElementInArray($arrWorkShifts);\n if ($workShift != NULL) {\n foreach ($arrUserId as $userId) {\n HrWorkSchedules::insertOne($date, $workShift->id, $this->id, $userId);\n }\n }\n \n }\n }", "function dayfill_autoriser(){}", "public function action_retainapps()\n\t{\n\t\t$startdate = $_POST[\"startdate\"];\n\t\t$startdate = date('Y-m-d',strtotime($startdate));\n\t\t$enddate = $_POST[\"enddate\"];\n\t\t$enddate = date('Y-m-d',strtotime($enddate));\n\t\t$doccalendarid = $_POST[\"calid\"];\n\t\t$docid = $_POST[\"docid\"];\n\t\t$shortvisit = $_POST[\"shortvisit\"];\n\t\t$longvisit = $_POST[\"longvisit\"];\n\t\t$appstartegy = $_POST[\"appstartegy\"];\n\t\t$restricteddates = $_POST[\"restricteddates\"];\t\t\n\t\t$mondaydata = $_POST[\"monday\"];\t\t\n\t\t$tuesdaydata = $_POST[\"tuesday\"];\n\t\t$wednesdaydata = $_POST[\"wednesday\"];\n\t\t$thursdaydata = $_POST[\"thursday\"];\n\t\t$fridaydata = $_POST[\"friday\"];\n\t\t$saturdaydata = $_POST[\"saturday\"];\n\t\t$sundaydata = $_POST[\"sunday\"];\n\t\t$chargetype = $_POST[\"chargetype\"];\n\t\t$schedulename = $_POST[\"schedulename\"];\n\t\tif($appstartegy == \"blockslot\")\n\t\t\t$blockval = $_POST[\"blockval\"];\n\t\telse\n\t\t\t$blockval =\"\";\t\t\n\t\n\t\t//get all dates in the range of start date and end date\t\n\t\t$completedatearr = $this->getdatesinrange($startdate,$enddate) ;\n\t\t\n\t\t//find all overlapping appointments\t\n\t\t$objdocscheduleovrlappingapps = new Model_Docscheduleoverlappingapp;\n\t\t$objdocscheduleovrlappingapps=$objdocscheduleovrlappingapps->where('startdate_c',\">=\", $startdate)->where('enddate_c','<=',$enddate)->where('refdocschedulecalendarid_c','=',$doccalendarid )->find_all();\n\t\t\n\t\t//put info of overlapping appointments in $arapps and $arappdate\n\t\t$arapps = array();\n\t\t$arappdate = array();\n\t\tforeach($objdocscheduleovrlappingapps as $result)\n\t\t{\n\t\t\t//array_push($arapps,($result->scheduledstarttime_c));\t\t\t\t\t\n\t\t\t$arappdtls['apptime'] = $result->scheduledstarttime_c;\n\t\t\t$arappdtls['appduration'] = $result->appdurationinmins_c;\n\t\t\t$arappdtls['slottype'] = ucwords($result->slottype_c);\n\t\t\t$arappdtls['consultationmode'] = ucwords($result->consultationmode_c);\n\t\t\tarray_push($arapps,$arappdtls);\n\t\t\tarray_push($arappdate,date('Y-m-d', strtotime($result->scheduledstarttime_c)));\t\t\t\t\t\n\t\t}\n\t\t$arappdate = (array_unique($arappdate));\n\t\t\n\t\t//get all non overlapping dates and put it in $ardiff\n\t\t$arrdiff=array();\n\t\t$arrdiff = array_diff($completedatearr,$arappdate);\n\t\t$ardiff = array();\n\t\tforeach($arrdiff as $ad)\n\t\t{\n\t\t\tarray_push( $ardiff,$ad);\n\t\t}\n\t\t\n\t\t//put all dates from $arappdate to $arappdates\n\t\t$arappdates =array();\n\t\tforeach($arappdate as $d )\n\t\t{\n\t\t\tarray_push($arappdates,$d);\n\t\t}\n\t\t\n\t\t//find all overlapping schedules and delete them\n\t\t$objdoctorschedule = new Model_Doctorschedule;\n\t\t$objdoctorschedule=$objdoctorschedule-> where('refdocschedulecalendarid_c','=',$doccalendarid )->where('status_c','=','active')->where('startdate_c' ,'>=',$startdate) ->find_all();\n\t\t\n\t\t\n\t\tforeach($objdoctorschedule as $res)\n\t\t{\n\t\t\tfor($i=0;$i<sizeof($completedatearr);$i++ )\n\t\t\t{\n\t\t\t\tif($res->startdate_c <= $completedatearr[$i] && $completedatearr[$i]<=$res->enddate_c )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$oldscheduleid =$res->id;\n\t\t\t\t\t$objdoctorschedule = new Model_Doctorschedule;\n\t\t\t\t\t$objdoctorschedule-> where('id','=',$oldscheduleid );\n\t\t\t\t\t\n\t\t\t\t\tforeach($objdoctorschedule->find_all() as $res)\n\t\t\t\t\t{\n\t\t\t\t\t\t$objdoctorscheduleslots = new Model_Doctorscheduleslot;\t\t\t\n\t\t\t\t\t\t$objdoctorscheduleslots->where('refdoctorscheduleslotid_c','=',$res->id);\n\t\t\t\t\t\tforeach($objdoctorscheduleslots->find_all() as $r )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$r->delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$res->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$arrappointmenttime =array();\n\t\t//save and check schedule for all dates between start and end date\n\t\tfor($i=0;$i<sizeof($completedatearr);$i++ )\n\t\t{\n\t\t\t$arnewdaydata =array();\n\t\t\t$ardaydata =array();\n\t\t\t$daynm = date('l',strtotime($completedatearr[$i] ) );\n\t\t\t//get day data for specific [$completedatearr] date\n\t\t\n\t\t\t$ardaydata= json_decode( $this->getdayscheduleslots($daynm,$mondaydata,$tuesdaydata,$wednesdaydata,$thursdaydata,$fridaydata,$saturdaydata,$sundaydata));\n\t\t\t$result = $this->savedocschedule($doccalendarid,$completedatearr[$i] ,$completedatearr[$i] ,$shortvisit,$longvisit,$blockval,$appstartegy,$restricteddates,$schedulename);\n\t\t\t\n\t\t\t$a = 0;\n\t\t\t$finaldatedataarr \t\t= array();\n\t\t\t$finaldatedataarr[$completedatearr[$i]]\t= array();\n\t\t\t$arrappointmentdata= array();\n\t\t\t\n\t\t\tfor($j=0;$j<sizeof($arapps);$j++ )\n\t\t\t{\n\t\t\t\t$appointmenttime = $arapps[$j]['apptime'];\n\t\t\t\t$appointmentduration = $arapps[$j]['appduration'];\n\t\t\t\tarray_push($arrappointmenttime, date('H:i', strtotime($appointmenttime )) );\n\t\t\t\tif(strtotime($completedatearr[$i])== strtotime( date('Y-m-d', strtotime( $appointmenttime ) ) ) )\n\t\t\t\t{\n\t\t\t\t\t$today = $completedatearr[$i];\n\t\t\t\t\t\n\t\t\t\t\tif(sizeof($ardaydata)>=1 || !empty($ardaydata) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif(! array_key_exists($completedatearr[$i],$arrappointmentdata ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arrappointmentdata[$completedatearr[$i]]=$ardaydata;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$arslots = array();\n\t\t\t\t\t\t$duparray= array();\n\t\t\t\t\t\t$time = date('H:i',strtotime($appointmenttime));\n\t\t\t\t\t\t$m1 = explode(\":\",$time);\n\t\t\t\t\t\t$t= date( 'Y-m-d H:i', mktime( (int) $m1[0],(int) $m1[1],0 ,date( 'm',strtotime($today)) ,date( 'd',strtotime($today)) ,date( 'Y',strtotime($today)))); //appointment time\n\t\t\t\t\t\tforeach ( $ardaydata as $daydata)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$timeinternal1 = $daydata[0];//slot start time\n\t\t\t\t\t\t\t$timeinternal2 = $daydata[1];//slot end time\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$timeinternal = explode(':', $timeinternal1);\n\t\t\t\t\t\t\t$timeinternal3 = explode(':', $timeinternal2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$newdaydata = array();\n\t\t\t\t\t\t\t$newdaydata = $daydata;\n\t\t\t\t\t\t\t$arslots = $daydata[4];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$enddurationarslots = $this->create_endtimeslots($arslots,$appointmentduration) ;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$starttime = date( 'Y-m-d H:i',mktime( (int) $timeinternal[0] ,(int) $timeinternal[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t$endtime = date( 'Y-m-d H:i',mktime( (int) $timeinternal3[0] ,(int) $timeinternal3[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t\t$arslotsnew = $arslots;\n\t\t\t\t\t\t\tif( $this->check_in_range($starttime,$endtime, $t) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor($n=0;$n<sizeof($arslots);$n++ )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$m1 = explode(\":\",$arslots[$n] );\t\t\t\n\t\t\t\t\t\t\t\t\t$m2 = explode(\":\",$enddurationarslots[$n] );\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$stt1= date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t\t\t$edt2 = date('Y-m-d H:i',mktime( (int) $m2[0] ,(int) $m2[1] ,0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))));\n\t\t\t\t\t\t\t\t\tif(strtotime($t) != strtotime($stt1) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($this->check_in_range($stt1,$edt2,$t ) == 1)\n\t\t\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t\t\t$flag = true;\n\t\t\t\t\t\t\t\t\t\t\tarray_push($duparray ,$arslotsnew[$n]);\t\n\t\t\t\t\t\t\t\t\t\t\t$arslotsnew[$n] =\"\";\n\t\t\t\t\t\t\t\t\t\t\tif( $n+1 <=sizeof($arslots) )\n\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$m1 = explode(\":\",$arslots[$n+1] );\t\n\t\t\t\t\t\t\t\t\t\t\t\tif( ((strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) - strtotime($t) ) /60) <$appointmentduration && ((strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) - strtotime($t) ) /60)>0 )\n\t\t\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_push($duparray ,$arslotsnew[$n+1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arslotsnew[$n+1] =\"\";\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\telse if($n-1 > 0 )\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$m1 = explode(\":\",$arslots[$n-1] );\t\n\t\t\t\t\t\t\t\t\t\t\t\tif( (( strtotime($t) - strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) ) /60) <$appointmentduration && (( strtotime($t) - strtotime( date( 'Y-m-d H:i',mktime( (int) $m1[0] ,(int) $m1[1],0 , date('m',strtotime($today)) ,date( 'd',strtotime($today)),date('Y',strtotime($today))))) ) /60)>0 )\t\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_push($duparray ,$arslotsnew[$n-1]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arslotsnew[$n-1] =\"\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arslotsnew,$time);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse if(strtotime( $starttime)> strtotime( $t) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($arslotsnew,date('h:i',strtotime($t)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif( strtotime($endtime)< strtotime($t))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($arslotsnew,date('h:i',strtotime($t)));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($finaldatedataarr[$completedatearr[$i]],array_unique($arslotsnew));//slots with blocked time for retaining apps\n\t\t\t\t\t\t\tarray_push($finaldatedataarr[$completedatearr[$i]],array_unique($duparray));//slots with appoitnment\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// save schedule for restricted dates\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$slotstartime =date('H:i',strtotime( $arapps[$j]['apptime']));\n\t\t\t\t\t\t$t1time = strtotime( $arapps[$j]['apptime']);\n\t\t\t\t\t\t$t1time = $t1time+(60*$appointmentduration);\n\t\t\t\t\t\t$slotendtime = date('H:i',$t1time);\n\t\t\t\t\t\t$modetype = $arapps[$j]['consultationmode'];\n\t\t\t\t\t\t$chargetype = $arapps[$j]['slottype'];\n\t\t\t\t\t\t$slot = date('h:i',strtotime($appointmenttime));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->saveschedulefornonsetdate($slotstartime,$slotendtime,$modetype,$chargetype,$slot,$daynm ,$result);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$arslotsunique=array();\n\t\t\t$arslotsuniquedup=array();\n\t\t\tforeach($finaldatedataarr as $fkey => $finaldates )\n\t\t\t{\n\t\t\t\tif( !empty($finaldates) && in_array($fkey, $arappdate ))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tfor($k=0;$k<sizeof($finaldates); $k=$k+2)\n\t\t\t\t\t{\n\t\t\t\t\t\t//merge array both slots (arslots) and retained apps ( duparray)\t\t\t\t\n\t\t\t\t\t\t$arslotsunique = array_unique( array_merge($arslotsunique, $finaldates[$k]));\n\t\t\t\t\t\t$arslotsuniquedup = array_unique( array_merge($arslotsuniquedup,$finaldates[$k+1]));\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$arslotsunique =array_diff( array_unique($arslotsunique),array_unique($arslotsuniquedup));\n\t\t\t\t\t\n\t\t\t\t\t$arslotsuniquenew = array();\n\t\t\t\t\t$arslotsuniquenew1 = array();\n\t\t\t\t\tarray_push($arslotsuniquenew,'');\n\t\t\t\t\t$arslotsuniquenew = array_diff($arslotsunique ,$arslotsuniquenew);\n\t\t\t\t\tforeach($arslotsuniquenew as $arsnew )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($arslotsuniquenew1, strtotime($arsnew) );\n\t\t\t\t\t}\n\t\t\t\t\tarsort($arslotsuniquenew1);\n\t\t\t\t\t$arslotsuniquenew = array();\n\t\t\t\t\tforeach($arslotsuniquenew1 as $arsnew )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($arslotsuniquenew, date('H:i', $arsnew) );\n\t\t\t\t\t}\n\t\t\t\t\t$arslotsuniquenew = array_reverse($arslotsuniquenew);\t\n\t\t\t\t\t\n\t\t\t\t\tforeach($arrappointmentdata as $key=> $arappsdata)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(sizeof($arappsdata)>0 || ! empty($arappsdata) )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$x = 0;\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($arappsdata as $arddata )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$arrappointmentdatanew =array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor($y=0;$y<sizeof($arslotsuniquenew);$y++ )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($arslotsuniquenew[$y]!=\"\" )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//seperate entire array according to its time slots\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif((strtotime($arddata[0]) <= strtotime($arslotsuniquenew[$y] ) && strtotime($arslotsuniquenew[$y] ) <= strtotime($arddata[1]) ) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arrappointmentdatanew,$arslotsuniquenew[$y]);\n\t\t\t\t\t\t\t\t\t\t\t$arslotsuniquenew[$y]=\"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\telse if( (strtotime($arddata[0]) < strtotime($arslotsuniquenew[$y] ) && strtotime($arslotsuniquenew[$y] ) > strtotime($arddata[1]) ) && in_array($arslotsuniquenew[$y],$arrappointmenttime) )\t\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arrappointmentdatanew,$arslotsuniquenew[$y]);\n\t\t\t\t\t\t\t\t\t\t\t$arslotsuniquenew[$y]=\"\";\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\telse if((strtotime($arddata[0]) >strtotime($arslotsuniquenew[$y] ) && strtotime($arslotsuniquenew[$y] ) < strtotime($arddata[1]) ) && in_array($arslotsuniquenew[$y],$arrappointmenttime))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tarray_push($arrappointmentdatanew,$arslotsuniquenew[$y]);\n\t\t\t\t\t\t\t\t\t\t\t$arslotsuniquenew[$y]=\"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t$arappsdata[$x][4] =$arrappointmentdatanew;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$x++;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t//var_dump($arappsdata);\n\t\t\t\t\t\t\t$this->saveschedule($arappsdata,$daynm,$result );\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t//save schedule for dates with no appointment that date\n\t\t\tfor($x=0;$x< sizeof($ardiff);$x++ )\n\t\t\t{\n\t\t\t\tif( strtotime($completedatearr[$i])== strtotime($ardiff[$x] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->adddayschedule($result,date('l',strtotime($completedatearr[$i] )) ,$mondaydata,$tuesdaydata,$wednesdaydata,$thursdaydata,$fridaydata,$saturdaydata,$sundaydata );\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function showTodayAppointments()\n{\n // make sure request is for appointment-list not progress-note-list\n $today = getDefaultDate();\n $appointments = getAppointments(['param' => 'AppointmentDate', 'operator' => '==', 'value' => $today]);\n $tableRows = '';\n foreach ($appointments as $appointment) {\n $rowData = json_encode($appointment);\n $rowId = $appointment['FirebaseId'];\n\n // set parameters for ajax calls\n $deleteActionUrl = APPOINTMENTS_CONTROLLER;\n $nextUrl = ADD_APPOINTMENT;\n $editAction = 'storeTableRowData(' . $rowData . ',\"' . $nextUrl . '\")';\n $deleteAction = 'deleteTableRowData(\"' . $rowId . '\",\"' . $deleteActionUrl . '\")';\n\n $id = $appointment['AppointmentId'];\n $dentistName = $appointment['DentistName'];\n $patientName = $appointment['PatientName'];\n $phoneNo = $appointment['PatientNo'];\n $date = $appointment['AppointmentDate'];\n $time = $appointment['AppointmentTime'];\n $tableRows .= \"<tr>\n <td>\" . $id . \"</td>\n <td>\" . $dentistName . \"</td>\n <td>\" . $patientName . \"</td>\n <td>\" . $phoneNo . \"</td>\n <td>\" . $date . \"</td>\n <td>\" . $time . \"</td>\n <td><span class='fa fa-pencil-square-o text-success' id='edit' onclick='$editAction'></span>\n <span class='fa fa-remove text-danger' id='delete' onclick='$deleteAction'></span>\n </td>\n </tr>\";\n }\n echo $tableRows;\n return null;\n}" ]
[ "0.7425856", "0.65425426", "0.61210376", "0.60625994", "0.6030722", "0.60131", "0.5985773", "0.5922539", "0.58533096", "0.57861704", "0.56991374", "0.5579013", "0.5532399", "0.55134255", "0.55079275", "0.55069554", "0.54982936", "0.54794395", "0.54744124", "0.54723436", "0.5444673", "0.54066616", "0.5384063", "0.53702754", "0.53465915", "0.53162193", "0.52808905", "0.5269507", "0.5260461", "0.52591395", "0.5255233", "0.52239203", "0.5185677", "0.51829547", "0.5178084", "0.5174694", "0.5169017", "0.5166864", "0.5155629", "0.51530874", "0.51526695", "0.5150008", "0.51339906", "0.51231027", "0.512058", "0.51199657", "0.5119808", "0.51096404", "0.5106308", "0.51060885", "0.51012504", "0.5096684", "0.5086424", "0.50851315", "0.5073557", "0.507277", "0.5072219", "0.50668246", "0.5060143", "0.5056936", "0.5056924", "0.5055354", "0.5052597", "0.5045464", "0.50443935", "0.50380963", "0.50377125", "0.5036416", "0.50277907", "0.5024384", "0.5022563", "0.5018389", "0.5013862", "0.500877", "0.5008158", "0.50077856", "0.50018924", "0.49989098", "0.4998787", "0.4998661", "0.49928272", "0.4991454", "0.49884006", "0.49858382", "0.49857914", "0.4983655", "0.49800217", "0.4968098", "0.4964435", "0.49642834", "0.4962348", "0.49583346", "0.495305", "0.4952577", "0.49509135", "0.49494946", "0.4948884", "0.49476948", "0.493803", "0.49336043" ]
0.7491378
0
Add to job list appointment completion
Добавить в список задач завершение назначения
public function regularAppointmentComplete() { $command = 'task:appointment:complete'; $this->addRegularJob($command); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function finish()\n {\n parent::finish();\n\n $columns = $this->get_argument( 'columns', array() );\n if( array_key_exists( 'completed', $columns ) && 1 == $columns['completed'] )\n {\n $appointment_class_name = lib::create( 'database\\appointment' );\n $appointment_mod = lib::create( 'database\\modifier' );\n $appointment_mod->where( 'participant_id', '=', $this->get_record()->get_participant()->id );\n $appointment_mod->where( 'completed', '=', false );\n $test = 'home' == $this->get_record()->get_qnaire()->type ? '!=' : '=';\n $appointment_mod->where( 'address_id', $test, NULL );\n $appointment_mod->where( 'user_id', $test, NULL );\n foreach( $appointment_class_name::select( $appointment_mod ) as $db_appointment )\n {\n $db_appointment->completed = true;\n $db_appointment->save();\n }\n }\n }", "public function finish()\n {\n $db_assignment = $this->get_record()->get_assignment();\n\n // don't allow editing if the appointment has been assigned\n if( true == $this->editable ) $this->editable = is_null( $db_assignment );\n\n parent::finish();\n\n $db_participant = lib::create( 'database\\participant', $this->get_record()->participant_id );\n \n // determine the time difference\n $db_phone = $this->get_record()->get_phone();\n\n // go with the phone's address if there is one, and the first address if not\n $db_address = is_null( $db_phone )\n ? $db_participant->get_first_address()\n : $db_phone->get_address();\n $time_diff = is_null( $db_address ) ? NULL : $db_address->get_time_diff();\n\n // need to add the participant's timezone information as information to the date item\n $site_name = lib::create( 'business\\session' )->get_site()->name;\n if( is_null( $time_diff ) )\n $note = 'The participant\\'s time zone is not known.';\n else if( 0 == $time_diff )\n $note = sprintf( 'The participant is in the same time zone as the %s site.',\n $site_name );\n else if( 0 < $time_diff )\n $note = sprintf( 'The participant\\'s time zone is %s hours ahead of %s\\'s time.',\n $time_diff,\n $site_name );\n else if( 0 > $time_diff )\n $note = sprintf( 'The participant\\'s time zone is %s hours behind of %s\\'s time.',\n abs( $time_diff ),\n $site_name );\n\n $this->add_item( 'datetime', 'datetime', 'Date', $note );\n \n // create enum arrays\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'active', '=', true );\n $modifier->order( 'rank' );\n $phones = array();\n foreach( $db_participant->get_phone_list( $modifier ) as $db_phone )\n $phones[$db_phone->id] = $db_phone->rank.\". \".$db_phone->number;\n \n if( !is_null( $db_assignment ) )\n {\n $this->set_item( 'assignment.user', $db_assignment->get_user()->name, false );\n\n $this->add_item( 'assignment.start_datetime', 'constant', 'Started' );\n $this->set_item( 'assignment.start_datetime',\n util::get_formatted_time( $db_assignment->start_datetime ), false );\n \n $this->add_item( 'assignment.end_datetime', 'constant', 'Finished' );\n $this->set_item( 'assignment.end_datetime',\n util::get_formatted_time( $db_assignment->end_datetime ), false );\n }\n else\n {\n $this->set_item( 'assignment.user', 'unassigned', false );\n }\n\n $appointment_class_name = lib::get_class_name( 'database\\appointment' );\n $types = $appointment_class_name::get_enum_values( 'type' );\n $types = array_combine( $types, $types );\n\n // set the view's items\n $this->set_item( 'phone_id', $this->get_record()->phone_id, false, $phones );\n $this->set_item( 'datetime', $this->get_record()->datetime, true );\n $this->set_item( 'state', $this->get_record()->get_state(), false );\n $this->set_item( 'type', $this->get_record()->type, false, $types );\n\n $this->finish_setting_items();\n\n // hide the calendar if requested to\n $this->set_variable( 'hide_calendar', $this->get_argument( 'hide_calendar', false ) );\n }", "public function addcompletionAction(){\r\n\t\t$this->view->action = \"editcompletion\";\r\n\t\t$this->view->nameTypeQuestion = \"Câu hỏi điền khuyết\";\r\n\t\t$ObjQuestion = Array();\r\n\t\t$ObjQuestion['type'] = 4;\r\n\t\t$ObjQuestion['score'] = 1;\r\n\t\t$ObjQuestion['level'] = 0.5;\r\n\t\t$ObjQuestion['classification'] = 0.2;\r\n\t\t$ObjQuestion['isupdate'] = 0; // insert new question\r\n\t\t$ObjQuestion['subject_id'] = \"\";\r\n\t\t$ObjQuestion['chapter_id'] = \"\";\r\n\t\t$ObjQuestion['question_title'] = \"\";\r\n\t\t$ObjQuestion['id'] = '';\r\n\t\t$ObjQuestion['content'] = \"\";\r\n\t\t$ObjQuestion['generalfeedback'] = \"\";\r\n\t\t$ObjQuestion['hidden'] = '';\r\n\t\t$ObjQuestion['created_user'] = $this->getUserId();\r\n \r\n\t\t$this->view->ObjQuestion = $ObjQuestion;\r\n\t\t$this->renderquestion(4);\r\n\t}", "function complete($activity_id=0,$force=false,$addworkitem=true) {\n global $gBitUser;\n global $__activity_completed;\n \n $__activity_completed = true;\n \n $theuser = $gBitUser->getUserId();\n \n if($activity_id==0) {\n $activity_id=$_REQUEST['activity_id'];\n } \n \n // If we are completing a start activity then the instance must \n // be created first!\n $type = $this->mDb->getOne(\"select `act_type` from `\".GALAXIA_TABLE_PREFIX.\"activities` where `activity_id`=?\",array((int)$activity_id)); \n if($type=='start') {\n $this->_createNewInstance((int)$activity_id,$theuser);\n }\n \n // Now set ended\n $now = date(\"U\");\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instance_activities` set `ended`=? where `activity_id`=? and `instance_id`=?\";\n $this->mDb->query($query,array((int)$now,(int)$activity_id,(int)$this->instance_id));\n \n //Add a workitem to the instance \n $iid = $this->instance_id;\n if($addworkitem) {\n $max = $this->mDb->getOne(\"select max(`order_id`) from `\".GALAXIA_TABLE_PREFIX.\"workitems` where `instance_id`=?\",array((int)$iid));\n if(!$max) {\n $max=1;\n } else {\n $max++;\n }\n $act = $this->_get_instance_activity($activity_id);\n if(!$act) {\n //Then this is a start activity ending\n $started = $this->getStarted();\n $putuser = $this->getOwner();\n } else {\n $started=$act['started'];\n $putuser = $act['user_id'];\n }\n $ended = date(\"U\");\n $properties = serialize($this->properties);\n $query=\"insert into `\".GALAXIA_TABLE_PREFIX.\"workitems`(`instance_id`,`order_id`,`activity_id`,`started`,`ended`,`properties`,`user_id`) values(?,?,?,?,?,?,?)\"; \n $this->mDb->query($query,array((int)$iid,(int)$max,(int)$activity_id,(int)$started,(int)$ended,$properties,$putuser));\n }\n \n //Set the status for the instance-activity to completed\n $this->setActivityStatus($activity_id,'completed');\n \n //If this and end actt then terminate the instance\n if($type=='end') {\n $this->terminate();\n return;\n }\n \n //If the activity ending is autorouted then send to the\n //activity\n if ($type != 'end') {\n if (($force) || ($this->mDb->getOne(\"select `is_auto_routed` from `\".GALAXIA_TABLE_PREFIX.\"activities` where `activity_id`=?\",array($activity_id)) == 'y')) {\n // Now determine where to send the instance\n $query = \"select `act_to_id` from `\".GALAXIA_TABLE_PREFIX.\"transitions` where `act_from_id`=?\";\n $result = $this->mDb->query($query,array((int)$activity_id));\n $candidates = Array();\n while ($res = $result->fetchRow()) {\n $candidates[] = $res['act_to_id'];\n }\n if($type == 'split') {\n $first = true;\n foreach ($candidates as $cand) {\n $this->sendTo($activity_id,$cand,$first);\n $first = false;\n }\n } elseif($type == 'switch') {\n if (in_array($this->next_activity,$candidates)) {\n $this->sendTo((int)$activity_id,(int)$this->next_activity);\n } else {\n trigger_error(tra('Fatal error: next_activity does not match any candidate in autorouting switch activity'),E_USER_WARNING);\n }\n } else {\n if (count($candidates)>1) {\n trigger_error(tra('Fatal error: non-deterministic decision for autorouting activity'),E_USER_WARNING);\n } else {\n $this->sendTo((int)$activity_id,(int)$candidates[0]);\n }\n }\n }\n }\n }", "public function addToWaitList() {\n // The user has a program in their cart that is full.\n // We need to add them to the wait list and remove the\n // item from their cart.\n die(\"Not Implemented\");\n \n $rowid = $this->getRowId();\n $programId = $this->getProgramId();\n \n // TODO\n // Add them to the waitlist, howeve we do that...\n \n // Remove the program from their shopping cart\n $this->cart->update(array('rowid' => $rowid, 'qty' => 0));\n \n // TODO Send Email ???\n \n // Tell the client-side the waitlist entry is created\n $this->output->set_status_header(HTTP_CREATED);\n }", "public function setUserAssignComplete()\n\t{\n\t $this->Assignment->setComplete($_REQUEST['aid'], 2, $_REQUEST['complete']);\n\t}", "public function pending_completes()\n {\n $this->checkPermission();\n $data = self::$data;\n $data['pendings'] = $this->database->_markAsCompletedAuto();\n $data = html_escape($this->security->xss_clean($data));\n $this->load->view('admin/pending_complete', $data);\n return;\n }", "function complete_sesion($meeting_id)\n {\n $ssave['id'] = $meeting_id;\n $ssave['end_datetime'] = time();\n $ssave['status'] = 'Completed';\n $this->Common_model->save_tbl('bookings',$ssave);\n }", "public function complete(Request $req){\n $input = $req->all();\n $res = [\n 'listCompleted' => true,\n 'listId' => null\n ];\n\n $task = Item::find($input['taskId']);\n $task->completed = empty($input['completed']) ? false : true;\n $task->save();\n\n $list = $task->todo_list;\n foreach ($list->items as $item) {\n if (!$item->completed) {\n $res['listCompleted'] = false;\n }\n }\n\n if ($res['listCompleted']) {\n $list->completed = true;\n $list->save();\n $res['listCompleted'] = true;\n $res['listId'] = $list->id;\n }\n\n return json_encode($res);\n }", "public function execute() {\n global $CFG, $COMPLETION_CRITERIA_TYPES, $DB;\n\n if ($CFG->enablecompletion) {\n require_once($CFG->libdir . \"/completionlib.php\");\n\n // Process each criteria type.\n foreach ($COMPLETION_CRITERIA_TYPES as $type) {\n $object = 'completion_criteria_' . $type;\n require_once($CFG->dirroot . '/completion/criteria/' . $object . '.php');\n\n $class = new $object();\n // Run the criteria type's cron method, if it has one.\n if (method_exists($class, 'cron')) {\n if (debugging()) {\n mtrace('Running '.$object.'->cron()');\n }\n $class->cron();\n }\n }\n\n if (debugging()) {\n mtrace('Aggregating completions');\n }\n\n // Save time started.\n $timestarted = time();\n\n // Grab all criteria and their associated criteria completions.\n $sql = 'SELECT DISTINCT c.id AS course, cr.id AS criteriaid, crc.userid AS userid,\n cr.criteriatype AS criteriatype, cc.timecompleted AS timecompleted\n FROM {course_completion_criteria} cr\n INNER JOIN {course} c ON cr.course = c.id\n INNER JOIN {course_completions} crc ON crc.course = c.id\n LEFT JOIN {course_completion_crit_compl} cc ON cc.criteriaid = cr.id AND crc.userid = cc.userid\n WHERE c.enablecompletion = 1\n AND crc.timecompleted IS NULL\n AND crc.reaggregate > 0\n AND crc.reaggregate < :timestarted\n ORDER BY course, userid';\n $rs = $DB->get_recordset_sql($sql, ['timestarted' => $timestarted]);\n\n // Check if result is empty.\n if (!$rs->valid()) {\n $rs->close();\n return;\n }\n\n $currentuser = null;\n $currentcourse = null;\n $completions = [];\n while (1) {\n // Grab records for current user/course.\n foreach ($rs as $record) {\n // If we are still grabbing the same users completions.\n if ($record->userid === $currentuser && $record->course === $currentcourse) {\n $completions[$record->criteriaid] = $record;\n } else {\n break;\n }\n }\n\n // Aggregate.\n if (!empty($completions)) {\n if (debugging()) {\n mtrace('Aggregating completions for user ' . $currentuser . ' in course ' . $currentcourse);\n }\n\n // Get course info object.\n $info = new \\completion_info((object)['id' => $currentcourse]);\n\n // Setup aggregation.\n $overall = $info->get_aggregation_method();\n $activity = $info->get_aggregation_method(COMPLETION_CRITERIA_TYPE_ACTIVITY);\n $prerequisite = $info->get_aggregation_method(COMPLETION_CRITERIA_TYPE_COURSE);\n $role = $info->get_aggregation_method(COMPLETION_CRITERIA_TYPE_ROLE);\n\n $overallstatus = null;\n $activitystatus = null;\n $prerequisitestatus = null;\n $rolestatus = null;\n\n // Get latest timecompleted.\n $timecompleted = null;\n\n // Check each of the criteria.\n foreach ($completions as $params) {\n $timecompleted = max($timecompleted, $params->timecompleted);\n $completion = new \\completion_criteria_completion((array)$params, false);\n\n // Handle aggregation special cases.\n if ($params->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {\n completion_cron_aggregate($activity, $completion->is_complete(), $activitystatus);\n } else if ($params->criteriatype == COMPLETION_CRITERIA_TYPE_COURSE) {\n completion_cron_aggregate($prerequisite, $completion->is_complete(), $prerequisitestatus);\n } else if ($params->criteriatype == COMPLETION_CRITERIA_TYPE_ROLE) {\n completion_cron_aggregate($role, $completion->is_complete(), $rolestatus);\n } else {\n completion_cron_aggregate($overall, $completion->is_complete(), $overallstatus);\n }\n }\n\n // Include role criteria aggregation in overall aggregation.\n if ($rolestatus !== null) {\n completion_cron_aggregate($overall, $rolestatus, $overallstatus);\n }\n\n // Include activity criteria aggregation in overall aggregation.\n if ($activitystatus !== null) {\n completion_cron_aggregate($overall, $activitystatus, $overallstatus);\n }\n\n // Include prerequisite criteria aggregation in overall aggregation.\n if ($prerequisitestatus !== null) {\n completion_cron_aggregate($overall, $prerequisitestatus, $overallstatus);\n }\n\n // If aggregation status is true, mark course complete for user.\n if ($overallstatus) {\n if (debugging()) {\n mtrace('Marking complete');\n }\n\n $ccompletion = new \\completion_completion([\n 'course' => $params->course,\n 'userid' => $params->userid\n ]);\n $ccompletion->mark_complete($timecompleted);\n }\n }\n\n // If this is the end of the recordset, break the loop.\n if (!$rs->valid()) {\n $rs->close();\n break;\n }\n\n // New/next user, update user details, reset completions.\n $currentuser = $record->userid;\n $currentcourse = $record->course;\n $completions = [];\n $completions[$record->criteriaid] = $record;\n }\n\n // Mark all users as aggregated.\n $sql = \"UPDATE {course_completions}\n SET reaggregate = 0\n WHERE reaggregate < :timestarted\n AND reaggregate > 0\";\n $DB->execute($sql, ['timestarted' => $timestarted]);\n }\n }", "public function complete()\n {\n $this->update(['finished' => true]);\n\n $this->recordActivity('completed_task');\n }", "public function actionCompleteSelected() {\n\t\t$this->updateSelected('complete');\n\t}", "function markComplete($notes=null,$lc=null) {\n\n\t\t$this->DB->begin();\n\t \n\t //mark task complete\n\t $opt = null;\n\t $opt[\"completed\"] = \"t\";\n\t $opt[\"date_completed\"] = date(\"Y-m-d H:i:s\");\n\t if ($notes) $opt[\"notes\"] = $notes;\n\t\t$opt[\"modified_date\"] = date(\"Y-m-d H:i:s\");\n\t\t$opt[\"modified_by\"] = USER_ID;\n\t $opt[\"where\"] = \"id='\".$this->taskId.\"'\";\n\t \n\t $this->DB->update(\"task.task\",$opt);\n\n\t\t$this->DB->end();\n\n\t}", "protected function maybe_set_date_completed()\n {\n }", "public static function _request_complete_item() {\n $user = learn_press_get_current_user();\n $id = learn_press_get_request('id');\n $course_id = !empty($_REQUEST['course_id']) ? $_REQUEST['course_id'] : get_the_ID();\n $type = learn_press_get_request('type');\n $security = learn_press_get_request('security');\n $response = array();\n if (!wp_verify_nonce($security, sprintf('complete-item-%d-%d-%d', $user->id, $course_id, $id))) {\n $response['result'] = 'fail';\n $response['message'] = __('Bad request!', 'learnpress');\n } else {\n if ($type == 'lp_lesson') {\n $results = $user->complete_lesson($id, $course_id);\n\n if (is_wp_error($results)) {\n learn_press_add_message(__('Error while completing lesson.', 'learnpress'));\n } elseif ($results !== false) {\n\n $message = __('You have completed lesson', 'learnpress');\n $auto_next = LP()->settings->get('auto_redirect_next_lesson');\n $time = LP()->settings->get('auto_redirect_time');\n $time = absint($time);\n\n if ($auto_next === 'yes') {\n ob_start();\n ?>\n <script type=\"text/javascript\">\n\n 'use strict';\n\n (function ($) {\n\n $(document).ready(function () {\n\n var $nextItem = $('.button-load-item', '#lp-navigation .nav-next'),\n $message = $('.learn-press-auto-redirect-next-item'),\n time = <?php echo esc_js($time); ?>;\n\n if ($nextItem.length) {\n\n time = !parseInt(time) ? 0 : parseInt(time);\n\n if (!time) {\n $nextItem.trigger('click');\n } else {\n if ($message.length) {\n\n $message.addClass('active');\n\n var $count = $('.learn-press-countdown', $message),\n interval = setInterval(function () {\n\n if (time <= 1) {\n clearInterval(interval);\n $nextItem.trigger('click');\n } else {\n $count.text(--time);\n }\n\n }, 1000);\n\n $('.learnpress-dismiss-notice', $message).on('click', function () {\n\n clearInterval(interval);\n\n $message.hide(200, function () {\n $(this).remove();\n });\n\n });\n }\n }\n\n }\n });\n\n })(jQuery);\n </script>\n <?php\n $message .= ob_get_contents();\n ob_get_clean();\n }\n learn_press_add_message($message);\n }\n } else {\n do_action('learn_press_user_request_complete_item', $_REQUEST);\n }\n }\n wp_redirect(learn_press_get_current_url());\n die();\n }", "public function mark_as_completed()\n\t{\n\t\t$this->status = 'complete';\n\t\t$this->save();\n\t\t\n\t\torders::history_entry($this, 'Order Complete');\n\t\tORM::factory('order_email')->send_order_completed($this);\n\t}", "public function complete()\n\t{\n\t\tTodo::update([\n\t\t\t'completed_at' => date('y-m-d h:i:s'),\n\t\t], $this->params['id']);\n\n\t\treturn json(\"Task marked as completed\");\n\t}", "public function afterComplete()\n {\n if ($this->service->batched && $this->updateService->batched) {\n /** @var AnalyticsUpdateJob $nextJob */\n $nextJob = Injector::inst()->get('AnalyticsUpdateJob');\n $nextJob->setJobData(1, 0, false, new stdClass(), ['Batched data from Google']);\n /** @var QueuedJobService $jobService */\n $jobService = Injector::inst()->get(QueuedJobService::class);\n /* Queue immediately after this job */\n $jobService->queueJob($nextJob, date('Y-m-d H:i:s'));\n }\n parent::afterComplete();\n }", "public function complete() {\n $this->smarty->display($this->template_path().\"/user/campaign/complete.html\");\n }", "public function test_methodsetscompletiontimefrommoodlegradeitem() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up required PM course grade.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50));\n $pmcourse->save();\n\n // Set up Moodle course grade item info.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Assign the user a grade in Moodle.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 100, 'timemodified' => 12345));\n $coursegradegrade->insert();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, null, 12345);\n }", "function wc_admin_update_271_update_task_list_options()\n {\n }", "public function setCompletion($completion)\n {\n $this->completion = $completion;\n }", "public function markAsIncompleted()\n {\n if ($this->completed_at) {\n return tap($this->update(['completed_at' => null]), function () {\n event(new TaskStatusChanged($this));\n });\n }\n }", "function wc_admin_update_290_update_apperance_task_option()\n {\n }", "public function add_completion_rules() {\n $mform =& $this->_form;\n $group = [];\n $group[] =& $mform->createElement('checkbox', 'completiontotaldurationenabled', ' ',\n get_string('completiontotalduration', 'attendanceregister'));\n $group[] =& $mform->createElement('text', 'completiontotaldurationmins', ' ', ['size' => 4]);\n $mform->setType('completiontotaldurationmins', PARAM_INT);\n $mform->addGroup($group, 'completiondurationgroup', get_string('completiondurationgroup', 'attendanceregister'),\n [' '], false);\n $mform->disabledIf('completiontotaldurationmins', 'completiontotaldurationenabled', 'notchecked');\n return ['completiondurationgroup'];\n }", "public function item_lesson_complete_button() {\n\t\t$user = LP_Global::user();\n\t\t$course = LP_Global::course();\n\t\t$item = LP_Global::course_item();\n\n\t\tif ( ! $user || ! $course || ! $user->is_course_in_progress( $course->get_id() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The complete button is not displayed when the course is locked --hungkv--\n\t\tif ( $user->can_view_content_course( $course->get_id() )->key === LP_BLOCK_COURSE_DURATION_EXPIRE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlearn_press_get_template(\n\t\t\t'content-lesson/button-complete.php',\n\t\t\tarray(\n\t\t\t\t'user' => $user,\n\t\t\t\t'course' => $course,\n\t\t\t\t'item' => $item,\n\t\t\t)\n\t\t);\n\t}", "private function add_additional_info() {\n global $DB;\n\n $answers = $DB->get_records('booking_answers', array('bookingid' => $this->id), 'id');\n $allresponses = array();\n $mainuserfields = user_picture::fields('u', NULL);\n $allresponses = get_users_by_capability($this->context, 'mod/booking:choose', $mainuserfields . ', u.id', 'u.lastname ASC, u.firstname ASC', '', '', '', '', true, true);\n\n foreach ($this->options as $option) {\n\n $count = $DB->get_record_sql('SELECT COUNT(*) AS count FROM {booking_answers} WHERE optionid = :optionid', array('optionid' => $option->id));\n $option->count = (int) $count->count;\n\n if (!$option->coursestarttime == 0) {\n $option->coursestarttimetext = userdate($option->coursestarttime, get_string('strftimedatetime'));\n } else {\n $option->coursestarttimetext = get_string(\"starttimenotset\", 'booking');\n }\n\n if (!$option->courseendtime == 0) {\n $option->courseendtimetext = userdate($option->courseendtime, get_string('strftimedatetime'), '', false);\n } else {\n $option->courseendtimetext = get_string(\"endtimenotset\", 'booking');\n }\n\n // we have to change $taken is different from booking_show_results\n $answerstocount = array();\n if ($answers) {\n foreach ($answers as $answer) {\n if ($answer->optionid == $option->id && isset($allresponses[$answer->userid])) {\n $answerstocount[] = $answer;\n }\n }\n }\n $taken = count($answerstocount);\n $totalavailable = $option->maxanswers + $option->maxoverbooking;\n if (!$option->limitanswers) {\n $option->status = \"available\";\n $option->taken = $taken;\n $option->availspaces = \"unlimited\";\n } else {\n if ($taken < $option->maxanswers) {\n $option->status = \"available\";\n $option->availspaces = $option->maxanswers - $taken;\n $option->taken = $taken;\n $option->availwaitspaces = $option->maxoverbooking;\n } elseif ($taken >= $option->maxanswers && $taken < $totalavailable) {\n $option->status = \"waitspaceavailable\";\n $option->availspaces = 0;\n $option->taken = $option->maxanswers;\n $option->availwaitspaces = $option->maxoverbooking - ($taken - $option->maxanswers);\n } elseif ($taken >= $totalavailable) {\n $option->status = \"full\";\n $option->availspaces = 0;\n $option->taken = $option->maxanswers;\n $option->availwaitspaces = 0;\n }\n }\n if (time() > $option->bookingclosingtime and $option->bookingclosingtime != 0) {\n $option->status = \"closed\";\n }\n if ($option->bookingclosingtime) {\n $option->bookingclosingtime = userdate($option->bookingclosingtime, get_string('strftimedate'), '', false);\n } else {\n $option->bookingclosingtime = false;\n }\n }\n }", "public function complete(){\n\t\t\n\t\t$this->completed = true;\n\t}", "function automatic_updates_complete( $results ) {\r\n\t\t$this->autoupdate_results = $results;\r\n\t}", "public function regularAppointmentAutoReminder()\r\n {\r\n $command = 'task:appointment:reminder:auto';\r\n $this->addRegularJob($command);\r\n }", "private function completeTask(Subscriber $user, Task $task, Request $request) {\n if (!$task->isRepeatable()) {\n $existingTaskCompletion = TaskCompletion::byTask($task->id)->bySubscriber($user->id)->first();\n if (!is_null($existingTaskCompletion)) {\n $user->load(\"tickets\");\n return;\n }\n }\n\n $extras = $request->input(\"data\")[\"extras\"];\n\n if ($task->type == \"twitter\") {\n $token = Crypt::decryptString(Cookie::get(\"twitter_token\"));\n $tokenSecret = Crypt::decryptString(Cookie::get(\"twitter_token_secret\"));\n\n Twitter::reconfig([ \"token\" => $token, \"secret\" => $tokenSecret ]);\n try {\n $response = Twitter::getCredentials([\"include_entities\" => 0, \"format\" => \"array\"]);\n $extras = array_merge($extras, $response);\n }catch(Exception $e) {}\n } else if ($task->type == \"linkedin\") {\n $token = Crypt::decryptString(Cookie::get(\"linkedin_token\"));\n $client = new Client([\n \"base_uri\" => \"https://api.linkedin.com/v2/\",\n \"headers\" => [\n \"X-Restli-Protocol-Version\" => \"2.0.0\",\n \"Accept\" => \"application/json\",\n \"Authorization\" => \"Bearer \" . $token,\n ]\n ]);\n $response = $client->get(\"me\");\n $json = json_decode($response->getBody(), true);\n $extras = array_merge($extras, $json);\n }\n\n $tc = TaskCompletion::create([\n \"subscriber_id\" => $user->id,\n \"task_id\" => $task->id,\n \"status\" => ($task->isAuto()) ? TaskCompletion::STATUS_COMPLETED : TaskCompletion::STATUS_INCOMPLETE,\n \"extras\" => json_encode($extras)\n ]);\n\n if ($task->isAuto()) {\n for ($i = 0; $i < $task->tickets; $i++) {\n Ticket::create([\n \"subscriber_id\" => $user->id,\n \"task_completions_id\" => $tc->id\n ]);\n }\n\n $user->load(\"tickets\");\n }\n }", "public function withCompletionStatus()\n {\n return $this->append(['required_fields', 'is_complete']);\n }", "public function addAction()\n\t{\t// TODO: add event to google calendars\t\n\t}", "public function complete()\n {\n $this->completed = true;\n }", "public function completeTodo($data) {\n foreach ($data as $id){\n }\n $query = $this->db->prepare('UPDATE `2dos` SET `complete` = 1 WHERE `id` = :id');\n $query->execute(['id'=> $id]);\n }", "public function regularAppointmentReminder()\r\n {\r\n $command = 'task:appointment:reminder';\r\n $this->addRegularJob($command);\r\n }", "public function indeedJobsAction()\n\t{\n\n\t}", "public function completeTodo($data) {\n\n $db = Database::getInstance();\n\n switch ($data['complete']) {\n case 'done':\n $stmt = $db->prepare('UPDATE todo SET done = 1 WHERE todo_id = :todo_id');\n $stmt->bindParam(':todo_id', $data['todo_id']);\n $stmt->execute();\n break;\n \n case 'notdone':\n $stmt = $db->prepare('UPDATE todo SET done = 0 WHERE todo_id = :todo_id');\n $stmt->bindParam(':todo_id', $data['todo_id']);\n $stmt->execute();\n break;\n }\n }", "public function markAsCompleted()\n {\n $this->fill([\n 'completed_at' => now(),\n ])->save();\n\n event(new ProjectStatusChanged($this));\n }", "public function add_completion_rules() {\n $mform = & $this->_form;\n $group = array();\n $group[] = $mform->createElement('checkbox', 'completionentriesenabled', '',\n get_string('completionentriescount', 'data'));\n $group[] = $mform->createElement('text', 'completionentries',\n get_string('completionentriescount', 'data'), array('size' => '1'));\n\n $mform->addGroup($group, 'completionentriesgroup', get_string('completionentries', 'data'),\n array(' '), false);\n $mform->disabledIf('completionentries', 'completionentriesenabled', 'notchecked');\n $mform->setDefault('completionentries', 1);\n $mform->setType('completionentries', PARAM_INT);\n /* This ensures the elements are disabled unless completion rules are enabled */\n return array('completionentriesgroup');\n }", "public function mark_referral_complete( $entry, $action ) {\n\n\t\t$this->complete_referral( $entry['id'] );\n\n\t\t$referral = affiliate_wp()->referrals->get_by( 'reference', $entry['id'], $this->context );\n\t\t$amount = affwp_currency_filter( affwp_format_amount( $referral->amount ) );\n\t\t$name = affiliate_wp()->affiliates->get_affiliate_name( $referral->affiliate_id );\n\t\t$note = sprintf( __( 'Referral #%1$d for %2$s recorded for %3$s (ID: %4$d).', 'affiliate-wp' ),\n\t\t\t$referral->referral_id,\n\t\t\t$amount,\n\t\t\t$name,\n\t\t\t$referral->affiliate_id\n\t\t);\n\n\t\tGFFormsModel::add_note( $entry[\"id\"], 0, 'AffiliateWP', $note );\n\n\t}", "public function test_methodsetsdefaultcompletiontime() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up PM course completion grade.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50));\n $pmcourse->save();\n\n // Set up Moodle course grade item.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Assign the user a Moodle coruse grade.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 40, 'timemodified' => 12345));\n $coursegradegrade->insert();\n\n // Run and validate when no learning objectives exist.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, null, 0);\n\n // Reset state and create learning objective.\n $DB->delete_records(\\student::TABLE);\n $this->create_course_completion();\n\n // Run and validation when a learning objective exists.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, null, 0);\n }", "public function data_postprocessing($data) {\n parent::data_postprocessing($data);\n if (!empty($data->completionunlocked)) {\n $autocompletion = !empty($data->completion) && $data->completion == COMPLETION_TRACKING_AUTOMATIC;\n if (empty($data->completionentriesenabled) || !$autocompletion) {\n $data->completionentries = 0;\n }\n }\n }", "private function markScheduleComplete()\n {\n $this->task->schedule()->update([\n 'is_processing' => false,\n 'last_run_at' => CarbonImmutable::now()->toDateTimeString(),\n ]);\n }", "public function completed_jobs()\r\n {\r\n \t\ttry\r\n\t\t{\r\n\t\t\t$this->left_menu\t=\t8;\r\n\t\t\t$this->data['breadcrumb'] = array(addslashes(t('Completed Jobs'))=>'');\t\r\n\t\t\t$this->data['pathtoclass']=$this->pathtoclass;\r\n\t\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->completed_jobs_pagination_ajax();\r\n\t\t\t$job_contents = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\t$this->data['job_contents'] = $job_contents;\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\tcatch(Exception $err_obj)\r\n\t\t{\r\n\t\t\tshow_error($err_obj->getMessage());\r\n\t\t}\t\r\n }", "public function moveToShortlistedCandidatesAction()\n {\n\t\t$params = $this->getRequest()->getParams();\n\t\t$result=\\Extended\\job_applications::changeCandidateStatus($params[\"profile_id\"], $params[\"job_id\"], \\Extended\\job_applications::SHORTLIST_CANDIDATE);\n \t$countCandidates = \\Extended\\job_applications::countCandidates($params[\"job_id\"]);\n\t\t$countApplicants = \\Extended\\job_applications::countApplicants($params[\"job_id\"]);\n\t\tif($result){\n\t\t\techo Zend_Json::encode(array(\"msg\"=>1, \"applicants\"=>$countApplicants, \"candidates\"=>$countCandidates));\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo Zend_Json::encode(array(\"msg\"=>0, \"applicants\"=>$countApplicants, \"candidates\"=>$countCandidates));\n\t\t}\n\t\tdie;\n }", "public function completedtask(Application $app, Request $request) \n\t{\n\t\t$AuthKey = $request->headers->get('AuthKey');\n\t\t$masteracc = $app['db.masteraccounts']->findMasteraccountOnAuthKey($AuthKey);\n\t\tif($masteracc != null){\n\n\t\t\t$subaccountIds = $request->get('subaccountsId');\n\t\t\t$playgroundId = $request->get('playgroundId');\n\t\t\t$taskid = $request->get('taskId');\n\t\t\t$data['Playgrounds_Id']= $playgroundId;\n\t\t\t$data['Tasks_Id']= $taskid;\n\n\t\t\tforeach ($subaccountIds as $value){\n\t\t\t\t$data['SubAccounts_Id']= $value;\n\t\t\t\t$done = $app['db.tasks']->insert($data);\n\t\t\t}\n\t\t\treturn new JsonResponse();\n\t\t}\n\t\treturn new JsonResponse(false);\n\n\t}", "public function complete_task()\n {\n // Assert task is strikethrough (tachado)\n // activate filter pending and test task is not seen\n }", "public function complete(Request $request)\n {\n\n $e = Encounter::where('pt_id', $request->encounter)->first();\n $e->ap01 = $request->finalInfo[15];\n $e->ap02 = $request->finalInfo[16];\n $e->ap03 = $request->finalInfo[17];\n $e->ap04 = $request->finalInfo[18];\n $e->ap05 = $request->finalInfo[19];\n $e->ap06 = $request->finalInfo[20];\n $e->ap07 = $request->finalInfo[21];\n $e->ap08 = $request->finalInfo[22];\n $e->ap09 = $request->finalInfo[23];\n $e->ap10 = $request->finalInfo[24];\n $e->ap11 = $request->finalInfo[25];\n $e->ap12 = $request->finalInfo[26];\n $e->ap13 = $request->finalInfo[27];\n $e->ap14 = $request->finalInfo[28];\n $e->ap15 = $request->finalInfo[29];\n $e->ap16 = $request->finalInfo[30];\n $e->ap17 = $request->finalInfo[31];\n $e->ap18 = $request->finalInfo[32];\n $e->ap19 = $request->finalInfo[33];\n $e->ap20 = $request->finalInfo[34];\n $e->complete = 1;\n if($e->save()){\n return \"saved\";\n }else {\n return \"failed\";\n }\n }", "public function test_methodsetscompletiontimefrommoodlegradeitemforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up required PM course grade.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50));\n $pmcourse->save();\n\n // Set up Moodle course grade item info.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Assign the user a grade in Moodle.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 100, 'timemodified' => 12345));\n $coursegradegrade->insert();\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 101, 'finalgrade' => 100, 'timemodified' => 12345));\n $coursegradegrade->insert();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, null, 12345);\n }", "protected function complete() {\n\t\tparent::complete();\n\n\t\t// Show notice to user or perform some other arbitrary task...\n\t}", "public function confirm_job_complete()\r\n\t{\t\t\r\n\t\tif($_POST)\r\n\t\t{\t\r\n\t\t\t$info = array();\r\n\t\t\t$i_job_id\t\t= decrypt(trim($this->input->post(\"i_job_id\")));\r\n\t\t\t$s_comment\t\t= trim($this->input->post(\"s_comment\"));\r\n\t\t\t$i_rating\t\t= trim($this->input->post(\"i_rating\"));\r\n\t\t\t$is_positive\t= trim($this->input->post(\"is_positive\"));\r\n\t\t\t\r\n\t\t\t$job_details = $this->job_model->fetch_this($i_job_id);\r\n\t\t\t//pr($job_details,1);\r\n\t\t\t$arr1 = array();\r\n\t\t\t$arr1['i_status'] = 6; // complete state\r\n\t\t\t$arr1['i_completed_date'] = time();\r\n\t\t\t$table = $this->db->JOBS;\t\t\t\r\n\t\t\t$i_newid = $this->job_model->set_data_update($table,$arr1,$i_job_id);\r\n\t\t\tunset($arr1,$table);\r\n\t\t\t\r\n\t\t\t$table = $this->db->JOBFEEDBACK;\r\n\t\t\t$arr1 = array();\r\n\t\t\t$arr1['i_job_id'] \t\t\t= $i_job_id;\r\n\t\t\t$arr1['i_sender_user_id'] \t= $this->user_id;\r\n\t\t\t$arr1['i_receiver_user_id'] = $job_details['i_tradesman_id'];\r\n\t\t\t$arr1['s_comments'] \t\t= $s_comment;\r\n\t\t\t$arr1['i_rating'] \t\t\t= $i_rating;\r\n\t\t\t$arr1['i_positive'] \t\t= $is_positive;\r\n\t\t\t$arr1['i_created_date'] \t= time();\r\n\t\t\t$arr1['i_status'] \t\t\t= 1;\r\n\t\t\t$this->job_model->set_data_insert($table,$arr1);\r\n\t\t\tunset($arr1,$table);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**************************** Send a notification to admin ************************/\r\n\t\t\t$admin_notification\t= array();\r\n\t\t\t$admin_notification['i_user_id'] \t\t\t= decrypt($this->data['loggedin']['user_id']);\r\n\t\t\t$admin_notification['i_user_type'] \t\t\t= 1;\r\n\t\t\t$admin_notification['dt_created_on'] \t\t= time();\r\n\t\t\t$admin_notification['i_notification_type'] \t= 7; \r\n\t\t\t$admin_notification['s_data1'] \t\t\t\t= $this->data['loggedin']['user_name'];\r\n\t\t\t$admin_notification['s_data2'] \t\t\t\t= $job_details['s_title'];\r\n\t\t\t$admin_notification['s_data3'] \t\t\t\t= date($this->config->item('notification_date_format')) ;\r\n\t\t\t$admin_notification['i_is_read'] \t\t\t= 0;\r\n\t\t\t\r\n\t\t\t$a_tablename = $this->db->ADMIN_NOTIFICATIONS; \r\n\t\t\t$this->load->model('common_model');\r\n\t\t\t$i_notify = $this->common_model->common_add_info($a_tablename, $admin_notification);\r\n\t\t\tunset($admin_notification,$a_tablename,$i_notify);\r\n\t\t\t/**************************** End Send a notification to admin ************************/\t\t\t\r\n\t\t\t\r\n\t\t\t/*************** calcution for update tradesman details table *****************/\r\n\t\t\t$this->load->model('manage_feedback_model','mod_feed');\t\r\n\t\t\t/**Accepted feedback*/\r\n\t\t\t$s_where = \" WHERE i_receiver_user_id ={$job_details['i_tradesman_id']} AND n.i_status=1 \"; \r\n\t\t\t$tot_accepted_feedback = $this->mod_feed->gettotal_info($s_where);\r\n\t\t\t/**Total feelback*/\r\n\t\t\t$s_where \t\t= \" WHERE i_receiver_user_id ={$job_details['i_tradesman_id']} AND n.i_status !=0 \"; \t\t\t\r\n\t\t\t$tot_feedback \t= $this->mod_feed->gettotal_info($s_where);\r\n\t\t\t\r\n\t\t\t$s_where \t\t= \" WHERE i_receiver_user_id ={$job_details['i_tradesman_id']} AND n.i_status !=0\";\t\t\t\r\n\t\t\t$feedback_details = $this->mod_feed->fetch_feedback_rating($s_where);\r\n\t\t\t\r\n\t\t\t$s_where = \" WHERE i_receiver_user_id ={$job_details['i_tradesman_id']} AND n.i_status !=0 AND n.i_positive=1\" ;\r\n\t\t\t$i_positive \t= $this->mod_feed->fetch_feedback_positive($s_where);\r\n\t\t\t\r\n\t\t\t$info = array();\r\n\t\t\t$info['i_feedback_rating'] = $feedback_details['i_rating'];\r\n\t\t\t$info['f_positive_feedback_percentage'] = ($tot_feedback!=0)?round(($i_positive['i_positive']/$tot_feedback)*100):0;\r\n\t\t\t//$info['i_jobs_won'] = $tot_accepted_feedback;\r\n\t\t\t$info['i_feedback_received'] = $tot_feedback;\r\n\t\t\t$table = $this->db->TRADESMANDETAILS;\r\n\t\t\t$cond = array('i_user_id'=>$job_details['i_tradesman_id']);\r\n\t\t\t//exit;\r\n\t\t\t$this->job_model->set_data_update($table,$info,$cond);\r\n\t\t\t/****************** end of calcution for update tradesman details table *****************/\t\t\r\n\t\t\t//$i_newid = true;\r\n\t\t\t\r\n\t\t\t/* start update job history table and change status of the job */\r\n\t\t\tif($i_newid)\r\n\t\t\t{\r\n\t\t\t\t/* insert data to job history and stattus change*/\r\n\t\t\t\t$arr1 = array();\r\n\t\t\t\t$arr1['i_job_id'] = $i_job_id;\r\n\t\t\t\t$arr1['i_user_id'] = $this->user_id;\r\n\t\t\t\t$arr1['s_message'] = 'job_feedback';\r\n\t\t\t\t$arr1['i_created_date'] = time();\r\n\t\t\t\t$table = $this->db->JOB_HISTORY;\r\n\t\t\t\t$this->job_model->set_data_insert($table,$arr1);\t\r\n\t\t\t\t/*============*/\r\n\t\t\t\t$arr2 = array();\r\n\t\t\t\t$arr2['i_job_id'] = $i_job_id;\r\n\t\t\t\t$arr2['i_user_id'] = $this->user_id;\r\n\t\t\t\t$arr2['s_status'] = 'Completed';\r\n\t\t\t\t$arr2['i_created_date'] = time();\r\n\t\t\t\t$s_table = $this->db->JOB_STATUS_HISTORY;\r\n\t\t\t\t$this->job_model->set_data_insert($s_table,$arr2);\t\r\n\t\t\t\tunset($s_table,$arr2);\r\n\t\t\t\t/* end */\t\r\n\t\t\t\t\r\n\t\t\t\t$tradesman_details = $this->mod_td->fetch_tradesman_details($job_details['i_tradesman_id']);\r\n\t\t\t\t$s_wh_id = \" WHERE n.i_user_id=\".$job_details['i_tradesman_id'].\" \";\r\n\t\t\t $buyer_email_key = $this->mod_buyer->fetch_email_keys($s_wh_id);\r\n\t\t\t\t$is_mail_need \t = in_array('buyer_provided_feedback',$buyer_email_key);\r\n\t\t\t\tif($is_mail_need)\r\n\t\t\t {\r\n\t\t\t\t $this->load->model('auto_mail_model');\r\n\t\t\t\t $content = $this->auto_mail_model->fetch_mail_content('buyer_provided_feedback','tradesman',$tradesman_details['lang_prefix']);\t\r\n\t\t\t\t $filename \t= $this->config->item('EMAILBODYHTML').\"common.html\";\r\n\t\t\t\t $handle \t= @fopen($filename, \"r\");\r\n\t\t\t\t $mail_html\t= @fread($handle, filesize($filename));\r\n\t\t\t\t $s_subject\t=\t$content['s_subject'];\r\n\t\t\t\t if(!empty($content))\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$description = $content[\"s_content\"];\r\n\t\t\t\t\t\t$description = str_replace(\"[BUYER_NAME]\",$job_details['s_buyer_name'],$description);\r\n\t\t\t\t\t\t$description = str_replace(\"[JOB_TITLE]\",$job_details['s_title'],$description);\t\r\n\t\t\t\t\t\t$description = str_replace(\"[TRADESMAN_NAME]\",$job_details['s_tradesman_name'],$description);\t\r\n\t\t\t\t\t\t$description = str_replace(\"[LOGIN_URL]\",base_url().'user/login/TVNOaFkzVT0',$description);\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tunset($content);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$mail_html = str_replace(\"[SITE_URL]\",base_url(),$mail_html);\t\r\n\t\t\t\t\t$mail_html = str_replace(\"[##MAIL_BODY##]\",$description,$mail_html);\t\t\t\t\t\t\r\n\t\t\t\t\t//echo \"<br>\".$mail_html;\texit;\r\n\t\t\t\t\t/// Mailing code...[start]\r\n\t\t\t\t\t$site_admin_email = $this->s_admin_email;\t\r\n\t\t\t\t\t$this->load->helper('mail');\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$i_newid = sendMail($tradesman_details['s_email'],$s_subject,$mail_html);\t\r\n /// Mailing code...[end]\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$msg = '1|'.$this->cls_msg[\"job_complete\"];\r\n\t\t\t}\r\n\t\t\t/* end update job history table and change status of the job */\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$msg = '2|'.$this->cls_msg[\"job_incomplete\"];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t\t\t\r\n\t\techo $msg;\t\t\t\r\n\t\r\n\t}", "public function addTask()\n\t{\n\t\t$this->editTask();\n\t}", "public function actionComplete($id) {\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\t$inGroup = false;\n\t\tif(is_numeric($model->assignedTo)) { // we have an action assigned to a group, check if we are in the group\n\t\t\t$inGroup = Groups::inGroup(Yii::app()->user->id, $model->assignedTo);\n\t\t}\n\t\t\n\t\tif(Yii::app()->user->getName()==$model->assignedTo || $model->assignedTo=='Anyone' || $model->assignedTo==\"\" || $inGroup || Yii::app()->user->checkAccess('AdminIndex')) {\n\t\t\t\n\t\t\tif(isset($_POST['note']) && !empty($_POST['note']))\n\t\t\t\t$model->actionDescription = $model->actionDescription.\"\\n\\n\".$_POST['note'];\n\t\t\t\t\n\t\t\t// $model = $this->updateChangelog($model,'Completed');\n\t\t\t$model->complete();\n\t\t\t\n\t\t\t// Actions::completeAction($id);\n\t\t\t// $this->completeNotification('admin',$model->id);\n\t\t\t\n\t\t\t$createNew = isset($_GET['createNew']) || ((isset($_POST['submit']) && ($_POST['submit']=='completeNew')));\n\t\t\t$redirect = isset($_GET['redirect']) || $createNew;\n\t\t\t\n\t\t\tif($redirect) {\n\t\t\t\tif($model->associationType!='none' && !$createNew) {\t// if the action has an association\n\t\t\t\t\t$this->redirect(array('/'.$model->associationType.'/'.$model->associationType.'/view','id'=>$model->associationId));\t// go back to the association\n\t\t\t\t} else {\t// no association\n\t\t\t\t\tif($createNew)\n\t\t\t\t\t\t$this->redirect(array('/actions/create'));\t\t// go to blank 'create action' page\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->redirect(array('/actions/'.$model->id));\t// view the action\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->redirect(array('/actions/'.$model->id)); \n\t\t\t}\n\t\t} else {\n\t\t\t$this->redirect(array('/actions/invalid'));\n\t\t}\n\t}", "public function completeWork(): void\n {\n }", "function markIncomplete() {\n\n\t\t$this->DB->begin();\n\n\t //mark task incomplete\n\t $opt = null;\n\t $opt[\"completed\"] = \"f\";\n\t $opt[\"where\"] = \"id='\".$this->taskId.\"'\";\n\t\t$opt[\"modified_date\"] = date(\"Y-m-d H:i:s\");\n\t\t$opt[\"modified_by\"] = USER_ID;\n\t $this->DB->update(\"task.task\",$opt);\n\n\t $this->DB->end();\n\n\t}", "public function withCompletionInfo()\n {\n return $this->append(['required_fields', 'total_fields', 'filled_fields', 'empty_fields', 'completion_percentage', 'is_complete']);\n }", "private function __complete ()\n\t{\n\t\t$toComplete = array ( 'subject' , 'content' , 'from' , 'return' , 'receipt' , 'replyTo' , 'cc' , 'bcc' , 'charset' , 'sendAs' , 'useCache' , 'database_template' , 'template' ) ;\n\t\tforeach ( $toComplete as $varname )\n\t\t{\n\t\t\tif ( empty ( $this->__current[$varname] ) && property_exists ( $this , $varname ) && ( !is_null ( $this->$varname ) || !empty ( $this->$varname ) ) )\n\t\t\t{\n\t\t\t\t$this->__current[$varname] = $this->$varname ;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( empty ( $this->__current['replyTo'] ) && !empty ( $this->__current['from'] ) )\n\t\t{\n\t\t\t$this->__current['replyTo'] = $this->__current['from'] ;\n\t\t}\n\t}", "public static function delete_at_submission_complete( $id ){\n\t\tself::$delete_at_submission_complete[] = $id ;\n\t}", "private function get_completetask_list(){\n $user_id = $this->_request['user_id'];\n \n \n if(empty($user_id))\n {\n \n $result['status'] = '0';\n $result['message']=\"Invalid data provided!\";\n $this->response($this->json($result), 200);\n }\n \n $user= mysql_query(\"select * from users where id='\".$user_id.\"'\");\n $row = mysql_fetch_assoc($user);\n $manager = $row['is_manager'];\n $company_id = $row['UserCompanyID'];\n $supervisor = $row['supervisor'];\n if($supervisor==1 && $manager==3){\n $sql=mysql_query('select T.*, U.username, UA.username as AssignUserName, D.department_name,ta.ActivityName,th.HeadName , TIMEDIFF(DATE_FORMAT(T.TaskEndTime,\"%H:%i:%s A\"), DATE_FORMAT(T.TaskStartTime,\"%H:%i:%s A\")) as timediffrence, TIMEDIFF(\"19:00:00\", DATE_FORMAT(T.TaskStartTime,\"%H:%i:%s A\")) as starttime ,TIMEDIFF(DATE_FORMAT(T.TaskEndTime,\"%H:%i:%s A\"),\"10:00:00\" ) as endtime , DATEDIFF(T.TaskEndDate, T.TaskStartDate) as daystotal from tbl_tasks T, users U, users UA, tbl_department D , tbl_activities ta, tbl_heads th , tbl_supervisor s where T.TaskCreatedByUserID=U.id and T.TaskAssignToUserID=UA.id and T.TaskDepartmentID=D.id and T.TaskActivityID=ta.ActivityID and T.TaskHeadID=th.HeadID and T.TaskStatus=5 and T.Deleted=1 and T.TaskCreatedByUserID=s.supervisor_id and s.supervisor_id=\"'.$user_id.'\" order by T.TaskID DESC', $this->db)or die(mysql_error()); \n }\n else{\n $sql=mysql_query('select T.*, U.username, UA.username as AssignUserName, D.department_name,ta.ActivityName,th.HeadName , TIMEDIFF(DATE_FORMAT(T.TaskEndTime,\"%H:%i:%s A\"), DATE_FORMAT(T.TaskStartTime,\"%H:%i:%s A\")) as timediffrence, TIMEDIFF(\"19:00:00\", DATE_FORMAT(T.TaskStartTime,\"%H:%i:%s A\")) as starttime ,TIMEDIFF(DATE_FORMAT(T.TaskEndTime,\"%H:%i:%s A\"),\"10:00:00\" ) as endtime , DATEDIFF(T.TaskEndDate, T.TaskStartDate) as daystotal from tbl_tasks T, users U, users UA, tbl_department D , tbl_activities ta, tbl_heads th where T.TaskCreatedByUserID=U.id and T.TaskAssignToUserID=UA.id and T.TaskDepartmentID=D.id and T.TaskActivityID=ta.ActivityID and T.TaskHeadID=th.HeadID and T.TaskStatus=5 and T.Deleted=1 and T.TaskDepartmentID IN (select DepartmentID from tbl_departmentemploy where EmployID=\"'.$user_id.'\") order by T.TaskID DESC', $this->db)or die(mysql_error()); \n }\n \n $result = array();\n $i=0;\n if(mysql_num_rows($sql) == 0){\n \n $result['status'] = '0';\n $result['message']=\"Not found\";\n $this->response($this->json($result), 200);\n }\n else\n {\n while ($rlt = mysql_fetch_array($sql, MYSQL_ASSOC)){\n \n $result[$i]['CreatedByUsername'] = $rlt['username'];\n $result[$i]['AssignToUsername'] = $rlt['AssignUserName'];\n $result[$i]['TaskID'] = $rlt['TaskID'];\n $result[$i]['TaskDepartmentID'] = $rlt['TaskDepartmentID'];\n $result[$i]['DepartmentName'] = $rlt['department_name'];\n $result[$i]['TaskHeadID'] = $rlt['TaskHeadID'];\n $result[$i]['TaskHeadName'] = $rlt['HeadName'];\n $result[$i]['TaskActivityID'] = $rlt['TaskActivityID'];\n $result[$i]['TaskActivityName'] = $rlt['ActivityName'];\n $result[$i]['TaskName'] = stripslashes($rlt['TaskName']);\n $result[$i]['TaskType'] = $rlt['TaskType']; // 0 for fix and 1 for flexy\n $result[$i]['TaskCategory'] = $rlt['TaskCategory']; // 0 for routine and 1 for nonroutine\n $result[$i]['TaskCreatedByUserID'] = $rlt['TaskCreatedByUserID'];\n $result[$i]['TaskAssignToUserID'] = $rlt['TaskAssignToUserID'];\n $result[$i]['TaskStartDate'] = $rlt['TaskStartDate'];\n $result[$i]['TaskEndDate'] = $rlt['TaskEndDate'];\n $result[$i]['TaskStartTime'] = $rlt['TaskStartTime'];\n $result[$i]['TaskEndTime'] = $rlt['TaskEndTime'];\n $result[$i]['TaskDescription'] = stripslashes($rlt['TaskDescription']);\n $result[$i]['TaskEmployeeRemark'] = stripslashes($rlt['TaskEmployeeRemark']);\n $result[$i]['TaskManagerRemark'] = stripslashes($rlt['TaskManagerRemark']);\n $result[$i]['TaskTimeAlloted'] = $rlt['TaskTimeAlloted'];\n $result[$i]['TaskCreatedAt'] = $rlt['TaskCreatedAt'];\n $result[$i]['TaskStatus'] = $rlt['TaskStatus'];\n $result[$i]['Priority'] = $rlt['priority'];\n $result[$i]['TaskAttachment'] = $rlt['TaskAttachment'];\n if($rlt['daystotal']==0){\n $result[$i]['Durring'] = $rlt['timediffrence']+0;\n }else{\n $result[$i]['Durring'] =($rlt['starttime']+$rlt['endtime']+($rlt['daystotal']*8)-8);\n }\n $i++; // 1 - pending approval, 2- Pending , 3 - In Progress ,4 - Waiting for Completetion, 5 - Complete\n }\n $this->response($this->json(array('message'=>'data found','status'=>'1','data'=>$result)), 200);\n }\n\n\n }", "public function addUpdatejob(array $job)\n {\n }", "public function completeJob(Request $request)\n {\n $user = JWTAuth::parseToken()->authenticate();\n if ('customer' == $user->usertype) {\n return response()->json(['message' => 'You must be agent', 'data' => null, 'response_code' => 0], 200);\n }\n $validator = Validator::make($request->all(), [\n 'jobid' => 'required',\n ]);\n if ($validator->fails()) {\n return response()->json(['message' => 'Some fields missing', 'data' => $validator->errors(), 'response_code' => 0], 200);\n }\n\n try {\n $job = JobsModel::where('id', '=', $request->jobid)->first();\n $job->job_status = 1;\n $job->update();\n $ajob = AssignJob::where(['job_id' => $job->id, 'agent_id' => $user->id])->get()->first();\n $ajob->jobstatus = 4;\n $ajob->update();\n\n return response()->json(['message' => 'Complete this job success', 'response_code' => 1], 200);\n } catch (\\Exception $exception) {\n return response()->json(['message' => 'Server Error', 'response_code' => 0], 500);\n }\n\n return response()->json(['message' => 'Some fields missing', 'response_code' => 0], 200);\n }", "public static function addAdditionalSubItemInformation(array &$a_item)\r\n\t{\r\n\t\tglobal $ilUser;\r\n\t\t\r\n\t\t$item = self::getItem($a_item['ref_id']);\r\n\t\t\r\n\t\t$a_item['obj_id'] = ($a_item['obj_id'] > 0)\r\n\t\t\t? $a_item['obj_id']\r\n\t\t\t: ilObject::_lookupObjId($a_item['ref_id']);\r\n\t\t$a_item['type'] = ($a_item['type'] != '')\r\n\t\t\t? $a_item['type']\r\n\t\t\t: ilObject::_lookupType($a_item['obj_id']);\r\n\t\t\r\n\t\t$a_item['timing_type'] = $item['timing_type'];\r\n\t\t\r\n\t\t// #7359 - session sorting should always base on appointment date\r\n\t\tif($a_item['type'] == 'sess')\r\n\t\t{\r\n\t\t\tinclude_once('./Modules/Session/classes/class.ilSessionAppointment.php');\r\n\t\t\t$info = ilSessionAppointment::_lookupAppointment($a_item['obj_id']);\r\n\r\n\t\t\t$a_item['start'] = $info['start'];\r\n\t\t\t$a_item['end'] = $info['end'];\r\n\t\t\t$a_item['activation_info'] = 'crs_timings_suggested_info';\r\n\t\t}\t\t \r\n\t\telseif($item['changeable'] && \r\n\t\t\t$item['timing_type'] == self::TIMINGS_PRESETTING)\r\n\t\t{\r\n\t\t\tinclude_once 'Modules/Course/classes/Timings/class.ilTimingPlaned.php';\r\n\t\t\t$user_data = ilTimingPlaned::_getPlanedTimings($ilUser->getId(), $a_item['ref_id']);\t\t\t\r\n\t\t\tif($user_data['planed_start'])\r\n\t\t\t{\r\n\t\t\t\t$a_item['start'] = $user_data['planed_start'];\r\n\t\t\t\t$a_item['end'] = $user_data['planed_end'];\r\n\t\t\t\t$a_item['activation_info'] = 'crs_timings_planed_info';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$a_item['start'] = $item['suggestion_start'];\r\n\t\t\t\t$a_item['end'] = $item['suggestion_end'];\r\n\t\t\t\t$a_item['activation_info'] = 'crs_timings_suggested_info';\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif($item['timing_type'] == self::TIMINGS_PRESETTING)\r\n\t\t{\r\n\t\t\t$a_item['start'] = $item['suggestion_start'];\r\n\t\t\t$a_item['end'] = $item['suggestion_end'];\r\n\t\t\t$a_item['activation_info'] = 'crs_timings_suggested_info';\r\n\t\t}\r\n\t\telseif($item['timing_type'] == self::TIMINGS_ACTIVATION)\r\n\t\t{\r\n\t\t\t$a_item['start'] = $item['timing_start'];\r\n\t\t\t$a_item['end'] = $item['timing_end'];\r\n\t\t\t$a_item['activation_info'] = 'activation';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$a_item['start'] = 'abc';\r\n\t\t}\t\t\t\t\r\n\t}", "function appendSkill(&$bean, $event, $arguments) \n\t{\n\t\tglobal $db, $current_user,$app_list_strings,$sugar_config;\n\t\t$id = $bean->id;\n\t\t$typeHiring = $bean->type_hiring;\n\t\t$keySkills = $bean->keyskill_list;\n\t\t$assignedUserId= $bean->assigned_user_id;\n\t\t/* Adding the condition for not updating the keyskills for the candidates which are created from portals */\n\t\tif($id && $assignedUserId!='1') {\n\t\t\tif($typeHiring =='Us_staffing')\t{\n\t\t\t\t$keyList = 'keyskill_list';\n\t\t\t\t$appKeyList = $app_list_strings['keyskill_list'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$keyList = 'solutions_keyskills';\n\t\t\t\t$appKeyList = $app_list_strings['solutions_keyskills'];\n\t\t\t}\t\n\t\t\t\n\t\t\tif(strpos($keySkills, \",\"))\t{\n\t\t\t\t$keySkills=explode(\",\",$keySkills);\n\t\t\t\t$totalKeySkills = $appKeyList;\n\t\t\t\t//Comparing keyskills\n\t\t\t\t$matchedKeySkills = array_uintersect($totalKeySkills, $keySkills, 'strcasecmp');\n\t\t\t\t$unmatchedKeySkills = array_udiff($keySkills, array_keys($totalKeySkills), 'strcasecmp');\n\t\t\t\t$matchedArrayValues = array_values($matchedKeySkills);\n\t\t\t\tforeach($matchedArrayValues as $k => $v) {\n\t\t\t\t\t$matchedKeySkillValues[] = $totalKeySkills[$v];\n\t\t\t\t}\n\t\t\t\tif($matchedKeySkillValues){}\n\t\t\t\tif($unmatchedKeySkills)\t{\n\t\t\t\t\t$keySkillList = array_map('ucwords', $unmatchedKeySkills);\n\t\t\t\t\t$parser = new ParserDropDown();\n\t\t\t\t\t$params = array();\n\t\t\t\t\t$_REQUEST['view_package'] = 'studio'; //need this in parser.dropdown.php\n\t\t\t\t\t$params['view_package'] = 'studio';\n\t\t\t\t\t$params['dropdown_name'] = $keyList; //replace with the dropdown name\n\t\t\t\t\t$params['dropdown_lang'] = 'en_us';\n\t\t\t\t\t$params['use_push']=true;\n\t\t\t\t\t//create your list...substitute with db query as needed\n\t\t\t\t\t$properties['options'] = 'keyskill_list'; \n\t\t\t\t\tforeach (array_merge($appKeyList,$keySkillList) as $k=>$v) { \n\t\t\t\t\t\t//merge new and old values\n\t\t\t\t\t\t$dropList[] = array($v,$v);\n\t\t\t\t\t}\n\t\t\t\t\t$json = getJSONobj();\n\t\t\t\t\t$params['list_value'] = $json->encode($dropList);\n\t\t\t\t\t$parser->saveDropDown($params);\n\t\t\t\t}\n\t\t\t\t$oldKeySkills = $bean->fetched_row['keyskill_list'];\n\t\t\t\t$combinedKeySkills = array_merge((array)$matchedKeySkillValues,(array)$keySkillList);\t\t\t\n\t\t\t\t$combinedKeySkills = implode(',',$combinedKeySkills);\n\t\t\t\t$keySkills = str_replace(',','^,^',$combinedKeySkills);\n\t\t\t\t$keySkillList = '^'.$keySkills.'^';\n\t\t\t\t//Query to update the keyskills in the database\n\t\t\t\t$updateQuery = 'UPDATE vedic_candidates \n\t\t\t\t\t\t\t\t\tSET keyskill_list = \"'.$keySkillList.'\" \n\t\t\t\t\t\t\t\t\tWHERE id = \"'.$id.'\" \n\t\t\t\t\t\t\t\t\tAND deleted=0';\n\t\t\t\t$result = $db->query($updateQuery);\n\t\t\t\t$this->auditKeySkill($combinedKeySkills,$oldKeySkills,$id);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$keySkillList = strtoupper($keySkills);\n\t\t\t\t$oldKeySkills = $bean->fetched_row['keyskill_list'];\n\t\t\t\t$totalKeySkills = $appKeyList;\n\t\t\t\t$totalKeySkills= array_change_key_case($totalKeySkills,CASE_UPPER);\n\t\t\t\t$totalKeySkillsKeys= array_keys($totalKeySkills);\n\t\t\t\tif(in_array($keySkillList,$totalKeySkillsKeys))\t{\n\t\t\t\t\t$keySkillList = $totalKeySkills[$keySkillList];\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\t\t\n\t\t\t\t\t$keySkillList= ucwords($keySkills);\n\t\t\t\t\t$parser = new ParserDropDown();\n\t\t\t\t\t$params = array();\n\t\t\t\t\t$_REQUEST['view_package'] = 'studio'; //need this in parser.dropdown.php\n\t\t\t\t\t$params['view_package'] = 'studio';\n\t\t\t\t\t$params['dropdown_name'] = $keyList; //replace with the dropdown name\n\t\t\t\t\t$params['dropdown_lang'] = 'en_us';\n\t\t\t\t\t$params['use_push']=true;\n\t\t\t\t\t//create your list...substitute with db query as needed\n\t\t\t\t\t$properties['options'] = 'keyskill_list'; \n\t\t\t\t\tforeach (array_merge($appKeyList,(array)$keySkillList) as $k=>$v) { \n\t\t\t\t\t\t//merge new and old values\n\t\t\t\t\t\t$dropList[] = array($v,$v);\n\t\t\t\t\t}\n\t\t\t\t\t$json = getJSONobj();\n\t\t\t\t\t$params['list_value'] = $json->encode($dropList);\n\t\t\t\t\t$parser->saveDropDown($params);\t\n\t\t\t\t\t$keySkillList= '^'.$keySkillList.'^';\n\t\t\t\t}\n\t\t\t\t//Query to update the keyskills in the database\n\t\t\t\t$updateQuery = 'UPDATE vedic_candidates \n\t\t\t\t\t\t\t\t\tSET keyskill_list = \"'.$keySkillList.'\" \n\t\t\t\t\t\t\t\t\tWHERE id = \"'.$id.'\" \n\t\t\t\t\t\t\t\t\tAND deleted=0';\n\t\t\t\t$result = $db->query($updateQuery);\n\t\t\t\t$this->auditKeySkill($keySkillList,$oldKeySkills,$id);\n\t\t\t}\t\n\t\t}\t\t\n\t}", "public function test_it_should_complete_a_task_and_change_status_to_completed()\n {\n $payload = [\n 'description' => mt_rand()\n ];\n $response = $this->client->post('/task',null,json_encode($payload))->send();\n $createdResource = json_decode($response->getBody(true),true);\n\n /**\n * Change to completed\n */\n $this->client->patch('/task/'.$createdResource['id'].'/complete')->send();\n\n /**\n * retrieve task list\n */\n $response = $this->client->get('/tasks')->send();\n\n $list = json_decode($response->getBody(true),true);\n $this->assertNotEmpty($list);\n $this->assertTrue($list[0]['is_completed']);\n }", "public function complete();", "public function complete();", "public function markAsCompleted()\n {\n if (!$this->completed_at) {\n return tap($this->update(['completed_at' => now()]), function () {\n event(new TaskStatusChanged($this));\n });\n }\n }", "public function addAppointment($data = null){\n\t\t\t$timeSlots = $this->SplitTime('09:00 AM', '05:00 PM', 60);\n\t\t\t// $day = Carbon::now();\n\t\t\t$day = Carbon::now()->addDays(1);\n\t\t\t$this->checkTimeAvailability($day, $timeSlots, $data);\n\n\t\t}", "public function add_appointment($args) {\n global $wpdb;\n $datetime_now = date('Y-m-d') . 'T' . date('H:m:i') . 'Z';\n $defaults = array(\n 'beginning' => $datetime_now,\n 'end' => $datetime_now,\n 'full_day' => FALSE,\n 'title' => 'title',\n 'description' => '',\n 'location' => '',\n 'category' => '0'\n );\n\n $args = wp_parse_args($args, $defaults);\n return $wpdb -> insert($this -> tableDatesName, $args);\n }", "function pistol_auto_complete_order($orderID) {\n \n if(!$orderID) return;\n \n // Get order\n $order = wc_get_order($orderID);\n \n // Update order to completed status\n if($order) {\n $order->update_status('completed');\n }\n \n }", "function hm_user_applied_job(){\n\n\t$data = get_results(\"SELECT a.*, b.applied_on, b.is_shortlisted, b.shortlisted_on FROM `jobs` as a LEft join job_applicants as b on a.id = b.job_id WHERE b.user_id = \".$_POST['user_id'].\" order by b.applied_on asc\");\n\n\t$newdata = [];\n\n\tforeach ($data as $key => $value) {\n\t\t$value['company_name'] = get_meta('users', $value['posted_by'], 'company_name');\n\t\t$arr = array('industry', 'career_level', 'qualification', 'job_level', 'keywords', 'location');\n\n\n\n\t\tforeach ($arr as $key => $val) {\n\n\t\t\t$value[$val] = get_relative_data('jobs', $val, $value['id']);\n\n\t\t}\n\n\t\t$newdata[] = $value;\n\t}\n\n\treturn array('status' => 'Success', 'data' => $newdata);\n\n}", "public function completeEarly()\n {\n $this->shouldCompleteEarly = true;\n }", "static function addAppointment(RowUpdate &$contact_upd, $data, $account_id) {\n \tglobal $timedate;\n $app_upd = RowUpdate::for_model($data['model']);\n $app_upd->loadBlankRecord();\n\n $data['direction'] = 'Outbound';\n $data['status'] = 'Planned';\n $data['duration'] = 60;\n $data['assigned_user_id'] = AppConfig::current_user_id();\n $data['date_start'] = $timedate->to_db($data['date_start']);\n\n if ($account_id) {\n $data['parent_type'] = 'Accounts';\n $data['parent_id'] = $account_id;\n } else {\n $data['parent_type'] = 'Contacts';\n $data['parent_id'] = $contact_upd->getPrimaryKeyValue();\n }\n\n $app_upd->set($data);\n\n\t\tif (! $app_upd->validate()) {\n\t\t\t$GLOBALS['log']->error('appointment validate failed');\n\t\t\t$GLOBALS['log']->error($app_upd->errors);\n\t\t\treturn null;\n\t\t}\n if ($app_upd->save()) {\n \t$app_upd->addUpdateLink('users', array('id' => $data['assigned_user_id'], 'accept_status' => 'accept'));\n $app_upd->addUpdateLink('contacts', $contact_upd->getPrimaryKeyValue());\n \n return $app_upd->getPrimaryKeyValue();\n }\n\n return null;\n }", "private function isRequestedTodo($data) {\n //completion status\n $condition1 = $data['completed'] === 'all' //all\n || $data['completed'] === $data['checked']; //yes or no\n\n // resolve placeholder in assignees\n $requestedassignees = array();\n if(is_array($data['assigned'])) {\n $requestedassignees = array_map( array($this,\"__todolistExpandAssignees\"), $data['assigned'] );\n }\n //assigned\n $condition2 = $data['assigned'] === 'all' //all\n || (is_bool($data['assigned']) && $data['assigned'] == $data['todouser']); //yes or no\n\n if (!$condition2 && is_array($data['assigned']) && is_array($data['todousers']))\n foreach($data['todousers'] as $todouser) {\n if(in_array($todouser, $requestedassignees)) { $condition2 = true; break; }\n }\n\n //completed by\n if($condition2 && is_array($data['completeduserlist']))\n $condition2 = in_array($data['completeduser'], $data['completeduserlist']);\n\n //compare start/due dates\n if($condition1 && $condition2) {\n $condition3s = true; $condition3d = true;\n if(isset($data['startbefore']) || isset($data['startafter']) || isset($data['startat'])) {\n if(is_object($data['start'])) {\n if($data['startignore'] != '!') {\n if(isset($data['startbefore'])) { $condition3s = $condition3s && new DateTime($data['startbefore']) > $data['start']; }\n if(isset($data['startafter'])) { $condition3s = $condition3s && new DateTime($data['startafter']) < $data['start']; }\n if(isset($data['startat'])) { $condition3s = $condition3s && new DateTime($data['startat']) == $data['start']; }\n }\n } else {\n if(!$data['startignore'] == '*') { $condition3s = false; }\n if($data['startignore'] == '!') { $condition3s = false; }\n }\n }\n\n if(isset($data['duebefore']) || isset($data['dueafter']) || isset($data['dueat'])) {\n if(is_object($data['due'])) {\n if($data['dueignore'] != '!') {\n if(isset($data['duebefore'])) { $condition3d = $condition3d && new DateTime($data['duebefore']) > $data['due']; }\n if(isset($data['dueafter'])) { $condition3d = $condition3d && new DateTime($data['dueafter']) < $data['due']; }\n if(isset($data['dueat'])) { $condition3d = $condition3d && new DateTime($data['dueat']) == $data['due']; }\n }\n } else {\n if(!$data['dueignore'] == '*') { $condition3d = false; }\n if($data['dueignore'] == '!') { $condition3d = false; }\n }\n }\n $condition3 = $condition3s && $condition3d;\n }\n\n // compare completed date\n $condition4 = true;\n if(isset($data['completedbefore'])) {\n $condition4 = $condition4 && new DateTime($data['completedbefore']) > $data['completeddate'];\n }\n if(isset($data['completedafter'])) {\n $condition4 = $condition4 && new DateTime($data['completedafter']) < $data['completeddate'];\n }\n if(isset($data['completedat'])) {\n $condition4 = $condition4 && new DateTime($data['completedat']) == $data['completeddate'];\n }\n\n return $condition1 AND $condition2 AND $condition3 AND $condition4;\n }", "public function campaign_completion_by_impression() {\n print \"<pre>\";\n\n $this->load->model(\"V2_master_campaign_model\");\n $this->load->model('V2_campaign_cost_model');\n $this->load->model('V2_network_model');\n $this->load->model('V2_users_model');\n\n $active_campaigns = $this->V2_master_campaign_model->get_active_campaigns_impressions_cost();\n\n if ($active_campaigns) {\n foreach($active_campaigns as $c) {\n $_CAMPAIGN_ACTIVE = false;\n $_CAMPAIGN_IMPRESSION_MAXED = false;\n\n if ($c['campaign_status'] == \"COMPLETE\") {\n print \"COMPLETE: {$c['id']} - {$c['name']}\\n\";\n continue;\n }\n\n print_r($c);\n // do stuff here\n }\n }\n }", "function student_application_completed_action(&$student_application, $context) {\n\n}", "public function test_methodsetsdefaultcompletiontimeforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up PM course completion grade.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50));\n $pmcourse->save();\n\n // Set up Moodle course grade item.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Assign the user a Moodle coruse grade.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 40, 'timemodified' => 12345));\n $coursegradegrade->insert();\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 101, 'finalgrade' => 40, 'timemodified' => 12345));\n $coursegradegrade->insert();\n\n // Run and validate when no learning objectives exist.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, null, 0);\n\n // Reset state and create learning objective.\n $DB->delete_records(\\student::TABLE);\n $this->create_course_completion();\n\n // Run and validation when a learning objective exists.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, null, 0);\n }", "public function JobComplete($id){\n\t\t$job = Jobs::whereId($id)->first();\n\t\t$job->completed = Carbon::now();\n\t\t$job->save();\n\n\t\t//Check to see if any dependent processes\n\t\t$depProcess = Dependent::wherepredProcess($job->process)->get();\n\n\t\t//Find jobs on pending completion of prior job, if any processes\n\t\tif(!empty($depProcess)) {\n\n\t\t\t$depJobs = array();\n\n\t\t\tforeach ($depProcess as $process) {\n\n\t\t\t\t$depJobs[$process->dep_process] = Jobs::whereProcess($process->dep_process)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->whereOrderId($job->order_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->whereStatus(0)->get();\n\t\t\t}\n\n\t\t//Check to see if any additional dependent jobs, if any\n\t\t\tif(!empty($depJobs)){\n\n\t\t\t\tforeach($depProcess as $proces){\n\n\t\t\t\t\tforeach($depJobs[$process->dep_process] as $depJob){\n\n\t\t\t\t\t\t$addProcesses = Dependent::wheredepProcess($depJob->process)\n\t\t\t\t\t\t\t\t\t\t\t\t->where('process', '!=', $job->process)->get();\n\n\t\t\t\t\t\t//If additional dependent processes exist, check for existing jobs\n\n\t\t\t\t\t\tif(!empty($addProcesses)){\n\n\t\t\t\t\t\t\t$addJob = array();\n\n\t\t\t\t\t\t\tforeach($addProcesses as $addProcess){\n\n\t\t\t\t\t\t\t\t$addJob = Jobs::whereProcess($addProcess->pred_process)\n\t\t\t\t\t\t\t\t\t\t\t\t->whereNull('completed')\n\t\t\t\t\t\t\t\t\t\t\t\t->whereorderId($job->order_id)->get();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif(!empty($addJob)){\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//If no active dependent jobs, remove hold on task(s)\n\t\t\t\t\t\t\t\telse{\n\n\t\t\t\t\t\t\t\t\t$depTask = Tasks::wherejobId($depJob->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t->whereNull('completion')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->orderBy('sort_order', 'asc')->first();\n\n\t\t\t\t\t\t\t\t\t$depTask->status = 1;\n\t\t\t\t\t\t\t\t\t$depTask->save();\n\n\t\t\t\t\t\t\t\t\t$this->tasks->Forecast($depTask->id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t}", "function SetSuggestedtimeList(&$list)\n\t{\n\t\t$this->_suggestedtimeList = array();\n\t\t$existingSuggestedtimeList = $this->GetSuggestedtimeList();\n\t\tforeach ($existingSuggestedtimeList as $suggestedtime)\n\t\t{\n\t\t\t$suggestedtime->eventId = '';\n\t\t\t$suggestedtime->Save(false);\n\t\t}\n\t\t$this->_suggestedtimeList = $list;\n\t}", "public function checkWorkoutCompleted($exerciseList, $workoutName){\n\t\t\t\t}", "public function setOnComplete($param)\n\t\t{\n\t\t\t$this->options['onComplete'] = $param;\n\t\t}", "public function complete() {\n\n\t\tdo_action('ud_task_before_complete', $this);\n\n\t\t$this->set_status('complete');\n\n\t\tdo_action('ud_task_completed', $this);\n\n\t\treturn true;\n\t}", "private function user_completetask_list(){\n $user_id = $this->_request['user_id'];\n \n \n if(empty($user_id))\n {\n \n $result['status'] = '0';\n $result['message']=\"Invalid data provided!\";\n $this->response($this->json($result), 200);\n }\n \n $sql=mysql_query('select T.*, U.username, UA.username as AssignUserName, D.department_name,ta.ActivityName,th.HeadName, TIMEDIFF(DATE_FORMAT(T.TaskEndTime,\"%H:%i:%s A\"), DATE_FORMAT(T.TaskStartTime,\"%H:%i:%s A\")) as timediffrence, TIMEDIFF(\"19:00:00\", DATE_FORMAT(T.TaskStartTime,\"%H:%i:%s A\")) as starttime ,TIMEDIFF(DATE_FORMAT(T.TaskEndTime,\"%H:%i:%s A\"),\"10:00:00\" ) as endtime , DATEDIFF(T.TaskEndDate, T.TaskStartDate) as daystotal from tbl_tasks T, users U, users UA, tbl_department D , tbl_activities ta, tbl_heads th where T.TaskCreatedByUserID=U.id and T.TaskAssignToUserID=UA.id and T.TaskDepartmentID=D.id and T.TaskActivityID=ta.ActivityID and T.TaskHeadID=th.HeadID and T.TaskStatus=5 and T.Deleted=1 and TaskAssignToUserID=\"'.$user_id.'\" and T.TaskDepartmentID IN (select DepartmentID from tbl_departmentemploy where EmployID=\"'.$user_id.'\") order by T.TaskID DESC', $this->db)or die(mysql_error());\n $result = array();\n $i=0;\n if(mysql_num_rows($sql) == 0){\n \n $result['status'] = '0';\n $result['message']=\"Not found\";\n $this->response($this->json($result), 200);\n }\n else\n {\n while ($rlt = mysql_fetch_array($sql, MYSQL_ASSOC)){\n \n $result[$i]['CreatedByUsername'] = $rlt['username'];\n $result[$i]['AssignToUsername'] = $rlt['AssignUserName'];\n $result[$i]['TaskID'] = $rlt['TaskID'];\n $result[$i]['TaskDepartmentID'] = $rlt['TaskDepartmentID'];\n $result[$i]['DepartmentName'] = $rlt['department_name'];\n $result[$i]['TaskHeadID'] = $rlt['TaskHeadID'];\n $result[$i]['TaskHeadName'] = $rlt['HeadName'];\n $result[$i]['TaskActivityID'] = $rlt['TaskActivityID'];\n $result[$i]['TaskActivityName'] = $rlt['ActivityName'];\n $result[$i]['TaskName'] = stripslashes($rlt['TaskName']);\n $result[$i]['TaskType'] = $rlt['TaskType']; // 0 for fix and 1 for flexy\n $result[$i]['TaskCategory'] = $rlt['TaskCategory']; // 0 for routine and 1 for nonroutine\n $result[$i]['TaskCreatedByUserID'] = $rlt['TaskCreatedByUserID'];\n $result[$i]['TaskAssignToUserID'] = $rlt['TaskAssignToUserID'];\n $result[$i]['TaskStartDate'] = $rlt['TaskStartDate'];\n $result[$i]['TaskEndDate'] = $rlt['TaskEndDate'];\n $result[$i]['TaskStartTime'] = $rlt['TaskStartTime'];\n $result[$i]['TaskEndTime'] = $rlt['TaskEndTime'];\n $result[$i]['TaskDescription'] = stripslashes($rlt['TaskDescription']);\n $result[$i]['TaskEmployeeRemark'] = stripslashes($rlt['TaskEmployeeRemark']);\n $result[$i]['TaskManagerRemark'] = stripslashes($rlt['TaskManagerRemark']);\n $result[$i]['TaskTimeAlloted'] = $rlt['TaskTimeAlloted'];\n $result[$i]['TaskCreatedAt'] = $rlt['TaskCreatedAt'];\n $result[$i]['TaskStatus'] = $rlt['TaskStatus'];\n $result[$i]['Priority'] = $rlt['priority'];\n $result[$i]['TaskAttachment'] = $rlt['TaskAttachment'];\n if($rlt['daystotal']==0){\n $result[$i]['Durring'] = $rlt['timediffrence']+0;\n }else{\n $result[$i]['Durring'] =($rlt['starttime']+$rlt['endtime']+($rlt['daystotal']*8)-8);\n }\n $i++; \n // 1 - pending approval, 2- Pending , 3 - In Progress ,4 - Waiting for Completetion, 5 - Complete\n }\n $this->response($this->json(array('message'=>'data found','status'=>'1','data'=>$result)), 200);\n }\n\n\n }", "function jr_handle_update_job_listing() {\n\tglobal $jr_options;\n\n\t$job_cat = jr_get_listing_tax( 'job_term_cat', APP_TAX_CAT );\n\t$job_type = jr_get_listing_tax( 'job_term_type', APP_TAX_TYPE );\n\t$job_salary = jr_get_listing_tax( 'job_term_salary', APP_TAX_SALARY );\n\n\t$args = wp_array_slice_assoc( $_POST, array( 'ID', 'post_title', 'post_content', 'tax_input' ) );\n\n\t$args['post_content'] = jr_maybe_strip_tags( $args['post_content'], 'post_content' );\n\t// Strip shortcodes\n\tif ( ! current_user_can( 'edit_others_posts' ) && ! is_admin() ) {\n\t\t$args['post_content'] = strip_shortcodes( $args['post_content'] );\n\t}\n\t$args['post_type'] = APP_POST_TYPE;\n\n\t$args['comment_status'] = $jr_options->allow_job_comments ? 'open' : 'closed';\n\n\t$errors = apply_filters( 'jr_listing_validate_fields', jr_get_listing_error_obj() );\n\tif ( $errors->get_error_codes() ) {\n\t\treturn false;\n\t}\n\n\tif ( ! empty( $_POST['ID'] ) ) {\n\n\t\tif ( ! current_user_can( 'edit_job', (int) $_POST['ID'] ) ) {\n\t\t\twp_die( __( 'Cheatin&#8217; uh?' ) );\n\t\t}\n\n\t\t$job_id = (int) $_POST['ID'];\n\t\t$job = get_post( $job_id );\n\t}\n\n\tif ( empty( $job ) ) {\n\t\t$action = 'insert';\n\t} elseif ( isset( $_POST['relist'] ) ) {\n\n\t\tif ( ! current_user_can( 'relist_job', $job_id ) ) {\n\t\t\twp_die( __( 'Cheatin&#8217; uh?' ) );\n\t\t}\n\n\t\t$action = 'relist';\n\t} else {\n\t\t$action = 'update';\n\t}\n\n\t// do_action hook\n\tjr_before_insert_job( $action );\n\n\tif ( empty($job) ) {\n\t\t$job_id = wp_insert_post( $args );\n\t} else {\n\n\t\t// temp mark this job as being relisted to secure relistings\n\t\tif ( 'expired' == $job->post_status ) {\n\t\t\tupdate_post_meta( $job_id, '_relisting', 1 );\n\t\t\t$args['post_status'] = 'draft';\n\t\t}\n\n\t\t$job_id = wp_update_post( $args );\n\t}\n\n\t### TERMS\n\n\twp_set_object_terms( $job_id, (int) $job_type, APP_TAX_TYPE );\n\twp_set_object_terms( $job_id, (int) $job_cat, APP_TAX_CAT );\n\twp_set_object_terms( $job_id, (int) $job_salary, APP_TAX_SALARY );\n\n\t$tags = jr_get_listing_tags( $args['tax_input'][APP_TAX_TAG] );\n\twp_set_object_terms( $job_id, $tags, APP_TAX_TAG );\n\n\t### META\n\n\tforeach ( jr_get_job_listing_fields() as $field => $meta_name ) {\n\t\t$field_value = apply_filters('jr_handle_listing_fields', _jr_get_initial_field_value( $field ), $field, $job_id );\n\t\tupdate_post_meta( $job_id, $meta_name, $field_value );\n\t}\n\n\t// store the user IP\n\tupdate_post_meta( $job_id, 'user_IP', appthemes_get_ip(), true );\n\n\tjr_set_coordinates( $job_id );\n\n\t### CUSTOM FIELDS\n\n\tjr_update_form_builder( $job_cat, $job_id, APP_TAX_CAT );\n\n\tjr_handle_image_upload( $job_id );\n\n\tjr_handle_files( $job_id, $job_cat );\n\n\t// do_action hook\n\tjr_after_insert_job( $job_id, $action );\n\n\treturn apply_filters( 'jr_handle_update_listing', get_post( $job_id ) );\n}", "abstract protected function complete();", "public function actionComplete() {\n $result = $this->accounts->getInvitedUser($invitationCode = $this->request->getPost('code'));\n \n if (empty($invitationCode) OR empty($result)) {\n $this->renderAction('error');\n } else {\n $username = $this->request->getPost('username');\n $password1 = $this->request->getPost('password1');\n $password2 = $this->request->getPost('password2');\n\n // some fail conditions\n if (!$this->accounts->isUsernameUnique($username) OR $password1 !== $password2) {\n $this->renderAction('error');\n }\n\n // set the new credentials\n try {\n $this->accounts->setInvitedUserCredentials($username, $password, $invitationCode);\n } catch (UserNotFoundException $e) {\n $this->renderAction('error');\n }\n\n // force authenticate the user\n $user = new User();\n $user->forceAuthenticate($username);\n\n $this->bag->account = $result;\n $this->renderAction();\n }\n\t}", "private function updateTmaStatusAndSendAmendTmApplicationEmail(): void\n {\n $tmaId = (int)$this->params('child_id');\n if ($this->updateTmaStatus($tmaId, RefData::TMA_STATUS_INCOMPLETE)) {\n $this->sendTmApplicationEmail(self::TM_APPLICATION_AMEND_EMAIL);\n } else {\n $this->getServiceLocator()->get('Helper\\FlashMessenger')->addErrorMessage('unknown-error');\n }\n }", "function Seeder_end_job()//added v1.1.2\r\n{\r\n\r\nglobal $Seeder_settings, $Seeder_info;\r\n\r\n$ActiveMission = Seeder_Read(\"ActiveMission\");\r\n\r\n if ($ActiveMission['isComplete'] == 1)\r\n {\r\n $res = 0;\r\n $px_time = time();\r\n $amf = new AMFObject(\"\");\r\n $amf->_bodys[0] = new MessageBody();\r\n $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';\r\n $amf->_bodys[0]->responseURI = '/1/onStatus';\r\n $amf->_bodys[0]->responseIndex = '/1';\r\n $amf->_bodys[0]->_value[0] = GetAMFHeaders();\r\n $amf->_bodys[0]->_value[2] = 0;\r\n\r\n $amf->_bodys[0]->_value[1][0]['params'][0] = false;\r\n $amf->_bodys[0]->_value[1][0]['params'][1] = Null;\r\n $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();\r\n $amf->_bodys[0]->_value[1][0]['functionName'] = \"SocialMissionService.onGetMissionComplete\";\r\n\r\n $res = RequestAMF($amf);\r\n AddLog2(\"Seeder_end_job> Ending Complete Job result: \".$res);\r\n #SaveAuthParams();\r\n\r\n } else {//if ($ActiveMission['isComplete'] == 1)\r\n AddLog2(\"Seeder_end_job> no Job Complete\");\r\n }\r\n\r\n}", "function _todoist_task_complete_form_submit($form, &$form_state) {\n\n if ($form_state['values']['task_id']) {\n $ids = $form_state['values']['task_id'];\n $token = variable_get('user_token');\n $apicall = 'https://todoist.com/API/v7/sync?';\n $post_data = array(\n 'token' => $token,\n 'commands' => '[{\"type\": \"item_complete\", \"uuid\": \"a74bfb5c-' . GeraHash(4) . '-4d14-baea-' . GeraHash(12) . '\", \"args\": {\"ids\": [' . $ids . ']}}]',\n );\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $apicall);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\n $parsed = curl_exec($ch);\n $result = json_decode($parsed, TRUE);\n if (curl_errno($ch)) {\n drupal_set_message('Error:' . curl_error($ch), 'error');\n }\n else {\n curl_close($ch);\n drupal_set_message('1 task completed successfully.');\n $form_state['redirect'] = 'admin/content/todoist/';\n }\n }\n}", "private function process_webhook_completion(): void {\n\t\t\t$this->log_info( 'Process webhook completion' );\n\n\t\t\tif ( ! empty( $this->transaction_data['txn_type'] ) && in_array( $this->transaction_data['txn_type'], array( 'web_accept', 'subscr_signup', 'subscr_payment' ), true ) ) {\n\t\t\t\t$this->grant_access();\n\t\t\t}\n\n\t\t\tforeach ( $this->products as $product ) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->record_transaction(\n\t\t\t\t\t\t$this->map_transaction_meta( $this->transaction_data, $product )->to_array(),\n\t\t\t\t\t\t$product->get_post(),\n\t\t\t\t\t\t// @phpstan-ignore-next-line\n\t\t\t\t\t\t$this->user\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->log_info( 'Recorded transaction for product ID: ' . $product->get_id() );\n\t\t\t\t} catch ( Learndash_DTO_Validation_Exception $e ) {\n\t\t\t\t\t$message = 'Error recording transaction: ' . $e->getMessage();\n\t\t\t\t\t$this->log_error( $message );\n\t\t\t\t\t$this->exit( '', true, $message, 422 );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function completeAction(){\n ini_set('display_errors',1);\n\t\t$basket = $this->basketRepository->getBasket();\n\t\t$args = $this->request->getArguments();\n\t\t$customer = $this->getCustomer($args);\n\t\t$order = $basket->makeOrder($customer);\n\n\t\t//warenkorb löschen\n\t\t$this->basketRepository->removeBasket();\n\n\n\t\t//Bestellmail versenden\n\t\t$result = $this->sendOrderMail($order);\n\n\t\t// Redirect to show the order */\n\t\t$this->redirect('show', 'Order', NULL, array('order' => $order), $this->settings['finishedpage']);\n\n\t/*\t$this->view->assign('customer', $customer);\n\t\t$this->view->assign('order', $order);\n\t\t$this->view->assign('sendMail', $result);\n\t*/\n\t}", "function bp_cp_tn_task_added() {\n\tbp_core_add_message( __( 'Task added!', 'collabpress' ) );\n}", "public function autoselectedAdmissions($item)\n {\n // Always start thils first\n include $this->core->conf['conf']['classPath'] . \"showoptions.inc.php\";\n\n $select = new optionBuilder($this->core);\n $applicant = $select->showAutoselected();\n $rejected = $select->showAutoRejected();\n\n $diplomaAccepted = $select->showAutoselectedDiploma();\n $diplomaRejected = $select->showAutoRejectedDiploma();\n\n\n include $this->core->conf['conf']['formPath'] . \"applicantautoselected.form.php\";\n }", "public function completed() {\n $users = TableRegistry::get('Users');\n $raffles = TableRegistry::get('Raffles');\n $query = $raffles->find()->where(['inactive' => 1])->order(['id' => 'DESC'])->limit(10)->all();\n $query = $query->toArray();\n\n $key = \"637D92A81FBB0C9CDCA06C1F940E8178\";\n $this->set('key', $key);\n foreach($query as $key=>$q) {\n $que = $users->find()->where(['id' => $q['userid']])->first();\n $query[$key]['tradeurl'] = $que['tradeurl'];\n }\n $this->set('rafflearray', $query);\n }", "function get_completion()\n {\n if( ! $this->is_login) $this->log(PLURK_NOT_LOGIN);\n\n $array = array('api_key' => $this->api_key);\n\n return $this->plurk(PLURK_GET_COMPLETION, $array);\n }", "function remarmoodle_user_complete($course, $user, $mod, $remarmoodle) {\n}", "public function completions( $_, $assoc_args ) {\n\t\t$line = substr( $assoc_args['line'], 0, $assoc_args['point'] );\n\t\t$compl = new Completions( $line );\n\t\t$compl->render();\n\t}", "public function mark_complete( $action_id ) {\n\t\t/** @var \\wpdb $wpdb */\n\t\tglobal $wpdb;\n\t\t$updated = $wpdb->update(\n\t\t\t$wpdb->actionscheduler_actions,\n\t\t\t[\n\t\t\t\t'status' => self::STATUS_COMPLETE,\n\t\t\t\t'last_attempt_gmt' => current_time( 'mysql', true ),\n\t\t\t\t'last_attempt_local' => current_time( 'mysql' ),\n\t\t\t],\n\t\t\t[ 'action_id' => $action_id ],\n\t\t\t[ '%s' ],\n\t\t\t[ '%d' ]\n\t\t);\n\t\tif ( empty( $updated ) ) {\n\t\t\tthrow new \\InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );\n\t\t}\n\t}", "public function setCompletedAt(?string $completedAt): void\n {\n $this->completedAt['value'] = $completedAt;\n }" ]
[ "0.60463345", "0.5902153", "0.57574797", "0.57463175", "0.5631887", "0.56041515", "0.55962896", "0.552891", "0.5506175", "0.54659235", "0.54494244", "0.5436523", "0.5433661", "0.541522", "0.537317", "0.5372194", "0.53713036", "0.5361356", "0.5348159", "0.526084", "0.521923", "0.51975566", "0.5196816", "0.51742876", "0.5162642", "0.51612926", "0.5155153", "0.51544607", "0.5149522", "0.51404583", "0.5134161", "0.5117887", "0.5111327", "0.5106619", "0.50882304", "0.50715774", "0.50685304", "0.5063592", "0.50585705", "0.5051757", "0.5033766", "0.50042963", "0.5000821", "0.4990072", "0.49876276", "0.4976264", "0.4974624", "0.49620712", "0.49398804", "0.49331322", "0.49206856", "0.4916589", "0.49102798", "0.4894679", "0.48819464", "0.4876448", "0.4865739", "0.48634914", "0.48538917", "0.48523325", "0.48514268", "0.48512542", "0.4822607", "0.4805901", "0.48022512", "0.47991073", "0.47991073", "0.47988787", "0.4798586", "0.47949916", "0.47944376", "0.4793762", "0.47930223", "0.4790256", "0.47896415", "0.47870684", "0.47723985", "0.47699502", "0.4763072", "0.4762296", "0.4761322", "0.47584736", "0.4753385", "0.47526598", "0.47501364", "0.4744201", "0.47365665", "0.47332376", "0.47107026", "0.47070438", "0.4703656", "0.47031748", "0.47003546", "0.46979722", "0.4696716", "0.46956354", "0.46940714", "0.46924934", "0.46872625", "0.46755853" ]
0.7486366
0
Add to job list update appointment's video status
Добавить в список задач обновление статуса видео встречи
public function updateVideoStatuses() { $command = 'task:appointment:video:status:update'; $queue = 'update_video_status'; $max = 10; $i = 0; try { while ($i < $max && ($redisJob = Resque::reserve($queue))) { $videoPath = $redisJob->getArguments(); if (empty($videoPath)) { continue; } $job = new Job($command, [$videoPath]); $job->setMaxRetries(100); $this->addJob($job); $i++; } } catch(Exception $e) { $this->logger->error($e->getMessage(), array( 'location' => 'jobManager:updateVideoStatuses', 'stack_trace' => $e->getTraceAsString(), )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function status_update($videoId,$status,$feaStatus)\n {//function for updating status of playlist starts\n if(isset($status))\n {\n $result = $this->_wpdb->update( $this->_videotable, array('publish' => $status), array( 'vid' => $videoId ));\n }\n if(isset($feaStatus))\n {\n $result = $this->_wpdb->update( $this->_videotable, array('featured' => $feaStatus), array( 'vid' => $videoId ));\n }\n return $result;\n }", "function setVideoTime(Google_Service_YouTube $youtube, $videoId, $publicDate) {\n\n // Call the API's videos.list method to retrieve the video resource.\n $listResponse = $youtube->videos->listVideos(\"status\", array('id'=>$videoId));\n\n\n // If $listResponse is empty, the specified video was not found.\n if (empty($listResponse)) {\n\n sendErrorMessage('Can\\'t find a video');\n\n } else {\n // Since the request specified a video ID, the response only\n // contains one video resource.\n $video = $listResponse[0];\n $videoStatus = $video['status'];\n\n $videoStatus->privacyStatus = 'private'; #privacyStatus options are public, private, and unlisted\n $videoStatus->publishAt = $publicDate;//'2016-11-23T07:29:00.50Z';\n\n $video->setStatus($videoStatus);\n $updateResponse = $youtube->videos->update('status', $video);\n \n $message .= '<li> Update success for video id: '.$updateResponse['id'].' </li>';\n\n $res = array('status' => 1,\n 'message' => $message\n );\n\n echo json_encode($res);\n\n }\n}", "public function massStatusAction()\n {\n $videoIds = $this->getRequest()->getParam('video_id');\n if (!is_array($videoIds)) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));\n } else {\n try {\n foreach ($videoIds as $videoId) {\n Mage::getSingleton('simiconnector/simivideo')\n ->load($videoId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) were successfully updated', count($videoIds))\n );\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n }\n\n $this->_redirect('*/*/index');\n }", "private function update($video) {\n $result = db_query(\"UPDATE {video_zencoder} SET jobid = %d, completed=%d, data='%s' WHERE vid=%d\",\n $video->jobid, time(), $video->data, $video->vid);\n return $result;\n }", "public function setVideoEncoderJobStatus( $jobId, $jobStatus, $playlistname )\n {\n BeMaverick_Video::setVideoEncoderJobStatus( $this, $jobId, $jobStatus, $playlistname );\n }", "function setActivityStatus($activity_id,$status) {\n// for($i=0;$i<count($this->activities);$i++) {\n// if($this->activities[$i]['activity_id']==$activity_id) {\n// $this->activities[$i]['status']=$status;\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instance_activities` set `status`=? where `activity_id`=? and `instance_id`=?\";\n $this->mDb->query($query,array($status,(int)$activity_id,(int)$this->instance_id));\n// }\n// } \n }", "public function active_video($video_id)\n {\n $publication_status_value=\"1\";\n $update=DB::update(\"UPDATE tbl_video SET publication_status='$publication_status_value' WHERE video_id='$video_id'\");\n\n return redirect('/all-video');\n }", "function process_media_theplatform_mpx_video_cron_queue_item($item) {\n switch ($item['queue_operation']) {\n case 'publish':\n // Import/Update the video.\n if (!empty($item['video'])) {\n $file_field_map = media_theplatform_mpx_variable_get('file_field_map', false);\n $video = $item['video'];\n $fields = array();\n if($file_field_map)\n $fields = _mpx_fields_extract_mpx_field_values($video, unserialize($file_field_map));\n // Add item to video queue.\n $video_item = array(\n 'id' => basename($video['id']),\n 'guid' => $video['guid'],\n 'title' => $video['title'],\n 'description' => $video['description'],\n 'thumbnail_url' => $video['plmedia$defaultThumbnailUrl'],\n 'release_id' => $video['media$content'][0]['plfile$releases'][0]['plrelease$pid'],\n 'fields' => $fields,\n );\n // Allow modules to alter the video item for pulling in custom metadata.\n drupal_alter('media_theplatform_mpx_media_import_item', $video_item, $video);\n // Perform the import/update.\n media_theplatform_mpx_import_video($video_item);\n }\n break;\n case 'unpublish':\n if (!empty($item['unpublish_id'])) {\n media_theplatform_mpx_set_mpx_video_inactive($item['unpublish_id'], 'unpublished');\n }\n break;\n case 'delete':\n if (!empty($item['delete_id'])) {\n media_theplatform_mpx_set_mpx_video_inactive($item['delete_id'], 'deleted');\n }\n break;\n }\n}", "public function changevideostatus($arrVideoId)\n\t{\n\t\tglobal $mainframe;\n\n\t\tif ($arrVideoId['task'] == \"publish\")\n\t\t{\n\t\t\t$msg = 'Published successfully';\n\n\t\t\t// Define joomla mailer\n\t\t\t$mailer = JFactory::getMailer();\n\t\t\t$config = JFactory::getConfig();\n\t\t\t$sender = $config->get('mailfrom');\n\t\t\t$site_name = $config->get('sitename');\n\t\t\t$mailer->setSender($sender);\n\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->clear()\n\t\t\t\t\t->select('dispenable')\n\t\t\t\t\t->from('#__hdflv_site_settings')\n\t\t\t\t\t->where($db->quoteName('id') . ' = ' . $db->quote('1'));\n\t\t\t$db->setQuery($query);\n\t\t\t$setting_res = $db->loadResult();\n\t\t\t$dispenable = unserialize($setting_res);\n\n\t\t\tforeach ($arrVideoId['cid'] as $videoid)\n\t\t\t{\n\t\t\t\t// Query is to display recent videos in home page\n\t\t\t\t$query->clear()\n\t\t\t\t\t\t->select(array('d.email', 'b.seo_category', 'a.seotitle', 'e.catid', 'a.id', 'd.username'))\n\t\t\t\t\t\t->from('#__hdflv_upload a')\n\t\t\t\t\t\t->leftJoin('#__users d ON a.memberid=d.id')\n\t\t\t\t\t\t->leftJoin('#__hdflv_video_category e ON e.vid=a.id')\n\t\t\t\t\t\t->leftJoin('#__hdflv_category b ON e.catid=b.id')\n\t\t\t\t\t\t->where($db->quoteName('a.id') . ' = ' . $db->quote($videoid))\n\t\t\t\t\t\t->group($db->escape('e.vid'));\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$user_details = $db->loadObject();\n\n\t\t\t\t// For SEO settings\n\t\t\t\t$seoOption = $dispenable['seo_option'];\n\n\t\t\t\tif ($seoOption == 1)\n\t\t\t\t{\n\t\t\t\t\t$featureCategoryVal = \"category=\" . $user_details->seo_category;\n\t\t\t\t\t$featureVideoVal = \"video=\" . $user_details->seotitle;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$featureCategoryVal = \"catid=\" . $user_details->catid;\n\t\t\t\t\t$featureVideoVal = \"id=\" . $user_details->id;\n\t\t\t\t}\n\n\t\t\t\t$mailer->addRecipient($user_details->email);\n\t\t\t\t$subject = JText::_('HDVS_VIDEO_APPROVED_BY_ADMIN');\n\t\t\t\t$baseurl = str_replace('administrator/', '', JURI::base());\n\t\t\t\t$video_url = $baseurl . 'index.php?option=com_contushdvideoshare&view=player&' . $featureCategoryVal . '&' . $featureVideoVal;\n\t\t\t\t$video_url = str_replace('administrator/', '', $video_url);\n\t\t\t\t$filepath = file_get_contents($baseurl . '/components/com_contushdvideoshare/emailtemplate/approveadmin.html');\n\t\t\t\t$baseurl_replace = str_replace(\"{baseurl}\", $baseurl, $filepath);\n\t\t\t\t$site_name_replace = str_replace(\"{site_name}\", $site_name, $baseurl_replace);\n\t\t\t\t$username_replace = str_replace(\"{username}\", $user_details->username, $site_name_replace);\n\t\t\t\t$subject_replace = str_replace(\"{approved}\", $subject, $username_replace);\n\t\t\t\t$message = str_replace(\"{video_url}\", $video_url, $subject_replace);\n\t\t\t\t$mailer->isHTML(true);\n\t\t\t\t$mailer->setSubject($subject);\n\t\t\t\t$mailer->Encoding = 'base64';\n\t\t\t\t$mailer->setBody($message);\n\t\t\t\t$mailer->Send();\n\t\t\t}\n\n\t\t\t$publish = 1;\n\t\t}\n\t\telseif ($arrVideoId['task'] == 'trash')\n\t\t{\n\t\t\t$publish = -2;\n\t\t\t$msg = 'Trashed Successfully';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = 'Unpublished successfully';\n\t\t\t$publish = 0;\n\t\t}\n\n\t\t$objAdminVideosTable = &$this->getTable('adminvideos');\n\t\t$objAdminVideosTable->publish($arrVideoId['cid'], $publish);\n\t\t$strRedirectPage = 'index.php?layout=adminvideos&option=' . JRequest::getVar('option') . '&user=' . JRequest::getVar('user');\n\t\t$mainframe->redirect($strRedirectPage, $msg, 'message');\n\t}", "public function updatevideowatched(Request $request)\n\t{\n\t\t$user_id = $request->user_id;\n\t\t$object_id = $request->video_id;\n\t\t$next_video_id = (int)$request->next_video_id;\n\t\t$total_videos = (int)$request->total_videos;\n\t\t$chapter_id = $request->chapter_id;\n\n\n\t\t$object_typeVideo = 'video';\n\t\t$statusVideo = 'watched';\n\t\t$object_typeChapter = 'chapter';\n\t\t$statusChapter = 'completed';\n\n\t\t$insertAccess = [\n\t\t\t'user_id' => $user_id,\n\t\t\t'object_id' => $object_id,\n\t\t\t'object_type' => $object_typeVideo,\n\t\t\t'status' => $statusVideo,\n\t\t 'created_at' => Carbon::now()\n\t\t];\n\n\t\t$insertChapterAccess = [\n\t\t\t'user_id' => $user_id,\n\t\t\t'object_id' => $chapter_id,\n\t\t\t'object_type' => $object_typeChapter,\n\t\t\t'status' => $statusChapter,\n\t\t 'created_at' => Carbon::now()\n\t\t];\n\n\t\t\n\t\t$alreadyWatched = User_access::where([['user_id', $user_id], ['object_id', $object_id], ['object_type', $object_typeVideo]])->first();\n\n\t\tif (!empty($alreadyWatched)) {\n\t\t\t// video already watch return 0 (do nothing)\n\t\t\treturn 0;\n\t\t} else {\n\n\t\t\t$videoAccessInserted = User_access::insert($insertAccess);\n\n\t\t\tif ($videoAccessInserted) {\n\t\t\t\t\n\t\t\t\t$watchedvideoCount = User_access::where([['user_id', $user_id], ['object_type', $object_typeVideo]])->count();\n\n\t\t\t\t// last video of chapter\n\t\t\t\tif ($next_video_id == 0 ) {\n\t\t\t\t\t\n\t\t\t\t\t$chapterAccessInserted = User_access::insert($insertChapterAccess);\n\t\t\t\t\t\n\t\t\t\t\t// return 1 (record inserted in database)\n\t\t\t\t\treturn 1;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$videoNative = VideoNative::where([['id', $next_video_id], ['lang', Request::locale()], ['status', 'active']])->first();\n\t\t\t\t\t\n\t\t\t\t\t// return next video\n\t\t\t\t\t$decodedVideo = json_decode($videoNative->video_upload);\n\n\t\t\t\t\tif (!empty($decodedVideo)) {\n\t\t\t\t\t\treturn '\\\\public\\storage\\\\'.$decodedVideo[0]->download_link;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function _media_theplatform_mpx_process_video_update($since, $type) {\n // Log what type of operation we're performing.\n global $user;\n $log = array(\n 'uid' => $type == 'manual' ? $user->uid : 0,\n 'type' => 'video',\n 'type_id' => NULL,\n 'action' => 'update',\n 'details' => $type,\n );\n media_theplatform_mpx_insert_log($log);\n\n // Get all IDs of mpxMedia that have been updated since last notification.\n $media_to_update = media_theplatform_mpx_get_changed_ids($since);\n\n if (!$media_to_update) {\n $cron_queue = DrupalQueue::get('media_theplatform_mpx_video_cron_queue');\n $num_cron_queue_items = $cron_queue->numberOfItems();\n if ($num_cron_queue_items) {\n $message = t('All mpxMedia is up to date. There are approximately @num_items videos waiting to be processed.',\n array('@num_items' => $num_cron_queue_items));\n }\n else {\n $message = t('All mpxMedia is up to date.');\n }\n drupal_set_message($message);\n return false;\n }\n\n // If we have actives, join their ids together for the data url\n if (count($media_to_update['actives']) > 0) {\n $ids = implode(',', $media_to_update['actives']);\n }\n // Otherwise, just handle the deletes/unpublishes now\n else {\n $processesing_success = _media_theplatform_mpx_process_video_import_feed_data(null, $media_to_update);\n if (!$processesing_success) {\n return false;\n } else {\n media_theplatform_mpx_variable_set('last_notification', $media_to_update['last_notification']);\n return true;\n }\n }\n\n // Get the feed url.\n $url = _media_theplatform_mpx_get_video_feed_url($ids);\n\n // Get the total result count for this update. If it is greater than the feed\n // request item limit, start a new batch.\n $total_result_count = count(explode(',', $ids));\n $feed_request_item_limit = media_theplatform_mpx_variable_get('cron_videos_per_run', 500);\n\n if ($total_result_count && $total_result_count > $feed_request_item_limit) {\n // Set last notification for the next update.\n media_theplatform_mpx_variable_set('last_notification', $media_to_update['last_notification']);\n // Set starter batch system variables.\n media_theplatform_mpx_variable_set('proprocessing_batch_url', $url);\n media_theplatform_mpx_variable_set('proprocessing_batch_item_count', $total_result_count);\n media_theplatform_mpx_variable_set('proprocessing_batch_current_item', 1);\n // Perform the first batch operation, not the update.\n return _media_theplatform_mpx_process_batch_video_import($type);\n }\n $result_data = _media_theplatform_mpx_retrieve_feed_data($url);\n\n if (!$result_data) {\n return false;\n }\n $processesing_success = _media_theplatform_mpx_process_video_import_feed_data($result_data, $media_to_update);\n if (!$processesing_success) {\n return false;\n }\n // Set last notification for the next update.\n media_theplatform_mpx_variable_set('last_notification', $media_to_update['last_notification']);\n\n return true;\n}", "function media_theplatform_mpx_set_mpx_video_inactive($id, $op) {\n // Set status to inactive.\n $inactive = db_update('mpx_video')\n ->fields(array('status' => 0))\n ->condition('id', $id, '=')\n ->execute();\n\n // Let other modules perform operations when videos are disabled.\n module_invoke_all('media_theplatform_mpx_set_video_inactive', $id, $op);\n\n // Write mpx_log record.\n // @todo: Set type_id to $id once type_id gets changed to varchar.\n global $user;\n $log = array(\n 'uid' => $user->uid,\n 'type' => 'video',\n 'type_id' => NULL,\n 'action' => $op,\n 'details' => $id,\n );\n media_theplatform_mpx_insert_log($log);\n}", "function media_theplatform_mpx_update_video($video) {\n $timestamp = REQUEST_TIME;\n\n // Fetch video_id and status from mpx_video table for given $video.\n $mpx_video = media_theplatform_mpx_get_mpx_video_by_field('guid', $video['guid']);\n\n // If we're performing an update, it means this video is active.\n // Check if the video was inactive and is being re-activated:\n if ($mpx_video['status'] == 0) {\n $details = 'video re-activated';\n }\n else {\n $details = NULL;\n }\n\n // Update mpx_video record.\n $update = db_update('mpx_video')\n ->fields(array(\n 'title' => $video['title'],\n 'guid' => $video['guid'],\n 'description' => $video['description'],\n 'thumbnail_url' => $video['thumbnail_url'],\n 'release_id' => $video['release_id'],\n 'status' => 1,\n 'updated' => $timestamp,\n 'id' => $video['id'],\n ))\n ->condition('guid', $video['guid'], '=')\n ->execute();\n\n // @todo: (maybe). Update all files with guid with new title if the title is different.\n $image_path = 'media-mpx/' . $video['guid'] . '.jpg';\n // Delete thumbnail from files/media-mpx directory.\n file_unmanaged_delete('public://' . $image_path);\n // Delete thumbnail from all the styles.\n // Now, the next time file is loaded, MediaThePlatformMpxStreamWrapper\n // will call getOriginalThumbnail to update image.\n image_path_flush($image_path);\n // Write mpx_log record.\n global $user;\n $log = array(\n 'uid' => $user->uid,\n 'type' => 'video',\n 'type_id' => $mpx_video['video_id'],\n 'action' => 'update',\n 'details' => $details,\n );\n media_theplatform_mpx_insert_log($log);\n\n // If fields are mapped, save them to the file entity\n media_theplatform_mpx_update_file_fields($mpx_video['fid'], $video['fields']);\n\n // Return code to be used by media_theplatform_mpx_import_all_videos().\n return 'update';\n}", "function setActivityStatus($activityId,$status) \n {\n if (!(($status=='running') || ($status=='completed')))\n {\n $this->error[] = tra('unknown status');\n return false;\n }\n for($i=0;$i<count($this->activities);$i++) \n {\n if($this->activities[$i]['wf_activity_id']==$activityId) \n {\n $query = 'update '.GALAXIA_TABLE_PREFIX.'instance_activities set wf_status=? where wf_activity_id=? and wf_instance_id=?';\n $this->query($query,array($status,(int)$activityId,(int)$this->instanceId));\n return true;\n }\n }\n $this->error[] = tra('new status not set, no corresponding activity was found.'); \n return false;\n }", "public function afterSave() {\n /**\n * If the runtime of video has been changed during the request,\n * then we need re-calculate the pending payments, for users.\n */\n if($this->isRuntimeChanged()) {\n // For P360 we have a checkbox that either allows or disallows payment changes when the\n // runtime is changed on edit project page, so we check it for P360 only\n if(!ClientDetectorComponent::getInstance()->isPoint360() || (int) $this->skip_payment_update_on_runtime_change === 0) {\n // Start recalculating payments for each task in this project\n /* @var PProjectJob[] $projectJobs */\n $projectJobs = $this->pproject->jobs;\n foreach ($projectJobs as $projectJob) {\n // Check if job is assigned.\n $userJob = $projectJob->userJob;\n if(!$userJob instanceof PUserJob || !$userJob->hasActivePayment())\n continue;\n\n // Recalculate and set status of payment as Not Processed\n $userJob->calculateUserPaymentAmount();\n // Notify user about recalculation\n $userJob->user->sendRecalculationEmail($userJob);\n }\n }\n\n //update related video runtime based on the same SAM children title\n $project = $this->pproject;\n if($project->isOrder() && !empty($project->child_title_id) && !$this->_prevent_loop && $this->_updateSAM) {\n Yii::setPathOfAlias('AssetManagement', Yii::getPathOfAlias('ext.assetsManagementRestClient.src'));\n //get the same work orders\n $criteria = new CDbCriteria;\n $criteria->with = ['pproject'];\n //$criteria->compare('pproject.status', Project::STATUS_ACTIVE);\n $criteria->compare('pproject.child_title_id', $project->child_title_id);\n $criteria->compare('t.id', '<>'.$this->id);\n\n $videos = ProjectVideo::model()->findAll($criteria);\n foreach($videos as $video) {\n $video->_prevent_loop = true;\n }\n\n foreach($videos as $video) {\n if($video->video_lenght != $this->video_lenght) {\n $video->video_lenght = $this->video_lenght;\n $video->is_runtime_updated = 1;\n $video->save(false, ['video_lenght', 'is_runtime_updated']);\n }\n }\n\n $childrenTitle = \\AssetManagement\\Models\\ChildrenTitle::get($project->child_title_id);\n if ($childrenTitle) {\n $childrenTitle->setUpdateOrder(false);\n $childrenTitle->runtime = $this->video_lenght;\n $childrenTitle->update();\n }\n }\n }\n\n // If video url was relinked -> track the date of modification\n if ($this->isVideoUrlChanged()) {\n $this->setRelinkedAt();\n\n // Trigger project video changed event\n ProjectBreakdownReport::create(ProjectBreakdownReportActions::PROJECT_VIDEO_CHANGED)\n ->setProject($this->pproject)\n ->forVideo($this)\n ->save();\n }\n\n\t/*\n $pProject = PProject::model()->findByPk($this->project_id);\n if ($pProject instanceof PProject) {\n $pProject->refreshNewStatus();\n }\n\t*/\n Project::registerStatusUpdate($this->project_id);\n\n /**\n * Call the parent implementation so that the event\n * is raised properly.\n */\n parent::afterSave();\n\n PProject::$showCanceled = true;\n $pProject = PProject::model()->findByPk($this->project_id);\n if($pProject instanceof PProject) {\n //$pProject->refreshNewStatus();\n $pProject->updateSortingSettings(); \n } \n }", "public function update_video()\n\t{\n\t\t$this->load->model('Logo_model');\n\t\t$res=$this->Logo_model->update_video();\n\t\t\tif($res)\n\t\t\t{\n\t\t\t\t$this->session->set_userdata('success','Successfully updated!if you dont see the change press ctrl+f5');\n\t\t\t\tredirect(site_url('Home_setting'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_userdata('failure','Failed to update! Try Again');\n\t\t\t\tredirect(site_url('Home_setting'));\n\t\t\t\n\t\t\t}\n\t}", "function kpoint_videocompleted($kpoint, $course, $cm, $context)\n{\n\n // Trigger course_module_viewed event.\n $params = array(\n 'context' => $context,\n 'objectid' => $kpoint->id\n );\n\n $event = \\mod_kpoint\\event\\course_module_viewed::create($params);\n $event->add_record_snapshot('course_modules', $cm);\n $event->add_record_snapshot('course', $course);\n $event->add_record_snapshot('kpoint', $kpoint);\n $event->trigger();\n}", "public function editAction() {\n // Gets logged in user info\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n if (!$this->_helper->requireUser()->isValid()) {\n $this->respondWithError('unauthorized');\n }\n\n if (Engine_Api::_()->core()->hasSubject('sitepagevideo_video')) {\n $subject = $video = Engine_Api::_()->core()->getSubject('sitepagevideo_video');\n $sitepage = $video->getParent();\n }\n\n if (!$video || !$sitepage)\n $this->respondWithError(\"no_record\");\n\n // Manage admin work start\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'edit');\n if (empty($isManageAdmin)) {\n $can_edit = 0;\n } else {\n $can_edit = 1;\n }\n // End manage admin work\n // Superadmin, video owner and page owner can edit video\n if ($viewer_id != $sitepagevideo->owner_id && $can_edit != 1) {\n $this->respondWithError('unauthorized');\n }\n\n if ($this->getRequest()->isGet()) {\n $form_fields = Engine_Api::_()->getApi('Siteapi_Core', 'sitepagevideo')->getEditForm($subject);\n $this->respondWithSuccess($form_fields);\n } elseif ($this->getRequest()->isPost()) {\n Engine_Api::_()->sitepagevideo()->setVideoPackages();\n\n $values = $this->_getAllParams();\n\n // Start form validation\n $validators = Engine_Api::_()->getApi('Siteapi_FormValidators', 'sitepagevideo')->createformvalidators();\n $values['validators'] = $validators;\n $validationMessage = $this->isValid($values);\n\n // Response validation error\n if (!empty($validationMessage) && @is_array($validationMessage)) {\n $this->respondWithValidationError('validation_fail', $validationMessage);\n }\n\n\n // Process\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n \n try {\n\n $subject->setFromArray($values);\n\n // Add tags\n $tags = preg_split('/[,]+/', $values['tags']);\n $subject->tags()->setTagMaps($viewer, $tags);\n $subject->save();\n\n $db->commit();\n $this->successResponseNoContent('no_content');\n } catch (Exception $ex) {\n $db->rollBack();\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n }\n }", "public function processAppointmentVideo(Appointment $appointment)\r\n {\r\n $job = new Job('task:appointment:video:process', [$appointment->getId()]);\r\n $job->setMaxRetries(100);\r\n\r\n $this->addJob($job);\r\n\r\n return $this;\r\n }", "public function actionUpdateProjectVideoRuntime() {\n $projectId = Yii::app()->request->getPost('projectId');\n $runtime = Yii::app()->request->getPost('runtime');\n\n $project = PProject::model()->findByPk($projectId);\n\n if (!$project instanceof PProject)\n die(json_encode(array('status' => 'error', 'message' => 'Project does not exist')));\n\n if (!$project instanceof PProject)\n die(json_encode(array('status' => 'error', 'message' => 'Project does not exist')));\n\n $projectVideo = $project->video;\n\n if (!$projectVideo instanceof ProjectVideo)\n die(json_encode(array('status' => 'error', 'message' => 'Project video does not exist')));\n\n //Append the video change description in breakdown report.\n $this->mainAPI()->getProjectBreakdownReportInstance()\n ->appendLinesToDescription(['Project Video' => [sprintf('Video Length (min): %s -> %s', $projectVideo->video_lenght, $runtime)]]);\n\n $projectVideo->video_lenght = $runtime;\n\n if (!$projectVideo->validate(array('video_lenght'))) {\n $errors = implode('<br>', $projectVideo->getErrors('video_lenght'));\n die(json_encode(array('status' => 'error', 'message' => $errors)));\n }\n\n $saved = $projectVideo->save(false, array('video_lenght'));\n\n // Prepare changed params and save breakdown report\n $projectBreakdownReport = $this->mainAPI()->getProjectBreakdownReportInstance()\n ->setActionId(ProjectBreakdownReportActions::PROJECT_EDITED)\n ->forProject($project);\n $projectBreakdownReport->save();\n\n die(json_encode(array('status' => $saved ? 'ok' : 'error')));\n }", "public function setStatus()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\t$app = JFactory::getApplication();\n\t\t$eventid = $app->input->getInt('eventid');\n\t\t$ids = $app->input->get('cid', array(), 'array');\n\t\t$values = array('setWaitinglist' => 2, 'setAttending' => 1, 'setInvited' => 0, 'setNotAttending' => -1);\n\t\t$task = $this->getTask();\n\t\t$value = \\Joomla\\Utilities\\ArrayHelper::getValue($values, $task, 0, 'int');\n\n\t\tif (empty($ids))\n\t\t{\n\t\t\t$message = JText::_('JERROR_NO_ITEMS_SELECTED');\n\t\t\t\\Joomla\\CMS\\Factory::getApplication()->enqueueMessage($message, 'warning');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get the model.\n\t\t\t$model = $this->getModel('attendee');\n\n\t\t\t// Publish the items.\n\t\t\tif (!$model->setStatus($ids, $value))\n\t\t\t{\n\t\t\t\t$message = $model->getError();\n\t\t\t\tJemHelper::addLogEntry($message, __METHOD__, JLog::ERROR);\n\t\t\t\t\\Joomla\\CMS\\Factory::getApplication()->enqueueMessage($message, 'warning');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJPluginHelper::importPlugin('jem');\n\t\t\t\t$dispatcher = JemFactory::getDispatcher();\n\n\t\t\t\tswitch ($value) {\n\t\t\t\tcase -1:\n\t\t\t\t\t$message = JText::plural('COM_JEM_ATTENDEES_N_ITEMS_NOTATTENDING', count($ids));\n\t\t\t\t\tforeach ($ids AS $pk) {\n\t\t\t\t\t\t// onEventUserUnregistered($eventid, $record, $recordid)\n\t\t\t\t\t\t$dispatcher->trigger('onEventUserUnregistered', array($eventid, false, $pk));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\t$message = JText::plural('COM_JEM_ATTENDEES_N_ITEMS_INVITED', count($ids));\n\t\t\t\t\tforeach ($ids AS $pk) {\n\t\t\t\t\t\t// onEventUserRegistered($recordid)\n\t\t\t\t\t\t$dispatcher->trigger('onEventUserRegistered', array($pk));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$message = JText::plural('COM_JEM_ATTENDEES_N_ITEMS_ATTENDING', count($ids));\n\t\t\t\t\tforeach ($ids AS $pk) {\n\t\t\t\t\t\t// onEventUserRegistered($recordid)\n\t\t\t\t\t\t$dispatcher->trigger('onEventUserRegistered', array($pk));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$message = JText::plural('COM_JEM_ATTENDEES_N_ITEMS_WAITINGLIST', count($ids));\n\t\t\t\t\tforeach ($ids AS $pk) {\n\t\t\t\t\t\t// onUserOnOffWaitinglist($recordid)\n\t\t\t\t\t\t$dispatcher->trigger('onUserOnOffWaitinglist', array($pk));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tJemHelper::addLogEntry($message, __METHOD__, JLog::DEBUG);\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_jem&view=attendees&eventid=' . $eventid, false), $message);\n\t}", "function addWatchList()\n {\n $this->doNotRenderHeader = 1;\n $filmId = $_POST['filmId'];\n $userId = $_POST['userId'];\n $sql = \"insert into \" . DEFAULT_SCHEMA . \".activity (film_id,user_id,name,created_at,updated_at) VALUES (\" . $filmId . \",\" . $userId . \",'watchlist',now() ,now());\";\n $result = $this->Profile->executeCommand($sql);\n\n if ($result) {\n $newActivity = $this->Profile->custom('select id as activity_id from activity where name = \"watchlist\" and user_id = ' . $userId . ' and film_id = ' . $filmId . ';');\n echo $newActivity[0]['Activity']['activity_id'];\n } else {\n echo '-1';\n }\n }", "public function addToPlaylistAction() {\n\n $message = Zend_Registry::get('Zend_Translate')->_(\"Video is added to playlist.\");\n $video_id = $this->_getParam('video_id');\n $playlist_id = $this->_getParam('playlist_id');\n $videoModel = Engine_Api::_()->getItem('sitevideo_video', $video_id);\n if ($videoModel && ($videoModel->checkType('embedcode') || $videoModel->checkType('instagram') || $videoModel->checkType('twitter') || $videoModel->checkType('pinterest')))\n $message = Zend_Registry::get('Zend_Translate')->_(\"Video is added to playlist.This video will not play automatically in a playlist.\");\n $table = Engine_Api::_()->getDbtable('playlistmaps', 'sitevideo');\n $db = $table->getAdapter();\n $db->beginTransaction();\n\n try {\n\n $playlistMaps = new Sitevideo_Model_DbTable_Playlistmaps();\n // CHECKING FOR VIDEO EXISTS IN PLAYLIST\n $playlistMapModel = $playlistMaps->fetchRow($playlistMaps->select()\n ->where('playlist_id = ?', $playlist_id)\n ->where('video_id = ?', $video_id));\n //IF VIDEO DOES NOT EXISTS IN PLAYLIST THEN ADD VIDEO INTO PLAYLIST\n if (!$playlistMapModel) {\n $playlistmapRow = $table->createRow();\n $playlistmapRow->video_id = $video_id;\n $playlistmapRow->playlist_id = $playlist_id;\n $playlistmapRow->save();\n $playlist = $playlistmapRow->getPlaylistDetail();\n //ADD THE VIDEO COUNT BY 1 TO PLAYLIST TABLE WHEN VIDEO IS ADDED TO PLAYLIST\n if ($playlist) {\n $playlist->video_count = ($playlist->video_count) + 1;\n $playlist->save();\n }\n } else\n $message = Zend_Registry::get('Zend_Translate')->_(\"This video is already added to playlist.\");\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $data = array();\n $data[] = array(\n 'message' => $message,\n );\n return $this->_helper->json($data);\n $data = Zend_Json::encode($data);\n $this->getResponse()->setBody($data);\n }", "function update()\n {\n\t\t// get form data -\n\t\t$data = $_POST;\n\t\t//var_dump($_FILES);\n\t\t//print_r($_POST); //die;\n\n\t\t// convert date format in form data -\n\t\t$data['expiry_date'] = $this->mastermodel->date_convert($data['expiry_date'],'ymd');\n\t\t//$_POST['video']['exercise_start_date'] = $this->mastermodel->date_convert($_POST['exercise_start_date'],'ymd');\n\t\t//$_POST['video']['exercise_end_date'] = $this->mastermodel->date_convert($_POST['exercise_end_date'],'ymd');\n\t\t$data['date_of_upload'] = $this->mastermodel->date_convert($data['date_of_upload'],'ymd');\n\n\t\t// get evaluation id -\n\t\t$exercise_id = $data['exercise_id'];\n\t\t$patient_id = $data['patient_id'];\n\t\t$exercise_program = $data['exercise_program'];\n\n\n\t\t// WHERE condition -\n\t\t$where = array('exercise_id' => $data['exercise_id']);\t// give name for edit record id field on form as 'edit_pk'\n\n\t\t// remove exercise id from array -\n\t\tunset($data['exercise_id']);\n\t\tunset($data['video']);\n\t\tunset($data['edit_video']);\n\t\tunset($data['tag']);\n\n\t\t// remove exercise id from array -\n\t\tunset($data['patient_id']);\n\n\t\t// remove edit id from array -\n\t\tunset($data['edit_pk']);\n\t\t$result = $this->mastermodel->update_data('exercise_program', $where, $data);\n\n\n\t\tif(isset($_POST['video'])){\n\t\t$insert_video_meta= array();\n\t\t\t\t foreach ($_POST['video'] as $value) {\n\t\t\t\t\t if(isset($value['check'])){\n\t\t\t\t\t\t if(empty($value['exercise_start_date'])){\n\t\t\t\t\t\t\t $value['exercise_start_date'] = $data['date_of_upload'];\n\t\t\t\t\t\t }\n\t\t\t\t\t\t if(empty($value['exercise_end_date'])){\n\t\t\t\t\t\t\t $value['exercise_end_date'] = $data['expiry_date'];\n\t\t\t\t\t\t }\n\n\t\t\t\t\t \t\t$vid_link = $this->addUrl($value['vid_name'],$value['exercise_end_date']);\n\t\t\t\t\t\t\t$insert_video_meta[] = array(\n\t\t\t\t\t\t\t\t\t'exercise_id' => $exercise_id,\n\t\t\t\t\t\t\t\t\t'exercise_video_id' => $value['check'],\n\t\t\t\t\t\t\t\t\t'exercise_start_date' => $this->mastermodel->date_convert($value['exercise_start_date'],'ymd'),\n\t\t\t\t\t\t\t\t\t'exercise_end_date' =>$this->mastermodel->date_convert($value['exercise_end_date'],'ymd'),\n\t\t\t\t\t\t\t\t\t'vid_name' => $value['vid_name'],\n\t\t\t\t\t\t\t\t\t'vid_link' => $vid_link,\n\t\t\t\t\t\t\t\t\t'reps' => $value['reps'],\n\t\t\t\t\t\t\t\t\t'sets' => $value['sets'],\n\t\t\t\t\t\t\t\t\t'hold_time' => $value['hold_time'], //.str_pad($value['degree_month'],2,\"0\",STR_PAD_LEFT).\"01\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t$res = $this->mastermodel->insertBatch('exercise_meta', $insert_video_meta);\n\n\t\t }\n\t\tif(isset($_POST['edit_video'])){\n\t\t$update_video_meta= array();\n\t\t\t\t foreach ($_POST['edit_video'] as $value) {\n\t\t\t\t \t\t\t if(empty($value['exercise_start_date'])){\n\t\t\t\t\t\t\t $value['exercise_start_date'] = $data['date_of_upload'];\n\t\t\t\t\t\t }\n\t\t\t\t\t\t if(empty($value['exercise_end_date'])){\n\t\t\t\t\t\t\t $value['exercise_end_date'] = $data['expiry_date'];\n\t\t\t\t\t\t }\n\t\t\t\t\t \t\t$vid_link = $this->addUrl($value['vid_name'],$value['exercise_end_date']);\n\t\t\t\t\t\t\t$update_video_meta = array(\n\t\t\t\t\t\t\t\t\t'exercise_id' => $exercise_id,\n\t\t\t\t\t\t\t\t\t'exercise_video_id' => $value['insert_id'],\n\t\t\t\t\t\t\t\t\t'exercise_start_date' => $this->mastermodel->date_convert($value['exercise_start_date'],'ymd'),\n\t\t\t\t\t\t\t\t\t'exercise_end_date' =>$this->mastermodel->date_convert($value['exercise_end_date'],'ymd'),\n\t\t\t\t\t\t\t\t\t'vid_name' => $value['vid_name'],\n\t\t\t\t\t\t\t\t\t'vid_link' => $vid_link,\n\t\t\t\t\t\t\t\t\t'reps' => $value['reps'],\n\t\t\t\t\t\t\t\t\t'sets' => $value['sets'],\n\t\t\t\t\t\t\t\t\t'hold_time' => $value['hold_time'], //.str_pad($value['degree_month'],2,\"0\",STR_PAD_LEFT).\"01\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->mastermodel->updateTableRowById($update_video_meta, 'exercise_meta', 'id', $value['insert_id']);\n\n\n\t\t\t\t }\n\n\n\t\t// function used to redirect -\n }\n\n \t\t$this->mastermodel->redirect($result, 'exercise_program', 'exercise_program', 'Updated');\n }", "function updateParserJobStatus($parser_id, $status) {\r\n $whereCondition = \" where parser_id=$parser_id\";\r\n $parser_job_status['job_status'] = $status;\r\n $this->updateTableQueryTest($parser_job_status, 'album_parser', $whereCondition);\r\n }", "public function updateClubVideo() {\n //if($this->input->post('submit')){\n if (!$this->input->is_ajax_request()) {\n die(\"No direct access allowed!\");\n }\n $id = $this->input->post('videoid');\n $this->load->helper('videos_helper');\n \n if ($this->form_validation->run('video_validation') == FALSE) {\n $mess = array('type'=>'error', 'msg'=> $this->lang->line(\"please_enter_required_field\"));\n echo json_encode($mess);\n exit();\n }else{\n $video_url = $this->input->post('video_url');\n $orignal_video_url = $this->input->post('video_url'); // this url for use update time\n $video_id = get_vine_video_url($video_url);\n $video_type = $this->input->post('video_type');\n \n if($video_type != 'invalid') {\n \n if($video_type == 'vine') {\n $video_id = basename($video_url);\n $thumb_image = getVineVideoThumb($video_id);\n $url = \"https://vine.co/v/\".$video_id.\"/embed/simple\";\n }\n\n if($video_type == 'vimeo') {\n $vimeo_video_data = getVimeoVideoFromUrl($video_url);\n $thumb_image = $vimeo_video_data->thumbnail_url;\n $video_id = $vimeo_video_data->video_id;\n $url = 'https://player.vimeo.com/video/'.$video_id;\n } \n\n\n if($video_type == 'youtube') {\n $video_id = getYouTubeIdFromURL($video_url);\n $url = 'https://www.youtube.com/embed/'.$video_id;\n $thumb_image = getYouTubeVideoThumb($video_id);\n }\n\n $video_data = array(\n 'title' => $this->input->post('video_title'),\n 'filename' => $url,\n 'orignal_video_url' => $orignal_video_url, \n 'video_type' => $video_type,\n 'thumbnail_image' => $thumb_image,\n 'created_date' => date('Y-m-d H:i:s')\n );\n\n $result = $this->club_model->update_video_details($video_data, $id);\n if($result){\n $updated['id'] = $id;\n $updated['title'] = $this->input->post('video_title');\n $updated['url'] = $url;\n $updated['orignal_video_url'] = $orignal_video_url; \n $updated['thumbnail_image'] = $thumb_image;\n $updated['video_type'] = $video_type;\n \n echo json_encode($updated);\n exit(); \n }\n \n }\n } \n}", "public function change_status($vid, $status) {\n $result = db_query('UPDATE {video_zencoder} SET status = %d WHERE vid = %d ', $status, $vid);\n }", "public function addVideo(){\n global $base_secure_url;\n $team_query = '';\n $team_name = '';\n if(isset($_GET['team'])){\n $uid = $_GET['uid'];\n $gid = $_GET['team'];\n $team_name = \"Team: \";\n $team_name .= \\Drupal::service('my_groups.team.service')->getTeamName($gid, $uid);\n $team_query = [\"gid\" => $gid, \"muid\" => $uid];\n $account = user_load($uid);\n $roles = $account->getRoles();\n }\n else {\n $account = \\Drupal::currentUser();\n $uid = $account->id();\n $roles = $account->getRoles();\n }\n\n $variables = [];\n $variables['uid'] = $uid;\n $variables['media_preset'] = $this->getMediaPreset();\n $variables['mks'] = $this->getMKS($uid);\n\n $userProfessional = 0;\n $mediaCount = 0;\n if(in_array('content_creator', $roles)) {\n $userProfessional = 1;\n }\n //Check user role as admin\n $useradmin = 0;\n if(in_array('administrator', $roles)) {\n $useradmin = 1;\n }\n // transition tab\n $variables['transitions'] = $this->getVideoTransitions();\n $variables['transition_duration'] = $this->video_transition_duration;\n $variables['userProfessional'] = $userProfessional;\n $variables['useradmin'] = $useradmin;\n $variables['mediaCount'] = $mediaCount;\n $variables['team_query'] = $team_query;\n $variables['team_name'] = $team_name;\n \n // libraries\n $libraries[] = 'media_vault_tool/react.min';\n\t\t$libraries[] = 'media_vault_tool/react.dom.min';\n\t\t$libraries[] = 'media_vault_tool/axios';\n\t\t$libraries[] = 'media_vault_tool/km_global';\n $libraries[] = 'media_kit_selector/media.kit.global';\n\t\t$libraries[] = 'video_maker_tool/vmt';\n\t\t$libraries[] = 'video_maker_tool/vmt.cropit';\n\t\t$libraries[] = 'video_maker_tool/vmt.tagsinput';\n \n $render_data['theme_data'] = [\n '#theme' => 'video-maker-tool-add',\n '#variables' => $variables,\n '#attached' => [\n 'library' => $libraries, \n 'drupalSettings' => [\n 'media_base_url' => $base_secure_url, \n 'user_id' => $uid,\n 'video_id' => 0,\n 'media_preset_id' => 0,\n 'userProfessional' => $userProfessional,\n 'mediaCount' => $mediaCount,\n ],\n ],\n ];\n\n return $render_data; \n\t}", "public function updateCpackVideo($requestContent)\n {\n }", "public function updateVideo($id)\n {\n /**\n * Check if the video id is not empty.\n */\n if (!empty($id)) {\n /**\n * Set validation rules for edit functionality.\n */\n $video = $this->video->findorfail($id);\n if ($video->is_live) {\n $this->setRules([StringLiterals::TITLE => StringLiterals::REQUIRED, 'presenter' => 'required', 'description' => StringLiterals::REQUIRED, 'is_featured' => StringLiterals::REQUIREDINTEGER, StringLiterals::ISACTIVE => StringLiterals::REQUIREDINTEGER]);\n } else {\n $this->setRules([StringLiterals::TITLE => StringLiterals::REQUIRED, 'presenter' => 'required', StringLiterals::CATEGORYIDS => 'required|array', 'description' => StringLiterals::REQUIRED, 'is_featured' => StringLiterals::REQUIREDINTEGER, StringLiterals::ISACTIVE => StringLiterals::REQUIREDINTEGER, 'trailer_status' => 'required']);\n }\n $this->validate($this->request, $this->getRules());\n $video->title = $this->request->title;\n $video->short_description = ($this->request->has('short_description')) ? $this->request->short_description : '';\n $video->description = $this->request->description;\n $video->trailer_status = ( int )$this->request->trailer_status;\n $video->is_active = ( int )$this->request->is_active;\n $video->published_on = Carbon::parse($this->request->published_on);\n $video->updator_id = $this->authUser->id;\n $video->video_order = ( int )$this->request->video_order;\n if ($this->request->has('presenter')) {\n $video->presenter = $this->request->presenter;\n }\n if ($this->request->has('tags')) {\n $this->videoTag->where(StringLiterals::VIDEOID, $id)->delete();\n foreach ($this->request->tags as $value) {\n $tag = $this->tag->where('name', $value)->first();\n if (empty($tag)) {\n $tag = new Tag();\n $tag->name = $value;\n $tag->save();\n }\n $tag->videos()->attach($id);\n }\n }\n if ($this->request->has(StringLiterals::THUMBNAIL)) {\n $thumbUrl = explode(\"/\", $this->request->thumbnail);\n $video->thumbnail_image = $thumbUrl [count($thumbUrl) - 1];\n $video->thumbnail_path = $thumbUrl [count($thumbUrl) - 1];\n }\n if ($this->request->has(StringLiterals::POSTERIMAGE)) {\n $posterUrl = explode(\"/\", $this->request->poster_image);\n $video->poster_image = $posterUrl [count($posterUrl) - 1];\n }\n if ($this->request->has('is_notify')) {\n $video->is_notify = $this->request->is_notify;\n }\n $isVideo = false;\n /**\n * Update the video details in the data base.\n */\n if ($video->save()) {\n $this->saveVideoCategories($id);\n $isVideo = true;\n }\n return $isVideo;\n } else {\n return false;\n }\n }", "public function process()\n\t{\n\t\tPhpfox::isUser(true);\n\t\t$bIsEdit = false;\n\t\t$sStep = $this->request()->get('step', false);\n\t\t$sAction = $this->request()->get('req3', false);\n\t\t$aCallback = false;\t\t\n\t\t\n\t\tif (($iId = $this->request()->getInt('id')))\n\t\t{\n\t\t\tif (($aVideo = Phpfox::getService('video')->getForEdit($iId)))\n\t\t\t{\n\t\t\t\t$bIsEdit = true;\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tif ($bIsEdit === false)\n\t\t{\n\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('video.unable_to_edit_this_video'));\n\t\t}\n\t\t\n\t\tif (($aVals = $this->request()->getArray('val')))\n\t\t{\n\t\t\tif (($mReturn = Phpfox::getService('video.process')->update($aVideo['video_id'], $aVals)))\n\t\t\t{\n\t\t\t\tif (isset($aVals['actions']))\n\t\t\t\t{\n\t\t\t\t\t$this->url()->send('video.edit.' . $aVals['action'], array('id' => $aVideo['video_id']), Phpfox::getPhrase('video.video_successfully_updated'));\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$this->url()->permalink('video', $aVideo['video_id'], $aVideo['title'], true, Phpfox::getPhrase('video.video_successfully_updated'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sStep = (isset($aVals['step']) ? $aVals['step'] : '');\n\t\t\t$sAction = (isset($aVals['action']) ? $aVals['action'] : '');\n\t\t}\n\t\t\n\t\tif ($aVideo['module_id'] != 'video' && Phpfox::hasCallback($aVideo['module_id'], 'uploadVideo'))\n\t\t{\n\t\t\t$aCallback = Phpfox::callback($aVideo['module_id'] . '.uploadVideo', $aVideo['item_id']);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t$sVideoMessage = '';\n\t\tif (($sVideoMessage = Phpfox::getLib('session')->get('video_add_message')))\n\t\t{\n\t\t\tPhpfox::getLib('session')->remove('video_add_message');\n\t\t}\t\t\n\t\t\n\t\t$this->template()->buildPageMenu('js_video_block', \n\t\t\tarray(\n\t\t\t\t'detail' => Phpfox::getPhrase('video.video_details'),\n\t\t\t\t'photo' => Phpfox::getPhrase('video.photo')\n\t\t\t), \n\t\t\tarray(\n\t\t\t\t'link' => $this->url()->permalink('video', $aVideo['video_id'], $aVideo['title']),\n\t\t\t\t'phrase' => Phpfox::getPhrase('video.view_this_video')\n\t\t\t)\n\t\t);\t\t\n\n\t\t$iMaxFileSize = (Phpfox::getUserParam('video.max_size_for_video_photos') === 0 ? null : ((Phpfox::getUserParam('video.max_size_for_video_photos') / 1024) * 1048576));\n\t\t$this->template()->setTitle(Phpfox::getPhrase('video.editing_video') . ': ' . $aVideo['title'])\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('video.videos'), $this->url()->makeUrl('video'))\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('video.editing_video') . ': ' . $aVideo['title'], $this->url()->makeUrl('video.edit', array('id' => $iId)), true)\n\t\t\t->setPhrase(array(\n\t\t\t\t\t'core.select_a_file_to_upload'\n\t\t\t\t)\n\t\t\t)\t\t\t\t\n\t\t\t->setHeader(array(\n\t\t\t\t\t'video.js' => 'module_video',\n\t\t\t\t\t'edit.js' => 'module_video',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.videoEditCategory = function(){var aCategories = explode(\\',\\', \\'' . $aVideo['categories'] . '\\'); for (i in aCategories) { $(\\'#js_mp_holder_\\' + aCategories[i]).show(); $(\\'#js_mp_category_item_\\' + aCategories[i]).attr(\\'selected\\', true); }}</script>',\n\t\t\t\t\t'progress.js' => 'static_script',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.videoProgressBarSettings = function(){ oProgressBar = {holder: \\'#js_video_block_photo_holder\\', progress_id: \\'#js_progress_bar\\', uploader: \\'#js_progress_uploader\\', add_more: false, max_upload: 1, total: 1, frame_id: \\'js_upload_frame\\', file_id: \\'image\\'}; $Core.progressBarInit();}</script>'\t\t\t\t\t\n\t\t\t\t)\n\t\t\t)\n\t\t\t->assign(array(\n\t\t\t\t\t'aCallback' => $aCallback,\n\t\t\t\t\t'sStep' => $sStep,\n\t\t\t\t\t'sVideoMessage' => $sVideoMessage,\n\t\t\t\t\t'sAction' => ($sAction ? $sAction : 'detail'),\n\t\t\t\t\t'sCategories' => Phpfox::getService('video.category')->get(),\n\t\t\t\t\t'aForms' => $aVideo,\n\t\t\t\t\t'iMaxFileSize' => $iMaxFileSize,\n\t\t\t\t\t'sOnClickDeleteImage' => \"if (confirm('\".Phpfox::getPhrase('video.are_you_sure').\"')) { $('#js_submit_upload_image').show(); $('#js_video_upload_image').show(); $('#js_video_current_image').remove(); $.ajaxCall('video.deleteImage', 'id=\".$aVideo['video_id'].\"'); } return false;\",\n\t\t\t\t\t'iMaxFileSize_filesize' => Phpfox::getLib('phpfox.file')->filesize($iMaxFileSize)\n\t\t\t\t)\n\t\t\t);\n\t}", "function lrs_trigger_view_course_video($course) {\n global $user;\n // Get the action ids.\n $aids = _trigger_get_hook_aids('lrs', 'view_course_video');\n if($aids) {\n // Get who view the course.\n $account = user_load($user->uid);\n foreach($aids as $aid => $action_info) {\n actions_do($aid, $course, array('user' => $account));\n } \n }\n}", "public function listing_updated_video_item( $meta_id, $post_id, $meta_key, $meta_value ) {\n\n\t\tglobal $wpdb, $mycred_log_table;\n\n\t\t$user_id = get_current_user_id();\n\n\t\t// Check if user is updating logo only and of lising only (required)\n\t\tif ( \"listing\" != get_post_type( $post_id ) ) return;\n\n\t\tif ( \"wilcity_video_srcs\" != $meta_key ) return;\n\n\t\t$videos = maybe_unserialize( $meta_value );\n\n\t\t$logs = $wpdb->get_results( \"SELECT * FROM {$mycred_log_table} WHERE ref ='wilcity_mycred_videos_updated_each' AND ref_id = {$post_id} \");\n\t\t\n\t\tif( $logs ) {\n\t\t\t$total_creds \t\t\t= wp_list_pluck( $logs, \"creds\" );\n\t\t\t$total_creds \t\t\t= array_sum($total_creds);\n\t\t\t$total_creds_remove \t= -1 * $total_creds;\n\t\t\t$total_creds_remove = $this->core->number( $total_creds_remove );\n\t\t\t$total_creds_remove = $this->core->enforce_max( $user_id, $total_creds_remove );\n\t\t\t$log_ids \t\t\t\t= wp_list_pluck( $logs, \"id\" );\n\t\t\t$log_ids \t\t\t\t= implode(\",\", $log_ids);\n\n\t\t\t$wpdb->query(\"DELETE FROM {$mycred_log_table} WHERE id IN({$log_ids}) \"); \n\n\t\t\t$this->core->update_users_balance( (int) $user_id, $total_creds_remove, $this->mycred_type );\n\n\t\t\t// Update total balance (if enabled)\n\t\t\tif ( MYCRED_ENABLE_TOTAL_BALANCE && MYCRED_ENABLE_LOGGING && ( $total_creds_remove > 0 || ( $total_creds_remove < 0 && \"wilcity_mycred_videos_updated_each\" == 'manual' ) ) ) {\n\t\t\t\t$this->update_users_total_balance( (int) $user_id, $total_creds_remove, $this->mycred_type );\n\t\t\t}\n\t\t}\n\n\t\t// Check if user is excluded (required)\n\t\tif ( $this->core->exclude_user( $user_id ) ) return;\n\n\t\t// Limit & Execute\n\t\tforeach ( $videos as $video_id => $video_url) {\n\t\t\t$this->core->add_creds(\n\t\t\t\t'wilcity_mycred_videos_updated_each',\n\t\t\t\t$user_id,\n\t\t\t\t$this->prefs['creds'],\n\t\t\t\t$this->prefs['log'],\n\t\t\t\t$post_id,\n\t\t\t\t$video_id,\n\t\t\t\t$this->mycred_type\n\t\t\t);\n\t\t}\n\n\t\t/***********************************/\n\n\t\t/*$user_id = get_current_user_id();\n\n\t\t// Check if user is updating logo only and of lising only (required)\n\t\tif ( \"listing\" != get_post_type( $post_id ) ) return;\n\n\t\tif ( \"wilcity_video_srcs\" != $meta_key ) return;\n\n\t\t$videos = maybe_unserialize( $meta_value );\n\t\t\n\t\tif ( empty($videos ) || count($videos) < 1 || !is_array($videos) ) return;\n\n\t\t// Check if user is excluded (required)\n\t\tif ( $this->core->exclude_user( $user_id ) ) return;\n\n\t\t// Limit & Execute\n\t\tif ( ! $this->over_hook_limit( '', 'wilcity_mycred_videos_updated_each', $user_id ) ) {\n\t\t\tforeach ( $videos as $video_id => $video_url) {\n\t\t\t\tif( ! $this->has_entry( 'wilcity_mycred_videos_updated_each', $post_id, $user_id, $video_id, $this->mycred_type ) ) {\n\t\t\t\t\t$this->core->add_creds(\n\t\t\t\t\t\t'wilcity_mycred_videos_updated_each',\n\t\t\t\t\t\t$user_id,\n\t\t\t\t\t\t$this->prefs['creds'],\n\t\t\t\t\t\t$this->prefs['log'],\n\t\t\t\t\t\t$post_id,\n\t\t\t\t\t\t$video_id,\n\t\t\t\t\t\t$this->mycred_type\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t}", "public function testUpdateOrganizationCameraOnboardingStatuses()\n {\n }", "public function changeQuizStatus() {\n $type = isset($_POST['type']) ? strip_tags($_POST['type']) : 'default';\n // Get current user globally as all the request are related to current user\n $current_user = \\Drupal::entityTypeManager() -> getStorage('user') -> load(\\Drupal::currentUser() -> id());\n \n $message = [];\n \n switch ($type) {\n case 'quiz_next' :\n $message['code'] = 200;\n $message['message'] = $this -> t('Question Submitted') . $nid;\n break;\n \n case 'quiz_submit' :\n $message['code'] = 200;\n $message['message'] = $this -> t('Quiz Submitted');\n break;\n \n case 'video_progress' :\n $video_time = isset($_POST['video_time']) ? round(strip_tags($_POST['video_time'])) : 0; // Current playing time of the video\n $video_id = isset($_POST['video_id']) ? strip_tags($_POST['video_id']) : 0; // Current video ID\n \n //get current user progress card node\n $user_progress_query = \\Drupal::entityQuery('node')\n -> condition('status', 1)\n -> condition('type', 'child_progress')\n -> condition('field_attached_user', $current_user -> id())\n -> execute();\n\n $user_progress_raw = array_values($user_progress_query);\n $user_progress_id = $user_progress_raw[0];\n $user_progress_node = Node::load($user_progress_id);\n $watched_videos = $user_progress_node -> get('field_videos_watched') -> getValue();\n $existing_record = false; // To check if the posted id already exists or not\n \n foreach ($watched_videos as $key => $watched_video) {\n $watched_video_settings = \\Drupal\\field_collection\\Entity\\FieldCollectionItem::load($watched_video['value']);\n $watched_video = $watched_video_settings -> get('field_single_video') -> getValue();\n $watched_video_target_id = isset($watched_video[0]['target_id']) ? $watched_video[0]['target_id'] : 0;\n if ($watched_video_target_id == $video_id) {\n //Set the field_single_video value.\n $watched_video_settings -> set('field_single_video', $video_id);\n //Set the field_single_video_progress value\n $watched_video_settings -> set('field_single_video_progress', $video_time);\n //Save the field_collection item. This will save the host node too.\n $watched_video_settings -> save();\n //Update status that video record already exists (avoiding addition of duplicate entries)\n $existing_record = true;\n }\n }\n \n if (!$existing_record && $video_id != 0) {\n $new_watched_video = entity_create('field_collection_item', array('field_name' => 'field_videos_watched'));\n //Set the relationship to the host node.\n $new_watched_video -> setHostEntity($user_progress_node);\n //Set the field_single_video value.\n $new_watched_video -> set('field_single_video', $video_id);\n //Set the field_single_video_progress value\n $new_watched_video -> set('field_single_video_progress', $video_time);\n //Save the field_collection item. This will save the host node too.\n $new_watched_video -> save();\n }\n\n $message['code'] = 200;\n $message['message'] = $this -> t('Video Progress Updated');\n break;\n \n default :\n $message['code'] = 403;\n $message['message'] = $this -> t('Invalid request');\n }\n \n $response_params = Json::encode($message);\n \n $response = new Response();\n $response -> setContent($response_params);\n $response -> headers -> set('Content-Type', 'application/json');\n return $response;\n }", "function updateStatus($assetID, $status) {\n $statusconArray = array (\n STATUS_RUNNING,\n STATUS_STOPPED,\n STATUS_NIL \n );\n if (! in_array ( $status, $statusconArray )) {\n \n $this->logHelper->log ( ERROR, \"Invalid status\" );\n return false;\n }\n $statusArray = array (\n \"status\" => $status \n );\n $this->updateAsset ( $assetID, $statusArray );\n }", "public function check_update_processing_status() {\n\t\t// get next 5 new videos.\n\t\t$items = mpplt_get_items(\n\t\t\tarray(\n\t\t\t\t'completed' => 0,\n\t\t\t\t'status' => 'processing',\n\t\t\t\t'queue_type' => 'conversion',\n\t\t\t\t'orderby' => 'created_at',\n\t\t\t\t'order' => 'ASC',\n\t\t\t\t'per_page' => 5,\n\t\t\t)\n\t\t);\n\n\t\tif ( empty( $items ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $items as $item ) {\n\t\t\t$this->update_state( $item );\n\t\t}\n\t}", "public function _on_updated()\n {\n // TODO: Do this only on status changes\n\n if (isset($GLOBALS['disable_activitystream']))\n {\n return true;\n }\n\n if ($_MIDCOM->auth->request_sudo('midcom'))\n {\n // This is here because creating an object calls create and update..... and we don't want duplicate entry's\n $qb = midcom_helper_activitystream_activity_dba::new_query_builder();\n $qb->set_limit(1);\n $qb->add_constraint('application', '=', 'fi.kilonkipinat.forms');\n $qb->add_constraint('target', '=', $this->guid);\n $groups = $qb->execute();\n if ( $groups\n && is_array($groups)\n && count($groups) > 0)\n {\n $new_object = false;\n }\n else\n {\n $new_object = true;\n }\n\n $actor = midcom_db_person::get_cached($_MIDGARD['user']);\n $activity = new midcom_helper_activitystream_activity_dba();\n $activity->target = $this->guid;\n $activity->application = 'fi.kilonkipinat.forms';\n $activity->actor = $actor->id;\n $activity->verb = 'http://activitystrea.ms/schema/1.0/post';\n\n if ($new_object)\n {\n $activity->summary = sprintf('%s loi kulukorvauslomakkeen', $actor->name);\n }\n else\n {\n $activity->summary = sprintf('%s muokkasi kulukorvauslomaketta', $actor->name);\n }\n \n\n $activity->create();\n\n $_MIDCOM->auth->drop_sudo();\n }\n\n return true;\n }", "public function changeStatus(Request $request) {\n $id = $request->id;\n $val = $request->status;\n try {\n $model = InspiringVideo::find($id);\n $model->status = $val;\n $model->save();\n return response()->json($id);\n } catch (\\Laracasts\\Validation\\FormValidationException $e) {\n return $e->getErrors();\n }\n }", "public function editVideo($video_id = 0){\n global $base_secure_url;\n $team_query = '';\n $team_name = '';\n if(isset($_GET['team'])){\n $uid = $_GET['uid'];\n $gid = $_GET['team'];\n $team_name = \"Team: \";\n $team_name .= \\Drupal::service('my_groups.team.service')->getTeamName($gid, $uid);\n $team_query = [\"gid\" => $gid, \"muid\" => $uid];\n $account = user_load($uid);\n $roles = $account->getRoles();\n }\n else {\n $account = \\Drupal::currentUser();\n $uid = $account->id();\n $roles = $account->getRoles();\n }\n $userProfessional = 0;\n $mediaCount = 0;\n if(in_array('content_creator', $roles)) {\n $userProfessional = 1;\n }\n //Check user role as admin\n $useradmin = 0;\n if(in_array('administrator', $roles)) {\n $useradmin = 1;\n }\n $clone = 0;\n if(isset($_GET['clone']) && $_GET['clone'] == 'yes'){\n $clone = 1;\n }\n $variables = [];\n \n $query = \\Drupal::database()->select('vmt_videos', 'v');\n $query->fields('v');\n $query->condition('v.video_id', $video_id, '=');\n $video = $query->execute()->fetchObject();\n if(empty($video)){\n throw new \\Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException();\n }\n \n //if(in_array($video->render_status, ['Pending', 'Ready']) && $clone == 0){\n if(in_array($video->render_status, ['Pending']) && $clone == 0){\n \\Drupal::messenger()->addStatus(t('This video can\\'t be editable.'));\n return new RedirectResponse(\\Drupal::url('videomaker.video.list', ['user' => $uid], ['absolute' => TRUE]));\n }\n \n $variables['video'] = $video;\n $variables['uid'] = $uid;\n $variables['media_preset'] = $this->getMediaPreset();\n $variables['mks'] = $this->getMKS($uid);\n $variables['clone'] = $clone;\n\t\n // default image\n $field_info = FieldConfig::loadByName('media', 'video', 'field_video_thumbnail');\n $image_uuid = $field_info->getSetting('default_image')['uuid'];\n $default_image = \\Drupal::service('entity.repository')->loadEntityByUuid('file', $image_uuid)->getFileUri();\n \n // story board\n $story_board = [];\n $selected_media = ['id' => 0, 'mid' => 0, 'rid' => 0, 'type' => 'image'];\n $mquery = \\Drupal::database()->select('vmt_media', 'm');\n $mquery->fields('m');\n $mquery->condition('m.video_id', $video_id, '=');\n $mquery->orderBy('m.ordering', 'ASC');\n $story_board_medias = $mquery->execute();\n \n $story_board_media_count = 0;\n foreach($story_board_medias as $story_board_media) {\n $media = Media::load($story_board_media->mid);\n if(is_object($media)) {\n $thumb_style = \\Drupal::entityTypeManager()->getStorage('image_style')->load('media_thumbnail');\n // image\n if($media->hasField('field_media_image') && !empty($media->field_media_image->entity)) {\n $src = $thumb_style->buildUrl($media->field_media_image->entity->getFileUri());\n $orig_src = file_create_url($media->field_media_image->entity->getFileUri());\n }\n // video thumbnail\n if($media->hasField('field_media_video_file')) {\n if(empty($media->field_video_thumbnail->entity)){\n $src = $thumb_style->buildUrl($default_image); \n $orig_src = file_create_url($default_image);\n }else{\n $src = $thumb_style->buildUrl($media->field_video_thumbnail->entity->getFileUri());\n $orig_src = file_create_url($media->field_video_thumbnail->entity->getFileUri());\n }\n }\n \n // story board\n $story_board[] = [\n 'id' => $story_board_media->id, \n 'mid' => $story_board_media->mid, \n 'rid' => $story_board_media->rid, \n 'src' => $src, \n 'orig_src' => $orig_src, \n 'duration' => $story_board_media->duration,\n 'selected' => $story_board_media->selected,\n 'clip_zoom' => $story_board_media->clip_zoom,\n ];\n \n // selected media\n if(($story_board_media_count == 0) || ($story_board_media->selected == 1)) {\n $selected_media['id'] = $story_board_media->id;\n $selected_media['mid'] = $story_board_media->mid;\n $selected_media['rid'] = $story_board_media->rid;\n $selected_media['duration'] = $story_board_media->duration;\n $selected_media['type'] = $story_board_media->type;\n }\n \n $story_board_media_count++;\n }\n }\n\n \n $mediaCount = count($story_board);\n $variables['story_board'] = $story_board;\n $variables['selected_media'] = $selected_media;\n // transition tab\n $variables['transitions'] = $this->getVideoTransitions();\n $variables['transition_duration'] = $this->video_transition_duration;\n $variables['mediaCount'] = $mediaCount;\n $variables['useradmin'] = $useradmin;\n $variables['team_query'] = $team_query;\n $variables['team_name'] = $team_name;\n $variables['userProfessional'] = $userProfessional;\n \n // libraries\n $libraries[] = 'media_vault_tool/react.min';\n\t\t$libraries[] = 'media_vault_tool/react.dom.min';\n\t\t$libraries[] = 'media_vault_tool/axios';\n\t\t$libraries[] = 'media_vault_tool/km_global';\n $libraries[] = 'media_kit_selector/media.kit.global';\n\t\t$libraries[] = 'video_maker_tool/vmt';\n\t\t$libraries[] = 'video_maker_tool/vmt.cropit';\n\t\t$libraries[] = 'video_maker_tool/vmt.tagsinput';\n \n $render_data['theme_data'] = [\n '#theme' => 'video-maker-tool-edit',\n '#variables' => $variables,\n '#attached' => [\n 'library' => $libraries, \n 'drupalSettings' => [\n 'media_base_url' => $base_secure_url, \n 'user_id' => $uid,\n 'video_id' => $video_id,\n 'media_preset_id' => $video->media_preset_id,\n 'soundtrack_data' => $video->sound_track,\n 'mediaCount' => $mediaCount,\n 'userProfessional' => $userProfessional,\n 'team_query' => $team_query,\n ],\n ],\n ];\n\n return $render_data; \n\t}", "function psn_updateStatus( $key = 0, $__notificationCode = 0, $status_venda = \"Aguardando pagamento\" ) {\r\n\r\n require_once 'database/database.php' ;\r\n\r\n $_dados = array( \r\n 'status_venda' => $status_venda , \r\n 'status' => $__notificationCode);\r\n\r\n # verifica se codigo recebido indica cancelamendo da compra.\r\n # Assim, damos baixa na venda e cancelamos a compra\r\n if($__notificationCode == 7) {\r\n $_dados['active'] = 0;\r\n }\r\n\r\n # atualiza tabela de vendas onde a coluna Key e' igual a \r\n # Key referencia retornado pelo Pagseguro.\r\n return Database::update_where( \"vendas\", array('key' => $key), $_dados );\r\n }", "protected function _updateStatus($id, $status) {\n $video = Mage::getModel('vidtest/video')->load($id);\n if ($video->getId() && ($status !== null)) {\n $video->setStatus($status);\n try {\n $video->save();\n $this->_addPointsForVideo($video);\n\n return true;\n } catch (Exception $e) {\n return false;\n }\n }\n return false;\n }", "public function update_uuid_status_and_lang( $id_attachment, $lang, $job_id ) {\n\t\tupdate_post_meta( $id_attachment, 'wubtitle_lang_video', $lang );\n\t\tupdate_post_meta( $id_attachment, 'wubtitle_job_uuid', $job_id );\n\t\tupdate_post_meta( $id_attachment, 'wubtitle_status', 'pending' );\n\t}", "public function a2020_save_videos(){\n\t\t\n\t\tif (defined('DOING_AJAX') && DOING_AJAX && check_ajax_referer('admin2020-settings-security-nonce', 'security') > 0) {\n\t\t\t\n\t\t\t$video = $this->utils->clean_ajax_input($_POST['data']);\n\t\t\t$a2020_options = get_option( 'admin2020_settings' );\n\t\t\t\n\t\t\tif($video == \"\" || !is_array($video)){\n\t\t\t\t$message = __(\"No video supplied to save\",'admin2020');\n\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($a2020_options['modules']['admin2020_admin_overview']['videos'])){\n\t\t\t\t\n\t\t\t\t$currentvideos = $a2020_options['modules']['admin2020_admin_overview']['videos'];\n\t\t\t\t\n\t\t\t\tforeach($currentvideos as $avideo){\n\t\t\t\t\tif($video[0] == $avideo[0]){\n\t\t\t\t\t\t$message = __(\"Video name must be unique\",'admin2020');\n\t\t\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_push($currentvideos,$video);\n\t\t\t\t$a2020_options['modules']['admin2020_admin_overview']['videos'] = $currentvideos;\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$a2020_options['modules']['admin2020_admin_overview']['videos'] = array($video);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(is_array($a2020_options)){\n\t\t\t\t\n\t\t\t\tob_start();\n\t\t\t\t\n\t\t\t\tforeach ($a2020_options['modules']['admin2020_admin_overview']['videos'] as $video) { ?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><?php echo $video[0]?></td>\n\t\t\t\t\t\t<td><?php echo $video[1]?></td>\n\t\t\t\t\t\t<td><?php echo $video[2]?></td>\n\t\t\t\t\t\t<td><?php echo $video[3]?></td>\n\t\t\t\t\t\t<td><a href=\"#\" class=\"uk-button-danger uk-icon-button\" onclick=\"a2020_delete_video('<?php echo $video[0]?>')\" style=\"width:25px;height:25px;\" uk-icon=\"icon:trash;ratio:0.8\"></a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php } \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$table = ob_get_clean();\n\t\t\t\t\n\t\t\t\tupdate_option( 'admin2020_settings', $a2020_options);\n\t\t\t\t$returndata = array();\n\t\t\t\t$returndata['success'] = true;\n\t\t\t\t$returndata['message'] = __('Video saved','admin2020');\n\t\t\t\t$returndata['content'] = $table;\n\t\t\t\techo json_encode($returndata);\n\t\t\t} else {\n\t\t\t\t$message = __(\"Something went wrong\",'admin2020');\n\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tdie();\n\t\t\t\n\t\t\t\n\t\t}\n\t\tdie();\t\n\t\t\n\t}", "public function update_statustc_video(){\n\t\t$this->load->model('Function_query_model', 'func_query', FALSE);\n\t\t$this->load->model('Lesson_model', 'lesson', FALSE);\n\t\t$this->lesson->loadDB();\n\t\t$id = isset($_REQUEST['id'])?$_REQUEST['id']:\"\";\n\t\t$les_id = isset($_REQUEST['les_id'])?$_REQUEST['les_id']:\"\";\n\t\t$lestc_timevideo = isset($_REQUEST['lestc_timevideo'])?$_REQUEST['lestc_timevideo']:\"\";\n \tdate_default_timezone_set(\"Asia/Bangkok\");\n \t$data = array();\n \t$data['lestc_timevideo'] = $lestc_timevideo;\n $data['lestc_modtime'] = date('Y-m-d H:i:s');\n\n if($lestc_timevideo!=\"\"&&$id!=\"\"){\n \t$this->db->where('lestc_id',$id);\n \t$this->db->update('LMS_LES_TC',$data);\n }else{\n \tif($id!=\"\"){\n \t\t//update_lesson($les_id);\n \t}\n }\n\t}", "public function regularAppointmentComplete()\r\n {\r\n $command = 'task:appointment:complete';\r\n $this->addRegularJob($command);\r\n }", "public function addVideo()\r\n\t{\r\n\t\t$title \t\t= Input::get('title');\r\n\t\t$link \t\t= Input::get('link');\r\n\t\t$description = Input::get('description');\r\n\t\t$category_id = Input::get('category_id');\r\n\t\t$user_id = Input::get('user_id');\r\n\t\t$date_created = date(\"Y-m-d h:i:s\");\r\n\t\t$status = Input::get('status');\r\n\r\n\t\t$validator = Validator::make(\r\n\t\t\t\t\t array('title' \t\t=> $title,\r\n\t\t\t\t\t \t 'link' \t\t=> $link,\r\n\t\t\t\t\t \t 'category_id' => $category_id,\r\n\t\t\t\t\t \t 'user_id' => $user_id),\r\n\t\t\t\t\t array('title' \t\t=> 'required',\r\n\t\t\t\t\t \t 'link' \t\t=> 'required',\r\n\t\t\t\t\t \t 'category_id' => 'required',\r\n\t\t\t\t\t \t 'user_id' => 'required'\r\n\t\t\t\t\t \t)\r\n\t\t\t\t\t);\r\n\t\tif($validator->fails())\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$resp \t= $this->repo->insertVideo($title,$link,$description,$category_id,$user_id,$date_created,$status);\r\n\t\t\tif($resp)\r\n\t\t\t {\r\n\t\t\t\t $status = 200;\r\n\t\t\t\t $data = $resp;\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t $status = 401;\r\n\t\t\t $data = array('error'=>array('message'=>'hours status updated',\r\n\t\t\t 'type'=>'Unauthorized',\r\n\t\t\t 'code'=>401));\r\n\t\t\t }\r\n \r\n \treturn Response::json($data,$status);\r\n\t\t}\r\n\r\n\t}", "public function joinpromo_status_put(){\n $param = array();\n $param[\"NO_TRANS\"] = $this->put(\"no_trans\");\n $param[\"STATUS_JOINPROMO\"] = $this->put(\"status_jp\");\n $param[\"LASTMODIFIED_BY\"] = $this->put(\"lastmodified_by\");\n $this->resultdata(\"SP_TRANS_JOINPROMO_STATUS_UPDATE\",$param,'put',TRUE);\n }", "function Update_Status($server, $application_id, $status, $follow_up_time = NULL, $agent_id = NULL, $queues=TRUE, $queue_name = NULL)\n{\n\treturn doOnlyUpdateStatus($application_id, $status, $follow_up_time, $agent_id);\n}", "function play_video(){\n\n if(isset($_POST['time_started'])){\n global $connection;\n //GET THE DATAS\n $user_id=$_SESSION['user_id'];\n $stepp=$_POST['time_started'];\n $time_started=$_POST['time_started'];\n //FIND THE USER\n $find_data = \"SELECT * FROM users WHERE user_id='$user_id'\";\n $result_find = mysqli_query($connection,$find_data);\n $row_find=mysqli_fetch_assoc($result_find);\n if($row_find['time_started'] == 0){ //updare the new time \n mysqli_query($connection,\"UPDATE users SET time_started = '$time_started' WHERE user_id='$user_id'\");\n }\n }\n }", "function editVideo($videoID,$owner,$content,$url,$name){\n\t\tconnectDB();\n\t\t$query=\"UPDATE env_video SET (owner='\".$owner.\"',content='\".$content.\"',url='\".$url.\"',name='\".$name.\"') WHERE id='\".$videoID.\"'\";\n\t\t$execute=mysql_query($query);\n\t\tif($execute){\n\t\t\treturn 'UPDATE SUCCESSFULLY';\n\t\t}else{\n\t\t\treturn 'UPDATE FAIL';\t\n\t\t}\n\t\tcloseDB();\n\t}", "public function admin_uploadVideo() {\n\t\t$typeId = $this->Attachment->Type->field('id', array('Type.name' => 'video'));\n\t\t$action = 'uploadVideo';\n\t\t$token = null;\n\t\t$uniqueId = isset($this->request->query['id']) ? $this->request->query['id'] : null;\n\t\t$status = isset($this->request->query['status']) ? $this->request->query['status'] : null;\n\n\t\t// get token\n\t\tif ($this->request->is('post')) {\n\t\t\t$response = $this->Files->getYoutubeToken($this->request->data);\n\n\t\t\tif ($response->token != '') {\n\t\t\t\t$nextUrl = Router::url(array(\n\t\t\t\t\t'admin' => true,\n\t\t\t\t\t'controller' => 'attachments',\n\t\t\t\t\t'action' => 'uploadVideo',\n\t\t\t\t), true);\n\t\t\t\t$action = $response->url . '?nexturl=' . urlencode($nextUrl);\n\t\t\t\t$token = $response->token;\n\t\t\t\t$data = array(\n\t\t\t\t\t'name' => $this->request->data['Attachment']['name'],\n\t\t\t\t\t'text' => $this->request->data['Attachment']['text'],\n\t\t\t\t\t'type_id' => $this->request->data['Attachment']['type_id'],\n\t\t\t\t\t'user_id' => $this->Auth->user('id'),\n\t\t\t\t\t'status' => $this->request->data['Attachment']['status'],\n\t\t\t\t);\n\t\t\t\t$this->Session->write('Video', $data);\n\t\t\t}\n\t\t}\n\n\t\t// save uploaded video\n\t\tif ($uniqueId != '' && $status == 200 && $this->Session->check('Video')) {\n\t\t\t$this->request->data['Attachment'] = $this->Session->read('Video');\n\t\t\t$this->Session->delete('Video');\n\t\t\t$this->request->data['Attachment']['url'] = 'http://www.youtube.com/watch?v=' . $uniqueId;\n\n\t\t\tif ($this->Attachment->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The attachment has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The attachment could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this->set(compact('action', 'token', 'typeId'));\n\t}", "public function updateVideo($videoManagerId, $videoId, $title, $description);", "public function updateVideo($video) {\n\t //$rs = $this->db->query(\"update video set thumbnail_2 = \".$video['thumbnail_2'].\" where id = '\".$video['id'].\"'\");\n //echo $rs;\n\t}", "public function updateStatus($table,$col,$val,$id) {\t\t\n\tglobal $dbError;\t\t\t\t$dbError = true;\n\t$query = \"UPDATE $table SET $col='$val' WHERE id = \".$id;\t\t\t\n\t$this->db->query($query) or die($this->db->error);\t\t\n\tif($table==\"main_video_promo\"){\t\t\n\t$query = \"UPDATE $table SET $col=2 WHERE id != \".$id;\t\n\t$this->db->query($query) or die($this->db->error);\t\t}\t}", "public function video_update($videoData,$videoId,$slug)\n {//function for updating video starts\n\n $this->_wpdb->update( $this->_videotable, $videoData, array( 'vid' => $videoId ));\n $slug_id=$this->_wpdb->get_var(\"SELECT slug FROM \".$this->_videotable.\" WHERE vid =$videoId\");\n if(empty($slug_id)){\n $post_content=\"[hdvideo id=\".$videoId.\"]\";\n\n $postsData= array(\n 'post_author' => $this->member_id,\n 'post_date' => date('Y-m-d H:i:s'),\n 'post_date_gmt' => date('Y-m-d H:i:s'),\n 'post_content' => $post_content,\n 'post_title' => $videoData['name'],\n 'post_excerpt' => '',\n 'post_status' => 'publish',\n 'comment_status' => 'open',\n 'ping_status' => 'closed',\n 'post_password' => '',\n 'post_name' => $slug,\n 'to_ping' => '',\n 'pinged' => '',\n 'post_modified' => date('Y-m-d H:i:s'),\n 'post_modified_gmt' => date('Y-m-d H:i:s'),\n 'post_content_filtered' => '',\n 'post_parent' => 0,\n 'guid' => '',\n 'menu_order' => '0',\n 'post_type' => 'videogallery',\n 'post_mime_type' => '',\n 'comment_count' => '0',\n );\n $this->_wpdb->insert( $this->_posttable, $postsData);\n $guid=get_bloginfo('url').\"/?post_type=videogallery&#038;p=\".$this->_wpdb->insert_id;\n $this->_wpdb->update($this->_posttable, array('guid' =>$guid), array( 'ID' => $this->_wpdb->insert_id ));\n $this->_wpdb->update($this->_videotable, array('slug' =>$this->_wpdb->insert_id), array( 'vid' => $videoId ));\n }else{\n $this->_wpdb->update($this->_posttable, array('comment_status' => 'open','post_title' =>$videoData['name'],'post_name' => $slug,'post_modified' => date('Y-m-d H:i:s'),'post_modified_gmt' => date('Y-m-d H:i:s')), array( 'ID' => $slug_id ));\n }\n\n\n return ;\n }", "function videolecture_update_instance($videolecture) {\n global $DB;\n\n $videolecture->timemodified = time();\n $videolecture->id = $videolecture->instance;\n\n $context = context_module::instance($videolecture->coursemodule);\n\n $attachmentoptions = array('subdirs' => VL_FILEMANAGER_SUBDIRS, 'maxbytes' => VL_FILEMANAGER_MAXBYTES, 'areamaxbytes' => VL_FILEMANAGER_AREAMAXBYTES,\n 'maxfiles' => VL_FILEMANAGER_MAXFILES, 'accepted_types' => VL_FILEMANAGER_ACCEPTED_TYPES, 'return_types'=> FILE_INTERNAL | FILE_EXTERNAL);\n\n $videolecture = file_postupdate_standard_filemanager($videolecture, 'attachment', $attachmentoptions, $context, 'mod_videolecture',\n 'attachment', $videolecture->id);\n\n $completiontimeexpected = !empty($videolecture->completionexpected) ? $videolecture->completionexpected : null;\n \\core_completion\\api::update_completion_date_event($videolecture->coursemodule, 'videolecture', $videolecture->id, $completiontimeexpected);\n\n return $DB->update_record(\"videolecture\", $videolecture);\n}", "protected function updateScheduleJob()\r\n\t{\r\n\t\t$sj_obj = $this->get_sj_srv()->get_dao()->get(array(\"id\" => strtolower($this->getPlatformId()) . \"_cv\"));\r\n\t\tif ($sj_obj)\r\n\t\t{\r\n\t\t\t$sj_obj->set_last_access_time($this->newLastAccessTime);\r\n\t\t\t$ret = $this->get_sj_srv()->get_dao()->update($sj_obj);\t\r\n\t\t\tif ($ret === FALSE)\r\n\t\t\t{\r\n\t\t\t\t$err_message = $this->get_sj_srv()->get_dao()->db->_error_message() . $this->get_sj_srv()->get_dao()->db->last_query();\r\n\t\t\t\t$this->send_alert_email(\"[CV] \" . $this->getPlatformId() . \", UPDATE schedule job fail\", $err_message);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$err_message = $this->get_sj_srv()->get_dao()->db->_error_message() . $this->get_sj_srv()->get_dao()->db->last_query();\r\n\t\t\t$this->send_alert_email(\"[CV] \" . $this->getPlatformId() . \", get schedule job fail\", $err_message);\t\t\r\n\t\t}\r\n\t}", "public function update(Request $request, CourseVideo $courseVideo)\n {\n //\n }", "public function admin_addsamplevidoes() {\n\n\t\tif ($this->request->is(\"post\")) {\n\t\t\t$this->loadModel('Samplevideo');\n\t\t\tif ($this->request->data['Samplevideo']['main_video'] == 1) {\n\n\t\t\t\t$get_sample_video_if_main_vdo = $this->Samplevideo->find('first', array('conditions' => array('Samplevideo.main_video' => 1)));\n\t\t\t\tif ($get_sample_video_if_main_vdo) {\n\t\t\t\t\t$change_status = $this->Samplevideo->updateAll(array(\"Samplevideo.main_video\" => \"'\" . 0 . \"'\"), array(\"Samplevideo.id\" => $get_sample_video_if_main_vdo['Samplevideo']['id']));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//\n\t\t\tif ($this->Samplevideo->hasAny(['video_name' => $this->request->data['Samplevideo']['video_name']])) {\n\t\t\t\t$this->Session->setFlash('Same name video alerdy in our record please change the name of video', 'default', array('class' => 'alert alert-danger'), 'admin_samplevideo');\n\t\t\t} else {\n\t\t\t\t$image = $this->request->data['Samplevideo']['video_image_name'];\n\t\t\t\t$uploadFolder = \"video_images\";\n\t\t\t\t$uploadPaths = WWW_ROOT . 'image/' . $uploadFolder;\n\t\t\t\tif ($image['error'] == 0) {\n\t\t\t\t\t$imageName = $image['name'];\n\t\t\t\t\tif (file_exists($uploadPaths . DS . $imageName)) {\n\t\t\t\t\t\t$imageName = date('His') . $imageName;\n\t\t\t\t\t}\n\t\t\t\t\t$full_image_path = $uploadPaths . DS . $imageName;\n\t\t\t\t\tmove_uploaded_file($image['tmp_name'], $full_image_path);\n\t\t\t\t\t$this->request->data['Samplevideo']['video_image_name'] = $imageName;\n\t\t\t\t}\n\t\t\t\t//video file upload\n\t\t\t\t$video = $this->request->data['Samplevideo']['video_path'];\n\t\t\t\t$uploadFolder = \"sample_videos\";\n\t\t\t\t$uploadPath = WWW_ROOT . 'videos/' . $uploadFolder;\n\t\t\t\tif ($video['error'] == 0) {\n\t\t\t\t\t$videoName = $video['name'];\n\t\t\t\t\tif (file_exists($uploadPath . DS . $videoName)) {\n\t\t\t\t\t\t$videoName = date('His') . $videoName;\n\t\t\t\t\t}\n\t\t\t\t\t$full_video_path = $uploadPath . DS . $videoName;\n\t\t\t\t\tmove_uploaded_file($video['tmp_name'], $full_video_path);\n\t\t\t\t\t$this->request->data['Samplevideo']['video_path'] = $videoName;\n\t\t\t\t}\n\t\t\t\t$this->request->data['Samplevideo']['uploaded_by'] = $this->Auth->user('id');\n\t\t\t\tif ($this->Samplevideo->save($this->request->data)) {\n\t\t\t\t\t$this->Session->setFlash('Sample video is succesfully added !!!', 'default', array('class' => 'alert alert-Success'), 'admin_samplevideo');\n\t\t\t\t\treturn $this->redirect(array('action' => 'admin_samplevideos'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('There is some error in saving your video please try again !!!', 'default', array('class' => 'alert alert-Success'), 'admin_samplevideo');\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "function UpdateVideoCat( $id, $action )\n{\n\tglobal $module_data, $db;\n\t$result = $db->sql_query( \"UPDATE `\" . NV_PREFIXLANG . \"_\" . $module_data . \"_video_category` SET numvideo = numvideo\" . $action . \" WHERE `id`=\" . $id );\n\treturn;\n}", "public function update_ad_status($ad) {\n if($ad['creative_status'] == \"ACTIVE\" || $ad['creative_status'] == \"ENABLED\" ) {\n $status = \"ENABLED\";\n } else {\n $status = \"PAUSED\";\n }\n\n if($ad['is_multiple']=='Y') {\n $this->CI->load->model(\"V2_multiple_ad_model\");\n $multiple_ad = $this->CI->V2_multiple_ad_model->get_by_ad_id($ad['id']);\n return $this->adword->updateAdStatus($this->adword, $multiple_ad['network_group_id'], $multiple_ad['network_creative_id'], $status);\n }\n return $this->adword->updateAdStatus($this->adword, $ad['network_group_id'], $ad['network_creative_id'], $status);\n }", "function updateVideobyVideoId($params)\r\n\t\t{\r\n\t\t\t$sql = \"Update video Set video_title=? and description=? where id=? \";\r\n\t\t\t$types= array('text','text','integer');\r\n\t\t\t$res = $this->execute_command($sql,$params,$types);\r\n\t\t}", "public function changeStatusUpdate() {\n\n //validate the project exists\n $project = \\App\\Models\\Project::Where('project_id', request()->route('project'))->first();\n\n //old status\n $old_status = $project->project_status;\n\n //validate\n if (!in_array(request('project_status'), ['not_started', 'in_progress', 'on_hold', 'cancelled', 'completed'])) {\n abort(409, __('lang.invalid_status'));\n }\n\n //update the project\n $project->project_status = request('project_status');\n $project->save();\n\n //get refreshed project\n $projects = $this->projectrepo->search(request()->route('project'));\n $project = $projects->first();\n\n //clients contacts (needed for left panel - on update)\n $contacts = \\App\\Models\\User::where('clientid', $project['project_clientid'])->where('type', 'client')->get();\n\n //apply permissions\n $this->applyPermissions($project);\n\n /** ----------------------------------------------\n * record event [status]\n * ----------------------------------------------*/\n $data = [\n 'event_creatorid' => auth()->id(),\n 'event_item' => 'status',\n 'event_item_id' => '',\n 'event_item_lang' => 'event_changed_project_status',\n 'event_item_content' => $project->project_status,\n 'event_item_content2' => '',\n 'event_parent_type' => 'project',\n 'event_parent_id' => $project->project_id,\n 'event_parent_title' => $project->project_title,\n 'event_show_item' => 'yes',\n 'event_show_in_timeline' => 'yes',\n 'event_clientid' => $project->project_clientid,\n 'eventresource_type' => 'project',\n 'eventresource_id' => $project->project_id,\n 'event_notification_category' => 'notifications_projects_activity',\n ];\n //record event\n if ($old_status != request('project_status')) {\n if ($event_id = $this->eventrepo->create($data)) {\n //get users\n $users = $this->projectpermissions->check('users', $project);\n //record notification\n $emailusers = $this->trackingrepo->recordEvent($data, $users, $event_id);\n }\n }\n /** ----------------------------------------------\n * send email [status]\n * ----------------------------------------------*/\n if (isset($emailusers) && is_array($emailusers)) {\n $data = [];\n //send to users\n if ($users = \\App\\Models\\User::WhereIn('id', $emailusers)->get()) {\n foreach ($users as $user) {\n $mail = new \\App\\Mail\\ProjectStatusChanged($user, $data, $project);\n $mail->build();\n }\n }\n }\n\n //reponse payload\n $payload = [\n 'projects' => $projects,\n 'project_id' => request()->route('project'),\n 'stats' => $this->statsWidget(),\n ];\n\n //show the form\n return new UpdateResponse($payload);\n }", "public function testVideoCollectionUpdateAll()\n {\n\n }", "public function updateStatus(): void\n {\n $this->refresh();\n $hasRejected = $this->checkpoints->where('approval_status', Checkpoint::APPROVAL_STATUS_REJECTED)->count() > 0;\n $hasPending = $this->checkpoints->where('image_status', Checkpoint::IMAGE_STATUS_PENDING)->count() > 0;\n $hasUnknown = $this->checkpoints->where('approval_status', Checkpoint::APPROVAL_STATUS_UNKNOWN)->count() > 0;\n $hasUnknownDiffs = $this->checkpoints->where('diff_status', Checkpoint::DIFF_STATUS_UNKNOWN)\n ->where('image_url')->where('baseline_url')->count() > 0;\n $hasRunningBatches = $this->batches()->count() > 0;\n\n if ($hasRejected) {\n $this->status = self::STATUS_FAILED;\n } elseif ($hasUnknown || $hasUnknownDiffs || $hasPending || $hasRunningBatches) {\n $this->status = self::STATUS_UNKNOWN;\n } else {\n $this->status = self::STATUS_PASSED;\n }\n\n // Should be pending if there's missing diffs, expected images, etc.\n // but we're assuming those will have an unknown processing state too.\n $this->processing_status = $hasUnknown ?\n self::PROCESSING_STATUS_PENDING :\n self::PROCESSING_STATUS_DONE;\n\n\n $this->run_status = $hasPending || $hasUnknownDiffs || $hasRunningBatches ?\n self::RUN_STATUS_PENDING :\n self::RUN_STATUS_DONE;\n\n $this->save();\n }", "public function PropertieSave(){\n \n $typeTabSave = \\Drupal::request()->get('type_tab_save');\n \n $vid = \\Drupal::request()->get('vid');\n $mid = \\Drupal::request()->get('mid');\n $rid = \\Drupal::request()->get('rid');\n \n $duration = \\Drupal::request()->get('duration');\n \n $response['status'] = false;\n \n if($vid > 0){ \n if($typeTabSave == 'transition'){\n $transition = \\Drupal::request()->get('transition'); \n \\Drupal::database()->update('vmt_transition')\n ->condition('video_id', $vid, '=')\n ->condition('mid', $mid, '=')\n ->condition('rid', $rid, '=')\n ->fields(['transition_duration' => $duration,'transition_option'=>$transition])\n ->execute(); \n $response['status'] = true; \n }else if($typeTabSave == 'photo_clip'){\n $crop_params = \\Drupal::request()->get('zoom'); \n $clip_zoom = \\Drupal::request()->get('clip_zoom');\n \\Drupal::database()->update('vmt_media')\n ->condition('video_id', $vid, '=')\n ->condition('mid', $mid, '=')\n ->condition('rid', $rid, '=')\n ->fields(['duration' => $duration,'crop_params'=>$crop_params,'clip_zoom'=>$clip_zoom])\n ->execute(); \n $response['status'] = true; \n }else if($typeTabSave == 'video_clip'){\n $starttime = \\Drupal::request()->get('starttime');\n $zoom = \\Drupal::request()->get('zoom');\n $crop_params = \\Drupal::request()->get('zoomraw');\n $volume = \\Drupal::request()->get('volume');\n $zoomval = $zoom > 0?1:0;\n \\Drupal::database()->update('vmt_media')\n ->condition('video_id', $vid, '=')\n ->condition('mid', $mid, '=')\n ->condition('rid', $rid, '=')\n ->fields(['duration' => $duration,'volume'=>$volume,'start_time'=>$starttime,'crop_params'=>$crop_params,'zoom'=>$zoomval])\n ->execute(); \n $response['status'] = true; \n } \n } \n \n return new JsonResponse($response);\n }", "public function updateMusicVideo()\n {\n // if we have POST data to create a new music video entry\n if (isset($_POST[\"submit_update_musicvideo\"])) {\n // Instance new Model (MusicVideo)\n $MusicvideoModel = new Musicvideo();\n\n // Process checkbox to boolean\n $is_live = isset($_POST[\"is_live\"]) ? 1 : 0;\n\n // do updateMusicVideo() from model/model.php\n $MusicvideoModel->updateMusicVideo($_POST[\"id\"], $_POST[\"name\"], $_POST[\"author\"], $_POST[\"desc\"], $is_live);\n }\n\n // where to go after music video has been added\n header('location: ' . URL . 'musicvideo/index');\n }", "function update_pax_booking_status($app_reference, $booking_status) {\r\n\t\t$update_condition ['app_reference'] = trim ( $app_reference );\r\n\t\t$update_data ['status'] = trim ( $booking_status );\r\n\t\t$GLOBALS ['CI']->custom_db->update_record ( 'hotel_booking_pax_details', $update_data, $update_condition );\r\n\t}", "function pmg_youtube_feed_video_edit_form_submit(&$form, &$form_state) {\n\n $pmg_youtube_feed_video = entity_ui_controller('pmg_youtube_feed_video')->entityFormSubmitBuildEntity($form, $form_state);\n\n // Get the nid fromt the automcomplete text\n preg_match('/.*?\\[nid:(\\d+)?]/', $form['node_id']['#value'], $matches);\n\n if (isset($matches[1])) {\n $pmg_youtube_feed_video->node_id = $matches[1];\n }\n // Save the PMG YouTube Feed video and go back to the list of PMG YouTube Feed videos\n\n // Add in created and changed times.\n if ($pmg_youtube_feed_video->is_new = isset($pmg_youtube_feed_video->is_new) ? $pmg_youtube_feed_video->is_new : 0){\n $pmg_youtube_feed_video->created = time();\n }\n\n $pmg_youtube_feed_video->changed = time();\n $pmg_youtube_feed_video->save();\n $form_state['redirect'] = 'admin/content/pmg_youtube_feed_videos';\n}", "function status($job) {}", "function wpc_2017_enable_watch_videos() {\n\tif ( function_exists( 'wpcampus_network_enable' ) ) {\n\t\twpcampus_network_enable( 'videos' );\n\t}\n}", "public function addToPlaylistAction()\r\n {\r\n $this -> _helper -> layout -> disableLayout();\r\n $this -> _helper -> viewRenderer -> setNoRender(true);\r\n\r\n //get params\r\n $params = $this ->_getAllParams();\r\n $item = Engine_Api::_() -> core() -> getSubject();\r\n $playlist_id = $params['playlist_id'];\r\n $checked = $params['checked'];\r\n $message = '';\r\n $status = true;\r\n $playlist = Engine_Api::_()->getItem('ynvideochannel_playlist', $playlist_id);\r\n\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n try\r\n {\r\n $playlistVideoTable = Engine_Api::_() -> getDbTable('playlistvideos', 'ynvideochannel');\r\n $videoIds = $playlistVideoTable -> getVideoIds($playlist_id);\r\n //check exist before insert\r\n if($checked == \"true\"){\r\n //if checked means add\r\n if(!in_array($item -> getIdentity(), $videoIds)) {\r\n $mapRow = $playlistVideoTable -> createRow();\r\n $mapRow -> playlist_id = $playlist_id;\r\n $mapRow -> video_id = $item -> getIdentity();\r\n $mapRow -> video_order = 999;\r\n $mapRow -> save();\r\n $playlist -> video_count = new Zend_Db_Expr('video_count + 1');\r\n $playlist -> save();\r\n $message .= $this->view->translate('This video has been added to playlist \"%s\" successfully. ', $playlist->getTitle());\r\n }\r\n else {\r\n $status = false;\r\n $message .= $this->view->translate('This video already has been in playlist %s. ', $playlist->getTitle());\r\n }\r\n } else if($checked == \"false\"){\r\n //if checked means remove\r\n $mapRow = $playlistVideoTable -> getMapRow($playlist_id, $item -> getIdentity());\r\n if($mapRow){\r\n $mapRow -> delete();\r\n\r\n // reduce video count\r\n if ($playlist -> video_count > 0)\r\n {\r\n $playlist -> video_count = new Zend_Db_Expr('video_count - 1');\r\n $playlist -> save();\r\n }\r\n $message .= $this->view->translate('This video has been removed from playlist \"%s\" successfully. ', $playlist->getTitle());\r\n }\r\n }\r\n\r\n $db -> commit();\r\n $data = Zend_Json::encode(\r\n array(\r\n 'status' => $status,\r\n 'message' => $message\r\n )\r\n );\r\n\r\n echo $data;\r\n return true;\r\n }\r\n catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "function complete_sesion($meeting_id)\n {\n $ssave['id'] = $meeting_id;\n $ssave['end_datetime'] = time();\n $ssave['status'] = 'Completed';\n $this->Common_model->save_tbl('bookings',$ssave);\n }", "public function postBulkUpdateStatus() {\n if ($this->request->has ( StringLiterals::SELECTED_CHECKBOX ) && is_array ( $this->request->get ( StringLiterals::SELECTED_CHECKBOX ) )) {\n if ($this->request->get ( 'isStatus' ) == 'activate') {\n\n $isActionCompleted = $this->repository->videoActivateOrDeactivate ( $this->request->input ( StringLiterals::SELECTED_CHECKBOX ), 'activate' );\n return $isActionCompleted ? $this->getSuccessJsonResponse ( [ ], trans ( 'video::videos.message.bulk-activate' ) ) : $this->getErrorJsonResponse ( [ ], trans ( StringLiterals::INVALID_REQUEST_TRANS ), 403 );\n } else if ($this->request->get ( 'isStatus' ) == 'deactivate') {\n $isActionCompleted = $this->repository->videoActivateOrDeactivate ( $this->request->input ( StringLiterals::SELECTED_CHECKBOX ), 'deactivate' );\n return $isActionCompleted ? $this->getSuccessJsonResponse ( [ ], trans ( 'video::videos.message.bulk-deactivate' ) ) : $this->getErrorJsonResponse ( [ ], trans ( StringLiterals::INVALID_REQUEST_TRANS ), 403 );\n }\n }\n }", "public function videos_post()\n {\n $request = new Request('POST', array(\n 'video_id',\n 'video_new',\n 'video_title',\n 'video_file',\n 'video_updated',\n 'video_deleted'\n ));\n\n $missing = $request->get_missing();\n if ($missing) {\n $this->bad_request();\n exit();\n }\n\n $ticket_code = Session::read('ticket_code');\n if (!$ticket_code !== false) {\n $ticket = Ticket::select(array('id'))\n ->where('code', $ticket_code, '=')\n ->where('master', 1, '=')\n ->limit(1)\n ->get(true);\n if (!$ticket) {\n $this->redirect('/');\n exit();\n }\n }\n\n $video_updated = $request->get('video_updated');\n $video_deleted = $request->get('video_deleted');\n $video_new = $request->get('video_new');\n\n $video_id = $request->get('video_id');\n if (!strlen($video_id)) {\n $this->error('video_id', 'Please specify a video');\n }\n\n $video_title = $request->get('video_title');\n if (!strlen($video_title)) {\n }\n\n $video_file = $request->get('video_file');\n\n if (!$this->hasErrors()) {\n $assignedVideo = array();\n if ($video_new) {\n $assignedVideo = new Video();\n $assignedVideo->assign(array(\n 'id' => null,\n 'title' => $video_title\n ));\n }\n }\n }", "public function updateJobStatusToActive($jobID){\n $this->db->where('JobID',$jobID);\n $data = array(\n 'JobStatus' => 'active',\n );\n $this->db->set('UpdateDate', $this->db->escape(date('Y-m-d H:i:s')), FALSE);\n $this->db->update('Job',$data);\n }", "public function videoAdd($r);", "public function addTicketStatus() {\n\t\t$statusList = array();\n\t\t$statusList[] = array('id'=>'1', 'text'=>'Open');\n\t\t$statusList[] = array('id'=>'3', 'text'=>'InProgress');\n\t\t$statusList[] = array('id'=>'4', 'text'=>'Resolve');\n\t\t$statusList[] = array('id'=>'5', 'text'=>'Reject');\n\t\t$statusList[] = array('id'=>'2', 'text'=>'Close');\n\t\t\n\t\t$this->addInResponse('statusList', $statusList);\n\t}", "function set_process_status1($processes = array(), $status = 0){\n $JobHistory = new JobHistory();\n if(!empty($processes)){\n $temp = array();\n foreach($processes as $vals){\n $temp[] = $vals['job_history_id'];\n }\n if(!empty($temp)){\n $procs_in_queue = implode(',', $temp);\n // To Do :: Do query to set all in queue\n $qry = 'update job_history set `status` = '. $status. ' where id IN ('. $procs_in_queue . ')';\n $JobHistory->execute($qry);\n }\n }\n }", "public function load_job_queue() {\n $total_videos = variable_get('video_instances', 5);\n $videos = array();\n $result = db_query_range('SELECT f.*, vf.vid, vf.nid, vf.dimensions, vf.status as video_status FROM {video_zencoder} vf LEFT JOIN {files} f ON vf.fid = f.fid WHERE vf.status = %d AND f.status = %d ORDER BY f.timestamp',\n VIDEO_RENDERING_PENDING, FILE_STATUS_PERMANENT, 0, $total_videos);\n\n while ($row = db_fetch_object($result)) {\n $videos[] = $row;\n }\n return $videos;\n }", "function wpc_2019_enable_watch_videos() {\n\tif ( function_exists( 'wpcampus_network_enable' ) ) {\n\t\twpcampus_network_enable( 'videos' );\n\t}\n}", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->eventclaim,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/event-claim/lists','refresh');\t\t\n\t}", "public function multiple_activity_update()\n { \n $result = array();\n \n $activity_id =explode(',',$this->_request['activity_id']);\n $head_id=$this->_request['head_id'];\n $activity_name=$this->_request['activity_name'];\n $description=$this->_request['description'];\n $activity_list=json_decode($activity_name,true);\n $description_list=json_decode($description,true);\n \n if(empty($activity_id))\n {\n $result['status'] = \"0\";\n $result['message']=\"Invalid data provided!\";\n $this->response($this->json($result), 200);\n }\n \n $count=count($activity_id);\n for ($i=0;$i<$count;$i++) {\n/*\".$activity_list[$i]['Activity'].\"','\".$description_list[$i]['Description'].\"'*/\n $sql=mysql_query(\"UPDATE tbl_activities set ActivityHeadID='\".$head_id.\"', ActivityName='\".$activity_list[$i]['Activity'].\"', ActivityDescription='\".$description_list[$i]['Description'].\"' where ActivityID='\".$activity_id[$i].\"'\", $this->db) or die(mysql_error());\n \n }\n $result['message'] = \"Updated\";\n $result['status'] = '1';\n $this->response($this->json($result), 200);\n \n \n \n }", "function complete($activity_id=0,$force=false,$addworkitem=true) {\n global $gBitUser;\n global $__activity_completed;\n \n $__activity_completed = true;\n \n $theuser = $gBitUser->getUserId();\n \n if($activity_id==0) {\n $activity_id=$_REQUEST['activity_id'];\n } \n \n // If we are completing a start activity then the instance must \n // be created first!\n $type = $this->mDb->getOne(\"select `act_type` from `\".GALAXIA_TABLE_PREFIX.\"activities` where `activity_id`=?\",array((int)$activity_id)); \n if($type=='start') {\n $this->_createNewInstance((int)$activity_id,$theuser);\n }\n \n // Now set ended\n $now = date(\"U\");\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instance_activities` set `ended`=? where `activity_id`=? and `instance_id`=?\";\n $this->mDb->query($query,array((int)$now,(int)$activity_id,(int)$this->instance_id));\n \n //Add a workitem to the instance \n $iid = $this->instance_id;\n if($addworkitem) {\n $max = $this->mDb->getOne(\"select max(`order_id`) from `\".GALAXIA_TABLE_PREFIX.\"workitems` where `instance_id`=?\",array((int)$iid));\n if(!$max) {\n $max=1;\n } else {\n $max++;\n }\n $act = $this->_get_instance_activity($activity_id);\n if(!$act) {\n //Then this is a start activity ending\n $started = $this->getStarted();\n $putuser = $this->getOwner();\n } else {\n $started=$act['started'];\n $putuser = $act['user_id'];\n }\n $ended = date(\"U\");\n $properties = serialize($this->properties);\n $query=\"insert into `\".GALAXIA_TABLE_PREFIX.\"workitems`(`instance_id`,`order_id`,`activity_id`,`started`,`ended`,`properties`,`user_id`) values(?,?,?,?,?,?,?)\"; \n $this->mDb->query($query,array((int)$iid,(int)$max,(int)$activity_id,(int)$started,(int)$ended,$properties,$putuser));\n }\n \n //Set the status for the instance-activity to completed\n $this->setActivityStatus($activity_id,'completed');\n \n //If this and end actt then terminate the instance\n if($type=='end') {\n $this->terminate();\n return;\n }\n \n //If the activity ending is autorouted then send to the\n //activity\n if ($type != 'end') {\n if (($force) || ($this->mDb->getOne(\"select `is_auto_routed` from `\".GALAXIA_TABLE_PREFIX.\"activities` where `activity_id`=?\",array($activity_id)) == 'y')) {\n // Now determine where to send the instance\n $query = \"select `act_to_id` from `\".GALAXIA_TABLE_PREFIX.\"transitions` where `act_from_id`=?\";\n $result = $this->mDb->query($query,array((int)$activity_id));\n $candidates = Array();\n while ($res = $result->fetchRow()) {\n $candidates[] = $res['act_to_id'];\n }\n if($type == 'split') {\n $first = true;\n foreach ($candidates as $cand) {\n $this->sendTo($activity_id,$cand,$first);\n $first = false;\n }\n } elseif($type == 'switch') {\n if (in_array($this->next_activity,$candidates)) {\n $this->sendTo((int)$activity_id,(int)$this->next_activity);\n } else {\n trigger_error(tra('Fatal error: next_activity does not match any candidate in autorouting switch activity'),E_USER_WARNING);\n }\n } else {\n if (count($candidates)>1) {\n trigger_error(tra('Fatal error: non-deterministic decision for autorouting activity'),E_USER_WARNING);\n } else {\n $this->sendTo((int)$activity_id,(int)$candidates[0]);\n }\n }\n }\n }\n }", "public function videosAction() {\r\n\r\n try {\r\n \r\n // Get video press reviews using cache\r\n $pressReviews = $this->getPressReviews(PressReviewTypes::VIDEO, null, null, true);\r\n \r\n // Add common items to model view\r\n $this->addCommonListItemsToModelView(null, null, null, $pressReviews, PressReviewTypes::VIDEO);\r\n } catch (\\Exception $e) {\r\n Trace::addItem(sprintf(\"Une erreur s'est produite dans \\\"%s->%s\\\", TRACE : %s\\\"\", get_class(), __FUNCTION__, $e->getTraceAsString()));\r\n $this->forward(\"error\", \"error\", \"default\");\r\n }\r\n }", "public function actionDemoList() {\n $userJobs = JobDemo::$jobList;\n\n $response = array();\n if (empty($userJobs)) {\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => 'No jobs are available')));\n } else {\n foreach ($userJobs as $userJob) {\n $userJob = JobDemo::getJob($userJob['id']);\n\n $response[] = array(\n 'id' => $userJob->data['id'],\n 'project_id' => 0,\n 'project_name' => $userJob->data['task'] . ' test mode variant',\n 'client' => 'Sony',\n 'task' => $userJob->data['task'],\n 'runtime' => $userJob->data['runtime'],\n 'source_language' => 'English',\n 'due_date' => date(\"Y-m-d H:i:s\", strtotime('+7 day')),\n 'status' => UserJob::STATUS_ACTIVE,\n 'video' => array(\n 'language' => 'English',\n 'language_iso' => 'eng',\n 'length' => $userJob->data['video']['length'],\n 'frame_rate' => $userJob->data['video']['frame_rate'],\n 'bi_frame_rate' => $userJob->data['video']['bi_frame_rate'],\n 'bi_start_time_seconds' => $userJob->data['video']['bi_start_time_seconds'],\n 'burned_in_hours' => $userJob->data['video']['burned_in_hours'],\n 'burned_in_minutes' => $userJob->data['video']['burned_in_minutes'],\n 'burned_in_seconds' => $userJob->data['video']['burned_in_seconds'],\n 'burned_in_frames' => $userJob->data['video']['burned_in_frames'],\n 'url' => $userJob->data['video']['url'],\n ),\n // TODO: audio data will be also stored inside DB\n 'audio' => $userJob->data['audio'],\n // TODO: get subtitle files for project, hardcode for now\n // source subtitle is the one, delivered with project\n 'source_subtitle' => array(\n 'file_id' => 1,\n 'url' => $userJob->getSourceSubtitleUrl(),\n 'framerate' => $userJob->data['source_subtitle']['framerate']\n ),\n // target subtitle is the one, created by user\n 'target_subtitle' => array(\n 'file_id' => 2,\n 'url' => $userJob->getTargetSubtitleUrl(),\n 'framerate' => $userJob->data['source_subtitle']['framerate']\n ),\n );\n }\n $this->sendResponse(200, $this->getMultiObjectsEncoded($response, 'Job'));\n }\n }", "public function video() {\n\t\t$this->load->model(array('video_model'));\n\t\t$videos = $this->video_model->getAll();\n\t\t$this->layout->setData('howItworks',$videos);\n\t\t$this->layout->view('admin/video');\n\t}", "function updateVideo($title, $desc, $fileid, $section, $year, $ID) {\n\tglobal $serverURL;\n\tglobal $editKey;\n\t\n\t$title = str_replace(\" \", \"%20\", $title);\n\t$desc = str_replace(\" \", \"%20\", $desc);\n\t$section = str_replace(\" \", \"%20\", $section);\n\t\n\t$response = httpGet($serverURL . \"/createvideo?key=\" . $editKey . \"&title=\" . $title . \"&desc=\" . $desc . \"&section=\" . $section . \"&fileid=\" . $fileid . \"&year=\" . $year . \"&ID=\" . $ID);\n\n\t$json = (array) json_decode($response, true);\n\t\n\treturn $json[\"info\"];\n}", "function view_course_video_action(&$course, $context = array()) {\n\n}", "public function testUpdateJobType()\n {\n }", "public function update_status()\n {\n $sql = \" UPDATE ttps_database.requested_form as up\n SET up.req_status = ?\n WHERE req_form_id = ?\";\n $this->db->query($sql, array($this->req_status,$this->req_form_id));\n }", "public function generateVideo()\n {\n if (Mage::getStoreConfig('clipvilla/configuration/activate')) {\n $path = Mage::helper('clipvilla_mori/path');\n\n // Return stack entity that has already been sent to rendering\n $stack = Mage::getModel('clipvilla_mori/stack')\n ->load(ClipVilla_MorI_Model_Stack::STATUS_RENDERING, 'status');\n\n // If for no Entity the rendering process has been started, returns first entity sorted by priority\n $isRendering = $stack->getData();\n if (empty($isRendering)) {\n $stack = Mage::getModel('clipvilla_mori/stack')->getCollection()\n ->setOrder('priority', 'DESC')\n ->getFirstItem();\n }\n\n // Returns corresponding Video Data to the stack entity\n $existingVideo = Mage::getModel('clipvilla_mori/videos')->load($stack->getVideoId(), 'video_id');\n $existingVideoData = $existingVideo->getData();\n\n if (!empty($existingVideoData)) {\n $file = Mage::getModel('clipvilla_mori/file');\n $mori = Mage::getModel('clipvilla_mori/executer_mori');\n $productId = $existingVideo->getProductId();\n $shopVideoFile = $path->getVideoFile($productId);\n\n // resets Entry after 30 status requests if it gets Stuck\n $renderingCount = Mage::getStoreConfig('clipvilla/rendering/reset');\n if ($renderingCount == 30) {\n $stack->setStatus(ClipVilla_MorI_Model_Stack::STATUS_QUEUE);\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n }\n\n // 1. Starts Rendering\n if ($stack->getStatus() == ClipVilla_MorI_Model_Stack::STATUS_QUEUE) {\n try {\n $soapVar = $existingVideo->getSoapVar($existingVideo->getRenderProjectId());\n $renderId = $mori->startRendering($soapVar);\n\n // Rendering Error (API returns error)\n if (!is_int($renderId)) {\n $errorMessage = substr($renderId, 0, 450);\n Mage::log($errorMessage, null, 'clipvilla.log', true);\n Mage::getModel('clipvilla_mori/mail')->sendErrorMail($productId, $errorMessage);\n if ($renderId == 'License key invalid') {\n $existingVideo->setStatus(3)->save();\n } elseif('License key capacity exceeded') {\n\t\t\t\t\t\t\t\t$existingVideo->setStatus(4)->save();\n\t\t\t\t\t\t\t} else {\n $existingVideo->setStatus(2)->save();\n }\n $stack->delete();\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n\n return;\n }\n\n $stack->setRenderId($renderId);\n $stack->setStatus(ClipVilla_MorI_Model_Stack::STATUS_RENDERING);\n $stack->save();\n\n // Sonstige Fehler\n } catch (Exception $e) {\n $errorMessage = 'Rendering Failed';\n Mage::log($e, null, 'clipvilla.log', true);\n Mage::getModel('clipvilla_mori/mail')->sendErrorMail($productId, $errorMessage);\n $existingVideo->setStatus(2)->save();\n $stack->delete();\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n\n return;\n }\n return;\n }\n\n // 2. Checks the Status of the rendering process\n $renderingStatus = '';\n if ($stack->getStatus() == ClipVilla_MorI_Model_Stack::STATUS_RENDERING) {\n try {\n $renderingCount++;\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', $renderingCount);\n $response = $mori->getStatus($stack->getRenderId());\n $renderingStatus = $response->status;\n if ($renderingStatus == 'Job Complete') {\n $downloadUrl = $response->movieUrl;\n }\n\n // Fehler bei der Statusabfrage\n } catch (Exception $e) {\n $errorMessage = 'Failed to get Status';\n Mage::log($e, null, 'clipvilla.log', true);\n Mage::getModel('clipvilla_mori/mail')->sendErrorMail($productId, $errorMessage);\n $existingVideo->setStatus(2)->save();\n $stack->delete();\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n\n return;\n }\n }\n\n //3. video download\n if ($renderingStatus == 'Job Complete') {\n try {\n $stack->setStatus(ClipVilla_MorI_Model_Stack::STATUS_DOWNLOAD);\n $stack->save();\n\n $errorMessage = $file->downloadMovieFile($downloadUrl, $shopVideoFile);\n if (!empty($errorMessage)) {\n Mage::log(substr($errorMessage, 0, 450), null, 'clipvilla.log', true);\n Mage::getModel('clipvilla_mori/mail')->sendErrorMail($productId, $errorMessage);\n $existingVideo->setStatus(2)->save();\n $stack->delete();\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n\n return;\n }\n } catch (Exception $e) {\n $errorMessage = 'Videodownload Failed.';\n Mage::getModel('clipvilla_mori/mail')->sendErrorMail($productId, $errorMessage);\n $existingVideo->setStatus(2)->save();\n $stack->delete();\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n\n return;\n }\n Mage::getModel('core/config')->saveConfig('clipvilla/rendering/reset', 0);\n $existingVideo->setStatus(ClipVilla_MorI_Model_Videos::STATUS_EXISTS);\n $existingVideo->setCreationDate(Mage::getModel('core/date')->date('Y-m-d H:i:s'));\n $existingVideo->save();\n\n //4. garbage collection\n $stack->delete();\n\n }\n }\n }\n }", "private function doParentJob( $pid, $video )\n {\n echo $pid;\n $this->child_processes[$pid] = $video['id'];\n // create new db connection as previous \n // connection will be closed by child process\n $this->db = new Database(); \n $this->db->execute( \"UPDATE video SET status='c' WHERE id=\".$video['id'] );\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n $destinationPath = 'uploads/videos';\n $fileName = null;\n if(isset($data['thumb'])){\n $file = $data['thumb'];\n\n //Display File Name\n $extention = $file->getClientOriginalExtension();\n $fileName = preg_replace(\"/\\\\s/\", \"_\", $file->getClientOriginalName());\n //Move Uploaded File\n $file->move($destinationPath, $fileName);\n }\n $thumb = Video::where('id', $id)->first()->thumb;\n $video = Video::where('id', $id)->update([\n 'title' => $data['title'],\n 'video_url' => $data['video_url'],\n 'video_embed' => $data['video_embed'],\n 'quality' => $data['quality'],\n 'type' => $data['type'],\n 'movie_id' => $data['movie_id'],\n 'text' => $data['text'],\n 'thumb' => isset($fileName) ? $destinationPath . '/' . $fileName : $thumb\n ]);\n $video = Video::find($id);\n if($video){\n if(!empty($data['actors']) && count($data['actors']) > 0 && $data['actors'] != \"null\"){\n $video->people()->sync($data['actors']);\n }\n return redirect()->back()->withSuccess('Video Updated Successfully');\n }\n else{\n return redirect()->back()->withErrors('Video Could not be Updated.');\n }\n }", "public function update(Request $request, Appointment $appointment)\n {\n $this->authorize('isAdminOrAuthor');\n $plus = $request->start.\"T\". $request->time2;\n $date = strtotime($plus);\n $Time11 = date(\"Y-m-d H:i:s\", strtotime('+0 minutes', $date));\n $end = strtotime('+30 minutes',$date);\n $Time22 = date(\"Y-m-d H:i:s\", strtotime('+0 minutes', $end));\n\n if ($plus!=\"T\"){\n $appointment->start=$Time11;\n $appointment->end=$Time22;\n $appointment->statu=$request->statu;\n\n $appointment->save();\n\n }else{\n $appointment->statu=$request->statu;\n\n $appointment->save();\n }\n if ($appointment->statu == 'approved' or $appointment->statu == 'changed'){\n $doctor = Doctor::findOrFail($appointment->doctor_id);\n $etbalisment = Establishment::findOrFail($doctor->establishment_id);\n $patient = Patient::findOrFail($appointment->patient_id);\n $patient->establishment()->attach($etbalisment->id);\n }\n\n return redirect('/appointment?id='.$appointment->doctor_id);\n }", "public function postBulkUpdateStatus()\n {\n if ($this->request->has(StringLiterals::SELECTED_CHECKBOX) && is_array($this->request->get(StringLiterals::SELECTED_CHECKBOX))) {\n if ($this->request->get('isStatus') == 'activate') {\n\n $isActionCompleted = $this->repository->videoActivateOrDeactivate($this->request->input(StringLiterals::SELECTED_CHECKBOX), 'activate');\n return $isActionCompleted ? $this->getSuccessJsonResponse([], trans('video::videos.message.bulk-activate')) : $this->getErrorJsonResponse([], trans(StringLiterals::INVALID_REQUEST_TRANS), 403);\n } else if ($this->request->get('isStatus') == 'deactivate') {\n $isActionCompleted = $this->repository->videoActivateOrDeactivate($this->request->input(StringLiterals::SELECTED_CHECKBOX), 'deactivate');\n return $isActionCompleted ? $this->getSuccessJsonResponse([], trans('video::videos.message.bulk-deactivate')) : $this->getErrorJsonResponse([], trans(StringLiterals::INVALID_REQUEST_TRANS), 403);\n }\n }\n }", "function update_Video(){\n $this->check_admin_user_session();\n $this->form_validation->set_rules('title', 'Title', 'trim|required');\n $this->form_validation->set_rules('levelName[]', 'Select Level', 'trim|required');\n //check validations\n if($this->form_validation->run() == FALSE){\n $res['status'] = 0;\n $res['msg'] = validation_errors();\n echo json_encode($res);die();\n }\n $newsel = $this->input->post('levelName');\n $videoId = sanitize_input_text($this->input->post('vId'));\n $data['title'] = trim(preg_replace('/\\s+/',' ', sanitize_input_text($this->input->post('title'))));\n $data['videoLevelType']= implode(\",\",$newsel);\n $where =array('title'=>$data['title'],'id !='=>$videoId);\n $check = $this->common_model->is_data_exists('informationalVideo',$where);\n if($check){\n $response = array('status' =>FAIL, 'msg' =>'Title already exists','hash'=> get_csrf_token()['hash']); \n echo json_encode($response); die; \n return false;\n }\n else{\n\n $whr =array('id'=>$videoId);\n $checkData = $this->common_model->is_data_exists('informationalVideo',$whr);\n\n //if(empty($checkData->informationalVideo) AND empty($checkData->videoThumb)){\n\n\n if(!empty($_FILES['informationalVideo']['name'])){\n $folder = 'informationalVideo'; //Set folder for upload profile image \n $result = $this->Media_upload_model->upload_video('informationalVideo', $folder);\n if (is_array($result) && array_key_exists('error', $result)){\n $response = array('status' => FAIL,'msg' => strip_tags($result['error']),'hash'=> get_csrf_token()['hash']);\n echo json_encode($response); exit;\n }else{\n $data['informationalVideo'] =$result;\n } \n }\n /* else{\n $response = array('status' =>FAIL, 'msg' =>'Select Video','hash'=> get_csrf_token()['hash']); \n echo json_encode($response); die; \n }*/\n\n if(!empty($_FILES['videoThumb']['name'])){\n $_FILES['videoThumb']['name'] = 'vthumb.png';\n $folder = 'video_thumb'; //Set folder for upload profile image \n $result = $this->image_model->upload_image('videoThumb', $folder);\n if (is_array($result) && array_key_exists('error', $result)){\n $response = array('status' => FAIL,'msg' => strip_tags($result['error']),'hash'=> get_csrf_token()['hash']);\n echo json_encode($response); exit;\n }else{\n $data['videoThumb'] = $result;\n } \n }\n //}\n if($_SESSION[ADMIN_USER_SESS_KEY]['UserRole']=='trainer'){\n $data['postedBy'] = 'trainer';\n $data['postedById'] = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n }else{\n $data['postedBy'] = 'admin';\n $data['postedById'] = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n }\n $data['upd'] = datetime();\n $wherecon = array('id'=>$videoId);\n // pr($data);\n $response = $this->common_model->updateFields('informationalVideo', $data, $wherecon);\n if($response){\n $res['status'] = 1;\n $res['msg'] = 'Informational video update successfully.';\n }else{\n $res['status'] = 0;\n $res['msg'] = 'Somthing went wrong';\n $res['hash']= get_csrf_token()['hash'];\n }\n echo json_encode($res);\n } \n }", "function updateViews($video)\n {\n //kda ana b2olo enu hyzwdly 3ala 3dd el viewers el 3ndi 1 kol m7d yd5ul\n $video->views = $video->views+ 6;\n // b3d kda h2olo save\n $video->save();\n }", "public function video()\r\n {\r\n /***** Checks Video for UPLOAD *****/\r\n if (!empty($_FILES['video']['name'])) {\r\n $video = array(\r\n 'upload_path' => 'uploads/videos',\r\n 'allowed_types' => 'mp4|avi|wmv|mov|mpg|mpeg|3gp',\r\n 'max_size' => '10000',\r\n 'file_name' => $_FILES['video']['name']\r\n );\r\n $this->load->library('upload', $video);\r\n $this->upload->initialize($video);\r\n\r\n if ($this->upload->do_upload('video')) {\r\n $uploadData = $this->upload->data();\r\n $uploaded_video = $uploadData['file_name'];\r\n } else {\r\n $Response = array('message' => $this->upload->display_errors(), 'status' => false);\r\n echo json_encode($Response);\r\n }\r\n } else {\r\n //$uploaded_video = '';\r\n $Response = array('message' => 'Choose a Video to upload', 'status' => false);\r\n echo json_encode($Response);\r\n }\r\n\r\n $phone_no = $this->common_model->getAllData('signup', 'phone_no', 1, array('signup_id' => $this->input->post('signup_id')));\r\n\r\n // pr($phone_no);die;\r\n \r\n // prepare video array for insert\r\n $dataVideo = array(\r\n 'complaint_type_id' => $this->input->post('complaint_type_id'),\r\n 'signup_id' => $this->input->post('signup_id'),\r\n 'complaints_status_id' => 2,\r\n 'latitude' => $this->input->post('latitude'),\r\n 'longitude' => $this->input->post('longitude'),\r\n 'description' => $this->input->post('description'),\r\n 'phone' => $phone_no->phone_no,\r\n 'video' => $uploaded_video,\r\n 'district' => slugify($this->input->post('district')),\r\n 'dated' => date('Y-m-d')\r\n );\r\n if (isset($uploaded_video)) {\r\n $insert = $this->Complaintsmodel->InsertDB($dataVideo);\r\n\r\n if ($insert) {\r\n $Response = array('message' => 'Complaint is done!', 'status' => true, 'data' => $insert);\r\n echo json_encode($Response);\r\n } else {\r\n $Response = array('message' => 'Sorry, Try again!', 'status' => false);\r\n echo json_encode($Response);\r\n }\r\n }\r\n }" ]
[ "0.63711077", "0.6211495", "0.60769624", "0.5875178", "0.5858636", "0.5791259", "0.5743662", "0.5719093", "0.5650929", "0.5559109", "0.5528104", "0.55257666", "0.5499912", "0.54780555", "0.5475203", "0.54281557", "0.5379166", "0.5376652", "0.5349969", "0.5333733", "0.53059876", "0.52984726", "0.529109", "0.5283805", "0.52797776", "0.52769303", "0.5250418", "0.52435577", "0.52417666", "0.52397156", "0.5238063", "0.52333194", "0.5228817", "0.52141416", "0.51840925", "0.51821494", "0.5175703", "0.5170541", "0.5166505", "0.5158961", "0.5141949", "0.5129417", "0.51279014", "0.5101569", "0.50890815", "0.5088321", "0.50808007", "0.50761706", "0.506707", "0.5056299", "0.5054217", "0.505399", "0.5048928", "0.5044434", "0.5043115", "0.5040919", "0.5036132", "0.5032072", "0.50318384", "0.50236964", "0.50096387", "0.50030786", "0.49957374", "0.4994853", "0.4993291", "0.49929902", "0.49911386", "0.49863502", "0.4983502", "0.4976072", "0.49746567", "0.49677792", "0.49617788", "0.4961213", "0.49565178", "0.49521258", "0.49489084", "0.49485773", "0.49460784", "0.49458307", "0.49452418", "0.4943501", "0.49406874", "0.4932858", "0.49258685", "0.4925359", "0.49248895", "0.49174225", "0.49133286", "0.49129832", "0.48996893", "0.48964447", "0.48891604", "0.48856196", "0.48851386", "0.48848", "0.48832124", "0.48804945", "0.4875999", "0.48734832" ]
0.74171346
0
Form for adding mapping organizerlibrary.
Форма для добавления отображения организаторской библиотеки.
function thisted_event_import_add_mapping($form, $form_state) { $libraries = thisted_event_import_get_not_mapped_libraries(); $form['add_organizer_mapping'] = array( '#type' => 'fieldset', '#title' => t('Add organizer mapping to library.'), '#collapsible' => FALSE, '#collapsed' => TRUE, ); $form['add_organizer_mapping']['events_uri'] = array( '#type' => 'textfield', '#title' => t('Uri to feed'), '#description' => t('Feed uri which correspond to selected library. E.g. @uri_example', array('@uri_example' => 'http://www.thy360.dk/api/a6d6bbf4-336a-4705-be97-7abdaaaf06fb')), '#required' => TRUE, ); $form['add_organizer_mapping']['library_id'] = array( '#type' => 'select', '#title' => t('Library id'), '#options' => $libraries, '#description' => t('Select library to which organizer id correspond.'), '#required' => TRUE, ); $form['add_organizer_mapping']['submit'] = array( '#type' => 'submit', '#value' => t('Submit'), '#submit' => array('_thisted_event_import_add_mapping_submit'), ); $form['#validate'] = array('_thisted_event_import_add_mapping_validate'); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _thisted_event_import_add_mapping_submit($form, $form_state) {\n $values = $form_state['values'];\n $mapped_libraries = variable_get('mapped_libraries', array());\n\n $mapped_libraries[$values['library_id']] = $values['events_uri'];\n\n variable_set('mapped_libraries', $mapped_libraries);\n\n drupal_goto('admin/config/ting/events_import');\n}", "public function newLibraryAction() {\n $form = new Form_Admin_Client_Library();\n // Check for post to create new library.\n if ($this->_request->isPost()) {\n $params = $this->_request->getPost();\n if ($form->isValid($params)) {\n // Create a new library\n $lId = Repo_Library::getInstance()->addNew(\n $form->getValue('client'), $form->getValue('name'), $form->getValue('status'), $form->getValue('type'), $form->getValue('description')\n );\n // Redirect to library detail page\n $this->_redirect('/admin/client/library-detail/id/' . $lId);\n } else {\n $form->populate($params);\n }\n }\n $this->view->form = $form;\n }", "function thisted_event_import_admin_form($form, $form_state) {\n $mapped_libraries = variable_get('mapped_libraries', array());\n $libraries = thisted_events_import_get_libraries();\n\n $header = array(\n t('Library'),\n t('Url'),\n );\n\n $rows = array();\n foreach ($mapped_libraries as $key => $val) {\n $rows[$key] = array(\n $libraries[$key],\n $val,\n );\n }\n\n $form['items'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $rows,\n '#empty' => t('No mapped data.'),\n );\n\n $form['actions'] = array(\n 'delete' => array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#submit' => array('_thisted_event_import_delete_organizer_mapping'),\n ),\n );\n\n return $form;\n}", "public function addAction()\n {\n $form = new BiblioForm();\n $form->get('submit')->setValue('Add');\n $request = $this->getRequest();\n if (! $request->isPost()) {\n return ['form' => $form];\n }\n $newBiblio = new Biblio();\n $form->setInputFilter($newBiblio->getInputFilter());\n $data = $request->getPost();\n $data = $data->toArray();\n // Process form data to be loaded into objects.\n $data['journal'] = $data['journal'][0];\n if (isset($data['authors'])) {\n for ($i=0, $size=count($data['authors']); $i < $size; $i++) {\n $data['authors'][$i] = [\n 'author_id' => $data['authors'][$i],\n 'position' => $i+1\n ];\n }\n } else {\n $data['authors'] = [];\n }\n $newBiblio->exchangeArray($data);\n $form->bind($newBiblio);\n $form->setData($data);\n\n if (! $form->isValid()) {\n return ['form' => $form];\n }\n\n $this->biblioTable->saveBibliography($newBiblio);\n return $this->redirect()->toRoute('biblio', ['action' => 'index']);\n }", "public function add_options_page_metabox__mapping() {\r\n\t\t$tab = 'mapping';\r\n\t\t\r\n\t\t$metabox_id = $this->key . '_' . $tab;\r\n\t\t\r\n\t\t// hook in our save notices\r\n\t\tadd_action( \"cmb2_save_options-page_fields_{$metabox_id}\", array( $this, 'settings_notices' ), 10, 2 );\r\n\r\n\t\t$cmb = new_cmb2_box( array(\r\n\t\t\t'id' => $metabox_id,\r\n\t\t\t'hookup' => false,\r\n\t\t\t'cmb_styles' => false,\r\n\t\t\t'show_on' => array(\r\n\t\t\t\t// These are important, don't remove\r\n\t\t\t\t'key' => 'options-page',\r\n\t\t\t\t'value' => array( $this->key, )\r\n\t\t\t),\r\n\t\t) );\r\n\t\r\n\t\t$cmb->add_field( array(\r\n\t\t\t'name' => __( 'How to store the response in the database?', 'remp' ),\r\n\t\t\t'id' => 'title',\r\n\t\t\t'type' => 'title',\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\t\t$cmb->add_field( array(\r\n\t\t\t'id' => 'mapping_info_wiki',\r\n\t\t\t'type' => 'info',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'paragraph' => true,\r\n\t\t\t),\r\n\t\t\t'info' => \r\n\t\t\t\t'<p>' . __( 'Are you confused?', 'remp' ) . ' ' . __( 'Check out the wiki:', 'remp' ) . ' <a href=\"https://github.com/jhotadhari/rest-importer/wiki/Value-Mapping\" target=\"_blank\">Value Mapping</a>' . '</p>' . \r\n\t\t\t\t'<p>' . __( 'Want a real example? Switch to the Import tab, do some test requests and print them as admin notice', 'remp' ) . '</p>',\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$group_field_id = $cmb->add_field( array(\r\n\t\t\t'id' => 'value_map',\r\n\t\t\t'type' => 'group',\r\n\t\t\t// 'description' => __( 'Generates reusable form entries', 'remp' ),\r\n\t\t\t'repeatable' => true, // use false if you want non-repeatable group\r\n\t\t\t'options' => array(\r\n\t\t\t\t'group_title' => __( 'Map {#}', 'remp' ), // since version 1.1.4, {#} gets replaced by row number\r\n\t\t\t\t'add_button' => __( 'Add Another Map', 'remp' ),\r\n\t\t\t\t'remove_button' => __( 'Remove Map', 'remp' ),\r\n\t\t\t\t'sortable' => false, // beta\r\n\t\t\t\t'closed' \t=> true,\r\n\t\t\t),\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\t\t/* row 1 */\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Map id', 'remp' ),\r\n\t\t\t'id' => 'id',\r\n\t\t\t'description' => \r\n\t\t\t\t__( 'A unique identifier.', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'This should be a slug. However, it will be slugified automatically.', 'remp' ),\r\n\t\t\t'type' => 'slug',\r\n\t\t\t'repeatable' => false,\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => true,\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'WP Object Type', 'remp' ),\r\n\t\t\t'description' => __( 'Save the response as WordPress objects.', 'remp' ),\r\n\t\t\t'id' => 'object_type',\r\n\t\t\t'type' => 'radio',\r\n\t\t\t'show_option_none' => false,\r\n\t\t\t'options' => array(\r\n\t\t\t\t'post' => __( 'Post', 'remp' ),\r\n\t\t\t\t'user' => __( 'User', 'remp' ),\r\n\t\t\t),\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => true,\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'id' => $tab . '_' . rand(100,999),\r\n\t\t\t'type' => 'clearfix',\r\n\t\t) );\r\n\t\t\r\n\r\n\t\t\r\n\t\t/* row 2 post */\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Post type', 'remp' ),\r\n\t\t\t'id' => 'post_type',\r\n\t\t\t'type' => 'radio',\r\n\t\t\t'show_option_none' => false,\r\n\t\t\t'options_cb' => 'remp_get_post_types_arr',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'post',\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Post status', 'remp' ),\r\n\t\t\t'id' => 'post_status',\r\n\t\t\t'type' => 'radio',\r\n\t\t\t'show_option_none' => false,\r\n\t\t\t'options_cb' => 'get_post_statuses',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'post',\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Post Title', 'remp' ),\r\n\t\t\t'id' => 'post_title',\r\n\t\t\t'description' => __( 'Default post title, may be overwritten by the mapping tree or your filter functions.', 'remp' ),\r\n\t\t\t'type' => 'text',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'post',\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array( \r\n\t\t\t'id' => $tab . '_' . rand(100,999),\r\n\t\t\t'type' => 'clearfix',\r\n\t\t) );\r\n\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* row 3 user */\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'User Role', 'remp' ),\r\n\t\t\t// 'description' => __( 'Save the response as WordPress objects.', 'remp' ),\r\n\t\t\t'id' => 'role',\r\n\t\t\t'type' => 'radio',\r\n\t\t\t'show_option_none' => false,\r\n\t\t\t'options_cb' => array( $this, 'options_cb_role'),\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'user',\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Unique user_login and user_email', 'remp' ),\r\n\t\t\t'id' => 'info_user_email_login',\r\n\t\t\t'type' => 'info',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'user',\r\n\t\t\t\t'paragraph' => false,\r\n\t\t\t),\r\n\t\t\t'info' => \r\n\t\t\t\t__( 'user_email is required!', 'remp' ) . '<br>' .\r\n\t\t\t\t__( 'If no user_login is set, the user_mail or something random will be used instead.', 'remp' ) . '<br>' .\r\n\t\t\t\t__( 'The user_login is quite fix and can\\'t be changed later without magic.', 'remp' ) . '<br>' .\r\n\t\t\t\t__( 'If no valid email is set, import will skip this user.', 'remp' ),\r\n\t\t\t\r\n\t\t) );\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'If either user_login or user_email already exist or both exist and belong to same existing user', 'remp' ),\r\n\t\t\t'id' \t\t\t => 'user_exists',\r\n\t\t\t'desc' => __( 'If user_email and user_login exist but don\\'t belong to the same existing user, the entry will be skipped.', 'remp' ),\r\n\t\t\t'type' => 'radio',\r\n\t\t\t'show_option_none' => false,\r\n\t\t\t'options' => array(\r\n\t\t\t\t'skip' => __( 'Skip entry', 'remp' ),\r\n\t\t\t\t'merge_carefully' => __( 'Merge carefully, don\\'t overwride', 'remp' ),\r\n\t\t\t\t'merge_overwride' => __( 'Merge rude and overwride', 'remp' ),\r\n\t\t\t),\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'user',\r\n\t\t\t)\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'id' => $tab . '_' . rand(100,999),\r\n\t\t\t'type' => 'clearfix',\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\r\n\t\t/* row 4 */\r\n\t\t\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Define Root', 'remp' ),\r\n\t\t\t'id' => 'root',\r\n\t\t\t'description' => \r\n\t\t\t\t__( 'Where to start traversing the response tree?', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'Seperator (without quotes): \"=>\"', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'Example to loop lovely_people (without quotes): \"results=>lovely_people\"', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'If empty, the root will be the actual root of the response.', 'remp' ),\r\n\t\t\t'type' => 'text',\r\n\t\t) );\r\n\t\t\r\n\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Valid Option Keys for Object Post', 'remp' ),\r\n\t\t\t'description' => \r\n\t\t\t\t__( 'For object-meta all keys are valid.', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'Some info:', 'remp' ) . ' <a href=\"https://codex.wordpress.org/Class_Reference/WP_Post#Member_Variables_of_WP_Post\" target=\"_blank\">Class Reference/WP Post</a>',\r\n\t\t\t'id' => 'post_valid_option_keys',\r\n\t\t\t'type' => 'info',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'post',\r\n\t\t\t\t'paragraph' => false,\r\n\t\t\t),\r\n\t\t\t'info' => \r\n\t\t\t\t__( 'Everything else will be skipped', 'remp' ) . ':<br>' .\r\n\t\t\t\tremp_get_valid_option_keys( 'post', true ),\r\n\t\t\t\r\n\t\t) );\t\t\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'name' => __( 'Valid Option Keys for Object User', 'remp' ),\r\n\t\t\t'description' => \r\n\t\t\t\t__( 'For object-meta all keys are valid.', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'Some info:', 'remp' ) . ' <a href=\"https://codex.wordpress.org/Function_Reference/wp_insert_user\" target=\"_blank\">Function_Reference/wp_insert_user</a>',\r\n\t\t\t'id' => 'user_valid_option_keys',\r\n\t\t\t'type' => 'info',\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'required' => false,\r\n\t\t\t\t'data-conditional-id' => wp_json_encode( array( $group_field_id, 'object_type' ) ),\r\n\t\t\t\t'data-conditional-value' => 'user',\r\n\t\t\t\t'paragraph' => false,\r\n\t\t\t),\r\n\t\t\t'info' => \r\n\t\t\t\t__( 'Everything else will be skipped (user_email is required!)', 'remp' ) . ':<br>' .\r\n\t\t\t\tremp_get_valid_option_keys( 'user', true ),\r\n\t\t) );\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'id' => $tab . '_' . rand(100,999),\r\n\t\t\t'type' => 'clearfix',\r\n\t\t) );\r\n\t\t\r\n\t\t\r\n\t\t/* row 5 */\r\n\t\t\r\n\t\t$cmb->add_group_field( $group_field_id, array(\r\n\t\t\t'desc' => \r\n\t\t\t\t__( 'Rebuild the response structure and assign the nodes as values (string|array) to WordPress objects and meta.', 'remp' ) . '<br>' .\r\n\t\t\t\t__( 'The root node represents the defined root.', 'remp' ) . '<br>' . \r\n\t\t\t\t__( 'Right click on the fileds and nodes to edit.', 'remp' ),\r\n\t\t\t'id' => 'map_tree',\r\n\t\t\t'type' => 'tree',\r\n\t\t) );\r\n\t\t\r\n\t}", "function lib4ridora_organizational_block_configuration_form() {\n $form = array(\n 'field' => array(\n '#type' => 'textfield',\n '#title' => t('Organization Solr Fields'),\n '#description' => t('Comma-separated names of Solr fields to use to search for organizations.'),\n '#default_value' => variable_get('lib4ridora_organization_block_organization_field', 'mods_name_personal_affiliation_ms, mods_name_corporate_affiliation_ms'),\n ),\n 'results_to_omit' => array(\n '#type' => 'textarea',\n '#title' => t('Omitted Organizations'),\n '#description' => t(\"A list with IDs of organizational units (example: lib4ri-unit:123) to omit from facet results, separated by new lines.<br> After the ID a comment may be appended, separated by a leading '/' or '#'.\"),\n '#default_value' => variable_get('lib4ridora_organization_block_results_to_omit', ''),\n ),\n );\n return $form;\n}", "public static function addAutocompleteForm() {\n\t\n\t \t$sdf = array(\n\t __( 'Seleziona uno spettacolo', 'bnm' ) => array(\n\t array(\n\t 'type' => WPDK_FORM_FIELD_TYPE_TEXT,\n\t 'name' => 'product_title',\n\t 'data' => array(\n\t 'autocomplete_action' => 'bnm_action_product_title',\n\t 'autocomplete_target' => 'id_product'\n\t ),\n\t 'size' => 64,\n\t 'label' => __( 'Spettacolo', 'bnm' ),\n\t 'id'\t => 'wpph_product_title',\n\t 'value' => $product_title == \"\" ? \"\" : $product_title\n\t ),\n\t \n\t )\n\t );\n\t\n\n\t WPDKForm::htmlForm( $sdf );\t\n\t}", "function addLookupSettings()\n\t{\n\t\t$this->settingsMap[\"fieldSettings\"][\"CategoryControl\"] = array(\"default\"=>\"\",\"jsName\"=>\"categoryField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"DependentLookups\"] = array(\"default\"=>array(),\"jsName\"=>\"depLookups\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LCType\"] = array(\"default\"=>LCT_DROPDOWN,\"jsName\"=>\"lcType\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LookupTable\"] = array(\"default\"=>\"\",\"jsName\"=>\"lookupTable\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"SelectSize\"] = array(\"default\"=>1,\"jsName\"=>\"selectSize\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LinkField\"] = array(\"default\"=>\"\",\"jsName\"=>\"linkField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"DisplayField\"] = array(\"default\"=>\"\",\"jsName\"=>\"dispField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"freeInput\"] = array(\"default\"=>false,\"jsName\"=>\"freeInput\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"autoCompleteFieldsAdd\"] = array(\"default\"=>array(),\"jsName\"=>\"autoCompleteFieldsAdd\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"autoCompleteFieldsEdit\"] = array(\"default\"=>array(),\"jsName\"=>\"autoCompleteFieldsEdit\");\n\t}", "public function addbuildingAction(){\n \t$this->view->buildingForm = $this->getBuildingForm();\n \tif(!$this->getRequest()->isPost()){\n \t\t$this->_helper->redirector('index');\n \t}\n \t\n \t$form = $this->_form;\n \t\n \tif(!$form->isValid($_POST)){\n \t\t$form->setDescription('Attenzione: dati inseriti errati');\n \t\treturn $this->render('newbuilding');\n \t}\n \t\n \t$values = $form->getValues();\n \t$this->_adminModel->newBuilding($values);\n \t$this->_helper->redirector('viewbuilding');\n }", "function _thisted_event_import_delete_organizer_mapping($form, $form_state) {\n $selected_items = $form_state['input']['items'];\n $mapped_libraries = variable_get('mapped_libraries', array());\n foreach ($selected_items as $key => $selected_item) {\n if (!empty($selected_item)) {\n unset($mapped_libraries[$key]);\n }\n }\n variable_set('mapped_libraries', $mapped_libraries);\n}", "public function add() {\n\t\t$result = array();\n\t\t$this->set(\"title_for_layout\",\"Location Types Management\");\n\t\tif ($this->request->is('post') || $this->request->is('put')) {\n\t\t\t$nameLocal = trim($this->data['LocationsType']['name']);\n\t\t\t$nameEng = trim($this->data['LocationsType']['name_eng']);\n\t\t\t$maxXaxis = trim($this->data['LocationsType']['max_column']);\n\t\t\t$maxYaxis = trim($this->data['LocationsType']['max_row']);\n\t\t\t$maxZaxis = trim($this->data['LocationsType']['max_level']);\n\t\t\t$capacityLimit = trim($this->data['LocationsType']['capacity_limit']);\n\t\t\t$description = trim($this->data['LocationsType']['description']);\n\t\t\t\n\t\t\t$params = array('name'=>$nameLocal,'name_eng'=>$nameEng,'max_column'=>$maxXaxis,'max_row'=>$maxYaxis,'max_level'=>$maxZaxis,'capacity_limit'=>$capacityLimit,'description'=>$description);\n\t\t\t$result = $this->ApiClient->CallFunction('#configurations.location_type_insert',$params);\n\t\t\t\n\t\t\tif($result[0] == 'Y'){\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}else{\n\t\t\t\techo \"<script>alert('{$result[\"0\"]}');</script>\";\t\n\t\t\t}\n\t\t}\n\t}", "public function buildForm()\n {\n $this\n ->addSelect('region_code', $this->getRegionCodeList(), trans('elementForm.region_code'))\n ->addSelect('vocabulary', $this->getRegionVocabularyCodeList(), trans('elementForm.vocabulary'))\n ->add('vocabulary_uri', 'text', ['label' => trans('elementForm.vocabulary_uri')])\n ->addNarrative('narrative')\n ->addAddMoreButton('add_narrative', 'narrative');\n }", "function create_map_builder() {\n\t//If map is public || private && current user\n\t$current_user = wp_get_current_user();\n\twp_localize_script( 'sr-functions', 'sr_target_div', $a );\n\t//map name\n\t$name = (isset($_POST[\"mapName\"]) && $_POST[\"mapName\"] != '') ? $_POST[\"mapName\"]:$_POST[\"current_name\"];\n\t$owner = -1;\n\tif (isset($_POST[\"newMapName\"]) && $_POST[\"newMapName\"] != '')\n\t\t$name = $_POST[\"newMapName\"];\n\t\n\t$id = - 1;\n\t//map id \n\tif (isset($_GET[\"map_id\"]))\n\t\t$id = $_GET[\"map_id\"];\n\telse if (isset($_POST[\"map_id\"]))\n\t\t$id = $_POST[\"map_id\"];\n\t//default - new map\n\t$desc = '';\n\t$comps = array();//stores associated competencies\n\t$public = 1;\n\t$map = get_from_db($id);//retrieve the map from the database\n\t//map description\n\tif (isset($_POST[\"set-desc-content\"]))\n\t\t$desc = $_POST[\"set-desc-content\"];\n\telse $desc = $map->set_description;\n\t//associated competencies\n\tif (isset($_POST[\"competencies\"]))\n\t\t$comps = $_POST[\"competencies\"];\n\telse $comps = get_map_terms($id);\n\t//public/private setting\n\tif (isset($_POST[\"sharing\"])) \n\t\t$public = $_POST[\"sharing\"];\n\telse $public = intval($map->set_public);\n\t$form = '';\n\t$update = (isset($_POST[\"current_name\"]) && (!isset($_POST[\"newMapName\"]) || $_POST[\"newMapName\"] == '')) ? true:false;//determine if update to existing map\n\tif (isset($_POST[\"saveMe\"]) && $_POST[\"saveMe\"] || (isset($_POST[\"mapName\"]) && !isset($_POST[\"edit_name\"]))) {\n\t\t//save new map to db\n\t\tif (!$update || !isset($_POST[\"newMapName\"]) || $_POST[\"newMapName\"] == '')\n\t\t\t$id = save_map_to_db($id,$name,$desc,$comps, $public, $update);//except if contains error\n\t\t//update existing map\n\t\telse save_map_to_db($id,$name,$desc,$comps, $public, $update);\n\t\t$owner = $current_user->ID;\n\t\t//save map or display error\n\t\tif (strpos($id, \"Error\") !== false) {\n\t\t\t$form .= '<p class=\"db-error\">' .$id.'</p>';\n\t\t\t$id = -1;\t\n\t\t} else {\n\t\t\tif (isset($_POST[\"saveMe\"]))\n\t\t\t\t$form .= '<p class=\"db-result\">Learning map saved!</p>';\n\t\t\telse if (isset($_POST[\"mapName\"]))\n\t\t\t\t$form .= '<p class=\"db-result\">Learning map created!</p>';\n\t\t}\n\t} \n\t//delete map\n\telse if (isset($_GET[\"delete\"])) {\n\t\tdelete_map_db($_GET[\"delete\"]);\n\t} \n\t//if make it this far, display the selected map\n\telse if (isset($_GET[\"map_id\"]) || isset($_POST[\"map_id\"])) {\n\t\t$map = get_from_db($id);\n\t\t$owner = $map->user_id;\n\t\t$name = $map->set_name != \"\" ? $map->set_name:\"(no name)\";\n\t\t$desc = $map->set_description;\n\t\t$public = intval($map->set_public);\n\t\t$comps = get_map_terms($id);\n\t}\n\t//Build the map display if it's a public map or any map belonging to current user\n\tif ($public == 1 || $current_user->ID == $owner) {\n\t\t$ci ='';\n\t\t$cDisplay = '';\n\t\tforeach ($comps as $c) {\n\t\t\t$ci .= '<option value=\"' .$c. '\" selected=\"selected\"></option>';\n\t\t\t$term = get_term_by('slug', $c, 'asn_index');\n\t\t\t$link = get_term_link($term, 'asn_index');\n\t\t\t$cDisplay .= '<div class=\"mapContent\" id=\"comp-' . $c . '\">';\n\t\t\tif ($current_user->ID == $owner)\n\t\t\t\t$cDisplay .= '<div class=\"term-order-controls\"><div class=\"arrow arrow-up\" id=\"up-' .$c.'\"></div><div class=\"arrow arrow-down\" id=\"down-' .$c.'\"></div></div>';\n\t\t\t$cDisplay .= '<h2>' . $term->name . '</h2><a target=\"_blank\" href=\"' . esc_url($link) .'\">'. get_resource_count($term) . ' resources</a>';\n\t\t\tif ($current_user->ID == $owner)\n\t\t\t\t$cDisplay .= ' | <a href=\"javascript:removeComp(\\''.$c.'\\')\">Remove from learning map</a>';\n\t\t\t$cDisplay .= '</div>';\n\t\t}\n\t\t\n\t\t$form .= '<div id=\"map-builder-main\"><h2 class=\"map-builder-heading\">Learning Map: <span id=\"mapNameHeading\">' . stripslashes_deep($name) . '</span></h2>' . do_shortcode('[expand title=\"What\\'s This?\"]\n\tAuthenticated users can assemble nodes from the Competency Index into Learning Maps, which represent logical sequences of competencies for use in defining formal curriculum structures or as personalized pathways created by instructors or learners as records of progress.\n\t[/expand]') \n\t\t.'<div class=\"set-intro\">';\n\t\t\n\t\tif ($current_user->ID == $owner) {\n\t\t\t$form .='<div class=\"set-links\" style=\"float:right;\"><a href=\"javascript:deleteMap(' . $id . ');\">Delete Map</a><br/><a href=\"javascript:editMapDesc(' . $id . ');\">Edit Description</a><br/><a href=\"javascript:editMapName(' . $id . ');\">Edit Name</a></div>';//Close .set-links\n\t\t}\n\t\t\n\t\tif ($current_user->ID == $owner) {\n\t\t\t$form .='<form method=\"post\" id=\"mapUpdate\">';//open form\n\t\t\tif ($public == 1)\n\t\t\t\t$form .= '<input type=\"radio\" name=\"sharing\" value=\"1\" checked> Public (anyone can view)</input> <input type=\"radio\" name=\"sharing\" value=\"0\"> Private (only I can see)</input>';\n\t\t\telse $form .= '<input type=\"radio\" name=\"sharing\" value=\"1\"> Public (anyone can view)</input> <input type=\"radio\" name=\"sharing\" value=\"0\" checked> Private (only I can see)</input>';\n\t\t}\n\t\t//Get set description\n\t\tif (isset($_GET[\"edit\"]) && $current_user->ID == $owner && !isset($_POST[\"set-desc-content\"]))\n\t\t\t$form .= '<div id=\"set-description\"><textarea name=\"set-desc-content\" id=\"set-desc-content\">' . stripslashes_deep($desc) . '</textarea></div>';\n\t\telse $form .= '<div id=\"set-description\">' . stripslashes_deep($desc) . '</div>';\n\t\tif (isset($_GET[\"edit_name\"]) && $current_user->ID == $owner && !isset($_POST[\"mapName\"]))\n\t\t\t$form .= '<div id=\"set-name\"><input id=\"mapName\" name=\"mapName\" type=\"text\" placeholder=\"Enter a new name\" /></div>';\n\t\t$form .= '<div id=\"map-sequence\">' . $cDisplay . '</div>';\n\t\tif ($current_user->ID == $owner) {\n\t\t\t$form .= '<input id=\"saveMapBottom\" class=\"saveMap\" value=\"Save\" type=\"submit\"/><input id=\"newMapName\" name=\"newMapName\" type=\"text\" placeholder=\"Save a copy as a new map\" />'\n\t\t\t. '<select multiple name=\"competencies[]\" id=\"competencies\" style=\"display:none;\">'\n\t\t\t. $ci\n\t\t\t.'</select>'\n\t\t\t.'<input type=\"hidden\" id=\"map_id\" name=\"map_id\" value=\"'.$id.'\"/>'//if this is an existing map, store the id here\n\t\t\t.'<input type=\"hidden\" id=\"current_name\" name=\"current_name\" value=\"'.$name.'\"/>'\n\t\t\t.'<input type=\"hidden\" id=\"saveMe\" name=\"saveMe\" value=\"true\" />'\n\t\t\t.'</form>';\n\t\t} else if ($current_user->ID > 0) {\n\t\t\t$form .='<form method=\"post\" id=\"mapUpdate\">';\n\t\t\t$form .= '<input id=\"saveMapBottom\" class=\"saveMap\" value=\"Save\" type=\"submit\"/><input id=\"newMapName\" name=\"newMapName\" type=\"text\" placeholder=\"Save a copy as a new map\" />'\n\t\t\t. '<select multiple name=\"competencies[]\" id=\"competencies\" style=\"display:none;\">'\n\t\t\t. $ci\n\t\t\t.'</select>'\n\t\t\t.'<input type=\"hidden\" id=\"map_id\" name=\"map_id\" value=\"'.$id.'\"/>'//if this is an existing map, store the id here\n\t\t\t.'<input type=\"hidden\" id=\"current_name\" name=\"current_name\" value=\"'.$name.'\"/>'\n\t\t\t.'<input type=\"hidden\" id=\"saveMe\" name=\"saveMe\" value=\"true\" />'\n\t\t\t.'</form>';\n\t\t}\n\t\t$form .= '</div>';\n\t\t\n\t\treturn $form;\n\t} else {\n\t\theader( \"Location: \" . esc_attr(get_option('mapListing')));\n\t}\n}", "public function register_orb_form() {\n register_setting( 'orb_form_group', 'orb_form', array( $this, 'sanitize' ) );\n\n add_settings_section(\n 'orb_form_id',\n 'Spiros Orb Form',\n array( $this, 'print_orb_form_info' ),\n $this::UNIQUE_IDENTIFIER\n );\n\n add_settings_field(\n 'full_name',\n 'Full Name',\n array( $this, 'full_name_callback' ),\n $this::UNIQUE_IDENTIFIER,\n 'orb_form_id'\n );\n }", "public function add_new_library_element() {\n\t\tcheck_admin_referer( 'fusion_library_new_element' );\n\n\t\t// Work out post type based on type being added.\n\t\t$post_type = isset( $_GET['fusion_library_type'] ) && 'templates' === $_GET['fusion_library_type'] ? 'fusion_template' : 'fusion_element';\n\n\t\t$post_type_object = get_post_type_object( $post_type );\n\t\tif ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$category = 'elements';\n\t\tif ( isset( $_GET['fusion_library_type'] ) ) {\n\t\t\t$category = sanitize_text_field( wp_unslash( $_GET['fusion_library_type'] ) );\n\t\t}\n\n\t\t$post_content = '';\n\t\tswitch ( $category ) {\n\t\t\tcase 'sections':\n\t\t\t\t$post_content = '[fusion_builder_container][fusion_builder_row][/fusion_builder_row][/fusion_builder_container]';\n\t\t\t\tbreak;\n\t\t\tcase 'columns':\n\t\t\t\t$post_content = '[fusion_builder_column type=\"1_1\"][/fusion_builder_column]';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$library_element = [\n\t\t\t'post_title' => isset( $_GET['name'] ) ? sanitize_text_field( wp_unslash( $_GET['name'] ) ) : '',\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => $post_type,\n\t\t\t'post_content' => $post_content,\n\t\t];\n\n\t\t// Set global if checked.\n\t\tif ( 'fusion_element' === $post_type && isset( $_GET['global'] ) && sanitize_text_field( wp_unslash( $_GET['global'] ) ) ) {\n\t\t\t$library_element['meta_input'] = [\n\t\t\t\t'_fusion_is_global' => 'yes',\n\t\t\t];\n\t\t}\n\n\t\t$library_id = wp_insert_post( $library_element );\n\t\tif ( is_wp_error( $library_id ) ) {\n\t\t\t$error_string = $library_id->get_error_message();\n\t\t\twp_die( esc_html( $error_string ) );\n\t\t}\n\n\t\t// If we are adding element, add type.\n\t\tif ( 'fusion_element' === $post_type ) {\n\t\t\t$library_type = wp_set_object_terms( $library_id, $category, 'element_category' );\n\t\t\tif ( is_wp_error( $library_type ) ) {\n\t\t\t\t$error_string = $library_type->get_error_message();\n\t\t\t\twp_die( esc_html( $error_string ) );\n\t\t\t}\n\t\t}\n\n\t\t// Just redirect to back-end editor. In future tie it to default editor option.\n\t\twp_safe_redirect( get_edit_post_link( $library_id, false ) );\n\t\tdie();\n\t}", "function form_init_elements()\n {\n $googlemapsapikey = new FETextArea('Google API Key', false, 3, 60, '300px') ;\n $this->add_element($googlemapsapikey) ;\n }", "public function addLocationAction() {\r\n\t\t$this->view->form = $form = new Ynfundraising_Form_addLocation ();\r\n\t\t// If not post or form not valid, return\r\n\t\tif (! $this->getRequest ()->isPost ()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "function ding_panels_library_page_type_ctools_access_settings(&$form, &$form_state, $conf) {\n $form['settings']['library_page_type'] = array(\n '#type' => 'radios',\n '#title' => t('Library type'),\n '#options' => array(\n 'normal' => t('Normal library page'),\n 'portal' => t('Portal-style library page'),\n ),\n '#default_value' => (isset($conf['library_page_type'])) ? $conf['library_page_type'] : 'normal',\n '#description' => t('Pick the allowed library type.'),\n );\n}", "function addLookupSettings()\n\t{\n\t\t$this->settingsMap[\"fieldSettings\"][\"CategoryControl\"] = array(\"default\" => \"\", \"jsName\" => \"categoryField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"DependentLookups\"] = array(\"default\" => array(), \"jsName\" => \"depLookups\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LCType\"] = array(\"default\" => LCT_DROPDOWN, \"jsName\" => \"lcType\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LookupTable\"] = array(\"default\" => \"\", \"jsName\" => \"lookupTable\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"SelectSize\"] = array(\"default\" => 1, \"jsName\" => \"selectSize\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"Multiselect\"] = array(\"default\" => false, \"jsName\" => \"Multiselect\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LinkField\"] = array(\"default\" => \"\", \"jsName\" => \"linkField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"DisplayField\"] = array(\"default\" => \"\", \"jsName\" => \"dispField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"freeInput\"] = array(\"default\" => false, \"jsName\" => \"freeInput\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"HorizontalLookup\"] = array(\"default\" => false, \"jsName\" => \"HorizontalLookup\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"autoCompleteFields\"] = array(\"default\" => array(), \"jsName\" => \"autoCompleteFields\");\n\t}", "function bibdk_search_controls_admin_submit($form, &$form_state) {\n\n // create entry\n $id = '_new';\n $form_state['redirect'] = 'admin/config/search/bibdk_search_controls/' . $id . '/edit';\n\n}", "public function create_settings_section_Add() {\n\t\t\tSLP_Admin_Locations_Add::get_instance()->build_interface();\n\t\t}", "public function add()\n\t{\n\t\t$this->page_title = 'Add Associate';\n\t\t$data = $this->rendarAdd();\n\t\treturn view('admin.crud.form',$data);\n\t}", "public function buildForm()\n {\n $this\n ->add('url', 'text', ['help_block' => $this->addHelpText('Organisation_DocumentLink-url')])\n ->addSelect('format', $this->getCodeList('FileFormat', 'Organization'), trans('elementForm.format'), $this->addHelpText('Organisation_DocumentLink-format'))\n ->addNarrative('narrative')\n ->addAddMoreButton('add_narrative', 'narrative')\n ->addCollection('category', 'Organization\\CategoryCodeForm', 'category', [], trans('elementForm.category'))\n ->addAddMoreButton('add_category', 'category')\n ->addCollection('language', 'Organization\\LanguageCodeForm', 'language', [], trans('elementForm.language'))\n ->addAddMoreButton('add_language', 'language')\n ->addCollection('recipient_country', 'Organization\\RecipientCountryForm', 'recipient_country', [], trans('elementForm.recipient_country'))\n ->addAddMoreButton('add_recipient_country', 'recipient_country')\n ->addRemoveThisButton('remove_document_link');\n }", "function addFieldToForm($field, $bAddToMap = true){\r\n\t\t$this->fields[] = $field;\r\n\t\tend($this->fields);\r\n\t\t$key = key($this->fields);\r\n\t\t$this->mapKeyNameFields[$field->key] = $key;\r\n\t\tif($bAddToMap){\r\n\t\t\t$this->mapFormFields[$field->key] = $key;\r\n\t\t}\r\n\t\treturn $key;\r\n\t}", "function add() {\n\t\tif(!is_admin_login())\n\t\t\treturn $this->vista->acceso_restringido();\n\t\t$this->vista->addJS(\"jquery.ui.autocomplete\");\n\t\t$this->vista->setTitle(\"Personas - Editar\");\n\t\t\n\t\tif(is_array($this->params['persona'])){\n\t\t\t$created = TPersona::create($this->params['persona']);\n\t\t\tunset($_POST['persona']);\n\t\t\t$this->vista->set('message', $created ? \"REGISTRO EXITOSO\" : \"EL NUEVO USUARIO NO PUDO CREARSE. LA CÉDULA YA EXISTE EN EL SISTEMA\");\n\t\t}\n\t\t$this->_prepareForm();\n\t\t$this->vista->display();\n\t}", "function add_lib(){\n $key = (get_option(\"_cf7_auto_key\"))?get_option(\"_cf7_auto_key\"):\"AIzaSyCBKu8gwzxqTk_6vNh4C6YlqP4DH1AoVyI\";\n wp_register_script(\"googleapis\",'https://maps.googleapis.com/maps/api/js?key=' .$key . '&libraries=places');\n wp_register_script(\"googleapis_map_main\",CT_7_AUTO_PLUGIN_URL.\"frontend/js/maps.js\",array(\"googleapis\",\"jquery\"));\n wp_register_script(\"contact-form-7-auto\",CT_7_AUTO_PLUGIN_URL.\"frontend/js/cf7_auto.js\",array('jquery'),time(),true);\n wp_localize_script(\"contact-form-7-auto\",\"cf7_auto\",array(\"ajaxurl\"=>admin_url( 'admin-ajax.php' )));\n wp_register_style(\"contact-form-7-auto\",CT_7_AUTO_PLUGIN_URL.\"frontend/css/cf7_auto.css\");\n }", "public function addToList() {\n $this->load->model('tool/forms');\n $form = $this->model_tool_forms->constructAddForm($this->request->post['type']);\n echo $form;\n }", "public function addAdvertiesmentForm()\r\n {\r\n fn_is_logged_in_admin(); \r\n\r\n $view = \"add_advertiesment\";\r\n $data = array(\r\n \"page_title\" => \"add Advertiesment\",\r\n \"page_name\" => \"admin_add_advertiesment\",\r\n );\r\n $this->render_page($view, $data);\r\n }", "function openlayers_geofield_widget_afterbuild($element, &$form_state) {\n $defaults = array();\n $element['geofield_openlayers_map'] = array(\n '#markup' => '<div class=\"form-item geofield-openlayers-map\" style=\"display:block\">'\n . openlayers_geofield_form_latlon_map(array(), $element['#openlayers_mapname'])\n . '</div>');\n\n $element['geofield_openlayers_map_desc'] = array(\n '#markup' => t('<div class=\"description geofield-help\">Use the icons to select what type of feature to draw. Each map can contain one simple feature. Pan and zoom with arrows and the zoom bar.</div>')\n );\n\n drupal_add_js(\n array(\n 'geofield' => array(\n 'widget_settings' => $element['#widget_settings'],\n ),\n ),\n 'setting'\n );\n\n return $element;\n}", "function ding_library_admin_ordering_form(&$form_state) {\n // Grab all the library nodes with their weight.\n $query = db_query(\"\n SELECT n.nid, n.vid, n.title, d.library_weight FROM {node} AS n\n LEFT JOIN {ding_library} AS d ON (d.vid = n.vid)\n WHERE n.type = 'library'\n ORDER BY d.library_weight, n.title;\n \");\n\n $libraries = array();\n $form = array();\n $form['records']['#tree'] = TRUE;\n\n while ($row = db_fetch_object($query)) {\n $form['records'][$row->nid] = _ding_library_admin_ordering_field($row);\n $libraries[$row->nid] = $row;\n }\n\n // Store the original library data, so we have it available when\n // saving our data, so we can figure out whether to do INSERT or UPDATE.\n $form['libraries'] = array(\n '#type' => 'value',\n '#value' => $libraries,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save changes'),\n );\n\n return $form;\n}", "private function build_basic_form()\r\n {\r\n if($this->show_category)\r\n {\r\n \t\t$this->add_select(RepositoryManager :: PARAM_CATEGORY_ID, Translation :: get('CategoryTypeName'), $this->get_categories());\r\n }\r\n else\r\n {\r\n \t$this->addElement('hidden', RepositoryManager :: PARAM_CATEGORY_ID);\r\n }\r\n\r\n if($this->import_type == null)\r\n {\r\n \t$this->add_select('type', Translation :: get('Type'), $this->get_types());\r\n }\r\n else\r\n {\r\n \t$this->addElement('hidden', 'type');\r\n }\r\n\r\n $this->addElement('file', self :: IMPORT_FILE_NAME, Translation :: get('FileName', null, Utilities :: COMMON_LIBRARIES));\r\n //$this->addElement('submit', 'content_object_import', Translation :: get('Ok', null, Utilities :: COMMON_LIBRARIES));\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive import', 'id' => 'import_button'));\r\n //$buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n\n $this->addElement('html', ResourceManager :: get_instance()->get_resource_html(Path :: get(WEB_PATH) . 'repository/resources/javascript/import.js'));\r\n }", "function newt_form_add_component($form, $component)\n{\n}", "function tool_dataprivacy_output_fragment_addcategory_form($args) {\n\n $formdata = [];\n if (!empty($args['jsonformdata'])) {\n $serialiseddata = json_decode($args['jsonformdata']);\n parse_str($serialiseddata, $formdata);\n }\n\n $persistent = new \\tool_dataprivacy\\category();\n $mform = new \\tool_dataprivacy\\form\\category(null, ['persistent' => $persistent],\n 'post', '', null, true, $formdata);\n\n if (!empty($args['jsonformdata'])) {\n // Show errors if data was received.\n $mform->is_validated();\n }\n\n return $mform->render();\n}", "public function create_new_organisation(){\n\n\t $organisationManager = new OrganisationManager();\n\n\n\t $title = (isset($_POST['cie_group_name']))? $_POST['cie_group_name'] : false;\n\n\t if( $title ){\n\t\t $organisation = $organisationManager->create( $title );\n\n\t\t if( is_wp_error($organisation) ){\n\t\t\t $message = __( 'Failed to create the new Organisation.', '' );\n\t\t\t $this->display_admin_error( $message );\n }\n }\n\t}", "public function field_upload_programme_add() {\n\n\t\t// Define field.\n\t\t$field = [\n\t\t\t'key' => 'field_idocs_sym_upload_programme',\n\t\t\t'label' => __( 'Programme Document', 'idocs-symposiums' ),\n\t\t\t'name' => 'upload_programme',\n\t\t\t'type' => 'file',\n\t\t\t'return_format' => 'array',\n\t\t\t'library' => 'all',\n\t\t\t'min_size' => '',\n\t\t\t'max_size' => '',\n\t\t\t'parent' => 'group_idocs_sym_data',\n\t\t];\n\n\t\t// Now add field.\n\t\tacf_add_local_field( $field );\n\n\t}", "function map_browse_config($form, &$form_state) {\n\n//http://islandorasev-dev.usask.ca/islandora/search/mods_subject_cartographics_coordinates_mt:[* TO *%?type=edismax&solr_profile=MapView\n\n$form['map_browse_all_link'] = array(\n \t\t\t \n '#markup' => \"<label>Browse Repository URL</label>\".variable_get('map_browse_fedora_base').\"/islandora/search/\".variable_get('map_browse_coord_field'). \":&#91;*&nbsp;TO&nbsp;*&#93;?type=edismax&solr_profile=MapView\",\n);\n\n $form['map_browse_fedora_base'] = array(\n '#type' => 'textfield',\n '#title' => t('Fedora base URL'),\n '#default_value' => variable_get('map_browse_fedora_base', 'http://yourFedoraHostname.ca'),\n '#size' => 80,\n '#maxlength' => 256,\n '#description' => t('The internet accessable address of your fedora server'),\n '#required' => TRUE,\n );\n\n $form['map_browse_fedora_prefix'] = array(\n '#type' => 'textfield',\n '#title' => t('Fedora base prefix'),\n '#default_value' => variable_get('map_browse_fedora_prefix', '/islandora/object/'),\n '#size' => 60,\n '#maxlength' => 256,\n '#description' => t('Path from hostname to PID'),\n '#required' => TRUE,\n );\n\n $form['map_browse_fedora_suffix'] = array(\n '#type' => 'textfield',\n '#title' => t('Fedora base Thumbnail suffix'),\n '#default_value' => variable_get('map_browse_fedora_suffix', '/datastream/TN/view'),\n '#size' => 60,\n '#maxlength' => 256,\n '#description' => t('Path after PID'),\n '#required' => TRUE,\n );\n\n $form['map_browse_coord_field'] = array(\n '#type' => 'textfield',\n '#title' => t('Solr Coordinate Field'),\n '#default_value' => variable_get('map_browse_coord_field', 'mods_subject_cartographics_coordinates_ms'),\n '#size' => 40,\n '#maxlength' => 128,\n '#description' => t('MODS field containing coordinates in Latitude/Longitude format'),\n '#required' => TRUE,\n );\n\n $form['map_browse_title_field'] = array(\n '#type' => 'textfield',\n '#title' => t('Solr Title Field'),\n '#default_value' => variable_get('map_browse_title_field', 'dc.title'),\n '#size' => 40,\n '#maxlength' => 128,\n '#description' => t('MODS field containing title'),\n '#required' => TRUE,\n );\n/*\n $form['map_browse_return_area'] = array(\n '#type' => 'textarea',\n '#title' => t('Solr Title Field'),\n '#default_value' => variable_get('map_browse_return_area'),\n '#cols' => 40,\n '#rows' => 8,\n '#description' => t('Fields and titles to display below item separated by ~ '),\n '#required' => TRUE,\n );\n*/\n\n\n $form['map_browse_return_fields'] = array(\n '#type' => 'textfield',\n '#title' => t('Fields to Return From Solr'),\n '#default_value' => variable_get('map_browse_return_fields', 'PID, dc.subject, dc.description, dc.contributor, dc.publisher, dc.date, dc.type, dc.source_s, mods_location_physicalLocation_ms, mods_subject_cartographics_coordinates_ms, mods_location_url_ms, RELS_EXT_hasModel_uri_ms'),\n '#size' => 128,\n '#maxlength' => 512,\n '#description' => t('Fields to be displayed on the map points'),\n '#required' => TRUE,\n );\n\n $form['map_browse_map_centre'] = array(\n '#type' => 'textfield',\n '#title' => t('Default Map Centre'),\n '#default_value' => variable_get('map_browse_map_centre', '52.1311, -106.6353'),\n '#size' => 40,\n '#maxlength' => 128,\n '#description' => t('Centre of the Universe'),\n '#required' => TRUE,\n );\n\n $form['map_browse_max_rows_to_render'] = array(\n '#type' => 'textfield',\n '#title' => t('Maximum items to render'),\n '#default_value' => variable_get('map_browse_max_row_to_render','2000'),\n '#size' => 6,\n '#maxlength' => 12,\n '#description' => t('This can impact performance'),\n '#required' => TRUE,\n );\n\n $cluster_type = array(0 => t('Item Clustering'));\n //, 1 => t('Location Clustering'));\n\n $form['map_browse_clustering'] = array(\n '#type' => 'radios',\n '#title' => t('Clustering Model'),\n '#default_value' => 0,\n '#options' => $cluster_type,\n '#description' => t('Cluster by locations or items at a location. Currently not functioning.'),\n \n );\n\n return system_settings_form($form);\n\n}", "public function newbuildingAction(){\n \t$this->view->buildingForm = $this->getBuildingForm();\n }", "static function ad_add(){\t\t \n\t\t if(isset($_REQUEST['term_id']) && !empty($_REQUEST['term_id'])){\n\t\t\t$meta = self::get_term_meta($_REQUEST['term_id']);\n\t\t\t$global_term = self::get_global_term();\n\t\t\tif($global_term == $_REQUEST['term_id']) $gt = 1;\n\t\t }\n\t\t \n\t\t include dirname(__FILE__) . \"/includes/form-fields.php\";\n\t }", "public function register_form() {\n\t\t$cmb = $this->create_box();\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'sources',\n\t\t\t\t'type' => 'group',\n\t\t\t\t'name' => esc_html__( 'Source URLs', 'rank-math' ),\n\t\t\t\t'options' => [\n\t\t\t\t\t'add_button' => esc_html__( 'Add another', 'rank-math' ),\n\t\t\t\t\t'remove_button' => esc_html__( 'Remove', 'rank-math' ),\n\t\t\t\t],\n\t\t\t\t'classes' => 'cmb-group-text-only',\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'id' => 'pattern',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'escape_cb' => [ $this, 'escape_sources' ],\n\t\t\t\t\t\t'sanitization_cb' => false,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'id' => 'comparison',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'options' => Helper::choices_comparison_types(),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'id' => 'ignore',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'desc' => esc_html__( 'Ignore Case', 'rank-math' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'url_to',\n\t\t\t\t'type' => 'text_url',\n\t\t\t\t'name' => esc_html__( 'Destination URL', 'rank-math' ),\n\t\t\t]\n\t\t);\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'header_code',\n\t\t\t\t'type' => 'radio_inline',\n\t\t\t\t'name' => esc_html__( 'Redirection Type', 'rank-math' ),\n\t\t\t\t'options' => Helper::choices_redirection_types(),\n\t\t\t\t'default' => Helper::get_settings( 'general.redirections_header_code' ),\n\t\t\t]\n\t\t);\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'status',\n\t\t\t\t'type' => 'radio_inline',\n\t\t\t\t'name' => esc_html__( 'Status', 'rank-math' ),\n\t\t\t\t'options' => [\n\t\t\t\t\t'active' => esc_html__( 'Activate', 'rank-math' ),\n\t\t\t\t\t'inactive' => esc_html__( 'Deactivate', 'rank-math' ),\n\t\t\t\t],\n\t\t\t\t'default' => 'active',\n\t\t\t]\n\t\t);\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'id',\n\t\t\t\t'type' => 'hidden',\n\t\t\t]\n\t\t);\n\t}", "function initializeCatalogTypeAddForm() {\n if (!(isset($this->catalogTypeDialog) && is_object($this->catalogTypeDialog))) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_dialog.php');\n $data = array();\n $hidden = array(\n 'cmd' => 'add_type',\n 'save' => 1,\n 'type_id' => 0,\n 'lng_id' => $this->lngSelect->currentLanguageId\n );\n $fields = array(\n 'catalogtype_title' =>\n array('Title', 'isSomeText', TRUE, 'input', 250),\n 'catalogtype_name' =>\n array('Name', 'isSomeText', TRUE, 'input', 50),\n 'Always Load',\n 'catalogtype_loadlinks' =>\n array('Links', 'isNum', TRUE, 'yesno', '', '', FALSE),\n 'catalogtype_loadteaser' =>\n array('Teaser', 'isNum', TRUE, 'yesno', '', '', FALSE),\n );\n $this->catalogTypeDialog = new base_dialog(\n $this, $this->paramName, $fields, $data, $hidden\n );\n $this->catalogTypeDialog->dialogTitle = $this->_gt('Add');\n $this->catalogTypeDialog->msgs = &$this->msgs;\n $this->catalogTypeDialog->loadParams();\n }\n }", "public function add()\n {\n return view('auth.management.areas.add');\n }", "function muestrario_fcatalogo()\n{\n\t$form['nombre']= array(\n\t\t'#type' => 'textfield',\n\t\t'#title' => 'nombre',\n\t\t'#description' => 'escribe el nombre del catalogo',\n\t\t'#required' => TRUE,\n\t);\n\t$form['descripcion']= array(\n\t\t'#type' => 'textfield',\n\t\t'#title' => 'Descripcion',\n\t\t'#description' => 'escribe una descripcion del catalogo, sera la misma que aparesca como ayuda en el atributo del mismo nombre',\n\t\t'#required' => TRUE,\n\t);\n\t$form['submit'] = array(\n\t'#type' => 'submit',\n\t'#value' => t('agregar')\n\t);\n\treturn $form;\n}", "function conversational_forms_admin_settings() {\n\t$form = array();\n\n\t$form['conversational_forms_library_url'] = array(\n\t\t '#type' => 'textfield',\n\t\t '#title' => t('Path to conversational forms library'),\n\t\t '#description' => t('Get the url of latest library from !github', array('!github' => l('github', 'https://github.com/space10-community/conversational-form/'))),\n\t\t '#default_value' => CONVERSATIONAL_FORMS_LIB,\n\t\t);\n\n\treturn system_settings_form($form);\n}", "function libraryFormOrganizations($name, $val = false, $defaultValue = false) {\n\t$orgs = Organization::orderBy('name')->get()->toArray();\n\t$orgs = array('' => array('name' => '...select...', 'alt_name' => false, 'id' => false)) + $orgs;\n\tif ( Auth::check() ) {\n\t\t$out = '<div class=\"row\"><div class=\"col-md-12 form-inline\"><select class=\"form-control\" id=\"'.$name.'\" name=\"'.$name.'\">';\n\t\tforeach ( $orgs as $k => $v ) {\n\t\t\t$out .= '<option value=\"'.$v['id'].'\"'.($val == $v['id'] ? ' selected' : '').'>'.$v['name'].($v['alt_name'] ? '('.$v['alt_name'].')' : '').'</option>';\t\n\t\t}\n\t\t$out .= '</select> &nbsp;<a class=\"staff-modal dynamic-org-select\" href=\"'.url().'/admin/organization/edit/\"><i class=\"fa fa-pencil-square-o\"></i></a></div></div>';\t\n\t} else {\n\t\t$out = '<input type=\"text\" class=\"form-control\" name=\"edit_organization_name\" value=\"'.(isset($orgs[$val]) ? $orgs[$val]['name'] : '').'\">';\t\n\t}\n\treturn $out;\t\n}", "public function formNewEstructuraOrganica(){\r\n Obj::run()->View->render();\r\n }", "public function addAction()\n {\n $this->_includeForm();\n }", "function AddFormItem() {\n }", "public function addAction()\n {\n $formData = new DataSourceToDiagramMapping(); // Your form data class. Has to be an object, won't work properly with an array.\n\n $flow = $this->get('data_consolidation.custom_nodes.form.flow.data_source_to_diagram_mapping'); // must match the flow's service id\n $flow->bind($formData);\n\n // form of the current step\n $form = $flow->createForm();\n if ($flow->isValid($form)) {\n $flow->saveCurrentStepData($form);\n\n if ($flow->nextStep()) {\n // form for the next step\n $form = $flow->createForm();\n } else {\n // flow finished\n // Remove empty FieldMapping objects from the DataSourceToDiagramMapping.\n $doctrineEntityHelper = $this->get('data_consolidation.custom_nodes.doctrine_entity_helper');\n $doctrineEntityHelper->removeEmptyFieldMappingsFromDataSourceToDiagramMapping($formData);\n\n // Persist the DataSourceToDiagramMapping.\n $em = $this->getDoctrine()->getManager();\n $em->persist($formData);\n $em->flush();\n\n $flow->reset(); // remove step data from the session\n\n // Add a flash message marking the successful addition of the new DataSourceToDiagramMapping.\n $dataSourceToDiagramMappingId = $formData->getId();\n $this->addFlash('notice', sprintf(\"Added a new data source to diagram mapping with id '%d' and short name '%s'.\", $dataSourceToDiagramMappingId, $formData->getShortName()));\n\n return $this->redirectToRoute('data_consolidation.custom_nodes.data_source_to_diagram_mapping.view', array(\n 'mapping_id' => $dataSourceToDiagramMappingId,\n ));\n }\n }\n\n return $this->render('DataConsolidationCustomNodesBundle:default:mapping_form_flow.html.twig', array(\n 'form' => $form->createView(),\n 'flow' => $flow,\n 'page_title' => 'Add a data source to diagram mapping',\n ));\n }", "public function configure()\n\t{\n\t\t$ui = new FormUI( $this->class_name );\n\t\t$ui->append( 'text', 'coords', 'option:' . $this->class_name . '__coords', _t( 'Default Coordinates', $this->class_name ) );\n\t\t$ui->append( 'text', 'zoom', 'option:' . $this->class_name . '__zoom', _t( 'Default Zoom', $this->class_name ) );\n\t\t$ui->append( 'text', 'jumptoZoom', 'option:' . $this->class_name . '__jumptoZoom', _t( 'Jump to Zoom', $this->class_name ) );\n\t\t$ui->append( 'select', 'mapTypeId', 'option:' . $this->class_name . '__mapTypeId', _t( 'Map Type' ), 'optionscontrol_select' );\n\t\t$ui->mapTypeId->options = $this->arrMapTypeId;\n\t\t$ui->append( 'select', 'mapControlType', 'option:' . $this->class_name . '__mapControlType', _t( 'Map Control Type' ) );\n\t\t$ui->mapControlType->options = $this->arrMapControlType;\n\t\t$ui->append( 'checkbox', 'mapNavControl', 'option:' . $this->class_name . '__mapNavControl', _t( 'Show Navigation Controls?' ) );\n\t\t$ui->append( 'select', 'mapNavControlStyle', 'option:' . $this->class_name . '__mapNavControlStyle', _t( 'Navigation Control Style' ) );\n\t\t$ui->mapNavControlStyle->options = $this->arrMapNavControlStyle;\n\t\t$ui->append( 'submit', 'save', _t( 'Save', $this->class_name ) );\n\t\t$ui->set_option( 'success_message', _t( 'Options saved', $this->class_name ) );\n\t\treturn $ui;\n\t}", "private function getBuildingForm(){\n \t$urlHelper = $this->_helper->getHelper('url');\n \t$this->_form = new Application_Form_Admin_Building_Add();\n \t$this->_form->setAction($urlHelper->url(array(\n \t\t\t'controller' => 'admin',\n \t\t\t'action' => 'addbuilding'),\n \t\t\t'default'\n \t\t\t));\n \treturn $this->_form;\n }", "public function creerAmapAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $form = $this->get('form.factory')->createNamedBuilder('formulaire_creation_amap')\n ->add('libelle',TextType::class)\n\t\t\t->add('numRue',TextType::class)\n ->add('typeVoie', TextType::class )\n ->add('nomVoie', TextType::class )\n ->add('ville', TextType::class )\n ->add('cp', TextType::class )\n ->add('ajouter', SubmitType::class, array('label' => 'Créer amap'))\n ->getForm();\n\n if ($form->handleRequest($request)->isSubmitted()){\n if ($form->get('ajouter')->isClicked())\n {\n $data = $form->getData();\n\n $amap = new Amap();\n\n\t\t$amap->setLibelle($data['libelle']);\n\n $adresse = new Adresse();\n\n $adresse->setNumRue($data['numRue']);\n $adresse->setTypeVoie($data['typeVoie']);\n $adresse->setNomVoie($data['nomVoie']);\n $adresse->setville($data['ville']);\n $adresse->setCp($data['cp']);\n \n $amap->setAdresse($adresse);\n\n\t\t$em->persist($adresse);\n $em->persist($amap);\n\n $em->flush();\n\n //return $this->redirect($this->generateUrl('amap_panier_ajouter'));\n }\n\n }\n \n return $this->render('AMAPBundle:Admin/Amap:creerAmap.html.twig',array('page_courante' => 'AdminAmap', 'onglet_courant' => 'creerAmapAction',\n 'form' => $form->createView()));\n }", "function fba_object_linker_admin_settings() {\n module_load_include('inc', 'fba_object_linker', 'includes/islandora_autocomplete_sparql.db');\n\n $objectlinker_json = variable_get('fba_object_linker_json', fba_object_linker_json_default());\n $objectlinkers = json_decode($objectlinker_json);\n foreach ($objectlinkers as $objectlinker) {\n $vars[$objectlinker->name] = $objectlinker->name;\n }\n // Gt db values.\n $url_id = NULL;\n// $row = islandora_autocomplete_sparql_db_get_url_source($url_id);\n $form = array();\n\n // Reset title.\n $form['#title'] = NULL;\n $form['name'] = array(\n '#title' => t('Name'),\n '#description' => t('The machine-readable name of this autocomplete url. This text will be used for constructing the URL of #autocomplete_path. This name must contain only lowercase letters, numbers, and underscores. This name must be unique.'),\n '#type' => 'textfield',\n '#required' => TRUE,\n '#default_value' => $objectlinker->name ? $objectlinker->name : '',\n );\n\n // Description.\n $form['description'] = array(\n '#title' => t('Description'),\n '#description' => t('A brief description of this content type.'),\n '#required' => TRUE,\n '#type' => 'textarea',\n '#default_value' => $objectlinker->description ? $objectlinker->description : '',\n );\n // Sparql field.\n $form['sparql_field'] = array(\n '#type' => 'textarea',\n '#required' => TRUE,\n '#description' => t('Enter a SPARQL query that will return the required values. If no RDF linking is required, the only mandatory component is that \"?title\" is included in the \"SELECT\" statement, a \"FILTER regex(str(?title), \"^search_term_place_holder\", \"i\")\" is included in the \"WHERE\" clause so that the string \"search_term_place_holder\" can be substituted with the characters typed in to the XML-form field by the user. If RDF linking is required, \"?object\" must be included along with \"?title\" in the \"SELECT\" statement in order to provide the ID of the object and the \"Fields\" field, if present above, should be set to \"1\". An example of a SPARQL query that provides a list of Preferred Vocabulary Terms is --- SELECT ?title ?object WHERE { ?object &lthttp://purl.org/dc/elements/1.1/title&gt ?title; &ltfedora-model:state&gt &ltfedora-model:Active&gt;; &ltfedora-model:hasModel&gt &ltinfo:fedora/fba:vocabpref_CModel&gt;; &ltfedora-rels-ext:isMemberOfCollection&gt &ltinfo:fedora/fba:vocabpref_collection&gt FILTER regex(str(?title), \"^search_term_place_holder\", \"i\") } ORDER BY ?title --- '),\n '#title' => t('Sparql query'),\n '#default_value' => $objectlinker->sparql_field ? $objectlinker->sparql_field : '',\n );\n\n $form['rdf_relationship'] = array(\n '#type' => 'select',\n '#description' => t('If no RDF linking is required, leave this field set at \"---Select---\" and leave the fields below empty. If RDF linking is required, select the required relationship and you must also complete the following fields \"Subject Datastream ID\", \"Subject Namespace Info\", \"Subject XPath Title Search\" so that the title data can be found in the XML after the user submits the XML-form.'),\n '#title' => t('Relationship'),\n '#default_value' => $objectlinker->rdf_relationship ? $objectlinker->rdf_relationship : '',\n '#options' => $options_relationship,\n );\n\n $form['subject_dsid'] = array(\n '#type' => 'textfield',\n '#description' => t('If RDF linking is required, this is a mandatory field. Enter the ID of the datastream that the XML-form displays e.g. \"MADS\"'),\n '#title' => t('Subject Datastream ID'),\n '#default_value' => $objectlinker->subject_dsid ? $objectlinker->subject_dsid : '',\n );\n\n $form['subject_namespace_info'] = array(\n '#type' => 'textarea',\n '#description' => t('If RDF linking is required, this is a mandatory field. Enter the primary subject namespace prefix followed by the delimiter \"!!\", followed by the primary namespace URI for the subject datastream e.g.for a \"MADS\" datastream this would be \"mads!!http://www.loc.gov/mads/v2\". If more than one namespace is present in the datastream, add the other prefix/uri pairs in the same way, separating each by \"==\"'),\n '#title' => t('Subject Namespace Info'),\n '#default_value' => $objectlinker->subject_namespace_info ? $objectlinker->subject_namespace_info : '',\n );\n\n $form['subject_xpath_title_search'] = array(\n '#type' => 'textarea',\n '#description' => t('If RDF linking is required, this is a mandatory field. Enter as much of the XPath for the title as is present as a continuous string in the \"Read\"-\"Path:\" field of the XML-Form to which this autocomplete is to be attached, e.g. in the case of \"FBA Vocab Form\", this would bei the full \"/mads:mads/mads:authority/mads:topic\". However, in the case of the \"Islandora PDF MODS Form\" it would be \"/mods:mods/mods:titleInfo\" rather than the full \"/mods:mods/mods:titleInfo/mods:title\". The reason for this is that processing for this particular field involves string matching on the contents of the XML-Form rather than an XPath search on XML.'),\n '#title' => t('Subject XPath Title Search'),\n '#default_value' => $objectlinker->subject_xpath_title_search ? $objectlinker->subject_xpath_title_search : '',\n );\n\n $form['subject_xpath_data_search'] = array(\n '#type' => 'textarea',\n '#description' => t('If RDF linking is required, this is a mandatory field (unless there is no element corresponding to this relationship in the datastream and this autocomplete is only present so that the appropriate processing occurs on either a title change or a purge action, in which case this field should be left blank). Enter the XPath for the element in the datastream to which this autocomplete is to be attached, e.g. in the case of a MADS datastream, for a broader term this would be \"/mads:mads/mads:related[@type=\"broader\"]/mads:topic\", and for a related term this would be \"/mads:mads/mads:related[not(@*)]/mads:topic\"'),\n '#title' => t('Subject XPath Data Search'),\n '#default_value' => $objectlinker->subject_xpath_data_search ? $objectlinker->subject_xpath_data_search : '',\n );\n\n $form['object_pid_append_required'] = array(\n '#type' => 'checkbox',\n '#description' => t('If checked, the ID of the object is appended to the entry (prefixed and suffixed by twin vertical bars) so that identical entries can be distinguished. The IDs are automatically stripped out before the data is stored. If this option is not selected and there is more than one match, a link will not be created because the processing has no way to determine the correct match.'),\n '#title' => t('Append the object ID to distinguish identical entries?'),\n '#default_value' => $objectlinker->object_pid_append_required ? $objectlinker->object_pid_append_required : '',\n );\n\n $form['link_type'] = array(\n '#type' => 'select',\n '#description' => t('Select the type of linking required. If the user types in an entry because the required value is not present in the autocomplete list, and the \"Object creation required\" field is not checked, no link will be created.'),\n '#title' => t('Link type required'),\n '#default_value' => $objectlinker->link_type ? $objectlinker->link_type : '',\n '#options' => array(0 => t('Outward only'), 1 => t('Outward and inverse'), 2 => t('Inverse only'), 3 => t('Literal')),\n );\n\n $form['object_creation_required'] = array(\n '#type' => 'checkbox',\n '#description' => t('If this is checked, if an object with a matching title does not already exist, it will be created. If you check this, the following fields must be completed, \"Object Content Model PID\", \"Object Collection PID\", \"Object Namespace Prefix\", \"Object Datastream ID\", \"Object Namespace Info\", \"Object XPath Title Search\", \"Object Transform\", \"Object State\" and \"Object Datastream XML\". The field \"Object XPath Date of Creation Search\" is also part of this group, but is optional.'),\n '#title' => t('Object creation required?'),\n '#default_value' => $objectlinker->object_creation_required ? $objectlinker->object_creation_required : '',\n );\n\n $form['symmetry_in_object_datastream_required'] = array(\n '#type' => 'checkbox',\n '#description' => t('If checked, a symmetric entry will be added to the datastream of the linked object. If this is checked, the following fields must be completed \"Object Datastream ID\", \"Object Namespace Info\", \"Object XPath Data Search\", \"Object Pseudo-XPath Data Build\" and \"Object Pseudo-XPath Data Build Countback\".'),\n '#title' => t('Add a symmetic entry in the object datastream?'),\n '#default_value' => $objectlinker->symmetry_in_object_datastream_required ? $objectlinker->symmetry_in_object_datastream_required : '',\n );\n\n $form['object_content_model_pid'] = array(\n '#type' => 'textfield',\n '#description' => t('Enter the PID of the Content Model associated with the objects that are to be linked to or, when applicable, created if they do not already exist e.g. \"fba:vocabpref_CModel\"'),\n '#title' => t('Object Content Model PID'),\n '#default_value' => $objectlinker->object_content_model_pid ? $objectlinker->object_content_model_pid : '',\n );\n\n $form['object_collection_pid'] = array(\n '#type' => 'textfield',\n '#description' => t('Enter the PID of the collection in which the object is created if it does not already exist e.g. \"fba:vocabpref_collection\"'),\n '#title' => t('Object Collection PID'),\n '#default_value' => $objectlinker->object_collection_pid ? $objectlinker->object_collection_pid : '',\n );\n\n $form['object_namespace_prefix'] = array(\n '#type' => 'textfield',\n '#description' => t('This field is mandatory if \"Object creation required?\" has been checked. Enter the namespace prefix for the objects that are created if they do not already exist e.g. \"vocabpref\"'),\n '#title' => t('Object Namespace Prefix'),\n '#default_value' => $objectlinker->object_namespace_prefix ? $objectlinker->object_namespace_prefix : '',\n );\n\n $form['object_dsid'] = array(\n '#type' => 'textfield',\n '#description' => t('This field is mandatory if either \"Object creation required?\" or \"Add a symmetic entry in the object datastream?\" has been checked. Enter the ID of the datastream of the inverse-object e.g.\"MADS\".'),\n '#title' => t('Object Datastream ID'),\n '#default_value' => $objectlinker->object_dsid ? $objectlinker->object_dsid : '',\n );\n\n $form['object_namespace_info'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is mandatory if either \"Object creation required?\" or \"Add a symmetic entry in the object datastream?\" has been checked. Enter the primary object namespace prefix followed by the delimiter \"!!\" and then the primary namespace URI for the object datastream e.g.for a \"MADS\" datastream this would be \"mads!!http://www.loc.gov/mads/v2\". If more than one namespace is present in the datastream, add the other prefix/uri pairs in the same way, separating each by \"==\".'),\n '#title' => t('Object Namespace Info'),\n '#default_value' => $objectlinker->object_namespace_info ? $objectlinker->object_namespace_info : '',\n );\n\n $form['object_datastream_xml'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is mandatory if \"Object creation required?\" has been checked. A new object will be created with a datastream containing the XML entered in this field\"'),\n '#title' => t('Object Datastream XML'),\n '#default_value' => $objectlinker->object_datastream_xml ? $objectlinker->object_datastream_xml : '',\n );\n\n $form['object_xpath_title_search'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is mandatory if \"Object creation required?\" has been checked. Enter the XPath for the title element in the XML that is entered in the \"Object Datastream XML\" field. For example, in the case of a MADS datastream, this would be \"/mads:mads/mads:authority/mads:topic\".'),\n '#title' => t('Object XPath Title Search'),\n '#default_value' => $objectlinker->object_xpath_title_search ? $objectlinker->object_xpath_title_search : '',\n );\n\n $form['object_xpath_date_create_search'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is relevant if \"Object creation required?\" is checked, but it is not mandatory. If entered it will result in the current date and time being entered into the specified XML element in a Solr-friendly format, e.g. \"2014-04-22T14:36:23\". Enter the XPath for the \"Date of Creation\" element in the XML that has been entered in the \"Object Datastream XML\" field. For example, in the case of a MADS datastream, this field would be \"/mads:mads/mads:recordInfo/mads:recordCreationDate\".'),\n '#title' => t('Object XPath Date of Creation Search'),\n '#default_value' => $objectlinker->object_xpath_date_create_search ? $objectlinker->object_xpath_date_create_search : '',\n );\n\n $form['object_transform'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is mandatory if \"Object creation required?\" has been checked. A new object will be created using the transform to Dublin Core that is specified in this field e.g. for a MADS datastream this might be \"./sites/all/modules/islandora_content_model_forms/transforms/vocab_mads_to_dc.xsl\"'),\n '#title' => t('Object Transform'),\n '#default_value' => $objectlinker->object_transform ? $objectlinker->object_transform : '',\n );\n\n $form['object_state'] = array(\n '#type' => 'textfield',\n '#description' => t('This field is mandatory if \"Object creation required?\" has been checked. A new object will be created with the state specified by this field. Enter either \"A\" for Active, \"I\" for Inactive.'),\n '#title' => t('Object State'),\n '#default_value' => $objectlinker->object_state ? $objectlinker->object_state : '',\n );\n\n $form['object_xpath_data_search'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is mandatory if \"Add a symmetic entry in the object datastream?\" has been checked. Enter the XPath for the element in the XML of the datastream in the object that provides symmetry. For example, for a broader term in the subject MADS datastream, the symmetrical equivalent in the object MADS datastream would be \"/mads:mads/mads:related[@type=\"narrower]\"/mads:topic\", For the symmetrical equivalent of a related term in the subject MADS datastream (which has no \"@type\" attribute) this would be entered as \"/mads:mads/mads:related[not(@*)]/mads:topic\".'),\n '#title' => t('Object XPath Data Search'),\n '#default_value' => $objectlinker->object_xpath_data_search ? $objectlinker->object_xpath_data_search : '',\n );\n\n $form['object_xpath_data_build'] = array(\n '#type' => 'textarea',\n '#description' => t('This field is mandatory if \"Add a symmetic entry in the object datastream?\" has been checked. It requires a pseudo-XPath statement so that if the relevant node is either absent from the object datastream XML or already contains data, the processing can use this field to build the relevant node in order that it can be appended to provide symmetry. In most instances, this will be the same as the \"Object XPath Data Search\" fieldi, except that the namespace prefix should not be entered for each element. However, in those cases where the \"Object XPath Data Search\" contains a check for the non-existance of an attribute such as \"/mads:mads/mads:related[not@*)]/mads:topic\", the \"Object XPath Data Build\" field should contain only those components that are required for node creation e.g. \"/mads/related/topic\". Where more than one attribute is required in one node, the attributes should be separated by \" and \" as in \"[@type=\"x\" and @authority=\"y\"]\".'),\n '#title' => t('Object Pseudo-XPath Data Build'),\n '#default_value' => $objectlinker->object_xpath_data_build ? $objectlinker->object_xpath_data_build : '',\n );\n\n $form['object_xpath_data_build_countback'] = array(\n '#type' => 'textfield',\n '#description' => t('This field is mandatory if \"Add a symmetic entry in the object datastream?\" has been checked. Enter the number of nodes in the \"Object XPath Data Build\" pseudo-XPath that constitute a \"node group\" when this \"node group\" has to be appended to accommodate the symmetric data. In the case of an \"Object Data XPath Build\" entry of \"/mads/related[@type=\"broader\"]/topic\", the value would be \"2\", because the nodes \"/related[@type=\"broader\"]/topic\" would need to be appended. It is the number of nodes (delimited by \"/\") that have to be counted back from the end of the pseudo-XPath to achieve the required \"node group\".'),\n '#title' => t('Object Pseudo-XPath Data Build Countback'),\n '#default_value' => $objectlinker->object_xpath_data_build_countback ? $objectlinker->object_xpath_data_build_countback : '',\n );\n\n return system_settings_form($form);\n}", "function nurani_library_create_api_account_form_submit($form, &$form_state) {\n module_load_install('nurani_library');\n nurani_library_create_API_account();\n $form_state['redirect'] = 'admin/structure/nurani-library';\n}", "public function actionAdd()\n {\n $title = 'Register page';\n $areaList = Territory::areaList();\n require_once ROOT . '\\views\\index\\add.php';\n return true;\n }", "public function addFields(array $field_map);", "function _add_edit_dict($state, $iso=NULL) { \n global $user;\n $form = array();\n // get dictionary id\n if(($iso !=NULL) && (user_access('edit dictionary'))){\n $dict = db_fetch_object(db_query(\"SELECT * FROM {kdictionary} \n WHERE iso='%s'\", $iso));\n }\t\n \n $form['basic']= array('#type'=>'fieldset', \n '#title'=>t('Basic settings'),\n \t\t\t'#collapsible'=>TRUE,\n \t\t\t'#description'=>t('Create a new content type')\n );\n\n $form['basic']['iso'] = array(\n '#type' => 'textfield',\n '#title' => t('Type'),\n '#size'=>5,\n '#default_value' => isset($dict->iso)?$dict->iso:'',\n '#disabled'=>isset($dict->iso),\t\t \n '#description' => t('Choose a unique code for this content type. '.\n 'This code '.\n '<b>cannot be changed in the future</b>. '.\n 'Use a standard code, such as ISO codes, if '.\n 'possible.'),\n\t\t);\n //Only show the confirmation if creating a new database\n $form['basic']['confirmiso'] = array(\n '#type' => $dict->iso?'hidden':'textfield',\n '#title' => t('Confirm Type'),\n '#size'=>5,\n '#default_value' => isset($dict->iso)?$dict->iso:'',\t\t \n '#description' => t('Remember that you cannot change the unique code.'),\n '#required'=>TRUE,\n );\n\t\t\t\n $form['basic']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Content type title'),\n '#default_value' => isset($dict->name)?$dict->name:'',\n '#size' => 50,\n '#maxlength' => 50,\n '#description' => t('This is usually the name you will give to 1 example '.\n 'of such a content type, e.g. kasahorow Akan Dictionary'),\n '#required' => TRUE,\n ); \n $form['basic']['instruction'] = array(\n '#type' => 'textarea',\n '#title' => t('More details'),\n '#default_value' =>isset($dict->instruction)?$dict->instruction:'',\n '#cols' => 50,\n '#rows' => 5,\n '#description' => t('Extra information to display on the home page'),\n );\n $form['basic']['status'] = array(\n '#type' => 'select',\n '#title' => t('Status'),\n '#default_value' => (isset($dict->status) ? $dict->status:1),\n '#options' => array(1 => t('On'), 2=>t('On and featured'), 0 =>t('Off')),\n '#description' => t('Set status of dictionary to On (and featured) or Off'),\n );\n\t\t\t\n $form['basic']['editors'] = array(\n '#type' => 'select',\n '#multiple'=>TRUE,\n '#options'=>_getUsersId(),\n '#default_value' => isset($dict->editor)?unserialize($dict->editor):array(),\n '#description' =>t('Select editors assigned to this entry type. Editors are members who belong to the roles which are allowed to edit entries. See the settings page to modify this.')\n );\t\n \n $letters = isset($dict->alphabets)?unserialize($dict->alphabets):array();\n $letters = join($letters,',');\n $form['search']= array(\n '#type'=>'fieldset', '#title'=>t('Browse settings'),\n '#collapsible'=>TRUE,\n '#collapsed'=>TRUE,\n '#description'=>t('The quick index shows up on /browse pages'),\n );\n $form['search']['alphabets'] = array(\n '#type' => 'textfield',\n '#title' => t('Quick Index'),\n '#default_value' => $letters,\n '#size' => 50,\n '#maxlength' => 255,\n '#description' => t('Suggest indexes to your users. e.g. dictionaries '.\n 'often provide an alphabetical index such as a, b, '.\n 'c, etc. Separate each option with a comma.')\n\t\t\t);\n\t\n if(module_exists('taxonomy')){\n $vocabs = taxonomy_get_vocabularies();\n $options = array();\n foreach($vocabs as $vid=>$vocab){\n $options[$vid] = $vocab->name;\n }\n $form['search']['vid'] = array(\n '#type' => 'select',\n '#title' => t('Primary Taxonomy'),\n '#description'=> t('Select the taxonomy under which entries of this type will be automatically classified. ').l(t('Modify this list'), 'admin/content/taxonomy'),\n '#options' => $options,\n '#default_value' => isset($dict->vid)?$dict->vid:'',\n );\n \n }\n \n $nchildren = array();\n $form['entry']['nchildren'] = array(\n '#type' => 'textarea',\n '#title' => t('Special properties'),\n '#default_value' => $children,\n '#size' => 50,\n '#description' => t('Create extra fields for entering extra\n information about the database entry. The following TYPEs are\n available:!types. Separate each field with a comma.',\n array('!types'=>join(', ',_kfield_types()))),\n );\n $children = isset($dict->children)?unserialize($dict->children):array();\n $children = join($children, ',');\n $form['entry']= array('#type'=>'fieldset', '#title'=>t('Field settings'),\n \t\t\t\t\t\t\t '#collapsible'=>TRUE,\n \t\t\t\t\t\t\t '#collapsed'=>TRUE,\n \t\t\t\t\t\t\t '#description'=>t('The following settings are useful for defining how entries in your database are structured')\n \t\t\t\t\t\t\t );\n \n $form['entry']['children'] = array(\n '#type' => 'hidden',\n '#title' => t('Special properties'),\n '#value' => $children,\n '#size' => 50,\n '#attributes' => array('readonly'=>1),\n '#description' => \"DEPRECATED. The fields should\n have been migrated below. If you can't see the migrated fields\n run \".l(\"cron\", 'admin/reports/status/run-cron',\n array('query'=>drupal_get_destination())),\n );\n $form['entry']['chn'] = _kentry_fields_form($dict->iso);\n $labels = isset($dict->labels)?unserialize($dict->labels):array();\n $form['entry']['labels'] = array('#type'=>'fieldset', '#tree'=>TRUE, '#title'=>t('Default fields'), \n '#collapsible'=>TRUE, '#collapsed'=>TRUE, \n '#description' => t('Feel free to rename them'), '#weight' => -10);\n foreach(_default_fields() as $field=>$label){\n $form['entry']['labels'][$field] = array('#tree'=>TRUE);\n $form['entry']['labels'][$field]['title'] = array(\n '#type' => 'textfield',\n '#title' => t('%this', array('%this'=>$label['title'])),\n '#default_value' => isset($labels[$field]['title'])?$labels[$field]['title']:$label['title'],\n '#size' => 50,\n '#maxlength' => 255,\n '#description' => t('Specify an alternate name for the %this field', array('%this'=>$label['title'])),\n );\n $form['entry']['labels'][$field]['desc'] = array(\n '#type' => 'textfield',\n '#title' => t('%this description', array('%this'=>$label['title'])),\n '#default_value' => isset($labels[$field]['desc'])?$labels[$field]['desc']:$label['desc'],\n '#size' => 50,\n '#maxlength' => 255,\n '#description' => t('Specify an alternate description for the %this field', array('%this'=>$label['title'])),\n );\n }\n \n $form['indexsettings']= array(\n '#type'=>'fieldset', \n '#title'=>t('Link settings'),\n '#collapsible'=>TRUE,\n '#collapsed'=>TRUE,\n );\n \n $default_value = isset($dict->index)?unserialize($dict->index):'';\n $form['indexsettings']['index'] = array(\n\t\t '#type' => 'select',\n\t\t '#multiple'=>TRUE,\n\t\t '#size'=>5,\n\t\t '#title' => t('Link your entries with entries from other databases'),\n\t\t '#default_value' => is_array($default_value)?$default_value: array(),\n\t\t '#options' => _kasahorow_entry_types(),\n\t\t '#description' => t( 'You may choose to create cross-references to other databases. For example, for a dictionary database you can create multilingual dictionaries(e.g. Akan with Ewe and Hausa). If you create a dictionary for the cross-reference languages, they will list any words/phrases you added from this dictionary.'),\n\t\t);\n \n \n if($iso == NULL){\n $form['type'] = array('#type'=>'value', '#value'=>'add');\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t( 'Add database' ),\n );\n }else{\t\t\n $form['iso'] = array('#type'=>'hidden', '#value'=>$iso);\t\t\t\n $form['type'] = array('#type'=>'hidden', '#value'=>'update');\t\t \n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#value' => t( 'Update' ),\n );\n \n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t( 'Delete' ),\n );\t\t\t\t\n }\n $form['#submit'][] = '_kentry_fields_form_submit';\n $form['#submit'][] = '_add_edit_dict_submit';\n return $form;\n }", "function setLibrary($library) {\n\n // \"post\" and \"uploadedTo\" are equavilent\n $choices = array('all','post','uploadedTo');\n\n if (!in_array($library,$choices)) {$library = 'all';}\n\n // Rename \"post\" to ACF value \"uploadedTo\"\n if ($library == 'post') {$library = 'uploadedTo';}\n\n $this->field['library'] = $library;\n return $this;\n\n }", "public function addNewFieldMappings($new_map);", "public function buildForm()\n {\n $this\n ->addSelect('region_code', $this->getCodeList('Region', 'Activity'), trans('elementForm.region_code'), $this->addHelpText('Activity_RecipientRegion-code'), null, true)\n ->addSelect('region_vocabulary', $this->getCodeList('RegionVocabulary', 'Activity'), trans('elementForm.region_vocabulary'), $this->addHelpText('Activity_RecipientRegion-vocabulary'))\n ->addPercentage($this->addHelpText('Activity_RecipientRegion-percentage'))\n ->addNarrative('narrative')\n ->addAddMoreButton('add_narrative', 'narrative')\n ->addRemoveThisButton('remove_recipient_region');\n }", "function legume_organism_form($node, $form_state) {\n $form = array();\n\n // we have a file upload element on the form soe we need the multipart encoding type\n $form['#attributes']['enctype'] = 'multipart/form-data';\n\n // if the organism is part of the node object then we are editing. If not we are inserting\n if (property_exists($node, 'organism')) {\n $organism = $node->organism;\n\n // add in the comment since it is a text field and may not be included if too big\n $organism = chado_expand_var($organism, 'field', 'organism.comment');\n\n // get form defaults\n $abbreviation = property_exists($node, 'abbreviation') ? property_exists($node, 'abbreviation') : $organism->abbreviation;\n $genus = property_exists($node, 'genus') ? property_exists($node, 'genus') : $organism->genus;\n $species = property_exists($node, 'species') ? property_exists($node, 'species') : $organism->species;\n $common_name = property_exists($node, 'common_name') ? property_exists($node, 'common_name') : $organism->common_name;\n $description = property_exists($node, 'description') ? property_exists($node, 'description') : $organism->comment;\n $organism_image = property_exists($node, 'organism_image') ? property_exists($node, 'organism_image') : '';\n\n // set the organism_id in the form\n $form['organism_id'] = array(\n '#type' => 'value',\n '#value' => $organism->organism_id,\n );\n $organism_id = $organism->organism_id;\n }\n else {\n // get form defaults\n $abbreviation = property_exists($node, 'abbreviation') ? property_exists($node, 'abbreviation') : '';\n $genus = property_exists($node, 'genus') ? property_exists($node, 'genus') : '';\n $species = property_exists($node, 'species') ? property_exists($node, 'species') : '';\n $common_name = property_exists($node, 'common_name') ? property_exists($node, 'common_name') : '';\n $description = property_exists($node, 'description') ? property_exists($node, 'description') : '';\n $organism_image = property_exists($node, 'organism_image') ? property_exists($node, 'organism_image') : '';\n\n $organism_id = NULL;\n }\n\n $form['genus']= array(\n '#type' => 'textfield',\n '#title' => t('Genus'),\n '#required' => TRUE,\n '#default_value' => $genus,\n );\n $form['species']= array(\n '#type' => 'textfield',\n '#title' => t('Species'),\n '#required' => TRUE,\n '#default_value' => $species,\n );\n $form['abbreviation']= array(\n '#type' => 'textfield',\n '#title' => t('Abbreviation'),\n '#required' => TRUE,\n '#default_value' => $abbreviation,\n );\n $form['common_name']= array(\n '#type' => 'textfield',\n '#title' => t('Common Name'),\n '#required' => TRUE,\n '#default_value' => $common_name,\n );\n $form['description']= array(\n '#type' => 'textarea',\n '#rows' => 15,\n '#title' => t('Description'),\n '#default_value' => $description,\n );\n\n $form['organism_image']= array(\n '#type' => 'managed_file',\n '#title' => t('Organism Image'),\n '#description' => t('Add an image to display for this organism.'),\n '#progress_indicator' => 'bar',\n '#upload_location' => 'public://tripal/tripal_organism/images/',\n );\n\n // PROPERTIES FORM\n //---------------------------------------------\n $prop_cv = tripal_get_default_cv('organismprop', 'type_id');\n $cv_id = $prop_cv ? $prop_cv->cv_id : NULL;\n $details = array(\n 'property_table' => 'organismprop', // the name of the prop table\n 'chado_id' => $organism_id, // the value of organism_id for this record\n 'cv_id' => $cv_id // the cv.cv_id of the cv governing organismprop.type_id\n );\n // Adds the form elements to your current form\n chado_add_node_form_properties($form, $form_state, $details);\n\n // ADDITIONAL DBXREFS FORM\n //---------------------------------------------\n $details = array(\n 'linking_table' => 'organism_dbxref', // the name of the _dbxref table\n 'base_foreign_key' => 'organism_id', // the name of the key in your base chado table\n 'base_key_value' => $organism_id // the value of organism_id for this record\n );\n // Adds the form elements to your current form\n chado_add_node_form_dbxrefs($form, $form_state, $details);\n\n return $form;\n}", "function kolab_lead_add() {\n $lead = entity_create('lead', array('source' => 'manually'));\n drupal_set_title(t('Add new lead'));\n $output = '<div class=\"intro-markup\"><span class=\"form-required\">*</span> Mandatory field</div>';\n $kolab_lead_form = drupal_get_form('kolab_lead_form', $lead);\n $output .= drupal_render($kolab_lead_form);\n return $output;\n}", "public function ADMformCreateBook()\n { \t\n \t$view_path = constant(\"SITE_PATH\") . \"/src/vue/admin/librairie/book/ADMcreate_formBook.php\";\n \t \n \trequire_once constant(\"SITE_PATH\") . \"/src/vue/page.php\";\n }", "public function addReferenceAction() {\n $form = new ReferenceForm();\n $form->get('submit')->setValue('Add');\n $request = $this->getRequest();\n if (! $request->isPost()) {\n return ['form' => $form];\n }\n $reference = new Reference();\n $form->setInputFilter($reference->getInputFilter());\n $data = $request->getPost();\n $data = ArrayUtils::iteratorToArray($data);\n // Update form data and load into objects\n if (isset($data['bibliograpy'])) {\n $bibliogId = $data['bibliography'][0];\n $data['bibliography'] = $this->biblioTable->getBibliography([\"bibliog_entries.bibliog_id = $bibliogId\"]);\n }\n $reference->exchangeArray($data);\n $form->bind($reference);\n $form->setData($data);\n\n if (! $form->isValid()) {\n return ['form' => $form];\n }\n\n $this->referencesTable->saveReference($reference);\n return $this->redirect()->toRoute('biblio', ['action' => 'references']);\n }", "public function registerFormMapping(): void\n {\n FormHelper::registerFormTypeMapping([\n 'sonata_basket_basket' => BasketType::class,\n 'sonata_basket_address' => AddressType::class,\n 'sonata_basket_shipping' => ShippingType::class,\n 'sonata_basket_payment' => PaymentType::class,\n 'sonata_basket_api_form_basket' => ApiBasketType::class,\n 'sonata_basket_api_form_basket_element' => ApiBasketElementType::class,\n 'sonata_basket_api_form_basket_parent' => ApiBasketParentType::class,\n 'sonata_basket_api_form_basket_element_parent' => ApiBasketElementParentType::class,\n ]);\n }", "public function buildForm()\n {\n $this\n ->addSelect(\n 'organization_role',\n $this->getCodeList('OrganisationRole', 'Activity'),\n trans('elementForm.organisation_role'),\n $this->addHelpText('Activity_ParticipatingOrg-role'),\n null,\n true\n )\n ->add('identifier', 'text', ['label' => trans('elementForm.identifier'), 'help_block' => $this->addHelpText('Activity_ParticipatingOrg-ref')])\n ->addSelect('organization_type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.organisation_type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->add('activity_id', 'text', ['label' => trans('elementForm.activity_id')])\n ->add('crs_channel_code','text',['label' => 'Crs Channel Code'])\n ->addNarrative('narrative', trans('elementForm.organisation_name'))\n ->addAddMoreButton('add', 'narrative')\n ->addRemoveThisButton('remove_narrative');\n }", "function add_form($o) {\n\t\t$product = new Product;\n\t\t$product = $product->from_note();\n\n\t\t$this->form = new form;\n\t\t$this->form->open(route::get('Product Add'), 'post', [\n\t\t\t'class' => 'last',\n\t\t]);\n\t\t$this->_build_form($product);\n\t\t$this->form->add(new field('submit_add'));\n\n\t\techo $this->form;\n\t}", "public function create()\n {\n return view('mapping.create');\n }", "public function newPackageAction() {\n $form = new Form_Admin_Client_Package();\n // Check for post to create new library.\n if ($this->_request->isPost()) {\n $params = $this->_request->getPost();\n if ($form->isValid($params)) {\n // Create a new package\n $pId = Repo_Package::getInstance()->addNew(\n $form->getValue('client'), $form->getValue('name'), $form->getValue('status'), $form->getValue('description'), $form->getValue('play_audio')\n );\n // Redirect to package detail page\n $this->_redirect('/admin/client/package-detail/id/' . $pId);\n } else {\n $form->populate($params);\n }\n } else {\n // Set client context\n if ($this->_currentClientId) {\n $form->getElement('client')->setValue($this->_currentClientId);\n }\n }\n $this->view->form = $form;\n }", "public function addAction()\n {\n $this->loginRedirect();\n \n $form = new AddForm();\n $form->setAttribute('action', $this->url('manager', array('action' => 'add') ));\n\n $request = $this->getRequest();\n if( $request->isPost()) {\n $document = new Document();\n $form->setInputFilter($document->getInputFilter());\n \n $data = $request->getPost();\n $data['alias'] = (!empty($data['alias'])) ? $data['alias'] : $this->getServiceLocator()->get('extCMS')->canonalizeAlias($data['pagetitle']);\n \n $form->setData($request->getPost());\n \n $em = $this->getEntityManager();\n\n if( $form->isValid() ) {\n $document->exchangeArray($form->getData());\n $em = $this->em;\n $em->persist($document);\n $em->flush();\n echo \"Stored\";\n }\n \n }\n\n return array('form' => $form, 'action' => 'add');\n }", "function admin_add($album_id = null) {\n\n\t\t\t$this->set('styles',array('forms'));\n\t\t\t$this->set('scripts',array('jquery.forms'));\n\t\t\tif(!$album_id && empty($this->request->data)){\n\t\t\t\t$this->Session->setFlash(__('Invalid album id'));\n\t\t\t\t$this->redirect(Controller::referer());\n\t\t\t}\n\t\t\t$this->set('album_id', $album_id);\n\t}", "function getXMLCatalogTypeAddForm() {\n $this->initializeCatalogTypeAddForm();\n $this->layout->add($this->catalogTypeDialog->getDialogXML());\n }", "function add() {\n // set page rules\n $this->_set_page_rule(\"C\");\n // set template content\n $this->smarty->assign(\"template_content\", \"master/kabupaten/add.html\");\n // load js\n $this->smarty->load_javascript(\"resource/js/select2-3.4.5/select2.min.js\");\n // load css\n $this->smarty->load_style(\"select2/select2.css\");\n // get list data\n $this->smarty->assign(\"rs_provinsi\", $this->m_provinsi->get_all_provinsi());\n // notification\n $this->tnotification->display_notification();\n $this->tnotification->display_last_field();\n // output\n parent::display();\n }", "function new_entry() {\n global $_type;\n if ($_type == 'Import BibTeX') return import_form();\n $entry = array('entrytype' => $_type);\n entry_form($entry, 'New entry');\n}", "public function add_license_field() {\n if ( ! BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {\n add_settings_field(\n $this->addon_code, // ID\n '\"' . $this->addon_name . '\" ' . __( 'Addon License Key', 'bulk-delete' ), // Title\n array( &$this, 'print_license_key_field' ), // Callback\n Bulk_Delete::ADDON_PAGE_SLUG, // Page\n Bulk_Delete::SETTING_SECTION_ID // Section\n );\n }\n }", "public function create()\n {\n $area=Area::all();\n $agent=Agent::all();\n return view('admin.master.agent_area_mapping.add',compact('area','agent'));\n }", "protected function buildConfigurationLibrary()\r\n {\r\n // Generates the Configuration/Library directory\r\n GeneralUtility::mkdir_deep($this->extensionDirectory . 'Configuration/Library/');\r\n\r\n // Generates flexforms\r\n $fileContents = $this->generateFile('Configuration/Library/SavLibraryPlus.xmlt', null, $this->arrayForCodeGenerator);\r\n GeneralUtility::writeFile($this->extensionDirectory . 'Configuration/Library/SavLibraryPlus.xml', $fileContents);\r\n }", "public function addForm($associationDisplay)\n {\n $this->page .= file_get_contents('template/formAssociation.html');\n $this->page = str_replace('{titreFormulaire}','Paramètres de l\\'association',$this->page);\n $this->page = str_replace('{actionAddMembers}', 'index.php?controller=adherent&action=addForm',$this->page);\n $this->page = str_replace('{actionListMembers}', 'index.php?controller=adherent&action=start',$this->page);\n $this->page = str_replace('{actionParamAssoc}', 'index.php?controller=association&action=start',$this->page);\n $this->page = str_replace('{actionAddUsers}', 'index.php?controller=user&action=start',$this->page);\n $this->page = str_replace('{actionAddDonations}', 'index.php?controller=dons&action=start',$this->page);\n $this->page = str_replace('{actionCreateCampaign}', 'index.php?controller=campaign&action=start',$this->page);\n $this->page = str_replace('{actionReadDocuments}', 'index.php?controller=document&action=listFiles',$this->page);\n $this->page = str_replace('{actionCreateNews}', 'index.php?controller=document&action=listFiles',$this->page);\n $this->page = str_replace('{actionAddGroupMembers}', 'index.php?controller=group&action=listFiles',$this->page);\n $this->page = str_replace('{logout}', 'index.php?controller=security&action=logout',$this->page);\n if (isset($_SESSION)) {\n $this->page = str_replace('{account}', 'index.php?controller=adherent&action=modal&id='.$_SESSION['user']['id'].'',$this->page);\n } else {\n $this->page = str_replace('{account}', '#',$this->page);\n }\n $this->page = str_replace('{fa-plus}', 'pres fas fa-cogs',$this->page);\n $this->page = str_replace('{header-css}', 'params-assoc',$this->page);\n if (empty($associationDisplay['logo'])) {\n $this->page = str_replace('{logoPrincipal}', 'img/undefined.jpg',$this->page);\n } else {\n $this->page = str_replace('{logoPrincipal}',$associationDisplay['logo'],$this->page);\n }\n $this->page = str_replace('{action}','addDB',$this->page);\n $this->page = str_replace('{addOrUpdateAssociationTitle}','Création',$this->page);\n $this->page = str_replace('{associationTitle}','',$this->page);\n $this->page = str_replace('{associationName}','',$this->page);\n $this->page = str_replace('{hidden}','hidden',$this->page);\n $this->page = str_replace('{hiddenButtonReset}','',$this->page);\n $this->page = str_replace('{hiddenButtonResetUrl}','hidden',$this->page);\n $this->page = str_replace('{logo}', '',$this->page);\n $this->page = str_replace('{adresse}', '',$this->page);\n $this->page = str_replace('{codepostal}', '',$this->page);\n $this->page = str_replace('{ville}', '',$this->page);\n $this->page = str_replace('{email}', '',$this->page);\n $this->page = str_replace('{tel}', '',$this->page);\n $this->page = str_replace('{linkedinPath}', '',$this->page);\n $this->page = str_replace('{twitterPath}', '',$this->page);\n $this->page = str_replace('{facebookPath}', '',$this->page);\n $this->page = str_replace('{sitePath}', '',$this->page);\n $this->page = str_replace('{nameSubmit}', 'envoyer',$this->page);\n $this->displayPage();\n }", "public function create()\n {\n return view('library.create');\n }", "function nurani_library_admin_form($form, &$form_state) {\n $form['connection'] = array(\n '#type' => 'fieldset',\n '#title' => t('Nurani Library data connection'),\n );\n $form['connection']['nurani_library_backend'] = array(\n '#type' => 'select',\n '#title' => t('Backend type'),\n '#default_value' => variable_get('nurani_library_backend', 'REST'),\n '#options' => nurani_library_backend_options(),\n '#required' => TRUE,\n );\n $form['tests'] = array(\n '#type' => 'item',\n '#title' => t(\"%backend Connection status\", array('%backend' => variable_get('nurani_library_backend', 'REST'))),\n '#markup' => nurani_library_tests(),\n );\n\n return system_settings_form($form);\n}", "public function create()\n {\n return view('admin.associate.add')->withPolies(Models\\Poly::all());\n }", "function add() {\n\t\t// Build our array of data. The created date is always set to\n\t\t// the now() of the database server.\n\t\t$data = array(\n\t\t\t'name'\t\t=> $this->name,\n\t\t\t'person'\t=> $this->person,\n\t\t\t'email'\t\t=> $this->email,\n\t\t\t'phone'\t\t=> $this->phone,\n\t\t\t'address'\t=> $this->address,\n\t\t\t'address2'\t=> $this->address2,\n\t\t\t'city'\t\t=> $this->city,\n\t\t\t'state'\t\t=> $this->state,\n\t\t\t'postal'\t=> $this->postal,\n\t\t\t'country'\t=> $this->country,\n\t\t\t'created' => 'now()',\n\t\t);\n\n\t\t// Save to the database.\n\t\t$this->db->insert('organization', $data);\n\t}", "public function addSubForm();", "protected function manage()\n\t{\n \t\t$form = new \\IPS\\Helpers\\Form;\n\t\t$form->addHeader( 'terms_guidelines' );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'gl_type', \\IPS\\Settings::i()->gl_type, FALSE, array(\n\t\t\t\t'options' => array(\n\t\t\t\t\t\t'internal' => 'gl_internal',\n\t\t\t\t\t\t'external' => 'gl_external',\n\t\t\t\t\t\t'none' => \"gl_none\" ),\n\t\t\t\t'toggles' => array(\n\t\t\t\t\t\t'internal'\t=> array( 'gl_guidelines_id' ),\n\t\t\t\t\t\t'external'\t=> array( 'gl_link' ),\n\t\t\t\t\t\t'none'\t\t=> array(),\n\t\t\t\t)\n\t\t) ) );\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Translatable( 'gl_guidelines', NULL, FALSE, array( 'app' => 'core', 'key' => 'guidelines_value', 'editor' => array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'Guidelines', 'attachIds' => array( NULL, NULL, 'gl_guidelines' ) ) ), NULL, NULL, NULL, 'gl_guidelines_id' ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Url( 'gl_link', \\IPS\\Settings::i()->gl_link, FALSE, array(), NULL, NULL, NULL, 'gl_link' ) );\n\t\t$form->addHeader( 'terms_privacy');\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'privacy_type', \\IPS\\Settings::i()->privacy_type, FALSE, array(\n\t\t\t\t'options' => array(\n\t\t\t\t\t\t'internal' => 'privacy_internal',\n\t\t\t\t\t\t'external' => 'privacy_external',\n\t\t\t\t\t\t'none' => \"privacy_none\" ),\n\t\t\t\t'toggles' => array(\n\t\t\t\t\t\t'internal'\t=> array( 'privacy_text_id' ),\n\t\t\t\t\t\t'external'\t=> array( 'privacy_link' ),\n\t\t\t\t\t\t'none'\t\t=> array(),\n\t\t\t\t)\n\t\t) ) );\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Translatable( 'privacy_text', NULL, FALSE, array( 'app' => 'core', 'key' => 'privacy_text_value', 'editor' => array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'Privacy', 'attachIds' => array( NULL, NULL, 'privacy_text' ) ) ), NULL, NULL, NULL, 'privacy_text_id' ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Url( 'privacy_link', \\IPS\\Settings::i()->privacy_link, FALSE, array(), NULL, NULL, NULL, 'privacy_link' ) );\n\t\t\t\n\t\t$form->addHeader( 'terms_registration' );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Translatable( 'reg_rules', NULL, FALSE, array( 'app' => 'core', 'key' => 'reg_rules_value', 'editor' => array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'RegistrationRules', 'attachIds' => array( NULL, NULL, 'reg_rules' ) ) ), NULL, NULL, NULL, 'reg_rules_id' ) );\n\t\t\n\t\tif ( $values = $form->values() )\n\t\t{\n\t\t\tforeach ( array( 'gl_guidelines' => 'guidelines_value', 'privacy_text' => 'privacy_text_value', 'reg_rules' => 'reg_rules_value' ) as $k => $v )\n\t\t\t{\n\t\t\t\t\\IPS\\Lang::saveCustom( 'core', $v, $values[ $k ] );\n\t\t\t\tunset( $values[ $k ] );\n\t\t\t}\n\t\t\t\n\t\t\t$form->saveAsSettings( $values );\n\t\t\t\\IPS\\Session::i()->log( 'acplogs__terms_edited' );\n\t\t}\n\t\t\n\t\t\\IPS\\Output::i()->title\t\t= \\IPS\\Member::loggedIn()->language()->addToStack('menu__core_settings_terms');\n\t\t\\IPS\\Output::i()->output\t.= \\IPS\\Theme::i()->getTemplate( 'global' )->block( 'menu__core_settings_terms', $form );\n\t}", "public function build_creation_form()\n {\n $this->build_basic_form();\n }", "public function addType()\n {\n $form = new srCertificateTypeFormGUI($this, new srCertificateType());\n $this->tpl->setContent($form->getHTML());\n }", "function add($id = null) // auto add linked record with default values and load the edit form with the data\r\n {\r\n\r\n // try and save\r\n\r\n\t\t\tif ($this->Packinglist->save($this->data['Packinglist']))\r\n\t\t\t{\r\n\r\n\t\t\t\t// load the form for edit with the new id\r\n\t\t\t\t$id = $this->Packinglist->id;\r\n $this->redirect(\"/packinglists/edit/\" . $id);\r\n\t\t \t}\r\n\t\t \telse // save was a bloomin' failure\r\n\t\t \t{\r\n\t\t \t $this->flash('Your packing list could not be created. Report to admin.',\"/packinglists/index\");\r\n\t\t \t}\r\n\r\n }", "public function addAction()\n {\n $formData = new JsonToDiagramMapping(); // Your form data class. Has to be an object, won't work properly with an array.\n\n $flow = $this->get('data_consolidation.custom_nodes.form.flow.json_to_diagram_mapping'); // must match the flow's service id\n $flow->bind($formData);\n\n // form of the current step\n $form = $flow->createForm();\n if ($flow->isValid($form)) {\n $flow->saveCurrentStepData($form);\n\n if ($flow->nextStep()) {\n // form for the next step\n $form = $flow->createForm();\n } else {\n // flow finished\n // Remove empty FieldMapping objects from the DataSourceToDiagramMapping.\n $doctrineEntityHelper = $this->get('data_consolidation.custom_nodes.doctrine_entity_helper');\n $doctrineEntityHelper->removeEmptyFieldMappingsFromDataSourceToDiagramMapping($formData);\n\n // Persist the DataSourceToDiagramMapping.\n $em = $this->getDoctrine()->getManager();\n $em->persist($formData);\n $em->flush();\n\n $flow->reset(); // remove step data from the session\n\n // Add a flash message marking the successful addition of the new DataSourceToDiagramMapping.\n $dataSourceToDiagramMappingId = $formData->getId();\n $this->addFlash('notice', sprintf(\"Added a new data source to diagram mapping with id '%d' and short name '%s'.\", $dataSourceToDiagramMappingId, $formData->getShortName()));\n\n return $this->redirectToRoute('data_consolidation.custom_nodes.data_source_to_diagram_mapping.view', array(\n 'mapping_id' => $dataSourceToDiagramMappingId,\n ));\n }\n }\n\n return $this->render('DataConsolidationCustomNodesBundle:JsonToDiagramMapping:form_flow.html.twig', array(\n 'form' => $form->createView(),\n 'flow' => $flow,\n 'page_title' => 'Add a JSON to diagram mapping',\n ));\n }", "function add_region()\r\n {\r\n // DEFINES READ CATEROTY NAME FORM CATEGORY FORM\r\n $region = html_escape($this->input->post('region'));\r\n $code = html_escape($this->input->post('code'));\r\n\r\n\r\n // ASSIGN THE VALUES OF TEXTBOX TO ASSOCIATIVE ARRAY\r\n $args = array(\r\n 'name' => $region,\r\n 'code' => $code\r\n );\r\n\r\n // DEFINES CALL THE FUNCTION OF insert_data FORM Crud_model CLASS\r\n $result = $this->Crud_model->insert_data('mp_region', $args);\r\n if ($result == 1)\r\n {\r\n $array_msg = array(\r\n 'msg' => '<i style=\"color:#fff\" class=\"fa fa-check-circle-o\" aria-hidden=\"true\"></i> Added Successfully',\r\n 'alert' => 'info'\r\n );\r\n $this->session->set_flashdata('status', $array_msg);\r\n }\r\n else\r\n {\r\n $array_msg = array(\r\n 'msg' => '<i style=\"color:#c00\" class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> Error Category cannot be added',\r\n 'alert' => 'danger'\r\n );\r\n $this->session->set_flashdata('status', $array_msg);\r\n }\r\n\r\n redirect('initilization/region');\r\n }", "public function dsk_product_attribute_add_new_meta_field(){\n // This will add the custom meta field to the add new term page\n ?>\n <div class=\"form-field term-dsk_product_attribute_type\">\n <label for=\"dsk_product_attribute_type\"><?php esc_html_e( 'Type', 'dsk' ); ?></label>\n <select name=\"dsk_product_attribute_type\" id=\"dsk_product_attribute_type\">\n <option value=\"text\"><?php esc_html_e('Text', 'dsk');?></option>\n <option value=\"color\"><?php esc_html_e('Color Picker', 'dsk');?></option>\n </select>\n <p class=\"description\"></p>\n </div>\n <div class=\"form-field term-dsk_product_attribute_color\">\n <label for=\"dsk_product_attribute_color\"><?php esc_html_e( 'Color Picker', 'dsk' ); ?></label>\n <input type=\"text\" class=\"colorpicker sns-colorpicker\" value=\"\" name=\"dsk_product_attribute_color\"/>\n <p class=\"description\"></p>\n </div>\n <?php\n }", "public function configure()\r\n\t{\r\n\t\t$form = new FormUI(__CLASS__);\r\n\t\t// Looks awful but is just Javascript with all the line breaks stripped\r\n\t\t$bookmarklet = 'javascript:(function(){var go=function(path,params){var openWindow=window.open(path);var form=openWindow.document.createElement(\"form\");form.setAttribute(\"method\",\"post\");form.setAttribute(\"action\",path);for(var key in params){var f=document.createElement(\"input\");f.setAttribute(\"type\",\"hidden\");f.setAttribute(\"name\",key);f.setAttribute(\"value\",params[key]);form.appendChild(f);}openWindow.document.body.appendChild(form);form.submit();};var t=prompt(\"Enter comma-separated tags\",\"\");go(\"' . Site::get_url('site') . '/receive_bookmark\",{bookmark_url:encodeURIComponent(location.href), tags:encodeURIComponent(t), title:encodeURIComponent(document.title)});})()';\r\n\t\t\r\n\t\t$form->append(FormControlStatic::create(\"bookmarklet_link\")->set_static(\"<a href='\" . $bookmarklet . \"'>Bookmarklet</a>\"));\r\n\t\treturn $form;\r\n\t}", "public static function crb_add_term_meta(){\n /*\n Container::make('term_meta', 'Term Properties')\n ->show_on_taxonomy('term_name')\n ->add_fields(array(\n Field::make('text', 'crb_branch_color', 'Color (In Hex Format)'),\n Field::make('image', 'crb_branch_thumb', 'Featured Image'),\n Field::make('text', 'crb_contact_form', 'Form Shortcode'),\n Field::make('text', 'crb_contact_email', 'Contact Email Address'),\n Field::make('text', 'crb_phone_number', 'Phone Number')\n ));\n */\n }", "protected function configureFormFields(FormMapper $formMapper)\n {\n // get all languages\n $languages = $this->configurationPool->getContainer()->getParameter('languages');\n\n $formMapper\n ->tab('Accommodation', array(\n 'class' => 'col-md-12',\n 'box_class' => 'box box-solid box-discover',\n // ...\n ))\n ->with(' ', array(\n 'class' => 'col-md-8',\n 'box_class' => 'box box-solid box-discover',\n // ...\n ))\n ->add('name')\n ->add('translations', 'a2lix_translations_gedmo', array(\n 'translatable_class' => 'DA\\MainBundle\\Entity\\Accommodation',\n 'by_reference' => false,\n 'label' => false,\n 'locales' => array_keys($languages),\n 'fields'=>array(\n 'title'=>array(\n 'field_type'=>'text',\n 'required' => false,\n ),\n 'description'=>array(\n 'field_type'=>'textarea',\n 'required' => false,\n )\n )\n ))\n ->end()\n ->with('Info', array(\n 'class' => 'col-md-4',\n 'box_class' => 'box box-solid box-discover uploadinput',\n // ...\n ))\n ->add('image', 'sonata_type_model_list', array('required' => false))\n ->add('gallery', 'sonata_type_model_list', array('required' => false))\n ->add('price_for_day',null,array('required' => true))\n ->add('price_for_month',null,array('required' => true))\n ->add('rooms')\n ->add('location', 'entity', array(\n 'class' => 'DAMainBundle:Location',\n 'query_builder' => function (EntityRepository $er) {\n return $er->createQueryBuilder('l')\n ->Where('l.category = ?1')\n ->setParameter('1','city')\n ;\n },\n 'choice_label' => 'name'\n ))\n ->add('current_location', 'entity', array(\n 'class' => 'DAMainBundle:Location',\n 'query_builder' => function (EntityRepository $er) {\n return $er->createQueryBuilder('l')\n ->Where('l.category = ?1')\n ->setParameter('1','apartment')\n ->orwhere('l.category = ?2')\n ->setParameter('2','villa');\n },\n 'choice_label' => 'name'\n ))\n ->add('category', 'choice', array(\n 'label'=> 'Category',\n 'choices' => array(\n 'villa' => 'Villa',\n 'apartment' => 'Apartment'\n ),\n 'required' => true,\n 'expanded' => false,\n ))\n ->add('best_price')\n ->end()\n ->end()\n ->tab('Comfort', array(\n 'class' => 'col-md-12',\n 'box_class' => 'box box-solid box-discover',\n // ...\n ))\n ->with('Comforts', array(\n 'class' => 'col-md-12 ',\n 'box_class' => 'box box-solid box-discover room_admin_block',\n ))\n\n //->add('comfort', 'sonata_type_model', array('multiple' => true, 'by_reference' => false))\n ->add('comfort', 'entity',\n array(\n 'class' => 'DAMainBundle:Comfort',\n 'property' => 'name',\n 'required' => false,\n 'attr'=> array(\n 'class'=> 'list_comfort'\n ),\n 'multiple' => true,\n 'expanded' => true,\n 'group_by' => function($val, $key, $index) {\n switch ($val->getCategory()){\n case 1 :\n return 'Bathroom (Ванная комната) (Լոգարան)';\n break;\n case 2 :\n return 'Bedroom (Спальня) (Ննջարան)';\n break;\n }\n },\n )\n )\n ->end()\n ->end();\n\n\n }", "function add()\r\n {\r\n $data['sistema'] = $this->sistema;\r\n if($this->acceso(155)){\r\n $this->load->library('form_validation');\r\n\r\n $this->form_validation->set_rules('mapa_titulo','Mapa Titulo','required');\r\n\r\n if($this->form_validation->run()) \r\n { \r\n $params = array(\r\n 'pagina_id' => $this->input->post('pagina_id'),\r\n 'estadopag_id' => $this->input->post('estadopag_id'),\r\n 'mapa_titulo' => $this->input->post('mapa_titulo'),\r\n 'mapa_descripcion' => $this->input->post('mapa_descripcion'),\r\n 'mapa_latitud' => $this->input->post('mapa_latitud'),\r\n 'mapa_longitud' => $this->input->post('mapa_longitud'),\r\n 'mapa_indicador' => $this->input->post('mapa_indicador'),\r\n );\r\n\r\n $mapa_id = $this->Mapa_model->add_mapa($params);\r\n redirect('mapa/index');\r\n }\r\n else\r\n {\r\n $this->load->model('Pagina_web_model');\r\n $data['all_pagina_web'] = $this->Pagina_web_model->get_all_pagina_web();\r\n\r\n $this->load->model('Estado_pagina_model');\r\n $data['all_estado_pagina'] = $this->Estado_pagina_model->get_all_estado_pagina();\r\n $data['page_title'] = \"Mapa\";\r\n $data['_view'] = 'mapa/add';\r\n $this->load->view('layouts/main',$data);\r\n }\r\n }\r\n }", "public function submitForm(array &$form, FormStateInterface $form_state) {\n $config = $this->config('cohesion.settings');\n $config->set(\"google_map_api_key\", $form_state->getValue(\"google_map_api_key\"));\n $config->save();\n\n $cohesion_module_libraries = \\Drupal::keyValue('cohesion.elements.asset.libraries');\n $gmap_lib = $cohesion_module_libraries->get('element_templates.google-map');\n\n // Alter Google Maps API key\n array_walk_recursive($gmap_lib, function (&$value, $key) use (&$form_state) {\n if ('asset_url' == $key && (strpos($value, 'maps.googleapis.com') !== FALSE) && (strpos($value, 'key') !== FALSE) && $form_state instanceof FormStateInterface) {\n $url_parts = parse_url($value);\n $value = str_replace($url_parts['query'], 'key=' . $form_state->getValue(\"google_map_api_key\"), $value);\n }\n });\n\n // Override Google Maps API key settings in keyValue storage\n $cohesion_module_libraries->set('element_templates.google-map', $gmap_lib);\n\n // Invalidate \"libray_info\" tag so that udated map api key is loaded\n \\Drupal::service('cache_tags.invalidator')->invalidateTags(['library_info',]);\n\n // Rebuild site routes\n \\Drupal::service('router.builder')->rebuild();\n\n parent::submitForm($form, $form_state);\n }", "function add() {\r\n $uploaded = false;\r\n\t$saved = false; \r\n\t$needupload = false; \r\n\t\t\r\n $this->pageTitle = __('Add new place to Pordoquier.com.ar',true); \r\n $this->layout ='map';\r\n $this->_setCategories();\r\n//\t$this->data['Place']['user_id'] = $this->Session->read('uid');\r\n\t if(!empty($this->data)) {\r\n $allowed = array(' ','@','.','&','!','á','é','í','ó','ú');\r\n $this->data['Place']['name'] = Sanitize::paranoid($this->data['Place']['name'],$allowed);\r\n $this->data['Place']['address'] = Sanitize::paranoid($this->data['Place']['address'],$allowed);\r\n $this->data['Place']['description'] = Sanitize::paranoid($this->data['Place']['description'],$allowed);\r\n $this->data['Place']['tags'] = Sanitize::paranoid($this->data['Place']['tags'],array(',',' ','á','é','í','ó','ú')); \r\n $this->Place->create();\r\n if($this->Place->save($this->data)) {\r\n\t\t\t\t$saved = true;\r\n $this->Session->setFlash(__('place-saved',true));\r\n\t\t\t\tforeach($this->data['Place']['pic'] as $pic){\r\n\t\t\t\t\tif(!empty($pic['name'])) {\r\n\t\t\t\t\t\t$needupload = true;\r\n\t\t\t\t\t\t$image_path = $this->Image->upload_image_and_thumbnail($pic,600,450,50,33, \"places\");\r\n\t\t\t\t\t\tif(isset($image_path)) {\r\n\t\t\t\t\t\t\t$this->Place->Photo->create();\r\n\t\t\t\t\t\t\t$this->Place->Photo->data['place_id'] = $this->Place->id;\r\n\t\t\t\t\t\t\t$this->Place->Photo->data['photo'] = $image_path;\r\n\t\t\t\t\t\t\t$this->Place->Photo->save($this->Place->Photo->data);\r\n\t\t\t\t\t\t\t$this->Place->saveField('photo',$image_path);\r\n\t\t\t\t\t\t\t$uploaded = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$this->redirect(array('action'=>'view',$this->Place->id), null, true);\r\n } else {\r\n $this->Session->setFlash(__('place-not-saved',true));\r\n }\r\n\t\t\tif($saved && ($uploaded || !$needupload)) {\r\n\t\t\t\t$this->Session->setFlash(__('place-saved', true));\r\n\t\t\t\t//$this->redirect(array('action'=>'index'));\r\n\t\t\t}\r\n\t\t\telse if($saved && !$uploaded && $needupload) {\r\n\t\t\t// User was saved but we needed to upload and the saving failed\r\n\t\t\t// We have to rollback this, so we have to delete the gift that we just added\r\n\t\t\t\t$this->Session->setFlash(__('image-4-place-not-saved', true));\r\n\t\t\t\t$this->Place->del($this->Place->id);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->Session->setFlash(__('place-not-saved', true));\r\n\t\t\t}\t\t\t\r\n } \r\n }", "public function actionCreate()\n {\n $form = new GlossaryForm();\n\n if ($form->load(Yii::$app->request->post()) && $form->validate()) {\n try {\n $id = $this->service->create($form);\n return $this->redirect(['view', 'id' => $id]);\n } catch (\\DomainException $e) {\n Yii::$app->errorHandler->logException($e);\n Yii::$app->session->setFlash($e->getMessage());\n }\n }\n return $this->render('create', [\n 'model' => $form,\n ]);\n }", "public function add($collection) {\n \t$this->__makeAutocomplete($collection);\n }", "public function add()\n\t{\n\t\t$vw = $this->load->view('afiliado/form', array(), TRUE);\n\t\t$this->load->view('util/plantilla', array('titulo'=>'Agregar nuevo afiliado', 'content'=>$vw) );\n\t}", "public function add_brand()\n\t{\n\t\t$header = $this->loaded_module_admin(0);\n\t\t$footer = $this->loaded_module_admin(1);\n\t\t\n\t\t$data = $this->settings_admin();\n\t\t\n\t\t$header->header_view();\n\t\t$this->load->view('Add_brand_v', $data);\n\t\t$footer->footer_view();\n\t}", "protected function createDefaultMappingForm() {\n $configuration = [];\n $plugin_id = 'test';\n $plugin_definition = [];\n $fieldTypePluginManager = $this->prophesize(FieldTypePluginManager::class)\n ->reveal();\n $migrationPluginManager = $this->prophesize(MigratePluginManagerInterface::class)\n ->reveal();\n $migration = $this->prophesize(MigrationInterface::class)\n ->reveal();\n\n $mappingForm = new DefaultFieldForm($configuration, $plugin_id, $plugin_definition, $fieldTypePluginManager, $migrationPluginManager, $migration);\n return $mappingForm;\n }" ]
[ "0.6370599", "0.62014955", "0.5748663", "0.55234164", "0.54849935", "0.54781175", "0.5471814", "0.5432854", "0.5385467", "0.5369835", "0.53327274", "0.53118956", "0.53019464", "0.5272395", "0.5257743", "0.52571976", "0.5254366", "0.52541244", "0.525006", "0.52401656", "0.5235658", "0.5229273", "0.5224695", "0.5205143", "0.51754427", "0.5175218", "0.51702464", "0.5123504", "0.51128626", "0.5108741", "0.510087", "0.50727713", "0.50691324", "0.5068701", "0.50672936", "0.50661016", "0.50652075", "0.5056982", "0.5056801", "0.50517964", "0.50497496", "0.5047804", "0.50426334", "0.5029711", "0.50162387", "0.49982592", "0.4976913", "0.49737182", "0.49705297", "0.4961656", "0.4956036", "0.4954638", "0.49520513", "0.49473026", "0.49442044", "0.49369806", "0.49367452", "0.49285617", "0.4926821", "0.49195236", "0.4913933", "0.49120584", "0.49077073", "0.49023837", "0.4898788", "0.48980403", "0.4893489", "0.48825476", "0.48804522", "0.48765302", "0.48739296", "0.48696113", "0.48689827", "0.48675373", "0.48672736", "0.48664457", "0.4866273", "0.48652655", "0.48571643", "0.48503822", "0.48470202", "0.48433197", "0.48431024", "0.48420042", "0.48402068", "0.48399183", "0.48312357", "0.48283708", "0.48282158", "0.48202625", "0.48192337", "0.48170593", "0.4816314", "0.48160532", "0.48089996", "0.48082224", "0.48068956", "0.48037794", "0.48024338", "0.48017552" ]
0.72208124
0
Get not mapped libraries.
Получить неотображаемые библиотеки.
function thisted_event_import_get_not_mapped_libraries() { $all_libraries = thisted_events_import_get_libraries(); $mapped_libraries = variable_get('mapped_libraries', array()); $not_mapped = array_diff_key($all_libraries, $mapped_libraries); return $not_mapped; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getLibraries(): array\n {\n return array_map(\n function ($library) {\n $library = array_merge(\n [\n 'homepage' => null,\n 'version' => null,\n ],\n $library\n );\n\n if ($library['homepage']) {\n $library['homepage'] = sprintf(\n '<a href=\"%s\" target=\"_blank\">%s</a>',\n $library['homepage'],\n preg_replace('#^(https?://(www)?)#i', '', $library['homepage'])\n );\n }\n\n return $library;\n },\n array_filter(\n $GLOBALS['LEAFLET_LIBRARIES'],\n function ($library) {\n return isset($library['name'], $library['license']);\n }\n )\n );\n }", "protected function getLibraries(): array\n {\n return [];\n }", "public static function getLibraries() {\n return $_SESSION['culr_libraries'] ?? [];\n }", "public function getLibraries() : array\n\t{\n\t\treturn $this->get('libraries');\n\t}", "public function loadLibraries();", "protected function _getAvailableLangLibs(){\n\t\t$this->langLibs = Cundd_Lang::getAvailableLangLibs();\n\t\t// $this->pd($this->langLibs);\n\t\treturn $this->langLibs;\n\t}", "public function getLibraries()\n {\n return $this->libraries;\n }", "public function loadLibraries()\n {\n $results = H5pLibrary::select([\n 'id',\n 'name',\n 'title',\n 'major_version',\n 'minor_version',\n 'patch_version',\n 'runnable',\n 'restricted',\n ])\n ->orderBy('title', 'ASC')\n ->orderBy('major_version', 'ASC')\n ->orderBy('minor_version', 'ASC')\n ->get();\n\n $libraries = [];\n foreach ($results as $library) {\n $libraries[$library->name][] = $library;\n }\n\n return $libraries;\n }", "public function testLibraryMap() {\n $root = $this->getLibraryRoot();\n $library = phutil_get_library_name_for_root($root);\n\n $new_library_map = id(new PhutilLibraryMapBuilder($root))\n ->buildMap();\n\n $bootloader = PhutilBootloader::getInstance();\n $old_library_map = $bootloader->getLibraryMapWithoutExtensions($library);\n unset($old_library_map[PhutilLibraryMapBuilder::LIBRARY_MAP_VERSION_KEY]);\n\n $this->assertEqual(\n $new_library_map,\n $old_library_map,\n pht(\n 'The library map does not appear to be up-to-date. Try '.\n 'rebuilding the map with `%s`.',\n 'arc liberate'));\n }", "function required_libraries($library) {\n $class_vars = get_class_vars($library); \n return (isset($class_vars['required_libraries'])) ? $class_vars['required_libraries'] : array(); \n }", "public function libraries()\n {\n return $this->libraryRepository;\n }", "static function getInstalledNonSystemModules() {\n return AngieApplication::cache()->get('installed_non_system_modues', function() {\n $rows = DB::execute('SELECT name, is_enabled FROM ' . TABLE_PREFIX . 'modules WHERE name != ? ORDER BY position', 'system', true);\n\n if($rows instanceof DBResult) {\n $result = array();\n\n foreach($rows as $row) {\n $result[$row['name']] = (boolean) $row['is_enabled'];\n } // foreach\n\n return $result;\n } // if\n\n return array();\n });\n }", "protected function _tt_libraries()\n\t{\n\t\tif (is_null($this->tt_libraries))\n\t\t{\n\t\t\t$this->tt_libraries = array();\n\n\t\t\t$dir = FCPATH . 'traffictower/libraries';\n\t\t\t$scandir = scandir($dir);\n\t\t\tforeach ($scandir as $file)\n\t\t\t{\n\t\t\t\t$fileinfo = pathinfo($file);\n\t\t\t\tif ($fileinfo['extension'] === 'php')\n\t\t\t\t{\n\t\t\t\t\t$this->tt_libraries[] = strtolower($fileinfo['filename']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn $this->tt_libraries;\n\t}", "public function getLibrary();", "function thisted_events_import_get_libraries() {\n $query = db_select('node', 'n')\n ->fields('n', array('nid', 'title'))\n ->condition('n.type', 'ding_library', '=');\n\n $result = $query\n ->execute()\n ->fetchAllKeyed();\n\n return $result;\n}", "protected function findMissingSoftReferencedFiles() : array {}", "public function loadLibraries()\n {\n $installedLibraries = $this->libraryRepository->findAll();\n\n $versionsArray = [];\n foreach ($installedLibraries as $library) {\n /** @var Library $library */\n $versionsArray[$library->getTitle()][] = $library->toStdClass();\n }\n\n return $versionsArray;\n }", "public function getUnloadedModules(array $modules);", "protected function findMissingReferencedFiles() : array {}", "protected function getMissingPhpModulesOfExtensions() {}", "protected function getProjectLibDirectories() {\r\n // get the application lib directories\r\n $lib_dirs=array();\r\n\t\t$lib_dirs[]= P(\"frameworkpath\").\"lib\";\r\n\r\n // get the cross application lib dir (i.e. apps/frontend/lib)\r\n $lib_dirs[] =P(\"webprojectpath\").\"lib\";\r\n\r\n // get the project lib dir\r\n $lib_dirs[] =P(\"webprojectpath\").\"class\";\r\n\r\n\t\t$lib_dirs[] =P(\"frameworkpath\").\"class\";\r\n $lib_dirs[] =P(\"webprojectpath\").\"lib/services\";\r\n\t\t$lib_dirs[] =P(\"frameworkpath\").\"lib/services\";\r\n // get the plugin lib dirs\r\n\t\tif(isset($GLOBALS['config']['frameworklib'])&&is_array($GLOBALS['config']['frameworklib']))\r\n\t {\r\n $lib_dirs = array_merge($lib_dirs,$GLOBALS['config']['frameworklib']);\r\n\t }\r\n return $lib_dirs;\r\n }", "public function getListLibraries(){\n $url = $this->sUrl.\"/api2/repos/\";\n $this->getCurlClient()->setOpt(CURLOPT_RETURNTRANSFER, true);\n $this->getCurlClient()->setOpt(CURLOPT_FOLLOWLOCATION, true);\n $this->getCurlClient()->setOpt(CURLOPT_HTTPGET,1);\n $this->getCurlClient()->setOpt(CURLOPT_CUSTOMREQUEST,'GET');\n $this->getCurlClient()->setOpt(CURLOPT_HTTPHEADER ,array('Authorization: Token '.$this->getAuthToken()));\n $this->getCurlClient()->get($url);\n if (($this->getCurlClient()->response!=\"\") && ($this->getCurlClient()->response!=null)) {\n return $this->getCurlClient()->response;\n } else {\n return [];\t\n }\n }", "function procfindlib( $name) {\n\t$paths = ttl( '/usr/local,/APPS,/APPS/research');\n\tforeach ( $paths as $path) {\n\t\tif ( is_dir( \"$path/$name\")) return \"$path/$name\";\n\t}\n\tdie( \"Did not find library [$name] in any of the paths [\" . ltt( $paths) . \"]\\n\");\n}", "public function getLibraryInfos($package)\n {\n $instances = $this->getInstances();\n foreach ($instances as $instance) {\n if ($instance['package'] == $package) {\n return $instance;\n }\n }\n return null;\n }", "public function getLoadedModules();", "protected function getAvailablePackages() {\n\t\t$allPackages = $this->packageManager->getActivePackages();\n\n\t\t// make sure the packages of the framework are excluded depending on our settings\n\t\t$packages = array();\n\t\t$packagesToExclude = \\TYPO3\\Flow\\Utility\\Arrays::trimExplode(',', $this->settings['packagesToExclude']);\n\t\tforeach ($allPackages as $package) {\n\t\t\tif (!in_array($package->getPackageKey(), $packagesToExclude)\n\t\t\t\t&& $this->hasXliffFilesInDefaultDirectories($package)\n\t\t\t) {\n\t\t\t\t$packages[] = $package;\n\t\t\t}\n\t\t}\n\n\t\treturn $packages;\n\t}", "private static function _registerLibraries() {\n\t\t$libraries = array();\n\t\t$dirterator = new DirectoryIterator(dirname(__FILE__) . '/../../');\n\t\tforeach ($dirterator as $item) {\n\t\t\tif ($item->isDir() && !$item->isDot() && !(in_array($item->getFilename(), array('frood')))) {\n\t\t\t\tif (($libraryIncludePath = realpath($item->getPathname() . '/src')) !== FALSE) {\n\t\t\t\t\t$libraries[] = $libraryIncludePath;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new FroodAutoloader($libraries);\n\t}", "public static function getNonNativeModuleList()\n\t{\n\t\t$db = Db::getInstance();\n\n\t\t$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';\n\t\t$nativeModules = simplexml_load_file($module_list_xml);\n\t\t$nativeModules = $nativeModules->modules;\n\t\tforeach ($nativeModules as $nativeModulesType)\n\t\t\tif (in_array($nativeModulesType['type'],array('native','partner')))\n\t\t\t{\n\t\t\t\t$arrNativeModules[] = '\"\"';\n\t\t\t\tforeach ($nativeModulesType->module as $module)\n\t\t\t\t\t$arrNativeModules[] = '\"'.pSQL($module['name']).'\"';\n\t\t\t}\n\n\t\treturn $db->ExecuteS('\n\t\t\tSELECT *\n\t\t\tFROM `'._DB_PREFIX_.'module` m\n\t\t\tWHERE name NOT IN ('.implode(',',$arrNativeModules).') ');\n\t}", "public function find_required_packages();", "private function getPackages() {\n\n\t\t$ourPackages = array();\n\n\t\t// Dependencies\n\t\t$installedPackages = $this->composer->getRepositoryManager()\n\t\t\t->getLocalRepository()->getPackages();\n\n\t\t// Root package\n\t\tarray_unshift($installedPackages, $this->composer->getPackage());\n\n\t\tforeach($installedPackages as $pkg) {\n\n\t\t\t// Resolve aliases\n\t\t\twhile($pkg instanceof AliasPackage)\n\t\t\t\t$pkg = $pkg->getAliasOf();\n\n\t\t\tif(!in_array($pkg, $ourPackages))\n\t\t\t\t$ourPackages[] = $pkg;\n\t\t}\n\n\t\treturn $ourPackages;\n\t}", "protected function find_missing_tables() {\n\n\t\t$db_tables = get_option( $this->option_key, array() );\n\n\t\t$missing_tables = array();\n\t\tforeach ( $this->get_tables_list() as $table ) {\n\t\t\tif ( ! in_array( $table, $db_tables, true ) ) {\n\t\t\t\t$missing_tables[] = $table;\n\t\t\t}\n\t\t}\n\n\t\treturn $missing_tables;\n\t}", "public function find_installed_packages();", "public function getLibelles()\n {\n return $this->libelles;\n }", "public function findMissingDependencies(): array\n {\n $manager = \\System\\Classes\\PluginManager::instance();\n\n $missing = [];\n\n foreach ($this->getThemes() as $theme) {\n $required = $theme->getConfigValue('require', false);\n if (!$required || !is_array($required)) {\n continue;\n }\n\n foreach ($required as $require) {\n if ($manager->hasPlugin($require)) {\n continue;\n }\n\n if (!in_array($require, $missing)) {\n $missing[] = $require;\n }\n }\n }\n\n return $missing;\n }", "public function init_libs($lib_dir = ''){\n\n if($lib_dir == ''){\n $lib_dir = '.'.$this->ds.'lib'.$this->ds.'module';\n }\n\n // Initial a empty array as a container for library objects\n $this->libs = array();\n\n // Read all requeired libraries defined in config file\n foreach($this->config['basic']['libraries'] as $lib_name){\n require(\"$lib_dir\".$this->ds.\"$lib_name.php\");\n $class = new ReflectionClass($lib_name);\n if(!$class->isAbstract()){\n if(preg_match('/^mc_/', $lib_name)){\n $this->libs[$lib_name] = new $lib_name($this->config);\n }else{\n $this->libs[$lib_name] = new $lib_name();\n }\n }\n }\n }", "public function getLibraryHooks(): array\n {\n if (null === $this->enabledLibraryHooks) {\n return array_values($this->availableLibraryHooks);\n }\n\n return array_values(array_intersect_key(\n $this->availableLibraryHooks,\n array_flip($this->enabledLibraryHooks)\n ));\n }", "public function provider_modules_detects_invalid_modules()\n\t{\n\t\treturn [\n\t\t\t[['unittest' => MODPATH.'fo0bar']],\n\t\t\t[['unittest' => MODPATH.'unittest', 'fo0bar' => MODPATH.'fo0bar']],\n\t\t];\n\t}", "public function findLoaders()\n {\n \n //Get the instance of Core.\n $core = forall('core');\n \n //Iterate packages and create the result array.\n $core->iteratePackages(function($name)use($core, &$result){\n \n //Get the name space.\n $ns = $core->convertPackageNameToNs($name);\n \n //Make the predicted Loader name.\n $className = \"$ns\\\\Loader\";\n \n //Append to the result if the class exists.\n if(class_exists($className) && is_subclass_of($className, 'forall\\\\loader\\\\AbstractLoader')){\n $result[] = new LoaderDescriptor($className, $name);\n }\n \n });\n \n //Return the result.\n return $result;\n \n }", "public function mayUpdateLibraries();", "public function getUnlockedClasses() {\r\n\t\treturn $this->ilRoomSharingDatabasePrivileges->getUnlockedClasses();\r\n\t}", "private function getRegisteredModules() {\n\t\t$modules = $this->_sol->data->tableSelect('module');\n\t\tforeach($modules as $module) {\n\t\t\t$this->_modules[$module->ModuleName] = null;\n\t\t}\n\t}", "protected function getLibraries(): array\n {\n return ['session'];\n }", "private function getMissingPlugins(): array{\n require_once(ABSPATH . 'wp-admin/includes/plugin.php');\n $plugins = get_plugins();\n $activePlugins = get_option('active_plugins');\n $inactive = [];\n foreach ($this->dependencies as $dependency) {\n $passed = false;\n foreach ($plugins as $plugin) {\n if ($plugin['Name'] === $dependency['name']) {\n $passed = true;\n if (version_compare($plugin['Version'], $dependency['version']) === -1) {\n array_push($inactive, [\n 'plugin' => $dependency,\n 'error' => self::ERROR_VERSION\n ]);\n } elseif (!in_array($dependency['dir'], $activePlugins)) {\n array_push($inactive, [\n 'plugin' => $dependency,\n 'error' => self::ERROR_INACTIVE\n ]);\n }\n }\n }\n if (!$passed) {\n array_push($inactive, [\n 'plugin' => $dependency,\n 'error' => self::ERROR_MISSING\n ]);\n }\n }\n return $inactive;\n }", "public function getPackages()\n {\n $map = array();\n foreach ($this->packages as $pkgName => $pkg) {\n $map[$pkgName] = $pkg;\n }\n return $map;\n }", "public function getPackages();", "public function getPackages();", "protected function loadMainLibraryFiles()\n {\n $this->classLib->load('core', 'Base', __FILE__, __LINE__);\n $this->classLib->load('core', 'DataFilter', __FILE__, __LINE__); \n $this->classLib->load('core', 'AppMessage', __FILE__, __LINE__);\n $this->classLib->load('core', 'CondorDB', __FILE__, __LINE__);\n $this->classLib->load('core', 'CondorDBObject', __FILE__, __LINE__);\n $this->classLib->load('core', 'VersionedDBObjects', __FILE__, __LINE__);\n $this->classLib->load('core', 'Module', __FILE__, __LINE__);\n $this->classLib->load('core', 'ListModule', __FILE__, __LINE__);\n $this->classLib->load('core', 'ListModuleItems', __FILE__, __LINE__);\n $this->classLib->load('core', 'Auth', __FILE__, __LINE__);\n $this->classLib->load('text', 'PolyText', __FILE__, __LINE__);\n $this->classLib->load('text', 'TextDbObject', __FILE__, __LINE__);\n $this->classLib->load('core', 'Page', __FILE__, __LINE__);\n $this->classLib->load('core', 'CondorLinkWriter', __FILE__, __LINE__);\n $this->classLib->load('users', 'User', __FILE__, __LINE__);\n $this->classLib->load('users', 'Session', __FILE__, __LINE__);\n $this->classLib->load('cache', 'Itibiti', __FILE__, __LINE__); //Cache class\n $this->classLib->load('cache', 'CondorMemcache', __FILE__, __LINE__); //Memcache wrapper class\n $this->classLib->load('core', 'ClassBuilder', __FILE__, __LINE__);\n $this->classLib->load('core', 'MobileDetect', __FILE__, __LINE__); //Simple class to detect mobile devices by user agent\n $this->classLib->load('core', 'ContentAppearanceTracking', __FILE__, __LINE__); // Content appearance tracking\n\n $this->classLib->load('mediaManager', 'AttachMediaFiles', __FILE__, __LINE__);\n $this->classLib->load('ihotelier', 'IhotelierData', __FILE__, __LINE__);\n $this->classLib->load('localUsers', 'LocalUser', __FILE__, __LINE__);\n $this->classLib->load('contentBlocks', 'ContentBlock', __FILE__, __LINE__);\n $this->classLib->load('pages', 'Pages', __FILE__, __LINE__);\n $this->classLib->load('sitePublisher', 'SitePublisher', __FILE__, __LINE__);\n $this->classLib->load('sitePublisher', 'PublishedPageRenderer', __FILE__, __LINE__);\n $this->classLib->load('contentApproval', 'ContentApproval', __FILE__, __LINE__); \n $this->interfaceLib->load('contentApproval', 'ApprovalInterface', __FILE__, __LINE__); \n $this->classLib->load('contentApproval', 'ModuleItem', __FILE__, __LINE__);\n $this->classLib->load('contentApproval', 'Model', __FILE__, __LINE__);\n \n $this->classLib->load('core', 'NewRelic', __FILE__, __LINE__);\n\n $this->functionLib->load('core', 'writeLinkTo', __FILE__, __LINE__);\n $this->functionLib->load('core', 'loadModuleFunction', __FILE__, __LINE__);\n $this->functionLib->load('core', 'currentDataSection', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getDataSectionDirectory', __FILE__, __LINE__);\n $this->functionLib->load('core', 'condorFileToHREF', __FILE__, __LINE__);\n $this->functionLib->load('core', 'condorHREFToFile', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getLocalCXML', __FILE__, __LINE__);\n $this->functionLib->load('core', 'stripSlashesDeep', __FILE__, __LINE__);\n $this->functionLib->load('core', 'replaceHashVars', __FILE__, __LINE__);\n $this->functionLib->load('core', 'createCurrentTaskMenu', __FILE__, __LINE__);\n $this->functionLib->load('ihotelier', 'ihotelierGetLanguageId', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getSnippet', __FILE__, __LINE__);\n $this->functionLib->load('core', 'closeHtmlTags', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getHtmlSnippet', __FILE__, __LINE__);\n $this->functionLib->load('core', 'slashomatic', __FILE__, __LINE__);\n $this->functionLib->load('google', 'websiteOptimizer', __FILE__, __LINE__);\n $this->functionLib->load('contentApproval', 'init', __FILE__, __LINE__);\n\n $this->exceptionLib->load('core', 'NoAuthorizationException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'InvalidParameterException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'MySQLException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'DBConnectionException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'FileNotFoundException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'FubarException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'ContentAppearanceSaveRejectedException', __FILE__, __LINE__);\n }", "static function getOfficialModules() {\n if (self::$official_modules === false) {\n self::$official_modules = AngieApplication::scanForModules(APPLICATION_PATH . '/modules', false);\n } // if\n\n return self::$official_modules;\n }", "function views_handler_dependencies() {\n static $map;\n if (!isset($map)) {\n $map = array();\n foreach (module_implements('views_data') as $module) {\n $tables = array_keys(module_invoke($module, 'views_data'));\n foreach ($tables as $table) {\n $map[$table] = $module;\n }\n }\n }\n return $map;\n}", "public function getBlacklistedMaps()\n {\n return $this->_compatibilityBlacklist;\n }", "protected function getLib()\n {\n $coreNamespace = $this->option('plugin') ? 'Plugins' : 'Core';\n\n $package = ucfirst(trim($this->input->getArgument('package')));\n $repo = ucfirst(trim($this->input->getArgument('repo')));\n return [\n \"use {$coreNamespace}\\\\{$package}\\Repositories\\\\Interfaces\\\\{$repo}Repositories;\",\n \"use {$coreNamespace}\\\\{$package}\\Repositories\\Eloquent\\Eloquent{$repo}Repositories;\",\n \"use {$coreNamespace}\\\\{$package}\\Repositories\\Caches\\Cache{$repo}Repositories;\",\n ];\n }", "public function getAvailableBundles() : array {}", "public function getLibraryConfig($libraries = NULL);", "public function getLibraries()\n {\n return $this->hasMany(Library::className(), ['id_user_library' => 'id']);\n }", "public function testMapUnmap() {\n\t\t$testApp = Libraries::get(true, 'resources') . '/tmp/tests/test_app';\n\t\tmkdir($testApp, 0777, true);\n\t\tLibraries::add('test_app', ['path' => $testApp]);\n\n\t\tmkdir($testApp . '/lib', 0777);\n\t\tmkdir($testApp . '/_patch', 0777);\n\n\t\t$lib = <<<EOD\n<?php\nnamespace test_app\\\\lib;\nclass LibTest {\n\tpublic function testMe() {\n\t\treturn 'core class';\n\t}\n}\n?>\nEOD;\n\t\tfile_put_contents($testApp . '/lib/LibTest.php', $lib);\n\n\t\t$patch = <<<EOD\n<?php\nnamespace test_app\\\\lib;\nclass LibTest {\n\tpublic function testMe() {\n\t\treturn 'patched class';\n\t}\n}\n?>\nEOD;\n\t\tfile_put_contents($testApp . '/_patch/PatchedLibTest.php', $patch);\n\n\t\t$expected = $result = Libraries::realPath($testApp . '/lib/LibTest.php');\n\t\t$result = Libraries::path('test_app\\lib\\LibTest');\n\n\t\t$this->assertEqual($expected, $result);\n\n\t\tLibraries::map([\n\t\t\t'test_app\\lib\\LibTest' => $testApp . '/_patch/PatchedLibTest.php'\n\t\t]);\n\n\t\t$expected = $result = Libraries::realPath($testApp . '/_patch/PatchedLibTest.php');\n\t\t$result = Libraries::path('test_app\\lib\\LibTest');\n\n\t\tLibraries::unmap(['test_app\\lib\\LibTest']);\n\n\t\t$expected = $result = Libraries::realPath($testApp . '/lib/LibTest.php');\n\t\t$result = Libraries::path('test_app\\lib\\LibTest');\n\n\t\t$this->assertEqual($expected, $result);\n\n\t\tLibraries::map([\n\t\t\t'test_app\\lib\\LibTest' => $testApp . '/_patch/PatchedLibTest.php'\n\t\t]);\n\t\tLibraries::unmap('test_app\\lib\\LibTest');\n\n\t\t$expected = $result = Libraries::realPath($testApp . '/lib/LibTest.php');\n\t\t$result = Libraries::path('test_app\\lib\\LibTest');\n\n\t\tLibraries::map([\n\t\t\t'test_app\\lib\\LibTest' => $testApp . '/_patch/PatchedLibTest.php'\n\t\t]);\n\n\t\t$object = new \\test_app\\lib\\LibTest();\n\n\t\t$result = $object->testMe();\n\t\t$this->assertEqual('patched class', $result);\n\t}", "public function getAutoloaderMap(): array\n {\n return $this->getNamespaceMaps()['autoload'];\n }", "public function ignorePackageDiscoveriesFrom()\n {\n return $this->config['dont-discover'] ?? [];\n }", "public static function all()\n {\n return static::$packages;\n }", "public function getLoadedModuleNames();", "public static function getPlibDir() { }", "private function getPHPCodingStandardPackages()\n {\n $codingStandardPackages = array_filter(\n $this->composer->getRepositoryManager()->getLocalRepository()->getPackages(),\n function (PackageInterface $package) {\n if ($package instanceof AliasPackage) {\n return false;\n }\n return $package->getType() === Plugin::PACKAGE_TYPE;\n }\n );\n\n if (! $this->composer->getPackage() instanceof RootpackageInterface\n && $this->composer->getPackage()->getType() === self::PACKAGE_TYPE\n ) {\n $codingStandardPackages[] = $this->composer->getPackage();\n }\n\n return $codingStandardPackages;\n }", "function getMagentoExcludedLibraryPaths(array $libraryPaths)\n{\n $excludedLibraryPaths = [\n '#^(?:' . join('|', $libraryPaths) . ')/([\\\\w]+/)?Test#',\n ];\n return $excludedLibraryPaths;\n}", "function views_plugin_dependencies() {\n static $map;\n if (!isset($map)) {\n $map = array();\n foreach (module_implements('views_plugins') as $module) {\n $plugins = module_invoke($module, 'views_plugins');\n foreach ($plugins as $type => $items) {\n if (is_array($items)) {\n foreach (array_keys($items) as $plugin_name) {\n $map[$type][$plugin_name] = $module;\n }\n }\n }\n }\n }\n return $map;\n}", "public function getAvailableModules();", "public function getAvailableModules();", "protected function getNamespaceMaps(): array\n {\n $cache = $this->fs->getCache();\n $cacheKey = 'namespaceMaps-' . $this->packageManager->getCacheIdentifier();\n \n if ($cache->has($cacheKey)) {\n return $cache->get($cacheKey);\n }\n \n $autoloadMap = [];\n $extKeyNamespaceMap = [];\n foreach ($this->packageManager->getActivePackages() as $package) {\n $autoload = $package->getValueFromComposerManifest('autoload');\n if (! is_object($autoload)) {\n continue;\n }\n if (! is_object($autoload->{'psr-4'})) {\n continue;\n }\n foreach ((array)$autoload->{'psr-4'} as $namespace => $directory) {\n $directory = trim($directory, '/.');\n if ($directory === 'Classes' || str_ends_with($directory, '/Classes')) {\n $extKeyNamespaceMap[$package->getPackageKey()][$namespace] = $directory;\n $potentialConfigDir = Path::join($package->getPackagePath(),\n dirname($directory), 'Configuration');\n if (is_dir($potentialConfigDir)) {\n $autoloadMap[$namespace . 'Configuration\\\\'] = $potentialConfigDir;\n }\n }\n }\n }\n \n $maps = ['autoload' => $autoloadMap, 'extKeyNamespace' => $extKeyNamespaceMap];\n $cache->set($cacheKey, $maps);\n \n return $maps;\n }", "public static function getMissingDependencies(): array {\n /** @var \\Drupal\\Core\\Extension\\ExtensionList $extension_list */\n $extension_list = \\Drupal::service('extension.list.module');\n $extension_list->reset();\n return array_filter(static::dependencies(), function ($dependency) use ($extension_list) {\n // If the module exists, ensure it is installed.\n // This allows users to fix missing dependencies on demand during installation.\n if ($extension_list->exists($dependency)) {\n static::ensureInstalled($dependency);\n return FALSE;\n }\n\n return TRUE;\n });\n }", "function saddr_getAvailableModules(&$saddr)\n{\n $modules=array();\n $filter='(objectclass=saddrModuleConfiguration)';\n\n $ldap=saddr_getLdap($saddr);\n if($ldap) {\n $nctx=saddr_getNamingContext($saddr);\n if(is_null($nctx))\n saddr_findNamingContext($saddr);\n $nctx=saddr_getNamingContext($saddr);\n\n if(!is_null($nctx)) {\n $s_res = $ldap->search($nctx, $filter, ['saddrmodulename', 'saddrconfigname'], 'sub');\n foreach ($s_res as $result) {\n for($e = $result->firstEntry(); $e; $e = $result->nextEntry()) {\n $confname = $e->get('saddrconfigname');\n $name = $e->get('saddrmodulename');\n \n $module = [\n 'module' => $confname ? $confname[0] : null, \n 'name' => $name ? $name[0] : null, \n 'dn' => $e->dn()\n ];\n \n if(is_null($module['name'])) { $module['name']=$module['module']; }\n $modules[]=$module;\n }\n }\n }\n }\n return $modules;\n}", "public function getLookups()\n {\n }", "protected function getDefaultMap() {\r\n\t\treturn array (\r\n\t\t\t'ep_Api' => 'ep_Api.php',\r\n\t\t\t'ep_Autoloader' => 'ep_Autoloader.php',\r\n\t\t\t'ep_Dataset' => 'ep_Dataset.php',\r\n\t\t\t'ep_Object' => 'ep_Object.php',\r\n\t\t\t'ep_Search' => 'ep_Search.php',\r\n\t\t);\r\n\t}", "public function provideTestGetRegisteredAutoloaderFailure()\n {\n return array(array(sys_get_temp_dir()));\n }", "public static function getRequiredNamespaces() {\n\t\treturn array (\n\t\t\t\t'earl' => 'http://www.w3.org/ns/earl#',\n\t\t\t\t'dct' => 'http://purl.org/dc/terms/' \n\t\t);\n\t}", "public function getLibraryConfig($libraries = null)\n {\n }", "function module_folders()\n\t{\n\t\treturn array_keys(modules::$locations);\n\t}", "protected function initLibraries()\n {\n $path = CONDOR_MODULES_DIR;\n\n $this->classLib = new Loader($path, array('prefix' => 'class.'));\n $this->functionLib = new Loader($path, array('prefix' => 'function.'));\n $this->filterLib = new Loader($path, array('prefix' => 'filter.'));;\n $this->exceptionLib = new Loader($path, array('prefix' => 'exception.'));\n $this->interfaceLib = new Loader($path, array('prefix' => 'interface.'));;\n $this->itemFormElementLib = new Loader($path, array('prefix' => 'itemFormElement.'));\n }", "public function getInternalDeps();", "public function findBundles() {}", "protected function bootstrappers()\n {\n return $this->bootstrappers;\n }", "protected function bootstrappers()\n {\n return $this->bootstrappers;\n }", "function module_list($exclude_core=false)\n\t{\n\t\tif (!function_exists('directory_map'))\n\t\t{\n\t\t\t$ci =& get_instance();\n\t\t\t$ci->load->helper('directory');\n\t\t}\n\n\t\t$map = array();\n\n\t\tforeach (module_folders() as $folder)\n\t\t{\n\t\t\t// If we're excluding core modules and this module\n\t\t\t// is in the 'core_modules' folder... ignore it.\n\t\t\tif ($exclude_core && strpos($folder, 'core_modules') !== false)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$map = array_merge($map, directory_map($folder, 1));\n\t\t}\n\n\t\t// Clean out any html or php files\n\t\tif ($count = count($map))\n\t\t{\n\t\t\tfor ($i=0; $i < $count; $i++)\n\t\t\t{\n\t\t\t\tif (strpos($map[$i], '.html') !== false || strpos($map[$i], '.php') !== false)\n\t\t\t\t{\n\t\t\t\t\tunset($map[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $map;\n\t}", "protected function _getDefaultPaths() {\n $key = self::REGISTRY_KEY;\n if(!Zend_Registry::isRegistered($key)) {\n return array();\n }\n \n return Zend_Registry::get($key);\n }", "function searchableNamespaces() {\n\t\tglobal $wgContLang;\n\t\t$arr = array();\n\t\tforeach( $wgContLang->getNamespaces() as $ns => $name ) {\n\t\t\tif( $ns >= NS_MAIN ) {\n\t\t\t\t$arr[$ns] = $name;\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}", "protected function getRegisteredClasses() {}", "public static function get_theme_missing_directories(){\n $missing = array();\n\n // Scan required directories.\n $required_directories = array(\n self::theme_helpers_path(),\n self::theme_initializers_path(),\n self::theme_locales_path(),\n self::theme_views_path(),\n self::theme_assets_path(),\n self::theme_static_assets_path(),\n self::theme_stylesheets_path(),\n self::theme_javascripts_path(),\n self::theme_temp_path()\n );\n\n foreach ($required_directories as $dir) {\n if (!file_exists($dir) || !is_dir($dir)) {\n $missing[] = $dir;\n }\n }\n\n return $missing;\n }", "protected function getModules()\n {\n $modules = \\Module::findFrom(array(CORE_MODULES, SHARED.'modules'.DS));\n\n $modules = array_filter($modules, function ($m) {\n return (false == $m['shared_data']);\n });\n\n $results = array();\n\n foreach ($modules as $name => $data) {\n if ($data['allow_shared_by_user']) {\n $results[$name] = $data['name'];\n }\n }\n\n return $results;\n }", "private function _loadDefaultFileSystem()\n {\n $libs = array(\n 'install', // setup db table scripts\n 'points', // points\n 'general', // general functions, util\n 'metabox', // metabox widgets\n 'actions', // actions hook\n 'json', // json data & ajax function\n 'transaction', // deposit & logger\n 'wallet', // wallet transaction functions\n 'list', // recent transaction table list\n 'bank-list' // bank table list\n );\n\n foreach($libs as $slug){\n require $this->libs_path . sprintf('%s.php',$slug);\n }\n }", "public static function getLocalList()\n {\n return static::getList('pkgID = 0');\n }", "private function _setupClassLoader() {\n\t\tif(is_object(self::$_config->additional_libraries)) {\n\t\t\t$maps = self::$_config->additional_libraries->toArray();\n\t\t\tClassLoader::getInstance()->registerMap($maps);\n\t\t}\n\t}", "public function getUrls() : array\n\t{\n\t\t$urls = [];\n\t\tdie(\"get libraries urls\");\n\t\treturn $urls;\n\t}", "public static function unset_libraries() {\n if (isset($_SESSION['culr_libraries'])) {\n unset($_SESSION['culr_libraries']);\n }\n }", "public function notFoundProvider()\n {\n return [\n ['/foo', '/bar'],\n ['/foo', '/bar/foo'],\n ['/foo/bar', '/zet/foo/bar'],\n ['/foo/bar', '/foo/bar-/teta'],\n ['/foo/bar', '/foo/bar-zet/teta'],\n ['/foo/bar', '/foo/ba'],\n ['/foo/bar', '/foo'],\n ['/f', '/foo'],\n ];\n }", "function loadLibs($libPath)\n{\n $files = scandir($libPath);\n $files = array_diff($files, array('.', '..'));\n foreach ($files as $file) {\n include $libPath . $file;\n }\n}", "private static function _dependencyGetOptionalSystems($text)\n {\n $optionalPattern = '/Channels::systemExists\\(\\'([^\\']+)\\'\\)/';\n $matches = array();\n $result = array();\n $optionalSystems = array();\n preg_match_all($optionalPattern, $text, $matches);\n\n if (empty($matches[0]) === FALSE) {\n $result = array_unique($matches[1]);\n }\n\n return $result;\n\n }", "public function getAvailablePackages() {}", "static function getAvailableModules() {\n if(self::$available_modules === false) {\n $module_names = DB::executeFirstColumn('SELECT name FROM ' . TABLE_PREFIX . 'modules');\n\n // look for modules in activecollab modules directory\n $system_modules_path = APPLICATION_PATH . '/modules';\n $system_modules = AngieApplication::scanForModules($system_modules_path, $module_names);\n\n // we need to populate $module_names to prevent users to name modules with names of system modules\n foreach ($system_modules as $system_module) {\n \t$module_names[] = $system_module->getName();\n } // foreach\n\n $custom_modules_path = CUSTOM_PATH . '/modules';\n $custom_modules = AngieApplication::scanForModules($custom_modules_path, $module_names);\n\n self::$available_modules = array_merge((array) $system_modules, (array) $custom_modules);\n } // if\n\n \t\treturn self::$available_modules;\n }", "protected function getPackageAliases($app)\n\t{\n\t return [];\n\t}", "function get_mu_apps() {\n\t$mu_app = array();\n\tif ( !is_dir( application_path ) )\n\t\treturn $mu_app;\n\tif ( ! $dh = opendir( application_path ) )\n\t\treturn $mu_app;\n\twhile ( ( $app = readdir( $dh ) ) !== false ) {\t\t\n\t\tif ( !is_dir( $app ) && substr( $app, -4 ) != '.php' )\n\t\t\t$mu_app[] = application_path . '/' . $app .'/'. $app .'.php';\n\t}\n\tclosedir( $dh );\n\tsort( $mu_app );\n\t\n\treturn $mu_app;\n}", "#[Deprecated(since: '7.1')]\nfunction mcrypt_list_algorithms($lib_dir = null) {}", "public function findMissingDependencies()\n {\n $missing = [];\n\n foreach ($this->plugins as $id => $plugin) {\n $required = $this->getDependencies($plugin);\n if (!$required) {\n continue;\n }\n\n foreach ($required as $require) {\n if ($this->hasPlugin($require)) {\n continue;\n }\n\n if (!in_array($require, $missing)) {\n $missing[] = $require;\n }\n }\n }\n\n return $missing;\n }", "function mymodule_libraries_info() {\n\n return array(\n 'example-lib' => array(\n 'name' => 'Example library',\n 'vendor url' => 'http://www.example.com',\n 'download url' => 'http://github.com/example/my-php-api',\n 'version' => '1.0',\n 'xautoload' => function($api) {\n /**\n * @var xautoload_InjectedAPI_hookXautoload $api\n */\n // Register a namespace with PSR-0 root in <library dir>/lib/.\n // The second argument is relative to the directory of the library, so\n // PSR-0 root will be e.g. \"sites/all/libraries/example-lib/lib\".\n $api->namespaceRoot('ExampleVendor\\ExampleLib', 'lib');\n },\n ),\n );\n}" ]
[ "0.65175843", "0.63858145", "0.6249405", "0.6221675", "0.62167376", "0.6201149", "0.61681527", "0.6010259", "0.5979717", "0.59211016", "0.5838687", "0.5819433", "0.57798576", "0.577159", "0.5743936", "0.5720761", "0.56990457", "0.568223", "0.55556494", "0.55293673", "0.5521842", "0.545011", "0.54142594", "0.53885055", "0.5372981", "0.5371521", "0.5330404", "0.5316499", "0.53130406", "0.53003246", "0.5292806", "0.5289942", "0.5287353", "0.5282715", "0.5257935", "0.5244928", "0.5232687", "0.52196217", "0.52097255", "0.51908135", "0.5180116", "0.5173357", "0.5159145", "0.515605", "0.515504", "0.515504", "0.51543945", "0.5150517", "0.5148526", "0.5144093", "0.5135726", "0.51326305", "0.5130662", "0.5129584", "0.5122781", "0.511928", "0.5114811", "0.50909346", "0.50891525", "0.5075062", "0.5072626", "0.5069969", "0.50685024", "0.50590014", "0.50590014", "0.5053392", "0.504817", "0.50418043", "0.5034406", "0.502774", "0.5025624", "0.501875", "0.5018437", "0.50074077", "0.5003222", "0.5000188", "0.49910054", "0.4984033", "0.4984033", "0.4983235", "0.49777472", "0.4972831", "0.49704993", "0.4966824", "0.496402", "0.49541077", "0.49519283", "0.49487403", "0.494061", "0.4935163", "0.49343368", "0.49322307", "0.49316737", "0.49310234", "0.49300182", "0.49172357", "0.4915825", "0.49112973", "0.49001753", "0.48901364" ]
0.7849398
0
Returns post by Id
Возвращает пост по Id
public function getPostById($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostByID($id);", "abstract public function getPost($id);", "public function findPost($id);", "public function getPost($id) {\n return Post::find($id);\n }", "public function findPostById($id)\n {\n return Post::find($id);\n }", "public function getPostById($id) {\n $query = \"SELECT * FROM \" . self::$TABLE . \" WHERE id = $id LIMIT 1\";\n $resultSet = parent::executeQuery($query);\n \n $array = $this->getRecordAsArray($resultSet);\n return $this->arrayToObject($array);\n }", "public function byId(string $id): ?Post;", "static function get($id)\r\n {\r\n $data = DB::object('postById', $id);\r\n if ($data) $data['id'] = $id;\r\n return $data ? new Post($data) : null;\r\n }", "public function getSinglePost($id) {\n\n $data = Post::where('id',$id)->get();\n\n return $data;\n }", "public function findById($postId);", "public function show($id)\n {\n return $this->post->find($id);\n }", "public function get_post($id)\n\t{\n\t\t$id = $id;\n\t\t$post = ORM::for_table('posts')->where('post_id', $id)->find_one();\n\t\treturn $post;\n\t}", "public function get($id)\n {\n return $this->entityManager->getRepository(PostEntity::class)->find($id);\n }", "public function test_get_post_by_id()\n\t{\n\t\t$expected = Post::create( array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status( 'published' ),\n\t\t\t'content_type' => Post::type( 'entry' ),\n\t\t\t'pubdate' => HabariDateTime::date_create( time() ),\n\t\t));\n\n\t\t$result = Posts::get( array( 'id' => $expected->id ) );\n\n\t\t$this->assert_true( $result instanceof Posts, 'Result should be of type Posts' );\n\t\t$this->assert_true( $result->onepost, 'A single post should be returned if a single id is passed in' );\n\n\t\t$result = $result[0];\n\t\t$this->assert_true( $result instanceof Post, 'Items should be of type Post' );\n\t\t$this->assert_equal( $result->id, $expected->id, 'id of returned Post should be the one we asked for' );\n\t}", "public function requestPost($id)\n {\n \t$where = ['post_id' => $id];\n\t\tif ($this->mapper->entryExists($where)) {\n\t\t\treturn $this->mapper->fetchWhere($where);\n\t\t}\n }", "public function getPostById( $id ){\n $sql = \"SELECT * FROM posts WHERE id = :id \";\n $this->db->query( $sql );\n $this->db->bind(\":id\" , $id );\n\n $row = $this->db->single();\n return $row;\n }", "public function getPost($id){\n $post = $this->JACKED->MySQL->getRow(\n $this->config->dbt_posts,\n 'id = ' . $id\n );\n $post['comments'] = $this->getComments($id);\n return $post;\n }", "public function get($post_id){\n return Post::findOrfail($post_id);\n }", "public function show(int $id)\n {\n echo \"<pre>\";\n print_r($id);\n echo \"</pre>\";\n die;\n return Post::find($id);\n }", "public function show($id)\n {\n $post=$this->postService->getPostInfo($id);\n return $post; \n }", "public function show($id)\n {\n return Post::find($id);\n }", "public function show($id)\n {\n return Post::find($id);\n }", "public function getPost($idPost) {\r\n $sql = 'SELECT BIL_ID as id, BIL_DATE as date, BIL_TITLE as title, BIL_CONTENT as content '\r\n . 'FROM T_POST '\r\n . 'WHERE BIL_ID = ?';\r\n $post = $this->executeRequest($sql, array($idPost));\r\n if ($post->rowCount() == 1){\r\n $data = $post->fetch(); // Access to the first result line\r\n return new Post($data);\r\n }else{\r\n throw new Exception(\"No post corresponds to the ID '$idPost'\");\r\n }\r\n }", "function getPost($id)\n {\n $query = 'SELECT a.*\n FROM #__simplestforum_post AS a\n WHERE a.id = '.(int)$id\n ;\n $this->_db->setQuery($query);\n\n return $this->_db->loadObject();\n }", "function get_post_by_id($id) {\n $result = parent::query(\"SELECT * FROM posts WHERE id = \" . $id . \" LIMIT 1\");\n \n // Vis fejl hvis blog indlæg ikke kunne hentes\n if (!$result) {\n die('Blog indlæg kunne ikke hentes: ' . mysql_error());\n }\n \n // Hent resultat\n $row = mysql_fetch_row($result);\n \n // Tjek om resultatet blev fundet\n if (cout($row) == 0)\n return null;\n \n // Byg Post object hvis resultat fandtes\n return $this->build_post($row);\n }", "public function getPost($postId){\n $this->colName = 'post_id';\n $post = $this->selectOne($this->table, $this->colName, $postId);\n return $post;\n }", "public function show($id)\n\t{\n\t\treturn Post::find($id);\n\t}", "public function findById($Id) {\n $query = \"select * from posting where postid = \" .$Id;\n return $this->execute($query);\n }", "public function find($id)\n {\n return Post::with(array('tags', 'user'))->findOrFail($id);\n }", "function findById($id): PostEntity;", "public static function find($id) {\n $db = Db::getInstance();\n //use intval to make sure $id is an integer\n $id = intval($id);\n $req = $db->prepare('SELECT * FROM post WHERE id = :id');\n //the query was prepared, now replace :id with the actual $id value\n $req->execute(array('id' => $id));\n $post = $req->fetch();\nif($post){\n return new Post($post['id'], $post['title'], $post['content']);\n }\n else\n {\n //replace with a more meaningful exception\n throw new Exception('The requested post could not be found.');\n }\n }", "public function getSpecificPost($id)\n {\n $pdo = Db::getInstance();\n $stmt = $pdo->prepare(\"SELECT * FROM items WHERE(user_id = :id)\");\n $stmt->bindValue(\":id\", $id);\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public static function find($id)\n {\n $post = new self;\n\n return $post->postRepository->find($id);\n }", "public function getPostView($id);", "public function getPostById($id) {\r\n $sql = \"SELECT * FROM blogs WHERE id=$id\";\r\n $result = mysql_query($sql);\r\n $row = mysql_fetch_array($result);\r\n \r\n //create a post object to return\r\n $p = new Post;\r\n $p->id = stripslashes($row['id']);\r\n $p->title = stripslashes($row['title']);\r\n $p->userid = stripslashes($row['userid']);\r\n $p->date = stripslashes($row['date']);\r\n $p->content = stripslashes($row['content']);\r\n\r\n return $p; \r\n }", "public function get($id)\n {\n $sql = $this->_getBaseSelectSql() . ' WHERE post.id = ?';\n return $this->_db->fetchAssoc($sql, array($id));\n }", "public function post()\n {\n echo \"<pre>\";\n print_r(654);\n echo \"</pre>\";\n die;\n return Post::find($id);\n }", "public static function getSinglePost($postId)\n {\n $response = self::dbConnect()->query('SELECT id , title , created_at , content FROM posts WHERE id='.$postId.' ');\n $requestedPost = $response->fetch();\n return $requestedPost ;\n }", "public function findOnePostById($id)\n {\n $query = \"\"\n . \"SELECT * \"\n . \"FROM product \"\n . \"WHERE id = '%s'\";\n $query = sprintf($query, $this->db->real_escape_string($id));\n if ($result = $this->db->query($query)) {\n $row = $result->fetch_assoc();\n $post = [\n 'id' => $row['id'],\n 'name' => $row['name'],\n 'description' => $row['description'],\n 'image' => $row['image'],\n 'price' => $row['price'],\n 'note' => $row['note'],\n 'sale_price' => $row['sale_price']\n ];\n $result->close();\n } else {\n die($this->db->error);\n }\n return $post;\n }", "public function getViewedPost($id=null){\r\n if(!$id) return false;\r\n $post = $this->find('first', array(\r\n 'conditions'=>array('Post.id'=>$id),\r\n 'contain' =>array(\r\n 'CreatedUser',\r\n 'PostTerm',\r\n 'Attachment',\r\n 'Comment'=>array(\r\n 'order' => 'Comment.created ASC',\r\n 'User' => array('fields' => array('id', 'username', 'nickname'))\r\n )\r\n )\r\n ));\r\n return $post;\r\n }", "public function getSinglePost($postId)\n {\n //\n return $this->post->getPost($postId);\n }", "public function find($id)\n {\n return Post::with('signup', 'tags')->findOrFail($id);\n }", "public function getpost($id){\n $db = new DB();\n $sql='SELECT * FROM posts WHERE id= :id';\n $stmt = $db->connect()->prepare($sql); \n $stmt->execute(['id'=>$id]); \n $results = $stmt->fetch(PDO::FETCH_OBJ);\n \n return $results;\n }", "public static function show($id){\n if(!empty($id)){\n $data = ['post_id' => $id]; \n return Post::where('id', $id)->with(['postimage', 'comment'])->first();\n }\n }", "public function findPostById($id) {\r\n $sql = \"SELECT * FROM news WHERE id = '$id'\";\r\n $stmt = $this->db->connect()->query($sql);\r\n $row = $stmt->fetch();\r\n \r\n return $row;\r\n }", "public function getPost($id) {\n $sql = \"SELECT * FROM posts JOIN users ON posts.u_id = users.u_id JOIN categories ON posts.p_category = categories.c_id WHERE p_id = ?\";\n $sqlData = array($id);\n\n global $queriesModel;\n $statement = $queriesModel->pdoStatement($sql, $sqlData);\n\n if ($statement->rowCount() == 1) {\n $postData = $statement->fetch();\n return $postData;\n } else {\n $this->getPostError = true;\n return null;\n }\n }", "public static function getPostById($id){\r\n $result = self::getConnection()->executeSQLQuery(\"SELECT * FROM Posts WHERE PostID=?\", array($id));\r\n \r\n if ($result->num_rows == 1) {\r\n $databaseRow = $result->fetch_array();\r\n return self::convertRowToObject($databaseRow);\r\n } else {\r\n // Dit is een onmogelijke situatie vermits de postID primary key is, \r\n // dus er is vermoedelijk iets foutgegaan\r\n return false;\r\n }\r\n }", "public function getPost($postId)\r\n {\r\n $db = $this->dbConnect();\r\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') \r\nAS creation_date_fr, pseudo, chapo, post_mail FROM posts WHERE id = ?');\r\n $req->execute(array($postId));\r\n $post = $req->fetch();\r\n\r\n return $post;\r\n }", "public function fetchById($id)\n {\n $sth = $this->dbh->prepare(\"SELECT * FROM `{$this->tableName}` WHERE `id` = $id\");\n $sth->execute();\n\n return $sth->fetchObject(\"models\\\\Post\");\n }", "public function findById($id)\n {\n return $this->posts->findOrThrowException($id);\n }", "public function show($id)\n {\n //return new PostResource($post);\n $po = Post::find($id);\n\n return $po;\n }", "public function get($id)\n {\n try {\n $post = $this->post\n ->where('id', $id)\n ->with(['user'])\n ->firstOrFail();\n return $post;\n } catch (ModelNotFoundException $e) {\n return false;\n }\n }", "public function postData($id) {\r\n\t\t$params = [\r\n\t\t\t'id' => $id,\r\n\t\t];\r\n\t\treturn $this->db->row('SELECT * FROM posts WHERE id = :id', $params);\r\n\t}", "public function show($id)\n {\n return new Post(Ticket::findOrFail($id));\n }", "public function getSinglePost()\n {\n $stmt = $this->pdo->prepare(\"SELECT posts_id, posts.title, posts.description, posts.created_by, posts.created_on, posts.image, posts.alt, posts.content, \n users.username FROM posts\n INNER JOIN users\n ON posts.created_by = users.id\n where posts_id = :posts_id\");\n \n $stmt->execute([\n \":posts_id\" => $_GET[\"posts_id\"],\n ]);\n \n $singlePost = $stmt->fetch();\n return $singlePost; \n }", "public function show($id)\n\t{\n\t\t$sql = \"SELECT * FROM posts WHERE id = ?\";\n\t\t$posts = DB::select($sql, array($id));\n\t\n\t\t// If we get more than one item or no items display an error\n\t\tif (count($posts) != 1) \n\t\t{\n\t die(\"Invalid query or result: $query\\n\");\n\t }\n\t\n\t\t// Extract the first item (which should be the only item)\n\t $post = $posts[0];\n\t\treturn $post;\n\t}", "static function get($id) {\r\n\t\ttry {\r\n\t\t\t$stmt = getDB ()->prepare ( \"SELECT * FROM posts WHERE id= ?\" );\r\n\t\t\t$stmt->bindParam ( 1, $id );\r\n\t\t\t$stmt->execute ();\r\n\t\t\t\r\n\t\t\t$post = $stmt->fetchObject ( \"Post\" );\r\n\t\t\tif ($post) {\r\n\t\t\t\treturn $post;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch ( Exception $ex ) {\r\n\t\t\tsetSession ( \"error\", $ex->getMessage () );\r\n\t\t}\r\n\t\treturn null; // Return null in case of exception. Good night website\r\n\t}", "public function fetchOne($idPost)\n {\n $sql = 'SELECT * FROM tblPost WHERE idPost = ?';\n $resultset = $this->adapter->query($sql, array($idPost));\n $data = $resultset->toArray();\n if (!$data) {\n return false;\n }\n \n $entity = new PostEntity();\n $entity->exchangeArray($data[0]);\n return $entity;\n }", "public function singlePost($postId){\n\t\t$sql=\"SELECT * FROM $this->table WHERE id='$postId' LIMIT 1\";\n\n\t\tif($result=$this->con->query($sql)){\n\t\t\treturn $result->fetch_object();\n\t\t}\n\t}", "public function show($id)\n {\n $showPost = Post::find($id);\n return $showPost;\n }", "public function readPost()\n {\n $stmt = $this->pdo->prepare(\"SELECT posts_id, posts.title, posts.description, posts.created_by, posts.created_on, posts.image, posts.alt, posts.content\n FROM posts\n where posts_id = :posts_id\");\n\n $stmt->execute([\n \":posts_id\" => $_GET[\"id\"],\n ]);\n $singlePost = $stmt->fetch();\n return $singlePost; \n }", "public function get($id)\n {\n try {\n $post = $this->post\n ->where('id', $id)\n ->with(['user', 'comments'])\n ->firstOrFail();\n return $post;\n } catch (ModelNotFoundException $e) {\n return false;\n }\n }", "public function getPost ($id){\n\t\t\tglobal $con;\n\t\t\t$sql = \"SELECT * FROM posts WHERE id=?\";\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindParam(1,$id);\n\t\t\t$stmt->execute();\n\n\t\t\tif($stmt->rowCount() > 0){\n\t\t\t\treturn $stmt->fetch();\n\t\t\t}else {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\n\t\t}", "public function show($id)\n {\n return new PostResource(Post::FindOrFail($id));\n }", "public function getPost($postId) // récupération d'un billet grace à son id\n {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM billets WHERE id = ?');\n $req->execute(array($postId));\n $post = $req->fetch();\n\n return $post;\n }", "public function getPost($postId)\n {\n $bdd = $this->dbConnect();\n $article = $bdd->prepare('SELECT id, titre, contenu, url, DATE_FORMAT(date_creation, \\'%d/%m/%Y à %Hh%imin\\') AS date_creation_fr, numberlike FROM billets WHERE id = ?');\n $article->execute(array($postId));\n\n return $article;\n }", "public function getPost($postId)\n {\n $bdd = $this->dbConnect();\n $article = $bdd->prepare('SELECT id, titre, contenu, url, DATE_FORMAT(date_creation, \\'%d/%m/%Y à %Hh%imin\\') AS date_creation_fr, numberlike FROM billets WHERE id = ?');\n $article->execute(array($postId));\n\n return $article;\n }", "public function getById($id) {\n\t\t//Normally we wouldn't be using LIMIT here, as the ID is unique anyways. But it's better to have several check ups to have exactly what we need.\n $query = $this->db_connection->prepare('\n SELECT posts.*, users.username FROM posts \n LEFT JOIN users ON posts.author = users.id WHERE posts.id = :postId LIMIT 1');\n\n $query->bindParam(':postId', $id, \\PDO::PARAM_INT);\n $query->execute();\n return $query->fetch(\\PDO::FETCH_OBJ);\n }", "public static function getPost($id)\n {\n $array = [\n 1 => 'Geral',\n 2 => 'Full Stack',\n 3 => 'Back-end',\n 4 => 'Front-end',\n ];\n\n return $array[$id];\n }", "public function GetByID($pid) {\n\t\t\t$query = \"SELECT * FROM \".Configuration::sitePrefix.\"posts WHERE id=$pid\";\n\t\t\t$this->FinishGet($query);\n\t\t}", "private function getPostDataById($id) {\n\t\t$post = \\Groupper\\Model\\Post::byId($id);\n\n\t\tif (is_null($post)) {\n\t\t\treturn sprintf('Can`t find post with id: ', $id);\n\t\t}\n\t\treturn $post;\n\t}", "function getPostWithId($postId) {\n\t\t$user_handler = new userHandler();\n\t\t$conn = $user_handler->getConnection();\n\t\tif ($conn != null) {\n\t\t\t$query = mysqli_query($conn, \"SELECT * FROM Posts WHERE post_id = '$postId'\");\n\t\t\tif ($query) {\n\t\t\t\t$row = mysqli_fetch_array($query);\n\t\t\t\tif (count($row) > 0) {\t\t\t\t\n\t\t\t\t\treturn $row;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn [];\t\t\t\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t\telse {\n\t\t\t\treturn [];\t\t\n\t\t}\n\t}", "public function post_by_id($id)\r\n\t{\r\n\t\t$result = $this->db->select('*')\r\n ->from('blog_tbl')\r\n ->where('id',$id)\r\n ->get()\r\n ->row();\r\n // print_r($result); exit;\r\n\t\techo json_encode($result);\r\n\t}", "public function getPostById ($postId) {\n \t$post = Post::find($postId);//->tags;\n\n if (!$post) {\n return response()->json(array('error'=>1002, 'data'=>'', 'message'=>'Cannot find post'));\n }\n \t$post->category = Post::find($postId)->category;\n \t$post->tags = Post::find($postId)->tags;\n \t// $post->attachments = Attachment::where('post_id', $postId)->select(array('src'))->get();\n if ($post->type != 'text') {\n $attachments = Attachment::where('post_id', $postId)->get();\n $post->attachments = $attachments;\n }\n /*category*/\n $category = Category::find($post->category_id);\n $post->category_name = $category['name'];\n\n /*is_liked*/\n if (auth()->check()) {\n $userId = auth()->user()->id;\n $post->is_liked = PostLike::where('post_id', $postId)->where('user_id', $userId)->first();\n }\n \treturn response()->json(array('error'=>0, 'data'=>$post, 'message'=>''));\n }", "public function getPost($postId)\n {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts WHERE id = ?');\n $req->execute(array($postId));\n $post = $req->fetch();\n\n return $post;\n }", "public function getPost($postId)\n {\n $req = $this->getDataBase()->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y <em>à</em> %Hh%imin\\') AS creation_date FROM posts WHERE id = ? ');\n $req->execute(array($postId));\n\n return $this->hydrate($req->fetch(PDO::FETCH_ASSOC));\n }", "function getPost($id)\n{\n $dbb = connexionDataBase();\n $req = 'SELECT id_Posts, titre, chapo, contenu,image_post, FROM posts WHERE id_Posts = ?';\n $requete = $dbb->prepare($req);\n $requete->execute(array($id));\n $article = $requete->fetch();\n return $article;\n}", "public function show($id)\n {\n $post = Post::find($id);\n $post->category_id = $post->cate->name;\n $post->user_id = $post->user->name;\n return $post;\n }", "public function post_info($postId){\n$post = post::where('id' ,$postId)->first();\nreturn $post;\n}", "public function get($id)\n {\n if (!$id) {\n throw new InvalidArgumentException('Cannot retrieve a post without an id');\n }\n \n $em = $this->getEntityManager();\n $repo = $em->getRepository('Post\\Model\\Post');\n \n $qb = $repo->createQueryBuilder('p');\n\n $repo->restrictToId($qb, $id);\n\n try {\n $post = $qb->getQuery()->getSingleResult();\n } catch (NoResultException $e) {\n $post = null;\n }\n\n return $post;\n }", "public function get_post($id) {\n $prefix = $this->get_table_prefix();\n $sql = \"SELECT p.*, concat(ft.path, f.name, '.', ff.ext) as image, fc.name as category_name, fc.prefix as category_alias\n FROM {$prefix}posts as p\n LEFT JOIN {$prefix}storage_files AS f USING(file_id)\n LEFT JOIN {$prefix}file_formats AS ff USING(file_format_id)\n LEFT JOIN {$prefix}file_types AS ft USING(file_type_id)\n LEFT JOIN {$prefix}file_categories as fc USING(file_category_id)\n WHERE post_id = \" . (int) $id . \";\";\n return $this->db->query($sql)->row_array();\n }", "public function getPost()\n {\n return $this->hasOne(Post::class, ['id' => 'post_id'])->one();\n }", "public function show($id){\n $Post = Post::find($id);\n //checked by function show about find id post or not found\n return $Post ? $this->ResponseTrait(new PostResource($Post)) : $this->not_found();\n }", "public function getPost($postId){\n\n $db = $this->connectDb();\n\n $req = $db->prepare('SELECT id, titre, contenu, DATE_FORMAT(date_creation, \\'%d/%m/%Y à %Hh%imin%ss\\') AS date_creation_fr \n FROM billets \n WHERE id = ?');\n\n $req->execute(array( $postId ));\n $post = $req->fetch();\n\n return $post;\n }", "public function show($id)\n {\n $post = Posts::find($id);\n dd($post);\n }", "public function getPostForView($id)\n {\n if (!$this->exists($this->_table, $id)) {\n return false;\n }\n\n return $this->db->select('title, details')->from($this->_table)->where('id = ?', $id)->fetch();\n }", "public function getPost()\n {\n return $this->hasOne(Post::class, ['id' => 'post_id']);\n }", "public function show($id)\n { \n $post = Post::find($id);\n\n if(!$post) {\n return response()->json([\n 'status' => false,\n 'message' => \"Post not found\"\n ]);\n }\n\n return $post;\n }", "public function get($id){ \n $sql = \"SELECT `descricao`, `imagem`, `autorId`, `dataCriacao`, `ext`, `denuncias`, `likes` \n FROM `posts` \n WHERE `id` = '$id'\";\n $result = parent::executaQuery($sql);\n $row = mysqli_fetch_object ( $result );\n return $row;\n }", "public function findPostById($id) {\n try\n {\n $doc =\n $this->_em->getRepository('WF\\Lib\\Post\\WFormPost')\n ->findOneBy(array('id' => $id));\n $this->_em->refresh($doc);\n return $doc;\n }\n catch(Exception $err)\n {\n return null;\n }\n }", "function get($id = -1)\n {\n if($id != -1)\n $this->db->where(\"id\", mysql_real_escape_string($id));\n\n $query = $this->db->get(\"posts\");\n $result = $query->result();\n if(!$result)\n return false;\n else\n if($id != -1)\n return $result[0];\n else\n return $result;\n }", "public function getPostByUserId($id){\n global $db;\n $reqPostUser = $db->fetch(\"\n SELECT post.*,users.pseudo FROM post,users\n WHERE post.user_id = users.id\n AND post.id = ?\",[$id],true);\n return $reqPostUser;\n }", "function get($id=null) {\n\t\tif(!$id) {\n\t\t\tglobal $post;\n\t\t\t$id = $post->ID;\n\t\t}\n\t\treturn get_post_custom($id);\n\t}", "public function getPostById( $post_id ){\n\t\tforeach ( $this->posts as $post ){\n\t\t\tif ( $post->getId() === $post_id ){\n\t\t\t\treturn $post;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function getOnePost(int $postId) :array {\n // $id = (int) $id;\n $sql = \"SELECT post.id, post.user_id, post.title, post.post, post.creation_date, user.pseudo FROM posts post, users user WHERE post.id = :id AND user.id = post.user_id\" ;\n $arrayParams = [\n \"id\" => $postId\n ];\n return $this->queryAllFetchClass($sql, SELF::ENTITY_CLASSNAME, $arrayParams);\n }", "public function show($id)\n {\n return BlogPostEntity::findOrFail($id);\n }", "public static function getPostByPostId($postid)\r\n {\r\n return QueryBuilder::table('cms_forum_posts')->setFetchMode(PDO::FETCH_CLASS, get_called_class())->where('id', $postid)->first();\r\n }", "public function getPost($id)\n { \n // find uses the find\n $post = Post::find($id); \n return view('blog.post', ['post' => $post]);\n }", "public function findOneById($id)\n {\n $queryBuilder = $this->queryAll();\n $queryBuilder->where('p.PK_idPosts = :id')\n ->setParameter(':id', $id, \\PDO::PARAM_INT);\n $result = $queryBuilder->execute()->fetch();\n\n return !$result ? [] : $result;\n }" ]
[ "0.8788931", "0.8397108", "0.8367551", "0.8266247", "0.8099256", "0.80325645", "0.79719365", "0.7932251", "0.78658944", "0.78451025", "0.78213495", "0.7819652", "0.78184575", "0.77492756", "0.76362836", "0.7622327", "0.76222855", "0.75783163", "0.75729084", "0.7560154", "0.7559744", "0.7559744", "0.75381905", "0.75336856", "0.7524166", "0.75177413", "0.7506547", "0.7502098", "0.7501807", "0.7497395", "0.7485012", "0.74824023", "0.7468338", "0.74571705", "0.7446139", "0.7417745", "0.73908937", "0.7387923", "0.7372887", "0.7329476", "0.73179144", "0.73088574", "0.7298188", "0.729439", "0.7283888", "0.726198", "0.7216712", "0.7209907", "0.72081333", "0.7196374", "0.71951836", "0.71913695", "0.71867484", "0.7183779", "0.71438605", "0.71149576", "0.71147037", "0.710003", "0.70953846", "0.7094198", "0.7084362", "0.7083895", "0.7077284", "0.70497835", "0.7047598", "0.7045528", "0.7045528", "0.7040042", "0.7039445", "0.7016018", "0.701525", "0.7007805", "0.7003137", "0.69982153", "0.6981042", "0.6980114", "0.69746834", "0.6971412", "0.69580317", "0.6947222", "0.694298", "0.6933592", "0.6925915", "0.69217026", "0.69213706", "0.6919723", "0.69184697", "0.69089854", "0.6900243", "0.68911755", "0.6878842", "0.68766767", "0.6856857", "0.68472916", "0.68416584", "0.6836875", "0.68368584", "0.6833775", "0.6830514" ]
0.8810421
1
Returns posts by Ids
Возвращает посты по Ids
public function getPostsByIds(array $ids);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getByPostIds($ids)\n {\n return $this->model->whereIn('post_id', $ids);\n }", "public function findPost($id);", "public function fetchAllByPostId($postId);", "public function getPostByID($id);", "public function getPostById($id);", "public function getPostById($id);", "public function test_get_posts_by_ids()\n\t{\n\t\t$expected = array();\n\t\t$expected[] = Post::create( array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status( 'published' ),\n\t\t\t'content_type' => Post::type( 'entry' ),\n\t\t\t'pubdate' => HabariDateTime::date_create( time() ),\n\t\t));\n\t\t$expected[] = Post::create( array(\n\t\t\t'title' => 'I am not a Post',\n\t\t\t'content' => 'But I\\'m certainly not a pipe',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status( 'published' ),\n\t\t\t'content_type' => Post::type( 'entry' ),\n\t\t\t'pubdate' => HabariDateTime::date_create( time() ),\n\t\t));\n\n\t\t$ids = array();\n\t\tforeach ( $expected as $post ) $ids[] = $post->id;\n\n\t\t$result = Posts::get( array('id' => $ids ) );\n\n\t\t$this->assert_true( $result instanceof Posts, 'Result should be of type Posts' );\n\t\t// @todo This currently isn't true, because the options limit is respected. Should it be?\n\t\t//$this->assert_equal( count( $result ), count( $expected ), 'The number of posts we asked for should be returned' );\n\n\t\tforeach ( $result as $r ) {\n\t\t\t$this->assert_true( $r instanceof Post, 'Items should be of type Post' );\n\t\t\t$this->assert_true( in_array( $r->id, $ids ), 'id of returned Post should be in the list of the ones we asked for' );\n\t\t}\n\n\t}", "abstract public function getPost($id);", "function woodmart_get_posts_title_by_id() {\n\t\t$ids = isset( $_POST['id'] ) ? $_POST['id'] : array(); // phpcs:ignore\n\t\t$post_type = isset( $_POST['post_type'] ) ? $_POST['post_type'] : 'post'; // phpcs:ignore\n\t\t$results = array();\n\n\t\t$query = new WP_Query(\n\t\t\tarray(\n\t\t\t\t'post_type' => $post_type,\n\t\t\t\t'post__in' => $ids,\n\t\t\t\t'posts_per_page' => - 1,\n\t\t\t\t'orderby' => 'post__in',\n\t\t\t)\n\t\t);\n\n\t\tif ( ! isset( $query->posts ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $query->posts as $post ) {\n\t\t\t$results[ $post->ID ] = $post->post_title;\n\t\t}\n\n\t\twp_send_json( $results );\n\t}", "public function getPosts();", "public function get_posts_by_id($ids, $slider_id, $is_gal, $additional = array()){\n\t\t$arr = (is_string($ids)) ? explode(',', $ids) : $ids;\n\n\t\t$query = array(\n\t\t\t'ignore_sticky_posts' => 1,\n\t\t\t'post_type'\t=> 'any',\n\t\t\t'post__in'\t=> $arr\n\t\t);\n\t\tif($is_gal){\n\t\t\t$query['post_status']\t= 'inherit';\n\t\t\t$query['orderby']\t\t= 'post__in';\n\t\t}\n\t\t\n\t\t$query\t= array_merge($query, $additional);\n\t\t$query\t= apply_filters('revslider_get_posts', $query, $slider_id);\n\t\t\n\t\t$object\t= new WP_Query($query);\n\t\t$posts\t= $object->posts;\t\t\n\n\t\tforeach($posts as $key => $post){\n\t\t\t$posts[$key] = (method_exists($post, 'to_array')) ? $post->to_array() : (array)$post;\n\t\t}\n\t\t\n\t\treturn $posts;\n\t}", "public function authorPosts($id)\n {\n return $this->get('posts?author='.$id.'&_embed&per_page=25');\n }", "public function findAllPosts();", "public function posts()\n {\n $uids = Array(); \n foreach($this->following as $f) {\n $uids[] = $f->user_id;\n }\n if(empty($uids)) {\n return Array();\n }\n $uids_sql = join(',', $uids);\n $sql = <<<END_SQL\n select posts.created, posts.text, users.user_id, users.first_name, users.last_name\n from posts\n inner join users on users.user_id=posts.user_id\n where posts.user_id in ($uids_sql)\n order by created desc\nEND_SQL;\n $posts = DB::instance(DB_NAME)->select_rows($sql, \"object\");\n return $posts;\n }", "public function getPostsByUser($id){\n $posts = Post::where('user_id', $id)->get();\n return response()->json([\n 'status' => 'success',\n 'posts' => $posts\n ], 200);\n }", "public function findById($postId);", "public function get_specific_posts($gal_ids = array()){\n\t\t$is_gal\t\t= false;\n\t\t$additional\t= array();\n\t\t$slider_id\t= $this->get_id();\n\t\t\n\t\tif(!empty($gal_ids) && $gal_ids[0] !== ''){\n\t\t\t$posts\t= $gal_ids;\n\t\t\t$posts\t= apply_filters('revslider_set_posts_list_gal', $posts, $this->get_id());\n\t\t\t$is_gal\t= true;\n\t\t}else{\n\t\t\tif(isset($gal_ids[0])){\n\t\t\t\tunset($gal_ids[0]);\n\t\t\t\t$posts\t\t\t\t\t= implode(',', $gal_ids);\n\t\t\t\t$additional['order']\t= 'none';\n\t\t\t\t$additional['orderby']\t= 'post__in';\n\t\t\t}else{\n\t\t\t\t$posts = $this->get_param(array('source', 'post', 'list'), '');\t\n\t\t\t\t$additional['order'] = $this->get_param(array('source', 'post', 'sortDirection'), 'DESC');\n\t\t\t\t$additional['orderby'] = $this->get_param(array('source', 'post', 'sortBy'), '');\n\t\t\t}\n\t\t\t$posts = apply_filters('revslider_set_posts_list', $posts, $this->get_id());\n\t\t}\n\t\t\n\t\treturn $this->get_posts_by_id($posts, $slider_id, $is_gal, $additional);\n\t}", "public function getPosts($userId){\n global $db;\n $reqPosts = $db->fetch(\"\n SELECT * FROM post WHERE user_id = ?\n \",[$userId],true);\n return $reqPosts;\n }", "function getArticleById(array $posts, string $id): array\n{\n foreach ($posts as $post) {\n if ($post['id'] === $id) {\n return $post;\n }\n }\n}", "function getPosts($id, $page, $per_page = POST_RESULTS_PER_PAGE) {\n global $MYSQL;\n \n $start = (int)($page - 1) * $per_page;\n $per_page = (int)$per_page;\n \n\t $data = array($id);\n $query = $MYSQL->rawQuery(\"SELECT * FROM\n {prefix}forum_posts\n WHERE\n post_type = 2\n AND\n origin_thread = ?\n ORDER BY\n post_time\n ASC LIMIT\n {$start}, {$per_page}\", $data);\n return $query;\n }", "public function getRelatedPosts() {}", "protected function findEntitiesByIds($ids = [])\n {\n return get_posts([\n 'post_type' => $this->config('publicGroupType'),\n 'posts_per_page' => $this->config('maxItemForSelect'),\n 'meta_query' => [\n [\n 'key' => $this->config('publicGroupType'),\n 'value' => $ids,\n 'compare' => 'IN',\n ]\n ]\n ]);\n }", "public function get_posts(){\n\t\t$data = Post::find_all_by_type();\n\t\treturn $this->get_feed( $data );\n\t}", "public function getPosts() {}", "public function getPosts($id = null) {\n if ($id == null) die (\"he, userid muss ma schon angeben!\");\n $q = sprintf(\"SELECT * FROM money WHERE user_id='%s' ORDER by date desc\", $id);\n $result = mysql_query($q);\n $ret = array();\n while ($row = mysql_fetch_assoc($result)) {\n if($row['user_id'] != $_SESSION['user_id']) {\n $row['user_id'] = '';\n }\n $ret[] = $row;\n }\n \n\n return $ret;\n }", "private function getAllThePosts( $ids = [] ) {\n\t\t\n\t\t$post_type = get_option( 'tagger_tag_related' );\n\t\tif ( empty( $post_type ) ) {\n\t\t\t$post_type = 'post';\n\t\t}\n\t\t\n\t\t$args = array(\n\t\t\t'numberposts' => - 1,\n\t\t\t'post_type' => $post_type,\n\t\t\t'post_status' => 'publish'\n\t\t);\n\t\t\n\t\tif ( count( $ids ) > 0 ) {\n\t\t\t$args['include'] = implode( \",\", $ids );\n\t\t}\n\t\t\n\t\t$ps = get_posts( $args );\n\t\t\n\t\tforeach ( $ps as $p ) {\n\t\t\t$this->relatedposts->add( $p ); //array('id' => $p->ID, 'title' => $p->post_title)\n\t\t\t\n\t\t}\n\t\tunset( $ps );\n\t}", "public function getByUserId($id) {\n\n $query = $this->db_connection->prepare('\n SELECT posts.*, users.username, users.id as uid FROM posts \n LEFT JOIN users ON posts.author = users.id \n WHERE users.id = :userId\n ORDER BY posts.date DESC');\n $query->bindParam(':userId', $id, \\PDO::PARAM_INT);\n $query->execute();\n return $query->fetchAll(\\PDO::FETCH_OBJ);\n }", "public static function findPost($postid)\n {\n return Posts::find($postid)->with('categoryOfPosts','commentsOfPosts')->where('posts.id',$postid)->get()->toArray();\n }", "public function findPosts()\n {\n return $this->repository->findAll();\n }", "public function getpost($id){\n $db = new DB();\n $sql='SELECT * FROM posts WHERE id= :id';\n $stmt = $db->connect()->prepare($sql); \n $stmt->execute(['id'=>$id]); \n $results = $stmt->fetch(PDO::FETCH_OBJ);\n \n return $results;\n }", "public function getPostById($id) {\n $query = \"SELECT * FROM \" . self::$TABLE . \" WHERE id = $id LIMIT 1\";\n $resultSet = parent::executeQuery($query);\n \n $array = $this->getRecordAsArray($resultSet);\n return $this->arrayToObject($array);\n }", "public function find($id)\n {\n return Post::with(array('tags', 'user'))->findOrFail($id);\n }", "function get_posts()\n {\n include '../database.php';\n $post_id = $_GET['id'];\n $prepare = $pdo->prepare('SELECT * FROM posts WHERE post_id = :post_id');\n $prepare->bindValue('post_id', $post_id);\n $prepare->execute();\n global $post;\n $post = $prepare->fetch();\n }", "function cc_idea_postss(){\n $all_posts = array();\n $idea_args = array(\n 'post_type'=>'cc_ideas',\n 'post_status'=>'publish',\n 'posts_per_page'=> -1,\n );\n $posts = get_posts( $idea_args );\n foreach ($posts as $post_value) {\n $all_posts[html_entity_decode(utf8_decode($post_value->post_title))] = $post_value->ID;\n }\n wp_reset_postdata();\n wp_reset_query();\n return $all_posts;\n }", "public function allPosts() {\n \n $this->query_exec( 'SELECT post_title, post_content, meta_image.meta_value, guid FROM wpyy_posts posts ' .\n 'INNER JOIN wpyy_postmeta hold ON posts.ID = hold.post_id AND hold.meta_key = \"_thumbnail_id\" ' . \n 'INNER JOIN wpyy_postmeta meta_image ON hold.meta_value = meta_image.post_id AND meta_image.meta_key = \"_wp_attached_file\" ' .\n 'WHERE ping_status = \"Open\" AND post_status = \"publish\"' );\n \n return $this->posts;\n }", "public function getAllPosts();", "public function findPostById($id)\n {\n return Post::find($id);\n }", "public function test_get_post_by_id()\n\t{\n\t\t$expected = Post::create( array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status( 'published' ),\n\t\t\t'content_type' => Post::type( 'entry' ),\n\t\t\t'pubdate' => HabariDateTime::date_create( time() ),\n\t\t));\n\n\t\t$result = Posts::get( array( 'id' => $expected->id ) );\n\n\t\t$this->assert_true( $result instanceof Posts, 'Result should be of type Posts' );\n\t\t$this->assert_true( $result->onepost, 'A single post should be returned if a single id is passed in' );\n\n\t\t$result = $result[0];\n\t\t$this->assert_true( $result instanceof Post, 'Items should be of type Post' );\n\t\t$this->assert_equal( $result->id, $expected->id, 'id of returned Post should be the one we asked for' );\n\t}", "public function find($id)\n {\n return Post::with('signup', 'tags')->findOrFail($id);\n }", "function search_solo_posts($bdd)\n {\n \n $id = $_GET['id'];\n $reponse = $bdd->prepare('select p.title, p.content, p.id, p.id_aut, p.id_cat, a.firstname, a.username, c.name, p.file\n from posts as p \n inner join authors as a on p.id_aut = a.id \n inner join categories as c on p.id_cat =c.id\n where p.id=?');\n \n $reponse->execute(array($id));\n \n \n $post_solo = $reponse->fetch();\n \n $reponse->closeCursor();\n \n return $post_solo;\n \n \n }", "public function GetByID($pid) {\n\t\t\t$query = \"SELECT * FROM \".Configuration::sitePrefix.\"posts WHERE id=$pid\";\n\t\t\t$this->FinishGet($query);\n\t\t}", "public function getPosts()\n {\n # Using aliases here so we can use postID (or userID) in posts/index.php\n # (otherwise aliases are unnecessary)\n $this->db->query('SELECT *, \n posts.id as postID,\n users.id as userID,\n posts.created_at as postCreated,\n users.created_at as userCreated\n FROM posts\n INNER JOIN users\n ON posts.user_id = users.id\n ORDER BY posts.created_at DESC\n ');\n\n # Get array of results from resultSet() in DatabaseController\n $results = $this->db->resultSet();\n\n return $results;\n }", "function get_other_posts_by_author($authorId, $postId) {\n\t$retval = array();\n\n\t$authors_posts = get_posts( array( 'author' => $authorId, 'post__not_in' => array( $postId ) ) );\n\n\tforeach ( $authors_posts as $authors_post ) {\n\t\t$title = apply_filters( 'the_title', $authors_post->post_title, $authors_post->ID );\n\t\t$plink = get_permalink( $authors_post->ID );\n\t\tarray_push($retval, array('title' => $title, 'permalink' => $plink ) );\n\t}\n\n\treturn $retval;\n}", "public function getPosts() {\r\n $posts = [];\r\n $sql = 'SELECT BIL_ID as id, BIL_DATE as date, BIL_TITLE as title, BIL_CONTENT as content '\r\n . 'FROM T_POST '\r\n . 'ORDER BY BIL_ID DESC LIMIT 0,5';\r\n $req = $this->executeRequest($sql);\r\n while ($data = $req->fetch(PDO::FETCH_ASSOC)) {\r\n $posts[] = new Post($data);\r\n }\r\n return $posts;\r\n }", "public function getPostsByCategory($id){\n $posts = Post::where('category_id', $id)->get();\n return response()->json([\n 'status' => 'success',\n 'posts' => $posts\n ], 200);\n }", "public function getPosts($id)\n {\n $image = Image::find($id);\n if ($image) {\n $posts = $image->posts()->get();\n return $posts;\n }\n throw new CrudException('image:getPosts');\n }", "public function getPosts() :array\n {\n $sql =\"SELECT post.id, post.user_id, post.title, post.post, post.creation_date, user.pseudo FROM posts post INNER JOIN users user ON user.id = post.user_id ORDER BY post.id DESC\";\n \n return $this->queryAllFetchClass($sql, SELF::ENTITY_CLASSNAME);\n }", "function assigned_posts($product_id)\n {\n $this->db->select('post.id, post_name AS title, code, slug, excerpt, post.status, published_at, product_meta.id AS meta_id');\n $this->db->join('product_meta', 'post.id = product_meta.related_1');\n $this->db->where('product_meta.type_id', 310012); //Asignación de contenido\n $this->db->where('product_meta.product_id', $product_id);\n\n $posts = $this->db->get('post');\n \n return $posts;\n }", "public function get_posts(){\n$all_posts = post::get(['id', 'title','category_id', 'user_id', 'image', 'content', 'created_at','status']);;\nreturn $all_posts;\n}", "public function postIdIn($ids){\n\t\treturn $this->setVar('post__in', $ids);\n\t}", "public static function getAllPosts() {\r\n $db = DBContext::getDB();\r\n $query = \"SELECT summary,companyName,companyEmail,Posts.id as id , title , date , post, username , user.id as userid FROM Posts INNER JOIN user ON Posts.user_id = user.id ORDER BY DATE DESC \";\r\n $result = $db->query($query);\r\n $posts = array();\r\n foreach ($result as $row) {\r\n $post = new Post($row['title'], $row['post'], $row['date'], $row['userid'], $row['summary'], $row['companyName'], $row['companyEmail']);\r\n $post->setID($row['id']);\r\n $post->setUsername($row['username']);\r\n $posts[] = $post;\r\n }\r\n return $posts;\r\n }", "public function getPosts($idPage)\n\t{\n\t\t$request = 'posts';\n\t\t$fields = '&fields=id,from,story,name,caption,type,status_type,object_id,created_time,updated_time,shares,likes,comments';\n\t\t$url = self::$base_url.$idPage.'/'.$request.'?access_token='.$this->access_token.$fields;\n\n\t\t$result = $this->executeQuery($url);\n\n \t\treturn (is_null($result->data)) ? $result->error->message : $result->data;\n\t}", "public function idPosts()\n\t{\n\t\treturn $this -> idPosts;\n\t}", "public function getPostView($id);", "public static function getPostsByPublisher($publisher_id) {\r\n $db = DBContext::getDB();\r\n $query = \"SELECT summary,companyName,companyEmail,Posts.id as id,title,date,post,username FROM Posts INNER JOIN user on Posts.user_id = user.id WHERE user_id = $publisher_id ORDER BY Posts.id\";\r\n $result = $db->query($query);\r\n $posts = array();\r\n foreach ($result as $row) {\r\n $post = new Post($row['title'], $row['post'], $row['date'], $publisher_id, $row['summary'], $row['companyName'], $row['companyEmail']);\r\n $post->setID($row['id']);\r\n $post->setUsername($row['username']);\r\n $posts[] = $post;\r\n }\r\n return $posts;\r\n }", "function getByPostID($post_id) {\n return $this->find('all', array(\n 'conditions' => array(\n 'Comment.model_id' => $post_id\n ),\n 'contain' => array(\n 'User' => array(\n 'fields' => array(\n 'User.id',\n 'User.first_name',\n 'User.last_name'\n ),\n )\n ),\n 'order' => 'Comment.created DESC'\n ));\n }", "public function getPostsByLogin($loginId) {\n $query = \"select * from posting where loginId = \" .$loginId;\n return $this->execute($query);\n }", "public function getPosts()\n {\n return $this->hasMany(Post::className(), ['post_author' => 'ID']);\n }", "public function posterPostFetcher($id){\n $this->stmt = $this->connect()->prepare(\"SELECT * FROM posts WHERE poster_id = ? order by id DESC \");\n\n try{\n //execute\n $this->stmt->execute([$id]);\n //count rows\n $row = $this->stmt->rowCount();\n //check if there are matches\n if ($row > 0) {\n //fetch posts\n return $this->stmt->fetchAll();\n }else{\n //load error page\n header(\"location: ./page404\");\n }\n }catch(PDOException $e){\n //return error message\n return $e->getMessage();\n }\n }", "public function getPosts($authorId)\n {\n $posts = $this->findBy(array('author' => $authorId));\n return $posts;\n }", "public function loadPosts() {\n $this->db->query('SELECT posts.*, bloggers.blogger_name FROM posts INNER JOIN bloggers ON bloggers.blogger_id = posts.blogger_id ORDER BY created_on DESC');\n $results = $this->db->resultSet();\n\n return $results;\n\n }", "public function findPostsByIds(array $ids)\n {\n return $this->createQueryBuilder('p')\n ->where(\"p.id IN(:ids)\")\n ->setParameter('ids', $ids)\n ->getQuery()\n ->getResult(); \n }", "public function id()\n {\n return $this->hasMany(Post::class);\n }", "public function requestPost($id)\n {\n \t$where = ['post_id' => $id];\n\t\tif ($this->mapper->entryExists($where)) {\n\t\t\treturn $this->mapper->fetchWhere($where);\n\t\t}\n }", "public function userPosts($id = null){\n\t\t$user = new User();\n\t\tif($id){\n\t\t\treturn $this->db->QueryGet(\"SELECT * FROM scheduledposts WHERE id = ? AND userid = ? \",array($id,$user->data()->id))->first();\n\t\t}else{\n\t\t\treturn $this->db->QueryGet(\"SELECT * FROM scheduledposts WHERE userid = ? ORDER BY id DESC\",array($user->data()->id))->results();\n\t\t}\n\t}", "public function posts(){\n return $posts = $postModel::all();\n }", "public function getSinglePost($id) {\n\n $data = Post::where('id',$id)->get();\n\n return $data;\n }", "public function getPost($id) {\n return Post::find($id);\n }", "function posts_from_feed($feed_id)\n\t{\n\t\t$sql = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM posts\n\t\t\t\tWHERE\n\t\t\t\t\tposts.id_feed = $feed_id\n\t\t\t\tORDER BY timestamp desc\n\t\t\t\tLIMIT 0, 10\n\t\t\";\n\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\treturn $dbdata->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function getPosts() {\n\t\t$select = $this->select()->from($this->_name)->order(array('created DESC'))->distinct();\n\t\treturn $this->fetchAll($select);\n\t}", "private function category_posts($cat_ids) {\n\n $data = array();\n \n ee()->db->select('entry_id,cat_id');\n ee()->db->where_in('cat_id',$cat_ids);\n \n $query = ee()->db->get('category_posts');\n $results = $query->result();\n \n foreach($results as $key => $row ) {\n $data[] = $row->entry_id;\n }\n \n return $data;\n }", "public function findById($id)\n\t{\n\t\t$data = Posts::join('web_posts_translation', 'web_posts_translation.posts_id', 'web_posts.id')->where('web_posts_translation.langcode', 'vi')->where('web_posts.id', $id)->select('*', 'web_posts.id as id')->first();\n\t\tif($data){\n\t\t\t$pathData = PathAlias::whereIn('type', [3,4])->where('pages_id', $data->id)->where('langcode', 'vi')->first();\n\t\t\t$data->page_title = $pathData->title;\n\t\t\t$data->page_description = $pathData->description;\n\t\t\t$data->url_and_handle = $pathData->alias;\n\t\t\t$data->seo = PathAliasSeo::where('path_alias_id', $pathData->id)->pluck('meta_id');\n\t\t\t$data->seoData = PathAliasSeo::join('web_meta', 'web_meta.id', '=', 'web_path_alias_seo.meta_id')->where('path_alias_id', $pathData->id)->select('web_meta.id', 'web_path_alias_seo.content', DB::raw('CONCAT(web_meta.attr, \\'=\\', web_meta.value) as label'))->get();\n\t\t\t$data->image = PostImages::where('posts_id', $id)->get();\n\t\t\t$data->infotechs = ProductsInfotechs::where('posts_id', $id)->get();\n\t\t\t$data->properties = Properties::where('posts_id', $id)->pluck('options_indentify');\n\n\t\t\t$data->product = Products::where('posts_id', $id)->select('*', DB::raw(\"(CASE WHEN status='show' THEN true ELSE false END) as status\"))->orderBy('id')->get();\n\t\t\tforeach ($data->product as $key => $value) {\n\t\t\t\t$data->product[$key]->propertiesValue = PropertiesValue::where('posts_id', $id)->where('pro_sku', $value->sku)->get();\n\t\t\t}\n\t\t\t$data->keyword = KeywordsRelated::join('web_keywords', 'web_keywords.id', '=', 'web_keywords_related.keywords_id')->where('web_keywords_related.pages_id', $id)->where('type', 1)->pluck('web_keywords.value');\n\t\t\t$data->collections = CollectionsPosts::where('posts_id', $id)->pluck('collections_id');\n\t\t\treturn $data;\n\t\t}\n\t\treturn false;\n\t}", "public function findById($Id) {\n $query = \"select * from posting where postid = \" .$Id;\n return $this->execute($query);\n }", "public function getPosts(){\n $this->db->query(\"SELECT *, \n u.id as userId,\n p.id as postId,\n p.created_at as postDate, \n u.created_at as userDate\n FROM\n users u\n INNER JOIN posts p ON\n u.id = p.user_id\n ORDER BY p.created_at DESC\" );\n return $this->db->resultSet();\n }", "public function getPosts()\n\t\t{\n\t\t\t/*\n\t\t\t$post = array(\n\t\t\t\t\"id\" => 1,\n\t\t\t\t\"titulo\" => \"Titulo post\",\n\t\t\t\t\"cuerpo\" => \"Cuerpo post\"\n\t\t\t);\n\t\t\treturn $post;\n\t\t\t*/\n\n\t\t\t$post = $this->_bd->query(\"Select * FROM post;\");\n\t\t\t//$post = $this->_bd->query(\"TRUNCATE TABLE post;\");\n\t\t\treturn $post->fetchall();\n\t\t}", "function bunchy_get_archive_featured_posts_ids() {\n\t$settings = bunchy_get_archive_settings();\n\t$featured_entries = $settings['featured_entries'];\n\n\tif ( 'none' === $featured_entries['type'] ) {\n\t\treturn array();\n\t}\n\n\t$featured_entries['posts_per_page'] = strpos( $settings['template'], 'one-featured' ) !== false ? 1 : 3;\n\n\treturn bunchy_get_featured_posts_ids( $featured_entries );\n}", "public function getPosts(): PostsCollection;", "public function getPostsByUser()\n\t{ \n $this->load->model('post/Taxonomy_model');\n \n\t\t$type = $this->getAttribute('type', 'all');\n\t\t$status = $this->getAttribute('status', 'all');\n\t\t$posts = $this->Post_model->getPosts($type, 'loop', $status, 10, 0, 'id', 'desc', 'array', $this->uri->segment(2));\n\t\t\n\t\treturn ['posts' => $posts];\n }", "public function getPostByPostId($id) {\n\t\t$responseData = new ResponseData;\n\n\t\t$post =DB::table('tblPosts')\n\t\t->select('tblPosts.*')\n\t\t->where('PostID', $id)\n ->orderBy('tblPosts.PostID', 'DSC')\n\t\t->get();\n\n\t\t$postComments =DB::table('tblPostComments')\n\t\t->select('tblPostComments.*')\n\t\t->where('PostID', $id)\n ->orderBy('tblPostComments.PostCommentID', 'DSC')\n\t\t->get();\n\n\t\t$postDoc =DB::table('tblPostDocuments')\n\t\t->select('tblPostDocuments.*')\n\t\t->where('PostID', $id)\n ->orderBy('tblPostDocuments.PostDocumentId', 'DSC')\n\t\t->get();\n\t\t\n\t\tforeach ($post as $key => $value) { \n\t\t\t$count = PostLikes::where('PostID', $value->PostID)->get();\n\t\t\t$commentCount = $count->count();\n $post[$key]->Likes = floatval($commentCount);\n\t\t}\n\n $responseData->message = 'Success';\n\t\t$responseData->status = 'Success';\n\t\t$responseData->data = ['post'=>$post, 'postComments'=>$postComments, 'PostDocuments'=>$postDoc];\n\t\t$response = array(\n\t\t\t$responseData\n\t\t);\n\t\treturn json_encode($response);\n\t}", "public function findByIds($ids = []);", "public function showPosts()\n {\n $sql = <<<EOD\n SELECT\n *,\n DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%dT%TZ') AS published_iso8601,\n DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%d') AS published\n FROM content\n WHERE type=?\n ORDER BY published DESC\n ;\n EOD;\n\n $res = $this->database->executeFetchAll($sql, [\"post\"]);\n\n foreach ($res as $key => $post) {\n $filter = explode(\",\", $post->filter);\n $text = $post->data;\n\n $post->data = $this->textFilter->parse($text, $filter);\n\n if ($post->deleted) {\n unset($res[$key]);\n }\n }\n\n return $res;\n }", "public function getI($id)\n {\n // $cols = 'id,post_title,post_content,post_date,post_seen_count,post_comment_count,post_status,post_images,post_source';\n $cols = '*';\n $q=$this->selectId('posts', $id, $cols);\n $a = $this->mysql->fetch1();\n $a['post_date']=dtf(php_timeFromDifText($a['post_date'], $this->client_timeDiff));\n $a['post_modified']=dtf(php_timeFromDifText($a['post_modified'], $this->client_timeDiff));\n if ($q) {\n $this->mysql->updateInc('posts', 'post_seen_count', 'WHERE id='.$id); //обновить кол-во просмотров\n }\n return $a;\n }", "public function show($id)\n {\n $posts = User::findOrFail($id)->post()->get();\n // foreach($user->post() as $p) {\n\n // }\n return response()->json([\n 'status' => 'success',\n 'posts' => $posts\n ]);\n }", "public static function getAllPosts() {\n $db = new MySqlTranslator();\n\n try {\n $db->query('SELECT *,\n `posts`.id as postId,\n `user`.id as userId,\n `posts`.created_at as postCreated\n FROM `posts`\n INNER JOIN `user`\n ON posts.user_uuid = `user`.user_uuid AND posts.active_flag = ' . TRUE . '\n ORDER BY `posts`.created_at DESC\n ');\n\n $results = $db->resultSet();\n return $results;\n } catch (PDOException $_e) {\n echo $_e->getMessage();\n return false;\n }\n }", "public function getPosts()\n {\n $req = $this->getDataBase()->prepare(' SELECT id, title, content, category, DATE_FORMAT(creation_date, \\'%d/%m/%Y <em>à</em> %Hh%imin\\') AS creation_date FROM posts ');\n $req->execute();\n $posts = [];\n while($data = $req->fetch(PDO::FETCH_ASSOC)) {\n $posts[] = $this->hydrate($data);\n }\n $req->closeCursor();\n \n return $posts;\n }", "public function getUserPost($userId){\n $this->colName = $this->columns[1];\n $posts = $this->selectMany($this->table, $this->colName, $userId);\n return $posts;\n }", "function findAllByPostId(\\PDO $conn, int $id) :array {\r\n $sql = 'SELECT *\r\n FROM comments\r\n WHERE post_id = :id\r\n ORDER BY created_at DESC;';\r\n \r\n $rs = $conn->prepare($sql);\r\n $rs->bindValue(':id', $id, \\PDO::PARAM_INT);\r\n $rs->execute();\r\n return $rs->fetchAll(\\PDO::FETCH_ASSOC);\r\n}", "function search_all_posts($bdd)\n {\n $reponse = $bdd->prepare('select p.title, p.content, p.id, p.id_aut, p.id_cat, a.firstname, a.username, c.name, p.created_date, p.file\n from posts as p \n inner join authors as a on p.id_aut = a.id \n inner join categories as c on p.id_cat =c.id');\n $reponse->execute();\n $list_post = array();\n while ($post = $reponse->fetch()) {\n \n $list_post[] = $post;\n }\n $reponse->closeCursor();\n return $list_post;\n \n }", "public function listPostsInCategory($id,$nr_elements = null)\n {\n try {\n //Get all childrens Category for the Currenty category\n $children_category = $this->category->listTreeCategories($id);\n\n // Extract the id Value\n $category_ids = array_column($children_category, 'id');\n\n // Add the current category to Array\n array_push($category_ids,$id);\n\n $posts = $this->post->whereHas('categories', function($query) use ($category_ids) {\n $query->whereIN('category_id', $category_ids);\n })->orderBy('publish_date', 'desc')->paginate($nr_elements);\n\n\n\n\n } catch (\\Exception $e) {\n\n abort(404);\n }\n\n\n return $posts;\n }", "public function post_by_id($id)\r\n\t{\r\n\t\t$result = $this->db->select('*')\r\n ->from('blog_tbl')\r\n ->where('id',$id)\r\n ->get()\r\n ->row();\r\n // print_r($result); exit;\r\n\t\techo json_encode($result);\r\n\t}", "public static function getPosts(Request $request) {\n $query = $request->header('Query');\n\n $posts = self::where('status', self::STATUS_PUBLISHED)\n ->select('id', 'title', 'description', 'slug', 'created_at');\n\n $ids = [];\n\n if (!empty($query)) {\n $query = preg_replace(\"/[\\\\+\\\\-\\\\=\\\\&\\\\|\\\\!\\\\(\\\\)\\\\{\\\\}\\\\[\\\\]\\\\^\\\\\\\"\\\\~\\\\*\\\\<\\\\>\\\\?\\\\:\\\\\\\\\\\\/]/\", addslashes('\\\\$0'), $query);\n\n $params = [\n 'index' => self::ES_INDEX,\n 'type' => 'post',\n 'body' => [\n 'query' => [\n 'wildcard' => [\n 'title' => [\n 'value' => $query . '*'\n ]\n ]\n ]\n ],\n 'size' => 1000,\n ];\n\n $results = self::getESClient()->search($params);\n\n // collect ids\n if ($results['hits']['total']) {\n foreach ($results['hits']['hits'] as $hit) {\n $ids[] = $hit['_id'];\n }\n\n $posts->whereIn('id', $ids)\n ->orderByRaw(\"FIELD(id, \" . (implode(',', $ids)) . \")\");\n } else {\n $posts->whereIn('id', count($ids) ? $ids : [0]);\n }\n }\n\n $posts = $posts->paginate(10)->toArray();\n\n foreach ($posts['data'] as $key => $post) {\n $posts['data'][$key]['created_at'] = Carbon::createFromTimestamp($post['created_at'])->format('Y-m-d, H:i');\n\n if (Storage::disk('public')->exists('images/posts/' . $post['id'] . '.jpg')) {\n $posts['data'][$key]['img'] = Storage::disk('public')->url('images/posts/' . $post['id'] . '.jpg');\n } else {\n $posts['data'][$key]['img'] = Storage::disk('public')->url('images/other/noimage_medium.png');\n }\n }\n\n return $posts;\n }", "public function getPosts(){\n\t\t\t$sql = \n\t\t\t\t\"SELECT\n\t\t\t\t\tp.post_id,\n\t\t\t\t\tp.parent_id,\n\t\t\t\t\tp.post_name,\n\t\t\t\t\tp.post_content,\n\t\t\t\t\tp.user_id,\n\t\t\t\t\tp.created_at,\n\t\t\t\t\tu.user_name,\n\t\t\t\t\tcount(p2.post_id) as comments\n\t\t\t\tFROM\n\t\t\t\t\t`posts` AS p\n\t\t\t\tLEFT JOIN `users` AS u ON p.user_id = u.user_id\n\t\t\t\tLEFT JOIN `posts` AS p2 ON p.post_id = p2.parent_id\n\t\t\t\tWHERE p.parent_id = 0\n\t\t\t\tGROUP BY p.post_id\n\t\t\t\t\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->fetchAll();\n\t}", "function getPosts($subId, $loc_id) {\n\t\t$user_handler = new userHandler();\n\t\t$conn = $user_handler->getConnection();\n\t\tif ($conn != null) {\n\t\t\t$query = mysqli_query($conn, \"SELECT * FROM Posts WHERE subcategory_id = '$subId' AND location_id = '$loc_id'\");\n\t\t\tif ($query) {\n\t\t\t\t$rows = mysqli_fetch_all($query,MYSQLI_ASSOC);\n\t\t\t\tif (count($rows) > 0) {\t\t\t\t\n\t\t\t\t\treturn $rows;\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t}", "public function index($post_id)\n {\n return $this->comments->findAll($post_id);\n }", "private function getDataForPosts()\n {\n $authors = [\n ['id' => 1, 'name' => 'John'],\n ['id' => 2, 'name' => 'Alex'],\n ['id' => 3, 'name' => 'Mike'],\n ];\n $posts = [];\n\n for ($i = 0; $i < 10; $i++) {\n $posts[] = [\n 'id' => $i + 1,\n 'title' => \\sprintf('Post title $%s', $i),\n 'author' => $authors[$i % 3],\n ];\n }\n\n return $posts;\n }", "static function getPosts($topic_id){\n\t\t$db = \\models\\MySQL::getInstance();\n\n $result = $db->queryAll(\"SELECT\n f.post_topic,\n f.post_content,\n f.post_date,\n f.post_by,\n p.login_id,\n p.username,\n p.gender,\n p.birthday\n FROM\n forum_posts f LEFT JOIN profiles p\n ON\n f.post_by = p.login_id\n WHERE\n f.post_topic = \" . (int)$topic_id);\n\n\t\treturn $result;\n\t}", "public function posts()\n {\n return $this->morphedByMany('App\\Post', 'likeable');\n }", "public function getPosts()\n {\n return $this->findDependentRowset('Table_Posts');\n }", "public function getPost($id){\n $array = array();\n\n global $pdo;\n\n $sql= $pdo->prepare(\"SELECT * FROM posts WHERE id = :id\");\n $sql->bindValue(\":id\", $id);\n $sql->execute();\n\n if($sql->rowCount() > 0){\n $array = $sql->fetch();\n $array['fotos'] = array();\n\n $sql= $pdo->prepare(\"SELECT id,url FROM posts_imagens WHERE id_post = :id_post\");\n\n $sql->bindValue(\":id_post\", $id);\n $sql->execute();\n\n if($sql->rowCount() > 0){\n $array['fotos'] = $sql->fetchAll();\n }\n }\n\n return $array;\n }", "public function getPosts()\n {\n // Connexion à la base de données\n $newManager = new Manager();\n $db = $newManager->dbConnect();\n // Requête\n $request = $db->prepare('SELECT id, author, title, content, DATE_FORMAT(added_datetime, \\'le %d/%m/%Y à %Hh%i\\') AS added_datetime_fr, DATE_FORMAT(updated_datetime, \\'le %d/%m/%Y à %Hh%i\\') AS updated_datetime_fr FROM posts');\n // Résultat\n $request->execute(array());\n $result = $request->fetchAll();\n $posts = [];\n foreach ($result as $post) {\n $newPost = new Post($post['id'], $post['author'], $post['title'], $post['content'], $post['added_datetime_fr'], $post['updated_datetime_fr']);\n $posts[] = $newPost;\n }\n return $posts;\n }" ]
[ "0.7217142", "0.71304953", "0.70126367", "0.6994413", "0.69828826", "0.69828826", "0.689367", "0.6837849", "0.67245245", "0.6622909", "0.6603111", "0.65920705", "0.65796703", "0.6571006", "0.6501446", "0.64974445", "0.6476098", "0.6443766", "0.6428271", "0.6425921", "0.6376483", "0.6368877", "0.63650095", "0.63570225", "0.629767", "0.62903076", "0.62862396", "0.62750727", "0.62639964", "0.6259964", "0.62362504", "0.62278503", "0.62257856", "0.6224094", "0.6216611", "0.6215544", "0.6206825", "0.6187539", "0.618618", "0.61730045", "0.61600316", "0.61552006", "0.6133708", "0.6106793", "0.6100701", "0.6098332", "0.60976183", "0.6095689", "0.60912085", "0.6089705", "0.60892093", "0.6077443", "0.6073903", "0.6071641", "0.6068139", "0.60675305", "0.60467535", "0.6040215", "0.60210085", "0.6015297", "0.60150546", "0.6014667", "0.60129416", "0.60116494", "0.6010176", "0.6009615", "0.60046935", "0.60020125", "0.59786934", "0.59749615", "0.5974489", "0.5971902", "0.59450936", "0.59318906", "0.5929493", "0.59231955", "0.5922777", "0.59168756", "0.59154356", "0.5912843", "0.59079087", "0.5904597", "0.5903187", "0.5900307", "0.5900049", "0.587904", "0.5878442", "0.58720624", "0.5871775", "0.5867697", "0.5867518", "0.58666116", "0.58659196", "0.58639944", "0.5863454", "0.5862156", "0.58558506", "0.5855357", "0.58540523", "0.58519036" ]
0.7490936
0
Returns posts by query
Возвращает посты по запросу
public function getPosts(PostQuery $postQuery);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woodmart_get_posts_by_query() {\n\t\t$search_string = isset( $_POST['q'] ) ? sanitize_text_field( wp_unslash( $_POST['q'] ) ) : ''; // phpcs:ignore\n\t\t$post_type = isset( $_POST['post_type'] ) ? $_POST['post_type'] : 'post'; // phpcs:ignore\n\t\t$results = array();\n\n\t\t$query = new WP_Query(\n\t\t\tarray(\n\t\t\t\t's' => $search_string,\n\t\t\t\t'post_type' => $post_type,\n\t\t\t\t'posts_per_page' => - 1,\n\t\t\t)\n\t\t);\n\n\t\tif ( ! isset( $query->posts ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $query->posts as $post ) {\n\t\t\t$results[] = array(\n\t\t\t\t'id' => $post->ID,\n\t\t\t\t'text' => $post->post_title,\n\t\t\t);\n\t\t}\n\n\t\twp_send_json( $results );\n\t}", "protected function posts()\n {\n return Post::with(['categories', 'featured_images'])\n ->isPublished()\n ->where(function ($query) {\n $query->where('title', 'like', \"%{$this->query}%\");\n $query->orWhere('content', 'like', \"%{$this->query}%\");\n $query->orWhere('excerpt', 'like', \"%{$this->query}%\");\n })\n ->get();\n }", "public static function getPosts(Request $request) {\n $query = $request->header('Query');\n\n $posts = self::where('status', self::STATUS_PUBLISHED)\n ->select('id', 'title', 'description', 'slug', 'created_at');\n\n $ids = [];\n\n if (!empty($query)) {\n $query = preg_replace(\"/[\\\\+\\\\-\\\\=\\\\&\\\\|\\\\!\\\\(\\\\)\\\\{\\\\}\\\\[\\\\]\\\\^\\\\\\\"\\\\~\\\\*\\\\<\\\\>\\\\?\\\\:\\\\\\\\\\\\/]/\", addslashes('\\\\$0'), $query);\n\n $params = [\n 'index' => self::ES_INDEX,\n 'type' => 'post',\n 'body' => [\n 'query' => [\n 'wildcard' => [\n 'title' => [\n 'value' => $query . '*'\n ]\n ]\n ]\n ],\n 'size' => 1000,\n ];\n\n $results = self::getESClient()->search($params);\n\n // collect ids\n if ($results['hits']['total']) {\n foreach ($results['hits']['hits'] as $hit) {\n $ids[] = $hit['_id'];\n }\n\n $posts->whereIn('id', $ids)\n ->orderByRaw(\"FIELD(id, \" . (implode(',', $ids)) . \")\");\n } else {\n $posts->whereIn('id', count($ids) ? $ids : [0]);\n }\n }\n\n $posts = $posts->paginate(10)->toArray();\n\n foreach ($posts['data'] as $key => $post) {\n $posts['data'][$key]['created_at'] = Carbon::createFromTimestamp($post['created_at'])->format('Y-m-d, H:i');\n\n if (Storage::disk('public')->exists('images/posts/' . $post['id'] . '.jpg')) {\n $posts['data'][$key]['img'] = Storage::disk('public')->url('images/posts/' . $post['id'] . '.jpg');\n } else {\n $posts['data'][$key]['img'] = Storage::disk('public')->url('images/other/noimage_medium.png');\n }\n }\n\n return $posts;\n }", "public function getPosts();", "public function get_posts(){\n\t\t$data = Post::find_all_by_type();\n\t\treturn $this->get_feed( $data );\n\t}", "public function findAllPosts();", "public function query()\n {\n $model = app(PostInterface::class)->getModel();\n /**\n * @var \\Eloquent $model\n */\n $query = $model->with('categories')->select([\n 'posts.id', \n 'posts.name', \n 'posts.image', \n 'posts.created_at', \n 'posts.status',\n 'posts.template'\n ]);\n \n \n if(Route::getCurrentRoute()->hasParameter('category_id')){\n $category_id = Route::getCurrentRoute()->parameter('category_id');\n $query = $query->whereHas('categories', function ($q) use ($category_id) {\n $q->where('post_category.category_id', '=', $category_id);\n });\n }\n\n return $this->applyScopes(apply_filters(BASE_FILTER_TABLE_QUERY, $query, $model, POST_MODULE_SCREEN_NAME));\n }", "public function getPosts() {}", "public function getPosts() {\n $this->db->query(\"SELECT * FROM posts\");\n return $this->db->setResult();\n }", "public function showPosts()\n {\n $sql = <<<EOD\n SELECT\n *,\n DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%dT%TZ') AS published_iso8601,\n DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%d') AS published\n FROM content\n WHERE type=?\n ORDER BY published DESC\n ;\n EOD;\n\n $res = $this->database->executeFetchAll($sql, [\"post\"]);\n\n foreach ($res as $key => $post) {\n $filter = explode(\",\", $post->filter);\n $text = $post->data;\n\n $post->data = $this->textFilter->parse($text, $filter);\n\n if ($post->deleted) {\n unset($res[$key]);\n }\n }\n\n return $res;\n }", "public function getAllPosts();", "public function getPosts()\n {\n # Using aliases here so we can use postID (or userID) in posts/index.php\n # (otherwise aliases are unnecessary)\n $this->db->query('SELECT *, \n posts.id as postID,\n users.id as userID,\n posts.created_at as postCreated,\n users.created_at as userCreated\n FROM posts\n INNER JOIN users\n ON posts.user_id = users.id\n ORDER BY posts.created_at DESC\n ');\n\n # Get array of results from resultSet() in DatabaseController\n $results = $this->db->resultSet();\n\n return $results;\n }", "protected function get_objects_from_query( $query ) {\n\n\t\treturn $query->posts;\n\n\t}", "public function getPosts() {\n\n $db = $this->dbConnect();\n $req = $db->query('SELECT ART_ID, ART_CHAPTER,ART_TITLE,ART_SUBTITLE,ART_CONTENT, DATE_FORMAT(DATE, \\'%d/%m/%Y à %Hh%imin%ss\\') AS DATE_fr,ART_DESCRIPTION,ART_KEYWORDS,ART_IMAGE FROM posts WHERE ART_DESACTIVE = 0 ORDER BY ART_CHAPTER DESC ');\n\n return $req;\n }", "public function getSearchPosts($q) \n {\n $postList = Post::where('title', 'LIKE', '%'.$q.'%') -> orWhere('description', 'LIKE', '%'.$q.'%') ->where('deleted_user_id', null) -> get();\n return $postList;\n }", "public function loadPosts() {\n $this->db->query('SELECT posts.*, bloggers.blogger_name FROM posts INNER JOIN bloggers ON bloggers.blogger_id = posts.blogger_id ORDER BY created_on DESC');\n $results = $this->db->resultSet();\n\n return $results;\n\n }", "public function getPosts() {\n\t\t$select = $this->select()->from($this->_name)->order(array('created DESC'))->distinct();\n\t\treturn $this->fetchAll($select);\n\t}", "public function getPosts()\r\n {\r\n $db = $this->dbConnect();\r\n $req = $db->query('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') \r\nAS creation_date_fr, pseudo, chapo FROM posts ORDER BY creation_date DESC LIMIT 0, 5');\r\n\r\n return $req;\r\n }", "public function index()\n {\n $sorter = request('sorter', null);\n $order = request('order', null);\n $search = request('search', false);\n if ($search) {\n return PostService::searchPost($sorter, $order, $search);\n }\n return PostService::getPosts($sorter, $order);\n }", "public static function getAllPosts() {\n $db = new MySqlTranslator();\n\n try {\n $db->query('SELECT *,\n `posts`.id as postId,\n `user`.id as userId,\n `posts`.created_at as postCreated\n FROM `posts`\n INNER JOIN `user`\n ON posts.user_uuid = `user`.user_uuid AND posts.active_flag = ' . TRUE . '\n ORDER BY `posts`.created_at DESC\n ');\n\n $results = $db->resultSet();\n return $results;\n } catch (PDOException $_e) {\n echo $_e->getMessage();\n return false;\n }\n }", "public function getPosts()\n {\n $db = $this->dbConnect();\n $req = $db->query('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts ORDER BY creation_date DESC LIMIT 0, 5');\n\n return $req;\n }", "public function allPosts() {\n \n $this->query_exec( 'SELECT post_title, post_content, meta_image.meta_value, guid FROM wpyy_posts posts ' .\n 'INNER JOIN wpyy_postmeta hold ON posts.ID = hold.post_id AND hold.meta_key = \"_thumbnail_id\" ' . \n 'INNER JOIN wpyy_postmeta meta_image ON hold.meta_value = meta_image.post_id AND meta_image.meta_key = \"_wp_attached_file\" ' .\n 'WHERE ping_status = \"Open\" AND post_status = \"publish\"' );\n \n return $this->posts;\n }", "function get_all_posts() {\n $result = parent::query(\"SELECT * FROM posts\");\n \n // Vis fejl hvis blog indlæg ikke kunne hentes\n if (!$result) {\n die('Blog indlæg kunne ikke hentes: ' . mysql_error());\n }\n \n $posts = array();\n\n while($row = mysql_fetch_array($result)) {\n \n // Lav et Post object ud af MySQL row resultatet\n $post = $this->build_post($row);\n \n // Tilføj det nye post til listen\n array_push($posts, $post);\n } \n \n return $posts;\n }", "protected function fetchAllPosts() {\n return $this->makeGetRequest('http://jsonplaceholder.typicode.com/posts');\n }", "function get_all_post(){\n $sql= \"SELECT * FROM post\";\n return $this->query($sql);\n}", "protected function posts()\n {\n // If Rainlab.Translate is not installed or we are currently,\n // using the default locale we simply query the default table.\n $translator = $this->translator();\n if ( ! $translator || $translator->getDefaultLocale() === $translator->getLocale()) {\n return $this->postsFromDefaultLocale();\n }\n\n // If Rainlab.Translate is available we also have to\n // query the rainlab_translate_attributes table for translated\n // contents since the title and content attributes on the Post\n // model are not indexed.\n return $this->postsFromCurrentLocale();\n }", "function getPosts (Request $request) {\n $offset = $request->get('offset', 0);\n $limit = $request->get('limit', 10);\n $order = $request->get('order_by', 'created_at');\n $by = $request->get('by', 'DESC');\n $user = $this->verifyAuth($request);\n\n return $this->listPost($offset, $limit, $order, $by, $user);\n }", "public function getPosts() {\r\n $posts = [];\r\n $sql = 'SELECT BIL_ID as id, BIL_DATE as date, BIL_TITLE as title, BIL_CONTENT as content '\r\n . 'FROM T_POST '\r\n . 'ORDER BY BIL_ID DESC LIMIT 0,5';\r\n $req = $this->executeRequest($sql);\r\n while ($data = $req->fetch(PDO::FETCH_ASSOC)) {\r\n $posts[] = new Post($data);\r\n }\r\n return $posts;\r\n }", "public function posts(Request $request) \n\t{\n\t\t$posts = Post::where(function($q) use($request){\n\t\t\tif($request->has('category_id')){ //dropdown\n\t\t\t\t$q->where('category_id', $request->category_id);\n\t\t\t}\n\n\t\t\tif($request->has('keyword')){ //search\n\t\t\t\t$q->where(function($q) use($request){\n\t\t\t\t\t$q->where('title', 'like', '%'.$request->keyword.'%');\n\n\t\t\t\t\t$q->orWhere('content', 'like', '%'.$request->keyword.'%');\n\t\t\t\t});\n\t\t\t}\n\t\t})->paginate(5);\n\n\n\t\treturn apiResponse(1, 'dd', $posts);\n\n\t}", "public function getPosts()\n {\n $req = $this->getDataBase()->prepare(' SELECT id, title, content, category, DATE_FORMAT(creation_date, \\'%d/%m/%Y <em>à</em> %Hh%imin\\') AS creation_date FROM posts ');\n $req->execute();\n $posts = [];\n while($data = $req->fetch(PDO::FETCH_ASSOC)) {\n $posts[] = $this->hydrate($data);\n }\n $req->closeCursor();\n \n return $posts;\n }", "public function findPosts()\n {\n return $this->repository->findAll();\n }", "public static function getAllPosts() {\r\n $db = DBContext::getDB();\r\n $query = \"SELECT summary,companyName,companyEmail,Posts.id as id , title , date , post, username , user.id as userid FROM Posts INNER JOIN user ON Posts.user_id = user.id ORDER BY DATE DESC \";\r\n $result = $db->query($query);\r\n $posts = array();\r\n foreach ($result as $row) {\r\n $post = new Post($row['title'], $row['post'], $row['date'], $row['userid'], $row['summary'], $row['companyName'], $row['companyEmail']);\r\n $post->setID($row['id']);\r\n $post->setUsername($row['username']);\r\n $posts[] = $post;\r\n }\r\n return $posts;\r\n }", "public static function get_posts( &$query ) {\n\t\tif( $query->query_vars['post_type'] === static::$post_type ) {\n\t\t\t$query->set('orderby', 'title');\n\t\t\t$query->set('order', 'desc');\n\t\t}//end if\n\t}", "public function getPosts()\n {\n $this->_searchCriteriaBuilder->setCurrentPage(1);\n $this->_searchCriteriaBuilder->setPageSize(10);\n $searchCriteria = $this->_searchCriteriaBuilder->create();\n\n return $this->_repositoryInterface->getList($searchCriteria);\n }", "public function getPosts(){\n $this->db->query(\"SELECT *, \n u.id as userId,\n p.id as postId,\n p.created_at as postDate, \n u.created_at as userDate\n FROM\n users u\n INNER JOIN posts p ON\n u.id = p.user_id\n ORDER BY p.created_at DESC\" );\n return $this->db->resultSet();\n }", "function get_users_all_posts(){\n return query(\"SELECT * FROM posts WHERE user_id = \". loggedInUserId() .\"\");\n}", "private function posts_query_build_by()\n {\n return $this->post_model::with([\n 'tags',\n 'user' => function ($query){\n $query->select(\n 'id',\n 'name',\n 'username'\n );\n },\n 'category' => function ($query){\n $query->select(\n 'id',\n 'name'\n );\n },\n 'media' => function ($query){\n $query->select(\n 'id',\n 'file_name',\n 'post_id'\n );\n },\n ])->withCount(\n 'approved_comments'\n )->typePost()->active()->selection()->orderDesc();\n }", "public function findAllPosts() {\r\n $sql = 'SELECT * FROM news ORDER BY create_time DESC';\r\n $stmt = $this->db->connect()->query($sql);\r\n $results = $stmt->fetchAll();\r\n \r\n return $results;\r\n }", "public function get_posts(){\n$all_posts = post::get(['id', 'title','category_id', 'user_id', 'image', 'content', 'created_at','status']);;\nreturn $all_posts;\n}", "public function get_posts() {\n\t\t$this->db->order_by( \"post_timestamp\", \"desc\" );\n\t\t$query = $this->db->get( $this::POSTS_TABLE );\n\n\t\treturn $query->result();\n\t}", "public function query_posts()\n {\n }", "public function query()\n {\n return PostDecontaminatorModel::query();\n }", "function getAllUserPosts()\n{\n return query(\"SELECT * FROM posts WHERE post_user_id=\" . loginUserId() . \"\");\n}", "public function getAllPosts() {\n return $this->all();\n }", "private function posts_query_build()\n {\n return $this->post_model::with([\n 'tags',\n 'user' => function ($query){\n $query->select(\n 'id',\n 'name',\n 'username'\n );\n },\n 'media' => function ($query){\n $query->select(\n 'id',\n 'file_name',\n 'post_id'\n );\n }\n ])->withCount('media')->whereHas('category', function ($query){\n $query->active();\n })->whereHas('user', function ($query){\n $query->active();\n })->typePost()->active()->selection()->orderDesc();\n }", "public function get_posts(array $args = array()) {\n global $db, $system;\n /* initialize vars */\n $posts = array();\n /* validate arguments */\n $get = !isset($args['get']) ? 'newsfeed' : $args['get'];\n $filter = !isset($args['filter']) ? 'all' : $args['filter'];\n $valid['filter'] = array('all', '', 'photos', 'video', 'audio', 'file', 'map');\n if(!in_array($filter, $valid['filter'])) {\n _error(400);\n }\n $last_post_id = !isset($args['last_post_id']) ? null : $args['last_post_id'];\n if(isset($args['last_post']) && !is_numeric($args['last_post'])) {\n _error(400);\n }\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n $offset *= $system['max_results'];\n if(isset($args['query'])) {\n if(is_empty($args['query'])) {\n return $posts;\n } else {\n $query = secure($args['query'], 'search', false);\n }\n }\n $order_query = \"ORDER BY posts.post_id DESC\";\n $where_query = \"\";\n /* get postsc */\n switch ($get) {\n case 'newsfeed':\n if(!$this->_logged_in && $query) {\n $where_query .= \"WHERE (\";\n $where_query .= \"(posts.text LIKE $query)\";\n /* get only public posts [except: wall posts & group posts] */\n $where_query .= \" AND (posts.in_group = '0' AND posts.in_wall = '0' AND posts.privacy = 'public')\";\n $where_query .= \")\";\n } else {\n /* get viewer user's newsfeed */\n $where_query .= \"WHERE (\";\n /* get viewer posts */\n $me = $this->_data['user_id'];\n $where_query .= \"(posts.user_id = $me AND posts.user_type = 'user')\";\n /* get posts from friends still followed */\n $friends_ids = array_intersect($this->_data['friends_ids'], $this->_data['followings_ids']);\n if(count($friends_ids) > 0) {\n $friends_list = implode(',',$friends_ids);\n /* viewer friends posts -> authors */\n $where_query .= \" OR (posts.user_id IN ($friends_list) AND posts.user_type = 'user' AND posts.privacy = 'friends' AND posts.in_group = '0')\";\n /* viewer friends posts -> their wall posts */\n $where_query .= \" OR (posts.in_wall = '1' AND posts.wall_id IN ($friends_list) AND posts.user_type = 'user' AND posts.privacy = 'friends')\";\n }\n /* get posts from followings */\n if(count($this->_data['followings_ids']) > 0) {\n $followings_list = implode(',',$this->_data['followings_ids']);\n /* viewer followings posts -> authors */\n $where_query .= \" OR (posts.user_id IN ($followings_list) AND posts.user_type = 'user' AND posts.privacy = 'public' AND posts.in_group = '0')\";\n /* viewer followings posts -> their wall posts */\n $where_query .= \" OR (posts.in_wall = '1' AND posts.wall_id IN ($followings_list) AND posts.user_type = 'user' AND posts.privacy = 'public')\";\n }\n /* get pages posts */\n $pages_ids = $this->get_pages_ids();\n if(count($pages_ids) > 0) {\n $pages_list = implode(',',$pages_ids);\n $where_query .= \" OR (posts.user_id IN ($pages_list) AND posts.user_type = 'page')\";\n }\n /* get groups posts */\n $groups_ids = $this->get_groups_ids();\n if(count($groups_ids) > 0) {\n $groups_list = implode(',',$groups_ids);\n $where_query .= \" OR (posts.group_id IN ($groups_list) AND posts.in_group = '1' AND posts.user_id != $me)\";\n }\n $where_query .= \")\";\n if($query) {\n $where_query .= \" AND (posts.text LIKE $query)\";\n }\n }\n break;\n\n case 'posts_profile':\n if(isset($args['id']) && !is_numeric($args['id'])) {\n _error(400);\n }\n $id = $args['id'];\n /* get target user's posts */\n /* check if there is a viewer user */\n if($this->_logged_in) {\n /* check if the target user is the viewer */\n if($id == $this->_data['user_id']) {\n /* get all posts */\n $where_query .= \"WHERE (\";\n /* get all target posts */\n $where_query .= \"(posts.user_id = $id AND posts.user_type = 'user')\";\n /* get taget wall posts */\n $where_query .= \" OR (posts.wall_id = $id AND posts.in_wall = '1')\";\n $where_query .= \")\";\n } else {\n /* check if the viewer & the target user are friends */\n if(in_array($id, $this->_data['friends_ids'])) {\n $where_query .= \"WHERE (\";\n /* get all target posts [except: group posts] */\n $where_query .= \"(posts.user_id = $id AND posts.user_type = 'user' AND posts.in_group = '0' AND posts.privacy != 'me' )\";\n /* get taget wall posts */\n $where_query .= \" OR (posts.wall_id = $id AND posts.in_wall = '1')\";\n $where_query .= \")\";\n } else {\n /* get only public posts [except: wall posts & group posts] */\n $where_query .= \"WHERE (posts.user_id = $id AND posts.user_type = 'user' AND posts.in_group = '0' AND posts.in_wall = '0' AND posts.privacy = 'public')\";\n }\n }\n } else {\n /* get only public posts [except: wall posts & group posts] */\n $where_query .= \"WHERE (posts.user_id = $id AND posts.user_type = 'user' AND posts.in_group = '0' AND posts.in_wall = '0' AND posts.privacy = 'public')\";\n }\n break;\n\n case 'posts_page':\n if(isset($args['id']) && !is_numeric($args['id'])) {\n _error(400);\n }\n $id = $args['id'];\n $where_query .= \"WHERE (posts.user_id = $id AND posts.user_type = 'page')\";\n break;\n\n case 'posts_group':\n if(isset($args['id']) && !is_numeric($args['id'])) {\n _error(400);\n }\n $id = $args['id'];\n $where_query .= \"WHERE (posts.group_id = $id AND posts.in_group = '1')\";\n break;\n\n case 'saved':\n $id = $this->_data['user_id'];\n $where_query .= \"INNER JOIN posts_saved ON posts.post_id = posts_saved.post_id WHERE (posts_saved.user_id = $id)\";\n $order_query = \"ORDER BY posts_saved.time DESC\";\n break;\n\n default:\n _error(400);\n break;\n }\n /* get his hidden posts to exclude from newsfeed */\n $hidden_posts = $this->_get_hidden_posts($this->_data['user_id']);\n if(count($hidden_posts) > 0) {\n $hidden_posts_list = implode(',',$hidden_posts);\n $where_query .= \" AND (posts.post_id NOT IN ($hidden_posts_list))\";\n }\n /* filter posts */\n if($filter != \"all\") {\n $where_query .= \" AND (posts.post_type = '$filter')\";\n }\n /* get posts */\n if($last_post_id != null && $get != 'saved') {\n $get_posts = $db->query(sprintf(\"SELECT * FROM (SELECT posts.post_id FROM posts \".$where_query.\") posts WHERE posts.post_id > %s ORDER BY posts.post_id DESC\", secure($last_post_id, 'int') )) or _error(SQL_ERROR_THROWEN);\n } else {\n $get_posts = $db->query(sprintf(\"SELECT posts.post_id FROM posts \".$where_query.\" \".$order_query.\" LIMIT %s, %s\", secure($offset, 'int', false), secure($system['max_results'], 'int', false) )) or _error(SQL_ERROR_THROWEN);\n }\n if($get_posts->num_rows > 0) {\n while($post = $get_posts->fetch_assoc()) {\n $post = $this->get_post($post['post_id'], true, true); /* $full_details = true, $pass_privacy_check = true */\n if($post) {\n $posts[] = $post;\n }\n }\n }\n return $posts;\n }", "public function getPosts(): PostsCollection;", "function get_all_posts() {\n global $db;\n\n if(isset($_GET['q'])) {\n $keyword = $_GET['q'];\n } else {\n $keyword = false;\n }\n\n try {\n if($keyword) {\n $keyword = \"%$keyword%\";\n $result = $db->prepare(\"SELECT posts.title, posts.hash, posts.created_at, posts.feature, users.author, users.photo FROM posts LEFT JOIN users ON posts.user_id = users.id WHERE posts.title LIKE :keyword OR posts.body LIKE :keyword ORDER BY posts.created_at DESC\");\n $result->execute([':keyword' => $keyword]);\n } else {\n $result = $db->query(\"SELECT posts.title, posts.hash, posts.created_at, posts.feature, users.author, users.photo FROM posts LEFT JOIN users ON posts.user_id = users.id ORDER BY posts.created_at DESC\");\n }\n\n if(!$result->rowCount()) {\n error(\"ရလဒ်မရှိပါ\");\n }\n\n $rows = [];\n while($row = $result->fetch(PDO::FETCH_ASSOC)) {\n $rows[] = $row;\n }\n\n echo json_encode($rows);\n } catch (PDOException $e) {\n error($e->getMessage());\n }\n}", "function getPosts($id, $page, $per_page = POST_RESULTS_PER_PAGE) {\n global $MYSQL;\n \n $start = (int)($page - 1) * $per_page;\n $per_page = (int)$per_page;\n \n\t $data = array($id);\n $query = $MYSQL->rawQuery(\"SELECT * FROM\n {prefix}forum_posts\n WHERE\n post_type = 2\n AND\n origin_thread = ?\n ORDER BY\n post_time\n ASC LIMIT\n {$start}, {$per_page}\", $data);\n return $query;\n }", "public function getPosts()\n {\n // Connexion à la base de données\n $newManager = new Manager();\n $db = $newManager->dbConnect();\n // Requête\n $request = $db->prepare('SELECT id, author, title, content, DATE_FORMAT(added_datetime, \\'le %d/%m/%Y à %Hh%i\\') AS added_datetime_fr, DATE_FORMAT(updated_datetime, \\'le %d/%m/%Y à %Hh%i\\') AS updated_datetime_fr FROM posts');\n // Résultat\n $request->execute(array());\n $result = $request->fetchAll();\n $posts = [];\n foreach ($result as $post) {\n $newPost = new Post($post['id'], $post['author'], $post['title'], $post['content'], $post['added_datetime_fr'], $post['updated_datetime_fr']);\n $posts[] = $newPost;\n }\n return $posts;\n }", "public function populatePosts(){\n\t\t$result = $this->query(\" anax_post.id, anax_post.title, anax_post.content, anax_post.created, anax_post.points, anax_user.username, anax_user.email, anax_user.id as user_id\", \"post\")\n \t\t->where('parent_post IS NULL')\n \t\t->orderBy('created DESC')\n\t ->join('user', 'anax_post.created_by_user = anax_user.id')\n\t ->execute();\n\n\t foreach ($result as $post) {\n\t \t$post->answers = count( $this->fetchAnswers($post->id) );\n\t \t$post->tags = $this->fetchTags($post->id);\n\t }\n\n\t return $result;\n\t}", "public function posts()\n {\n $uids = Array(); \n foreach($this->following as $f) {\n $uids[] = $f->user_id;\n }\n if(empty($uids)) {\n return Array();\n }\n $uids_sql = join(',', $uids);\n $sql = <<<END_SQL\n select posts.created, posts.text, users.user_id, users.first_name, users.last_name\n from posts\n inner join users on users.user_id=posts.user_id\n where posts.user_id in ($uids_sql)\n order by created desc\nEND_SQL;\n $posts = DB::instance(DB_NAME)->select_rows($sql, \"object\");\n return $posts;\n }", "protected function postsFromDefaultLocale()\n {\n return $this->defaultModelQuery()\n ->where(function ($query) {\n $query->where('title', 'like', \"%{$this->query}%\")\n ->orWhere('content', 'like', \"%{$this->query}%\")\n ->orWhere('excerpt', 'like', \"%{$this->query}%\");\n })\n ->get();\n }", "public function list(){\n $post = Post::paginate(10);\n\n return PostResource::collection($post);\n }", "public function get_posts( $args = array() ) {\n\t\t$args = wp_parse_args( $args, array(\n\t\t\t'count' => 25,\n\t\t) );\n\n\t\tadd_filter( 'posts_clauses', array( $this, 'filter_sql' ), 10, 2 );\n\n\t\t$query = new WP_Query( array(\n\t\t\t'new_post_format_unmigrator' => 1, // This tells the SQL filter to modify this query\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'post_format',\n\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t'terms' => array( 'post-format-image', 'post-format-link', 'post-format-video', 'post-format-audio', 'post-format-quote' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'posts_per_page' => $args['count'],\n\t\t\t'orderby' => 'ID',\n\t\t\t'order' => 'ASC',\n\t\t) );\n\n\t\tremove_filter( 'posts_clauses', array( $this, 'filter_sql' ), 10, 2 );\n\n\t\treturn $query;\n\t}", "public function getAllPosts() {\n\t\t\t$query = $this->pdo->query('SELECT * FROM posts');\n\t\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n \t\t}", "public function index(PostBuilder $query): PostCollection\n {\n return new PostCollection($query->paginate());\n }", "protected function postsFromCurrentLocale()\n {\n // First fetch all model ids with maching contents.\n $results = DB::table('rainlab_translate_attributes')\n ->where('locale', $this->currentLocale())\n ->where('model_type', Post::class)\n ->where('attribute_data', 'LIKE', \"%{$this->query}%\")\n ->get(['model_id']);\n\n $ids = collect($results)->pluck('model_id');\n\n // Then return all maching posts via Eloquent.\n return $this->defaultModelQuery()->whereIn('id', $ids)->get();\n }", "public static function query($post = 0){\n $q = new self();\n if($post){\n if($post instanceof PostModel){\n $q->post($post);\n }else{\n $q->postId($post);\n }\n }\n return $q;\n }", "public function posts(){\n return $posts = $postModel::all();\n }", "private function get_posts(): array {\n\t\treturn get_posts( $this->field->get_query_args() );\n\t}", "public function getPublishedPosts()\n\t{\n\t\t$sql = \"SELECT * FROM posts WHERE published = 1 ORDER BY created_at DESC LIMIT 6\";\n\t\treturn $this->findAll($sql, 'obj');\n\t}", "public function get_posts() {\n\n $this->request = '';\n\n\t $response = '';\n\t try{\n\t\t $response = ApplicationDispatcher::dispatch($this->requestUri);\n\t }catch (\\Exception $e){\n\t\t\tself::setIs404(true);\n\t }\n\n if(!self::getIs404()){\n $richPost = self::getPost();\n $post = $richPost->getWpPost();\n if($post && ($post instanceof \\WP_Post) && $post->ID!==null){\n $post = clone $post;\n }else{\n $post = (object)$richPost->packDbRecord();\n }\n $post->post_content = $response;\n $this->post = $post;\n $this->is_single = true;\n $this->posts = array($post);\n $this->post_count = 1;\n $this->queried_object = $post;\n $this->queried_object_id = $post->ID;\n }else{\n $this->is_single = false;\n $this->posts = array();\n $this->post_count = 0;\n $this->queried_object = null;\n $this->queried_object_id = 0;\n }\n $this->current_post = -1;\n\n return $this->posts;\n }", "public function searchPosts($id, $query) {\n return $this->repository->searchPosts($id, $query);\n }", "public function get_posts()\n {\n }", "public function selectPosts(){\n $sql = \"select * from poruke where status_poruke_id = 1 order by datum_poruke desc\";\n $query = $this->db->prepare($sql);\n $query->execute();\n $result = $query->fetchAll(PDO::FETCH_OBJ);\n \n return $result;\n }", "public function getAllPosts(){\n\t\t$sql = \"SELECT id,post_title AS name FROM wp_rtyz_posts WHERE post_status = \\\"publish\\\"\n\t\t AND post_parent = '0' AND post_type =\\\"post\\\"\";\n\t\t$query = $this->conn->prepare($sql);\n\t\t$query->execute();\n\t\t$query->store_result();\n\t\t$result = array();\n\t\t$data = array();\n\t\t$query->bind_result($result['id'],$result['name']);\n\n\t\twhile($query->fetch()){\n\t\t\t$data[] = $result;\n\t\t\t$result = array();\n\t\t\t$query->bind_result($result['id'],$result['name']);\n\t\t}\n\n\t\treturn $data;\n\t}", "function search_all_posts($bdd)\n {\n $reponse = $bdd->prepare('select p.title, p.content, p.id, p.id_aut, p.id_cat, a.firstname, a.username, c.name, p.created_date, p.file\n from posts as p \n inner join authors as a on p.id_aut = a.id \n inner join categories as c on p.id_cat =c.id');\n $reponse->execute();\n $list_post = array();\n while ($post = $reponse->fetch()) {\n \n $list_post[] = $post;\n }\n $reponse->closeCursor();\n return $list_post;\n \n }", "public function getPosts(){\n\t\t\t$sql = \n\t\t\t\t\"SELECT\n\t\t\t\t\tp.post_id,\n\t\t\t\t\tp.parent_id,\n\t\t\t\t\tp.post_name,\n\t\t\t\t\tp.post_content,\n\t\t\t\t\tp.user_id,\n\t\t\t\t\tp.created_at,\n\t\t\t\t\tu.user_name,\n\t\t\t\t\tcount(p2.post_id) as comments\n\t\t\t\tFROM\n\t\t\t\t\t`posts` AS p\n\t\t\t\tLEFT JOIN `users` AS u ON p.user_id = u.user_id\n\t\t\t\tLEFT JOIN `posts` AS p2 ON p.post_id = p2.parent_id\n\t\t\t\tWHERE p.parent_id = 0\n\t\t\t\tGROUP BY p.post_id\n\t\t\t\t\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->fetchAll();\n\t}", "public function query ($num, $args = [])\n {\n $request = [\n 'posts_per_page' => $num,\n 'offset' => 0,\n 'order' => 'DESC',\n 'orderby' => 'date_posted',\n 'post_type' => $this->postType,\n 'post_status' => 'publish',\n ];\n\n $request = array_merge($request, $args);\n $postArray = get_posts($request);\n\n $output = [];\n foreach($postArray as $post){\n $output[] = $this->fields($post);\n }\n return $output;\n }", "public function searchPosts() {\n\t\t$dataSearch = [\n\t\t\t'title' => $this->input->post('title'),\n\t\t\t'date' => $this->input->post('date'),\n\t\t\t'state' => $this->input->post('state'),\n\t\t];\n\n\t\t$posts = $this->home_model->getPosts($dataSearch);\n\t\t$data['posts'] = $posts;\n\t\t$this->load->view('common/tablePosts', $data);\n\t}", "public function getPosts($userId){\n global $db;\n $reqPosts = $db->fetch(\"\n SELECT * FROM post WHERE user_id = ?\n \",[$userId],true);\n return $reqPosts;\n }", "public function getResultPost($query, $quantity=10, $page=1)\n {\n $request = $this->genSearchWords($query);\n\n\n\n $sql = new DbQuery();\n $sql->select('(SELECT COUNT(*) FROM ps_simpleblog_post_lang WHERE MATCH (title, content) AGAINST(\"'.$request.'\" IN BOOLEAN MODE) +\n match(title, content) against (\"'.$query.'\") ) AS count, id_simpleblog_post');\n $sql->from('simpleblog_post_lang','l');\n $sql->where('MATCH (title, content) AGAINST(\"'.$request.'\" IN BOOLEAN MODE) + match(title, content) against (\"'.$query.'\")');\n $sql->orderBy('match(l.title) against (\"'.$request.'\" IN BOOLEAN MODE) desc, match(l.content) against (\"'.$request.'\" IN BOOLEAN MODE) desc,\n match(l.title,l.content) against (\"'.$query.'\" IN BOOLEAN MODE)');\n $sql->limit($quantity); // offset for pagination\n\n\n $posts = Db::getSearchInstance()->executeS($sql); // get IDs matching query\n\n if(!count($posts))\n {\n $total_posts = false;\n $blog_posts = false;\n }\n\n\n else\n {\n $total_posts = $posts[0]['count'];\n\n $id_lang = Context::getContext()->language->id;\n $ids = array();\n\n foreach ($posts as $no=> $val) {\n /// get posts by id\n $ids[] = $val['id_simpleblog_post'];\n }\n\n $blog_posts = SimpleBlogPost::getPosts($id_lang,$quantity,null,null,true,false,false,null,false,false,null,'in',$ids);\n }\n\n\n $blog_posts_pagination[0] = $blog_posts;\n $blog_posts_pagination[1] = false;\n $blog_posts_pagination[2] = $total_posts;\n\n return $blog_posts_pagination;\n\n }", "public function query(Request $request){\n $query = $request->input('search');;\n // Returns an array of articles that have the query string located somewhere within\n // our articles titles. Paginates them so we can break up lots of search results.\n $posts=Post::where('title', 'LIKE', '%' . $query . '%')->orWhere('body','LIKE','%'.$query.'%')->paginate(10);\n $newposts=Post::orderBy('id','desc')->paginate(5);\n /*$posts=Post::orderBy('id','desc')->paginate(3);*/\n\n // returns a view and passes the view the list of articles and the original query.\n return view('posts.index', compact('posts', 'newposts'));\n }", "public function index(Request $request)\n {\n $posts = new Post;\n\n $request_append = [];\n\n if($request->has('q')) {\n\n $query_string = $request->input('q');\n\n $request_append['q'] = $query_string;\n\n $posts = $posts->where('excerpt', 'LIKE', '%' . $query_string . '%')\n ->orWhere('title', 'LIKE', '%' . $query_string . '%')\n ->orWhere('body', 'LIKE', '%' . $query_string . '%');\n }\n\n if($request->has('category')) {\n\n $category = Category::where('slug', $request->input('category'))->get();\n $posts = $posts->where('category_id', $category->id);\n\n }\n\n\n $posts = $posts->orderBy('id', 'asc')->paginate(env('USER_LIST_PAGINATION_SIZE'))->appends($request_append);\n\n $data = [\n 'posts' => $posts,\n 'categories' => Category::distinct()->get(),\n ];\n\n return view('posts.show-posts')->with($data);\n }", "public function search()\n {\n if ( ! $this->isInstalledAndEnabled()) {\n return $this;\n }\n\n foreach ($this->posts() as $post) {\n // Make this result more relevant, if the query is found in the title\n $relevance = mb_stripos($post->title, $this->query) === false ? 1 : 2;\n\n if ($relevance > 1 && $post->published_at) {\n // Make sure that `published_at` is a Carbon object\n $publishedAt = $post->published_at;\n if (is_string($publishedAt)) {\n try {\n $publishedAt = Carbon::parse($publishedAt);\n } catch (Throwable $e) {\n // If parsing fails use the current date.\n $publishedAt = Carbon::now();\n }\n }\n $relevance -= $this->getAgePenalty($publishedAt->diffInDays(Carbon::now()));\n }\n\n $result = new Result($this->query, $relevance);\n $result->title = $post->title;\n $result->text = $post->summary;\n $result->meta = $post->created_at;\n $result->model = $post;\n\n // Maintain compatibility with old setting\n if (Settings::get('rainlab_blog_page') !== null) {\n $result->url = $post->setUrl(Settings::get('rainlab_blog_page', ''), $this->controller);\n } else {\n $result->url = $this->getUrl($post);\n }\n\n $result->thumb = $this->getThumb($post->featured_images);\n\n $this->addResult($result);\n }\n\n return $this;\n }", "public function getPosts()\n\t\t{\n\t\t\t/*\n\t\t\t$post = array(\n\t\t\t\t\"id\" => 1,\n\t\t\t\t\"titulo\" => \"Titulo post\",\n\t\t\t\t\"cuerpo\" => \"Cuerpo post\"\n\t\t\t);\n\t\t\treturn $post;\n\t\t\t*/\n\n\t\t\t$post = $this->_bd->query(\"Select * FROM post;\");\n\t\t\t//$post = $this->_bd->query(\"TRUNCATE TABLE post;\");\n\t\t\treturn $post->fetchall();\n\t\t}", "public static function query($args = null)\n {\n $args = is_array($args) ? $args : [];\n\n // Set the correct post type\n $args = array_merge($args, ['post_type' => static::$postType]);\n\n if (!isset($args['post_status'])) {\n $args['post_status'] = 'publish';\n }\n\n return static::posts($args);\n }", "public function getPosts() :array\n {\n $sql =\"SELECT post.id, post.user_id, post.title, post.post, post.creation_date, user.pseudo FROM posts post INNER JOIN users user ON user.id = post.user_id ORDER BY post.id DESC\";\n \n return $this->queryAllFetchClass($sql, SELF::ENTITY_CLASSNAME);\n }", "public static function get_posts( &$query ) {\n\t\tif( $query->query_vars['post_type'] === static::$post_type ) {\n\t\t\t$query->set('orderby', $_GET['orderby'] ?: 'menu_order');\n\t\t\t$query->set('order', $_GET['order'] ?: 'asc');\n\t\t}//end if\n\t}", "function getPublishedposts() {\n\tglobal $conn;\n\t//\"SELECT * FROM posts WHERE published=1\"\n\n\t$sql =\"SELECT p.*, u.username FROM posts AS p JOIN users AS u ON p.user_id=u.id WHERE p.published=? \";//this query selects from 2 tables\n\t$stmt = executeQuery($sql, ['published' => 1]);//we decided to put the condtions here\n\t$records = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n\treturn $records;\n}", "public function fetchPosts()\n {\n $sources = ( ! is_array($this->config['source']))\n ? [$this->config['source']]\n : $this->config['source'];\n $validSources = [];\n\n foreach ($sources as $gistSource) {\n $source = $this->getGist($gistSource);\n\n if ($source) {\n $validSources[] = $source;\n }\n }\n\n if ( ! $validSources) {\n return;\n }\n\n foreach ($validSources as $sourceGists) {\n $this->getSourcePosts($sourceGists);\n }\n\n return $this->posts;\n }", "public function index($post)\n {\n return $this->sendResponse(Post::with(['author'])->where('post_type', 'like', `%${$post}%`)->where('post_status', '<>', 'draft')->where('post_status', '<>', 'auto-draft')->where('post_status', '<>', 'wc-completed')->where('post_status', '<>', 'wc-on-hold')->where('post_status', '<>', 'trash')->get(), \"Successfully retrieved all posts\");\n }", "public function getPostsShowcase()\n {\n $req = $this->getDataBase()->prepare(' SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y <em>à</em> %Hh%imin\\') AS creation_date FROM posts WHERE category = \"showcase\" ');\n $req->execute();\n $posts = [];\n while($data = $req->fetch(PDO::FETCH_ASSOC)) {\n $posts[] = $this->hydrate($data);\n }\n $req->closeCursor();\n \n return $posts;\n }", "public function search(Request $request)\n {\n $query = $request->query('query');\n if ($query) {\n $posts = Post::where('title', 'LIKE', '%' . $query . '%')\n ->orWhere('body', 'LIKE', '%' . $query . '%')\n ->with('user')\n ->withCount('comments')\n ->paginate(5);\n\n $posts->getCollection()\n ->transform(function ($post) {\n $post->setAttribute('added_at', $post->created_at->diffForHumans());\n return $post;\n });\n return response()->json($posts);\n } else {\n return response()->json([\n 'error' => 'No search query provided!'\n ], 400);\n }\n }", "public static function posts()\n {\n return static::find(Config::meta('posts_page'));\n }", "public function getPosts(){\n \n $db = $this->connectDb();\n\n $req = $db->query('SELECT id, titre, contenu, DATE_FORMAT(date_creation, \\'%d/%m/%Y à %Hh%imin%ss\\') AS date_creation_fr \n FROM billets \n ORDER BY date_creation \n DESC LIMIT 0, 5');\n\n return $req;\n }", "public function getPostsByUser()\n\t{ \n $this->load->model('post/Taxonomy_model');\n \n\t\t$type = $this->getAttribute('type', 'all');\n\t\t$status = $this->getAttribute('status', 'all');\n\t\t$posts = $this->Post_model->getPosts($type, 'loop', $status, 10, 0, 'id', 'desc', 'array', $this->uri->segment(2));\n\t\t\n\t\treturn ['posts' => $posts];\n }", "function posts() {\n\t\tglobal $connection;\n\t\tglobal $pagenumber;\n\t\tglobal $lastpage;\n\t\tglobal $postsperpage;\n\t\t$postsperpage = '10';\n\t\t$lastpage = ceil(countposts()/$postsperpage);\n\n\t\t// LAST PAGE CANT BE LESS THAN 1\n\t\tif($lastpage < 1){\n\t\t\t$lastpage = 1;\n\t\t}\n\t\t\n\t\t// PAGE NUMBER VARIABLE\n\t\t$pagenumber = 1;\n\n\t\t// GET PAGE NUMBER FROM URL\n\t\tif(isset($_GET['page'])){\n\t\t\t$pagenumber = preg_replace('#[^0-9]#', '', $_GET['page']);\n\t\t}\n\n\t\t// PAGE CANT BE BELOW 1 OR MORE THAN THE LAST PAGE\n\t\tif ($pagenumber < 1) { \n\t\t\t$pagenumber = 1; \n\t\t} else if ($pagenumber > $lastpage) { \n\t\t\t$pagenumber = $lastpage; \n\t\t}\n\t\t\n\t\t$limit = 'LIMIT ' .($pagenumber - 1) * $postsperpage .',' .$postsperpage;\n\t\t$posts = \"SELECT a.*, b.title as categorytitle FROM posts a LEFT OUTER JOIN categories b ON a.category_id = b.id ORDER BY a.id DESC $limit\";\n\t\t$posts = mysqli_query($connection, $posts);\n\t\treturn $posts;\n\t}", "function get_posts($pageid=-1, $post_limit=-1, $uid=-1, $post_id=-1, $post_status=\"published\") {\n\t$get_post_query = \"SELECT * FROM \".ALL_POST_TABLE.\" WHERE \".POST_STATUS.\"='$post_status' \";\n\n\tif($uid!=-1)\n\t\t$get_post_query .= \"AND \".POST_USER_ID.\"= $uid \";\n\tif($post_id!=-1)\n\t\t$get_post_query .= \"AND \".POST_ID.\"= $post_id \";\n\n\tif($pageid != -1 && $post_limit != -1){\n\t\t$pageid = ($pageid-1) * $post_limit;\n\t\t$get_post_query .= \"ORDER BY \".POST_TIME.\" DESC LIMIT $pageid,$post_limit \";\n\t}\n\n\t//echo $get_post_query.\"<br>\";\n\n\t//$data = $GLOBALS['conn']->query($get_post_query);\n\n\treturn $GLOBALS['conn']->query($get_post_query);\n}", "function GetPosts($type, $options=[])\n{\n $args = array (\n 'post_type' => $type,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'caller_get_posts' => 1,\n );\n\n // The Query\n return new WP_Query( array_merge($args, $options) );\n}", "public function cst_featured_content_get_posts() {\n\n\t\tif ( ! wp_verify_nonce( $_GET['nonce'], 'cst-featured-content-widget' )\n\t\t\t|| ! current_user_can( 'edit_others_posts' ) ) {\n\t\t\twp_send_json_error();\n\t\t}\n\n\t\t$term = sanitize_text_field( $_GET['searchTerm'] );\n\n\t\t$search_args = array(\n\t\t\t\t\t\t\t\t'post_type' => CST()->get_post_types(),\n\t\t\t\t\t\t\t\t's'\t\t\t\t\t => $term,\n\t\t\t\t\t\t\t);\n\t\t$search_query = new WP_Query( $search_args );\n\n\t\t$returning = array();\n\t\t$posts = array();\n\n\t\tif ( $search_query->have_posts() ):\n\n\t\t\t\twhile( $search_query->have_posts() ) : $search_query->the_post();\n\t\t\t\t\t$obj = \\CST\\Objects\\Post::get_by_post_id( get_the_ID() );\n\t\t\t\t\tif($obj) {\n\t\t\t\t\t\t$content_type = str_replace( 'cst_', '', $obj->get_post_type() );\n\t\t\t\t\t\t$posts['id'] = $obj->get_id();\n\t\t\t\t\t\t$posts['text'] = $obj->get_title() . ' [' . $content_type . ']';\n\t\t\t\t\t\tarray_push( $returning, $posts );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tendwhile;\n\t\tendif;\n\n\t\techo json_encode($returning);\n\t\texit();\n\t\t\n\t}", "static function getPosts($where = null) {\r\n\t\t$resultat = getDB ()->query ( \"SELECT * FROM posts ORDER BY post_date desc \" . ($where != null ? $where : \"\") . \";\" );\r\n\t\t$posts = array ();\r\n\t\twhile ( $post = $resultat->fetchObject ( 'Post' ) ) {\r\n\t\t\t$posts [] = $post;\r\n\t\t}\r\n\t\treturn $posts;\r\n\t}", "public function handle_get_posts($posts, $query)\n {\n }", "public function getAllPosts() {\n\n $data = Post::all();\n\n return $data;\n }", "public function query_posts() {\n\t\tglobal $wp_the_query;\n\t\t$this->build_query_string();\n\t\t$wp_the_query->query($this->query_vars);\n \t}", "public function index()\n {\n $posts = Post::latest()->when(request()->q, function($posts) {\n $posts = $posts->where('title', 'like', '%'. request()->q . '%');\n })->paginate(10);\n\n return view('admin.posts.index', compact('posts'));\n }", "function getSearchPost($value)\n {\n// $result->bind_param(\"s\", $value);\n// $result->execute();\n// $posts = $result->get_result()->fetch_all(MYSQLI_ASSOC);\n// $result->close();\n// return $posts;\n\n $result = $this->conn->query(\"SELECT * FROM `posts` WHERE `title` LIKE '%$value%'\");\n $posts = array();\n while ($item = mysqli_fetch_assoc($result)) {\n $posts[] = $item;\n }\n return $posts;\n }", "function get_posts()\n {\n include '../database.php';\n $post_id = $_GET['id'];\n $prepare = $pdo->prepare('SELECT * FROM posts WHERE post_id = :post_id');\n $prepare->bindValue('post_id', $post_id);\n $prepare->execute();\n global $post;\n $post = $prepare->fetch();\n }", "function getAllPost()\n {\n $result = $this->conn->prepare(\"SELECT * FROM posts\");\n $result->execute();\n $posts = $result->get_result()->fetch_all(MYSQLI_ASSOC);\n $result->close();\n return $posts;\n }" ]
[ "0.7606111", "0.7365062", "0.7318926", "0.72645265", "0.71599674", "0.71476", "0.7076496", "0.70121497", "0.698732", "0.69674635", "0.6952175", "0.6878908", "0.6859318", "0.68543833", "0.68262297", "0.6821471", "0.6820357", "0.6817386", "0.6798142", "0.6790972", "0.67737246", "0.6733504", "0.6712527", "0.6697817", "0.66972256", "0.6690066", "0.6680403", "0.66673964", "0.66434366", "0.6639493", "0.6609453", "0.6597124", "0.6595173", "0.65869683", "0.6559694", "0.65581965", "0.6557791", "0.65567315", "0.655609", "0.6552663", "0.65434307", "0.65381557", "0.653521", "0.65323824", "0.65289503", "0.65277046", "0.65121907", "0.6511764", "0.6510635", "0.6504901", "0.65029246", "0.64983964", "0.649705", "0.64936465", "0.6490453", "0.6488467", "0.6487962", "0.648413", "0.6465419", "0.6463343", "0.6451643", "0.64448947", "0.6418076", "0.6399604", "0.63963544", "0.6381874", "0.6372257", "0.63697565", "0.6364859", "0.63583297", "0.6354262", "0.63476163", "0.63433194", "0.6341307", "0.6340864", "0.6336523", "0.63333845", "0.6330066", "0.6325738", "0.6320913", "0.6319552", "0.6314705", "0.6300041", "0.6299651", "0.62940574", "0.6286484", "0.6279724", "0.6273819", "0.626783", "0.6262401", "0.62548286", "0.6252561", "0.6249785", "0.62493765", "0.62484264", "0.62366515", "0.62366414", "0.6234683", "0.6230112", "0.62266207" ]
0.7925112
0
Show tours for selected guide
Показать туры для выбранного гида
public function guide_tours($id) { $guide = Guide::find($id); $tours = $guide->tours->where('tour_time', '>', now()); return view('admin/guide_tours', compact('guide', 'tours')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Guide $guide)\n {\n \n }", "public function show(Guide $guide)\n {\n //\n }", "public function show(Tourguide $tourguide)\n { $data = ['LoggedUserInfo'=>user::where('id','=', session('LoggedUser'))->first()];\n $tourguidelist = Tourguide::paginate(5);\n return view('employee.dashboard.tourguide.viewtourguide',$data)->with('tourguidelist',$tourguidelist);\n }", "public function index()\n {\n $this->locate($this->createLink('resources', 'viewTeachers'));\n }", "public function show(tutorial $tutorial)\n {\n //\n }", "public function index()\n {\n\t\t$guides = Guide::orderBy('created_at', 'asc')->paginate(10);\n\t\t\n\t\treturn view('guides', [\n\t\t\t'guides' => $guides\n\t\t]);\n }", "public function index()\n {\n $courses = Auth::user()->courses;\n $teachers = collect(); //create empty collection\n foreach($courses as $course){\n $teachers = $teachers->merge($course->users->where('title', '=', 'teacher')->pluck('id', 'name'));\n }\n $tas = collect(); //create empty collection\n foreach($courses as $course){\n $tas = $tas->merge($course->users->where('title', '=', 'ta')->pluck('id', 'name'));\n }\n return view('instructors/chooseinstr', compact('teachers', 'tas'));\n }", "function index() {\n $this->guides();\n }", "public function show(Tourguide $tourguide)\n {\n $tourguidelist = Tourguide::paginate(5);\n return view('employee.dashboard.tourguide.viewtourguide')->with('tourguidelist',$tourguidelist);\n }", "protected function showMyConcepts()\n {\n $player = $this->getCurrentPlayer();\n\n $this->result()\n ->changeRequest('date_filter_concepts', 'none')\n ->changeRequest('author_filter', $player->getUsername())\n ->changeRequest('state_filter', 'none')\n ->changeRequest('concepts_current_page', 0)\n ->setCurrent('Concepts');\n }", "public static function showTutorialsView(){\r\n\t\tWorldpayUS_Admin::get_admin_header();\r\n\t\tself::tutorialsHeader();\r\n\t\tself::setupInstructions();\r\n\t\tself::woocommerceTutorial();\r\n\t\tself::woocommerceSubscriptions();\r\n\t\tself::worldpaySubscriptions();\r\n\t}", "public function index()\n {\n $guides = Guide::paginate(10);\n return view('admin.guides.index', compact('guides'));\n }", "public function index()\n {\n // $guide = \\App\\Models\\Guide::all();\n $guide = \\App\\Models\\Guide::all();\n return view('guide.index', compact('guide'));\n }", "public function index()\n {\n\n // $guides = Guide::get();\n // return view('guides.index',['guides'=>$guides]);\n }", "public function Guide()\n\t{\n\t\t\t$id = $this->session->userdata('admin_id');\n\n\t\t\t$checkAuth = \"\".$this->AdminMD->getStaffAuth($id,110);\n\n\t\tif($checkAuth == \"T\") {\n\t\t\t$getCity = $this->AdminMD->getCity();\n\t\t\t$filtertype = $this->input->get('filtertype');\n\t\t\t$getGuide = $this->AdminMD->getGuideSta();\n\t\t\t$getGuide2 = $this->AdminMD->getGuideAcc();\n\n\t\t\t$data['city'] = $getCity ;\n\t\t\t$data['filtertype'] = $filtertype ;\n\t\t\t$data['getGuide'] = $getGuide ;\n\t\t\t$data['getGuide2'] = $getGuide2 ;\n\t\t\t$this->load->view('mm/backend/tm-guide-main.php',$data);\n\t\t}else{\n\t\t\t\t// NO PERMISSION\n\t\t\t\t$this->load->view('landing.php');\n\t\t}\n\n\t}", "public function date_guide($date = null) {\n $date = request('date');\n\n $tours = Tour::where('date', '=', $date)->get();\n $guides = Guide::all();\n\n return view('admin/guides', compact('tours', 'guides', 'date'));\n }", "public function edit(Tourguide $tourguide)\n {\n //\n }", "public function index()\n {\n $userRoleTeacher = User::role('teacher')->where('visibility', '1')->get();\n $teachers = $this->transformerCollection($userRoleTeacher,new TeacherTransformer(),['categories','accomplishments','extras', 'hobbies', 'languages']);\n return view('all-coaches.coaches-wrapper',[\n 'teachers'=>$teachers\n ]);\n }", "public function show(TeachersInstruction $teachersInstruction)\n {\n //\n }", "public function show(Advance $advance)\n {\n //\n }", "public function show($id)\n\t{\n\t\tif (Auth::user()->isAdmin())\n\t\t{\n\t\t\t$training = TrainingModel::find($id);\n\t\t\t$trainings = TrainingModel::all();\n\t\t\tif ($training != null)\n\t\t\t\t$users = $training->users;\n\t\t\telse \n\t\t\t\t$users = null;\n\t\t}\t\n\t\telse if(Auth::user()->isTrainer())\n\t\t{\n\t\t\t$training = TrainingModel::find($id);\n\t\t\t$trainings = Auth::user()->trainings()->where('date', '>=', date(\"Y-m-d H:i:s\"))->get();\n\t\t\tif ($training != null)\n\t\t\t\t$users = $training->users;\n\t\t\telse \n\t\t\t\t$users = null;\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t$training = TrainingModel::find($id);\n\t\t\t$trainings = Auth::user()->trainings()->where('date', '>=', date(\"Y-m-d H:i:s\"))->get();\n\t\t\tif ($training != null)\n\t\t\t\t$users = $training->users;\n\t\t\telse \n\t\t\t\t$users = null;\n\t\t}\n\t\t\n\t\treturn View::make('pages.practices', array('training' => $training,\n\t\t\t\t\t\t\t\t\t\t\t\t 'trainings' => $trainings,\n\t\t\t\t\t\t\t\t\t\t\t\t 'users' => $users\n\t\t));\n\t}", "public function show()\n \n {\n \n \n \n $teachers = Teacher::all();\n $classes = AddClass::with('teachers')->where('status','=','active')->get();\n \n return view('admin.show-class', ['teachers' => $teachers,'classes'=>$classes]);\n }", "public function getIndex()\n {\n $guides = Guide::paginate(30);\n return View::make('admin.guides.index')->with(compact('guides'));\n }", "public function index()\n {\n $Teacher = Auth::user();\n\n $Scenarios = $Teacher->Scenarios;\n\n return view('teacher.scenario')\n ->with('Scenarios', $Scenarios);\n }", "public function index()\n {\n $disciplines = Discipline::join('teachers', 'disciplines.teacher_id', '=', 'teachers.id')\n ->select('disciplines.*', 'teachers.name as teacher_name')\n ->paginate();\n $disciplinesWithoutTeacher = Discipline::where('teacher_id', '=', NULL)->get();\n return view('discipline.index', ['disciplines' => $disciplines, 'disciplinesWithoutTeacher' => $disciplinesWithoutTeacher]);\n }", "public function valeurs() {\n\t\t$this->show('pages/valeurs');\n\t}", "public function show(Lesson $lesson)\n {\n //\n }", "public function show(Lesson $lesson)\n {\n //\n }", "public function show(Lesson $lesson)\n {\n //\n }", "public function index()\n {\n $viewCourse = DB::table('teaches')\n ->join('takes', 'teaches.sec_id', '=', 'takes.sec_id')\n ->join('sections', 'teaches.sec_id', '=', 'sections.id')\n ->join('courses', 'teaches.course_id', '=', 'courses.id')\n ->join('users', 'teaches.user_id', '=', 'users.id')\n ->select('takes.user_id as student', 'sections.section_name as sectionName', 'sections.year', 'sections.semester', 'courses.course_name as courseName', 'users.name as userName', 'users.email as userEmail')->where('users.id', '=', Auth::user()->id)\n ->get();\n\n return view('backend.teacher.courses', [\n 'viewCourses' => $viewCourse]);\n\n }", "public function lessonShow(){\n\n //first completely validate the users input\n $this->validate(request(), [\n\n 'lesson' => 'required|integer',\n ]);\n //ORM query\n $instructors= User::where('type','instructor')->get();\n //request variable\n $lessonID = request('lesson');\n //ORM query\n $lesson = Lesson::where('id', $lessonID)->first();\n //use the query variable to retrieve the foreign key\n $courseID = $lesson->course_id;\n //ORM query\n $course = Course::where('id', $courseID)->first();\n //ORM query\n $lessonComments = Comment::where('lesson_id', $lessonID)->get();\n\n\n return view('lessonViewer', compact('lesson', 'course', 'lessonComments', 'instructors'));\n\n }", "function showTutorial($tutorialUID,$lConf) {\r\n\t\t// grab record\r\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_news', 'uid='.$tutorialUID, $groupBy = '', '', $limit = '');\r\n\t\tif (!$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) return false;\r\n\r\n\t\t// set row for Typoscript processing (if any)\r\n\t\t$this->local_cObj->start($row, 'wec_knowledgebase');\r\n\r\n\t\t// grab tutorial content\r\n\t\t$content = $this->getTutorialContent($row,$lConf['displaySingle.'],$this);\r\n\r\n\t\t// grab href from that and change to that location\r\n\t\tif ($m = preg_match(\"/<a href=\\\"[\\\"']?([^\\\"' >]+)[\\\"' >]/i\", $content, $matches) && $matches[1]) {\r\n\t\t\theader('Location: '.t3lib_div::locationHeaderURL($matches[1]));\r\n\t\t\texit(1);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function show(Improjects $improjects)\n {\n //\n }", "public function traceabilityAction()\n {\n $project = $this->byId();\n $type = $this->_getParam('type');\n $targetId = $this->_getParam('targetid');\n $dir = $this->_getParam('dir');\n \n $selected = null;\n if ($type != null && $targetId != null) {\n $selected = $this->byId($targetId, $type);\n }\n \n if ($project == null && $selected == null) {\n $this->flash(\"Could not load project\");\n $this->redirect('index');\n return;\n }\n \n $items = new ArrayObject();\n // Start with getting all the links from requirements\n if ($selected == null) {\n // Just get all the features to start with\n $featureService = za()->getService('FeatureService');\n /* @var $featureService FeatureService */\n $items = $featureService->getFeatures(array('projectid='=>$project->id));\n \n $this->view->linkedFrom = $project;\n } else {\n $items = $this->itemLinkService->getLinkedItems($selected, $dir);\n $this->view->linkedFrom = $selected;\n }\n\n $this->view->dir = $dir;\n $this->view->items = $items;\n $this->view->model = $project;\n $this->renderView('project/traceability.php');\n }", "public function index()\n {\n $teacher = new Teacher();\n if ($teacher->getTeacherByUser(Auth::user())){\n $teacher = $teacher->getTeacherByUser(Auth::user());\n }else{\n return redirect()\n ->route('teacher.profile.create');\n }\n $lessons = new Lesson();\n $lessons = $lessons->getLessonsByTeacher($teacher);\n\n return view('teacher.lesson.index')\n ->withLessons($lessons);\n }", "protected function _teachers()\n {\n if($this->_user->account_type != 2) return View::make('templates.fourohfour');\n // get the students of the users\n $teachers = GroupMember::whereIn('group_id', Group::getMyGroupsId($this->_user->id))\n ->where('group_members.group_member_id', '!=', $this->_user->id)\n ->where('users.account_type', '=', 1)\n ->leftJoin('users', 'group_members.group_member_id', '=', 'users.id')\n ->groupBy('group_member_id')\n ->get();\n\n return View::make('profile.actions.teachers')\n ->with('user', $this->_user)\n ->with('details', $this->_details())\n ->with('teachers', $teachers);\n }", "public function index()\n {\n $tours = tours::all();\n $discount_code = DB::table('discount_code')->select('discount_code_id', 'discount_code_name')->get();\n $vehicles = DB::table('vehicles')->select('vehicle_id', 'vehicle_name')->get();\n $places = DB::table('places')->select('place_id', 'place_name')->get();\n return view('admin.tour.list', compact('tours', 'discount_code', 'vehicles', 'places'));\n }", "public function showAddTutorial()\n {\n return View::make('tutorials.showAdd')\n ->with('added', false)\n ->with('success', false);\n \n }", "public function show(tutor $tutor)\n {\n //\n }", "public function show(Sucursal $sucursal)\n {\n //\n }", "public function show(Training $training)\n {\n //\n }", "public function show(Training $training)\n {\n //\n }", "function view($guide_id=-1, $controller_name)\n {\n $this->check_action_permission('add_update');\n $data['controller_name'] = $controller_name;\n $data['guide_info'] = $this->guide->get_info($guide_id);\n $this->load->view(\"guides/_form\", $data);\n }", "public function buying_guide()\n\t{\t\t\n\t\n\t\t$this -> view('terms/buying-guides');\n\t\n}", "public function index() {\n $teachers = Teacher::paginate(config('doan.number_teacher_per_page'));\n return view('admin.teacher.index', [\n 'teachers' => $teachers,\n 'id' => $teachers->currentPage() == 1 ? 0 : ($teachers->currentPage() - 1) * config('doan.number_teacher_per_page')\n ]);\n }", "public function index()\n {\n $lessons = Lesson::where('part_id',request('part_id'))\n ->orderBy('id','asc')\n ->get();\n return view('admin.lessons.index',compact('lessons'));\n }", "public function addTutorials()\n {\n return view('admin.layout.addTutorial');\n }", "function displayTutorialsMenu(&$parentObj) {\r\n\t\t// grab all tutorial(news) records on page...if set page, then use that otherwise use current page\r\n\t\t$tutListID = $this->piVars['tutorial_list_id'] ? $this->piVars['tutorial_list_id'] : $parentObj->conf['tutorial_list_id'];\r\n\r\n\t\t$tutorialMenu = \"\";\r\n\r\n\t\t$gotoURL = $parentObj->pi_getPageLink($GLOBALS['TSFE']->id);\r\n\t\t$gotoURL = t3lib_div::locationHeaderURL($gotoURL) . ((!strpos($gotoURL,'?')) ? '?' : '&') . 'tx_wecknowledgebase_pi1[tutorial_id]=';\r\n\r\n\t\t// Then, build the select menu\r\n\t\t$tutorialMenu .= '<div class=\"news-tutorial-menu\">';\r\n\t\t$curCat = $parentObj->piVars['cat'];\r\n\t\tif ($headerStr = $parentObj->pi_getLL('tutorialmenu_header','Select Tutorial:'))\r\n\t\t\t$tutorialMenu .= '<h4 style=\"display:inline;padding-right:5px;\">'.$headerStr.'</h4>';\r\n\t\t$tutorialMenu .= '<select name=\"cat_dropdown\" onchange=\"if (this.value) location.href=this.value;\">';\r\n\t\t$tutorialMenu .= '<option value=\"\">'.$parentObj->pi_getLL('tutorialmenu_topitem','Select...').'</option>';\r\n\r\n\t\tif (!$this->tutorialsList) {\r\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title','tt_news','pid='.$GLOBALS['TSFE']->id,'','sorting');\r\n\t\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\r\n\t\t\t\t$this->tutorialsList[] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor ($i = 0; $i < count($this->tutorialsList); $i++) {\r\n\t\t\t$el = $this->tutorialsList[$i];\r\n\t\t\t$isSelected = ($el['uid'] == $this->piVars['tutorial_id']) ? \"selected\" : \"\";\r\n\t\t\t$tutorialMenu .= '<option value=\"'.$gotoURL.$el['uid'].'\" '.$isSelected.'>'.$el['title'].'</option>';\r\n\t\t}\r\n\t\t$tutorialMenu .= '</select>';\r\n\t\t$tutorialMenu .= '</div>';\r\n\r\n//\t\tif (!$parentObj->tt_news_uid) {\r\n//\t\t\t$parentObj->tt_news_uid = $firstInListUID;\r\n//\t\t\t$this->tt_news_uid = $firstInListUID;\r\n//\t\t}\r\n\r\n\t\treturn $tutorialMenu;\r\n\t}", "public function showList() {\n\t\t$tours = array();\n\t\tif(Auth::user()->name == \"admin\") {\n\t\t\t$tours = DB::table('houses')\n\t\t\t\t->get();\n\t\t} else {\n\t\t\t$tours = DB::table('houses')\n\t\t\t\t->where('created_by', '=', Auth::user()->name)\n\t\t\t\t->get();\n\t\t}\n\t\t// $tours = DB::table('ot_tours')\n\t\t// \t->where('created_by', '=', Auth::user()->name)\n\t\t// \t->get();\n\t\treturn view('admincp.listTour', ['tours' => $tours]);\n\t}", "public function show()\n {\n view('Index/show', $this->getDisburs());\n }", "public function show(Setup $setup)\n {\n \n \n }", "public function show()\n {\n return view('teachers.detail-teacher');\n }", "public function guides( $guide_id = NULL ) {\n \n if ( get_option('disabled-frontend') ) {\n redirect('/members');\n }\n \n if ( $guide_id ) {\n \n // Get guide data by guide_id\n $get_guide = $this->guide->get_guide( $guide_id );\n \n // Verify if the guide exists\n if ( $get_guide ) {\n \n // Load view/auth/guide file\n $this->load->view('auth/single-guide', [\n 'guide' => $get_guide\n ]);\n \n } else {\n \n show_404();\n \n }\n \n } else {\n \n \n if ( get_option('enable-guides') ) {\n\n // Gets saved guides\n $all_guides = $this->guide->get_guides(); \n\n // Load view/auth/guides file\n $this->load->view('auth/guides', [\n 'guides' => $all_guides\n ]);\n\n } else {\n\n show_404();\n\n }\n \n }\n \n }", "function guide() {\n\t\t$this->setTemplate ( \"templates/user-guide.php\" );\n\t}", "public function show() {\r\n if (isset($_GET['type'])) {\r\n $this->setTipo($_GET['type']);\r\n }\r\n //print_r(\"Tipo \".$this->getTipo());\r\n if(!isset($this->l_error)){\r\n $this->setLError(\"\");\r\n }\r\n $numtot=new Setting();\r\n $maxall=$numtot->getValueByName($this->getTipo().\"_max\");\r\n\r\n $lezioni=getNumberLessonsByCourseType($this->getTipo());\r\n $this->setLezioni($lezioni);\r\n\r\n $titolo_pagina=getCourseTypeByInitials($this->getTipo());\r\n\r\n //$corsi = Course::getCoursesbyType($this->getTipo());\r\n $corsi = Course::getCoursesWithLessonsByType($this->getTipo());\r\n\r\n //print_r($corsi);\r\n $l_error =$this->getLError();\r\n require_once('views/courses/show.php');\r\n }", "public function tour($id) {\n $tour = Tour::find($id);\n\n $people = DB::table('bookings')\n ->select(DB::raw(\"sum(reserved_number) as number\"), 'tour_id')\n ->join('tours', 'bookings.tour_id', '=', 'tours.id')\n ->where('tour_id', '=', $id)\n ->groupBy('tour_id')\n ->first();\n\n return view('admin/tour', compact('tour', 'people'));\n }", "public function index()\n\t{\n //get all tutorials\n $tuts = DB::table(\"tutorials\")->get();\n\n return View::make(\"tutorials.index\")\n ->with(\"tuts\",$tuts);\n\n\t}", "public function show($id)\n {\n $unitteach = $this->unitteach->find($id);\n return view('admin.unit_teach.show', compact('unitteach'));\n }", "public function view_tour_paket()\n\t{\n\t\t$data['tour']=$this->crud->v_tour_paket()->result_array();\n\t\t$this->load->view('owner/tour_paket',$data);\n\t}", "public function index()\n {\n $user = Auth::user()->id;\n $links = Links::where('user', '=', $user)->get();\n return view('tutorials.index')->with('links', $links);\n }", "public function show(Tutor $tutor)\n {\n //\n }", "public function show(Tutor $tutor)\n {\n //\n }", "public function index()\n\t{\n\t\t$teachers = $this->userDetail->whereUser_type(2)->orderBy('id','desc')->orderBy('updated_at','desc')->get();\n\t\t$this->pro_data['teachers'] = ($teachers->isEmpty())?'':$teachers;\n\t\treturn view('setting.teacher.index',$this->pro_data);\n\t}", "public function show(Teachers_Careers $teachers_Careers)\n {\n //\n }", "public function index()\n {\n $unitteachs = $this->unitteach->all();\n return view('admin.unit_teach.index', compact('unitteachs'));\n }", "public function show($id)\n {\n $this->checkExit($id);\n return view('page.tour-detail')->with([\n 'tour' => $this->object,\n 'cites' => $this->cites()->get(),\n 'typetour' => $this->type()->get(),\n 'topics' => $this->topic->getTopicOnline('tour')\n ]);\n }", "public function index(Request $request)\n\t{\n\t\t$action = 'c';\n $tour = Tour::findOrFail($request->tour);\n\t\treturn view('admin.tours.tour-feature', compact('action', 'tour'));\n\t}", "public function show($id)\n {\n $wiki = Wiki::find($id);\n $portal = Portal::find($wiki->portal_id);\n $decks = Deck::where('portal_id', $portal->id)->get();\n $tagIDs = WikiTag::where('wiki_id', $wiki->id)->pluck('tag_id');\n \n $tags = [];\n\n foreach ($tagIDs as $tagID) {\n $tag = Tag::find($tagID);\n $tags[] = $tag;\n }\n \n\n return view('wiki.show', [\n 'wiki' => $wiki,\n 'portal' => $portal,\n 'decks' => $decks,\n 'tags' => $tags\n ]);\n }", "public function show(labs $labs)\n {\n //\n }", "public function show(HowCanHelp $howCanHelp)\n {\n //\n }", "public function show()\n\t{\n $id = $this->uri->segment(5);\n $avis = $this->avis_model->find($id);\n $structure = $this->pcet_model->get_structure_by_id_avis($id);\n \n Template::set('avis', $avis);\n Template::set('structure', $structure);\n Template::set('toolbar_title', lang('avis_show'));\n Template::set_view('admin/show');\n Template::render();\n \n }", "public function all_guides() {\n \n \n // Check if data was submitted\n if ( $this->input->post() ) {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n \n // Add form validation\n $this->form_validation->set_rules('title', 'Title', 'trim|required');\n $this->form_validation->set_rules('short', 'Short', 'trim|required');\n $this->form_validation->set_rules('body', 'Body', 'trim');\n $this->form_validation->set_rules('guide', 'Guide', 'trim');\n \n // get data\n $title = $this->input->post('title');\n $short = $this->input->post('short');\n $body = $this->input->post('body');\n $guide = $this->input->post('guide');\n \n if ( $this->form_validation->run() == false ) {\n \n display_mess(152);\n \n } else {\n \n // Save the guide's data\n $save_guide = $this->guide->save_guide( $title, $short, $body, $guide );\n \n if ( $save_guide ) {\n \n display_mess(151);\n \n } else {\n \n display_mess(152);\n \n }\n \n }\n \n } else {\n \n // Deletes the guide option if exists\n delete_option( 'guide-cover' );\n \n // Check if the session exists and if the login user is admin\n $this->check_session($this->user_role, 1);\n \n // Gets saved guides\n $all_guides = $this->guide->get_guides();\n\n $this->body = 'admin/guides';\n\n $this->content = [\n 'guides' => $all_guides\n ];\n\n $this->admin_layout();\n \n }\n \n }", "public function show(Travel $travel)\n {\n //\n }", "public function show(Lecturer $lecturer)\n {\n //\n }", "public function showAction(Guide $guide)\n {\n $deleteForm = $this->createDeleteForm($guide);\n\n return $this->render('guide/show.html.twig', array(\n 'guide' => $guide,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function newTour() {\n\t\t$categories = Ot_Categories::all();\n\t\treturn view('admincp.newTour', ['categories' => $categories]);\n\t}", "public function show(TasaInteres $tasaInteres)\n {\n //\n }", "public function edit(Guide $guide)\n {\n if(Auth::user()->role !== 'admin') { //ถ้าไม่ใช่แอดมิน\n $id = $guide->region->country_id;\n $regionid = $guide->region_id;\n $country = Country::find($id);\n $regions = Region::where('country_id',$id)->orderBy('created_at','desc')->get();\n $guides = Guide::where('region_id',$regionid)->get();\n return view('guides.indexGuidesCountryRegion',['guides'=>$guides, 'regions'=>$regions, 'country'=>$country]);\n }\n return view('guides.edit',['guide'=>$guide]);\n\n }", "public function index($id)\n {\n //\n $input = [\n 'info' => DB::table('infos')->first(),\n 'level'=>Level::find($id)\n ];\n\n return view('admin.courses.lessons',$input);\n }", "public function actionAssistant()\n\t{\n\t\t$searchModel = new DmpaperSearch;\n\t\t$dataProvider = $searchModel->search($_GET);\n\n\t\treturn $this->render('assistant', [\n\t\t\t'dataProvider' => $dataProvider,\n\t\t\t'searchModel' => $searchModel,\n\t\t]);\n\t}", "public function edit($id)\n {\n $guide = Guide::findOrFail($id);\n return view('admin.guides.edit', compact('guide'));\n }", "public function index()\n { \n //dd($cat[1]);\n $tutorial = Tutorial::with('slug')->get();\n return view('index',['tutorial' => $tutorial]);\n }", "public function index()\n {\n $teachers = Teacher::all();\n return view('guru.index', compact('teachers'));\n }", "public function showstudy(){\n\t\t \t\t$id = auth()->user()->id;\n\t\t \t\t$plans = DB::table('studies')->where('user_id','=',$id)->where('deleted','=',0)->get();\n\n\t\t \t\t$meet = DB::table('meetings')\n\t\t \t\t\t\t\t\t \t->where('deleted','=',0)\n\t\t \t\t\t\t\t\t \t->where('user_id','=',$id)\n\t\t \t\t\t\t\t\t \t->where('status','=',0)->get();\n\t\t \t $course = DB::table('courses')->where('deleted','=',0)->where('user_id','=',$id)->get();\n\n\n\t\t \t\t//print_r($plans);exit;\n\n\n\n\t\t\treturn view('frontend.user.showstudy')->with('plans',$plans)->with('course',$course);\n\n\t\t}", "public function index()\n {\n $teachers = Teacher::all();\n $classes = AddClass::all();\n $subjects = AddSubject::all();\n \n\n \n return view('admin.view-class', ['teachers' => $teachers,'classes'=>$classes,'subjects'=>$subjects,'class_subject_teachers'=>$class_subject_teachers]);\n }", "public function show($id)\n {\n $tutorial = Tutorial::find($id);\n $likes = DB::table('tutorial_likes')->where('tutorial_id', $id)->sum('value');\n return view('tutorial.show', ['title' => 'Tutorial - '.$tutorial->title, 'tutorial' => $tutorial, 'likes' => $likes]);\n }", "public function show($id) {\n $training = DB::table('trainings')\n ->join('users', 'trainings.created_by', '=', 'users.id')\n ->select('trainings.*', 'users.name')\n ->where('trainings.id', $id)\n ->first();\n return view('administrator.setting.training.show_training', compact('training'));\n }", "public function tutorial()\n {\n $data['paginaVerantwoordelijke'] = 'Florian D\\'Haene';\n $data['titel'] = 'Tutorial - Nieuws beheren';\n $data['gebruiker'] = $this->authex->getGebruikerInfo();\n\n $partials = array('hoofding' => 'main_header',\n 'inhoud' => 'Nieuws/tutorial',\n 'voetnoot' => 'main_footer');\n $this->template->load('main_master', $partials, $data);\n }", "public function show($id)\n\t{\n $assistant = $this->assistants->findOrFail($id);\n return View::make('assistants.show')->compact('assistant');\n\t}", "public function show(Trajet $trajet)\n {\n //\n }", "public function show($id)\n {\n //\n $netlesson=lessons::find($id);\n return view('adminnetadmin.details', compact('netlesson')); \n\n }", "public function show(Introduction $introduction)\n {\n //\n }", "public function show($id)\n {\n\n $tutorial = Tutorials::where('id', $id)->get();\n return view('Tutorial.show')->with('tutorial', $tutorial);\n }", "public function index()\n {\n $current_teacher = Auth::guard('teacher')->user()->id;\n\n $courses = DB::table('courses')\n ->leftJoin('course_teacher', 'courses.id', '=', 'course_teacher.course_id')\n ->where('course_teacher.teacher_id', '=', $current_teacher)->get();\n\n foreach ($courses as $course) {\n $cid = $course->id; \n\n $course->topics = DB::table('topics')->where('course_id', '=', $cid)->get();\n }\n\n return view('teacher.topic.index',compact('courses')); \n }", "public function teacherAction()\n {\n return new View(\"home/index\", [\"title\" => \"Framework\", \"layout\" => \"on\", \"nameLayout\" => \"layout\"]);\n }", "public function index()\n {\n if (request('lesson_id')) { // ? Это нужно, если нет \"своего\" метода\n $lesson = Lesson::with('course')->find(request('lesson_id'));\n Document::setBreadcrumb(Lang::get('courses.title'), route('courses.index'));\n Document::setBreadcrumb($lesson->course->title, route('courses.edit', $lesson->course->id));\n Document::setBreadcrumb(Lang::get('lessons.title'), route('lessons.index',['course_id' => $lesson->course->id]));\n Document::setBreadcrumb($lesson->title, route('lessons.edit', request('lesson_id')));\n Document::setBreadcrumb(Lang::get('tests.title'), route('tests.index'));\n $vars['tests'] = Test::with('lesson')->where('lesson_id', request('lesson_id'))->paginate(10);\n $vars['lesson_id'] = request('lesson_id');\n }else {\n Document::setBreadcrumb(Lang::get('tests.title'), route('tests.index'));\n $vars['route_create'] = route('tests.create');\n $vars['tests'] = Test::with('lesson')->paginate(10);\n }\n\n $this->template = 'trainers.tests.list';\n\n return $this->renderOutput()->with($vars);\n }", "public function index(){\n $user = Auth::user();\n $decisions = Decision::where('author_id', $user->id)\n ->with('topic')\n ->orderBy('created_at', 'desc')\n ->take(5)\n ->get();\n if($user->can('create', Topic::class)){\n $topics = Topic::where('author_id', $user->id)\n ->orderBy('created_at', 'desc')\n ->take(5)\n ->get();\n return view('profile.main', [\n 'user' => $user,\n 'topics' => $topics,\n 'decisions' => $decisions\n ]);\n }\n return view('profile.main', [\n 'user' => $user,\n 'decisions' => $decisions\n ]);\n }", "public function view_all_coaches(){\n\t\t$this->load->view('linegym/header');\n\t\t$this->load->view('linegym/admin_views/all_coaches');\n\t\t$this->load->view('linegym/footer');\n\t}", "public function show(tl_theloai $tl_theloai)\n {\n //\n }", "public function show(Tarefa $tarefa)\n {\n //\n }" ]
[ "0.65547466", "0.651973", "0.6255133", "0.61298317", "0.59796363", "0.5956666", "0.58914405", "0.58911705", "0.5887699", "0.58809215", "0.58690506", "0.579726", "0.5794854", "0.5786784", "0.57715166", "0.57689196", "0.5754", "0.5628497", "0.55689865", "0.55657876", "0.5565028", "0.5552976", "0.5547519", "0.5498795", "0.5498336", "0.54896545", "0.5485185", "0.5485185", "0.5485185", "0.54808545", "0.5471619", "0.5453693", "0.5430195", "0.5421592", "0.5409853", "0.54021084", "0.53958476", "0.53905696", "0.5385304", "0.53837484", "0.5373903", "0.5373903", "0.5372026", "0.5368926", "0.5362594", "0.5362124", "0.53492033", "0.5348383", "0.5347285", "0.5345984", "0.53431076", "0.5341343", "0.5338794", "0.5337661", "0.5336799", "0.5332305", "0.5325115", "0.53239274", "0.5316898", "0.5309501", "0.53056747", "0.53056747", "0.53030735", "0.5301889", "0.52973264", "0.52967", "0.5293714", "0.52893305", "0.52848303", "0.5283286", "0.52810663", "0.5280604", "0.5278673", "0.527858", "0.52768826", "0.5271359", "0.5266443", "0.5265608", "0.52652717", "0.52628756", "0.52604294", "0.52599066", "0.5254376", "0.5250302", "0.5246924", "0.5246649", "0.52344763", "0.52317756", "0.5231049", "0.5228605", "0.52256435", "0.5221334", "0.52199215", "0.52189475", "0.52171445", "0.5216634", "0.52143115", "0.5212223", "0.52116525", "0.52107656" ]
0.7264184
0
Show details for a selected booker
Показать детали для выбранного книжного издателя
public function booker_details() { $bookers = User::where('type', 'booker')->get(); return view('admin/booker_details', compact('bookers')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(book $book)\n {\n //\n }", "public function show(book $book)\n {\n //\n }", "public function show(book $book)\n {\n //\n }", "public function show(Book $book)\n {\n \n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Book $book)\n {\n //\n }", "public function show(Bookdetail $bookdetail)\n {\n //\n }", "public function show(Books $books)\n {\n //\n }", "public function show(BookType $booktype)\n {\n }", "public function show(Bookedrestaurant $Bookedrestaurant)\n {\n //\n }", "public function book()\n {\n //\n $book = DB::table('rooms')\n ->where('rstatus', 'booked')\n ->get();\n return view('Hotel.booked')->with('books',$book);\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 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 }", "protected function showAction() {\n\t\t$em = $this->getEntityManager();\n\t\t$book = $em->find('Entities\\\\Book', $_GET['id']);\n\t\t$this->addContext('book', $book);\n\t}", "public function show(Beer $beer)\n {\n\n //praticamente nell altro template gli passo un id che corrisponde ad una singola birra\n //mettendo il tipo Book andra a prendere un intero che ha una primary key che di fatto è l id e quindi mi mostrerà il singolo libro\n //$beer = Beer::find($beer);\n\n return view('beers.show', compact('beer'));\n }", "public function show(Books $book)\n {\n return Books::with('borrows')->where('books.id', $book->id)->get();\n \n }", "public function show(Bikerental $bikerental)\n {\n //\n }", "public function show($id) {\n $book = Book::where('id', $id) ->first();\n \n return view('book/details', compact('book'));\n }", "public function show(Book $book)\n {\n //Book $book\n $book = Book::findOrFail($request->id);\n return $book;\n //Esta función devolverá los datos de una tarea que hayamos seleccionado para cargar el formulario con sus datos\n \n }", "public function show(Bookin $bookin)\n {\n //\n }", "public function getShowBookWithReservation($bok_id)\n {\n if (is_null(Reservation::isAvailable($bok_id)))\n {\n $reservation = new Reservation;\n $reservation->rvn_bok_id = $bok_id;\n $reservation->rvn_usr_id = Auth::user()->id;\n $reservation->rvn_date = new DateTime('today');\n $reservation->rvn_status = 0;\n $reservation->rvn_is_ready = 0;\n $reservation->save();\n }\n \n $book = DB::table('book')->where('bok_id', $bok_id)\n ->join('author', 'atr_bok_id', '=', 'book.bok_id')\n ->join('writer', 'wtr_id', '=', 'author.atr_wtr_id')\n ->join('language', 'lng_id', '=', 'book.bok_lng_id')\n ->join('kind', 'knd_id', '=', 'book.bok_knd_id')\n ->leftJoin('reservation', 'rvn_bok_id', '=', 'book.bok_id')\n ->get();\n\n return View::make('book.book', array('book' => $book));\n }", "public function show($id)\n {\n $data['book'] = $this->book_model->get_by_id();\n\n $this->load->view('book/show');\n }", "public function show($book){\n return $this->successResponse($this->bookService->obtainBook($book));\n }", "function view_detail_bk($bk_id) {\n\t $pass_id = $this->getCurrentPassengerId();\n\t $bkInfo = $this->mod_fecustomize->bookingInfoByPassengerIDAndBookingID($bk_id, $pass_id);\n\t\n\t return $bkInfo;\n\t }", "public function show($book_id){\n\n// $book = Book::find($book_id);\n//\n// if($book == null){\n// abort(404);\n//\n// return 'Not found';\n// }\n\n// return Book::where('id', $book_id)->first();\n\n// return Book::where('id', $book_id)->get();\n// return Book::where('id', '=', $book_id)->get();\n\n// return Book::where('id', '>', $book_id)->get();\n\n\n $book = Book::findOrFail($book_id);\n\n return view('books.show', compact('book'));\n }", "public function show($id)\n {\n $borrowers=Borrower::all();\n return view('borrower_book.userwithbook' ,compact('borrowers'));\n // $borrowers=Borrower::find($id);\n // $books=$borrowers->books()->wherePivot('status', 1)->get();\n // return view('borrower_book.userwithbook', compact('borrowers', 'books'));\n }", "public function display_book_data(){\n\n\t\t//get the data and decode it into json format\n\t\t$data = json_encode($this->md->model_get_data(\"book\"));\n\n\t\t//echo the result\n\t\techo $data;\n\t}", "public function show(Buyer $buyer)\n {\n //\n }", "public function getShowBook($bok_id)\n {\n $book = DB::table('book')->where('bok_id', $bok_id)\n ->join('author', 'atr_bok_id', '=', 'book.bok_id')\n ->join('writer', 'wtr_id', '=', 'author.atr_wtr_id')\n ->join('language', 'lng_id', '=', 'book.bok_lng_id')\n ->join('kind', 'knd_id', '=', 'book.bok_knd_id')\n ->leftJoin('reservation', 'rvn_bok_id', '=', 'book.bok_id')\n ->get();\n\n return View::make('book.book', array('book' => $book));\n }", "public function show(book $book)\n {\n $comments = DB::table('comments')->join('users', 'comments.user_id', '=', 'users.id')\n ->where('comments.book_id', '=', $book->id)\n ->select('text', 'email', 'comments.timestamp')->get();\n $wrotes = $book->wrotes;\n // $comments = comment::where('book_id', '=', $book->id)->get();\n return view('books.show',\n ['book' => $book,\n 'comments' => $comments,\n 'wrotes' => $wrotes\n ]\n );\n }", "function printDetails() {\n\t\techo'<p><span class=\"heading\">Title:</span> '.$this->title.'</p>'.\n\t\t\t'<p><p><span class=\"heading\">Author:</span> '.$this->author.'</p>'.\n\t\t\t'<p><span class=\"heading\">ISBN:</span> '.$this->isbn.'</p>'.\n\t\t\t'<p><span class=\"heading\">Page Count:</span> '.$this->pageCount.'</p>'.\n\t\t\t'<p><span class=\"heading\">Weight:</span> '.$this->weight.'</p>'.\n\t\t\t'<p><span class=\"heading\">Language:</span> '.$this->language.'</p><br/>'.\n\t\t\t'<a href=\"addBook.php\">Add another book!</a>';\t\n\t}", "public function show(Book $book)\n {\n //dd($book->authors()->name);\n return view('show_books')->with('bookArr', Book::all());\n }", "public function show( Seller $seller ) {\n\t\t//\n\t}", "public function show($id)\n {\n $books = Book::where('school_id', Auth::user()->school_id)->where('batch_id', Auth::user()->batch_id)->where('id', $id)->get();\n return view('backend.librarysection.book.show', compact('books'));\n }", "public function show_book()\n {\n $query = \"SELECT book.*, publisher.pub_name, category.cat_name \n FROM book INNER JOIN publisher ON book.pub_id = publisher.pub_id\n INNER JOIN category ON book.cat_id = category.cat_id\n ORDER BY book.book_id desc\";\n $result = $this->db->select($query);\n return $result;\n }", "public function bookBorrowed() {\n\t\t$reader = null;\n\t\t$books = null;\n\t\t$title_for_layout = 'Mượn trả tài liệu';\n\t\tif (!empty($this->request->query)) {\n\t\t\t$reader_code = $this->request->query['readerCode'];\n\t\t\t$this->loadModel('Usermgmt.Reader');\n\t\t\t$conditions = array('User.username' => $reader_code);\n\t\t\t$fields = array('Reader.*', 'User.username', 'User.fullname', 'Department.name', 'User.resident_address');\n\t\t\t//$conditions = array('')\n\t\t\t$reader = $this->Reader->find('first', array('conditions' => $conditions, 'fields' => $fields));\n\t\t\tif (!empty($reader)) {\n\t\t\t\t$conditions = array('Ciculation.reader' => $reader['User']['username']);\n\t\t\t\t$books = $this->Ciculation->find('all', array('conditions' => $conditions));\n\t\t\t}\n\t\t}\n\t\t$this->loadModel('Usermgmt.User');\n\t\t$reader_type = $this->User->reader_type;\n\t\t$this->set(compact('reader', 'books', 'reader_type','title_for_layout'));\n\t}", "public function show($id)\n {\n //\n\n $book = Book::findOrFail($id);\n\n $bookAnalytics = $book->analytics;\n if($bookAnalytics == null){\n $bookAnalytics = \\App\\BookAnalytics::create([\n 'book_id' => $id,\n 'views' => 0,\n ]);\n }\n\n $bookAnalytics->increment('views', 1);\n\n $comments = Comment::where('book_id', $id)->get();\n $loans = Loan::where('book_id', $id)->orderBy('id','desc')->limit(1)->get() ;\n return view('books.show',compact('book','comments','loans'));\n }", "public function bookById($id)\n\t{\n\t\t$user=$this->getUser();\n\t\t\n\n\t\t$book = $this->book->find($id);\n\n\t\tif ($book) {\n\t\t\t$this->show('default/viewbook', ['book' => $book,'user_model' => $this->user]);\n\t\t} else {\n\n\t\t\t$this->showNotFound();\n\t\t}\n\t}", "public function show(User $user, Book $book)\n\t{\n\t\t//\n\t}", "public function getBooked(){\n $booked = MsStatement::where('initiator',auth()->user()->phoneNumber)->where('action','book')->orderBy('created_at','DESC')->paginate(10);\n $rooms = DB::select(\"SELECT `houseName`,`houseID` FROM houses\");\n\n return view('dashboard.booked',[\n 'houses'=>$booked,\n 'rooms'=>$rooms\n ]);\n }", "public function show(BilletReservation $billetReservation)\n {\n //\n }", "public function show()\n {\n return view('Books.show');\n }", "private function ReportBooks()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo \"<table><tr><th>Room</th><th>Book</th></tr>\";\r\n\r\n\t\t\t\t\t\tforeach (array_keys($this->booksInRooms) as $stringOfRoomContainingBook)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$bookInRoom = $this->booksInRooms[$stringOfRoomContainingBook];\r\n\t\t\t\t\t\t\techo \"<tr><td>$stringOfRoomContainingBook</td><td>$bookInRoom</td></tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo \"</table>\";\r\n\t\t\t\t\t}", "public function show()\n {\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($_GET['id']))\n return call('pages', 'error');\n\n // we use the given id to get the right post\n $booking = Booking::find($_GET['id']);\n require_once('views/bookings/show.php');\n }", "public function getDetailsBooks() {\n try {\n $books = DB::table('books')\n ->select('title', 'total_pages', 'created_date', 'img_url', 'content')\n ->get();\n return $this->respondSuccess('Get details of the books succeed!', $books);\n } catch (Exception $e) {\n return $this->respondError($e);\n }\n }", "public function show($id)\n {\n $thisbook = Book::findOrFail($id);\n $cmt = DB::table('rates')->where('id_book', '='.$thisbook)->get();\n // $bookid = Book::findOrFail($id)->get('id');\n // $thisbook = DB::table('books')\n // ->join('rates', 'rates.id_book', '='.$bookid)\n // ->select('rates.comment')\n // ->get();\n return view('books.book_detail', compact('thisbook'));\n }", "public function show($id)\n {\n $book = Book::find($id);\n\t return view('userbook/show', array('book'=>$book));\n }", "public function show($book)\n {\n $book = Book::find($book);\n //2. Send book to view\n return view('show', compact('book'));\n }", "public function book(){\n\t\treturn parent::book();\n\t}", "public function show($id) {\n if (!Auth::check()) return redirect()->to('login');\n $book = Book::findOrFail($id);\n $data = self::getData('book', $book->title);\n $data['book'] = $book;\n return view('book', $data);\n }", "public function show(Payer $payer)\n {\n //\n }", "public function show(Borrowing $borrowing)\n {\n //\n }", "public function show($id)\n {\n $book = DB::table('Books')\n ->join('Writers', 'Books.writer_id', '=', 'Writers.id')\n ->join('Artists', 'Books.artist_id', '=', 'Artists.id')\n ->select('Books.*', 'Writers.name AS writer_name', 'Artists.name AS artist_name')\n ->where('Books.id', $id)->first();\n\n\n return View(\"Books.show\", ['book' => $book]);\n }", "public function show(Seller $seller)\n {\n //\n }", "public function show($id){\n $bookings = Booking::join('customers','bookings.customer_id','=','customers.customer_id')\n ->findOrFail($id);\n\n $paymentMethods = PaymentMethod::get();\n\n $customers = Customer::get();\n\n $guests = Guest::get();\n\n $rooms = Room::\n join('room_types','rooms.room_type_id','=','room_types.room_type_id')\n ->join('room_prices','rooms.room_price_id','=','room_prices.room_price_id')\n ->join('room_bands','rooms.room_band_id','=','room_bands.room_band_id')\n ->select('rooms.room_id','room_types.room_type','room_prices.room_price','room_bands.room_description')\n ->get();\n\n return view('bookings.show',[\n 'bookings' => $bookings,\n 'customers' => $customers,\n 'guests' => $guests,\n 'rooms' => $rooms,\n 'paymentMethods' => $paymentMethods\n ]);\n }", "public function show($r_id)\n {\n // Method ini berfungsi bukan untuk mencari booking berdasarkan ID Tetapi \n // berdasarkan ID Ruangan yang diklik oleh user\n\n $booking_u_id = DB::table('bookings')->select('u_id')->where('bookings.r_id', '=', $r_id)->first();\n $user_nip_nama = $user_department = DB::table('users')->select('nip', 'nama')->where('users.id', '=', $booking_u_id->u_id)->first();\n $booking = DB::table('bookings')->select('tanggal_selesai', 'tanggal_mulai', 'keperluan')->where('bookings.r_id', '=', $r_id)->first();;\n $booking->nip = $user_nip_nama->nip;\n $booking->nama = $user_nip_nama->nama;\n\n if (is_null($booking)) {\n // return response\n $response = [\n 'error' => true,\n 'message' => 'Booking not found.',\n ];\n return response()->json($response, 404);\n }\n \n // return response\n $response = [\n 'error' => false,\n 'msg' => 'Booking retrieved successfully.',\n 'booking_room' => $booking \n ];\n return response()->json($response, 200);\n }", "function getBeerDetails( $beer_id )\n{\n\t\n}", "public function show($id)\n {\n\t\treturn \"read one book\";\n }", "public function show($id) {\n $book = employees::find($id);\n return view('books.show', compact('book'));\n }", "public function bookview($book_id) {\n\n $book_details_view = DB::table('book_tb1')\n ->select('*')\n ->where('book_id', $book_id)\n ->first();\n $manage_book_details = view('admin.bookview')\n ->with('bookdetailsview',$book_details_view);\n return view('layout')\n ->with('bookview',$manage_book_details);\n\n\n\n }", "public function show($id)\n {\n return view('books.show', compact('book'));\n }", "public function show(BookingRoom $bookingRoom)\n {\n //\n }", "public function getBook()\n {\n return $this->book;\n }", "public function show($id)\n {\n// $book = $book[ 0 ];\n\n $book = Book::findOrFail($id);\n\n return view('books/show', compact('book'));\n }", "public function editbook(){\n $id_book = $_GET['id_book']; \n $db = book_appointments::where('id_book',$id_book)->get();\n return view('Admin.Book.edit',compact('db'));\n }", "public function getBookById()\n {\n }", "public function show() {\n\t\t$author = pick_arg(Author::class);\n\t\treturn $this->viewShow(compact('author'));\n\t}", "public function show($id)\n {\n $my_id = Auth::User()->id;\n $my_books = DB::table('book_user')->where('user_id', '=', $my_id)->get();\n $user_role = Auth::User()->role;\n\n $book = Book::where('id', '=', $id)->first(); \n return view('books.show', ['book' => $book, 'my_books' => $my_books, 'my_id' => $my_id,'role' => $user_role ]);\n }", "public function edit($id)\n {\n $book=Book::find($id);\n\n\n$names =DB::table('books')\n ->join('sections', 'sections.id', '=', 'books.section_id')\n ->join('authors', 'authors.id', '=', 'books.author_id')\n ->select('books.id as bid','books.name','books.price','books.image','sections.sname','authors.aname') \n ->where('books.id',$id)\n ->get();\n\n\n\n return View('books.book-edit')\n ->with('book', $book)\n ->with('names', $names);\n \n \n }", "public function show(book $book)\n {\n return view('auth.book.show', compact('book'));\n }", "public function show($id)\n {\n $book = Book::find($id);\n $commentbook = Book::find($id)->commentsbooks->sortBy('created_at');\n $author = Book::find($id)->authors->sortBy('created_at');\n // dd($author);\n return view('books.show')->with('book', $book)\n ->with('commentsbooks', $commentbook)->with('authors', $author);\n }", "public function show($id) {\n\n $book = Book::find($id);\n\n return view('books.show')->withBook($book);\n }", "public function getBook()\n {\n return $this->book;\n }", "public function show($id)\n {\n return Book::find($id);\n }", "public function show(Book $book)\n {\n return $book\n ->load([\n 'createdBy' => function ($query) {\n $query->select('id', 'name');\n },\n 'updatedBy' => function ($query) {\n $query->select('id', 'name');\n },\n 'category' => function ($query) {\n return $query->select(['id', 'name']);\n },\n 'authors' => function ($query) {\n return $query->select(['authors.id', 'name']);\n },\n ]);\n }", "public function show($id)\n {\n $bookRequest = BookRequest::where(\"id\", $id)->first();\n if (!$bookRequest) {\n return redirect()->back()->with(\"error\", \"Book request not found\");\n }\n\n $user = Auth::user();\n\n if ($user->role->name == \"ROLE_LIBRARY\") {\n $librarian = Librarian::where(\"email\", $user->email)->first();\n $bookRequest->librarian_number = $librarian->librarian_number;\n $bookRequest->update();\n }\n\n return view(\"bookRequests.show\", [\"bookRequest\"=>$bookRequest]);\n }", "public function showABook(int $idBook){\n $sql=\"SELECT auteurs.nom as A_nom,categories_livres.nom AS C_nom,titre,categories_livres.id_catLivres as idCat,description,photo,quantite,id_livres,prix \n FROM livres\n JOIN auteurs USING (id_auteurs)\n JOIN categories_livres USING (id_catLivres)\n WHERE id_livres = ?;\";\n return $this->executeRequest($sql,[$idBook])->fetch(PDO::FETCH_ASSOC);\n }", "public function show($id)\n {\n return view('magazines.show',compact('book'));\n }", "public function getBookWithLink()\n {\n $bookTitle = Book::findOrFail($this->book_id)->title;\n return '<a href=\"' . url('admin/book/' . $this->book_id . '/show') . '\" target=\"_blank\">' . $bookTitle . '</a>';\n }", "public function show($id)\n {\n $book = Book::find($id);\n //return $book;\n return view('manager.books.show', compact('book'));\n }", "public function show($id)\n {\n //$bookinginfo = BookingInfo::findOrFail($id); //BookingInBookingInfo::findOrFail($id);\n $bookinginfo = DB::table('BookingInfo')->where('orderId', $id)->get()[0];\n //$bookinginfo = DB::table('BookingInfo')->get();\n return view('bookinginfos.show', compact('bookinginfo'));\n }", "public function detail($arg = false){\n \n $modelCategory = new CategoryDAO();\n $modelBook = new BookDAO();\n $modelAuthor = new AuthorDAO();\n \n \n $book = $modelBook->getBookByID($arg);\n $author = $modelAuthor->getAuthorByID($book->getAuthorId());\n $category = $modelCategory->getCategoryByID($book->getCategoryId());\n \n \n $this->view->author = $author;\n $this->view->book = $book;\n $this->view->category = $category;\n $this->view->render('index/detail');\n \n }", "public function get_detail($book_id)\n {\n try {\n $book = $this->_db_book->get_one_book($book_id);\n return view('lecturer.book.detail_book')\n ->with('book', $book);\n } catch (\\Exception $exception) {\n return $exception;\n }\n }", "public function show(BookableType $bookabletypes)\n\t{\n\t\tdd($bookabletypes);\n\t}" ]
[ "0.72299397", "0.72299397", "0.72299397", "0.7164678", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.70861953", "0.7026848", "0.67790616", "0.6714998", "0.66960555", "0.6641838", "0.65982467", "0.65982467", "0.6583174", "0.6583174", "0.6583174", "0.6583174", "0.6583174", "0.6583174", "0.6583174", "0.658198", "0.65185225", "0.6469484", "0.6462853", "0.6459886", "0.63872623", "0.63742936", "0.6372876", "0.6371658", "0.63712025", "0.6311704", "0.6295841", "0.6290351", "0.6289619", "0.6267891", "0.624361", "0.6215313", "0.6206487", "0.6195303", "0.61811465", "0.61741436", "0.6168901", "0.6164418", "0.6157721", "0.61533725", "0.6150176", "0.61489457", "0.61481994", "0.61237556", "0.6122103", "0.6113707", "0.6102321", "0.60965025", "0.6093471", "0.60913706", "0.6089434", "0.60790926", "0.60789406", "0.60680467", "0.60629094", "0.6062469", "0.60565174", "0.60522884", "0.604297", "0.6042082", "0.6039505", "0.603739", "0.60285807", "0.60190266", "0.6018562", "0.60159653", "0.601392", "0.60086876", "0.59767944", "0.5969817", "0.59694386", "0.59617466", "0.5953477", "0.5946502", "0.5939957", "0.59379524", "0.5936773", "0.59327316", "0.59290165", "0.5925465", "0.5917683", "0.59152013", "0.5914163", "0.59082055", "0.5900987", "0.58974415" ]
0.7621832
0
/ check for too long running crons and remove old jobs
Проверить наличие слишком долгих cron-задач и удалить старые задания
public function cleanup() { // old active crons $sql = "SELECT *, CONCAT(SUBSTRING(`arguments`,1,100), '...') AS 'arguments_short' FROM `".$this->table."` WHERE (`status` = 'starting' OR `status` = 'running') AND `start_from` < %d;"; $active_expiration = time() - (60*15); // 15 minutes - 3 cron executions $still_active_crons = mysql::select('array', $sql, $active_expiration); if ($still_active_crons) { $email_body = array( 'template' => 'cronjobs/still_active_cronjobs', 'data' => array( 'still_active_cronjobs' => array_values($still_active_crons), ), ); cron::mail(WEBMASTER, 'Sommige cronjobs zijn vastgelopen', $email_body); } // old done crons $sql = "DELETE FROM `".$this->table."` WHERE `status` = 'done' AND `start_from` < %d;"; $when_is_old = time() - (60*60*24*7); // one week mysql::query($sql, $when_is_old); $affected = mysql::$affected_rows; return $affected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_schedules_to_run() {\n\t\t$cron_time_running = time() - get_option('lepress-cron-is-running', 0);\n\t\tif(($jobs = $this->getJobs()) && $cron_time_running > 10) {\n\t\t\tforeach($jobs as $schedule_obj) {\n\t\t\t\tif($schedule_obj->scheduled_time <= time()) {\n\t\t\t\t\t$deleted = $this->delete_schedule($schedule_obj->hook);\n\t\t\t\t\tif($deleted) {\n\t\t\t\t\t\tdo_action($schedule_obj->hook);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdate_option('lepress-cron-is-running', time());\n\t\t}\n\t}", "function drupal_cron_cleanup() {\n // See if the semaphore is still locked.\n if (variable_get('cron_semaphore', FALSE)) {\n watchdog('cron', t('Cron run exceeded the time limit and was aborted.'), WATCHDOG_WARNING);\n\n // Release cron semaphore\n variable_del('cron_semaphore');\n }\n}", "function pt_remove() {\n\t\t$this->_clean_cron_array();\n\t}", "function cron_stop() {\n $cronjobs=(int)shell_exec('crontab -l|grep gdcbox_ |wc -l');\n echo \"<p>Currently $cronjobs device\" . ($cronjobs!=1?'s are':'is') . ' running</p>';\n $tmpfile='/tmp/gdcbox.' . getmypid();\n shell_exec('crontab -l|grep -v gdcbox_ > ' . $tmpfile);\n shell_exec('crontab ' . $tmpfile);\n unlink($tmpfile);\n }", "function poor_mans_cron_cleanup () : bool {\n\t$ran_cleanup = False;\n\tif (POOR_MAN_CRON_INTERVAL) {\n\t\t$mydir = dirname(__FILE__);\n\t\t$previous = file_get_contents($mydir.\"/lastrun.txt\");\n\t\tif (!$previous || time() - $previous >= POOR_MAN_CRON_INTERVAL * 60) {\n\t\t\t# Minimize race window for two scripts to run the cleanup at the same time\n\t\t\tfile_put_contents($mydir.\"/lastrun.txt\", time());\n\t\t\texec(\"sh \\\"$mydir/clean_files.sh\\\"\");\n\t\t\t$ran_cleanup = True;\n\t\t}\n\t}\n\treturn $ran_cleanup;\n}", "function daily_jobs()\n{\n /**\n * Cleaning reservation orphan uploaded files older than 1 hour\n */\n tbkg()->bus->dispatch(new CleanFiles(3600));\n\n /**\n * Removing old reservations from db\n */\n if (tbkg()->settings->reservation_records_lifecycle() > 0) {\n tbkg()->bus->dispatch(new DeletePastReservations(tbkg()->settings->reservation_records_lifecycle()));\n }\n}", "protected function schedulePruning()\n {\n $schedule = $this->app->make(Schedule::class);\n $schedule->call(new PruneStaleWysiwygFiles)->daily();\n }", "function cron_job_clear() {\n\t\twp_clear_scheduled_hook( 'spri_naver_cron_job' );\n\t}", "public function unset_cron_jobs()\n {\n\n do_action('wpbs_wc_unset_cron_jobs');\n\n }", "public static function cleanup()\n {\n $job_ids = static::existent_jobs();\n foreach ($job_ids as $job_id) {\n $job = new OCJob($job_id);\n $minimum_success_time = time() - static::$CACHE_SUCCESS;\n $minimum_failure_time = time() - static::$CACHE_FAILURE;\n if (($job->both_uploads_succeeded() && $job->created_at_time() < $minimum_success_time) ||\n (!$job->both_uploads_succeeded() && $job->created_at_time() < $minimum_failure_time)\n ) {\n $job->clear_files();\n }\n }\n }", "private function _checkRunningTasks()\n {\n foreach ($this->_runningTasks as $idx => $data) {\n /** @var \\Symfony\\Component\\Process\\Process $task */\n $task = $data['task'];\n if ($task->isRunning() && ((time() - $data['startTime']) > self::MAX_TASK_RUNTIME)) {\n $this->_getLogger()->log(\n sprintf('Max execution time exceed for process PID: %d. Terminating...', $task->getPid()),\n Zend_Log::ALERT\n );\n\n $task->stop(5);\n } elseif ($task->isTerminated()) {\n $this->_getLogger()->log(\n sprintf('Task PID: %d. Finished with exit code: %d', $task->getPid(), $task->getExitCode())\n );\n } else {\n continue;\n }\n\n unset($this->_runningTasks[$idx]);\n }\n }", "public function cron_process() {\n // Pass on a time out condition, that will be based on 'max_execution_time'\n $limit['timeout'] = variable_get('cron_semaphore', 0) + ini_get('max_execution_time') - self::TIME_MARGIN;\n $this->queue_process($limit);\n self::queue_expire_messages();\n self::queue_expire_logs();\n }", "static public function removeExpiredJobs() {\n\t\t$conditions = array(\n\t\t\t'expires' => array('$lte' => new MongoDate())\n\t\t);\n\t\t\n\t\t$cleaned = 0;\n\t\t$cleaned = Job::count($conditions);\n\t\t\n\t\tif(!Job::remove($conditions)) {\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\treturn $cleaned;\n\t}", "function cancelAll() {\n\n $db = getdb();\n\n # get tasks that will need to be killed\n $rv = $db->query(\"\n SELECT pid FROM tasks\n WHERE pid IS NOT NULL\n AND completed IS NULL\n AND dismissed IS NULL\n \");\n $running = array();\n while ($task = $rv->fetchArray(SQLITE3_ASSOC)) {\n\tarray_push($running, $task);\n }\n\n\n # mark everything as \"dismissed\" - we have to do this\n # before killing processes or do_tasks.php will pick up\n # the next one before we mark it\n $db_dismissed = $db->escapeString(time());\n # i think using a transaction lets us release the file lock sooner XXX test that\n $db->exec(\"BEGIN\");\n $db->exec(\"\n UPDATE tasks SET\n dismissed = '$db_dismissed'\n WHERE dismissed IS NULL\n \");\n $db->exec(\"COMMIT\");\n\n # now we go back and kill any processes that were actually running\n # -- there's probably only one, but we loop it just in case\n foreach ($running as $task) {\n # the process will be a subprocess of a shell (sh -c rsync)\n # so we have to use pkill -P, which kills children of a given process\n exec(\"pkill -P $task[pid]\", $output, $rval);\n }\n\n header(\"HTTP/1.1 200 OK\");\n header(\"Content-Type: application/json\");\n echo \"{ \\\"status\\\" : \\\"OK\\\" }\\n\";\n exit;\n\n}", "public function cron()\n {\n if (Settings::get(\"lock_inactive_users/enable\")) {\n // Use better_cron if installed to run the cronjob in a regular interval\n if (class_exists(\"BetterCron\")) {\n BetterCron::days(\n \"lock_inactive_users/cron\",\n 1,\n function () {\n $this->deleteExpiredUsers();\n }\n );\n } else {\n // if better_cron is not installed run the cronjob on every page load\n // this may have a negative effect on site performance\n $this->deleteExpiredUsers();\n }\n }\n }", "function drush_file_cron() {\n set_time_limit(0);\n file_cron();\n drush_print(dt('A cron run has been completed.'));\n}", "public function cron_jobs() {\n \n }", "public function cron_jobs() {\n \n }", "public function cron_jobs() {\n \n }", "static function cleanupEntries(){\n $time = RDR_Setting::get(\"maxentrylifetime\")->value;\n if(!$time) return;\n $updated = false;\n while(true){\n $tmp = RDR_Entry::getByCondition(\"datetime < {0}\", array(dt(\"now $time\")), null, 1000);\n if(!$tmp) break;\n db()->deleteMultiple($tmp);\n $updated = true;\n }\n # after deleting some entries update readed/saved flags\n if($updated) self::cleanupFlags();\n }", "function _cleanUpExpiredTickets()\r\n\t{\r\n\t\t// remove tickets older than 1 hour\r\n\t\t$oldTime = time() - 60 * 60;\r\n\t\t$query = 'DELETE FROM ' . sql_table('tickets'). ' WHERE ctime < \\'' . date('Y-m-d H:i:s',$oldTime) .'\\'';\r\n\t\tsql_query($query);\r\n\t}", "public function findHistoryCleanupJobs(): array;", "public function gc()\n {\n $this->crons->gcLogs();\n }", "protected function purgeWorkers()\n {\n foreach ($this->workers as $worker) {\n if (empty($worker->expires_at) || microtime(true) > $worker->expires_at) {\n $this->deleteWorker($worker);\n }\n\n }\n }", "public function remove_shedules() {\n\t\t\twp_clear_scheduled_hook( 'monstroid_scheduled_update' );\n\t\t}", "private function removeActiveProcessesOlderThanOneHour() {\n\t\t$results = $this->db->exec_SELECTgetRows(\n\t\t\t'process_id, system_process_id',\n\t\t\t'tx_crawler_process',\n\t\t\t'ttl <= ' . intval(time() - $this->extensionSettings['processMaxRunTime'] - 3600) . ' AND active = 1'\n\t\t\t);\n\n\t\tif (!is_array($results)) {\n\t\t\treturn;\n\t\t}\n\t\tforeach ($results as $result) {\n\t\t\t$systemProcessId = (int)$result['system_process_id'];\n\t\t\t$processId = $result['process_id'];\n\t\t\tif ($systemProcessId > 1) {\n\t\t\t\tif ($this->doProcessStillExists($systemProcessId)) {\n\t\t\t\t\t$this->killProcess($systemProcessId);\n\t\t\t\t}\n\t\t\t\t$this->removeProcessFromProcesslist($processId);\n\t\t\t}\n\t\t}\n\t}", "private static function create_cron_jobs()\n {\n }", "public function checkCronSetup()\n {\n if ((!get_transient('doing_cron') && $this->options['crons_setup'] < 1439005906)\n || $this->options['crons_setup_on_namespace'] !== __NAMESPACE__\n || $this->options['crons_setup_with_cache_cleanup_schedule'] !== $this->options['cache_cleanup_schedule']\n || $this->options['crons_setup_on_wp_with_schedules'] !== sha1(serialize(wp_get_schedules()))\n || !wp_next_scheduled('_cron_'.GLOBAL_NS.'_cleanup')\n \n ) {\n wp_clear_scheduled_hook('_cron_'.GLOBAL_NS.'_cleanup');\n wp_schedule_event(time() + 60, $this->options['cache_cleanup_schedule'], '_cron_'.GLOBAL_NS.'_cleanup');\n\n \n\n $this->updateOptions(\n [\n 'crons_setup' => time(),\n 'crons_setup_on_namespace' => __NAMESPACE__,\n 'crons_setup_with_cache_cleanup_schedule' => $this->options['cache_cleanup_schedule'],\n 'crons_setup_on_wp_with_schedules' => sha1(serialize(wp_get_schedules())),\n ]\n );\n }\n }", "function ossdl_off_cronjob() {\n\tossdl_off_update_data_from_upstream();\n\tif (get_option('arcostream_subscribe_fragment')) {\n\t\tdelete_option('arcostream_subscribe_fragment');\n\t}\n}", "function _deactivation() {\n\t\t\t//trun off the cron jobs\n\t\t}", "public function remove_expired_exports() {\n\n\t\t$args = array(\n\t\t\t'status' => array( 'completed', 'failed' ),\n\t\t);\n\n\t\t// get all completed or failed jobs\n\t\t$all_jobs = $this->get_exports( $args );\n\n\t\tif ( empty( $all_jobs ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// loop over the jobs and find those that should be removed\n\t\tforeach ( $all_jobs as $job ) {\n\n\t\t\t$date = 'completed' === $job->status ? $job->completed_at : $job->failed_at;\n\n\t\t\t// job completed/failed at least 14 days ago, remove it (along with the file)\n\t\t\tif ( strtotime( $date ) <= strtotime( '14 days ago' ) ) {\n\t\t\t\t$this->get_background_export_handler()->delete_job( $job );\n\t\t\t}\n\t\t}\n\t}", "function drupal_cron_run() {\n // If not in 'safe mode', increase the maximum execution time:\n if (!ini_get('safe_mode')) {\n set_time_limit(240);\n }\n\n // Fetch the cron semaphore\n $semaphore = variable_get('cron_semaphore', FALSE);\n\n if ($semaphore) {\n if (time() - $semaphore > 3600) {\n // Either cron has been running for more than an hour or the semaphore\n // was not reset due to a database error.\n watchdog('cron', t('Cron has been running for more than an hour and is most likely stuck.'), WATCHDOG_ERROR);\n\n // Release cron semaphore\n variable_del('cron_semaphore');\n }\n else {\n // Cron is still running normally.\n watchdog('cron', t('Attempting to re-run cron while it is already running.'), WATCHDOG_WARNING);\n }\n }\n else {\n // Register shutdown callback\n register_shutdown_function('drupal_cron_cleanup');\n\n // Lock cron semaphore\n variable_set('cron_semaphore', time());\n\n // Iterate through the modules calling their cron handlers (if any):\n module_invoke_all('cron');\n\n // Record cron time\n variable_set('cron_last', time());\n watchdog('cron', t('Cron run completed.'), WATCHDOG_NOTICE);\n\n // Release cron semaphore\n variable_del('cron_semaphore');\n\n // Return TRUE so other functions can check if it did run successfully\n return TRUE;\n }\n}", "public static function check_cron()\n {\n // Get next scheduled event timestamp\n $scheduled = wp_next_scheduled('woochimp_process_scheduled_events');\n\n // Get current timestamp\n $timestamp = time();\n\n // Cron is set and is valid\n if ($scheduled && $scheduled <= ($timestamp + 600)) {\n return;\n }\n\n // Remove all cron entries by key\n wp_clear_scheduled_hook('woochimp_process_scheduled_events');\n\n // Add new cron entry\n wp_schedule_event(time(), 'woochimp_five_minutes', 'woochimp_process_scheduled_events');\n }", "public function check_for_dead_jobs()\n\t{\n\t\texec('ps -e', $output);\n\t\t$cur_pids = array();\n\t\tforeach ($output as $line) {\n\t\t\tif (preg_match(\"/^\\s*(\\d+) /\", $line, $matches)) {\n\t\t\t\t$pid = $matches[1];\n\t\t\t\t$cur_pids[$pid] = 1;\n\t\t\t}\n\t\t}\n\n\t\t$jobs = job::get_all(array(\n\t\t\t'select' => \"id, process_id\",\n\t\t\t'where' => \" job.hostname = :hostname && status in (:running_stati)\",\n\t\t\t'data' => array(\n\t\t\t\t\"hostname\" => \\epro\\HOSTNAME,\n\t\t\t\t\"running_stati\" => job::$running_stati\n\t\t\t)\n\t\t));\n\t\tforeach ($jobs as $job) {\n\t\t\tif (!array_key_exists($job->process_id, $cur_pids)) {\n\t\t\t\t$job->error('Unexpected Fatal Error');\n\t\t\t}\n\t\t}\n\t}", "function deactivation() {\n\t\t$this->cron_job_clear();\n\t}", "function cron_velocity_daily_remove() {\n wp_clear_scheduled_hook('cron_velocity_daily');\n}", "static public function cleanUpWorker() {\n\t\t$workers = self::getWorkerDetails();\n\t\tforeach ($workers as $id => $data) {\n\t\t\tif (empty($data) || (isset($data['heartbeat']) && $data['heartbeat'] < time() - (90))) {\n\t\t\t\tSysLog::notice('cleanup: '.$id);\n\t\t\t\tself::unregisterWorker($id);\n\t\t\t}\n\t\t}\n\t}", "public function removeUpdaterCron() {\n\t\t\twp_clear_scheduled_hook($this->cronHook);\n\t\t}", "function unschedule_events($hook)\n{\n $crons = get_option('cron');\n\n foreach ($crons as $time => $cron) {\n if (isset($cron[$hook])) {\n unset($crons[$time][$hook]);\n }\n }\n\n update_option('cron', $crons);\n}", "function delete_jail_finish()\r\n\t\t{\r\n\t\t\t $time = time();\r\n\r\n\t\t\t $result = mysql_query(\"select action_time from `check` where `jail` = '1' and `users_id` = '{$_SESSION['SP_USER_ID']}' LIMIT 1\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t if($row = mysql_fetch_object($result))\r\n\t\t\t\t if(FUNCTIONS::get_date_min($row->action_time) >= 5){ // after 1 min\r\n\t\t\t\t\t mysql_query(\"DELETE FROM `actions` WHERE `type` = 'jail' and `users_id` = '{$_SESSION['SP_USER_ID']}'\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t\t\t mysql_query(\"update `check` set `jail` = '0' where `users_id` = '{$_SESSION['SP_USER_ID']}'\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t }\r\n\t\t}", "function cleanUp()\n {\n $days = (int)Am_Di::getInstance()->config->get('email_log_days', 0);\n Am_Di::getInstance()->db->query(\"DELETE FROM ?_mail_queue\n WHERE added <= ?d AND sent IS NOT NULL\", Am_Di::getInstance()->time - 3600*24*$days);\n }", "public static function try_reupload_old_jobs(){\n $job_ids = static::existent_jobs();\n foreach ($job_ids as $job_id) {\n $job = new OCJob($job_id);\n echo \"Versuche Upload von '\".$job_id.\"'...\";\n $job->try_upload_to_opencast();\n echo \"Beende Upload von '\".$job_id.\"'...\";\n }\n }", "public function runCron()\n {\n if( ! Mage::getStoreConfigFlag('system/mongo_queue/enabled')) {\n return;\n }\n $limit = (int) Mage::getStoreConfig('system/mongo_queue/limit');\n $time = (int) Mage::getStoreConfig('system/mongo_queue/time');\n Mage::helper('mongo/queue')->runQueue($limit, $time);\n }", "function _crons()\n {\n\t\n\t}", "public function scheduleExpire() {\n // Schedule as soon as possible if a batch is active.\n $period = $this->progressExpiring() === FEEDS_BATCH_COMPLETE ? 3600 : 0;\n\n $job = array(\n 'type' => $this->id,\n 'id' => $this->feed_nid,\n 'period' => $period,\n 'periodic' => TRUE,\n );\n if ($this->importer->processor->expiryTime() == FEEDS_EXPIRE_NEVER) {\n JobScheduler::get('feeds_source_expire')->remove($job);\n }\n else {\n JobScheduler::get('feeds_source_expire')->set($job);\n }\n }", "function uninstall($parent) \n\t{\n\t\t//Delete cron tabs\n\t\texec('crontab -r');\n\t}", "function tptn_disable_run() {\n\tif ( wp_next_scheduled( 'tptn_cron_hook' ) ) {\n\t\twp_clear_scheduled_hook( 'tptn_cron_hook' );\n\t}\n}", "public static function cleaner() {\n\t\t\tglobal $wpdb;\n\n\t\t\t$timestamp = time() - 24 * HOUR_IN_SECONDS; // expired x hours ago.\n\t\t\t$time_start = time();\n\t\t\t$time_limit = 30;\n\t\t\t$batch = 100;\n\n\t\t\t// @todo Look at site transients too.\n\t\t\t// Don't take longer than $time_limit seconds.\n\t\t\twhile ( time() < $time_start + $time_limit ) {\n\t\t\t\t$option_names = $wpdb->get_col( \"SELECT `option_name` FROM {$wpdb->options} WHERE `option_name` LIKE '\\_transient\\_timeout\\_%'\n\t\t\t\t\tAND CAST(`option_value` AS UNSIGNED) < {$timestamp} LIMIT {$batch};\" );\n\n\t\t\t\tif ( empty( $option_names ) )\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Add transient keys to transient timeout keys.\n\t\t\t\tforeach ( $option_names as $key => $option_name )\n\t\t\t\t\t$option_names[] = '_transient_' . substr( $option_name, 19 );\n\n\t\t\t\t// Create a list to use with MySQL IN().\n\t\t\t\t$options_in = implode( ', ', array_map( function( $item ) use ( $wpdb ) {\n\t\t\t\t\treturn $wpdb->prepare( '%s', $item );\n\t\t\t\t}, $option_names ) );\n\n\t\t\t\t// Delete transient and transient timeout fields.\n\t\t\t\t$wpdb->query( \"DELETE FROM {$wpdb->options} WHERE `option_name` IN ({$options_in});\" );\n\n\t\t\t\t// Break if no more deletable options available.\n\t\t\t\tif ( count( $option_names ) < $batch * 2 )\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function syncJobs()\n {\n $ids = array();\n foreach ($this->jobs as $attributes)\n {\n if (!isset($attributes['class']))\n {\n throw new Exception('Job needs to define a class');\n }\n\n if (!isset($attributes['crontab']))\n {\n throw new Exception('Job needs to define a crontab value');\n }\n\n $model = Job::find()->where('job_class=:job_class AND crontab IS NOT NULL',['job_class'=>$attributes['class']])->one();\n if (!$model)\n {\n $model = new Job;\n $model->job_class = $attributes['class'];\n }\n elseif ($model->job_status_id == JobStatus::RUNNING)\n {\n $ids[] = $model->z_PRIMARY_KEY;\n //do not sync a job which is currently running, we do not want to break it\n continue;\n }\n\n $oldCrontab = $model->crontab;\n\n unset($attributes['class']);\n\n $model->setAttributes($attributes);\n\n if ($attributes['crontab'] != $oldCrontab)\n $model->calculateNextPlannedTime();\n\n $this->addJob($model, false);\n\n $ids[] = $model->z_PRIMARY_KEY;\n }\n\n //delete all jobs with crontab entry that were not modified during the loop before\n if(!empty($ids))\n Job::deleteAll(\"`crontab` IS NOT NULL AND id=:id\",[':id' => $ids]);\n }", "public function clearCronSchedule(): void\n {\n wp_clear_scheduled_hook( $this->getHook() );\n }", "public function execute() {\n if (self::configUpdatedMoreRecentlyThanCron()) {\n CronManager::updateCron($this->jobs);\n }\n }", "public function cron_delete_unverified_company_email_change_request(){\n\t\t$q = \"update \".TP.\"member set future_company_name='',future_work_email='',future_year_joined='',future_designation='',future_division='',future_country='',future_requested_on='0000-00-00 00:00:00',future_validation_token='',future_validation_email_sent_on='0000-00-00 00:00:00',future_validation_email_sent_count='0' where future_validation_email_sent_count>=2\";\n\t\tmysql_query($q);\n\t\t\n\t\t/*****************\n\t\tsng:23/sep/2011\n\t\tso we have cleaned out the work email/ company change requests for which 2 remainders have been sent\n\t\tfor the rest, we send a remainder\n\t\tWe get the mem_id, future_work_email and the token and update the future_validation_email_sent_on to current datetime\n\t\tand increase the future_validation_email_sent_count\n\t\t\n\t\tfuture_validation_email_sent_on!='0000-00-00 00:00:00' means there is a change request\n\t\t*********************/\n\t\tglobal $g_http_path, $g_mc;\n\t\t\n\t\t$q = \"select mem_id,f_name,l_name,future_work_email,future_validation_token from \".TP.\"member where future_validation_email_sent_on!='0000-00-00 00:00:00'\";\n\t\t$res = mysql_query($q);\n\t\tif(!$res){\n\t\t\treturn false;\n\t\t}\n\t\trequire_once(\"classes/class.sitesetup.php\");\n\t\tglobal $g_site;\n\t\t$admin_data = array();\n\t\t$success = $g_site->get_site_emails($admin_data);\n\t\tif(!$success){\n\t\t\treturn false;\n\t\t}\n\t\t$admin_email = $admin_data['registration_email'];\n\t\trequire_once(\"classes/class.mailer.php\");\n\t\t\n\t\twhile($row = mysql_fetch_assoc($res)){\n\t\t\t$to = $row['future_work_email'];\n\t\t\t$subject = \"data-cx.com company / work email change validation email\";\n\t\t\t$message = \"Dear \".$g_mc->db_to_view($row['f_name']).\" \".$g_mc->db_to_view($row['l_name']).\"\\r\\n\\r\\n\";\n\t\t\t$message.=\"This is a reminder. Your request to update the work email/company has been accepted. Please type the following url in your browser and visit the site. to update your member record.\\r\\n\";\n\t\t\t//we do not send the mem_id because we will get that from session when member logs in and comes here\n\t\t\t$message.=$g_http_path.\"/update_company_email_change.php?token=\".$row['future_validation_token'].\"\\r\\n\";\n\t\t\t$message.=\"If you have received this message in Error, or believe someone is trying to change your profile on Deal-data, please send us a message so we can investigate this unauthorised behaviour.\\r\\n\\r\\n\";\n\t\t\t\n\t\t\t$headers = \"\";\n\t\t\t$headers .= \"From: \".$admin_email.\"\\r\\n\";\n\t\t\t$message.=\"Thanks,\\r\\n\\r\\n\";\n\t\t\t$message.=$admin_email;\n\t\t\t/***\n\t\t\tsng:29/july/2010\n\t\t\tSet the sender same as From\n\t\t\t***/\n\t\t\t/******\n\t\t\tsng:12/oct/2010\n\t\t\tuse the mailer class\n\t\t\t******/\n\t\t\t$mailer = new mailer();\n\t\t\t$mail_ok = $mailer->mail($to,$subject,$message);\n\t\t\tif($mail_ok){\n\t\t\t\t//set the mail sending time\n\t\t\t\t$now = date(\"Y-m-d H:i:s\");\n\t\t\t\t$updt_q = \"UPDATE \".TP.\"member set future_validation_email_sent_on='\".$now.\"', future_validation_email_sent_count=future_validation_email_sent_count+1 WHERE mem_id='\".$row['mem_id'].\"'\";\n\t\t\t\tmysql_query($updt_q);\n\t\t\t\techo \"sent remainder to id: \".$row['mem_id'].PHP_EOL;\n\t\t\t\t//bad luck if data not updated, continue\n\t\t\t}else{\n\t\t\t\t//continue\n\t\t\t}\n\t\t}\n\t}", "protected function checkMaxExecutionTime() {}", "public function scheduleClear() {\n $job = array(\n 'type' => $this->id,\n 'id' => $this->feed_nid,\n 'period' => 0,\n 'periodic' => TRUE,\n );\n // Remove job if batch is complete.\n if ($this->progressClearing() === FEEDS_BATCH_COMPLETE) {\n JobScheduler::get('feeds_source_clear')->remove($job);\n }\n // Schedule as soon as possible if batch is not complete.\n else {\n JobScheduler::get('feeds_source_clear')->set($job);\n }\n }", "public function cron($timeLimit = self::CRON_EXEC_TIME, $workerID = self::WORKER_ID);", "function delete_schedule($hook) {\n\t\treturn $this->wpdb->query('DELETE FROM '.$this->cron_table.' WHERE hook=\"'.esc_sql($hook).'\"');\n\t}", "function jobWorker($hardcron = false)\n {\n $btc_addresses_table_name = 'btcaddresses';\n\n $funds_received_value_expires_in_secs = 240 * 60;\n $assigned_address_expires_in_secs = 240 * 60;\n $confirmations_required = 4;\n\n $clean_address = NULL;\n $current_time = time();\n\n // Search for completed orders (addresses that received full payments for their orders) ...\n // NULL == not found\n // Retrieve:\n // 'assigned' - unexpired, with old balances (due for revalidation. Fresh balances and still 'assigned' means no [full] payment received yet)\n // 'revalidate' - all\n // order results by most recently assigned\n $query = \"SELECT * FROM `$btc_addresses_table_name`\n\t\t WHERE\n\t\t (\n\t\t\t(`status`='assigned' AND (('$current_time' - `assigned_at`) < '$assigned_address_expires_in_secs'))\n\t\t\tOR\n\t\t\t(`status`='revalidate')\n\t\t )\n\t\t AND (('$current_time' - `received_funds_checked_at`) > '$funds_received_value_expires_in_secs')\n\t\t ORDER BY `received_funds_checked_at` ASC;\"; // Check the ones that haven't been checked for longest time\n $rows_for_balance_check = DB::select($query);\n\n if (is_array($rows_for_balance_check)) $count_rows_for_balance_check = count($rows_for_balance_check);\n else $count_rows_for_balance_check = 0;\n\n if (is_array($rows_for_balance_check))\n {\n $ran_cycles = 0;\n foreach ($rows_for_balance_check as $row_for_balance_check)\n {\n $ran_cycles++; // To limit number of cycles per soft cron job.\n // Prepare 'address_meta' for use.\n $address_meta = $this->unserializeAddressMeta(@$row_for_balance_check->address_meta);\n\n $address_request_array = array();\n $address_request_array['address_meta'] = $address_meta;\n\n // Retrieve current balance at address considering required confirmations number and api_timemout value.\n $address_request_array['btc_address'] = $row_for_balance_check->btc_address;\n $address_request_array['required_confirmations'] = 4;\n $address_request_array['api_timeout'] = 30;\n $balance_info_array = $this->getReceivedbyaddress($address_request_array);\n\n $last_order_info = @$address_request_array['address_meta']['orders'][0];\n $row_id = $row_for_balance_check->id;\n\n if ($balance_info_array['result'] == 'success')\n {\n /*\n $balance_info_array = array (\n 'result' => 'success',\n 'message' => \"\",\n 'host_reply_raw' => \"\",\n 'balance' => $funds_received,\n );\n */\n\n // Refresh 'received_funds_checked_at' field\n $current_time = time();\n\t\t\t\t\t$query = \"UPDATE `$btc_addresses_table_name`\n\t\t\t\t\t SET\n\t\t\t\t\t\t`total_received_funds` = '{$balance_info_array['balance']}',\n\t\t\t\t\t\t`received_funds_checked_at`='$current_time'\n\t\t\t\t\tWHERE `id`='$row_id';\";\n $ret_code = DB::statement($query);\n\n if ($balance_info_array['balance'] > 0)\n {\n\n if ($row_for_balance_check['status'] == 'revalidate')\n {\n // Address with suddenly appeared balance. Check if that is matching to previously-placed [likely expired] order\n if (!$last_order_info || !@$last_order_info['order_id'] || !@$balance_info_array['balance'] || !@$last_order_info['order_total'])\n {\n // No proper metadata present. Mark this address as 'xused' (used by unknown entity outside of this application) and be done with it forever.\n $query = \"UPDATE `$btc_addresses_table_name`\n\t\t\t\t\t\t\t\t SET\n\t\t\t\t\t\t\t\t\t `status` = 'xused'\n\t\t\t\t\t\t\t\t WHERE `id`='$row_id';\";\n $ret_code = DB::statement($query);\n continue;\n }\n else\n {\n // Metadata for this address is present. Mark this address as 'assigned' and treat it like that further down...\n $query = \"UPDATE `$btc_addresses_table_name`\n\t\t\t\t\t\t\t\t SET\n\t\t\t\t\t\t\t\t\t `status` = 'assigned'\n\t\t\t\t\t\t\t\t WHERE `id`='$row_id';\";\n $ret_code = DB::statement($query);\n }\n }\n\n }\n else\n {\n\n }\n\n // Note: to be perfectly safe against late-paid orders, we need to:\n //\tScan '$address_meta['orders']' for first UNPAID order that is exactly matching amount at address.\n if ($balance_info_array['balance'] >= $last_order_info['order_total'])\n {\n // Process full payment event\n /*\n $address_meta =\n array (\n 'orders' =>\n array (\n // All orders placed on this address in reverse chronological order\n array (\n 'order_id' => $order_id,\n 'order_total' => $order_total_in_btc,\n 'order_datetime' => date('Y-m-d H:i:s T'),\n 'requested_by_ip' => @$_SERVER['REMOTE_ADDR'],\n ),\n array (\n ...\n ),\n ),\n 'other_meta_info' => array (...)\n );\n */\n\n // Update order' meta info\n $address_meta['orders'][0]['paid'] = true;\n\n // Process and complete the order within WooCommerce (send confirmation emails, etc...)\n IOrder::processPaymentCompleted($last_order_info['order_id'], $balance_info_array['balance']);\n\n // Update address' record\n // Update DB - mark address as 'used'.\n //\n $current_time = time();\n\n // Note: `total_received_funds` and `received_funds_checked_at` are already updated above.\n //\n // ,`address_meta`='$address_meta_serialized'\n $query = \"UPDATE `$btc_addresses_table_name`\n\t\t\t\t\t\t SET\n\t\t\t\t\t\t\t`status`='used'\n\t\t\t\t\t\tWHERE `id`='$row_id';\";\n $ret_code = DB::statement($query);\n\n // This is not needed here. Let it process as many orders as are paid for in the same loop.\n // Maybe to be moved there --> //..// (to avoid soft-cron checking of balance of hundreds of addresses in a same loop)\n //\n // \t //\tReturn here to avoid overloading too many processing needs to one random visitor.\n // \t //\tThen it means no more than one order can be processed per 2.5 minutes (or whatever soft cron schedule is).\n // \t //\tHard cron is immune to this limitation.\n // \t if (!$hardcron && $ran_cycles >= $bwwc_settings['soft_cron_max_loops_per_run'])\n // \t {\n // \t \treturn;\n // \t }\n \n }\n }\n else\n {\n\n }\n //..//\n \n }\n }\n\n // Process all 'revalidate' addresses here.\n // ...\n //-----------------------------------------------------\n // Pre-generate new bitcoin address for electrum wallet\n // Try to retrieve mpk from copy of settings.\n if ($hardcron)\n {\n $electrum_mpk = $this->getNextAvailableMpk();\n\n // Calculate number of unused addresses belonging to currently active electrum wallet\n $origin_id = $electrum_mpk;\n\n $current_time = time();\n $assigned_address_expires_in_secs = 240 * 60;\n\n if ($this->reuse_expired_addresses) $reuse_expired_addresses_query_part = \"OR (`status`='assigned' AND (('$current_time' - `assigned_at`) > '$assigned_address_expires_in_secs'))\";\n\n // Calculate total number of currently unused addresses in a system. Make sure there aren't too many.\n // NULL == not found\n // Retrieve:\n // 'unused' - with fresh zero balances\n // 'assigned' - expired, with fresh zero balances (if 'reuse_expired_addresses' is true)\n //\n // Hence - any returned address will be clean to use.\n $query = \"SELECT COUNT(*) as `total_unused_addresses` FROM `$btc_addresses_table_name`\n WHERE `origin_id`='$origin_id'\n AND `total_received_funds`='0'\n AND (`status`='unused' $reuse_expired_addresses_query_part)\n \";\n $total_unused_addresses = DB::select($query);\n\t\t\tif ($total_unused_addresses && count($total_unused_addresses)) {\n\t\t\t\t$total_unused_addresses = $total_unused_addresses[0]->total_unused_addresses;\t\n\t\t\t} else {\n\t\t\t\t$total_unused_addresses = 0;\n\t\t\t}\n\n if ($total_unused_addresses < 200)\n {\n $this->generateNewBitcoinAddress($electrum_mpk);\n }\n\n }\n //-----------------------------------------------------\n \n }", "private function blacklist_cron_event_hooks() {\n\n\t\tglobal $wpdb, $wpaas_cron_event_temp_blacklist;\n\n\t\t$blacklist = [\n\t\t\t'wp_version_check',\n\t\t];\n\n\t\t// Get temporary blacklist transients\n\t\t$transients = (array) $wpdb->get_results(\n\t\t\t\"SELECT\n\t\t\toption_name,\n\t\t\toption_value\n\t\t\tFROM {$wpdb->options}\n\t\t\tWHERE option_name\n\t\t\tLIKE '_transient_wpaas_skip_cron_%';\"\n\t\t);\n\n\t\t// Scrub array of key prefixes and expired transients\n\t\tforeach ( $transients as $key => $transient ) {\n\n\t\t\t$transients[ $key ]->option_name = preg_filter( '/^_transient_/', '', $transient->option_name );\n\n\t\t\tif ( false === get_transient( $transient->option_name ) ) {\n\n\t\t\t\tunset( $transients[ $key ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Store in global, used by 'cron event wpaas reset' subcommand\n\t\t$wpaas_cron_event_temp_blacklist = array_combine(\n\t\t\twp_list_pluck( $transients, 'option_name' ),\n\t\t\twp_list_pluck( $transients, 'option_value' )\n\t\t);\n\n\t\t// Merge temporary blacklist into core blacklist\n\t\t$blacklist = array_merge( $blacklist, array_values( $wpaas_cron_event_temp_blacklist ) );\n\n\t\t// Remove blacklisted events from the crons array\n\t\tadd_filter( 'option_cron', function( $crons ) use ( $blacklist ) {\n\n\t\t\tif ( ! $crons ) {\n\n\t\t\t\treturn $crons;\n\n\t\t\t}\n\n\t\t\tforeach ( (array) $crons as $timestamp => $events ) {\n\n\t\t\t\tforeach ( (array) $events as $hook => $event ) {\n\n\t\t\t\t\tif ( in_array( $hook, $blacklist ) ) {\n\n\t\t\t\t\t\tunset( $crons[ $timestamp ][ $hook ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( ! $events ) {\n\n\t\t\t\t\tunset( $crons[ $timestamp ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn (array) $crons;\n\n\t\t}, PHP_INT_MAX );\n\n\t}", "public function test_remove_all_schedules() {\n\t\t\twp_schedule_event( 1, 'minute', 'gf_digest_send_notifications', array( 'unknown' ) );\n\t\t\twp_schedule_event( 2, 'hourly', 'gf_digest_send_notifications', array( 1 ) );\n\n\t\t\t$this->digest->remove_schedules();\n\n\t\t\tforeach ( _get_cron_array() as $schedule )\n\t\t\t\t$this->assertArrayNotHasKey( 'gf_digest_send_notifications', $schedule );\n\t\t}", "static public function run()\n {\n $queueItems = Mage::getResourceModel('sveacheckout/queue_collection');\n\n foreach ($queueItems as $item) {\n $itemDate = strtotime($item->getData('STAMP_CR_DATE'));\n $deleteNewLimit = strtotime('+2 days', $itemDate);\n $deleteOldLimit = strtotime('+1 month', $itemDate);\n\n if ($deleteNewLimit <= time()) {\n self::deleteNewAndFinished($item);\n }\n\n if ($deleteOldLimit <= time()) {\n self::deleteOldAndErrors($item);\n }\n }\n }", "function ossdl_off_reschedule_cronjob($account_status) {\n\tif (wp_next_scheduled('ossdl_off_periodic_checks')) {\n\t\twp_clear_scheduled_hook('ossdl_off_periodic_checks');\n\t}\n\n\tif ($account_status == 'pending') {\n\t\t// although 'hourly' is set, it is actually every 15 minutes\n\t\twp_schedule_event(time() + 15*60, 'hourly', 'ossdl_off_periodic_checks');\n\t} else if ($account_status != 'unknown') { // 'ok' or anything other (e.g. 'suspended')\n\t\twp_schedule_event(time() + 12*60*60, 'twicedaily', 'ossdl_off_periodic_checks');\n\t}\n}", "private function add_cron_restrictions() {\n\n\t\t/**\n\t\t * If the wp_version_check cron was ever scheduled before\n\t\t * we unschedule it since we are on a managed platform.\n\t\t */\n\t\tif ( false !== wp_next_scheduled( 'wp_version_check' ) ) {\n\n\t\t\twp_clear_scheduled_hook( 'wp_version_check' );\n\n\t\t}\n\n\t\tadd_filter( 'schedule_event', function ( $event ) {\n\n\t\t\t$blacklisted_hooks = [\n\t\t\t\t'wp_version_check',\n\t\t\t\t'wp_maybe_auto_update',\n\t\t\t];\n\n\t\t\tif ( ! isset( $event->hook ) || in_array( $event->hook, $blacklisted_hooks ) ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t\treturn $event;\n\n\t\t} );\n\n\t}", "public static function cleanup() {\n global $CFG, $DB;\n\n // Delete logs older than the retention period.\n $params = [\n 'retentionperiod' => time() - $CFG->task_logretention,\n ];\n $logids = $DB->get_fieldset_select('task_log', 'id', 'timestart < :retentionperiod', $params);\n self::delete_task_logs($logids);\n\n // Delete logs to retain a minimum number of logs.\n $sql = \"SELECT classname FROM {task_log} GROUP BY classname HAVING COUNT(classname) > :retaincount\";\n $params = [\n 'retaincount' => $CFG->task_logretainruns,\n ];\n $classes = $DB->get_fieldset_sql($sql, $params);\n\n foreach ($classes as $classname) {\n $notinsql = \"\";\n $params = [\n 'classname' => $classname,\n ];\n\n $retaincount = (int) $CFG->task_logretainruns;\n if ($retaincount) {\n $keeplogs = $DB->get_records('task_log', [\n 'classname' => $classname,\n ], 'timestart DESC', 'id', 0, $retaincount);\n\n if ($keeplogs) {\n list($notinsql, $params) = $DB->get_in_or_equal(array_keys($keeplogs), SQL_PARAMS_NAMED, 'p', false);\n $params['classname'] = $classname;\n $notinsql = \" AND id {$notinsql}\";\n }\n }\n\n $logids = $DB->get_fieldset_select('task_log', 'id', \"classname = :classname {$notinsql}\", $params);\n self::delete_task_logs($logids);\n }\n }", "public function purgeDelayed();", "public function clean()\n {\n $collectionOfOldies = Mage::getModel('klarna/pushlock')->getCollection()\n ->addFieldToFilter('created_at', array(\n 'to' => $this->getMaximumAllowedAge()\n ));\n\n if (count($collectionOfOldies)) {\n $this->delete($collectionOfOldies);\n }\n\n Mage::log(\"Routine for cleaning of klarna_pushlock table finished.\", null, 'kl_klarna.log');\n }", "public function handle_cron_healthcheck()\n {\n }", "public function handle_cron_healthcheck()\n {\n }", "public function migrateExpired(): void\n {\n $redis = $this->getConnection();\n\n $redis->eval(\n LuaScripts::migrateExpiredJobs(),\n 2,\n \"{$this->channelPrefix}{$this->channel}:delayed\",\n \"{$this->channelPrefix}{$this->channel}:waiting\",\n time()\n );\n }", "function neurok_cron () {\n return false;\n}", "private function cleanupQueue()\n\t{\n\t\tglobal $wpdb;\n\t\t$table = $wpdb->prefix . 'awspurge_links';\n\t\t$wpdb->query(\"DELETE FROM $table WHERE status = '2'\");\n\t}", "public function checkRunningImport()\n\t{\n $syncTableName = Mage::getSingleton('core/resource')->getTableName('mailup/sync');\n $db = Mage::getSingleton(\"core/resource\")->getConnection(\"core_read\");\n\t\t$cron_schedule_table = Mage::getSingleton(\"core/resource\")->getTableName(\"cron_schedule\");\n \n /**\n * @todo check if a cron has been run in the past X minites\n * notify if cron is npt up and running\n */\n $lastTime = $db->fetchOne(\"SELECT max(last_sync) FROM {$syncTableName}\"); // 2013-04-18 19:23:55\n if( ! empty($lastTime)) {\n $dateTime = \\DateTime::createFromFormat('Y-m-d H:i:s', $lastTime);\n $lastTimeObject = clone $dateTime;\n if($dateTime) {\n $dateTime->modify('+30 minutes');\n $now = new DateTime();\n //if($dateTime < $now) {\n Mage::getSingleton(\"adminhtml/session\")\n ->addNotice($this->__(\"Last Sync Performed: {$lastTimeObject->format('Y-m-d H:i:s e')}\"))\n ;\n //}\n }\n }\n \n\t\t$running_processes = $db->fetchOne(\n \"SELECT count(*) \n FROM $cron_schedule_table \n WHERE job_code='mailup_mailupsync' AND status='running'\"\n );\n\t\tif ($running_processes) {\n\t\t\tMage::getSingleton(\"adminhtml/session\")->addNotice($this->__(\"A MailUp import process is running.\"));\n\t\t\treturn;\n\t\t}\n\n\t\t$scheduled_processes = $db->fetchOne(\n \"SELECT count(*) \n FROM $cron_schedule_table \n WHERE job_code='mailup_mailupsync' AND status='pending'\"\n );\n\t\tif ($scheduled_processes) {\n\t\t\tMage::getSingleton(\"adminhtml/session\")->addNotice($this->__(\"A MailUp import process is schedules and will be executed soon.\"));\n\t\t\treturn;\n\t\t}\n\t}", "public function checkQueueSchedules()\n\t{\n\t\t$this->queue = new queue();\n\n\t\t// Count unupdated items\n\t\t$alert = $this->queue->checkUpdateSchedules();\n\n\t\t// If manual argument passed (checking from command line)\n\t\tif($_SERVER['argv'][3])\n\t\t{\n\t\t\techo $alert;\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Log the errors\n\t\t\t$this->queue->log($alert);\n\n\t\t\t// Send push notification to admin\n\t\t\tutilities::sendAlert($alert);\n\t\t}\t\n\t}", "function wpo_cron_weekly() {\n\tglobal $wpdb;\n\tlist ($retention_enabled, $retention_period) = getRetainInfo();\n\t\n if ( get_option(OPTION_NAME) == 'true') {\n \t\t\t\n\t\t\t$clean = \"DELETE FROM $wpdb->posts WHERE post_type = 'revision'\";\n if ($retention_enabled == 'true') {\n $clean .= ' and post_modified < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n\t\t\t$revisions = $wpdb->query( $clean );\n\t\t\n $clean = \"DELETE FROM $wpdb->posts WHERE post_status = 'auto-draft'\";\n if ($retention_enabled == 'true') {\n $clean .= ' and post_modified < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n $autodraft = $wpdb->query( $clean );\n\t\t\t\n $clean = \"DELETE FROM $wpdb->posts WHERE post_status = 'trash'\";\n if ($retention_enabled == 'true') {\n $clean .= ' and post_modified < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n $posttrash = $wpdb->query( $clean );\n\n $clean = \"DELETE FROM $wpdb->comments WHERE comment_approved = 'spam'\";\n if ($retention_enabled == 'true') {\n\t\t\t\t$clean .= ' and comment_date < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n $comments = $wpdb->query( $clean );\t\t\t\n\t\t\t\n $clean = \"DELETE FROM $wpdb->comments WHERE comment_approved = 'post-trashed'\";\n if ($retention_enabled == 'true') {\n\t\t\t\t$clean .= ' and comment_date < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\t\t\t\n $commentstrash = $wpdb->query( $clean );\n\t\t\t\n\t\t\t\n\t\t$db_tables = $wpdb->get_results('SHOW TABLES',ARRAY_A);\n\t\tforeach ($db_tables as $table){\n\t\t\t$t = array_values($table);\n\t\t\t$wpdb->query(\"OPTIMIZE TABLE \".$t[0]);\n\t\t}\n\t\t\n\t\t$thisdate = date('l jS \\of F Y h:i:s A');\n\t\tupdate_option( OPTION_NAME_LAST_OPT, $thisdate );\n\t\t\n\t}\t\n}", "public function clean() {\n\t\t\tforeach ($this->workers as $id => $worker) {\n\t\t\t\tif (!$worker->isRunning()) {\n\t\t\t\t\tunset($this->workers[$id]);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function clearAllJobs()\n {\n // cleanup jobs and system_jobs\n // @todo data should be a JSON field instead\n $systemJobs = SystemJob::where('name', 'Acelle\\Jobs\\RunCampaignJob')->where('data', $this->id)->get();\n foreach($systemJobs as $systemJob) {\n // @todo what if jobs were already started? check `reserved` field?\n $systemJob->clear();\n }\n }", "public function cleanUpOldRunningConfigurations() {}", "private function call_hourly_jobs() {\r\n if ($this->_is_hourly_job_runnable()) {\r\n\r\n\r\n try {\r\n $this->create_recurring_forecasts();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n try {\r\n $this->create_recurring_actuals();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n try {\r\n $this->send_forecast_due_pre_reminder();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n\r\n try {\r\n $this->send_forecast_due_after_reminder();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n\r\n try {\r\n $this->send_recurring_forecast_creation_reminder();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n\r\n try {\r\n $this->create_recurring_tasks();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n try {\r\n $this->send_task_reminder_notifications();\r\n } catch (Exception $e) {\r\n echo $e;\r\n }\r\n\r\n $this->ci->Settings_model->save_setting(\"last_hourly_job_time\", $this->current_time);\r\n }\r\n }", "public function clearCron()\n {\n return $this->clear('cron')->clear('cron');\n }", "protected function addTaskCleanupSchedule()\n {\n $repository = RepositoryRegistry::getRepository(Schedule::getClassName());\n\n $schedule = new HourlySchedule(\n new TaskCleanupTask(ScheduleCheckTask::getClassName(), [QueueItem::COMPLETED], 3600),\n $this->getConfigService()->getDefaultQueueName()\n );\n\n $schedule->setMinute(10);\n $schedule->setNextSchedule();\n $repository->save($schedule);\n }", "public function cron()\n {\n global $CFG;\n\n $ds = DIRECTORY_SEPARATOR;\n\n //Delete all files in this folder\n if (is_dir($CFG->tempdir . $ds . 'capture'))\n {\n remove_dir($CFG->tempdir . $ds . 'capture', true);\n }\n\n return true;\n }", "private function deleteExpiredRequests(): void\n {\n $this->dbh->exec(\"DELETE FROM {$this->config->table_requests} WHERE NOW() > expire\");\n }", "public function trigger_fake_cron() {\n $t_id = 'wpu_temp_user_last_cron';\n if (get_transient($t_id)) {\n return;\n }\n set_transient($t_id, '1', 3600);\n $this->delete_old_users();\n }", "function execute() {\r\n\t\t// Check if cronjob is already running:\r\n\t\t/*$lockfile = PATH_site . 'typo3temp/tx_kequestionnaire_cron.lock';\r\n\t\tif (@file_exists($lockfile)) {\r\n\t\t\t\t// If the lock is not older than 1 day, skip index creation:\r\n\t\t\tif (filemtime($lockfile) > (time() - (60*60*24))) {\r\n\t\t\t\t$GLOBALS['BE_USER']->writelog(\r\n\t\t\t\t\t4,\r\n\t\t\t\t\t0,\r\n\t\t\t\t\t1,\r\n\t\t\t\t\t'tx_kequestionnaire',\r\n\t\t\t\t\t'TYPO3 ke questionnaire Cron: Aborting, another process is already running!',\r\n\t\t\t\t\tarray()\r\n\t\t\t\t);\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\t$GLOBALS['BE_USER']->writelog(\r\n\t\t\t\t\t4,\r\n\t\t\t\t\t0,\r\n\t\t\t\t\t0,\r\n\t\t\t\t\t'tx_kequestionnaire',\r\n\t\t\t\t\t'TYPO3 ke questionnaire Cron: A .lock file was found but it is older than 1 day! Processing mails ...',\r\n\t\t\t\t\tarray()\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}*/\r\n\r\n\t\t//touch ($lockfile);\r\n\t\t\r\n\t\t//echo $this->storagePids;\r\n $this->getQuestionnaires();\r\n if (count($this->questionnaires) > 0) $this->sendMails($this->questionnaires);\r\n\t\t\r\n\t\t//unlink ($lockfile);\r\n\t\treturn true;\r\n\t}", "function wp_schedule_delete_expired_coupons() {\n if ( ! wp_next_scheduled( 'delete_expired_coupons' ) ) {\n wp_schedule_event( time(), 'every_minute', 'delete_expired_coupons' );\n }\n}", "function hourly_jobs()\n{\n}", "static function cleanupEvents(){\n $time = RDR_Setting::get(\"maxeventlifetime\")->value;\n if(!$time) $time = \"- 1 day\";\n while(true){\n $tmp = RDR_Event::getByCondition(\"createTime < {0}\", array(dt(\"now $time\")), null, 1000);\n if(!$tmp) break;\n db()->deleteMultiple($tmp);\n }\n }", "public function do_cron_job() {\n\t\tglobal $wpdb;\n\n\t\t//Get list of querys\n\t\t$query_list = $this->get_query_list();\n\n\t\t// for each query, get new articles\n\t\tforeach ( $query_list as $query ) {\n\t\t\t$this->maintenance_crawl( $query );\n\t\t}\n\n\t}", "public function syncJobs()\n\t{\n\t\t$ids = array();\n\t\tforeach ($this->jobs as $attributes)\n\t\t{\n\t\t\t//Yii::trace(\"Adding job: \".print_r($attributes, true));\n\t\t\t$attributes['job_origin_id'] = JobOrigin::CONFIG;\t\t\t\n\t\t\t$model = $this->addCronTabJobFromArray($attributes);\t\t\t\n\t\t\t$ids[] = $model->id;\n\t\t}\n\t\t\n\t\t//delete all jobs with crontab entry that were not modified during the loop before\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->addCondition('job_origin_id = '.JobOrigin::CONFIG);\n\t\t$criteria->addNotInCondition('id', $ids);\n\t\tJob::model()->deleteAll($criteria);\n\t}", "function cron_installed()\n{\n\t$last_cron=get_value('last_cron');\n\tif (is_null($last_cron)) return false;\n\treturn intval($last_cron)>(time()-60*60*5);\n}", "function modify_cron(){\n\t\t\n\t\tlog_message('debug', 'Transaction_cron/modify_cron');\n\t\t$data = filter_forwarded_data($this);\n\t\tlog_message('debug', 'Transaction_cron/modify_cron: [1] data='.json_encode($data));\n\t\t\n\t\tif($data['action'] == 'remove') $result = $this->_cron->remove_job_from_server('<'.$data['jobid'].'>');\n\t\telse if($data['action'] == 'add') $result = $this->_cron->add_job_to_server('<'.$data['jobid'].'>');\n\t\tlog_message('debug', 'Transaction_cron/modify_cron: [2] result='.$result);\n\t\t\n\t\techo \"RESULT: \".$data['action'].' '.($result? 'SUCCESS': 'FAIL');\n\t}", "function _wpr_ensure_single_instance_of_cron_is_registered()\n {\n\n $last_run_esic = intval(_wpr_option_get(\"_wpr_ensure_single_instances_of_crons_last_run\"));\n $timeSinceLast = time() - $last_run_esic;\n if ($timeSinceLast > WPR_ENSURE_SINGLE_INSTANCE_CHECK_PERIODICITY) {\n do_action(\"_wpr_ensure_single_instances_of_crons\");\n $currentTime = time();\n _wpr_option_set(\"_wpr_ensure_single_instances_of_crons_last_run\", $currentTime);\n }\n }", "function runCron()\r\n {\r\n $this->processAll();\r\n }", "public static function relaunch() {\r\n\t\tself::init();\r\n\t\tif (file_exists(self::$restartFile)) {\r\n\t\t\tself::removeRestartFlag();\r\n\t\t\tself::run();\r\n\t\t} else if (file_exists(self::$runningFile)) {\r\n $handle=fopen(self::$runningFile, 'r');\r\n $last=fgets($handle);\r\n $now=time();\r\n fclose($handle);\r\n if (!$last or !is_numeric($last)) $last=0;\r\n if ( !$last or ($now-$last) > (self::getSleepTime()*5)) {\r\n // not running for more than 5 cycles : dead process\r\n self::removeRunningFlag();\r\n self::run();\r\n }\r\n\t\t} else {\r\n\t\t // relaunch for not running Cron. Nothing to do\r\n\t\t}\r\n\t}", "public function cron() {\n global $DB;\n\n $timenow = time();\n $rununtil = $timenow + (($this->duration > 0) ? $this->duration : USERACT_TIME_LIMIT);\n\n // Block other ETL cron tasks.\n $this->set_etl_task_blocked($timenow + ETL_BLOCKED_MAX_TIME);\n\n if (!isset($this->state['last_processed_time']) || (time() - $this->state['last_processed_time']) >= DAYSECS) {\n $this->state['recs_last_processed'] = 0;\n $this->state['last_processed_time'] = time();\n $this->state['log_entries_per_day'] = (float)$DB->count_records_select('log', 'time >= ? AND time < ?',\n array($this->state['last_processed_time'] - 10 * DAYSECS, $this->state['last_processed_time'])) / 10.0;\n }\n do {\n list($completed, $total) = $this->user_activity_task_process();\n $this->state['recs_last_processed'] += $completed;\n } while (time() < $rununtil && $completed < $total);\n\n if ($completed < $total) {\n $this->user_activity_task_save();\n } else {\n $this->user_activity_task_finish();\n }\n\n // Clear blocking.\n $this->set_etl_task_blocked(0);\n }", "public static function cronjobs_v0_1_78(Model_Node $node)\n\t{\n\t\t//Sown::process_cron_jobs();\t\t\n\t\tstatic::send_shell_script(\"return 0\");\n\t}", "public function run()\n {\n global $cronJob; // from CronController\n \n //At this time the job should be defered, \n //no new actions should be started after this time.\n if (time() >= $cronJob['endtime'])\n {\n $cronJob['completed'] = false;\n return;\n }\n \n foreach ( array_diff( scandir( TL_ROOT . '/' . $this->languages_dir ), $this->languages ) as $dir )\n {\n if (is_dir( TL_ROOT . '/' . $this->languages_dir . '/' . $dir ))\n {\n $objDir = new Folder( $this->languages_dir . '/' . $dir );\n $objDir->delete(); //internal: rrdir incl. $this->dir\n $objDir = null;\n unset($objDir);\n $this->killed = true;\n }\n } \n if ($this->killed && $cronJob['logging'])\n {\n $this->log('Superfluous languages files purged by cron job.', 'PurgeLanguagesFiles run()', TL_GENERAL);\n // purge the internal cache\n // system/cache/dca, system/cache/sql, system/cache/language\n $this->import('Automator');\n $this->Automator->purgeInternalCache();\n }\n }", "function onCron($isDay=false) {\n\t\t###### -> Construct should add this module to the onCron array\n\t\tif ($isDay) {\n\t\t\t// delete week old entries (select data, detect files, delete files, delete data)\n\t\t\t$core = &$this->parent;\n\t\t\t$undoModule = $this->parent->loaded($this->moduleRelation);\n\t\t\t$sql = \"SELECT id, files FROM \".$undoModule->dbname.\" WHERE files<>'' AND data<NOW() - INTERVAL 1 WEEK\";\n\t\t\t$core->dbo->query($sql,$r,$n);\n\t\t\tif ($n>0) {\n\t\t\t\tfor ($c=0;$c<$n;$c++) {\n\t\t\t\t\tlist($id,$files) = $core->dbo->fetch_row($r);\n\t\t\t\t\t$files = @unserialize($files);\n\t\t\t\t\tif ($files) {\n\t\t\t\t\t\tforeach ($files as $file) {\n\t\t\t\t\t\t\tif (is_file(CONS_FMANAGER.\"_undodata/\".$file))\n\t\t\t\t\t\t\t@unlink(CONS_FMANAGER.\"_undodata/\".$file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$core->dbo->simpleQuery(\"DELETE FROM \".$undoModule->dbname.\" WHERE data<NOW() - INTERVAL 1 WEEK\");\n\t\t\t# Find orphan files and delete them\n\t\t\t$lastWeek = date(\"Y-m-d\").\" 00:00:00\";\n\t\t\t$lastWeek = datecalc($lastWeek,0,0,-7);\n\t\t\t$lastWeek = tomktime($lastWeek);\n\t\t\t$files = listFiles(CONS_FMANAGER.\"_undodata/\",'@^(.*)$@',true);\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$ft = filemtime(CONS_FMANAGER.\"_undodata/\".$file);\n\t\t\t\tif ($ft<$lastWeek) @unlink(CONS_FMANAGER.\"_undodata/\".$file);\n\t\t\t\telse break; // the list is ordered by date, so the first not to match means none will\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function asu_isearch_cron() {\n\n // if we are locked from automatic update, then return false without updating\n $lock = variable_get('isearch_local_lock', FALSE);\n\n if ($lock) {\n return FALSE;\n }\n\n // it takes too much time to do both of these actions every cron run.\n // so switch between caching depts and migrating departments.\n $last_action = variable_get('asu_isearch_cron_action', 'import_depts');\n\n if ($last_action == 'import_depts') {\n // Cache dept tree and employee types data\n variable_set('asu_isearch_cron_action', 'cache_depts');\n _asu_isearch_cache_dept_feed(TRUE);\n }\n else {\n // Begin profile migrations\n variable_set('asu_isearch_cron_action', 'import_depts');\n _asu_isearch_begin_migrate(FALSE);\n }\n\n // cleanup any profiles which are not found in Solr\n _asu_isearch_cleanup();\n\n // Clear cache, and cleanup profile image caches\n $last_clean = variable_get('last_profile_cleanup', NULL);\n\n if ($last_clean != date('ymd', time())) {\n\n variable_set('last_profile_cleanup', date('ymd', time()));\n\n // flush the image styles cache, so that updated photos show up\n $styles = array('asu_isearch_profile_list', 'asu_isearch_profile');\n\n foreach ($styles as $style) {\n $the_style = image_style_load($style);\n asu_isearch_image_style_flush($the_style);\n }\n\n // clear all cached content\n cache_clear_all();\n }\n}", "function removeFirstBuilds($projectid, $days, $maxbuilds, $force = false)\n{\n require 'config/config.php';\n require_once 'include/pdo.php';\n require_once 'include/common.php';\n\n @set_time_limit(0);\n\n if (!$force && !isset($CDASH_AUTOREMOVE_BUILDS)) {\n return;\n }\n\n if (!$force && $CDASH_AUTOREMOVE_BUILDS != '1') {\n return;\n }\n\n if ($days < 2) {\n return;\n }\n\n // First remove the builds with the wrong date\n $currentdate = time() - 3600 * 24 * $days;\n $startdate = date(FMT_DATETIME, $currentdate);\n\n add_log('about to query for builds to remove', 'removeFirstBuilds');\n $builds = pdo_query(\n \"SELECT id FROM build\n WHERE parentid IN (0, -1) AND\n starttime<'$startdate' AND\n projectid=\" . qnum($projectid) . \"\n ORDER BY starttime ASC LIMIT $maxbuilds\");\n add_last_sql_error('dailyupdates::removeFirstBuilds');\n\n $buildids = array();\n while ($builds_array = pdo_fetch_array($builds)) {\n $buildids[] = $builds_array['id'];\n }\n\n $s = 'removing old buildids for projectid: ' . $projectid;\n add_log($s, 'removeFirstBuilds');\n echo ' -- ' . $s . \"\\n\"; // for \"interactive\" command line feedback\n remove_build($buildids);\n\n // Remove any job schedules that are older than our cutoff date\n // and not due to repeat again.\n $sql =\n 'SELECT scheduleid FROM client_job AS cj\n LEFT JOIN client_jobschedule AS cjs ON cj.scheduleid = cjs.id\n WHERE cj.status > ' . Job::RUNNING . \"\n AND cjs.projectid=$projectid AND cj.startdate < '$startdate'\n AND (cjs.repeattime = 0.00 OR\n (cjs.enddate < '$startdate' AND cjs.enddate != '1980-01-01 00:00:00'))\";\n\n $job_schedules = pdo_query($sql);\n while ($job_schedule = pdo_fetch_array($job_schedules)) {\n $ClientJobSchedule = new ClientJobSchedule();\n $ClientJobSchedule->Id = $job_schedule['scheduleid'];\n $ClientJobSchedule->Remove();\n }\n\n // Remove any jobs that are older than our cutoff date.\n // This occurs when a job schedule is set to continue repeating, but\n // some of its past runs are older than our autoremove threshold.\n\n $sql =\n 'SELECT cj.id FROM client_job AS cj\n LEFT JOIN client_jobschedule AS cjs ON cj.scheduleid = cjs.id\n WHERE cj.status > ' . Job::RUNNING . \"\n AND cjs.projectid=$projectid AND cj.startdate < '$startdate'\";\n\n $jobs = pdo_query($sql);\n while ($job = pdo_fetch_array($jobs)) {\n $ClientJob = new ClientJob();\n $ClientJob->Id = $job['id'];\n $ClientJob->Remove();\n }\n}", "#[Cron(schedule: Temporal::UNIT_HOUR, scope: Cron::SCOPE_SERVER)]\n\tpublic static function deleteUnusedLocks(Application $application): void {\n\t\tself::deleteUnused($application);\n\t}" ]
[ "0.7424282", "0.73579717", "0.7243177", "0.71568227", "0.7088831", "0.69640034", "0.69264424", "0.6921787", "0.68474364", "0.67898667", "0.6623177", "0.64276034", "0.6382986", "0.6326224", "0.6296254", "0.6290599", "0.6274948", "0.6274948", "0.6274948", "0.62598217", "0.6247517", "0.62391317", "0.62381417", "0.6230897", "0.62264997", "0.6224081", "0.6193309", "0.61917", "0.6190986", "0.6183021", "0.61470175", "0.6076785", "0.60244954", "0.59944975", "0.5970155", "0.5956481", "0.59548587", "0.5934477", "0.59278566", "0.592609", "0.5921203", "0.58950734", "0.58793014", "0.5877813", "0.58676237", "0.5861906", "0.5854746", "0.5842478", "0.5828251", "0.5826185", "0.58180124", "0.58148026", "0.5796635", "0.5789892", "0.5784339", "0.5774439", "0.5771358", "0.57678026", "0.5762252", "0.57606065", "0.5756171", "0.57532716", "0.5733548", "0.57253975", "0.5722868", "0.5718177", "0.5718177", "0.56996435", "0.56987464", "0.56975937", "0.56812775", "0.5675483", "0.56739473", "0.5666708", "0.5665999", "0.5665464", "0.56602174", "0.5650015", "0.5640892", "0.5639343", "0.5635492", "0.56343764", "0.56219", "0.5617957", "0.5616694", "0.5615701", "0.5614391", "0.560866", "0.5606597", "0.5600664", "0.55864704", "0.5586133", "0.5585536", "0.5582802", "0.55772686", "0.5573893", "0.55679417", "0.55659616", "0.5564522", "0.5559588" ]
0.7850429
0
Constructor method for ExportSurveyWithHTMLRemovedResponse
Конструктор метода ExportSurveyWithHTMLRemovedResponse
public function __construct($exportSurveyWithHTMLRemovedResult = null) { $this ->setExportSurveyWithHTMLRemovedResult($exportSurveyWithHTMLRemovedResult); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($surveyArray)\n {\n $this->_isComplete = @$surveyArray['surveySaveDate'] != '0000-00-00 00:00:00';\n $this->_dateTime = new DateTime(@$surveyArray['surveySaveDate']);\n $this->_qa = new ArrayObject();\n\n $lastId = -1;\n $answers = array();\n \n //foreach( @$surveyArray['answer'] as $qa )\n for( $i = 0 ; $i <= count(@$surveyArray['answer']) ; $i++ )\n {\n $qa = @$surveyArray['answer'][$i];\n if( $lastId > -1 && $lastId != @$qa['question']['questionID'] ){ \n $this->_qa->append( new SurveyQuestion($id, $no, $text, $label, $answers) );\n $answers = array();\n }\n \n if( !is_array($qa) )\n return;\n \n $id = @$qa['question']['questionID'];\n $no = @$qa['question']['questionNo'];\n $text = @$qa['question']['questionText'];\n $label = @$qa['question']['questionLabel'];\n $lastId = @$id;\n \n $aId = (int)@$qa['answerID'];\n if( $aId > -1 )\n $answers[] = new SurveyAnswer($aId, @$qa['answerNo'], @$qa['answerChoice'], @$qa['answerLabel']);\n }\n }", "public function __destruct()\n\t{\n\t\t$this->_html->clear();\n\t\tunset($this->_response);\n\t}", "public function __destruct()\n\t{\n\t\t$this->_html->clear();\n\t\tunset($this->_response);\n\t}", "public function __destruct(){\n\t\t$this->_html->clear();\n\t\t$this->_edithtml->clear();\n\t\tunset($this->_response);\n\t\tunset($this->_tmpResponse);\n\t}", "public function __construct(?int $surveyId)\n {\n $this->surveyId = $surveyId;\n\n $survey = TestDate::find($this->surveyId);\n\n if (!is_null($survey) && $survey->hasMedia('service_report')) {\n $this->serviceReportLink = $survey->getFirstMediaUrl('service_report');\n } else {\n $this->serviceReportLink = null;\n }\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->setContainer(func_get_arg(0));\n\t\t$this->response = new HtmlResponse('');\n\t}", "public function destroy(SurveyResponse $surveyResponse)\n {\n //\n }", "public function __construct(AttachmentsResponseProcessorInterface $html_response_attachments_processor) {\n $this->htmlResponseAttachmentsProcessor = $html_response_attachments_processor;\n }", "public function survey_response($email_survey_id = null)\r\n\t{\r\n\t\t$this->theme = 'Default'; \r\n\t\t$this->layout = 'ajax';\r\n\t\t$this->loadModel('EmailSurveyAnswer');\r\n\t\t$email_survey = $this->EmailSurvey->findById($email_survey_id);\r\n\t\t$this->EmailSurveyAnswer->bindModel(array('belongsTo'=>array('Question')));\r\n\t\t$survey_response=$this->EmailSurveyAnswer->find('all',array('conditions'=>array('EmailSurveyAnswer.email_survey_id'=>$email_survey_id)));\r\n\t\t$this->loadModel('BdcStatus');\r\n\t\t$bdc_status=$this->BdcStatus->find('list',array('fields'=>'id,name','conditions'=>array('BdcStatus.dealer_id'=>array(0,$this->Auth->user('dealer_id')))));\r\n\t\t$customer_status=$bdc_status[$email_survey['EmailSurvey']['c_status']];\r\n\t\t$surveys=array('1'=>'In Bound Survey','2'=>'Next Day Follow-up Survey','3'=>'14 Day Survey','4'=>'CSI 17 Survey','5'=>'Service Survey','6'=>'Safety Survey','11' => 'Parts Survey');\r\n\t\t$survey_name=$surveys[$email_survey['EmailSurvey']['survey_id']];\r\n\t\t$lead_data=$this->BdcLead->findById($email_survey['EmailSurvey']['bdc_lead_id']);\r\n\t\t$this->set(compact('lead_data','survey_name','survey_response','customer_status','email_survey_id'));\r\n\t\t\r\n\t}", "public function __construct( $html = null )\n {\n $this->html = $html;\n }", "public function __construct() {\n\t\t$this->Answer['ServiceResponse'];\n\t}", "public function __construct(simple_html_dom $html)\n {\n parent::__construct($html);\n $this->prepareData();\n }", "public function __construct(simple_html_dom $html)\n {\n parent::__construct($html);\n $this->prepareData();\n }", "public function __construct($html)\n {\n $this->html = $html;\n }", "public function __construct($html)\n {\n $this->html = $html;\n }", "public function __construct(Response $response)\n {\n $this->response = $response;\n\n $this->dom = new \\DOMDocument;\n @$this->dom->loadHtml($response->getBody());\n\n $this->xpath = new \\DOMXPath($this->dom);\n }", "public function __construct()\n {\n $this->answerFields = new ArrayCollection();\n $this->submittedAt = new \\DateTime();\n }", "public function survey(){\r\n\t\t\t$form = Loader::get('Main\\Form\\SurveyForm');\r\n\t\t\t$form->prop('type', 'div');\r\n\t\t\t\r\n\t\t\t$surveyId = Vars::get('id');\r\n\t\t\t$response = Loader::get('NationBuilder\\Service\\SurveyService')->getSurvey($surveyId, $this->nation);\r\n\t\t\t$survey = $response->getData('body.survey');\r\n\t\t\t$form->addField(['name'=>'survey_id', 'type'=>'hidden', 'value'=>$surveyId]);\r\n\t\t\t$form->addField(['name'=>'nation', 'type'=>'hidden', 'value'=>$this->nation]);\r\n\t\t\t$form->addField(['name'=>'person_id', 'type'=>'hidden', 'value'=> 6]);\r\n\t\t\t//die('<xmp>'.print_r($form,1));\r\n\t\t\tforeach($survey->questions as $question){\r\n\t\t\t\t$field = [\r\n\t\t\t\t\t'type' => $this->type2type($question->type),\r\n\t\t\t\t\t'name' => \"question[$question->id]\",\r\n\t\t\t\t\t'label' => $question->prompt,\r\n\t\t\t\t\t'class' => 'form-control',\r\n\t\t\t\t];\r\n\t\t\t\tif($field['type'] == 'dropdown'){\r\n\t\t\t\t\t$options = [];\r\n\t\t\t\t\t//die('<xmp>'.print_r($question,1));\r\n\t\t\t\t\tforeach($question->choices as $choice){\r\n\t\t\t\t\t\t$options[] = [\r\n\t\t\t\t\t\t\t'label' => $choice->name,\r\n\t\t\t\t\t\t\t'value' => $choice->name\n\t\t\t\t\t\t];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$field['options'] = $options;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$form->addField($field);\r\n\t\t\t}\r\n\t\t\t$form->addField(['type'=>'submit', 'class'=>'btn btn-primary mt10', 'value'=>'Submit']);\r\n\t\t\techo $this->view->render('survey/survey.phtml', [\r\n\t\t\t\t'survey' => $survey,\r\n\t\t\t\t'form' => $form\n\t\t\t]);\r\n\t\t}", "public function __construct()\n {\n $this->html = new HtmlBuilder;\n }", "public function __construct( &$html ) {\n $cmd = \"/usr/bin/html2text -rcfile /srv/http/v2/ebd/etc/html2text.rc\";\n parent::__construct( $cmd, $this->scrub_text( $html ) );\n }", "function survey_view() {\n // retrieve response object\n $response = responseObject();\n\n // survey id from request\n $id = get_var( 'id' );\n\n $locale = get_var( 'locale', 'en' );\n\n // response data\n $data = array();\n\n // language str\n $locale_str = array(\n 'en' => array(\n 'title' => 'englishtitle',\n 'dir' => 'ltr'\n ),\n 'ar' => array(\n 'title' => 'arabictitle',\n 'dir' => 'rtl'\n ),\n 'fr' => array(\n 'title' => 'frenchtitle',\n 'dir' => 'ltr'\n )\n );\n\n $data['locale'] = $locale;\n $data['dir'] = $locale_str[$locale]['dir'];\n $data['title'] = $locale_str[$locale]['title'];\n\n // fetch survey data\n $survey = db_row( 'survey', '*', 'surveyid', $id );\n\n // fetch survey questions\n $questions = db_rows( 'survey_questions', '*', 'surveyid', $survey['surveyid'] );\n\n for( $i=0; $i<count($questions); $i++ ) {\n $answers = db_rows( 'survey_answers', '*', 'questionid', $questions[$i]['questionid'] );\n\n for( $j=0; $j<count($answers); $j++ ) {\n $total_answers = db_row( 'user_answer', 'COUNT(*) as total_answers', 'answerid', $answers[$j]['answerid'] );\n $answers[$j]['total_answers'] = $total_answers['total_answers'];\n }\n\n $questions[$i]['answers'] = $answers;\n }\n\n // set in $data\n $data['questions'] = $questions;\n\n if( $survey == null ) {\n $response->isTemplate( false );\n $response->Send( '404.html' );\n return;\n }\n\n $data['survey'] = $survey;\n\n $response->Send( 'views/survey_view.php', $data );\n}", "public function buildResponse(string $html): ResponseInterface;", "public function __construct($response = null)\n {\n $this->setResponse($response);\n }", "public function __construct($saml_response, $settings = null)\n {\n if ($settings == null) {\n $settings = Maestrano::sso()->getSamlSettings();\n }\n\n $this->_settings = $settings;\n $this->assertion = base64_decode($saml_response);\n $this->document = new DOMDocument();\n $this->document->loadXML($this->assertion);\n }", "public function get_response_html();", "public function generateResponse() {\n\n if (count($this->currentSurvey['sessions'])) {\n $this->sessionId = $this->currentSurvey['sessions'][$this->indexSession]['id'];\n $this->sessionResponses = Response::whereSurveySessionId($this->sessionId)->get()->toArray();\n \n foreach ($this->questions as $iQuestion => $question) {\n $responses = array_values(array_filter($this->sessionResponses, function ($response) use ($question) { \n return $response['question_id'] === $question['id']; \n }));\n \n if ($question['type'] === 'checkbox') {\n $this->responses[$question['id']] =\n $responses ? array_column($responses, 'content') : [];\n } else {\n $this->responses[$question['id']] = \n $responses ? $responses[0]['content'] : '';\n }\n }\n }\n\n }", "public function question_template() {\n\n\t\t// Check if the form has fields with survey reporting enabled.\n\t\t// If not do not proceed.\n\t\tif ( empty( $this->field_ids ) ) {\n\t\t\treturn;\n\t\t};\n\t\t?>\n\t\t<script type=\"text/html\" id=\"tmpl-wpforms-question-results\">\n\t\t\t<# var count = 1; #>\n\t\t\t<# _.each( data, function( fieldData, key ) { #>\n\t\t\t\t<div class=\"question\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( 'survey' === $this->view && $this->print && empty( $_GET['field_id'] ) ) { // WPCS: XSS ok. // WPCS: CSRF ok.\n\t\t\t\t\t\techo '<button type=\"button\" class=\"question-toggle\" title=\"' . esc_attr__( 'Toggle displaying question', 'wpforms-surveys-polls' ) . '\"><i class=\"fa fa-chevron-down\" aria-hidden=\"true\"></i></button>';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"details wpforms-clear\">\n\t\t\t\t\t\t<# if ( ! _.isEmpty( fieldData.answers ) ) { #>\n\t\t\t\t\t\t\t<div class=\"actions\" data-field-id=\"{{ fieldData.id }}\">\n\t\t\t\t\t\t\t\t<?php if ( 'survey' === $this->view ) : ?>\n\t\t\t\t\t\t\t\t<div class=\"choicesjs-select-wrap\">\n\t\t\t\t\t\t\t\t\t<select class=\"survey-chart-export\" data-id=\"{{ fieldData.id }}\" data-sorting=\"off\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\" placeholder><?php esc_html_e( 'Export', 'wpforms-surveys-polls' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<# if ( ! _.isEmpty( fieldData.chart.supports ) ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"jpg\"><?php esc_html_e( 'Save as JPG', 'wpforms-surveys-polls' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"pdf\"><?php esc_html_e( 'Save as PDF', 'wpforms-surveys-polls' ); ?></option>\n\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t<option value=\"print\"><?php esc_html_e( 'Print', 'wpforms-surveys-polls' ); ?></option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<# if ( _.contains( fieldData.chart.supports, 'line' ) ) { #>\n\t\t\t\t\t\t\t\t\t<button type=\"button\" data-type=\"line\" title=\"<?php esc_html_e( 'View line chart', 'wpforms-surveys-polls' ); ?>\" class=\"chart-toggle <# if ( 'line' === fieldData.chart.default ) { print( ' current' ); } #>\"><i class=\"fa fa-area-chart\" aria-hidden=\"true\"></i></button>\n\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t<# if ( _.contains( fieldData.chart.supports, 'pie' ) ) { #>\n\t\t\t\t\t\t\t\t\t<button type=\"button\" data-type=\"pie\" title=\"<?php esc_html_e( 'View pie chart', 'wpforms-surveys-polls' ); ?>\" class=\"chart-toggle <# if ( 'pie' === fieldData.chart.default ) { print( ' current' ); } #>\"><i class=\"fa fa-pie-chart\" aria-hidden=\"true\"></i></button>\n\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t<# if ( _.contains( fieldData.chart.supports, 'bar-h' ) ) { #>\n\t\t\t\t\t\t\t\t\t<button type=\"button\" data-type=\"bar-h\" title=\"<?php esc_html_e( 'View horizontal bar chart', 'wpforms-surveys-polls' ); ?>\" class=\"chart-toggle <# if ( 'bar-h' === fieldData.chart.default ) { print( ' current' ); } #>\"><i class=\"fa fa-align-left\" aria-hidden=\"true\"></i></button>\n\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t<# if ( _.contains( fieldData.chart.supports, 'bar' ) ) { #>\n\t\t\t\t\t\t\t\t\t<button type=\"button\" data-type=\"bar\" title=\"<?php esc_html_e( 'View bar chart', 'wpforms-surveys-polls' ); ?>\" class=\"chart-toggle <# if ( 'bar' === fieldData.chart.default ) { print( ' current' ); } #>\"><i class=\"fa fa-bar-chart\" aria-hidden=\"true\"></i></button>\n\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"title-area\">\n\t\t\t\t\t\t\t<h6><span class=\"q-num\"><?php esc_html_e( 'Question', 'wpforms-surveys-polls' ); ?> <# print( count ); #></span> {{{ fieldData.badge }}}</h6>\n\t\t\t\t\t\t\t<h4>{{ fieldData.question }}</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<# if ( _.isEmpty( fieldData.answers ) ) { #>\n\t\t\t\t\t\t<div class=\"no-answers\">\n\t\t\t\t\t\t\t<i class=\"fa fa-exclamation-circle\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t<p><?php esc_html_e( 'There are no answers to this question yet.', 'wpforms-surveys-polls' ); ?></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t<# if ( ! _.isEmpty( fieldData.chart.supports ) ) { #>\n\t\t\t\t\t\t\t<div class=\"chart-area\">\n\t\t\t\t\t\t\t\t<canvas id=\"chart-{{ fieldData.id }}\"></canvas>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"chart-area-hq\">\n\t\t\t\t\t\t\t\t<canvas id=\"chart-{{ fieldData.id }}-hq\" width=\"1200\" height=\"600\"></canvas>\n\t\t\t\t\t\t\t\t<a href=\"#\" id=\"chart-{{ fieldData.id }}-download\" download=\"chart-field-{{ fieldData.id }}.jpg\"><?php echo esc_html_e( 'Download Chart', 'wpforms-surveys-polls' ); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"table-wrap\">\n\t\t\t\t\t\t\t\t<table class=\"wpforms-table-sorting data-results\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<th><?php esc_html_e( 'Answers', 'wpforms-surveys-polls' ); ?></th>\n\t\t\t\t\t\t\t\t\t\t\t<th data-sort=\"int\" data-sort-default=\"desc\" data-sort-onload=\"yes\" class=\"responses\"><?php esc_html_e( 'Responses', 'wpforms-surveys-polls' ); ?> <i class=\"fa fa-sort\" aria-hidden=\"true\"></i></th>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t<# _.each( fieldData.answers, function( answer, key ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<tr><td>{{ answer.value }}</td><td data-sort-value=\"{{ answer.percent }}\">{{ answer.percent }}% <span class=\"total\">{{ answer.count }}</span></td></tr>\n\t\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } else if ( 'likert_scale' === fieldData.type ) { #>\n\t\t\t\t\t\t\t<# var rowCount = 1; #>\n\t\t\t\t\t\t\t<div class=\"table-wrap likert-results\">\n\t\t\t\t\t\t\t\t<table class=\"likert-results<# if ( fieldData.table.single ) { print( ' single' ); } else { print( ' wpforms-table-sorting' ); } #>\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<# if ( ! fieldData.table.single ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<th style=\"width:20%;\"></th>\n\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t<# _.each( fieldData.table.columns, function( columnLabel, key ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<th data-sort=\"int\" data-sort-default=\"desc\" style=\"width:{{ fieldData.table.width }}%;\"<# if ( ! fieldData.table.single ) { print( ' class=\"sortable\"' ); } #>>{{ columnLabel }} <# if ( ! fieldData.table.single ) { print( '<i class=\"fa fa-sort\" aria-hidden=\"true\">' ); } #></i></th>\n\t\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t<# _.each( fieldData.table.rows, function( rowLabel, rowKey ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<# if ( ! fieldData.table.single || ( fieldData.table.single && rowCount === 1 ) ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<# if ( ! fieldData.table.single ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"th\">{{ rowLabel }}</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t\t\t<# _.each( fieldData.table.columns, function( columnLabel, columnKey ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td data-sort-value=\"{{ fieldData.answers[rowKey + '_' + columnKey].count }}\"<# if ( fieldData.answers[rowKey + '_' + columnKey].highest ) { print( ' class=\"highest\"' ); } #>>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<# if ( fieldData.answers[rowKey + '_' + columnKey].count > 0 ) { #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"count\">{{ fieldData.answers[rowKey + '_' + columnKey].count }}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"percent\">{{ fieldData.answers[rowKey + '_' + columnKey].percent }}%</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t\t<# rowCount++ #>\n\t\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t<div class=\"table-wrap text-results\">\n\t\t\t\t\t\t\t\t<table class=\"wpforms-table-sorting text-results\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<th><?php esc_html_e( 'Answers', 'wpforms-surveys-polls' ); ?></th>\n\t\t\t\t\t\t\t\t\t\t\t<th data-sort=\"int\" data-sort-default=\"desc\" data-sort-onload=\"yes\" class=\"date\"><?php esc_html_e( 'Date', 'wpforms-surveys-polls' ); ?> <i class=\"fa fa-sort\" aria-hidden=\"true\"></i></th>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t<# _.each( fieldData.answers, function( answer, key ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<tr><td>{{ answer.value }}</td><td class=\"date\" data-sort-value=\"{{ answer.date_unix }}\">{{ answer.date }} <a href=\"<?php echo esc_url( admin_url( 'admin.php?page=wpforms-entries&view=details&entry_id=' ) ); ?>{{ answer.entry_id }}\" title=\"<?php esc_html_e( \"View respondent's answers\", 'wpforms-surveys-polls' ); ?>\" class=\"view-entry\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a></td></tr>\n\t\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t<div class=\"stats <# if ( fieldData.average ) { print( 'has-average' ); } #>\">\n\t\t\t\t\t\t\t<div class=\"answered\">\n\t\t\t\t\t\t\t\t<strong>{{ fieldData.answered }}</strong>\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Answered', 'wpforms-surveys-polls' ); ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# if ( fieldData.average ) { #>\n\t\t\t\t\t\t\t\t<div class=\"average\">\n\t\t\t\t\t\t\t\t\t<strong>{{ fieldData.average }}</strong>\n\t\t\t\t\t\t\t\t\t<?php esc_html_e( 'Average', 'wpforms-surveys-polls' ); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t<div class=\"skipped\">\n\t\t\t\t\t\t\t\t<strong>{{ fieldData.skipped }}</strong>\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Skipped', 'wpforms-surveys-polls' ); ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<# } #>\n\t\t\t\t</div>\n\t\t\t\t<# count++ #>\n\t\t\t<# }) #>\n\t\t</script>\n\t\t<?php\n\t}", "public function __construct()\n {\n $this->submissionHeader = new SubmissionHeader();\n }", "function __construct(HTMLOutputter $out)\n {\n parent::__construct($out);\n\n $kategori = new Sharing_category();\n\n $kategori->find();\n\n $this->kategori[0] = _m('Todas');\n\n while ($kategori->fetch()) {\n $this->kategori[$kategori->id] = _m(sprintf('%s', $kategori->name));\n }\n\n $urbi = new Sharing_city();\n\n $urbi->orderBy('name ASC');\n\n $urbi->find();\n\n $this->urbi[0] = _m('Todas');\n\n while ($urbi->fetch()) {\n $this->urbi[$urbi->id] = $urbi->name;\n }\n\n $tipi = new Sharing_type();\n\n $this->tipi[0] = _m('Todos');\n\n $tipi->find();\n\n while ($tipi->fetch()) {\n $this->tipi[$tipi->id] = _m(sprintf('%s', $tipi->name));\n }\n }", "public function clean_html()\n\t{\n\t\t$this->register_internal(__METHOD__, array());\n\t\treturn $this;\n\t}", "public function __construct(&$html)\r\n {\r\n $this->_html = $html;\r\n $this->_text['emptyEmail'] = 'You have failed to provide an email address.';\r\n $this->_text['differentEmail'] = 'You have provided two different email addresses.';\r\n $this->_text['emailSubject'] = 'Request to activate a user account on A Memory Tree';\r\n }", "public function __construct()\n {\n add_shortcode('AcquaintCrmWebservice', array($this, 'getAcquaintHtml')); \n \n }", "public function __construct()\r\n {\r\n $this->html_value = unserialize (HTML_VALUE);\t\r\n $this->html_select = unserialize (SELECT);\r\n $this->create_select(0);\r\n }", "final public function __construct(DHttpResponse $response)\n {\n parent::__construct();\n $this->response = $response;\n }", "function survey_question() {\n // survey id\n $id = get_var( 'survey_id' );\n\n // create new question\n if( $_SERVER['REQUEST_METHOD']==\"POST\" ) {\n\n // question string\n $title = get_var( 'title' );\n\n $type = get_var( 'question_type' );\n\n // save new question\n $question_id = insert_new_question( $id, $title, $type );\n\n // answers\n $answers = get_var( 'answer' );\n\n // save all answers\n save_all_answers( $answers, $id, $question_id );\n\n // flash message\n $_SESSION['message'] = array( 'type' => 'success', 'message' => 'Questions created successfully!' );\n\n // go to survey detail page\n imv_redirect( 'survey_view&id='.$id );\n exit;\n }\n\n // retrieve response object\n $response = responseObject();\n\n $data = array( 'survey_id' => $id );\n\n $response->send( 'views/survey_question.php', $data );\n}", "public function __construct(\\GuzzleHttp\\Psr7\\Response $response)\n\t{\n\t\tparent::__construct($response, [ 'true', 'false' ]);\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->_Result = new XMLDocument('result');\n $this->_Result->renderHeader();\n\n $this->setHttpStatus(self::HTTP_STATUS_OK);\n $this->addHeaderToPage('Content-Type', 'text/xml');\n\n Symphony::Profiler()->sample('Page template created', PROFILE_LAP);\n }", "private function export(): void\n {\n $this->ioService->cleanDir(self::DUMP_FOLDER);\n $this->io->section('Cleaned the folder with json files.');\n\n $timeStart = time();\n $forms = [];\n $dateStartSubmission = null;\n $dateEndSubmission = null;\n\n $surveys = $this->runQuery(\n 'SELECT max(id) as surveyId, contentobject_id FROM ezsurvey GROUP BY contentobject_id ORDER BY surveyId'\n );\n\n $fieldsCounter = $submissionsCounter = 0;\n\n $this->io->progressStart(count($surveys));\n\n foreach ($surveys as $survey) {\n try {\n $content = $this->contentService->loadContent($survey['contentobject_id']);\n } catch (\\Exception $e) {\n $content = false;\n }\n\n $surveyInfo = $this->runQuery(\n sprintf('SELECT valid_from, valid_to FROM ezsurvey WHERE id=%s', $survey['surveyId'])\n );\n\n $dateStartSubmission = $surveyInfo[0]['valid_from'];\n $dateEndSubmission = $surveyInfo[0]['valid_to'];\n\n $fields = [];\n $receiverEmail = null;\n $sql = \"SELECT * FROM ezsurveyquestion WHERE survey_id = ? \n AND `type` IN ('\".implode(\"','\", self::QUESTION_TYPES).\"') ORDER BY tab_order\";\n\n $questions = $this->runQuery($sql, [$survey['surveyId']]);\n foreach ($questions as $question) {\n // Getting the Receiver email if checked\n $options = [];\n $name = $question['text'];\n\n if ('Receiver' === $question['type']) {\n $xml = simplexml_load_string($question['text2']);\n $choices = [];\n $counter = 0;\n $hasOneReceiver = 1 == count($xml);\n foreach ($xml as $option) {\n ++$counter;\n\n if ('1' === (string) $option->checked || $hasOneReceiver) {\n $receiverEmail = (string) $option->email;\n }\n\n if ($hasOneReceiver) {\n break;\n }\n $choices[$counter] = [\n 'value' => (string) $option->email,\n 'label' => (string) $option->label,\n 'weight' => $counter,\n ];\n }\n if (!count($choices)) {\n continue;\n }\n $options = ['choice_type' => 'dropdown', 'choices' => $choices];\n }\n\n if (empty($question['text'])) {\n continue;\n }\n $type = $this->convertType($question['type'], $question);\n if ('Choice' === $type) {\n $xml = simplexml_load_string($question['text2']);\n $choices = [];\n $counter = 0;\n foreach ($xml as $option) {\n ++$counter;\n $choices[$counter] = [\n 'value' => (string) $option->value,\n 'label' => (string) $option->label,\n 'weight' => $counter,\n ];\n }\n switch ($question['num']) {\n case 1:\n $choiceType = 'radio';\n break;\n case 2:\n $choiceType = 'radio';\n break;\n case 3:\n $choiceType = 'checkboxes';\n break;\n case 4:\n $choiceType = 'checkboxes';\n break;\n case 5:\n $choiceType = 'dropdown';\n break;\n default:\n $choiceType = 'dropdown';\n }\n $options = ['choice_type' => $choiceType, 'choices' => $choices];\n }\n\n if ('Paragraph' === $type || 'SectionHeader' === $type) {\n $options = ['value' => $question['text']];\n $name = ('Paragraph' === $type) ? 'Paragraphe Libre' : 'En tête';\n }\n\n $fields[] = [\n 'name' => $name,\n 'required' => (bool) $question['mandatory'],\n 'weight' => (int) $question['tab_order'],\n 'options' => $options,\n 'type' => $type,\n ];\n }\n\n $fieldsCounter += count($fields);\n\n if (!empty($fields)) {\n $formName = ($content ?\n $this->getNormalizeString($content->getName())\n : 'Form_'.$survey['surveyId']);\n $form = [\n 'name' => $formName,\n 'maxSubmissions' => null,\n 'fields' => $fields,\n 'objectId' => $survey['contentobject_id'],\n 'dateStartSubmission' => (int) $dateStartSubmission > 0 ? $dateStartSubmission : null,\n 'dateEndSubmission' => (int) $dateEndSubmission > 0 ? $dateEndSubmission : null,\n ];\n $form['sendData'] = false;\n if (null !== $receiverEmail) {\n $form['receiverEmail'] = $receiverEmail;\n $form['sendData'] = true;\n }\n\n $formExportFileName = $form['name'].'-'.$form['objectId'];\n $this->ioService->saveFile(self::DUMP_FOLDER.'/'.$formExportFileName.'.json', json_encode($form));\n $forms[] = $formExportFileName;\n\n // Get the Survey Results\n $sql = 'SELECT sqr.result_id,sqr.question_id,sq.type,sq.num2,sq.text,sqr.text answer, ';\n\n $sql .= \"CONCAT(sqr.result_id,'-',sqr.question_id) ids, \";\n $sql .= 'COUNT(CONCAT(sqr.result_id,sqr.question_id)) answersCount, sr.tstamp ';\n $sql .= 'FROM ezsurvey s ';\n $sql .= 'JOIN ezsurveyresult sr ON s.id = sr.survey_id ';\n $sql .= 'JOIN ezsurveyquestionresult sqr ON sr.id = sqr.result_id ';\n $sql .= 'JOIN ezsurveyquestion sq ON sqr.question_id = sq.id ';\n $sql .= 'WHERE s.contentobject_id = ? AND type != \"Receiver\" ';\n $sql .= 'GROUP BY ids ';\n $sql .= 'ORDER BY sqr.result_id,sqr.question_id';\n\n $results = $this->runQuery($sql, [$survey['contentobject_id']]);\n $submissions = $data = [];\n $resultId = null;\n $createdDate = 0;\n foreach ($results as $result) {\n if ($result['result_id'] !== $resultId) {\n if (!empty($data)) {\n $submissions[] = ['data' => $data, 'created_at' => $createdDate];\n $data = [];\n }\n $resultId = $result['result_id'];\n }\n $answers = $result['answer'];\n if ($result['answersCount'] > 1) {\n $sql = 'SELECT text FROM ezsurveyquestionresult WHERE result_id = ? AND question_id = ?';\n $answers = $this->runQuery(\n $sql,\n [$result['result_id'], $result['question_id']],\n FetchMode::COLUMN\n );\n }\n $data[] = [\n 'name' => $result['text'],\n 'value' => $answers,\n 'type' => strtolower($this->convertType($result['type'], $result)),\n ];\n $createdDate = date('Y-m-d H:i:s', (int) $result['tstamp']);\n }\n if (!empty($data)) {\n $submissions[] = ['data' => $data, 'created_at' => $createdDate];\n }\n if (!empty($submissions)) {\n $this->ioService->saveFile(\n self::DUMP_FOLDER.'/'.$formExportFileName.'_submissions.json',\n json_encode($submissions)\n );\n }\n\n $submissionsCounter += count($submissions);\n }\n $this->io->progressAdvance();\n }\n $this->io->progressFinish();\n\n $this->ioService->saveFile(self::DUMP_FOLDER.'/manifest.json', json_encode($forms));\n $this->io->section(\n 'Total: '.(string) count($forms).' forms, '.$fieldsCounter.' fields, '.$submissionsCounter.' submissions.'\n );\n\n $timeEnd = time();\n $timeInterval = gmdate('i:s', $timeEnd - $timeStart);\n $this->io->success(\"Export done in {$timeInterval}.\");\n }", "public function __construct($m_chSurveyType = null, $m_sDescription = null)\n {\n $this\n ->setM_chSurveyType($m_chSurveyType)\n ->setM_sDescription($m_sDescription);\n }", "function __construct($response) {\n $this->generalResponse = new GeneralResponse($response);\n\n if($response != '') {\n $responseAsDOM = new \\DOMDocument();\n $responseAsDOM->loadXML($response);\n\n if($responseAsDOM && $responseAsDOM->getElementsByTagName('all')->length != 0) {\n $this->all = $responseAsDOM->getElementsByTagName('all')->item(0)->nodeValue;\n\n for($i = 0; $i < $this->all; $i++) {\n $this->pTypes[$i] = $responseAsDOM->getElementsByTagName('pType')->item($i)->nodeValue;\n $this->brands[$i] = $responseAsDOM->getElementsByTagName('brand')->item($i)->nodeValue;\n $this->descriptions[$i] = $responseAsDOM->getElementsByTagName('description')->item($i)->nodeValue;\n }\n }\n } else {\n $this->generalResponse->setStatus(\"ERROR\");\n $this->generalResponse->setReturnCode(\"The response is empty! Probably your request to mPAY24 was not sent! Please see your server log for more information!\");\n }\n }", "public function includeResponse(): self\n {\n $this->includeResponse = true;\n\n return $this;\n }", "public function __construct()\r\n {\r\n parent::__construct();\r\n $this->Outlines = new OutlineList();\r\n $this->instructions = new PdfInstructions();\r\n }", "public function Process(): PdfResponse\r\n {\r\n $client = parent::Init();\r\n\r\n $this->instructions->_Author = $this->Author;\r\n $this->instructions->_Title = $this->Title;\r\n $this->instructions->_Subject = $this->Subject;\r\n $this->instructions->_Creator = $this->Creator;\r\n $this->instructions->_Keywords = $this->Keywords;\r\n $this->instructions->_Security = $this->Security;\r\n $this->instructions->_FlattenAllFormFields = $this->FlattenAllFormFields;\r\n $this->instructions->_RetainSignatureFormFields = $this->RetainSignatureFormFields;\r\n $this->instructions->_Inputs = $this->Inputs;\r\n $this->instructions->_Templates = $this->Templates;\r\n $this->instructions->_Fonts = $this->Fonts;\r\n $this->instructions->_FormFields = $this->FormFields;\r\n $this->instructions->_Outlines = $this->Outlines;\r\n //$this->Instructions->FormFields = $this->FormFields;\r\n\r\n $endPointUrl = rtrim($this->BaseUrl, \"\\0\\t\\n\\x0B\\r \\\\/\") . \"/v1.0/\" . $this->_EndpointName;\r\n curl_setopt($client, CURLOPT_URL, $endPointUrl);\r\n\r\n foreach ($this->instructions->_Inputs as $input) {\r\n if ($input->_Type == InputType::Page) {\r\n $pageInput = $input;\r\n foreach ($pageInput->Elements as $element) {\r\n if ($element->_Resource != null) {\r\n\r\n $this->Resources[$element->_Resource->ResourceName] = $element->_Resource;\r\n }\r\n if ($element->_TextFont != null && $element->_TextFont->ResourceName != null) {\r\n $fontSerializedArray = $element->_TextFont->GetJsonSerializeString();\r\n\r\n $this->instructions->_Fonts[$element->_TextFont->_Name] = $fontSerializedArray;\r\n }\r\n }\r\n }\r\n\r\n foreach ($input->_Resources as $resource) {\r\n if ($resource != null) {\r\n $this->Resources[$resource->ResourceName] = $resource;\r\n }\r\n }\r\n if ($input->GetTemplate() != null) {\r\n $template = $input->GetTemplate();\r\n $this->instructions->_Templates[$template->Id] = $template;\r\n if ($input->GetTemplate()->Elements != null && count($input->GetTemplate()->Elements) > 0) {\r\n foreach ($input->GetTemplate()->Elements as $element) {\r\n\r\n if ($element->_Resource != null) {\r\n $this->Resources[$element->_Resource->ResourceName] = $element->_Resource;\r\n }\r\n if ($element->_TextFont != null && $element->_TextFont->ResourceName != null) {\r\n\r\n $fontSerializedArray = $element->_TextFont->GetJsonSerializeString();\r\n\r\n if (count($fontSerializedArray) > 0) {\r\n $this->instructions->_Fonts[$element->_TextFont->_Name] = $fontSerializedArray;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $data_string = json_encode($this->instructions);\r\n\r\n $errCode = json_last_error();\r\n\r\n\r\n if ($this->instructions->_Inputs == null) {\r\n throw new EndPointException(\"Minimum one input required.\");\r\n }\r\n\r\n /*------------------------------------------------------------------------------------------------------*/\r\n $body = array();\r\n $algos = hash_algos();\r\n $hashAlgo = null;\r\n foreach (array('sha1', 'md5') as $preferred) {\r\n if (in_array($preferred, $algos)) {\r\n $hashAlgo = $preferred;\r\n break;\r\n }\r\n }\r\n\r\n if ($hashAlgo === null) {\r\n list($hashAlgo) = $algos;\r\n }\r\n\r\n $boundary = '----------------------------' .\r\n substr(hash($hashAlgo, 'sample Text ' . microtime()), 0, 12);\r\n\r\n $crlf = \"\\r\\n\";\r\n $body[] = '--' . $boundary;\r\n $body[] = 'Content-Disposition: form-data; name=\"' . 'Instructions' . '\"; filename=\"' . \"Instructions.json\" . '\"';\r\n $body[] = 'Content-Type: application/octet-stream';\r\n $body[] = '';\r\n $body[] = $data_string;\r\n\r\n foreach ($this->Resources as $field) {\r\n $body[] = '--' . $boundary;\r\n $body[] = 'Content-Disposition: form-data; name=\"' . \"Resource\" . '\"; filename=\"' . $field->ResourceName . '\"';\r\n $body[] = 'Content-Type: application/octet-stream';\r\n $body[] = '';\r\n if ($field->_FilePath != null) {\r\n $body[] = file_get_contents($field->_FilePath);\r\n } else {\r\n $body[] = $field->Data;\r\n }\r\n }\r\n $body[] = '--' . $boundary . '--';\r\n $body[] = '';\r\n $contentType = 'multipart/form-data; boundary=' . $boundary;\r\n $content = join($crlf, $body);\r\n $contentLength = strlen($content);\r\n\r\n curl_setopt(\r\n $client,\r\n CURLOPT_HTTPHEADER,\r\n array(\r\n 'Authorization:Bearer ' . $this->ApiKey,\r\n 'Content-Length: ' . $contentLength,\r\n 'Expect: 100-continue',\r\n 'Content-Type: ' . $contentType\r\n )\r\n );\r\n\r\n curl_setopt($client, CURLOPT_POSTFIELDS, $content);\r\n\r\n ob_start();\r\n $result = curl_exec($client);\r\n $outData = ob_get_contents();\r\n ob_end_clean();\r\n\r\n $retObject = new PdfResponse();\r\n $retObject->IsSuccessful = false;\r\n $retObject->StatusCode = curl_getinfo($client, CURLINFO_RESPONSE_CODE);\r\n\r\n if ($result && strncmp($outData, '%PDF', 4) == 0) {\r\n $retObject->IsSuccessful = true;\r\n $retObject->Content = $outData;\r\n } elseif (trim($outData)[0] == '{') {\r\n $retObject->ErrorJson = $outData;\r\n $errObj = json_decode($outData);\r\n $retObject->ErrorMessage = $errObj->message ?? $errObj->title ?? null;\r\n $retObject->ErrorId = $errObj->id ?? $errObj->traceId ?? null;\r\n }\r\n\r\n curl_close($client);\r\n\r\n return $retObject;\r\n }", "public function toHTMLDoc(){\n\t\t//validation of team?\n\t\t$permuted=randomizeArr($this->QIDArr);\n\t\t$return=\"<html><head></head><body>\";\n\t\t$return.=\"<center><h2>\".($this->Name).\"</h2></center>\";\n\t\tforeach($permuted as $QID){\n\t\t\t$Question=new Question($QID);\n\t\t\t$return.=\"<div>\".$Question->toHTML().\"</div>\";\n\t\t}\n\t\t$return.=\"</body></html>\";\n\t\treturn $return;\n\t}", "public function __construct($response) {\n $this->in= $response->getInputStream();\n\n $charset= 'iso-8859-1'; // HTTP defines this as default!\n if ($header= $response->header('Content-Type')) {\n sscanf($header[0], '%[^;]; charset=%s', $contentType, $charset);\n }\n $this->embed($charset);\n }", "public function saveSurveyResponse() {\n $input=Input::all();\n $inputSurvey=$input['survey'];\n\n $survey=Survey::find($inputSurvey['surveyid']);\n $group=Group::find($inputSurvey['group']);\n $user=Auth::user();\n\n $response = New SurveyResponse();\n $response->user_id = $user->id;\n $response->group_id = $inputSurvey['group'];\n $response->survey_id = $inputSurvey['surveyid'];\n $response->type = $inputSurvey['type'];\n $response->response = serialize($input);\n\n $response->save();\n\n $returnResponse=new stdClass();\n $returnResponse->status='OK';\n $returnResponse->message='Completed';\n\n return Response::json($returnResponse);\n }", "public function cropHTMLDataProvider() {}", "public function __construct() {\n $this->setFormat(new Response\\Format\\Text());\n }", "public function __construct( $response ) {\n\n\t\t// URL decode the response string and parse it\n\t\twp_parse_str( urldecode( $response ), $this->parameters );\n\t}", "public function toJSON()\n\t{\n\t\t$this->lng->loadLanguageModule('assessment');\n\n\t\trequire_once './Services/RTE/classes/class.ilRTE.php';\n\t\t$result = array();\n\t\t$result['id'] = (int) $this->getId();\n\t\t$result['type'] = (string) $this->getQuestionType();\n\t\t$result['title'] = (string) $this->getTitle();\n\t\t$result['question'] = $this->formatSAQuestion($this->getQuestion());\n\t\t$result['instruction'] = $this->getInstructionTextTranslation(\n\t\t\t$this->lng, $this->getOptionLabel()\n\t\t);\n\t\t$result['nr_of_tries'] = (int) $this->getNrOfTries();\n\t\t$result['shuffle'] = (bool) $this->isShuffleAnswersEnabled();\n\t\t$result['feedback'] = array(\n\t\t\t'onenotcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), false)),\n\t\t\t'allcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), true))\n\t\t);\n\n\t\t$result['trueOptionLabel'] = $this->getTrueOptionLabelTranslation($this->lng, $this->getOptionLabel());\n\t\t$result['falseOptionLabel'] = $this->getFalseOptionLabelTranslation($this->lng, $this->getOptionLabel());\n\t\t\n\t\t$result['num_allowed_failures'] = $this->getNumAllowedFailures();\n\t\t\n\t\t$answers = array();\n\t\t$has_image = false;\n\t\t\n\t\tforeach( $this->getAnswers() as $key => $answer )\n\t\t{\n\t\t\tif( strlen((string)$answer->getImageFile()) )\n\t\t\t{\n\t\t\t\t$has_image = true;\n\t\t\t}\n\n\t\t\t$answers[] = array(\n\t\t\t\t'answertext' => (string) $this->formatSAQuestion($answer->getAnswertext()),\n\t\t\t\t'correctness' => (bool) $answer->getCorrectness(),\n\t\t\t\t'order' => (int)$answer->getPosition(),\n\t\t\t\t'image' => (string)$answer->getImageFile(),\n\t\t\t\t'feedback' => ilRTE::_replaceMediaObjectImageSrc(\n\t\t\t\t\t$this->feedbackOBJ->getSpecificAnswerFeedbackExportPresentation($this->getId(), $key), 0\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t\n\t\t$result['answers'] = $answers;\n\n\t\tif($has_image)\n\t\t{\n\t\t\t$result['path'] = $this->getImagePathWeb();\n\t\t\t$result['thumb'] = $this->getThumbSize();\n\t\t}\n\n\t\t$mobs = ilObjMediaObject::_getMobsOfObject(\"qpl:html\", $this->getId());\n\t\t$result['mobs'] = $mobs;\n\n\t\treturn json_encode($result);\n\t}", "public function __destruct()\n\t{\n\t$this->pageweb.='</div>\n\t</body>\n\t</html>';\n\t}", "function __construct($xform_file) {\n // Sanity check.\n if (!is_readable($xform_file)) {\n throw new Exception('The xform file does not exist or is not readable.');\n }\n \n // Load the survey definition file.\n $this->xform = simplexml_load_file($xform_file);\n // Namespaces are needed in order to do queries.\n // Returns all the namespaces used by the elements\n $ns = $this->xform->getNamespaces(TRUE);\n \n // When querying we need to provide the namespace (Ex: ns:tag).\n // The default namespace has no prefix and that's a problem because\n // we can't use it to query. This is solved by registering the default\n // namespace giving it a prefix.\n $this->xform->registerXPathNamespace('d', $ns['']);\n \n // Extract all the languages available in the file.\n $translation_nodes = $this->xform->xpath('//d:itext/d:translation');\n foreach ($translation_nodes as $node) {\n $this->languages[] = (string)$node['lang'];\n }\n \n // Set preferred language.\n // By default, English is the preferred language, however if\n // it is not available, use the first one found.\n if (!empty($this->languages)) {\n if (in_array(\"English\", $this->languages)) {\n $this->preferred_language = \"English\";\n }\n else if (in_array(\"english\", $this->languages)) {\n $this->preferred_language = \"english\";\n }\n else {\n $this->preferred_language = reset($this->languages);\n }\n }\n \n // Get all questions by querying the bind tag.\n // The questions always have a @type attribute and are not @readonly.\n $questions = $this->xform->xpath('//d:model/d:bind[not(@readonly) and @type]');\n // Create a list with all the questions keyed by the path\n // storing the label and, if they exist, the options.\n // Note: All the values need to be converted to string, otherwise\n // they are stores as xml object.\n $list = array();\n foreach($questions as $k => $v){\n $path = (string)$v['nodeset'];\n $type = (string)$v['type'];\n \n $path_pieces = explode('/', $path);\n $machine_label = end($path_pieces);\n \n // Store the question's machine name.\n $list[$path]['machine_label'] = $machine_label;\n // Store the question's type\n $list[$path]['type'] = $type;\n \n // Search the question to get the label and value.\n // It will return an array of results.\n $question = $this->xform->xpath(sprintf('h:body//*[@ref=\"%s\"]', $path));\n if (!$question) {\n // The question was not found. Probably a system value \n // like the start date. Set the label as the machine name.\n $list[$path]['label'] = $machine_label;\n $list[$path]['system'] = TRUE;\n }\n else {\n // Only need the first result.\n $question = $question[0];\n $list[$path]['label'] = $this->_label_translation($question->label);\n \n // Search for items. (EG: Options for checkboxes)\n if (isset($question->item)) {\n foreach($question->item as $item) { \n $list[$path]['items'][(string)$item->value] = $this->_label_translation($item->label);\n }\n }\n }\n }\n $this->flat_xform = $list;\n }", "public function surveyDataProvider() {\n return array(\n array(\n array(\n 'id' => 1,\n 'submitdate' => '2013-05-28 15:32:40',\n 'lastpage' => 2,\n 'startlanguage' => 'nl',\n 'token' => '4d7v_q544',\n 'datestamp' => '2013-05-28 15:32:40',\n 'startdate' => '2013-05-28 15:32:40',\n 'LENGTH' => 185,\n 'WEIGHT' => 78,\n 'BMI' => null\n ),\n array('BMI' => 22.79)),\n array(\n array(\n 'id' => 1,\n 'submitdate' => '2013-05-28 15:32:40',\n 'lastpage' => 2,\n 'startlanguage' => 'nl',\n 'token' => '4d7v_q544',\n 'datestamp' => '2013-05-28 15:32:40',\n 'startdate' => '2013-05-28 15:32:40',\n 'LENGTH' => 165,\n 'WEIGHT' => 70,\n 'BMI' => null\n ),\n array('BMI' => 25.71))\n );\n }", "public function export_for_template(renderer_base $output) { \n \n $data = new stdClass(); \n if($this->cohort_details != false) {\n $data->empty = 0;\n $data->cohorts = array_values($this->cohort_details->cohorts);\n $data->returnurl = $this->cohort_details->returnurl;\n $data->siteUrl = $this->cohort_details->siteUrl;\n } else {\n $data->empty = 1;\n }\n return $data; \n }", "public function __construct(Response $response, $debug = false)\n\t{\n\t\t$this->response = $response;\n\t\t$this->debug = $debug;\n\t}", "public function __construct($id)\n\t\t{\n\t\t\t\t$id = (int)$id;\n\t\t\t\t$sql = \"select * from sm16_surveys where SurveyID = \" . $id;\n\t\t\t\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\tif(mysqli_num_rows($result) > 0)\n\t\t\t\t{#records exist - process\n $this->SurveyID = $id;\n $this->isValid = true;\n while ($row = mysqli_fetch_assoc($result))\n {\n $this->Title = dbOut($row['Title']);\n $this->Description = dbOut($row['Description']);\n }\n\t\t\t\t}\n\t\t\t\t@mysqli_free_result($result); # We're done with the data!\n \n \n // select q.QuestionID, q.Question from sm16_questions q inner join sm16_surveys s on s.SurveyID = q.SurveyID where s.SurveyID = 1\n\n \n // *** START OF QUESTION WORK ***\n //sql= \"select * from sm16_surveys where SurveyID = \" . $id;\n $sql = \"select q.QuestionID, q.Question, q.Description from sm16_questions q inner join sm16_surveys s on s.SurveyID = q.SurveyID where s.SurveyID = \" . $id;\n\t\t\t\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\tif(mysqli_num_rows($result) > 0)\n\t\t\t\t{#records exist - process\n //$this->SurveyID = $id;\n //$this->isValid = true;\n while ($row = mysqli_fetch_assoc($result))\n {\n //$this->Title = dbOut($row['Title']);\n //$this->Description = dbOut($row['Description']);\n $this->Questions[] = new Question($row['QuestionID'],dbOut($row['Question']),dbOut($row['Description']));\n }\n\t\t\t\t}\n\t\t\t\t@mysqli_free_result($result); # We're done with the data!\n // *** END OF QUESTION WORK ***\n\n\t\t}", "public function prepare_html_entete() {\r\n\t\t$this->onDebug ( __METHOD__, 1 );\r\n\t\tif (! empty ( $this->getAuth () )) {\r\n\t\t\t$this->setHttpHeader ( array (\r\n\t\t\t\t\t\"Content-Type: \" . $this->getContentType (),\r\n\t\t\t\t\t\"Authorization: Bearer \" . $this->getAuth (),\r\n\t\t\t\t\t\"Accept: \" . $this->getAccept ()\r\n\t\t\t) );\r\n\t\t}\r\n\t\t$this->onDebug ( $this->getHttpHeader (), 1 );\r\n\t\treturn $this;\r\n\t}", "public function __construct() {\n\t\t$domImplementation = new DOMImplementation();\n\t\t$doctype = $domImplementation->createDocumentType('html',\n\t\t\t'-//W3C//DTD XHTML 1.0 Strict//EN',\n\t\t\t'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'\n\t\t);\n\t\t$this->document = $domImplementation->createDocument(\n\t\t\t'http://www.w3.org/1999/xhtml',\n\t\t\t'html',\n\t\t\t$doctype\n\t\t);\n\t\t$this->head = $this->document->createElement('head');\n\t\t$this->body = $this->document->createElement('body');\n\t\t$this->setTitle(null);\n\t\t$this->setTitleAppend(null);\n\t}", "public function __construct($response) \n {\n $pattern = '#HTTP/\\d\\.\\d.*?$.*?\\r\\n\\r\\n#ims';\n preg_match_all($pattern, $response, $matches);\n $headers = preg_split(\"/\\r\\n/\", str_replace(\"\\r\\n\\r\\n\", '', array_pop($matches[0])));\n \n # Extract the version and status from the first header\n $version_and_status = array_shift($headers);\n preg_match('#HTTP/(\\d\\.\\d)\\s(\\d\\d\\d)\\s(.*)#', $version_and_status, $matches);\n $this->headers['Http-Version'] = $matches[1];\n $this->headers['Status-Code'] = $matches[2];\n $this->headers['Status'] = $matches[2].' '.$matches[3];\n \n # Convert headers into an associative array\n foreach ($headers as $header) \n {\n preg_match('#(.*?)\\:\\s(.*)#', $header, $matches);\n $this->headers[$matches[1]] = $matches[2];\n }\n \n # Remove the headers from the response body\n $this->body = preg_replace($pattern, '', $response);\n }", "private static function html(){\n return new Html();\n }", "public function __construct($options = null){\n\t$config = HTMLPurifier_Config::createDefault();\n\t$this->_htmlPurifier = new HTMLPurifier($config);\n\t$config->set('Cache.SerializerPath', CACHE_PATH . '/htmlpurifier');\n\t//$config->set('HTML.Doctype', 'HTML 4.01 Strict');\n\t$config->set('HTML.Allowed', '');\n\t$config->set('AutoFormat.RemoveEmpty.RemoveNbsp',TRUE);\n\t$config->set('AutoFormat.RemoveEmpty', TRUE);\n\t$config->set('AutoFormat.Linkify', false);\n\t$config->set('AutoFormat.AutoParagraph', false);\n\t$config->set('HTML.TidyLevel', 'heavy');\n\t//Zend_Debug::dump($config);\n while (($cleaner = preg_replace('!<(em|strong)>(\\s*)</\\1>!', '$2', $input)) != $input) {\n $input = $cleaner;\n\t}\n\t}", "public function SurveyResponse()\n {\n return $this->belongsTo('App\\SurveyResponse');\n }", "public function initHtmlReport ()\n {\n $this->view->headScript()->appendFile($this->view->baseUrl('/js/app/legacy/HtmlReport.js?'.date('Ymd')));\n\n if ($this->getHealthcheck()->id < 1)\n {\n $this->_flashMessenger->addMessage([\"error\" => \"Please select a report first.\"]);\n\n // Send user to the index\n $this->redirectToRoute('app.dashboard');\n }\n\n $this->view->dealerLogoFile = $this->getDealerLogoFile();\n }", "public function __construct()\n\t {\n\t \t $data = SkrillPsp_Json::getAlternativeWithoutAccountJson();\n\t \t $this->json = $this->decode($data, true);\n\t \t $this->json['id'] = $this->setId();\n\t \t $this->json['method'] = $this->method; \n\t }", "public function __construct()\n {\n parent::__construct();\n $this->_controller = '';\n $this->_headerText = Mage::helper('paypalmx')->__('Ver detalles de la transacción');\n $this->_removeButton('reset')\n ->_removeButton('delete')\n ->_removeButton('save');\n }", "public function __clone()\n {\n $this->body = '';\n }", "public function __destruct()\n {\n $this->_windowSize = 20;\n $this->_callback = '';\n $this->options = array(\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_SSL_VERIFYHOST => false,\n CURLOPT_RETURNTRANSFER => true,\n );\n $this->_response = array();\n $this->_requests = array();\n $this->_requestMap = array();\n }", "protected function _construct()\n {\n $this->setEmptyText(Mage::helper('pdfgenerator')->__('No PDF Templates Found'));\n $this->setId('pdfGeneratorTemplates');\n $this->setUseAjax(false);\n $this->setSaveParametersInSession(true);\n }", "public function __construct(\n HtmlBuilder $html,\n UrlGenerator $url,\n $csrfToken,\n TranslatorInterface $translator\n ) {\n $this->url = $url;\n $this->html = $html;\n $this->csrfToken = $csrfToken;\n $this->translator = $translator;\n }", "public function stdWrap_HTMLparserDataProvider() {}", "public function __construct()\n {\n $this->output = null;\n $this->errorMessages = [];\n }", "function __construct($response) {\n # Headers regex\n $pattern = '#HTTP/\\d\\.\\d.*?$.*?\\r\\n\\r\\n#ims';\n \n # Extract headers from response\n preg_match_all($pattern, $response, $matches);\n $headers_string = array_pop($matches[0]);\n $headers = explode(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", '', $headers_string));\n \n # Remove headers from the response body\n $this->body = str_replace($headers_string, '', $response);\n \n # Extract the version and status from the first header\n $version_and_status = array_shift($headers);\n preg_match('#HTTP/(\\d\\.\\d)\\s(\\d\\d\\d)\\s(.*)#', $version_and_status, $matches);\n $this->headers['Http-Version'] = $matches[1];\n $this->headers['Status-Code'] = $matches[2];\n $this->headers['Status'] = $matches[2].' '.$matches[3];\n \n # Convert headers into an associative array\n foreach ($headers as $header) {\n preg_match('#(.*?)\\:\\s(.*)#', $header, $matches);\n $this->headers[$matches[1]] = $matches[2];\n }\n }", "function __construct($response) {\n $this->generalResponse = new GeneralResponse($response);\n\n if($response != '') {\n $responseAsDOM = new \\DOMDocument();\n $responseAsDOM->loadXML($response);\n\n if(!empty($responseAsDOM) && is_object($responseAsDOM) && $responseAsDOM->getElementsByTagName('location')->length != 0)\n $this->location = $responseAsDOM->getElementsByTagName('location')->item(0)->nodeValue;\n } else {\n $this->generalResponse->setStatus(\"ERROR\");\n $this->generalResponse->setReturnCode(\"The response is empty! Probably your request to mPAY24 was not sent! Please see your server log for more information!\");\n }\n }", "public function __construct(int $questionnaire_response_id) {\n $this->questionnaire_response_id = $questionnaire_response_id;\n $this->onQueue(self::$QUEUE_NAME);\n }", "public function __construct($_name = 'Response') {\n return $this;\n }", "public function saveHTML() {\n\n }", "function createSurveySelector () {\n\t\tif ($this->survey==0) {\n\t\t\t$content = '<div><h3>Wähle eine Umfrage</h3><ul>';\n\n\t\t\t$res = $GLOBALS['TYPO3_DB']->sql_query('SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tx_fsmivkrit_survey\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE deleted=0 AND hidden=0');\n\t\t\twhile ($res && $row = mysql_fetch_assoc($res))\n\t\t\t\t$content .= '<li>'.$this->pi_linkTP($row['name'].' - '.$row['semester'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray (\t$this->extKey.'[survey]' => $row['uid'])).\n\t\t\t\t\t\t\t'</li>';\n\n\t\t\t$content .= '</div>';\n\t\t}\n\t\telse {\n\t\t\t$res = $GLOBALS['TYPO3_DB']->sql_query('SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tx_fsmivkrit_survey\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE deleted=0 AND hidden=0\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND uid=\\''.$this->survey.'\\'');\n\t\t\twhile ($res && $row = mysql_fetch_assoc($res))\n\t\t\t\t$content .= '<div style=\"margin-top:10px; margin-bottom:10px;\"><strong>Aktuelle Umfrage:</strong> '.\n\t\t\t\t\t\t\t\t$row['name'].' - '.$row['semester'].\n\t\t\t\t\t\t\t\t' '.\n\t\t\t\t\t\t\t\t$this->pi_linkTP('(Umfrage wechseln)').\n\t\t\t\t\t\t\t'</div>';\n\t\t}\n\t\treturn $content;\n\t}", "protected function getMockedResponse() : string\n {\n return <<<HTML\n<html><head>\n <title>Mocked response</title>\n <meta property=\"restaurant:category\" content=\"Danish\">\n <meta property=\"restaurant:category\" content=\"Italian\">\n <meta property=\"restaurant:category\" content=\"Chinese\">\n <meta property=\"restaurant:contact_info:street_address\" content=\"Random Street 28\">\n <meta property=\"restaurant:contact_info:postal_code\" content=\"280787\">\n <meta property=\"restaurant:contact_info:locality\" content=\"Downtown\">\n <meta property=\"restaurant:contact_info:region\" content=\"Capital Region\">\n <meta property=\"restaurant:contact_info:country_name\" content=\"The World\">\n <meta property=\"restaurant:contact_info:email\" content=\"info@example.com\">\n <meta property=\"restaurant:contact_info:phone_number\" content=\"1234567890\">\n <meta property=\"restaurant:contact_info:fax_number\" content=\"0987654321\">\n <meta property=\"restaurant:contact_info:website\" content=\"http://example.com\">\n <meta property=\"restaurant:item\" content=\"http://example.com/item-1\">\n <meta property=\"restaurant:item\" content=\"http://example.com/item-2\">\n <meta property=\"restaurant:menu\" content=\"http://example.com/menu-1\">\n <meta property=\"restaurant:menu\" content=\"http://example.com/menu-2\">\n <meta property=\"restaurant:section\" content=\"http://example.com/section-1\">\n <meta property=\"restaurant:section\" content=\"http://example.com/section-2\">\n <meta property=\"restaurant:price_rating\" content=\"2\">\n <meta property=\"restaurant:variation:price:amount\" content=\"2807.87\">\n <meta property=\"restaurant:variation:price:currency\" content=\"USD\">\n <meta property=\"restaurant:variation:name\" content=\"Beef with fries\">\n <meta property=\"restaurant:variation:price:amount\" content=\"1234.56\">\n <meta property=\"restaurant:variation:price:currency\" content=\"EUR\">\n <meta property=\"restaurant:variation:name\" content=\"Beef with mashed potatoes\">\n</head><body></body></html>\nHTML;\n }", "function __construct($response) {\n $this->generalResponse = new GeneralResponse($response);\n\n if($response != '') {\n $responseAsDOM = new \\DOMDocument();\n $responseAsDOM->loadXML($response);\n\n if($responseAsDOM && $responseAsDOM->getElementsByTagName('mpayTID')->length != 0 && $responseAsDOM->getElementsByTagName('tid')->length != 0) {\n $this->mpayTID = $responseAsDOM->getElementsByTagName('mpayTID')->item(0)->nodeValue;\n $this->tid = $responseAsDOM->getElementsByTagName('tid')->item(0)->nodeValue;\n }\n } else {\n $this->generalResponse->setStatus(\"ERROR\");\n $this->generalResponse->setReturnCode(\"The response is empty! Probably your request to mPAY24 was not sent! Please see your server log for more information!\");\n }\n }", "public function __construct() {\n\t\thtml::__construct();\n\t\n\t\t// NB NB NB\n\t\t//If not post back don't use cach\n\t\t// NB NB NB\n\t\tif(!$this->isPOST()){\n\t\n\t\t}\n\t\t$this->lazyEvent();\n\t\n\t\t$this->savehtml();\n\t}", "public function __construct() {\n\t\t\t$this->entry = new SlimPayResponse(self::cURL(SLIMPAY_ENDPOINT));\n\t\t}", "function getHtmlReport(){\n return $this->htmlReport;\n }", "public function __construct($options = array())\n {\n $this->options = array_merge(array(\n 'author' => get_bloginfo('name'),\n 'continued' => ' (contd.)',\n 'creator' => get_home_url(),\n 'font_size' => 'normal',\n 'height' => 11,\n 'keywords' => 'Meetings',\n 'margin' => 1,\n 'orientation' => 'p',\n 'subject' => 'Meeting Schedule',\n 'title' => 'Meeting Schedule',\n 'types' => array(\n 'X' => '♿︎',\n ),\n 'types_separator' => ' ',\n 'units' => 'in',\n 'width' => 8.5,\n ), $options);\n\n //todo create form with independent page + font sizes\n if ($this->options['width'] == 4 && $this->options['height'] == 7) {\n $this->options = array_merge($this->options, array(\n 'font_size' => 'small'\n ));\n }\n \n $this->content_width = $this->options['width'] - ($this->options['margin'] * 2);\n\n //call TCPDF\n parent::__construct($this->options['orientation'], $this->options['units'], array($this->options['width'], $this->options['height']));\n\n //set up PDF\n $this->SetTitle($this->options['title']);\n $this->SetSubject($this->options['subject']);\n $this->SetCreator($this->options['creator']);\n $this->SetAuthor($this->options['author']);\n $this->SetKeywords($this->options['keywords']);\n $this->SetMargins($this->options['margin'], $this->options['margin'] * 1.75);\n $this->SetAutoPageBreak(true, $this->options['margin'] * 1.5);\n $this->SetFontSubsetting(true);\n $this->SetFillColor(255, 182, 193); //pink for debugging\n\n //get data\n $meetings = tsml_get_meetings();\n usort($meetings, array($this, 'SortMeetings'));\n\n //get current region\n $this->current_region = @$meetings[0]['region'];\n\n //get output started\n $this->SetCellPadding(0);\n $this->AddPage();\n\n //column widths\n $day_width = .4;\n $time_width = .6;\n $right_width = $this->content_width - $day_width - $time_width;\n\n //runtime variables we'll need\n $days = array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT');\n $last_region = $last_day = '';\n\n foreach ($meetings as $meeting) {\n\n //format meeting name and group\n $meeting_name = strtoupper($meeting['name']);\n if (!empty($meeting['group']) && $meeting['name'] != $meeting['group']) {\n $meeting_name .= ' ' . $meeting['group'];\n }\n\n //format types\n $types = '';\n if (!empty($meeting['types']) && is_array($meeting['types'])) {\n $types = array_map(array($this, 'FormatTypes'), $meeting['types']);\n $types = implode($this->options['types_separator'], $types);\n }\n\n //format region\n $region = @$meeting['region'];\n if (!empty($meeting['sub_region'])) {\n $region .= ': ' . $meeting['sub_region'];\n }\n\n //format location\n $location = @$meeting['location'];\n if (!empty($meeting['location_notes'])) {\n $location .= ' (' . $meeting['location_notes'] . ')';\n }\n\n //header for the region\n if ($region != $this->current_region) {\n $this->Header($region);\n }\n\n //line one\n $this->SetFontRegular();\n if (@$meeting['day'] != $last_day) {\n $this->Cell($day_width, .1, $days[@$meeting['day']]);\n $last_day = @$meeting['day'];\n } else {\n $this->Cell($day_width, .1, '', 0, 0);\n }\n $this->SetFontBold();\n $this->Cell($time_width, .1, @$meeting['time_formatted']);\n $this->MultiCell($right_width, .1, $meeting_name, 0, 'L');\n $this->SetFontRegular();\n\n //line two\n $this->Cell($day_width, .1, '', 0, 0);\n $this->Cell($time_width, .1, $types);\n $this->MultiCell($right_width, .1, $location . ', ' . @$meeting['formatted_address'], 0, 'L');\n $this->Ln(.1);\n\n }\n\n return $this;\n }", "function __construct( $response,$current_version ,$file_extract,$old_version)\n {\n // Set the class public variables\n\t\t$this->api_response = $response;\n\t\t$this->current_version = $current_version;\n\t\t$this->update_path =$response->download_link;\n\t\t$this->file_extract = $file_extract;\n\t\t$this->old_version = $old_version;\n\t\t\n\t\tif(isset($_POST['revert']) == true)\n\t\t{\n\t\t\t\n\t\t\t$this->revert_old_plugin($this->api_response);\n\t\t}\n }", "function __construct() {\n\t\tparent::__construct( 'UniversalExport', 'universalexport-export', true );\n\n\t\t$this->oOutputPage = $this->getOutput();\n\n\t\t//Set up default parameters and metadata\n\t\t$this->aParams = BsConfig::get( 'MW::UniversalExport::ParamsDefaults' );\n\t\t$this->aParams['webroot-filesystempath'] = BsCore::getMediaWikiWebrootPath();\n\t\t$this->aMetadata = FormatJson::decode( BsConfig::get( 'MW::UniversalExport::MetadataDefaults' ), true );\n\n\t\t//Set up Black- and Whitelists\n\t\t$this->aCategoryWhitelist = BsConfig::get( 'MW::UniversalExport::CategoryWhitelist' );\n\t\t$this->aCategoryBlacklist = BsConfig::get( 'MW::UniversalExport::CategoryBlacklist' );\n\t}", "public function __construct(ResponseInterface $response)\n {\n $this->response = $response;\n }", "public function __construct(ResponseInterface $response)\n {\n $this->response = $response;\n }", "public function toJSON()\n\t{\n\t\tinclude_once(\"./Services/RTE/classes/class.ilRTE.php\");\n\t\t$result = array();\n\t\t$result['id'] = (int) $this->getId();\n\t\t$result['type'] = (string) $this->getQuestionType();\n\t\t$result['title'] = (string) $this->getTitle();\n\t\t$result['question'] = $this->formatSAQuestion($this->getQuestion());\n\t\t$result['nr_of_tries'] = (int) $this->getNrOfTries();\n\t\t$result['shuffle'] = (bool) true;\n\t\t$result['points'] = $this->getPoints();\n\t\t$result['feedback'] = array(\n\t\t\t'onenotcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), false)),\n\t\t\t'allcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), true))\n\t\t);\n\t\tif ($this->getOrderingType() == OQ_PICTURES)\n\t\t{\n\t\t\t$result['path'] = $this->getImagePathWeb();\n\t\t}\n\t\t\n\t\t$counter = 1;\n\t\t$answers = array();\n\t\tforeach ( $this->getOrderingElementList() as $orderingElement)\n\t\t{\n\t\t\t$answers[$counter] = $orderingElement->getContent();\n\t\t\t$counter++;\n\t\t}\n\t\t$answers = $this->getShuffler()->shuffle($answers);\n\t\t$arr = array();\n\t\tforeach ($answers as $order => $answer)\n\t\t{\n\t\t\tarray_push($arr, array(\n\t\t\t\t\"answertext\" => (string) $answer,\n\t\t\t\t\"order\" => (int) $order\n\t\t\t));\n\t\t}\n\t\t$result['answers'] = $arr;\n\n\t\t$mobs = ilObjMediaObject::_getMobsOfObject(\"qpl:html\", $this->getId());\n\t\t$result['mobs'] = $mobs;\n\n\t\treturn json_encode($result);\n\t}", "public function _construct()\n {\n parent::_construct();\n $id = $this->getRequest()->getParam('id');\n $query = \"SELECT answers_group FROM `nordstrom_quiz_completed` WHERE customer_id = $id\"; \n $completed = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchOne($query);\n if ($completed) { // If customer has a quiz on his name\n $report = Mage::getModel('kiosk/report');\n \n $report->load($completed);\n $query = \"SELECT question_id, answer_id FROM `nordstrom_quiz_completed_details` WHERE answers_group = $completed\"; \n $supplement = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($query);\n foreach ($supplement as $entry) {\n $procSupplement[$entry['question_id']][] = $entry['answer_id'];\n }\n\n // Load Questions\n $query = \"SELECT id, text FROM `nordstrom_quiz_questions` WHERE 1\"; \n $questions = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($query);\n foreach ($questions as $question) {\n $procQuestions[$question['id']] = $question['text'];\n }\n // Load Answers\n $query = \"SELECT id, answer_text FROM `nordstrom_quiz_answers` WHERE 1\"; \n $answers = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($query);\n foreach ($answers as $answer) {\n $procAnswers[$answer['id']] = $answer['answer_text'];\n }\n Mage::register('kiosk_question', $procQuestions);\n Mage::register('kiosk_report', $report);\n Mage::register('kiosk_supplement', $procSupplement);\n Mage::register('kiosk_answer', $procAnswers);\n } else {\n $nodata = 123;\n Mage::register('kiosk_nodata', $nodata);\n }\n $this->setTemplate('kiosk/nordstrom.phtml');\n }", "public static function new(ResponseInterface $response)\n\t{\n\t\t$self = new self;\n\t\t$self->response = $response;\n\t\treturn $self;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->load->library('wschecker');\n $this->load->library('wsresponse');\n $this->wsresponse->setOptionsResponse();\n }", "function __construct($url){\n\t\t\t$result = queryExhibitionPage($url);\n\n\t\t\t$this->exhibitionID = $result['ExhibitionID'];\n\t\t\t$this->makeHTMLElements($result);\n\t\t\t$this->HTMLheader($result['Title']);\n\t\t\t$this->makeBody();\n\t\t\t$this->HTMLfooter();\n\n\t\t}", "function __construct($response=null)\n\t{\n\n\t\tif( gettype( $response ) == \"object\" ){\n\t\t\t$response = json_decode( json_encode($response) , true );\n\t\t}\n\n\t\t$this->document_ids \t\t= array();\n\t\tif( isset( $response[\"document_ids\"] ) ){\n\t\t\tforeach($response[\"document_ids\"] as $obj){\n\t\t\t\tarray_push($this->document_ids,new Documents($obj));\n\t\t\t}\n\t\t}\n\t\t$this->actions \t\t\t\t= array();\n\t\tif( isset( $response[\"actions\"] ) ){\n\t\t\tforeach($response[\"actions\"] as $obj)\n\t\t\t{\n\t\t\t\tarray_push($this->actions,new Actions($obj));\n\t\t\t}\n\t\t}\n\t\t$this->created_time \t\t= (isset($response[\"created_time\"]))\t \t? $response[\"created_time\"]\t\t\t: null;\n\t\t$this->modified_time \t\t= (isset($response[\"modified_time\"]))\t \t? $response[\"modified_time\"]\t\t: null;\n\n\n\t\t$this->template_id \t\t\t= (isset($response[\"template_id\"]))\t \t\t? $response[\"template_id\"]\t\t\t: null;\n\t\t$this->template_name \t\t= (isset($response[\"template_name\"])) \t\t? $response[\"template_name\"]\t\t: null;\n\t\t$this->email_reminders \t\t= (isset($response[\"email_reminders\"])) \t? $response[\"email_reminders\"]\t\t: null;\n\t\t$this->notes \t\t\t\t= (isset($response[\"notes\"])) \t\t\t\t? $response[\"notes\"] \t\t\t\t: null;\n\t\t$this->reminder_period \t\t= (isset($response[\"reminder_period\"]))\t\t? $response[\"reminder_period\"]\t\t: null;\n\t\t$this->expiration_days \t\t= (isset($response[\"expiration_days\"])) \t? $response[\"expiration_days\"]\t\t: null;\n\t\t$this->is_sequential \t\t= (isset($response[\"is_sequential\"])) \t\t? $response[\"is_sequential\"]\t\t: null;\n\t\t$this->description \t\t\t= (isset($response[\"description\"])) \t\t? $response[\"description\"]\t\t\t: null;\n\t\t$this->validity \t\t\t= (isset($response[\"validity\"])) \t\t\t? $response[\"validity\"]\t\t\t\t: null;\n\t\t$this->request_type_id \t= (isset($response[\"request_type_id\"])) \t? $response[\"request_type_id\"]\t\t: null;\n\t\t$this->request_type_name \t= (isset($response[\"request_type_name\"])) \t? $response[\"request_type_name\"]\t: null;\n\t\t$this->folder_id\t\t \t= (isset($response[\"folder_id\"])) \t\t\t? $response[\"folder_id\"]\t\t\t: null;\n\t\t$this->self_sign\t\t \t= (isset($response[\"self_sign\"]))\t\t \t? $response[\"self_sign\"]\t\t\t: false;\n\n\t\t$this->bulk_actions\t\t \t= (isset($response[\"bulk_actions\"])) \t\t? $response[\"bulk_actions\"]\t\t\t: null;\n\t\t$this->is_bulk \t\t\t \t= (isset($response[\"is_bulk\"]))\t\t\t \t? $response[\"is_bulk\"]\t\t\t\t: null;\n\t\t$this->bulk_template_id \t= (isset($response[\"bulk_template_id\"])) \t? $response[\"bulk_template_id\"]\t\t: null;\n\t\t$this->custom_data \t\t \t= (isset($response[\"custom_data\"]))\t\t \t? $response[\"custom_data\"] : \"Sent Using Zoho Sign PHP SDK.\";\n\n\t\t$this->owner_email\t\t \t= (isset($response[\"owner_email\"])) \t\t? $response[\"owner_email\"]\t\t\t: null;\n\t\t$this->owner_first_name \t= (isset($response[\"owner_first_name\"])) \t? $response[\"owner_first_name\"]\t\t: null;\n\t\t$this->owner_last_name \t= (isset($response[\"owner_last_name\"])) \t? $response[\"owner_last_name\"]\t\t: null;\n\t\t$this->owner_id \t\t \t= (isset($response[\"owner_id\"]))\t\t \t? $response[\"owner_id\"] \t\t\t: null;\n\n\n\t\n\n\t\t// $this->prefill_fields \t\t= array();\n\t\t\t$this->field_text_data \t\t= array();\n\t\t\t$this->field_boolean_data\t= array();\n\t\t\t$this->field_date_data\t\t= array();\n\t\t\t// $this->field_image_data\t\t= array();\n\t\t\t// $this->field_radio_data\t\t= array();\n\n\t\t$this->document_fields \t\t= array();\n\n\t\tif( isset( $response[\"document_fields\"] ) ){\n\t\t\tforeach($response[\"document_fields\"] as $obj) // obj = templates>docuemnt_fields>fields[i] = field\n\t\t\t{\n\t\t\t\tarray_push($this->document_fields,new TemplateDocumentFields($obj));\n\n\t\t\t\tforeach ($obj[\"fields\"] as $field) {\n\n\t\t\t\t\t// echo \"<br><br>\".$field[\"field_label\"].\" :: \".$field[\"field_category\"].\"<br>\";\n\n\t\t\t\t\tswitch( $field[\"field_category\"] ){\n\t\t\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t\t\t$this->field_boolean_data[ $field[\"field_label\"] ] = new PrefillField($field);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"textfield\":\n\t\t\t\t\t\tcase \"dropdown\":\n\t\t\t\t\t\t\t$this->field_text_data \t [ $field[\"field_label\"] ] \t= new PrefillField($field);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datefield\":\n\t\t\t\t\t\t\t$this->field_date_data [ $field[\"field_label\"] ]\t= new PrefillField($field) ;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}", "public function __construct()\n {\n if (!isset(self::$g_s_there_can_only_be_one) || (self::$g_s_there_can_only_be_one === null)) {\n self::$g_s_there_can_only_be_one = $this;\n\n $options = isset($this->my_http_vars['bmlt_settings_id']) && !empty($this->my_http_vars['bmlt_settings_id']) ? $this->getBMLTOptions_by_id($this->my_http_vars['bmlt_settings_id']) : null;\n \n $this->my_http_vars = array_merge_recursive($_GET, $_POST);\n \n if (!(isset($this->my_http_vars['search_form']) && $this->my_http_vars['search_form'] )\n && !(isset($this->my_http_vars['do_search']) && $this->my_http_vars['do_search'] )\n && !(isset($this->my_http_vars['single_meeting_id']) && $this->my_http_vars['single_meeting_id'] )\n ) {\n $this->my_http_vars['search_form'] = true;\n }\n \n $this->my_http_vars['script_name'] = preg_replace('|(.*?)\\?.*|', \"$1\", $_SERVER['REQUEST_URI']);\n $this->my_http_vars['satellite'] = $this->my_http_vars['script_name'];\n $this->my_http_vars['supports_ajax'] = 'yes';\n $this->my_http_vars['no_ajax_check'] = 'yes';\n\n // We need to start off by setting up our driver.\n $this->my_driver = new bmlt_satellite_controller;\n\n global $bmlt_localization;\n \n $this->adapt_to_lang($bmlt_localization);\n \n if ($this->my_driver instanceof bmlt_satellite_controller) {\n $this->set_callbacks(); // Set up the various callbacks and whatnot.\n } else {\n echo \"<!-- BMLTPlugin ERROR (__construct)! Can't Instantiate the Satellite Driver! Please reinstall the plugin! -->\";\n }\n } else {\n echo \"<!-- BMLTPlugin Warning: __construct() called multiple times! -->\";\n }\n }", "public function populateOutput($response, $customTemplate = false)\n {\n $this->response = $response;\n return $this;\n }", "public function setResponse(Response $response): self;", "public function __construct()\n {\n $this->exams = new ArrayCollection();\n $this->questions = new ArrayCollection();\n }", "public function __construct($responsemail)\n {\n //\n $this->responsemail = $responsemail;\n }", "private function _resetResponse() {\n\t\t$this->_response_string = array();\n\t}", "protected function _initResponse()\n {\n return new HttpResponse();\n }" ]
[ "0.54057556", "0.5381399", "0.5381399", "0.52256685", "0.5211785", "0.5205449", "0.5185994", "0.50236964", "0.49834624", "0.4947592", "0.49471703", "0.49113566", "0.49113566", "0.4877864", "0.4877864", "0.48031852", "0.4781693", "0.4758202", "0.47481862", "0.47385955", "0.4738555", "0.47281492", "0.47227433", "0.47204927", "0.47121102", "0.47098988", "0.47034502", "0.46918398", "0.46889955", "0.46866098", "0.4675434", "0.46584693", "0.46528745", "0.4642481", "0.46388373", "0.4633208", "0.46286517", "0.4620119", "0.4615009", "0.4607351", "0.45925763", "0.45845893", "0.45746297", "0.45732024", "0.4565609", "0.4564564", "0.45590895", "0.45581257", "0.45571503", "0.45513797", "0.45429328", "0.45407772", "0.45346522", "0.45297313", "0.45292503", "0.4527121", "0.45234048", "0.4516765", "0.45101458", "0.45050076", "0.449369", "0.44933712", "0.4491751", "0.44714442", "0.44646063", "0.44417715", "0.44325113", "0.44261068", "0.44245213", "0.44184843", "0.4415197", "0.4413992", "0.441212", "0.4409758", "0.44071567", "0.44062957", "0.4406286", "0.44036633", "0.43996158", "0.43948898", "0.43923348", "0.4390307", "0.4380772", "0.437754", "0.43763992", "0.4374143", "0.4374143", "0.4373579", "0.43723023", "0.43651274", "0.43613908", "0.43612573", "0.4361016", "0.43607217", "0.43536094", "0.435111", "0.434779", "0.43464717", "0.4345912", "0.43453833" ]
0.7713811
0
result_array Subclass implementation returns the result set as a numeric array.
result_array Реализация подкласса возвращает набор результатов в виде числового массива.
abstract public function result_array();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getArrayResult( Database_QueryResult $oQResult );", "protected function initializeResultArray() : array {}", "function getResultArray(){\n\t\treturn $this->data;\n\t}", "public function asArray(): array\n {\n return $this->result;\n }", "public function asArray()\n {\n return (array)$this->_resultRow;\n }", "public abstract function as_array();", "public function getResult(): array\n {\n return $this->result;\n }", "public function getResult(): array\n {\n return $this->result;\n }", "public function Result_array()\n {\n $result = array();\n reset($this->result);\n \n while ($current = current($this->result) )\n {\n next($this->result);\n $result[] = get_object_vars($current);\n }\n return $result;\n }", "public function arrayresult(){\n\t\t$this->valueresult = mysql_fetch_assoc($this->result) or die (mysql_error($this->link));\n\t\treturn $this->valueresult;\n\t}", "public function result_array() {\n if (count($this->result_array) > 0) {\n return $this->result_array;\n }\n// In the event that query caching is on the result_id variable\n// will return FALSE since there isn't a valid SQL resource so\n// we'll simply return an empty array.\n if ($this->result_id === FALSE OR $this->num_rows() == 0) {\n return array();\n }\n $this->_data_seek(0);\n while ($row = $this->_fetch_assoc()) {\n $this->result_array[] = $row;\n }\n return $this->result_array;\n }", "function getResultsArray()\n {\n if (is_resource($this->_result)) {\n $i = 0;\n $results = array();\n \n while ($row = mysql_fetch_assoc($this->_result)) {\n $results[$i++] = $row;\n }\n \n return $results;\n } else {\n trigger_error(\"DolphinDriver_mysql::getResultsArray: Previous query did not return a result resource!\", ERR_ERROR);\n return false;\n }\n }", "public function getResult(): array\n {\n return $this->requireArray('result');\n }", "function getArrayResult()\r\n\t{\r\n\t\tif (!$this->is_loaded['get_data']) $this->getData();\r\n\r\n\t\t$sql \t= \"SELECT \". $this->query['all_before_from'] . \" FROM \". $this->query['all_after_from'];\r\n\t\tif (isset($_POST[$this->string_name.\"_search\"]))\r\n\t\t{\r\n\t\t\t$sql = $this > getSearchSqlQuery();\r\n\t\t}\r\n\t\t$result\t= $this->db->getAll($sql);\r\n\t\t$this->int_num_rows_this_page\t= $this->db->Affected_rows();\r\n\r\n\t\t$this->arr_result\t\t\t\t= $result;\r\n\t\t$this->is_loaded['get_array']\t= true;\r\n\t}", "function result_array()\n\t{\n\t $this->dataassoc= array();\n\n\t if($this->source)\n\t {\n\t\t foreach($this->source as $rs)\n\t\t {\n\t\t\t $this->dataassoc[] = $rs;\n\t\t }\n\t }\n\n\t return $this->dataassoc;\n\t}", "public abstract function __toArray();", "public function getResult(){\n $val = $this->result;\n $this->result = array();\n return $val;\n }", "function loadResultArray($numinarray = 0) {\n if (!($cur = $this->query())) {\n return null;\n }\n $array = array();\n while ($row = shield_fetch_row( $cur )) {\n $array[] = $row[$numinarray];\n }\n shield_free_result( $cur );\n return $array;\n }", "public function asArray();", "public function asArray();", "public function asArray();", "public function getResult(){\n\t\t$val=$this->result;\n\t\t$this->result=array();\n\t\treturn $val;\n\t}", "public function result()\n {\n if (!empty($this->results)) {\n reset($this->results);\n return $this->results;\n }\n\n return array();\n }", "public function result_array($query_result){\n return mysql_fetch_array($query_result, MYSQL_BOTH);\n }", "public function getResult() {\n $val = $this->result;\n $this->result = array();\n return $val;\n }", "public function __toArray();", "public function __toArray();", "protected function _fetchArray() {\n return pg_fetch_array($this->result, 0, PGSQL_NUM);\n }", "public abstract function toArray();", "public abstract function toArray();", "public abstract function toArray();", "public function getArray() {\n \n if (!($this->result instanceof \\mysqli_result)) {\n trigger_error('Unable to return result array as the result is not an instance of MySQLi_Result');\n return Array();\n }\n \n $return = Array();\n while ($row = $this->result->fetch_assoc()) {\n $return[] = $row;\n }\n \n return $return;\n \n }", "public function toArray()\n {\n $resultArray = [];\n $total = 0;\n foreach ($this->items as $item) {\n $resultArray[] = $item->toArray();\n $total += $item->getUnitPrice();\n }\n return [\n 'results' => $resultArray,\n 'total' => number_format((float) $total, 2)\n ];\n }", "public abstract function toArray () : array;", "public function result(): array\n {\n $result = [];\n for ($i = $this->start; $i <= $this->stop; $i++) {\n $result[$i] = $this->getValueOf($i);\n }\n return $result;\n }", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "public function getResult(): array\n {\n return $this->getItems();\n }", "abstract public function fetchArray($result);", "public function loadResultArray($numinarray = 0)\r\n\t{\r\n\t\treturn $this->dbo->loadResultArray();\r\n\t}", "public function asArray()\n {\n $this->resultAsArray = true;\n $this->resultsAsCouchDocs = false;\n\n return $this;\n }", "public function getArray();", "public function getArray();", "public function getArray() {}", "private function aray($result) { \n\t \n\t $array = array();\n\t \n\t $result->store_result();\n\t \n\t $variables = array();\n\t $data = array();\n\t $meta = $result->result_metadata();\n\t \n\t while($field = $meta->fetch_field())\n\t $variables[] = &$data[$field->name]; // pass by reference\n\t \n\t call_user_func_array(array($result, 'bind_result'), $variables);\n\t \n\t $i=0;\n\t while($result->fetch())\n\t {\n\t $array[$i] = array();\n\t foreach($data as $k=>$v)\n\t $array[$i][$k] = $v;\n\t $i++;\n\t }\n\t \n\t return $array;\n\t}", "private function getArray($result)\n\t{\n\t\t$result_arr = array();\t\n\t\t while ($row = $result->fetch_assoc()) {\n\t\t\t$result_arr[] = $row;\n\t\t}\n\t\t$result->free(); \t\t\n\t\treturn ($result_arr);\n\t}", "public function getResults()\n {\n $result = $this->result;\n $this->result = array();\n\n return $result;\n }", "public function getResults() {\n\t\t\t$val = $this->result;\n\t\t\t$this->result = array();\n\t\t\treturn $val;\n\t\t}", "function getResultArray($queryStr, $retick=true) { /* {{{ */\n\t\t$resArr = array();\n\t\t\n\t\tif($retick && $this->_driver == 'pgsql') {\n\t\t\t$queryStr = $this->rbt($queryStr);\n\t\t}\n\n\t\tif($this->_logfp) {\n\t\t\tfwrite($this->_logfp, microtime().\"\t\".$queryStr.\"\\n\");\n\t\t}\n\t\t$res = $this->_conn->query($queryStr);\n\t\tif ($res === false) {\n\t\t\tif($this->_debug)\n\t\t\t\techo \"error: \".$queryStr.\"<br />\";\n\t\t\treturn false;\n\t\t}\n\t\t$resArr = $res->fetchAll(PDO::FETCH_ASSOC);\n//\t\t$res->Close();\n\t\treturn $resArr;\n\t}", "public function getArray()\n {\n return $this->xml_result_array;\n }", "function result_to_array($result){\r\n\t\r\n\t\t$result_array = array();\r\n\t\t\r\n\t\tfor ($i=0; $row = mysql_fetch_array($result); $i++){\r\n\t\t\t$result_array[$i] = $row;\r\n\t\t}\r\n\t\t\r\n\t\treturn $result_array;\r\n\t}", "final public function fetchNumeric($resultSet){\r\n $resultArray = array();\r\n // while($obj = mysql_fetch_row($resultSet)){ \r\n while($obj = $resultSet->fetch(PDO::FETCH_NUM)){\r\n $resultArray[] = $obj[0];\r\n }\r\n return $resultArray;\r\n }", "function loadResultArray($numinarray = 0)\n\t{\n\t\t\n\t\t$array = array();\n\t\twhile ($row = @mysql_fetch_row( $this->cur )) {\n\t\t\t$array[] = $row[$numinarray];\n\t\t}\n\t\t@mysql_free_result($this->cur );\n\t\treturn $array;\n\t}", "function result_to_array($result)\n {\n\t$result_array = array();\n\n\tfor ($i = 0; $row = mysql_fetch_array($result) ; $i++)\n\t{\n\t $result_array[$i] = $row;\n\t}\n\n\treturn $result_array;\n }", "function loadResultArray($numinarray = 0) {\n\t\tif (!($cur = $this -> query())) {\n\t\t\treturn array();\n\t\t}\n\t\t$array = array();\n\t\twhile ($row = mysqli_fetch_row($cur)) {\n\t\t\t$array[] = $row[$numinarray];\n\t\t}\n\t\tmysqli_free_result($cur);\n\t\treturn $array;\n\t}", "abstract function result_array($object = NULL, $type = FALSE);", "public function asArray():array;", "abstract public function toArray(): array;", "public function asArray()\n\t{\n\t\t$this->tempReturnType = $this->returnType = 'array';\n\n\t\treturn $this;\n\t}", "public function asArray(): array;", "public function getResult() {\n\t\t$result = [];\n\n\t\t/**\n\t\t * auto_increment checks\n\t\t */\n\t\t$result = array_merge($result, $this->checkAutoIncrement($this));\n\n\t\treturn $result;\n\t}", "protected function _asArray(Result $result): array\n {\n $value = $result->getValue();\n\n return (array) $value;\n }", "public function resultAsArray()\n {\n return $this->exectuion_response;\n }", "function resultToArray($result) {\n $rows = array();\n while($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "function resultAsObjectArray($result)\n {\n $rtn = array();\n while ($row = Sqlite_Helper::fetchObject($result)) {\n $rtn[] = $row;\n }\n return $rtn;\n }", "function result_to_array($result){\n\t\t$result_array = array();\n\t for ($i=0; $row = @mysql_fetch_array($result); $i++){\n\t \t$result_array[$i] = $row; \n\t }\n\t return $result_array;\n\t}", "public function result_object() {\n if (count($this->result_object) > 0) {\n return $this->result_object;\n }\n// In the event that query caching is on the result_id variable\n// will return FALSE since there isn't a valid SQL resource so\n// we'll simply return an empty array.\n if ($this->result_id === FALSE OR $this->num_rows() == 0) {\n return array();\n }\n $this->_data_seek(0);\n while ($row = $this->_fetch_object()) {\n $this->result_object[] = $row;\n }\n return $this->result_object;\n }", "public function raw_result(){\n\t\t\txlog('Warning: You should not use raw results since they might not be portable.',$query,debug_backtrace());\n\t\t\treturn array();\n\t\t}", "public function getResults(): array;", "function db_result_to_array($result)\r\n {\r\n $res_array = array();\r\n\r\n for ($count = 0; $row = $result->fetch_assoc(); $count++)\r\n $res_array[$count] = $row;\r\n\r\n return $res_array;\r\n }", "public function result_array($rs=\"\",$debug=false)\r\n { if($debug){ die($this->query); } \r\n if(empty($rs)){ $rs = $this->result; } \r\n\t return mysqli_fetch_array($rs); \r\n }", "function loadResultArray($numinarray = 0)\n\t{\n\t\treturn;\n\t}", "function getNumericArrayFromSQL($db, $sql){\n $result = $this->sqlQueryRetrieve($db, $sql);\n $result_arr = array();\n while($row = mysqli_fetch_assoc($result)){\n $result_arr[] = $row;\n }\n return $result_arr;\n }", "protected function transformResult(array $result): array\n {\n return $result;\n }", "function as_array()\n {\n $array = array();\n\n foreach ($this->_rows AS $row)\n {\n $array[] = $row->as_array();\n }\n\n return $array;\n }", "public function getResult() {\n \t$args = func_get_args();\n\t// parsing the data retrieved by the query\n\t$data = array();\n\ttry\n\t{\n\t\t$result = $this->executeQuery($args);\n\t\t\n\t\tif(is_bool($result)) {\n\t\t\t// Do nothing\n\t\t} else {\n\t\t\twhile ($row = mysqli_fetch_object($result)) {\n\t\t\t $data[]=$row;\n\t\t\t}\n\t\t\t// free the memory\n\t\t\tmysqli_free_result($result);\n\t\t}\n\t}\n\tcatch (Exception $e)\n\t{\n\t\t$this->logError($args,$e);\n\t}\n\n\t/*if (!is_object($e)) {\n\n\t\t\n\t}*/\n\n\treturn $data;\n }", "public function getResults() :array {\n return $this->stmt->fetchAll();\n }", "function fetch_array($query, $resulttype=PGSQL_ASSOC)\n\t{\n\t\tswitch($resulttype)\n\t\t{\n\t\t\tcase PGSQL_NUM:\n\t\t\tcase PGSQL_BOTH:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$resulttype = PGSQL_ASSOC;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$array = pg_fetch_array($query, NULL, $resulttype);\n\n\t\treturn $array;\n\t}", "public function toArray(): array ;", "public function asArray()\n {\n $this->fetch = \\PDO::FETCH_NUM;\n return $this;\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}" ]
[ "0.73218554", "0.72587615", "0.72463393", "0.71943885", "0.7189445", "0.7071379", "0.6880119", "0.6880119", "0.6869507", "0.6810849", "0.6808057", "0.6730109", "0.67261", "0.6715237", "0.66853416", "0.66641986", "0.66493523", "0.6628966", "0.66216743", "0.66216743", "0.66216743", "0.6554215", "0.65044975", "0.6504463", "0.6503702", "0.64851326", "0.64851326", "0.64798886", "0.6479089", "0.6479089", "0.6479089", "0.6444506", "0.6435809", "0.6424114", "0.63975775", "0.63931656", "0.63931656", "0.63931656", "0.63931656", "0.63741744", "0.63740706", "0.63712674", "0.63645643", "0.6333952", "0.6333952", "0.63293624", "0.63191235", "0.6294972", "0.6291178", "0.6279498", "0.62785035", "0.627646", "0.6269638", "0.62696135", "0.6269343", "0.6269302", "0.6266801", "0.6255157", "0.6252449", "0.6250987", "0.623279", "0.62320876", "0.6232008", "0.6230543", "0.6228699", "0.62225324", "0.62200636", "0.6214766", "0.62145144", "0.620549", "0.62045866", "0.61882466", "0.6186113", "0.61845016", "0.61757565", "0.6174197", "0.61691666", "0.61691654", "0.616236", "0.6148239", "0.6146359", "0.61437887", "0.6140672", "0.6140672", "0.6140672", "0.6140672", "0.6139828", "0.6139828", "0.6139828", "0.6139828", "0.6139342", "0.6139342", "0.6139342", "0.6139342", "0.6139342", "0.6139342", "0.6139342", "0.6139342", "0.6139342", "0.6139342" ]
0.8012949
0
result_assoc Subclass implementation returns the result set as an associative array.
result_assoc Реализация подкласса возвращает набор результатов в виде ассоциативного массива.
abstract public function result_assoc();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function result_array()\n\t{\n\t $this->dataassoc= array();\n\n\t if($this->source)\n\t {\n\t\t foreach($this->source as $rs)\n\t\t {\n\t\t\t $this->dataassoc[] = $rs;\n\t\t }\n\t }\n\n\t return $this->dataassoc;\n\t}", "public function fetchAssocResult()\n {\n $aResults = array();\n if($this->bDebug)\n {\n echo \"<br>Fetch Assoc Result<br>\";\n\t\t\techo \"Rows: \".$this->mysqliObj->affected_rows.\"<br>\";\n }\n\n\t\t$rows = $this->mysqliObj->affected_rows;\n for ($i=0; $i < $rows; $i++)\n {\n array_push($aResults,$this->mysqliResult->fetch_assoc());\n }\n\t\tif($this->mysqliObj->affected_rows > 0)\n\t\t{\n\t\t\t$this->mysqliResult->data_seek(0);\n\t\t}\n \n \n return $aResults;\n }", "function as_assoc(){\n\t\t \treturn mysql_fetch_assoc($this->current_query);\n\t\t }", "abstract public function result_array();", "public function fetch_array_assoc($result_set){\n return mysqli_fetch_assoc ($result_set);\n }", "public function result_assoc($rs=\"\",$debug=false)\r\n { if($debug){ die($this->query); } \r\n if(empty($rs)){ $rs = $this->result; } \r\n\t return mysqli_fetch_assoc($rs); \r\n }", "function _fetch_assoc()\n\t{\n\t\treturn $this->result_id->fetch(PDO::FETCH_ASSOC);\n\t}", "public static function organizeInAssociativeArray($result) {\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\treturn $data;\n\t}", "function _fetch_assoc()\n\t{\n\t\treturn mysql_fetch_assoc($this->result_id);\n\t}", "protected function fetch_assoc()\n\t{\n\t\treturn mysql_fetch_assoc($this->resResult);\n\t}", "function _fetch_assoc() {\n return mysql_fetch_assoc($this->result_id);\n }", "function fetch_assoc($result) {\n Toolbox::deprecated('Use DBmysql::fetchAssoc()');\n return $this->fetchAssoc($result);\n }", "public function fetchArray($result)\n {\n return mysql_fetch_assoc($result);\n }", "public function fetchAssoc($result){\n return mysql_fetch_assoc($result);\n }", "public function result_array() {\n if (count($this->result_array) > 0) {\n return $this->result_array;\n }\n// In the event that query caching is on the result_id variable\n// will return FALSE since there isn't a valid SQL resource so\n// we'll simply return an empty array.\n if ($this->result_id === FALSE OR $this->num_rows() == 0) {\n return array();\n }\n $this->_data_seek(0);\n while ($row = $this->_fetch_assoc()) {\n $this->result_array[] = $row;\n }\n return $this->result_array;\n }", "public function fetch_assoc()\n {\n // ==== Check variable for success/failure ==== //\n $failed = false;\n $array = array();\n\n // ==== Checking to see if $this->result is an MySQLi_result object ==== //\n if(is_object($this->result))\n {\n $array = $this->result->fetch_assoc();\n\n if($array === null)\n {\n $failed = true;\n }\n }\n else\n {\n $failed = true;\n }\n\n // ==== Returning result ==== //\n if($failed === false)\n {\n return $array;\n }\n else\n {\n return false;\n }\n }", "public function fetchAssoc()\r\n\t\t{\r\n\t\t\tif(!$this->result || !isset($this->iterator_data[$this->position]))\r\n\t\t\t{\r\n\t\t\t\treturn(false);\r\n\t\t\t}\r\n\r\n\t\t\t$row\t\t= [];\r\n\t\t\t$void_keys \t= \\range(0, \\sizeof($this->iterator_data[$this->position]) - 1);\r\n\r\n\t\t\tforeach($this->iterator_data[$this->position] as $key => $value)\r\n\t\t\t{\r\n\t\t\t\tif(\\is_numeric($key) && \\in_array($key, $void_keys))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$row[$key] = $value;\r\n\t\t\t}\r\n\r\n\t\t\t++$this->position;\r\n\r\n\t\t\treturn($row);\r\n\t\t}", "public function fetchArray( $result )\r\n\t{\r\n\t\treturn @mysql_fetch_assoc( $result );\r\n\t}", "function _fetch_assoc()\n\t{\n\t\n\t\treturn ibase_fetch_assoc($this->result_id);\t\n\t}", "function fetchArray($result)\r\n {\r\n return @mysql_fetch_assoc( $result );\r\n }", "function fetchAssoc($result) {\n return $result->fetch_assoc();\n }", "public function fetchAssoc()\r\n {\r\n return mysql_fetch_assoc($this->result);\r\n }", "public function Result_array()\n {\n $result = array();\n reset($this->result);\n \n while ($current = current($this->result) )\n {\n next($this->result);\n $result[] = get_object_vars($current);\n }\n return $result;\n }", "public function fetchAssoc(){\n return $this->result->fetch(PDO::FETCH_OBJ);\n }", "public function toAssocArray($res){\n\t\t$arr = array();\n\t\t$st;\n\t\tif($res){\n\t\t\twhile($row = mysqli_fetch_assoc($res)){\n\t\t\t\t$temp = array();\n\t\t\t\tforeach ($row as $key => $val) {\n\t\t\t\t\t $temp[$key] = $val;\n\t\t\t\t}\n\t\t\t\tarray_push($arr, $temp);\n\t\t\t}\n\t\t\t//print_r($arr);\n\t\t\treturn $arr;\n\t\t}\n\t}", "public function fetchAssoc()\n {\n return $this->fetch(\\PDO::FETCH_ASSOC);\n }", "function fetchassoc()\n {\n return (mysqli_fetch_assoc($this->result));\n }", "public function fetchArray($query_result) {\n\t\treturn mysql_fetch_assoc($query_result);\n\t}", "public function resultset(){\n\n\t$this->execute();\n\t// there are different options to use in fetchall method apart from FETCH_ASSOC \n\treturn $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "public function SQLResultToAssoc($result, $query=''){ ///, $DSN, $resultType = 'MySQL'\n\t\t#echo __METHOD__.__LINE__.'<br>';\n\t\t#$this->logger->log(LOG_DEBUG,__METHOD__, '(result='.$result.')');\n\t\t//echo __METHOD__.__LINE__.'-------------------NO RESULTS RETURNED-------------------'.'<br>';\n\t\t#echo '$resultadasdas<pre>'.var_export($result,true).'</pre>';\n\t\tif(is_array($result)){\n\t\t\techo __METHOD__.__LINE__.'<br>'.'-------------------RESULT IS ARRAY -------------------'.'<br>';\n\t\t\treturn $result;\n\t\t}\n\t\tif( $result === false){\n\t\t\t#return $result;\n\t\t\techo __METHOD__.__LINE__.'<br>'.'-------------------NO RESULTS RETURNED [RESULT === FALSE]-------------------'.'<br>';\n\t\t\t#$this->logger->log(LOG_NOTICE,'NO RESULTS','DSN['.$this->DSN.'] query['.$query.']');\n\t\t\treturn array(); // send an empty array if there is no result ie \"0\" rows\n\t\t\t// an error would have already been returned if there was one\n\t\t}\n\t\t$resultArray = array();\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$resultArray[] = $row;\n\t\t}\n\t\ttry{\n\t\t\tif(count($resultArray) == 0){\n\t\t\t\tthrow new \\Exception('SQLResultToAssoc FAILED'); // ONLY BECAUSE WE WANT A TRACE\n\t\t\t}\n\t\t}\n\t\tcatch(\\Exception $e){\n\t\t\t#$this->logger->log(LOG_CRIT,__METHOD__, 'SQLResultToAssoc FAILED['.$result.']');\n\t\t\t#$this->logger->log(LOG_NOTICE,$e->getMessage(),$e->getTraceAsString());\n\t\t\techo $e->getTraceAsString().'<br>';\n\t\t\t#return false;\n\t\t}\n\n\t\t#echo '$resultArray<pre>'.var_export($resultArray,true).'</pre>';\n\t\tmysql_free_result($result);\n\t\treturn $resultArray;\n\t}", "public function fetch_assoc($result){\n return mysqli_fetch_assoc($result);\n }", "public function fetchAssoc() {\n return $this->fetch(PDO::FETCH_ASSOC);\n }", "public function fetchAssoc() {\n return $this->fetch(PDO::FETCH_ASSOC);\n }", "function assoc_array()\n {\n // columns names in SQL query\n\t$assoc_array=array();\n\t\t//echo \"nun =\".$this->num_rows();\n if($this->num_rows()>0)\n\t while ($row = mysql_fetch_assoc($this->res))\n \t $assoc_array[] = $row;\n return $assoc_array;\n }", "function getResultsArray()\n {\n if (is_resource($this->_result)) {\n $i = 0;\n $results = array();\n \n while ($row = mysql_fetch_assoc($this->_result)) {\n $results[$i++] = $row;\n }\n \n return $results;\n } else {\n trigger_error(\"DolphinDriver_mysql::getResultsArray: Previous query did not return a result resource!\", ERR_ERROR);\n return false;\n }\n }", "public function fetchRowAssoc() {\r\n return $this->_stmt->fetch(\\PDO::FETCH_ASSOC);\r\n }", "function _fetch_assoc() {\n return mysqli_fetch_assoc($this->result_id);\n }", "public function resultToAssoc($result, $query){ ///, $DSN, $resultType = 'MySQL'\n\t\t#echo __METHOD__.__LINE__.'<br>';\n\t\t$this->logger->log(LOG_DEBUG,__METHOD__, '(result='.$result.')');\n\t\t//echo LN.__METHOD__.__LINE__.'-------------------NO RESULTS RETURNED-------------------'.'<br>';\n\t\t#echo '$resultadasdas<pre>'.var_export($result,true).'</pre>';\n\t\tif(is_array($result)){\n\t\t\t#echo LN.__METHOD__.__LINE__.'<br>'.'-------------------RESULT IS ARRAY -------------------'.'<br>';\n\t\t\treturn $result;\n\t\t}\n\t\tif( $result === false){\n\t\t\t#return $result;\n\t\t\t#echo LN.__METHOD__.__LINE__.'<br>'.'-------------------NO RESULTS RETURNED [RESULT === FALSE]-------------------'.'<br>';\n\t\t\t$this->logger->log(LOG_NOTICE,'NO RESULTS','DSN['.$this->DSN.'] query['.$query.']');\n\t\t\treturn array(); // send an empty array if there is no result ie \"0\" rows\n\t\t\t// an error would have already been returned if there was one\n\t\t}\n\t\t$resultArray = array();\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$resultArray[] = $row;\n\t\t}\n\t\ttry{\n\t\t\tif(count($resultArray) == 0){\n\t\t\t\t#throw new DATA_Exception(__METHOD__.' FAILED'); // ONLY BECAUSE WE WANT A TRACE\n\t\t\t\t$this->logger->log(LOG_NOTICE,'no result',$query);\n\t\t\t}\n\t\t}\n\t\tcatch(DATA_Exception $e){\n\t\t\t#$this->logger->log(LOG_CRIT,__METHOD__, 'resultToAssoc FAILED['.$result.']');\n\t\t\t$this->logger->log(LOG_NOTICE,$e->getMessage(),$e->getTraceAsString());\n\t\t\t#return false;\n\t\t}\n\n\t\t#echo '$resultArray<pre>'.var_export($resultArray,true).'</pre>';\n\t\treturn $resultArray;\n\t}", "public abstract function getArrayResult( Database_QueryResult $oQResult );", "public function ResultadosASSOC() {\r\n\t\treturn $this->resultado->fetch(PDO::FETCH_ASSOC);\r\n\t}", "public function fetchAssoc($result)\n {\n return $result->fetch_assoc();\n }", "public function result_array($query_result){\n return mysql_fetch_array($query_result, MYSQL_BOTH);\n }", "function getResultArray(){\n\t\treturn $this->data;\n\t}", "public function fetchAssoc($result) {\n return $result->fetch_assoc();\n }", "function fetch_assoc()\n {\n return $this->_database->fetch_assoc($this->_result);\n }", "public function arrayresult(){\n\t\t$this->valueresult = mysql_fetch_assoc($this->result) or die (mysql_error($this->link));\n\t\treturn $this->valueresult;\n\t}", "public function fetchRowAssoc()\n {\n return $this->stmt->fetch(\\PDO::FETCH_ASSOC);\n }", "public static function assoc($resultSet) {\n\t\treturn mysql_fetch_assoc($resultSet);\n\t}", "public function fetchArray($result)\n {\n return mssql_fetch_assoc($result);\n }", "function fetch_all_assoc(){\n\t\t$ret= array();\n\t\twhile ($row = mysql_fetch_assoc($this->rs)) {\n\t\t\tarray_push($ret,$row);\n\t\t}\n\t\treturn $ret;\n\t}", "public function asAssoc()\n {\n $this->fetch = \\PDO::FETCH_ASSOC;\n return $this;\n }", "public function fetchArray($result)\n {\n return @ mysqli_fetch_assoc($result);\n }", "protected function fetch_assoc()\r\r\n\t{\r\r\n\t\treturn @pg_fetch_assoc($this->resResult);\r\r\n\t}", "public function get_assoc()\n\t{\n\t\t$args = func_get_args();\n\t\t$index = array_shift($args);\n\t\t$query = $this->prepare_query($args);\n\n\t\t$ret = array();\n\t\tif ( $res = $this->raw_query($query) )\n\t\t{\n\t\t\t$num_fields = $this->num_fields($res);\n\t\t\n\t\t\tif($num_fields <= 1){\n\t\t\t\t//return empty array()\n\t\t\t}\n\t\t\telse if($num_fields == 2){\n\t\t\t\twhile($row = $this->fetch($res))\n\t\t\t\t{\n\t\t\t\t\tif(array_key_exists($index, $row)){\n\t\t\t\t\t\t$key = $row[$index];\n\t\t\t\t\t\tunset($row[$index]);\n\t\t\t\t\t\t$value = array_pop($row);\n\t\t\t\t\t\t$ret[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile($row = $this->fetch($res))\n\t\t\t\t{\n\t\t\t\t\tif(array_key_exists($index, $row)){\n\t\t\t\t\t\t$key = $row[$index];\n\t\t\t\t\t\tunset($row[$index]);\n\t\t\t\t\t\t$ret[$key] = $row;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->free($res);\n\t\t}\n\t\treturn $ret;\n\t}", "private function aray($result) { \n\t \n\t $array = array();\n\t \n\t $result->store_result();\n\t \n\t $variables = array();\n\t $data = array();\n\t $meta = $result->result_metadata();\n\t \n\t while($field = $meta->fetch_field())\n\t $variables[] = &$data[$field->name]; // pass by reference\n\t \n\t call_user_func_array(array($result, 'bind_result'), $variables);\n\t \n\t $i=0;\n\t while($result->fetch())\n\t {\n\t $array[$i] = array();\n\t foreach($data as $k=>$v)\n\t $array[$i][$k] = $v;\n\t $i++;\n\t }\n\t \n\t return $array;\n\t}", "public function result_array($type=MYSQLI_ASSOC)\n\t{\n\t\tif (!$this->connect_error)\n\t\t{\n\t\t\t$buffer=array();\n\t\t\twhile($camp =$this->result->fetch_array($type))\n\t\t\t{\n\t\t\t\tarray_push($buffer,$camp);\n\t\t\t}\n\t\t\t//$this->free();\n\t\t\treturn $buffer;\n\t\t}\n\t}", "public function resultset($type = 'assoc'){\n switch ($type) {\n case 'assoc':\n $output = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n break;\n case 'obj':\n $output = $this->stmt->fetchAll(PDO::FETCH_OBJ);\n break;\n default :\n $output = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n break;\n }\n if ($output) {\n return $output;\n } else {\n return array();\n }\n }", "abstract public function fetch_assoc();", "public function result_array($type=MYSQLI_ASSOC)\n\t{\n\t\tif (!$this->connect_error)\n\t\t{\n\t\t\t$buffer=array();\n\t\t\twhile($camp =$this->result->fetch_array($type))\n\t\t\t{\n\t\t\t\tarray_push($buffer,$camp);\n\t\t\t}\n\t\t\t$this->free();\n\t\t\treturn $buffer;\n\t\t}\n\t}", "function sqlFetchArray($result) {\r\n\t\treturn mysqli_fetch_array($result, MYSQL_ASSOC);\r\n\t}", "public function result_array($rs=\"\",$debug=false)\r\n { if($debug){ die($this->query); } \r\n if(empty($rs)){ $rs = $this->result; } \r\n\t return mysqli_fetch_array($rs); \r\n }", "public function fetchAssoc()\n {\n return $this->fetch('assoc');\n }", "function returnAssocAll () {\n\t\n\t\tforeach($this->elementArray as $index) {\n\t\t\n\t\t\tforeach($this->elementArrayData as $data) {\n\t\t\t\t\n\t\t\t\t$tempArray[$index] = $data;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $tempArray;\n\t}", "public function fetchArray()\n {\n return mysqli_fetch_assoc($this->result);\n }", "public function getAssoc () {\n\t\tif (\n\t\t\t$this->conn instanceof \\mysqli_result\n\t\t) {\n\t\t\treturn $this->conn->fetch_assoc();\n\t\t}\n\t}", "public function toAssociativeArray() {\n // TODO\n }", "function sql_fetch_assoc($res)\n {\n return mysql_fetch_assoc($res);\n }", "abstract public function fetchArray($result);", "private function fetchAssoc() {\n $rows = array();\n \n while($itm = oci_fetch_assoc($this->stmt)) {\n $rows[] = $itm;\n }\n \n return $rows;\n }", "public function to_associative()\n\t{\n\t\tthrow new Exception('empty result -> to_associative');\n\t}", "public function fetch_assoc() {\n return mysqli_fetch_assoc($this->result);\n }", "public function result_object() {\n if (count($this->result_object) > 0) {\n return $this->result_object;\n }\n// In the event that query caching is on the result_id variable\n// will return FALSE since there isn't a valid SQL resource so\n// we'll simply return an empty array.\n if ($this->result_id === FALSE OR $this->num_rows() == 0) {\n return array();\n }\n $this->_data_seek(0);\n while ($row = $this->_fetch_object()) {\n $this->result_object[] = $row;\n }\n return $this->result_object;\n }", "public function resultados($result){\n\tif (!empty($result)){\n\t\t$this->array=mysqli_fetch_assoc($result);\n\t\treturn $this->array;\n\t}\n\t}", "protected function fetch_assoc_all(\\mysqli_result $result)\n {\n $data = array();\n while($row = $result->fetch_assoc())\n {\n $data[] = $row;\n }\n return $data;\n }", "public function returnAssoc()\n {\n $this->assoc = true;\n }", "public function GetAssoc()\n\t{\t\n\t\t$query = $this->prepare_query(func_get_args());\n\n\t\t$ret = array();\n\t\tif ( $res = $this->raw_query($query) )\n\t\t{\n\t\t\t$num_fields = $this->num_fields($res);\n\t\t\tif($num_fields <= 1){\n\t\t\t\t//return empty array()\n\t\t\t}\n\t\t\telse if($num_fields == 2){\n\t\t\t\twhile($row = $this->fetch($res))\n\t\t\t\t{\n\t\t\t\t\t$second = array_pop($row);\n\t\t\t\t\t$first = array_pop($row);\n\t\t\t\t\t$ret[$first] = $second;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile($row = $this->fetch($res))\n\t\t\t\t{\n\t\t\t\t\t$first = array_shift($row);\n\t\t\t\t\t$ret[$first] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$this->free($res);\n\t\t}\n\t\treturn $ret;\n\t}", "protected function _fetchAssoc() {\n return pg_fetch_assoc($this->result);\n }", "function as_array(){\n\t\t \treturn mysql_fetch_array($this->current_query);\n\t\t }", "public function convertResultSet($result, $id_as_key = false, $as_object = true) {\r\n\t\t$ret = array();\r\n\t\twhile ($myrow = $this->db->fetchArray($result)) {\r\n\r\n\t\t\t$obj =& $this->create(false);\r\n\t\t\t$obj->assignVars($myrow);\r\n\t\t\tif (!$id_as_key) {\r\n\t\t\t\tif ($as_object) {\r\n\t\t\t\t\t$ret[] =& $obj;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$ret[] = $obj->toArray();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ($as_object) {\r\n\t\t\t\t\t$value =& $obj;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$value = $obj->toArray();\r\n\t\t\t\t}\r\n\t\t\t\tif ($id_as_key === 'parentid') {\r\n\t\t\t\t\t$ret[$obj->getVar($obj->handler->parentName, 'e')][$obj->getVar($this->keyName)] =& $value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ret[$obj->getVar($this->keyName)] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tunset($obj);\r\n\t\t}\r\n\r\n\t\treturn $ret;\r\n\t}", "public function resultToAssoc($result, $DSN){\n\t\t#echo __METHOD__.__LINE__.'<br>';\n\t\t$this->logger->log(LOG_DEBUG,__METHOD__, '(result='.$result.')');\n\t\t#echo '$resultadasdas<pre>'.var_export($result,true).'</pre>';\n\t\t$this->verify_connection($DSN);\n\t\tif(is_array($result)){\n\t\t\treturn $result;\n\t\t}\n\t\tif(isset($DSN)){\n\t\t\t$result = $this->connector[$DSN]->resultToAssoc($result, $query);\n\t\t}else{\n\t\t\t$result['EXCEPTION'][\"ID\"] = 0;\n\t\t\t$result['EXCEPTION'][\"MSG\"] = 'FAILED TO PROVIDE $DSN i.e. [AUTH] ';\n\t\t}\n\t\t\n\t\treturn $resultArray;\n\t}", "public function arrayresultswithkey($key='id'){\n\t\tif(isset($this->valueresult)){\n\t\t\tunset($this->valueresult);\n\t\t}\n\t\t$this->valueresult = array();\n\t\twhile($row = mysql_fetch_assoc($this->result)){\n\t\t\tforeach($row as $thekey => $thevalue){\n\t\t\t\t$this->valueresult[$row[$key]][$thekey] = $thevalue;\n\t\t\t}\n\t\t}\n\t\treturn $this->valueresult;\n\t}", "public function fetchArray($result) {\r\n $row = mysqli_fetch_assoc($result);\r\n return $row;\r\n }", "private function returnArray($result){\n $arrayToReturn = array();\n while($r = $result->fetch_assoc()){\n array_push($arrayToReturn,$r);\n }\n return $arrayToReturn;\n }", "public function results_array($query_id = ''){\r\n\t\t// check we've set a query ID\r\n\t\tif(!$query_id){\r\n\t\t\t$query_id = $this->query_id;\r\n\t\t}\r\n\t\t// get the results\r\n\t\t$results = mysqli_fetch_assoc($query_id);\r\n\t\t// return\r\n\t\treturn $results;\r\n\t}", "private function getArray($result)\n\t{\n\t\t$result_arr = array();\t\n\t\t while ($row = $result->fetch_assoc()) {\n\t\t\t$result_arr[] = $row;\n\t\t}\n\t\t$result->free(); \t\t\n\t\treturn ($result_arr);\n\t}", "function mysql_fetch_assoc($result) {\n return mysql_fetch_array($result, MYSQL_ASSOC);\n}", "function mysql_fetch_assoc($result)\n {\n return mysqli_fetch_assoc($result);\n }", "function db_result_to_array($result)\r\n {\r\n $res_array = array();\r\n\r\n for ($count = 0; $row = $result->fetch_assoc(); $count++)\r\n $res_array[$count] = $row;\r\n\r\n return $res_array;\r\n }", "public function fetchAllAssoc() {\r\n return $this->_stmt->fetchAll(\\PDO::FETCH_ASSOC);\r\n }", "protected function initializeResultArray() : array {}", "function mysql_fetch_alias_array($result) {\n\t\t// From Post by Mehdi Haresi in PHP.net\n\t if (!($row = mysql_fetch_array($result))) {\n\t return null;\n\t }\n\t\n\t $assoc = Array();\n\t $rowCount = mysql_num_fields($result);\n\t \n\t for ($idx = 0; $idx < $rowCount; $idx++) {\n\t $table = mysql_field_table($result, $idx);\n\t $field = mysql_field_name($result, $idx);\n\t $assoc[\"$table.$field\"] = $row[$idx];\n\t }\n\t return $assoc;\n\t}", "function fetch_assoc( $result = false ) {\n if ( $result ) {\n $row = mysql_fetch_array( $result, MYSQL_ASSOC );\n return $row;\n }\n return false; \n }", "function fetchAssoc() {\n $row=$this->result->fetch_assoc();\n return $row;\n }", "public function ResultadosASSOCAll() {\r\n\t\treturn $this->resultado->fetchAll(PDO::FETCH_ASSOC);\r\n\t}", "public function fetchAssoc()\n {\n return isset($this->result) ? $this->result->fetch(\\PDO::FETCH_ASSOC) : false;\n }", "public function asArray ()\n {\n return $this->_result->fetchAll(\\PDO::FETCH_ASSOC);\n }", "function resultAsObjectArray($result)\n {\n $rtn = array();\n while ($row = Sqlite_Helper::fetchObject($result)) {\n $rtn[] = $row;\n }\n return $rtn;\n }", "public function fetch_all_assoc() {\n return $this->_statement->fetchAll(\\PDO::FETCH_ASSOC);\n }", "function resultToArray($result) {\n $rows = array();\n while($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "public function asArray(): array\n {\n return $this->result;\n }" ]
[ "0.77917457", "0.7522971", "0.7283523", "0.72720927", "0.71568984", "0.7153121", "0.71464294", "0.70897317", "0.69773346", "0.69697475", "0.69586873", "0.69430935", "0.69119644", "0.6883314", "0.6847915", "0.68359697", "0.6835318", "0.6818549", "0.6802968", "0.67990905", "0.6792051", "0.6775155", "0.6760808", "0.67544633", "0.6754254", "0.67382586", "0.6731524", "0.67282146", "0.6727954", "0.6725926", "0.67230535", "0.67146635", "0.67081416", "0.6707828", "0.6702209", "0.66996086", "0.66900545", "0.6685356", "0.66822314", "0.6674368", "0.66639084", "0.6662466", "0.6653273", "0.66523683", "0.6646485", "0.6646367", "0.6645148", "0.6634903", "0.662704", "0.6612935", "0.6599183", "0.6575155", "0.6574672", "0.6574164", "0.65720475", "0.6565779", "0.6558911", "0.6555437", "0.6554271", "0.65477806", "0.65401876", "0.65286314", "0.6528299", "0.6527131", "0.6508639", "0.65078497", "0.64973897", "0.64802974", "0.6476293", "0.6465284", "0.6451298", "0.6437051", "0.6432605", "0.6423628", "0.6420797", "0.6408213", "0.6406489", "0.64054596", "0.64033276", "0.63983977", "0.6394307", "0.63893807", "0.638812", "0.6382509", "0.6381896", "0.6380918", "0.6380671", "0.6374766", "0.63722676", "0.6368701", "0.63364315", "0.63350517", "0.63249445", "0.6315262", "0.63113904", "0.6309336", "0.6304081", "0.6303053", "0.62860537", "0.62848204" ]
0.85289973
0
Increments last index in the path of filter
Увеличивает последний индекс в пути фильтра
protected function incrementCurrentFilterPath() { $start = strrpos($this->currentFilterPath, '['); $index = substr( $this->currentFilterPath, $start + 1, strlen($this->currentFilterPath) - $start - 2 ); $this->currentFilterPath = sprintf( '%s%d]', substr($this->currentFilterPath, 0, $start + 1), intval($index) + 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNextIndex() {}", "public function nextIndex() {}", "public function testFilterLastIndex(): void\n {\n $result = (new JSONPath(['first', 'second', 'third', 'fourth', 'fifth']))\n ->find('$[-1]');\n\n self::assertEquals(['fifth'], $result->getData());\n }", "function next(){\n $this->index++;\n }", "function Rewind()\n {\n $this->idx = 0;\n }", "public function next() {\n $this->setPathname($this->readDir());\n $this->index++;\n }", "public function increment($iNumber = NULL)\n {\n $path = $this->getPath();\n $pos = $iNumber === NULL ? $this->currentIteratorPos() : $this->getIteratorPos($iNumber);\n $iterator = (int)$path[$pos];\n $path[$pos] = $iterator + 1;\n }", "public function incrementLoopIndices() {\n $loop = $this->loopsStack[$index = count($this->loopsStack) - 1];\n $this->loopsStack[$index] = array_merge($this->loopsStack[$index], [\n 'iteration' => $loop['iteration'] + 1,\n 'index' => $loop['iteration'],\n 'first' => $loop['iteration'] == 0,\n 'remaining' => isset($loop['count']) ? $loop['remaining'] - 1 : null,\n 'last' => isset($loop['count']) ? $loop['iteration'] == $loop['count'] - 1 : null,\n ]);\n }", "private function __getUpdatedIndex()\n {\n $index = null;\n if (isset($this->request->data['Test']['index']) && isset($this->request->data['btnPrevNext'])) {\n $index = $this->request->data['Test']['index'];//debug($index);\n $btnName = $this->request->data['btnPrevNext'];\n // FIXME: no of questions are hardcoded here.\n if ($btnName == 'Previous' && $index > 1) {\n $index--;\n } else if ($btnName == 'Next' && $index < 25) {\n $index++;\n }\n\n } else {\n $index = 1;\n }\n\n return $index;\n }", "function rewind(){\n $this->index = 0;\n }", "function idx_appendIndex($pre, $wlen, $line){\n global $conf;\n $fn = $conf['indexdir'].'/'.$pre.$wlen;\n $fh = @fopen($fn.'.idx','a');\n if(!$fh) return false;\n fwrite($fh,$line);\n fclose($fh);\n return true;\n}", "public function setLastIterator () {}", "public function getLastIndex(): int\n {\n return $this->lastIndex;\n }", "abstract public function addPathToIndex($path, $innerPath);", "public function next(): void\n {\n next($this->routes);\n\n --$this->count;\n }", "final public static function pushIndex() {\n\t\tself::$oldIndex[] = self::$records;\n\t}", "public function next()\n {\n $this->initFilteredCollection();\n\n $this->findNext();\n $this->currentIndex++;\n }", "function addFilter(){\r\n Shared::debug(\"adding filter to {$this->path}{$this->filename}\");\r\n $this->filtered = 1;\r\n $this->save();\r\n Shared::debug($this->getErrors());\r\n // TODO: recursively find parents and recalulate stats there\r\n return $this->updateParent();\r\n }", "protected function commitUpdateIndex() {}", "public function setLastIndex(int $index): self\n {\n $this->lastIndex = $index;\n return $this;\n }", "public static function currentFilter()\n {\n return end(self::$currentFilter);\n }", "function resetIndex() {\n $this->index = 0;\n }", "public function thruIndex() {\n\t\treturn $this->thru > 0 ? $this->thru - 1 : 0;\n\t}", "public function last()\n {\n $this->pointer = count($this->data) - 1;\n }", "public function getIteratorIndex () {}", "public function incrementRouteDepth();", "public function getStartIndex();", "function gonext(){\r\n\t\t$this->back-=1;\r\n\t\tif ($this->back<0) {//Retreated to the last point\r\n\t\t\t$this->back=0;\r\n\t\t}\r\n\t\treturn $this->history[$this->prevNum($this->first,$this->back)]['path'];\r\n\t}", "function idx_saveIndexLine($pre, $wlen, $idx, $line){\n global $conf;\n if(substr($line,-1) != \"\\n\") $line .= \"\\n\";\n $fn = $conf['indexdir'].'/'.$pre.$wlen;\n $fh = @fopen($fn.'.tmp','w');\n if(!$fh) return false;\n $ih = @fopen($fn.'.idx','r');\n if ($ih) {\n $ln = -1;\n while (($curline = fgets($ih)) !== false) {\n if (++$ln == $idx) {\n fwrite($fh, $line);\n } else {\n fwrite($fh, $curline);\n }\n }\n if ($idx > $ln) {\n fwrite($fh,$line);\n }\n fclose($ih);\n } else {\n fwrite($fh,$line);\n }\n fclose($fh);\n if($conf['fperm']) chmod($fn.'.tmp', $conf['fperm']);\n io_rename($fn.'.tmp', $fn.'.idx');\n return true;\n}", "public function moveToEnd() {\n\t\t$this->index = $this->count();\n\t}", "public function next() \n {\n $this->currentIndex++;\n }", "abstract public function syncWithIndex(): Index;", "private function nextHandler()\n {\n $copy = clone $this;\n $copy->index++;\n\n return $copy;\n }", "public function execute ()\n {\n\n // skip to the next filter\n $this->index++;\n\n if ($this->index < count($this->chain))\n {\n\n // execute the next filter\n $this->chain[$this->index]->execute($this);\n\n }\n\n }", "public function next(): void\n {\n $this->iIndex++;\n }", "function getNextTodo($path, $count)\n {\n }", "public function current_filter(): string\n {\n return \\end($this->current_filter);\n }", "public function setLastFile(){\n $this->path = Filesystem::lastIncrementFilename($this->path);\n }", "public function updatePathCounts($index = 0) {\n $feed = $this->getChunkedResults($index);\n\n foreach ($feed->results->rows as $value) {\n\n // Google Analytics pagepaths that are extremely long are meaningless.\n $page_path = substr(htmlspecialchars($value['pagePath'], ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'), 0, 2047);\n $this->connection->merge('google_analytics_counter')\n ->key(['pagepath_hash' => md5($page_path)])\n ->fields([\n // Escape the path see https://www.drupal.org/node/2381703\n 'pagepath' => $page_path,\n 'pageviews' => SafeMarkup::checkPlain($value['pageviews']),\n ])\n ->execute();\n }\n\n // Log the results.\n $this->logger->info($this->t('Saved @count paths from Google Analytics into the database.', ['@count' => count($feed->results->rows)]));\n }", "public function rewind() {\n\t\t$this->index = 0;\n\t}", "public function rewind()\n {\n $this->index=0;\n }", "function indexdown($id=NULL){\n\t\t$result=$this->Sponsern->find('all',array('conditions'=>'Sponsern.id='.$id,'fields'=>'index'));\n\t\techo $result[0]['Sponsern']['index'];\n\t\t$newindex =$result[0]['Sponsern']['index']-1;\n\t\techo $newindex;\n\t\t$commer = $this->Sponsern->find('all',array('conditions'=>'Sponsern.index='.$newindex,'fields'=>'id,index')); \n\t\techo $commer[0]['Sponsern']['index'];\n\t\t$commerindex=$commer[0]['Sponsern']['index']+1;\n\t\t$newId = $commer[0]['Sponsern']['id'];\n\t\t$this->Sponsern->updateAll(array('Sponsern.index' =>$newindex ),array('Sponsern.id'=>$id));\n\t\t$this->Sponsern->updateAll(array('Sponsern.index' =>$commerindex ),array('Sponsern.id'=>$newId));\n\t\t$this->redirect('index');\n\t}", "public function setLastIndexOperation($val)\n {\n $this->_propDict[\"lastIndexOperation\"] = $val;\n return $this;\n }", "function idx_writeIndexLine($fh,$line,$pid,$count){\n fwrite($fh,idx_updateIndexLine($line,$pid,$count));\n}", "public function getNextDirNumber()\n {\n return $this\n ->find()\n ->select(['dir'])\n ->orderDesc('dir')\n ->first()\n ->dir + 1;\n }", "public function lastRow(){\r\n$this->pointer = $this->countRows - 1;\r\n}", "public function lastRow(){\r\n$this->pointer = $this->countRows - 1;\r\n}", "public function getStartFilter(): int;", "public function end(): void\n {\n $this->current = $this->tail->prev();\n $this->offset = $this->count - 1;\n }", "function increment_position() {\n\t\t$this->data[$this->position_field] ++;\n\t\treturn $this->update_over();\n\t}", "public function nextIndex(): int\n {\n return count($this->calls);\n }", "public function next()\n {\n $level = 0;\n do{\n $key = $this->optionKeys[$level];\n list($current,$max) = $this->accounting[$key];\n if($current+1 < $max){\n $this->accounting[$key][0]++;\n break;\n }else{\n $this->accounting[$key][0] = 0;\n $level++;\n }\n }while($level < count($this->options));\n $this->sync();\n $this->position++;\n }", "public function setIteratorLastRow () {}", "abstract public function lastpos();", "public function testFilterSlicePositiveEndIndexes(): void\n {\n $jsonPath = (new JSONPath(['first', 'second', 'third', 'fourth', 'fifth']));\n\n $result = $jsonPath\n ->find('$[0:0]');\n\n self::assertEquals([], $result->getData());\n\n $result = $jsonPath\n ->find('$[0:1]');\n\n self::assertEquals(['first'], $result->getData());\n\n $result = $jsonPath\n ->find('$[0:2]');\n\n self::assertEquals(['first', 'second'], $result->getData());\n\n $result = $jsonPath\n ->find('$[:2]');\n\n self::assertEquals(['first', 'second'], $result->getData());\n\n $result = $jsonPath\n ->find('$[1:2]');\n\n self::assertEquals(['second'], $result->getData());\n\n $result = $jsonPath\n ->find('$[0:3:1]');\n\n self::assertEquals(['first', 'second', 'third'], $result->getData());\n\n $result = $jsonPath\n ->find('$[0:3:0]');\n\n self::assertEquals(['first', 'second', 'third'], $result->getData());\n }", "public function setIteratorIndex ($index) {}", "public function rewind ()\n\t{\n\t\t$this->index = 0;\n\t}", "function moveLast() {\r\n \t\t\tend($this->model->triples);\r\n \t\t\t$this->position=key($this->model->triples);\r\n }", "public function pathAfterIterator()\n {\n $iteratorPos = $this->getIteratorPos($this->pointer);\n $pathAfter = array();\n $path = $this->getPath();\n $count = count($path->getPathArray());\n for ($pos = $iteratorPos + 1; $pos < $count; $pos++) {\n $pathAfter[] = $path[$pos];\n }\n return implode($path->getSeparator(), $pathAfter);\n }", "public function prevRow(){\r\n$this->pointer = $this->pointer - 1;\r\n}", "public function prevRow(){\r\n$this->pointer = $this->pointer - 1;\r\n}", "public function next()\n {\n $this->currentIndex++;\n }", "public function next()\n {\n $this->currentIndex++;\n }", "public function next()\n {\n $this->currentIndex++;\n }", "public function next()\n {\n $this->currentIndex++;\n }", "private function rewriteParameterIndexes(): void\n {\n $i = 1;\n $parameters = $this->parameters;\n $this->parameters = [];\n foreach ($parameters as $name) {\n $this->parameters[$i] = $name;\n $i++;\n }\n }", "public function rewind()\n {\n $this->index = 0;\n }", "public function rewind()\n {\n $this->index = 0;\n }", "public function rewind()\n {\n $this->index = 0;\n }", "public function rewind()\n {\n $this->index = 0;\n }", "function indexup($id=NULL){\n\t\t$result=$this->Sponsern->find('all',array('conditions'=>'Sponsern.id='.$id,'fields'=>'index'));\n\t\t$newindex =$result[0]['Sponsern']['index']+1;\n\t\t$commer = $this->Sponsern->find('all',array('conditions'=>'Sponsern.index='.$newindex,'fields'=>'id,index')); \n\t\t$commerindex=$commer[0]['Sponsern']['index']-1;\n\t\t$newId = $commer[0]['Sponsern']['id'];\n\t\t$this->Sponsern->updateAll(array('Sponsern.index' =>$newindex ),array('Sponsern.id'=>$id));\n\t\t$this->Sponsern->updateAll(array('Sponsern.index' =>$commerindex ),array('Sponsern.id'=>$newId));\n\t\t\n\t\t$this->redirect('index');\n\t}", "public function rewind()\n\t{\n\t\t$this->index = 0;\n\t}", "function setScanIndexAttribute(){\n $this->sortInDescendingOrder = True;\n }", "public function rewind()\r\n {\r\n $this->currentIdx = 0;\r\n }", "public function getIndex() {\n return $this->hasNext;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function moveToLast() {\n\t\t$lastEntry = $this->count() - 1;\n\t\tif ($lastEntry >= 0 && $lastEntry != $this->index) {\n\t\t\t$this->index = $this->count() - 1;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private function getNextId() : int {\n if(!file_exists(DIR. 'data/indexes.json')) {\n $index = json_encode(['id'=>1]);\n file_put_contents(DIR. 'data/indexes.json', $index);\n }\n $index = file_get_contents(DIR. 'data/indexes.json');\n $index = json_decode($index, 1);\n $id = (int) $index['id'];\n //seknati karta rasant butu vienetu didesnis\n $index['id'] = $id + 1;\n $index = json_encode($index);\n file_put_contents(DIR. 'data/indexes.json', $index);\n return $id;\n }", "public function inc($value) {\n\t\t$this->queryChanged = true;\n\t\treturn parent::map($map);\n\t}", "public function next() {\n $this->current_index += $this->increment;\n if ($this->current_index >= count($this->deletes)) {\n if (! $this->rename_seeked) {\n $this->_seekRenames();\n } else {\n // One less than $this->increment because each() already incremented 1\n for ($i = 1; $i < $this->increment; $i++) {\n next($this->renames);\n }\n }\n }\n }", "function getIndex() ;", "public function getNewIndex()\n {\n return $this->new_index;\n }", "public function rewind (){\n\t\t$this->curr = 0;\n\t}", "public function setFromLast()\n {\n $ops = new Ops($this->dbase);\n $num = $ops->last();\n $aOPs = $this->setOPs();\n //localiza a OP no array\n $offset = 0;\n if ($num > 0) {\n $offset = array_search($num, array_keys($aOPs)) + 1;\n } \n //$length = count($aOPs) - $offset - 1;\n // trunca o array\n $result = array_slice($aOPs, $offset, null, true);\n //salva \n $this->insertOPs($result);\n }", "public function apply($index);", "public function next()\n {\n $this->index++;\n }", "public function next ()\n\t{\n\t\t$this->index++;\n\t}", "function last_item() {\n\t\t$offset_end = $this->limit() * $this->number;\n\t\t\n\t\tif ($offset_end > $this->paginator->item_count) {\n\t\t\t$offset_end = $this->paginator->item_count;\n\t\t}\n\t\t\n\t\treturn $offset_end;\n\t}", "function incrementPointer( $amount=1 )\r\n\t{\r\n\t\tfor ( $i=0; $i<$amount; $i++ ) {\r\n\t\t\tif ( $this->pointer < ( count( $this->terms ) - 1 ) ) {\r\n\t\t\t\t$this->pointer++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->nextterm =& $this->terms[$this->pointer];\r\n\t}", "function increment()\n {\n $this->step_counter++;\n\n return $this;\n }", "function goback(){\r\n\t\t$this->back+=1;\r\n\t\t//Maximum number of setbacks as a starting point to the end point of difference (the difference between the clockwise)\r\n\t\t$mins=$this->minus($this->first,$this->last);\r\n\t\tif ($this->back >= $mins) {//Retreated to the last point\r\n\t\t\t$this->back=$mins;\r\n\t\t}\r\n\r\n\t\t$pos=$this->prevNum($this->first,$this->back);\r\n\t\treturn $this->history[$pos]['path'];\r\n\t}", "public function incrementQueryCount()\n\t{\n\t\t$this->queryCount++;\n\t}", "public function incrementQueryCount() {\n\t\t$this->queryCount++;\n\t}", "public function rewind()\n {\n $this->current = $this->start ?: ($this->end ? $this->calc($this->end, -$this->recurrences) : new DateTime());\n $this->last = $this->end ?: $this->calc($this->current, $this->recurrences);\n $this->position = 0;\n }", "public function rewind() { \n if ($this->index != -1) {\n $this->index = -1; \n }\n $this->next(); \n }", "public function rewind()\n\t{\n\t\t$this -> i = 0;\n\t}", "private function incrementDirection()\n {\n $this->direction === 3 ? $this->direction = 0 : $this->direction++;\n }" ]
[ "0.61135364", "0.58235395", "0.55338895", "0.5495124", "0.5483203", "0.5447918", "0.54236203", "0.54063344", "0.5201753", "0.5193952", "0.51884794", "0.51788455", "0.5174224", "0.51650167", "0.516397", "0.515777", "0.5134112", "0.5113724", "0.5064874", "0.5030971", "0.5015773", "0.49899572", "0.4985009", "0.49632916", "0.49581957", "0.4945017", "0.49443284", "0.49434197", "0.49239555", "0.4898602", "0.4897386", "0.48960352", "0.48939896", "0.4884769", "0.48805583", "0.48795685", "0.48614424", "0.48401842", "0.4816438", "0.48113167", "0.47990787", "0.47939205", "0.47925428", "0.47855082", "0.4771427", "0.4766507", "0.4766507", "0.47538456", "0.47519335", "0.47517833", "0.47481385", "0.47449306", "0.47430182", "0.47388068", "0.47366092", "0.472357", "0.47231305", "0.47213912", "0.47196904", "0.47144464", "0.47144464", "0.4705006", "0.4705006", "0.4705006", "0.4705006", "0.4695406", "0.46878225", "0.46878225", "0.46878225", "0.46878225", "0.46796995", "0.46745756", "0.4672588", "0.46694505", "0.46579808", "0.46515954", "0.46515954", "0.46515954", "0.46515954", "0.4650102", "0.4634738", "0.46340275", "0.462774", "0.46265098", "0.46160161", "0.46075767", "0.46014076", "0.46011055", "0.46008694", "0.45951983", "0.45903626", "0.4586869", "0.458592", "0.45786422", "0.45772535", "0.456998", "0.4566565", "0.45633444", "0.4559145", "0.4557862" ]
0.7776402
0
Gets a datagrid column frontend type for the given field type
Получает тип фронтенд-колонки датагрида для заданного типа поля
protected function getFrontendFieldType($fieldType) { switch ($fieldType) { case 'integer': case 'smallint': case 'bigint': return PropertyInterface::TYPE_INTEGER; case 'decimal': case 'float': return PropertyInterface::TYPE_DECIMAL; case 'boolean': return PropertyInterface::TYPE_BOOLEAN; case 'date': return PropertyInterface::TYPE_DATE; case 'datetime': return PropertyInterface::TYPE_DATETIME; } return PropertyInterface::TYPE_STRING; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getType() : IColumnComponentType;", "function zen_field_type($tbl, $fld) {\n global $db;\n $rs = $db->MetaColumns($tbl);\n $type = $rs[strtoupper($fld)]->type;\n return $type;\n }", "public function getFieldType()\n {\n return $this->fieldType;\n }", "public function getFieldType()\n {\n return $this->field_type;\n }", "public function getFieldTypeFromDbColumnType($field)\n {\n if (! array_key_exists($field, $this->field_types)) {\n return 'text';\n }\n\n if ($field == 'password') {\n return 'password';\n }\n\n if ($field == 'email') {\n return 'email';\n }\n\n switch ($this->field_types[$field]['type']) {\n case 'int':\n case 'smallint':\n case 'mediumint':\n case 'longint':\n return 'number';\n break;\n\n case 'string':\n case 'varchar':\n case 'set':\n return 'text';\n break;\n\n // case 'enum':\n // return 'enum';\n // break;\n\n case 'tinyint':\n return 'active';\n break;\n\n case 'text':\n case 'mediumtext':\n case 'longtext':\n return 'textarea';\n break;\n\n case 'date':\n return 'date';\n break;\n\n case 'datetime':\n case 'timestamp':\n return 'datetime';\n break;\n case 'time':\n return 'time';\n break;\n\n default:\n return 'text';\n break;\n }\n }", "public function getFieldType() {\n\t\treturn $this->_fieldType;\n\t}", "public function get_type() {\n\t\treturn Helper::class_to_type( get_class( $this ), '_Field' );\n\t}", "function acf_get_field_type($name) {}", "function getType() {\n\t\treturn $this->data_array['field_type'];\n\t}", "public function get_field_type($field)\n {\n }", "public function getFieldType() {\n return @$this->attributes['field_type'];\n }", "private function fieldType ( $column ) {\r // TODO - Implement all types\r if ( strpos( strtolower( $column->getDataType( ) ), 'char' ) !== FALSE ) {\r return 'text';\r } else {\r return $column->getDataType( );\r }\r }", "public function getColType();", "function spgfwpdb_get_field_type( $table, $field )\n\t\t{\n\n\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$results = $wpdb->get_results( \"SHOW COLUMNS FROM `{$table}` LIKE '{$field}';\", ARRAY_N );\n\t\t\tif( $results )\n\t\t\t{\n\n\t\t\t\t$pos = strpos( $results[ 0 ][ 1 ], '(' );\n\t\t\t\tif( $pos === false ) \n\t\t\t\t\t$pos = strlen( $results[ 0 ][ 1 ] );\n\t\t\t\t\t\t\t\n\t\t\t\t$fieldType = substr( $results[ 0 ][ 1 ], 0, $pos );\n\n\t\t\t\tswitch( $fieldType )\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'float':\n\t\t\t\t\tcase 'double':\n\t\t\t\t\tcase 'decimal':\n\t\t\t\t\tcase 'numeric':\n\t\t\t\t\t\treturn( '%f' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tcase 'int':\n\t\t\t\t\tcase 'bigint':\n\t\t\t\t\tcase 'tinyint':\n\t\t\t\t\tcase 'smallint':\n\t\t\t\t\tcase 'mediumint':\n\t\t\t\t\tcase 'integer':\n\t\t\t\t\t\treturn( '%d' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn( '%s' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t}", "public function getTypeAttribute()\n {\n return $this->fieldType;\n }", "function get_field_type($name)\n {\n }", "public function getTypeColumn()\n {\n return (property_exists($this, 'typeColumn')) ? $this->{'typeColumn'} : 'type';\n }", "public function getFieldType(string $fieldName): string;", "public function getColumnType()\n {\n return $this->columnType;\n }", "protected function field_type($field_name) {\n\t\t$the_fields = $this->fields();\n\t\treturn $the_fields[$field_name][\"type\"]; // Get field type for selected field\n\t}", "function getFieldType($tableName = null, $field = null)\n {\n // Make a DDL query\n $query = \"SHOW COLUMNS FROM $tableName LIKE \" . q($field);\n \n $result = mysql_query($query);\n\t \n $data = mysql_fetch_array($result);\n $splitTypeData = explode(\"(\",$data['Type']);\n\t $typeName = $splitTypeData[0];\n return $typeName;\n }", "function acf_get_field_type( $name ) {\n\treturn acf()->fields->get_field_type( $name );\n}", "protected static function getAttributeType(Mage_Eav_Model_Entity_Attribute $attribute)\n {\n if ($attribute->usesSource()) return 'select';\n elseif ($attribute->isStatic()) return $attribute->getFrontendInput() == 'date' ? 'datetime' : 'varchar';\n else return $attribute->getBackendType();\n }", "private function get_field_type($field, $table) {\n\t\tglobal $foebis;\n\t\t\n\t\t$sql = \"SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '\" . $table . \"' AND COLUMN_NAME = '\" . $field . \"'\";\n\t\t$result = $foebis->query($sql);\n\t\tif($result->num_rows > 0){\n\t\t\twhile($row = $result->fetch_assoc()){ \n\t\t\t return $row['DATA_TYPE'];\t\t \n\t\t\t}\n\t\t\tunset($row);\n\t\t}\n\t\tunset($result);\n\t\t\n\t\treturn true;\n\t}", "function getDDFieldType($fieldObj) {\n\t\t$type = strtolower($fieldObj->Type);\n\t\t\n\t\tif ($type == \"int(11)\") return DB_DEF_ID;\n\t\tif ($type == \"int(8)\") return DB_DEF_INTEGER;\n\t\telse if ($type == \"tinyint(1)\") return DB_DEF_BOOLEAN;\n\t\telse if ($type == \"int(14)\") return DB_DEF_TIMESTAMP;\n\t\telse if (substr($type,5) == \"double\") return DB_DEF_DECIMAL;\n\t\t// Strings\n\t\telse if ($type == \"text\" || $type == \"mediumtext\" || $type == \"longtext\" || strpos($type,\"varchar(\") !== false) {\n\t\t\treturn DB_DEF_STRING;\n\t\t}\n\t}", "private function _getFieldType()\n {\n $result = getKey($this->_doc, 'db-type', 'int');\n if (isset($this->_doc[\\Core\\Model::TYPE_SERIALIZE])) {\n $result = \\Core\\Model::TYPE_SERIALIZE;\n } else if (isset($this->_doc[\\Core\\Model::TYPE_ARRAY])) {\n $result = \\Core\\Model::TYPE_ARRAY;\n } else if ($result == 'boolean' || $result == 'bool') {\n $result = \\Core\\Model::TYPE_BOOL;\n }\n return $result;\n }", "public function getTypeOfField()\n {\n return $this->typeOfField;\n }", "function getCFldType()\n {\n $selected_value = CUSTOM_FIELD_TYPE_TEXT;\n\n if ($this->mode == 'edit')\n $selected_value = $this->field_data[0]['field_type'];\n\n if (isset($this->field_data['postdata']))\n $selected_value = $this->field_data['postdata']['customFieldType'];\n\n $data = array(\n 'select_name' => 'customFieldType',\n 'onChange' => 'javascript: changeStatus();',\n 'id' => 'customTypeChoice',\n \t'class' => 'form-control input-sm input-small',\n 'selected_value' => $selected_value,\n 'values' => array(\n array(\"value\" => CUSTOM_FIELD_TYPE_TEXT, \"contents\" => \"Text\"),\n //array(\"value\" => CUSTOM_FIELD_TYPE_CHECKBOX, \"contents\" => \"Checkbox\"),\n array(\"value\" => CUSTOM_FIELD_TYPE_SELECT, \"contents\" => \"Single Choice List\"),\n array(\"value\" => CUSTOM_FIELD_TYPE_TEXTAREA, \"contents\" => \"Text Area\"),\n ),\n );\n\n return $this->HtmlForm->genDropdownSingleChoice($data);\n }", "public function field_type()\n {\n return $this->belongsTo('Shagyt\\lvcrud\\Models\\FieldType');\n }", "protected abstract function get_rest_field_type();", "protected function getFieldType($statistic_type)\n {\n\t $fieldType = '';\n\t \n\t switch ($statistic_type)\n\t {\n\t\t case 'numeric':\n\t\t \t$fieldType = 'N';\n\t\t \tbreak;\n\t\t case 'text':\n\t\t \t$fieldType = 'T';\n\t\t \tbreak;\n\t\t case 'boolean':\n\t\t \t$fieldType = 'B';\n\t\t \tbreak;\n\t\t case 'date':\n\t\t \t$fieldType = 'D';\n\t\t \tbreak;\n\t\t case 'time':\n\t\t \t$fieldType = 'Time';\n\t\t \tbreak;\t\n\t\t case 'datetime':\n\t\t \t$fieldType = 'DateTime';\n\t\t \tbreak;\t\t\t \n\t\t default:\n\t\t \t$fieldType = 'T';\n\t\t \tbreak;\n\t\t}\n\t\t\n\t\treturn $fieldType;\n\t}", "protected function getType() {\n return dosomething_helpers_extract_field_data($this->node->field_campaign_type);\n }", "public function getAdminColumnType()\n {\n return $this->getData('admin_column_type');\n }", "function getType($fieldname){\n\t\tif ( !isset($this->_cache[__FUNCTION__][$fieldname]) ){\n\t\t\t$field =& $this->getField($fieldname);\n\t\t\tif ( PEAR::isError($field) ) return $field;\n\t\t\t\n\t\t\tif ( isset( $field ) ){\n\t\t\t\t\n\t\t\t\t$type = $field['Type'];\n\t\t\t\t\n\t\t\t\t$matches = array();\n\t\t\t\t\n\t\t\t\tif ( preg_match('/^([^\\(]+).*/', $type, $matches) ){\n\t\t\t\t\t$type = $matches[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$type = trim($type);\n\t\t\t\t$this->_cache[__FUNCTION__][$fieldname] = strtolower($type);\n\t\t\t}\n\t\t}\n\t\treturn $this->_cache[__FUNCTION__][$fieldname];\n\t\t\t\n\t\n\t}", "public static function getEditorFieldType(): string;", "private function set_extended_data_display_type( $data_field ) {\n\t\t$display_type = $this->slplus->database->extension->get_option( $data_field->slug , 'display_type' );\n\t\tif ( is_null( $display_type ) ) {\n\t\t\tswitch ( $data_field->type ) {\n\n\t\t\t\tcase 'boolean':\n\t\t\t\t\t$display_type = 'checkbox';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'text':\n\t\t\t\t\t$display_type = 'textarea';\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$display_type = 'text';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $display_type;\n\t}", "public function getTypeOfField($field) {\n\t\tif(!key_exists($field, $this->fields)) {\n\t\t\treturn FieldType::TEXT;\n\t\t}\n\t\treturn $this->fields[$field][1];\n\t}", "public function getColumnType($table, $column);", "public static function getSearchColumnType($type){\n switch($type){\n case 'datetime' : $searchColumnType = 'datetime';break;\n case 'tinyint' :\n case 'smallint' :\n case 'mediumint' :\n case 'bigint' :\n case 'integer' : $searchColumnType = 'int';break;\n case 'float' : $searchColumnType = 'float';break;\n default : $searchColumnType = 'string';break;\n }\n return $searchColumnType;\n }", "public function getTypeClassAttribute()\n {\n return $this->fieldType->getClass();\n }", "function get_field_type_by_id($field_type_id)\n\t{\n\t\t$this->db->where('fields_type_id', $field_type_id);\n\n\t\t$query = $this->db->get('fields_types');\n\t\tif ($query->num_rows() == 1) return $query->row();\n\t\treturn NULL;\n\t}", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "function get_field_type( $name ) {\n\t\t\treturn isset( $this->types[ $name ] ) ? $this->types[ $name ] : null;\n\t\t}", "function ColumnType($rs, $col) \n\t\t{\n\t\t\tif ($rs) return @pg_fieldname($rs, $col);\n\t\t}", "public function get_type();", "protected function getFieldType(FieldDescriptorInterface $column)\n {\n switch (strtolower($column->getType())) {\n case \"int\":\n case \"integer\":\n case \"smallint\":\n case \"tinyint\":\n return \"int\";\n case \"number\":\n case \"double\":\n case \"real\":\n case \"float\":\n return \"float\";\n case \"bool\":\n case \"boolean\":\n return \"bool\";\n }\n\n return \"string\";\n }", "public function fieldType($table, $column) {\n\t\t$auth = $this->auth();\n\n\t\t$return = $this->cell('INFORMATION_SCHEMA.COLUMNS', 'COLUMN_TYPE', [\n\t\t\t'TABLE_SCHEMA'\t=> $auth['database'],\n\t\t\t'TABLE_NAME'\t=> $this->_prefix($table),\n\t\t\t'COLUMN_NAME'\t=> $column,\n\t\t]);\n\n\t\tif (substr($return, 0, 5) === 'enum(') {\n\t\t\t$return = str_getcsv(substr($return, 5, -1), ',', \"'\");\n\t\t} else if (substr($return, 0, 4) === 'set(') {\n\t\t\t$return = str_getcsv(substr($return, 4, -1), ',', \"'\");\n\t\t}\n\n\t\treturn $return;\n\t}", "public static function get_type() {\n\t\treturn Utils::FIELD_TYPE_SELECT;\n\t}", "static function getColumnType($column_name) {\n\t\treturn Address::$_columnTypes[Address::normalizeColumnName($column_name)];\n\t}", "function getTypeName() {\n\t\t$arr = $this->getAvailableTypes();\n\t\treturn $arr[$this->data_array['field_type']];\n\t}", "function getForeignFieldType()\n{\n $debug_prefix = debug_indent(\"ForeignField-getForeignFieldType() {$this->moduleID}.{$this->name}:\");\n\n $t_mf = GetModuleField($this->foreignTable, $this->foreignField);\n $type = strtolower(get_class($t_mf));\n\n print \"$debug_prefix returns $type (end)\\n\";\n debug_unindent();\n return $type;\n}", "static function getColumnType($column_name) {\n\t\treturn Article::$_columnTypes[$column_name];\n\t}", "public function getFieldColumn($field);", "public function getFieldType($fieldname) {\n if (isset($this->fields[$fieldname])) {\n return $this->fields[$fieldname];\n } else {\n return false;\n }\n }", "public function fieldType( $field_data, $field, $entry) {\n foreach ($this->field_types as $key => $types) {\n if (array_key_exists($field->field_type, $types))\n return new $types[ $field->field_type ]( $field_data, $field, $entry );\n }\n }", "function getDataType()\n{\n if(empty($this->dataType)){\n $remoteField = GetModuleField($this->remoteModuleID, $this->remoteField);\n return $remoteField->getDataType();\n } else {\n return $this->dataType;\n }\n}", "function ColumnType($rs, $col) \n\t\t{\n\t\t\tif ($rs) return @fbsql_field_type($rs, $col);\n\t\t}", "protected function getFieldType(): string\n {\n return 'string';\n }", "public function get_field_type(string $p_fieldname): ?string {\n return $this->field_types[$p_fieldname] ?? null;\n }", "public static function get_type();", "public abstract function getFieldType($name);", "function getDataType()\n{\n if(empty($this->dataType)){\n $foreignField = GetModuleField($this->foreignTable, $this->foreignField);\n return $foreignField->getDataType();\n } else {\n return $this->dataType;\n }\n}", "function column_core_type( $item ) {\r\n\t\treturn esc_attr( $item->core_type );\r\n\t}", "function column_core_type( $item ) {\r\n\t\treturn esc_attr( $item->core_type );\r\n\t}", "public function get_custom_field_type( $type ) {\n return $this->text_domain . \"_{$type}\" ;\n }", "public static function getFieldsType() {\r\n\t\tstatic $fieldstype;\r\n\r\n\t\tif ($fieldstype === null) {\r\n\t\t\t$fieldstype = array();\r\n\t\t\t$fields = static::getFields();\r\n\t\t\t$pdo = static::getPdo();\r\n\t\t\tforeach ($fields as $field) {\r\n\t\t\t\t$fieldstype[$field] = $pdo->nameToType($field);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $fieldstype;\r\n\t}", "public function getValueElementType()\n {\n if (!is_object($this->getAttributeObject())) {\n return 'text';\n }\n $input = $this->getAttributeObject()->getFrontendInput();\n switch ($input) {\n case 'boolean':\n return 'select';\n case 'select':\n case 'multiselect':\n case 'date':\n return $input;\n default:\n return 'text';\n }\n }", "function getFieldType( $query_id=-1, $fieldOffset=0 ) {\n\t\tif ($query_id!=-1) $this->query_id=$query_id; \n\t\treturn mysql_field_type($this->query_id, $fieldOffset);\n\t}", "public function getType()\n {\n if (is_null($this->type)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_TYPE);\n if (is_null($data)) {\n return null;\n }\n $this->type = (string) $data;\n }\n\n return $this->type;\n }", "function get_field_types()\n {\n }", "public function getColumnTypeByField(ScalarField $field)\n\t{\n\t\tif ($field instanceof ORM\\Fields\\IntegerField)\n\t\t{\n\t\t\treturn 'number(18)';\n\t\t}\n\t\telseif ($field instanceof ORM\\Fields\\FloatField)\n\t\t{\n\t\t\t$scale = $field->getScale();\n\t\t\treturn 'number'.($scale !== null? \"(*,\".$scale.\")\": \"\");\n\t\t}\n\t\telseif ($field instanceof ORM\\Fields\\DatetimeField)\n\t\t{\n\t\t\treturn 'date';\n\t\t}\n\t\telseif ($field instanceof ORM\\Fields\\DateField)\n\t\t{\n\t\t\treturn 'date';\n\t\t}\n\t\telseif ($field instanceof ORM\\Fields\\TextField)\n\t\t{\n\t\t\treturn 'clob';\n\t\t}\n\t\telseif ($field instanceof ORM\\Fields\\BooleanField)\n\t\t{\n\t\t\t$values = $field->getValues();\n\n\t\t\tif (preg_match('/^[0-9]+$/', $values[0]) && preg_match('/^[0-9]+$/', $values[1]))\n\t\t\t{\n\t\t\t\treturn 'number(1)';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 'varchar2('.max(mb_strlen($values[0]), mb_strlen($values[1])).' char)';\n\t\t\t}\n\t\t}\n\t\telseif ($field instanceof ORM\\Fields\\EnumField)\n\t\t{\n\t\t\treturn 'varchar2('.max(array_map('strlen', $field->getValues())).' char)';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// string by default\n\t\t\t$defaultLength = false;\n\t\t\tforeach ($field->getValidators() as $validator)\n\t\t\t{\n\t\t\t\tif ($validator instanceof ORM\\Fields\\Validators\\LengthValidator)\n\t\t\t\t{\n\t\t\t\t\tif ($defaultLength === false || $defaultLength > $validator->getMax())\n\t\t\t\t\t{\n\t\t\t\t\t\t$defaultLength = $validator->getMax();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 'varchar2('.($defaultLength > 0? $defaultLength: 255).' char)';\n\t\t}\n\t}", "protected function relevantDataField($type) {\n $map = [\n 'address' => 'address',\n 'telephone' => 'telephone_number',\n 'email' => 'email_address',\n ];\n\n return isset($map[$type]) ? $map[$type] : NULL;\n }", "protected function getFeedType() {\n\t\treturn $this->owner->{$this->feedTypeFieldName()};\n\t}", "private function getFieldType( $fldName ) {\n $dbType = $this->arrTableDef[$fldName];\n $returnVal = -1;\n\n $arrNumKeywords = array( 'bit', 'int', 'bool', 'float', 'double', 'dec', 'fixed' );\n $arrDateKeywords = array( 'date', 'time', 'year' );\n\n // Check the column type for numeric keywords\n foreach( $arrNumKeywords as $keywd ) {\n if( stristr( $dbType, $keywd ) !== FALSE ) { $returnVal = mySqlTable::TYPE_NUMERIC; }\n if( $returnVal != -1 ) break;\n }\n\n // Check the column type for date/time keywords\n if( $returnVal == -1 ) {\n foreach( $arrDateKeywords as $keywd ) {\n if( stristr( $dbType, $keywd ) !== FALSE ) { $returnVal = mySqlTable::TYPE_DATETIME; }\n if( $returnVal != -1 ) break;\n }\n }\n\n return $returnVal == -1 ? mySqlTable::TYPE_STRING : $returnVal;\n }", "function ColumnType($rs, $col) \n\t\t{\n\t\t\treturn $this->currentDB->ColumnType($rs,$col);\n\t\t}", "public static function getFieldsTypeInGrid() {\n\t\treturn array();\n\t}", "public function getDataType($model, $attribute);", "public function getValueElementType()\n {\n if ($this->_isCurrentAttributeDefaultAddress()) {\n return 'select';\n }\n if (!is_object($this->getAttributeObject())) {\n return 'text';\n }\n $input = $this->getAttributeObject()->getFrontendInput();\n switch ($input) {\n case 'boolean':\n return 'select';\n case 'select':\n case 'multiselect':\n case 'date':\n return $input;\n default:\n return 'text';\n }\n }", "protected function getFieldType($field) {\n $fieldTypes = $this->getFieldTypes();\n\n if ($field instanceof Field) {\n $fieldType = $field->getType();\n if (!isset($fieldTypes[$fieldType])) {\n throw new DatabaseException('No database type found for type ' . $fieldType);\n }\n\n return $fieldTypes[$fieldType];\n }\n\n $type = array_search($field, $fieldTypes);\n if ($type === false) {\n throw new DatabaseException('No type found for database type ' . $field);\n }\n\n return $type;\n }", "public function getType()\n {\n return $this->getTypeHelper;\n }", "protected function getType()\n {\n return $this->typesRegistry->get($this->type());\n }", "protected function getFilterType($fieldType)\n {\n switch ($fieldType) {\n case 'integer':\n case 'smallint':\n case 'bigint':\n case 'decimal':\n case 'float':\n return 'number';\n case 'boolean':\n return PropertyInterface::TYPE_BOOLEAN;\n case 'date':\n case 'datetime':\n return PropertyInterface::TYPE_DATETIME;\n }\n\n return PropertyInterface::TYPE_STRING;\n }", "function repec_get_field_content_type($content_type, $series_name, $field_series) {\n $row = db_select('repec_assoc', 'ra')\n ->fields('ra')\n ->condition('content_type', $content_type)\n ->condition('series_name', $series_name)\n ->condition('field_series', $field_series)\n ->execute()\n ->fetchObject();\n return $row->field_content_type;\n}", "protected abstract function get_type();", "public function getContentColumnType(): string;", "function get_field_types() {\n\t\t\treturn $this->types;\n\t\t}", "public function getFieldTypeFactory();", "abstract function get_type();", "public function getType()\n {\n return FacetSet::FACET_FIELD;\n }", "public function getDataWithTypeField() {}", "public static function getEditorFieldType(): string\n\t{\n\t\treturn 'client_light';\n\t}", "abstract public function get_type();", "private static function getFieldType($field,$element_list)\n\t{\n\t\tforeach ($element_list as $element)\n\t\t{\n\t\t\tif\t($element['field'] == $field)\n\t\t\t{\n\t\t\t\treturn\t$element['type'];\n\t\t\t}\n\t\t}\n\t}", "function dbFieldType()\n {\n return \"number\";\n }", "public function getInputType()\n {\n if (!is_object($this->getAttributeObject())) {\n return 'string';\n }\n $input = $this->getAttributeObject()->getFrontendInput();\n switch ($input) {\n case 'boolean':\n return 'select';\n case 'select':\n case 'multiselect':\n case 'date':\n return $input;\n default:\n return 'string';\n }\n }", "public static function getColumnType($optionType) {\n\t\tswitch ($optionType) {\n\t\t\tcase 'boolean': return 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 0';\n\t\t\tcase 'integer': return 'INT(10) UNSIGNED NOT NULL DEFAULT 0';\n\t\t\tcase 'float': return 'FLOAT NOT NULL DEFAULT 0.0';\n\t\t\tcase 'textarea': return 'MEDIUMTEXT'; \n\t\t\tcase 'date': case 'birthday': return \"CHAR(10) NOT NULL DEFAULT '0000-00-00'\";\n\t\t\tdefault: return 'TEXT';\n\t\t}\n\t}", "function yog_mysql_field_type ( $result, $offset ) \n{\n \n $ret=0;\n switch (DB_EXTENSION) \n { \n case \"mysql\":\n $ret = mysql_field_type ( $result, $offset );\n break; \n case \"mysqli\":\n $tmp=mysqli_fetch_field_direct ( $result, $offset);\n $ret = GetCorrectDataTypeMySQLI($tmp->type);\n break; \n }\n return $ret;\n}" ]
[ "0.7092602", "0.69943357", "0.685982", "0.68546504", "0.67788523", "0.6751038", "0.6743746", "0.67376727", "0.6698404", "0.6691973", "0.65718085", "0.6500747", "0.64783114", "0.6454151", "0.6449099", "0.6444936", "0.6427332", "0.6417085", "0.6407229", "0.6385315", "0.63827", "0.6341786", "0.6312094", "0.630913", "0.63025606", "0.6298055", "0.6287869", "0.6253306", "0.6249365", "0.6247335", "0.6200815", "0.61766", "0.6175582", "0.61594194", "0.61356986", "0.610701", "0.60714185", "0.60662323", "0.6059757", "0.60543954", "0.60529786", "0.6045349", "0.6044488", "0.6044488", "0.6044488", "0.60428417", "0.6034715", "0.60295963", "0.60213447", "0.60170406", "0.60021526", "0.59880286", "0.5973062", "0.5965545", "0.59624034", "0.59595215", "0.59520864", "0.594644", "0.59061235", "0.5894762", "0.58809865", "0.58765596", "0.5868889", "0.5861954", "0.5861436", "0.58568466", "0.58568466", "0.585581", "0.5846942", "0.5846577", "0.5836444", "0.58130145", "0.58073", "0.5806562", "0.5803179", "0.5802779", "0.57984257", "0.5791924", "0.5779816", "0.57743675", "0.57688826", "0.57683194", "0.57678205", "0.5761891", "0.5751451", "0.5742813", "0.5732514", "0.57221687", "0.57178944", "0.5711528", "0.57047004", "0.569628", "0.56870717", "0.5686595", "0.56751966", "0.5675004", "0.5674047", "0.5668605", "0.56572354", "0.56530756" ]
0.70359206
1
Get filter type for given field type
Получить тип фильтра для заданного типа поля
protected function getFilterType($fieldType) { switch ($fieldType) { case 'integer': case 'smallint': case 'bigint': case 'decimal': case 'float': return 'number'; case 'boolean': return PropertyInterface::TYPE_BOOLEAN; case 'date': case 'datetime': return PropertyInterface::TYPE_DATETIME; } return PropertyInterface::TYPE_STRING; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilteredType();", "function acf_get_field_type($name) {}", "protected function getFilterFormType()\n {\n return sprintf('%s_filter', $this->action->getAdministration()->getNameLowerCase());\n }", "public function getFilterClass($type)\r\n\t{\r\n\t\treturn '\\Engine\\Db\\Filter\\\\'.ucfirst($type);\r\n\t}", "private static function getFilterType($type) {\n\t\tswitch ($type) {\n\t\t\tcase 'phone':\n\t\t\tcase 'number': return FILTER_SANITIZE_NUMBER_INT;\n\t\t\tcase 'email': return FILTER_SANITIZE_EMAIL;\n\t\t\tdefault: return FILTER_SANITIZE_STRING;\n\t\t}\n\t}", "public function get_field_type($field)\n {\n }", "public function getType(): string\n {\n return FilterInterface::TYPE_CUSTOM;\n }", "function get_field_type($name)\n {\n }", "protected abstract function get_rest_field_type();", "public function getFieldType() {\n return @$this->attributes['field_type'];\n }", "public function getFieldType()\n {\n return $this->field_type;\n }", "public function getFieldType()\n {\n return $this->fieldType;\n }", "public function getFieldType(string $fieldName): string;", "public function get_rest_field_type()\n {\n }", "function getType() {\n\t\treturn $this->data_array['field_type'];\n\t}", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "public function get_rest_field_type()\n {\n }", "protected function getFilterObject($type)\n\t{\n\t\tif (!isset($this->filters[$type]))\n\t\t{\n\t\t\t$class = 'ClubMembersFilter' . ucfirst($type);\n\t\t\tif (class_exists($class))\n\t\t\t{\n\t\t\t\t$this->filters[$class] = new $class();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->filters[$class] = false;\n\t\t\t}\n\t\t}\n\t\treturn $this->filters[$class];\n\t}", "function spgfwpdb_get_field_type( $table, $field )\n\t\t{\n\n\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$results = $wpdb->get_results( \"SHOW COLUMNS FROM `{$table}` LIKE '{$field}';\", ARRAY_N );\n\t\t\tif( $results )\n\t\t\t{\n\n\t\t\t\t$pos = strpos( $results[ 0 ][ 1 ], '(' );\n\t\t\t\tif( $pos === false ) \n\t\t\t\t\t$pos = strlen( $results[ 0 ][ 1 ] );\n\t\t\t\t\t\t\t\n\t\t\t\t$fieldType = substr( $results[ 0 ][ 1 ], 0, $pos );\n\n\t\t\t\tswitch( $fieldType )\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'float':\n\t\t\t\t\tcase 'double':\n\t\t\t\t\tcase 'decimal':\n\t\t\t\t\tcase 'numeric':\n\t\t\t\t\t\treturn( '%f' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tcase 'int':\n\t\t\t\t\tcase 'bigint':\n\t\t\t\t\tcase 'tinyint':\n\t\t\t\t\tcase 'smallint':\n\t\t\t\t\tcase 'mediumint':\n\t\t\t\t\tcase 'integer':\n\t\t\t\t\t\treturn( '%d' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn( '%s' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t}", "public function get_type() {\n\t\treturn Helper::class_to_type( get_class( $this ), '_Field' );\n\t}", "function acf_get_field_type( $name ) {\n\treturn acf()->fields->get_field_type( $name );\n}", "public function getFieldType() {\n\t\treturn $this->_fieldType;\n\t}", "function getType($fieldname){\n\t\tif ( !isset($this->_cache[__FUNCTION__][$fieldname]) ){\n\t\t\t$field =& $this->getField($fieldname);\n\t\t\tif ( PEAR::isError($field) ) return $field;\n\t\t\t\n\t\t\tif ( isset( $field ) ){\n\t\t\t\t\n\t\t\t\t$type = $field['Type'];\n\t\t\t\t\n\t\t\t\t$matches = array();\n\t\t\t\t\n\t\t\t\tif ( preg_match('/^([^\\(]+).*/', $type, $matches) ){\n\t\t\t\t\t$type = $matches[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$type = trim($type);\n\t\t\t\t$this->_cache[__FUNCTION__][$fieldname] = strtolower($type);\n\t\t\t}\n\t\t}\n\t\treturn $this->_cache[__FUNCTION__][$fieldname];\n\t\t\t\n\t\n\t}", "function zen_field_type($tbl, $fld) {\n global $db;\n $rs = $db->MetaColumns($tbl);\n $type = $rs[strtoupper($fld)]->type;\n return $type;\n }", "public static function getSearchType($type){\n switch($type){\n case 'datetime': $searchType = 'dateRange';break;\n case 'tinyint' :\n case 'smallint' : $searchType = 'select';break;\n default : $searchType = 'text';break;\n }\n return $searchType;\n }", "public function addTypeFilter($type)\n {\n if ($type instanceof Mage_Eav_Model_Form_Type) {\n $type = $type->getId();\n }\n\n return $this->addFieldToFilter('type_id', $type);\n }", "public static function getFilterType()\n\t{\n\t\treturn self::getCurrentScopeId();\n\t}", "public function getTypeOfField()\n {\n return $this->typeOfField;\n }", "public function getTypeAttribute()\n {\n return $this->fieldType;\n }", "public function getFieldFilter()\n {\n return $this->readOneof(2);\n }", "public function getFieldTypeFactory();", "private function getFilterType($filter) {\n if (is_array($filter)) {\n if (array_key_exists('from', $filter) || array_key_exists('to', $filter)) {\n return 'numericrange';\n } else {\n return 'term';\n }\n }\n return false;\n }", "public function getFilter($type)\n {\n switch ($type) {\n case 'not_contain':\n case 'not contain':\n case 'notcontain':\n case 'notContain':\n return $this->_explode($this->getFiltersNotContain());\n break;\n\n case 'contain':\n default:\n return $this->_explode($this->getFiltersContain());\n break;\n }\n }", "protected function field_type($field_name) {\n\t\t$the_fields = $this->fields();\n\t\treturn $the_fields[$field_name][\"type\"]; // Get field type for selected field\n\t}", "private function _getFieldType()\n {\n $result = getKey($this->_doc, 'db-type', 'int');\n if (isset($this->_doc[\\Core\\Model::TYPE_SERIALIZE])) {\n $result = \\Core\\Model::TYPE_SERIALIZE;\n } else if (isset($this->_doc[\\Core\\Model::TYPE_ARRAY])) {\n $result = \\Core\\Model::TYPE_ARRAY;\n } else if ($result == 'boolean' || $result == 'bool') {\n $result = \\Core\\Model::TYPE_BOOL;\n }\n return $result;\n }", "public function getInput()\n {\n if (!$field = $this->stream->getField($this->getField())) {\n return;\n }\n\n $type = $field->getType();\n\n $type->setLocale(null);\n $type->setValue($this->getValue());\n $type->setPrefix($this->getPrefix() . 'filter_');\n $type->setPlaceholder($this->getPlaceholder());\n\n return $type->getFilter();\n }", "public function get_type();", "public static function get_type() {\n\t\treturn Utils::FIELD_TYPE_SELECT;\n\t}", "public function getDataWithTypeField() {}", "public static function get_filter_type(): string {\n\t\treturn 'multiple-select';\n\t}", "function get_field_types()\n {\n }", "function getFieldType($tableName = null, $field = null)\n {\n // Make a DDL query\n $query = \"SHOW COLUMNS FROM $tableName LIKE \" . q($field);\n \n $result = mysql_query($query);\n\t \n $data = mysql_fetch_array($result);\n $splitTypeData = explode(\"(\",$data['Type']);\n\t $typeName = $splitTypeData[0];\n return $typeName;\n }", "public function filter($filter = array()) {\n\t\t//$query = $this->_db->query($sql);\n\t\t$query = $this->_db->get_where('product_type', $filter, 1);\n\t\treturn $query->row();\n\t}", "protected function getFilterField()\n {\n $field = $this->getAttributeModel()->getAttributeCode();\n\n return $field;\n }", "public static function get_type();", "protected function generateFilterSearchField($name, $value, $type)\n {\n if ($type == 'integer') {\n $filter = array($name => (int) $value);\n } elseif ($type == 'boolean') {\n $value = ($value === 'true' || $value === '1') ? true : false;\n $filter = array($name => $value);\n } else {\n $value = preg_quote($value);\n $filter = array($name => new \\MongoRegex('/.*'.$value.'.*/i'));\n }\n\n return $filter;\n }", "public function get_filter_types() {\r\n if ( ! empty( $this->cache['filter_types'] ) ) {\r\n return $this->cache['filter_types'];\r\n }\r\n\r\n $filters = apply_filters( 'mylisting/listing-types/register-filters', [\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Wp_Search::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Text::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Range::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Location::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Proximity::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Dropdown::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Date::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Recurring_Date::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Checkboxes::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Related_Listing::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Order::class,\r\n \\MyListing\\Src\\Listing_Types\\Filters\\Heading_Ui::class,\r\n ] );\r\n\r\n foreach ( $filters as $filter_class ) {\r\n if ( ! ( class_exists( $filter_class ) && is_subclass_of( $filter_class, \\MyListing\\Src\\Listing_Types\\Filters\\Base_Filter::class ) ) ) {\r\n mlog()->warn( 'Listing type filter: '.$filter_class.' is invalid, skipping.' );\r\n continue;\r\n }\r\n\r\n $filter = new $filter_class;\r\n $this->cache['filter_types'][ $filter->get_type() ] = $filter;\r\n }\r\n\r\n return $this->cache['filter_types'];\r\n }", "function get_field_type( $name ) {\n\t\t\treturn isset( $this->types[ $name ] ) ? $this->types[ $name ] : null;\n\t\t}", "protected function getFilterFormType() {\n\t\treturn SongFilterType::class;\n\t}", "public function filter($field, $type, $value)\n {\n if (! $field || ! $type || $this->isEmpty()) {\n return new static($this->items);\n }\n\n if (! isset($this->first()[$field])) {\n throw new \\InvalidArgumentException(\"Field {$field} does not exists\" . print_r($this->first(), 1), 500);\n }\n\n $filter = $this->getFilter();\n if (! is_callable([$filter, $type])) {\n throw new \\InvalidArgumentException(\"Filter {$type} does not exists\", 500);\n }\n return new static($filter->$type($field, $value));\n }", "public abstract function getFieldType($name);", "function acf_get_field_types($args = array()) {}", "public function get_field_types() {\n\t\t\treturn apply_filters( 'conductor_query_builder_field_types', array(\n\t\t\t\t'parameters',\n\t\t\t\t'operators',\n\t\t\t\t'values'\n\t\t\t), $this );\n\t\t}", "public function getFilterClass()\r\n {\r\n return 'OrAppointmentFilter';\r\n }", "protected function _getType()\n {\n if (is_null($this->_type)) {\n $this->_type = $this->_request->getParam('type');\n\n // Default type.\n if (empty($this->_type)) {\n $this->_type = 'original';\n }\n }\n\n return $this->_type;\n }", "private function __get_field_type_for_verify ($type) {\n\n $type = preg_replace('/^([^\\s\\(]+).*$/', '\\\\1', $type);\n \n return ($type == 'tinyint' ? 'bool' : $type);\n }", "abstract protected function getFilterClassName();", "private function get_type($type, $field)\r\n {\r\n // More stuff will coming later\r\n\r\n $value = (int) preg_replace(\"/[^0-9]/\", \"\", $type);\r\n $tmp = explode(\"(\", $type);\r\n if ($tmp[0] == \"int\") {\r\n $condition = \"is_int(\\$\" . $field . \")\";\r\n $format = \"\\$\" . $field . \" = (int)\\$\" . $field . \";\";\r\n $size = (int) $value;\r\n } else if ($tmp[0] == \"varchar\") {\r\n $condition = \"is_string(\\$\" . $field . \")\";\r\n $format = \"\\$\" . $field . \" = \\$\" . $field . \";\";\r\n $size = (int) $value;\r\n } else {\r\n $condition = \"isset(\\$\" . $field . \")\";\r\n $format = \"\\$\" . $field . \" = \\$\" . $field . \";\";\r\n $size = (int) $value;\r\n }\r\n\r\n return array(\"condition\" => $condition,\r\n \"format\" => $format,\r\n \"size\" => $size);\r\n }", "protected function getQueryTypesForFieldType($field_type) {\n $query_types = [];\n switch ($field_type) {\n case 'type':\n case 'uid':\n case 'langcode':\n case 'integer':\n case 'entity_reference':\n $query_types['string'] = 'core_node_search_string';\n break;\n\n case 'created':\n case 'changed':\n $query_types['string'] = 'core_node_search_date';\n break;\n\n }\n\n return $query_types;\n }", "public function getFilter(): ?string {\n $val = $this->getBackingStore()->get('filter');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'filter'\");\n }", "protected function getType() {\n return dosomething_helpers_extract_field_data($this->node->field_campaign_type);\n }", "private static function getFieldType($field,$element_list)\n\t{\n\t\tforeach ($element_list as $element)\n\t\t{\n\t\t\tif\t($element['field'] == $field)\n\t\t\t{\n\t\t\t\treturn\t$element['type'];\n\t\t\t}\n\t\t}\n\t}", "public static function getFieldsType() {\r\n\t\tstatic $fieldstype;\r\n\r\n\t\tif ($fieldstype === null) {\r\n\t\t\t$fieldstype = array();\r\n\t\t\t$fields = static::getFields();\r\n\t\t\t$pdo = static::getPdo();\r\n\t\t\tforeach ($fields as $field) {\r\n\t\t\t\t$fieldstype[$field] = $pdo->nameToType($field);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $fieldstype;\r\n\t}", "public function getType()\n {\n return $this->_query['type'];\n }", "protected function getFieldType(): string\n {\n return 'string';\n }", "function getTypeName() {\n\t\t$arr = $this->getAvailableTypes();\n\t\treturn $arr[$this->data_array['field_type']];\n\t}", "function getFieldType($name, $type='') {\n\t$not_validated = 'not validated';\n\t$fieldtype = $not_validated;\n\t\n\tif (!in_array($type, array('', 'none'))) {\n\t\t$fieldtype = $type;\n\t\n\t} else {\n\t\t// search for key terms in field names to determine type\n\t\tif ($name == 'id') $fieldtype = 'number';\n\t\tif ($name == 'userid') $fieldtype = 'number';\n\t\t\n\t\tif (str_contains($name, 'name')) $fieldtype = 'string';\n\t\tif (str_contains($name, 'email')) $fieldtype = 'email';\n\t\tif (str_contains($name, 'date')) $fieldtype = 'date';\n\t\tif (str_contains($name, 'phone')) $fieldtype = 'phone';\n\t\tif (str_contains($name, 'zip')) $fieldtype = 'zipcode';\n\t\tif (str_contains($name, 'ssn')) $fieldtype = 'ssn';\n\t}\n\t// assign type based on field type if all else fails\n\tif (($fieldtype == $not_validated) && ($type != '')) {\n\t\tswitch($type) {\n\t\t\tcase 'number':\n\t\t\tcase 'int':\n\t\t\tcase 'smallint':\n\t\t\tcase 'bigint':\n\t\t\t\t$fieldtype = 'number';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'date':\n\t\t\tcase 'timestamp':\n\t\t\t\t$fieldtype = 'date';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t}\n\t}\n\t\n\treturn $fieldtype;\n}", "public function filterByType($type_code);", "function get_active_filter() {\n\t$types = [ 'posts', 'comments', 'mentions', 'myposts', 'resolved', 'unresolved' ];\n\tforeach ( $types as $type ) {\n\t\tif ( is_filter_active( $type ) ) {\n\t\t\treturn $type;\n\t\t}\n\t}\n\n\treturn null;\n}", "function acf_is_field_type($name = '') {}", "protected function getFieldType($statistic_type)\n {\n\t $fieldType = '';\n\t \n\t switch ($statistic_type)\n\t {\n\t\t case 'numeric':\n\t\t \t$fieldType = 'N';\n\t\t \tbreak;\n\t\t case 'text':\n\t\t \t$fieldType = 'T';\n\t\t \tbreak;\n\t\t case 'boolean':\n\t\t \t$fieldType = 'B';\n\t\t \tbreak;\n\t\t case 'date':\n\t\t \t$fieldType = 'D';\n\t\t \tbreak;\n\t\t case 'time':\n\t\t \t$fieldType = 'Time';\n\t\t \tbreak;\t\n\t\t case 'datetime':\n\t\t \t$fieldType = 'DateTime';\n\t\t \tbreak;\t\t\t \n\t\t default:\n\t\t \t$fieldType = 'T';\n\t\t \tbreak;\n\t\t}\n\t\t\n\t\treturn $fieldType;\n\t}", "public function getFieldTypes()\n {\n $model = Mage::getModel('customer/attribute');\n $collection = $model->getCollection();\n $filters = array(\n \"is_user_defined = 1\",\n \"attribute_code != 'customer_activated' \"\n );\n $collection = Mage::helper('amcustomerattr')->addFilters(\n $collection, 'eav_attribute', $filters\n );\n\n\n $attributeType = array();\n foreach ($collection as $attribute) {\n $attributeType[$attribute['attribute_code']]\n = $attribute['backend_type'];\n }\n return $attributeType;\n }", "public function getFilterTypeConfig() {}", "private function get_filter() {\n\t\treturn $this->definition['filter'];\n\t}", "public function getFilterClass()\n {\n return 'FieldLikeAppointmentFilter';\n }", "public function field_type()\n {\n return $this->belongsTo('Shagyt\\lvcrud\\Models\\FieldType');\n }", "public function getSearchType() {}", "function b_filter( $type , $this ){\n $filter = new \\ReflectionFunction( \"bfilter_$type\");\n return $filter->invoke($this);\n\n}", "public function getType()\n {\n if (is_null($this->type)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_TYPE);\n if (is_null($data)) {\n return null;\n }\n $this->type = (string) $data;\n }\n\n return $this->type;\n }", "public function filter( $type, $variable_name, $filter = FILTER_DEFAULT, $options = null ) {\n\t\treturn filter_input( $type, $variable_name, $filter, $options );\n\t}", "public static function getSearchColumnType($type){\n switch($type){\n case 'datetime' : $searchColumnType = 'datetime';break;\n case 'tinyint' :\n case 'smallint' :\n case 'mediumint' :\n case 'bigint' :\n case 'integer' : $searchColumnType = 'int';break;\n case 'float' : $searchColumnType = 'float';break;\n default : $searchColumnType = 'string';break;\n }\n return $searchColumnType;\n }", "public function getTypeClassAttribute()\n {\n return $this->fieldType->getClass();\n }", "protected function _getFilterField()\n {\n $attribute = $this->getAttributeModel();\n $fieldName = Mage::helper('Antidot')->getAttributeFieldName($attribute);\n \n return $fieldName;\n }", "protected function getFilterType($frontendInput)\n {\n $filtersMap = ['date' => 'dateRange'];\n $result = array_replace_recursive($this->dataTypeMap, $filtersMap);\n return isset($result[$frontendInput]) ? $result[$frontendInput] : $result['default'];\n }", "public function get_field_type(string $p_fieldname): ?string {\n return $this->field_types[$p_fieldname] ?? null;\n }", "public function getTypeOfField($field) {\n\t\tif(!key_exists($field, $this->fields)) {\n\t\t\treturn FieldType::TEXT;\n\t\t}\n\t\treturn $this->fields[$field][1];\n\t}", "function getFieldsTypes()\n {\n return array(\n 'campaignId' => 'integer',\n 'advertiserId' => 'integer',\n 'campaignName' => 'string',\n 'startDate' => 'date',\n 'endDate' => 'date',\n 'impressions' => 'integer',\n 'clicks' => 'integer',\n 'priority' => 'integer',\n 'weight' => 'integer',\n 'targetImpressions' => 'integer',\n 'targetClicks' => 'integer',\n 'targetConversions' => 'integer',\n 'revenue' => 'double',\n 'revenueType' => 'integer',\n 'capping' => 'integer',\n 'sessionCapping' => 'integer',\n 'block' => 'integer',\n 'comments' => 'string',\n );\n }", "public function getFilterFieldList()\n {\n $filterfields = $this->getFilterfields();\n $parameter = 'typesection';\n\n $fieldList = array();\n if (is_array($filterfields)) {\n foreach ($filterfields as $key => $value) {\n $name = $value[$parameter]['filterFieldName'];\n\t\t\t\t$type = $value[$parameter]['filterFieldType'];\n\t\t\t\t$where = $value[$parameter]['filterFieldWhere'];\n\t\t\t\t$options = $value[$parameter]['optionlist'];\n $fieldList[$name]['filterFieldName'] = $name;\n $fieldList[$name]['filterFieldType'] = $type;\n $fieldList[$name]['filterFieldWhere'] = $where;\n\n\t\t\t switch($type) {\n\t\t\t\tdefault:\n\t\t\t\t\t$fieldList[$name]['optionlist'] = '';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t$fieldList[$name]['optionlist'] = $this->getOptionList($value[$parameter]['optionlist']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n };\n }\n // DebugUtility::debug($fieldList,'fieldList in getFilterFieldList');\n return $fieldList;\n }", "function getTipoFiltro() {\n\t\tif ($this->fecha_inicio or $this->fecha_termino) {\n\t\t\treturn 1;\n\t\t}\n\t\telseif ($this->dia or $this->mes or $this->anno) {\n\t\t\treturn 2;\n\t\t}\n\t\telse {\n\t\t\treturn 3;\n\t\t}\n\t}", "public function getFieldTypeFromDbColumnType($field)\n {\n if (! array_key_exists($field, $this->field_types)) {\n return 'text';\n }\n\n if ($field == 'password') {\n return 'password';\n }\n\n if ($field == 'email') {\n return 'email';\n }\n\n switch ($this->field_types[$field]['type']) {\n case 'int':\n case 'smallint':\n case 'mediumint':\n case 'longint':\n return 'number';\n break;\n\n case 'string':\n case 'varchar':\n case 'set':\n return 'text';\n break;\n\n // case 'enum':\n // return 'enum';\n // break;\n\n case 'tinyint':\n return 'active';\n break;\n\n case 'text':\n case 'mediumtext':\n case 'longtext':\n return 'textarea';\n break;\n\n case 'date':\n return 'date';\n break;\n\n case 'datetime':\n case 'timestamp':\n return 'datetime';\n break;\n case 'time':\n return 'time';\n break;\n\n default:\n return 'text';\n break;\n }\n }", "public function getTypeOfField($fieldName)\n {\n\n }", "private function get_field_type($field, $table) {\n\t\tglobal $foebis;\n\t\t\n\t\t$sql = \"SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '\" . $table . \"' AND COLUMN_NAME = '\" . $field . \"'\";\n\t\t$result = $foebis->query($sql);\n\t\tif($result->num_rows > 0){\n\t\t\twhile($row = $result->fetch_assoc()){ \n\t\t\t return $row['DATA_TYPE'];\t\t \n\t\t\t}\n\t\t\tunset($row);\n\t\t}\n\t\tunset($result);\n\t\t\n\t\treturn true;\n\t}", "function getFieldType( $query_id=-1, $fieldOffset=0 ) {\n\t\tif ($query_id!=-1) $this->query_id=$query_id; \n\t\treturn mysql_field_type($this->query_id, $fieldOffset);\n\t}", "function getDDFieldType($fieldObj) {\n\t\t$type = strtolower($fieldObj->Type);\n\t\t\n\t\tif ($type == \"int(11)\") return DB_DEF_ID;\n\t\tif ($type == \"int(8)\") return DB_DEF_INTEGER;\n\t\telse if ($type == \"tinyint(1)\") return DB_DEF_BOOLEAN;\n\t\telse if ($type == \"int(14)\") return DB_DEF_TIMESTAMP;\n\t\telse if (substr($type,5) == \"double\") return DB_DEF_DECIMAL;\n\t\t// Strings\n\t\telse if ($type == \"text\" || $type == \"mediumtext\" || $type == \"longtext\" || strpos($type,\"varchar(\") !== false) {\n\t\t\treturn DB_DEF_STRING;\n\t\t}\n\t}", "function getForeignFieldType()\n{\n $debug_prefix = debug_indent(\"ForeignField-getForeignFieldType() {$this->moduleID}.{$this->name}:\");\n\n $t_mf = GetModuleField($this->foreignTable, $this->foreignField);\n $type = strtolower(get_class($t_mf));\n\n print \"$debug_prefix returns $type (end)\\n\";\n debug_unindent();\n return $type;\n}", "protected function fieldTypes() {\n // @todo Either get this dynamically from field plugins or forget it and just hardcode template_whisperer where this is called.\n return ['template_whisperer'];\n }", "protected function getFilter()\n {\n if(!$this->_filter instanceof Library\\FilterInterface){\n\n if(!$this->_filter instanceof Library\\ObjectIdentifier && strpos($this->_filter,'.') === false){\n $identifier = $this->getIdentifier()->toArray();\n $identifier['path'] = array('filter');\n $identifier['name'] = $this->_filter;\n $this->_filter = $identifier;\n }\n\n $options = $this->_constraint ? $this->_constraint->getOptions()->toArray() : array();\n $this->_filter = $this->getObject($this->_filter, $options);\n }\n\n return $this->_filter;\n }", "public function getType()\n {\n return FacetSet::FACET_FIELD;\n }", "public function fieldType( $field_data, $field, $entry) {\n foreach ($this->field_types as $key => $types) {\n if (array_key_exists($field->field_type, $types))\n return new $types[ $field->field_type ]( $field_data, $field, $entry );\n }\n }" ]
[ "0.7578055", "0.71393293", "0.68563956", "0.6779456", "0.6755904", "0.66924715", "0.6690139", "0.66418844", "0.65277857", "0.65214026", "0.65020406", "0.6451216", "0.6446814", "0.64149314", "0.6414636", "0.64142674", "0.64142674", "0.64142674", "0.64040697", "0.6313496", "0.6302167", "0.62695426", "0.62442327", "0.6232738", "0.62323385", "0.6214054", "0.61785126", "0.6149825", "0.6127601", "0.60870457", "0.6075219", "0.6061908", "0.6046093", "0.6042927", "0.6040013", "0.6031009", "0.6014748", "0.60018635", "0.5980262", "0.59800905", "0.5977165", "0.59598285", "0.5951086", "0.59331936", "0.5927028", "0.59175557", "0.591301", "0.5901567", "0.5899452", "0.58966774", "0.58961916", "0.58925086", "0.58847576", "0.5876529", "0.58357954", "0.58355105", "0.5829793", "0.58248323", "0.5823336", "0.58178353", "0.58141845", "0.57962537", "0.578697", "0.57796764", "0.57742304", "0.57681364", "0.57584757", "0.57553285", "0.5755312", "0.57542604", "0.57462376", "0.57429224", "0.5742648", "0.5741572", "0.57415533", "0.573405", "0.5732267", "0.5721738", "0.57208824", "0.57181245", "0.57176286", "0.5706589", "0.5705177", "0.5700494", "0.56988555", "0.568968", "0.5685201", "0.56763303", "0.56641704", "0.5660142", "0.56573004", "0.5654347", "0.56536806", "0.5652183", "0.5649693", "0.5637556", "0.5634418", "0.5626372", "0.56170285", "0.5615902" ]
0.72016627
1
register_js : enregistre le JS $key
register_js : зарегистрирует JS $key
public function register_js ($key, $src = null) { return $this->register('js', $key, $src); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerClientScript($js, $key = null)\n {\n $view = $this->getView();\n PellAsset::register($view);\n $view->registerJs($js, View::POS_END, $key);\n }", "final protected function addJavascript($key, $source) {\n\t\t$this->js_includes[$key] = $source;\n\t}", "public function registerClientScript()\n {\n $js = '';\n $view = $this->getView();\n $this->hashPluginOptions($view);\n $id = $this->options['id'];\n $js .= '$(\"#' . $id . '\").' . self::PLUGIN_NAME . \"(\" . $this->_hashVar . \");\\n\";\n TagsinputAsset::register($view);\n $view->registerJs($js);\n }", "protected function registerJs()\n {\n $this->registerIVIew();\n $this->registerVue($this->getId());\n }", "public static function addJS()\r\n\t{\r\n\t\tforeach(func_get_args() as $key)\r\n\t\t\tif( $key )\r\n\t\t\t{\r\n\t\t\t\tif( is_array($key) )\r\n\t\t\t\t\t$key = Media::linkWithParameters($key[0], $key[1]);\r\n\t\t\t\tself::$myJS[] = Array($key, self::$defaultJsSupportLanguage);\r\n\t\t\t}\r\n\t}", "public function unregister_js ($key)\n {\n return $this->unregister('js', $key);\n }", "public function registerClientScript()\n {\n $js = '';\n $view = $this->getView();\n $this->initClientOptions();\n if (!empty($this->mask)) {\n $this->clientOptions['mask'] = $this->mask;\n }\n $this->hashPluginOptions($view);\n if (!empty($this->definitions) && is_array($this->definitions)) {\n $js .= ucfirst(self::PLUGIN_NAME) . '.extendDefinitions(' . Json::htmlEncode($this->definitions) . ');';\n }\n if (!empty($this->aliases) && is_array($this->aliases)) {\n $js .= ucfirst(self::PLUGIN_NAME) . '.extendAliases(' . Json::htmlEncode($this->aliases) . ');';\n }\n $id = $this->options['id'];\n $js .= 'jQuery(\"#' . $id . '\").' . self::PLUGIN_NAME . '(' . $this->_hashVar . ');';\n MaskedInputAsset::register($view);\n $view->registerJs($js);\n }", "public static function addTranslatedJS()\r\n\t{\r\n\t\tforeach(func_get_args() as $key)\r\n\t\t\tif( $key )\r\n\t\t\t{\r\n\t\t\t\tif( is_array($key) )\r\n\t\t\t\t\t$key = Media::linkWithParameters($key[0], $key[1]);\r\n\t\t\t\tself::$myJS[] = Array($key, true);\r\n\t\t\t}\r\n\t}", "function onloadRegister($js) {\r\r\n\tglobal $onload_js;\r\r\n\t$onload_js .= $js;\r\r\n}", "function phorum_mod_smileys_javascript_register($data)\n{\n // We only need javascript for Editor Tools support.\n $PHORUM = $GLOBALS['PHORUM'];\n if (empty($PHORUM['mod_smileys']['smileys_tool_enabled']) &&\n empty($PHORUM['mod_smileys']['subjectsmileys_tool_enabled']))\n return $data;\n\n // The generated javascript depends on the settings, so we use\n // a specific cache_key for this module.\n $cache_key = (isset($GLOBALS['PHORUM']['mod_smileys']['cache_key'])\n ? $GLOBALS['PHORUM']['mod_smileys']['cache_key'] : 0) .\n '-' . @filemtime(\"mods/smileys/smileys_editor_tools.js.php\");\n\n $data[] = array(\n \"module\" => \"smileys\",\n \"source\" => \"file(mods/smileys/smileys_editor_tools.js.php)\",\n \"cache_key\" => $cache_key\n );\n return $data;\n}", "protected function assignJs($key, $value) {\n $this->js_data[$key] = json_encode($value);\n }", "function onloadRegister($js) {\r\n\tglobal $onload_js;\r\n\t$onload_js .= $js;\r\n}", "public function registerClientScript()\n {\n $view = $this->getView();\n PNotifyAsset::register($view);\n\n $flashes = Json::encode(Yii::$app->session->getAllFlashes(true));\n $clientOptions = Json::encode($this->clientOptions);\n $js = <<<JS\n var flashes = {$flashes}, clientOptions = {$clientOptions};\n for (var key in flashes) {\n if (flashes[key]) {\n if (flashes[key] instanceof Array) {\n for (var i = 0; i < flashes[key].length; i++) {\n new PNotify($.extend({}, clientOptions, {\n type: key,\n text: flashes[key][i],\n }));\n }\n } else {\n new PNotify($.extend({}, clientOptions, {\n type: key,\n text: flashes[key],\n }));\n }\n }\n }\nJS;\n $view->registerJs($js);\n }", "private function registerJS($view) {\r\n $js2=\"$('#\".Html::getInputId($this->model, $this->attribute).\"').kotArrayInput('init',{'list' : \".json_encode($this->list).\",'ajaxurl' : '\".$this->ajaxurl.\"'\".($this->beforeaddcallback ? \",'beforeaddcallback' : \".$this->beforeaddcallback->expression :\"\") .\"});\";\r\n $view->registerJS($js2,$view::POS_END,'arrayinput'.$this->attribute);\r\n }", "public function addJs () {\n }", "public function addPhpToJs($key, $value)\n {\n if(is_bool($value)) {\n $value = $value ? \"true\" : \"false\";\n }elseif(is_string($value)) {\n $value = \"\\\"$value\\\"\";\n }elseif(is_array($value)) {\n $value = json_encode($value);\n }elseif(is_object($value) && method_exists($value, \"toArray\")) {\n $value = json_encode($value->toArray());\n }else{\n throw new \\Exception(\"Can not translate a parameter from PHP to JS\\n\".print_r($value,true));\n }\n\n $this->_themeExtras['phpToJs'][$key] = $value;\n }", "public function get_js ($key = null)\n {\n return $this->get('js', $key);\n }", "protected function AddJavascript($action, $type, $key)\r\n {\r\n $methodName = 'Javascript' . ucfirst($action) . ucfirst($type);\r\n if (method_exists($this, $methodName))\r\n {\r\n $this->_javascript[] = call_user_func_array(array($this, $methodName), array($key));\r\n }\r\n\r\n }", "protected function registerClientScript() {\r\n $view = $this->getView();\r\n\t\t\r\n\t\t$url = '//api-maps.yandex.ru/2.1/?lang='.$this->language;\r\n $view->registerJsFile($url);\r\n\t\t\r\n\t\t//register init and callback\r\n\t\t$view->registerJs($this->getInit(), View::POS_END);\r\n\t\t$view->registerJs($this->callback, View::POS_END);\r\n }", "private function registerScript($script)\n { \n Yii::app()->clientScript->registerScript($this->id.'-jsscript', $script, $this->position);\n }", "public function registerScript(){}", "public function registerClientScript()\n {\n $options = $this->getClientOptions();\n $options = empty($options) ? '' : Json::htmlEncode($options);\n $id = $this->imageOptions['id'];\n $view = $this->getView();\n CaptchaWidgetAsset::register($view);\n $view->registerJs(\"jQuery('#$id').coderiusCaptcha($options);\");\n }", "function _addAdditionalJS($_str)\n\t{\n\t\t$this->up_templater->assign('additional_js', $_str);\n\t}", "public function registerClientScript()\n {\n $id = $this->options['id'];\n\n $options = Json::htmlEncode($this->options);\n $js = '';\n\n $view = $this->getView();\n ClockAssets::register($view);\n $js .= \"jQuery('#$id').yiiClock($options);\";\n if ($js !== '') {\n $view->registerJs($js);\n }\n }", "function attach_to_javascript($data)\n{\n global $JAVASCRIPT;\n if ($JAVASCRIPT === null) {\n $JAVASCRIPT = new Tempcode();\n }\n $JAVASCRIPT->attach($data);\n}", "public function registerClientScript()\n\t{\n\t\t$view=$this->view;\n\t\t\\app\\assets\\AjaxUpload::register($view);\n\t\t$this->options = array_merge([\n\t\t\t'id' => $this->id,\n\t\t\t'uploadUrl' => $this->uploadUrl,\n\t\t\t'extensions' => $this->extensions,\n\t\t\t'maxSize' => $this->maxSize,\n\t\t\t'multiple' => $this->multiple,\n\t\t\t'name'=> \\yii\\helpers\\Html::getInputName($this->model, $this->attribute)\n\t\t], $this->options);\n\t\t$options = json_encode($this->options);\n\t\t$view->registerJs(\"setupAjaxUploadWidget({$options});\");\n\t}", "public function registerScripts()\n {\n EditormdAsset::register($this->view);\n $id = $this->options['id'];\n $jsonOptions = Json::encode($this->clientOptions);\n $varName = Inflector::classify('editor' . $id);\n $script = \"var {$varName} = editormd('{$id}', {$jsonOptions});\";\n $this->view->registerJs($script);\n }", "function export_add_js()\n{\n}", "public function registerInitScript()\r\n\t{\r\n\t\t$selector = '#' . CHtml::activeId($this->model, $this->attribute);\r\n\t\t$js = '$(\"' . $selector . '\").tokenInput(\"' . CHtml::normalizeUrl($this->url) . '\", ' . CJavaScript::encode($this->options) . ');';\r\n\t\t\t\r\n\t\tYii::app()->getClientScript()->registerScript(__CLASS__.$selector, $js, CClientScript::POS_READY);\r\n\t}", "public function add_jsfile()\r\n {\r\n $url = $this->plugin_path . '/js/digg.js';\r\n //register script first\r\n wp_register_script('digg_script', $url, array('jquery'), '1.0', TRUE);\r\n //make script into list\r\n wp_enqueue_script('digg_script');\r\n // or you can direct add script into list\r\n //wp_enqueue_script('digg_script', $url, array('jquery'), '1.0', TRUE);\r\n\r\n wp_localize_script( 'digg_script', 'WPDiggComment', array(\r\n\t \t'cmt_digg_vote_up' => get_option('cmt_digg_vote_up'),\r\n\t \t'cmt_digg_vote_down' => get_option('cmt_digg_vote_down'),\r\n\t 'siteurl' => get_option('siteurl')\r\n\t\t));\r\n }", "static function loadTokenJs(){\r\n\t\tif(!self::$_loadTokenJs){\r\n\t\t\t$doc = JFactory::getDocument();\r\n\t\t\t$doc->addScript('components/com_hs_users/asset/js/formtoken.js');\r\n\t\t\t\r\n\t\t\tself::$_loadTokenJs = true;\t\t\t\r\n\t\t}\r\n\t}", "function js_packer_init() {\n\telgg_register_plugin_hook_handler('simplecache:generate', 'js', 'js_packer_pack');\n}", "protected function registerClientScript()\n {\n $view = Yii::$app->getView();\n $js = \"jQuery('{$this->target}').magnificPopup(\" . Json::encode($this->options) . \");\";\n $view->registerJs($js);\n \n }", "function js_startup($js)\r\n\t{\r\n\t\t$this->startup_js .= $js;\r\n\t}", "public function INTincScript_loadJSCode() {}", "public static function Js(){\n $doc = JFactory::getDocument();\n $pageurl = \"http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n $pagetitle = $doc->getTitle();\n $pagedescr = $doc->getMetaData('description');\n $path = parent::$pub_base . parent::$plug_path;\n $tokenurl = parent::$tokenurl;\n $app_alias = parent::$app_alias;\n $message = parent::$message;\n $js = <<<SCRIPT\n(function() {\n if (typeof window.janrain !== 'object') window.janrain = {};\n if (typeof window.janrain.settings !== 'object') window.janrain.settings = {};\n \n janrain.settings.tokenUrl = '$tokenurl?janrain_engage=login';\n \n function isReady() { janrain.ready = true; };\n if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", isReady, false);\n } else {\n window.attachEvent('onload', isReady);\n }\n \n var e = document.createElement('script');\n e.type = 'text/javascript';\n e.id = 'janrainAuthWidget';\n \n if (document.location.protocol === 'https:') {\n e.src = 'https://rpxnow.com/js/lib/$app_alias/engage.js';\n } else {\n e.src = 'http://widget-cdn.rpxnow.com/js/lib/$app_alias/engage.js';\n }\n \n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(e, s);\n})();\n \n(function() {\n if (typeof window.janrain !== 'object') window.janrain = {};\n if (typeof window.janrain.settings !== 'object') window.janrain.settings = {};\n if (typeof window.janrain.settings.share !== 'object') window.janrain.settings.share = {};\n if (typeof window.janrain.settings.packages !== 'object') janrain.settings.packages = ['share'];\n else janrain.settings.packages.push('share');\n \n /* _______________ can edit below this line _______________ */\n \n janrain.settings.share.message = \"$message\";\n janrain.settings.share.title = \"$pagetitle\";\n janrain.settings.share.url = \"$pageurl\";\n janrain.settings.share.description = \"$pagedescr\";\n \n /* _______________ can edit above this line _______________ */\n \n function isReady() { janrain.ready = true; };\n if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", isReady, false);\n } else {\n window.attachEvent('onload', isReady);\n }\n \n var e = document.createElement('script');\n e.type = 'text/javascript';\n e.id = 'janrainWidgets';\n \n if (document.location.protocol === 'https:') {\n e.src = 'https://rpxnow.com/js/lib/$app_alias/widget.js';\n } else {\n e.src = 'http://widget-cdn.rpxnow.com/js/lib/$app_alias/widget.js';\n }\n \n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(e, s);\n})();\nSCRIPT;\n if ($app->isSite())\n\t\t{\n\t\t\t$doc->addScriptDeclaration($js);\n\t\t}\n return true;\n }", "public function _js_vars()\n {\n }", "protected function addJS($pathfile){\n if(!array_key_exists($pathfile, $this->tabJS)){\n $this->tabJS[$pathfile] = 'all';\n $this->init();\n }\n }", "public function registerScript() {\n $id = $this->options['id'];\n\n $clientOptions = $this->getClientOptions();\n $clientOptions = $clientOptions === array() ? '' : Json::encode($clientOptions);\n\n MultiuploadAsset::register($this->getView());\n $this->getView()->registerJs(\"jQuery('#$id').MultiFile({$clientOptions});\");\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n\n\n /*\n * Language fix\n * @author <https://github.com/sim2github>\n */\n if (!isset($this->options['lang']) || empty($this->options['lang'])) {\n $this->options['lang'] = str_replace(\"-\", \"_\", strtolower(Yii::$app->language));\n }\n\n // Insert plugins in options\n if (!empty($this->plugins)) {\n $this->options['plugins'] = $this->plugins;\n\n foreach ($this->options['plugins'] as $plugin) {\n $this->registerPlugin($plugin);\n }\n }\n\n $options = empty($this->options) ? '' : Json::encode($this->options);\n $js = \"jQuery('\" . $this->selector . \"').redactor($options);\";\n $view->registerJs($js);\n }", "public function enqueueUploadScript()\n {\n add_action('wp_enqueue_scripts', function() {\n wp_enqueue_script('wistia_uploads');\n });\n\n // Load the upload key\n $settings = $this->container->getService('settings');\n $uploadKey = $settings->getSetting('upload_key', false);\n $projectKey = $settings->getSetting('project_key', false);\n if ($uploadKey && $projectKey) {\n add_action('wp_print_scripts', function() use ($uploadKey, $projectKey) {\n ?>\n<script type=\"text/javascript\">\nvar $wk = '<?php echo $uploadKey ?>',\n $wp = '<?php echo $projectKey ?>';\n</script>\n <?php\n });\n }\n }", "public function registerJs()\n {\n $clientOptions = (count($this->clientOptions)) ? Json::encode($this->clientOptions) : '';\n $this->getView()->registerJs(\"jQuery('#{$this->options['id']}').selectize({$clientOptions});\");\n }", "function register(&$controller) {\n $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, '_jsinfo');\n }", "public function addExtraScript($key) {\n if ($key) {\n $this->addExtraScripts([$key]);\n }\n }", "public function addJavaScriptToPageHeader() {\n\t\tif ($this->hasConfValueString('jsFile', 's_template_special')) {\n\t\t\t$this->getFrontEnd()->additionalHeaderData[$this->prefixId.'_js']\n\t\t\t\t= '<script type=\"text/javascript\" src=\"'\n\t\t\t\t.$this->getConfValueString(\n\t\t\t\t\t'jsFile',\n\t\t\t\t\t's_template_special',\n\t\t\t\t\tTRUE\n\t\t\t\t).'\"></script>';\n\t\t}\n\t}", "protected function initJavascriptCode() {}", "function player_call_js() {\r\n\tinclude_spip('inc/filtres');\r\n\tlire_fichier(find_in_path(\"javascript/mejs-enclosure.min.js\"),$enclosure);\r\n\tlire_fichier(find_in_path(\"javascript/mejs-init.min.js\"),$init);\r\n\t$mejspath = timestamp(find_in_path(\"lib/mejs/mediaelement-and-player.min.js\"));\r\n\t$mecss = timestamp(find_in_path(\"lib/mejs/mediaelementplayer.min.css\"));\r\n\t$flux = '<script type=\"text/javascript\">/*<![CDATA[*/'\r\n\t\t. \"var mejspath='$mejspath',mejscss='$mecss';\\n$enclosure\\n$init\\n\"\r\n\t\t. \"/*]]>*/</script>\\n\";\r\n\r\n\treturn $flux;\r\n}", "protected function configurar_consumos_globales_js()\r\n\t{\r\n\t}", "function options_general_add_js()\n{\n}", "public function registerDynamicScript($script) {\n $this->dynamicScripts[] = ROOT_DIR . \"lib/js/\" . $script . \".js.php\";\n }", "protected function registerClientScript()\n {\n $js = [];\n $view = $this->getView();\n\n TinyMceAsset::register($view);\n\n $id = $this->options['id'];\n\n $this->clientOptions['selector'] = \"#$id\";\n\n $langAssetBundle = TinyMceLangAsset::register($view);\n\n // @codeCoverageIgnoreStart\n if ($this->language !== null) {\n $langFile = \"langs/{$this->language}.js\";\n $langAssetBundle->js[] = $langFile;\n $this->clientOptions['language_url'] = $langAssetBundle->baseUrl . \"/{$langFile}\";\n }\n // @codeCoverageIgnoreEnd\n\n $langAssetBundle->js[] = YII_DEBUG ? 'plugins/addmedia/plugin.js' : 'plugins/addmedia/plugin.min.js';\n\n $this->clientOptions['setup'] = (isset($this->clientOptions['setup']) && $this->clientOptions['setup'])\n ? $this->clientOptions['setup']\n : new \\yii\\web\\JsExpression(\n \"function(editor)\n {\n editor.on('change',function(e){\n $('#{$id}').parents('form').trigger('FORM_UPDATE')\n\n })\n }\"\n );\n\n $options = Json::encode($this->clientOptions);\n $js[] = \"tinymce.init($options);\";\n if ($this->triggerSaveOnBeforeValidateForm) {\n $js[] = \"$('#{$id}').parents('form').on('beforeValidate', function() { tinymce.triggerSave(); });\";\n }\n $view->registerJs(implode(\"\\n\", $js));\n }", "protected function registerAssets()\n {\n $view = $this->getView();\n $view->registerJsFile('https://apis.google.com/js/platform.js', [\n 'position' => View::POS_HEAD, \n 'async' => true, \n 'defer' => true\n ]);\n $view->registerJs(\"\\nwindow.___gcfg={lang:'{$this->language}'};\\n\", View::POS_HEAD);\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n Wysihtml5Asset::register($view);\n\n $id = $this->options['id'];\n $options = Json::encode($this->clientOptions);\n\n $js[] = \"jQuery('#$id').wysihtml5($options);\";\n $view->registerJs(implode(\"\\n\", $js));\n }", "protected function processRegisterJs()\n {\n $this->jsFile = '@modules/pages/views/default/ajax/ajax.js';\n $assetManager = Yii::$app->assetManager;\n $assetManager->publish($this->jsFile);\n $url = $assetManager->getPublishedUrl($this->jsFile);\n $this->view->registerJsFile($url,\n ['depends' => 'yii\\web\\JqueryAsset',] // depends\n );\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n $options = Json::encode($this->jsOptions);\n Asset::register($view);\n $view->registerJs('jQuery.comments(' . $options . ');');\n }", "public function registerClientScript()\n {\n parent::registerClientScript();\n\n $id = $this->options['id'];\n $view = $this->getView();\n $view->registerJs(<<<JS\njQuery('#$id').on('afterValidateAttribute', function(e, attr, msg) {\n var hasError = msg.length > 0;\n var input = jQuery(attr.input);\n if (hasError) {\n input.removeClass(\"is-valid\").addClass(\"is-invalid\");\n } else {\n input.removeClass(\"is-invalid\").addClass(\"is-valid\");\n }\n console.log(attr, msg); \n});\nJS\n );\n }", "public function registerClientScript()\n {\n $options = $this->getClientOptions();\n $options = empty($options) ? '' : Json::htmlEncode($options);\n $id = $this->imageOptions['id'];\n $view = $this->getView();\n CaptchaAsset::register($view);\n $view->registerJs(\"jQuery('#$id').yiiCaptcha($options);\");\n }", "public function registerClientScript()\n {\n $view = $this->getView();\n Asset::register($view);\n }", "function _addJsVar($name, $value = '')\n{\n global $lc_jsVars;\n $lc_jsVars[$name] = $value;\n}", "public function registerClientScript()\n {\n $view = $this->getView();\n\n if($this->plus) {\n FileUploadPlusAsset::register($view);\n } else {\n FileUploadAsset::register($view);\n }\n\n $options = Json::encode($this->clientOptions);\n $id = $this->options['id'];\n\n $js[] = \";jQuery('#$id').fileupload($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n $view->registerJs(implode(\"\\n\", $js));\n }", "public function locale_js() {\n\t\theader('Expires: ' . gmdate('D, d M Y H:i:s ', time() + 432000) . 'GMT');\n\t\theader('content-type: text/javascript');\n\n\t\t$domain = Locale::get_messages();\n\t\t$domain_json = json_encode($domain);\n\n\t\t$js = <<<TEEHEE\nfunction _t() {\n var domain = {$domain_json};\n var s = arguments[0];\n\n if(domain[s] != undefined) {\n s = domain[s][1][0];\n }\n\n for(var i = 1; i <= arguments.length; i++) {\n r = new RegExp('%' + (i) + '\\\\\\\\\\$s', 'g');\n if(!s.match(r)) {\n r = new RegExp('%s');\n }\n s = s.replace(r, arguments[i]);\n }\n return s;\n}\nTEEHEE;\n\t\techo Plugins::filter('locale_js', $js);\n\t}", "public function addJavascripts() {\n \n }", "function buyablefunnies_load_script() {\n\t$key = get_option('buyablefunnies_key');\n\twp_register_script('buyable-funnies-embed', 'http://d30exyil9uoqwq.cloudfront.net/buyable_funnies_embed.js?key='.$key, array('jquery'), '1.0', true);\n \twp_enqueue_script( 'buyable-funnies-embed' );\n}", "function to_js($key = null, $default = null)\r\n {\r\n if (is_null($key)) {\r\n return app('tojs');\r\n }\r\n\r\n if (is_array($key)) {\r\n return app('tojs')->put($key);\r\n }\r\n\r\n return app('tojs')->get($key, $default);\r\n }", "public function registerClientScript()\n {\n $api = \"{$this->api}?id=\";\n $js = <<< JS\n const urlToogle = '$api';\n $('.switch').change(function(){\n fetch(urlToogle + this.dataset.id)\n .then(res => res.json())\n .then(data => {\n if (!data.transaccion) {\n this.checked = false;\n alert(data.errorDescripcion);\n }\n }).catch(console.warn);\n });\n JS;\n $this->grid->getView()->registerJs($js);\n }", "function add_js($js_name)\n\t{\n\t\tif (is_array($js_name))\n\t\t{\n\t\t\t$this->js_files += $js_name;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->js_files[] = $js_name;\n\t\t}\n\t}", "public function addJs($path){\n\t\t$this->js .= '<script type=\"text/javascript\" src=\"'.$path.'\" ></script>'.PHP_EOL;\n\t}", "function setDato($llave,$valor){\r\n $this->js_object_encode[$llave] = $valor;\r\n}", "public function get_js() {\n\t}", "public function addScript( $script_path , $key = null ){\n\t\tif( $key ){\n\t\t\t$this->scripts[ $key ] = \t$script_path;\n\t\t}else{\n\t\t\t$this->scripts[] = \t$script_path;\n\t\t}\n\t}", "public function insertJs() {\r\n wp_register_script('jquery-tools-min', $this->_pluginUrl . '/js/jquery.tools.min.js', array('jquery'));\r\n wp_register_script('json-ie7', $this->_pluginUrl . '/js/json2.js');\r\n wp_enqueue_script('jquery-tools-min');\r\n wp_enqueue_script('json-ie7');\r\n wp_enqueue_script('thickbox');\r\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function largo_enqueue_js() {}", "public function registerAssets()\n {\n $view = $this->getView();\n ActiveFormAsset::register($view);\n $id = 'jQuery(\"#'.$this->options['id'].' .kv-hint-special\")';\n $js = 'var $el='.$id.';if($el.length){$el.each(function(){$(this).activeFieldHint()});}';\n if (!$this->isBs(3)) {\n $js .= \"kvBs4InitForm();\";\n }\n $view->registerJs($js);\n }", "function insert_javascript()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\t\t\n\t\t//\tCreate Foreign Character Conversion JS\n\t\tinclude(APPPATH.'config/foreign_chars.php');\n\n\t\t/* -------------------------------------\n\t\t/* 'foreign_character_conversion_array' hook.\n\t\t/* - Allows you to use your own foreign character conversion array\n\t\t/* - Added 1.6.0\n\t\t* \t- Note: in 2.0, you can edit the foreign_chars.php config file as well\n\t\t*/ \n\t\t\tif (isset($this->extensions->extensions['foreign_character_conversion_array']))\n\t\t\t{\n\t\t\t\t$foreign_characters = $this->extensions->call('foreign_character_conversion_array');\n\t\t\t}\n\t\t/*\n\t\t/* -------------------------------------*/\n\t\t\n\t\t$this->javascript->set_global('publish.foreignChars', $foreign_characters);\n\t\t$this->javascript->set_global('publish.word_separator', $this->config->item('word_separator') != \"dash\" ? '_' : '-');\n\t\tob_start();\n\n\t\t?>\n\n\t\t<script type=\"text/javascript\">\n\t\t// <![CDATA[\n\n\n\t\t// ]]>\n\t\t</script>\n\n\t\t<?php\n\n\t\t$javascript = ob_get_contents();\n\n\t\tob_end_clean();\n\n\t\treturn $javascript;\n\t}", "protected function injectJavascript() {\n }", "public function htheme_create_before_js(){\r\n\r\n\t\t#VARIABLES\r\n\t\t$htheme_custom_head = $GLOBALS['htheme_global_object']['settings']['general']['codeHead'];\r\n\t\t$htheme_js = '';\r\n\r\n\t\t$htheme_js .= $htheme_custom_head;\r\n\r\n\t\treturn $htheme_js;\r\n\r\n\t}", "public function _js_vars() {\n\t\t$args = array(\n\t\t\t'class' => get_class( $this ),\n\t\t\t'screen' => array(\n\t\t\t\t'id' => $this->screen->id,\n\t\t\t\t'base' => $this->screen->base,\n\t\t\t)\n\t\t);\n\n\t\tprintf( \"<script type='text/javascript'>list_args = %s;</script>\\n\", wp_json_encode( $args ) );\n\t}", "public static function inclureJS() {\r\n foreach (self::$_instance->scripts as $fichierScript) {\r\n ?><script type=\"text/javascript\" src=\"<?php echo $fichierScript ?>\"></script> \r\n <?php\r\n }\r\n }", "function addSimpleJS (&$father, $path)\r\n\t{\r\n\t\t$library = $father->ownerDocument->createElement(\"script\");\r\n\t\t$library->setAttribute (\"src\", $path);\r\n\t\t$father->appendChild($library);\r\n\t}", "public static function registerScripts()\n {\n $uri = static::$pluginUri . \"/js\";\n $path = static::$pluginPath . \"/js\";\n\n $handle = static::$handle;\n\n wp_register_script(\n \"$handle-script\",\n \"$uri/$handle.js\",\n [],\n filemtime(\"$path/$handle.js\"),\n true\n );\n }", "public function include_js($js)\n\t{\n\t\t$this->_js[] = $js;\n\t}", "public function registerClientScript()\n {\n $elementId = $this->options['id'];\n $scriptOptions = json_encode($this->autocompleteOptions);\n $view = $this->getView();\n $view->registerJsFile(self::API_URL . http_build_query([\n 'libraries' => $this->libraries,\n 'sensor' => $this->sensor ? 'true' : 'false',\n 'language' => $this->language\n ]));\n $view->registerJs(<<<JS\n(function(){\n var input = document.getElementById('{$elementId}');\n var options = {$scriptOptions};\n\n var autocomplete = new google.maps.places.Autocomplete(input, options);\n\n var geocoder = new google.maps.Geocoder();\n\n google.maps.event.addListener(autocomplete, 'place_changed', function() {\n var place = autocomplete.getPlace();\n if(place.geometry!=undefined){\n geocoder.geocode({'location': place.geometry.location}, function(results, status) {\n if (status === google.maps.GeocoderStatus.OK) {\n search:for (var i = 0; i < results.length; i++) {\n for (var a = 0; a < results[i].address_components.length; a++) {\n var addressType = results[i].address_components[a].types[0];\n if (addressType==\"postal_code\") {\n var val = results[i].address_components[a][\"long_name\"];\n document.getElementById(\"person-zip_code\").value = val;\n break search;\n }\n }\n }\n }\n });\n }\n });\n})();\nJS\n , \\yii\\web\\View::POS_READY);\n }", "public function customScript($js, $uniquenessID = null): void\n {\n ControllerCSPExtension::addJS($js);\n\n parent::customScript($js, $uniquenessID);\n }", "public function registerClientScript()\n\t{\n\t\t$options = $this->getClientOptions();\n\t\t$options = empty($options) ? '' : Json::encode($options);\n\t\t$id = $this->options['id'];\n\t\t$js = \"jQuery(\\\"#{$id}\\\").select2({$options});\";\n\t\t$view = $this->getView();\n\t\tSelect2Asset::register($view);\n\t\t$view->registerJs($js);\n\t}", "public static function initializeFunctions()\n {\n self::$js['ext'] = '<script language=\"javascript\" src=\"' . SCRIPTS . 'JSForms.js\"></script>';\n }", "public function js()\n {\n\n include TATANKA_DIR.'/'.MOD_DIR.'/facebook/facebook.js.php';\n }", "public function addJs($js)\n\t{\n\t\tif (!array_key_exists($js, $this->js))\n\t\t{\n\t\t\t$this->js[$js] = array('loaded' => false) ;\n\t\t}\n\t}", "public function _js_vars($extra_args = array())\n {\n }", "public function _js_vars($extra_args = array())\n {\n }", "public function registerScripts()\n {\n // Generate script URI\n $path = 'js/api/'. (WP_ENV == 'development' ? 'upload.js' : 'upload.min.js');\n $src = $this->container->getUri($path);\n\n wp_register_script('wistia_uploads', $src, ['jquery'], Base\\PluginCore::VERSION);\n }", "public function registerClientScript()\n\t{\n\t\t/* publish assets dir */\n\t\t$assetsUrl = $this->getAssetsUrl('wheels.widgets.assets.maskmoney');\n\n\t\t/* @var $cs CClientScript */\n\t\t$cs = \\Yii::app()->getClientScript();\n\n\t\t$cs->registerScriptFile($assetsUrl . '/js/jquery.maskmoney.js');\n\n\t\t$this->registerPlugin('maskMoney');\n\t}", "function setmsn($llave,$valor){\r\n\t$this->js_object_encode[$llave] = $valor;\r\n}", "public function registerClientScript()\n {\n $view = $this->getView();\n RecurInputAsset::register($view);\n\n $js = [];\n $id = $this->options['id'];\n $js[] = \"/*begin recurinput*/\";\n $js[] = \";\";\n $selector = \"jQuery('#$id')\";\n\n $options = !empty($this->clientOptions) ? Json::encode($this->clientOptions) : '';\n\n $js[] = \"$selector.recurrenceinput({startField: 'round-start_date', template: {display: '#mytemplate' } });\";\n\n\t\tif (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"$selector.on('$event', $handler);\";\n }\n }\n $js[] = \"/*end recurinput*/\";\n $view->registerJs(implode(\"\\n\", $js));\n }", "function enqueue_javascripts()\n\t{\n\t\twp_enqueue_script( 'wg-email-obfuscator', plugins_url( './', __FILE__ ) . 'javascript.php?prefix='.$this->prefix, array( 'jquery' ) );\n\t}", "public function addJs(string $item): void {\n\t\tarray_push($this->js_list, $item);\n\t}", "public function registerSignupClientScript()\n {\n SignupAsset::register($view = $this->getView());\n $view->registerJs(\"jQuery('#$this->id').signupForm();\");\n }", "public function js_1()\n {\n }", "function admin_foobar_js_enqueue() {\r\n $this->register_and_enqueue_js(FOOBAR_FILE_JS, $this->get_foobar_js_depends());\r\n }" ]
[ "0.70772344", "0.6994599", "0.6922348", "0.67725307", "0.651955", "0.64191794", "0.6393096", "0.63588697", "0.6313164", "0.6312665", "0.631053", "0.62860525", "0.62452245", "0.62070197", "0.61675006", "0.6149144", "0.61401284", "0.6132434", "0.61318547", "0.61226565", "0.6114171", "0.60809743", "0.6040111", "0.6009629", "0.59915787", "0.5968241", "0.5950816", "0.59455633", "0.59367055", "0.5933909", "0.59174126", "0.58858544", "0.58814913", "0.58774465", "0.5854414", "0.58473134", "0.5845382", "0.58392453", "0.5821308", "0.58135617", "0.58013487", "0.57869434", "0.5784719", "0.5773178", "0.57681656", "0.57677525", "0.57628417", "0.57609475", "0.57600045", "0.5759979", "0.57531655", "0.5741804", "0.573363", "0.5724977", "0.57231325", "0.57214487", "0.5717991", "0.56978416", "0.56966513", "0.56798565", "0.56791157", "0.5677534", "0.56694627", "0.56681293", "0.5664228", "0.56600404", "0.56575227", "0.565082", "0.56400883", "0.5638522", "0.56266564", "0.5615076", "0.5612143", "0.561037", "0.5605948", "0.56029063", "0.5589045", "0.558665", "0.55854696", "0.5583677", "0.55820495", "0.5581499", "0.5576803", "0.55693614", "0.5569343", "0.55608237", "0.55579925", "0.5552427", "0.5550114", "0.5545367", "0.5545367", "0.554412", "0.5543912", "0.55417496", "0.553227", "0.5527703", "0.55224955", "0.5520161", "0.5519902", "0.5517464" ]
0.7323276
0
register_head : enregistre le head $key
register_head : регистрирует head $key
public function register_head ($key, $src = null) { return $this->register('heads', $key, $src); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_head($head){\n\t\t\n\t\t$this->data['head'] .= $head;\n\t\t\n\t}", "public function set_head($head)\n\t{\n\t\t\t$this->head = $head;\n\t}", "function addHead($head) {\r\n\t\t$regex = \"#([<]!--%HEAD%--[>])#\";\r\n\t\t$this->template = preg_replace($regex,$head.\"\\n<!--%HEAD%-->\",$this->template);\r\n\t}", "private function addHeadTemplate() {\n\t\t$this->_registry->getObject('template')->addTemplateBit('head', 'head.tpl.html');\n\t}", "public function saveHead($typekey, $cid);", "function add_link_to_head() {\r\n echo \"\\n\\n<!-- Start LH RDF -->\\n\";\r\n foreach ($this->format_mapper as $key => $value){\r\n echo \"<link rel=\\\"meta\\\" type=\\\"\".$value.\"\\\" title=\\\"$key format link\\\" href=\\\"\".$this->get_link($key).\"\\\" />\\n\";\r\n }\r\n echo \"<!-- End LH RDF -->\\n\\n\";\r\n }", "public function getHead($typekey);", "public function setHead(Record\\Head $head)\n {\n $this->head = $head;\n }", "function register(Doku_Event_Handler $controller) {\n $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, '_addHeaders');\n }", "private function setHeadTag()\r\n {\r\n $front = FrontController::getInstance();\r\n $parametros = $front->getPlugin('PluginParametros');\r\n $nombreSitio = $parametros->obtener('NOMBRE_SITIO');\r\n $tituloVista = $nombreSitio.' | '.$parametros->obtener('METATAG_TITLE');\r\n $descriptionVista = $parametros->obtener('METATAG_DESCRIPTION');\r\n $keywordsVista = $parametros->obtener('METATAG_KEYWORDS');\r\n\r\n $this->getTemplate()->set_var(\"pathUrlBase\", $this->getRequest()->getBaseTagUrl());\r\n $this->getTemplate()->set_var(\"sTituloVista\", $tituloVista);\r\n $this->getTemplate()->set_var(\"sMetaDescription\", $descriptionVista);\r\n $this->getTemplate()->set_var(\"sMetaKeywords\", $keywordsVista);\r\n\r\n //js de home\r\n $this->getTemplate()->load_file_section(\"gui/vistas/comunidad/instituciones.gui.html\", \"jsContent\", \"JsContent\");\r\n\r\n return $this;\r\n }", "public function register_foot ($key, $src = null)\n {\n return $this->register('foots', $key, $src);\n }", "private function assignHead(){\n\t\t$this->smarty->assign(\"head\", $this->data[\"head_data\"]);\n\t}", "private function setHeadTag()\r\n {\r\n $front = FrontController::getInstance();\r\n $parametros = $front->getPlugin('PluginParametros');\r\n $nombreSitio = $parametros->obtener('NOMBRE_SITIO');\r\n $tituloVista = $nombreSitio.' | '.$parametros->obtener('METATAG_TITLE');\r\n $descriptionVista = $parametros->obtener('METATAG_DESCRIPTION');\r\n $keywordsVista = $parametros->obtener('METATAG_KEYWORDS');\r\n\r\n $this->getTemplate()->set_var(\"pathUrlBase\", $this->getRequest()->getBaseTagUrl());\r\n $this->getTemplate()->set_var(\"sTituloVista\", $tituloVista);\r\n $this->getTemplate()->set_var(\"sMetaDescription\", $descriptionVista);\r\n $this->getTemplate()->set_var(\"sMetaKeywords\", $keywordsVista);\r\n\r\n //js de home\r\n $this->getTemplate()->load_file_section(\"gui/vistas/index/instituciones.gui.html\", \"jsContent\", \"JsContent\");\r\n\r\n return $this;\r\n }", "public function registerViewHead(){\n\t\t $head = ob_get_clean();\n\t\t ob_start();\n\t\t \n\t\t return $head;\n\t\t}", "protected function head() { }", "function drupal_set_html_head($data = NULL) {\n static $stored_head = '';\n\n if (!is_null($data)) {\n $stored_head .= $data .\"\\n\";\n }\n return $stored_head;\n}", "private function setHeadTag()\r\n {\r\n $front = FrontController::getInstance();\r\n $parametros = $front->getPlugin('PluginParametros');\r\n $nombreSitio = $parametros->obtener('NOMBRE_SITIO');\r\n $tituloVista = $nombreSitio.' | '.$parametros->obtener('METATAG_TITLE');\r\n $descriptionVista = $parametros->obtener('METATAG_DESCRIPTION');\r\n $keywordsVista = $parametros->obtener('METATAG_KEYWORDS');\r\n\r\n $this->getTemplate()->set_var(\"pathUrlBase\", $this->getRequest()->getBaseTagUrl());\r\n $this->getTemplate()->set_var(\"sTituloVista\", $tituloVista);\r\n $this->getTemplate()->set_var(\"sMetaDescription\", $descriptionVista);\r\n $this->getTemplate()->set_var(\"sMetaKeywords\", $keywordsVista);\r\n\r\n //js de home\r\n $this->getTemplate()->load_file_section(\"gui/vistas/comunidad/invitaciones.gui.html\", \"jsContent\", \"JsContent\");\r\n\r\n return $this;\r\n }", "function parse_extrahead() {\n global $manager;\n\n $extrahead = '';\n\n $param = array(\n 'extrahead' => &$extrahead\n );\n $manager->notify('BookmarkletExtraHead', $param);\n\n echo $extrahead;\n }", "public static function addToHead($code)\n {\n static::$head[] = $code;\n }", "function head() {\n}", "public function addToHead($giveHead = '')\n {\n $this->modifyHead .= $this->mod->addToHead($giveHead);\n }", "protected function head()\n {\n }", "function event_BookmarkletExtraHead(&$data)\n\t{\n\t\t$this->_addExtraHead($data['extrahead']);\n\t}", "public function header($head = \"\"){\n\t\t\t$file = BASE_DIR. DS. \"app\". DS. \"res\". DS. \"view_header.php\";\n\t\t\trequire_once($file);\n\t\t\t$this->head = $head;\n\t\t}", "function of_head() { do_action( 'of_head' ); }", "public function refactory_header($login){ \n \n\n $tipoUsuario=\"\";\n \n if(isset($_SESSION['id'])){ // existe sesion ?\n $tipoUsuario = $_SESSION['tipo']; \n } \n\n $this->head = Global_var::refactory_header($login, false, $tipoUsuario); \n \n }", "public function add_to_head() {\n \n $fragments = $this->get_fragments();\n $meta_html = '<!-- Twitter Card data -->';\n \n foreach ( $fragments as $fragment ) {\n $meta_html .= $this->create_meta( $fragment[ 'name' ], $fragment[ 'content' ] );\n }\n\n echo $meta_html;\n \n }", "public function head($_, $assoc)\n {\n $this->dispatch(HTTP_Request::make('head', $_[0], $assoc));\n }", "function attach_to_screen_header($data)\n{\n global $EXTRA_HEAD;\n if ($EXTRA_HEAD === null) {\n $EXTRA_HEAD = new Tempcode();\n }\n $EXTRA_HEAD->attach($data);\n}", "public function _addToHead($string = ''){\n\t\t\t\tarray_push($this->__head, $string);\n\t\t\t}", "function registerHead()\r\n\t{\r\n\t\t$url = WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/auto-content-links.css';\r\n\t\techo \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\".$url.\"\\\" />\\n\";\t\r\n\t}", "public function addHeadTag ($tag)\n {\n $this->pageHeadTags[] = $tag;\n }", "public function add_head_hook() {\n global $pbtheme_data,$post;\n $post_og_option = get_post_meta($post->ID,'pbtheme_ogmeta',true);\n if($post_og_option == 'enabled' || ($post_og_option != 'disabled' && $pbtheme_data['enable_ogmeta'] == 1) ){\n $this->helper = new Shi_Social_Tags_Helper();\n add_action( 'wp_head', array( $this, 'add_to_head' ), 1 );\n }\n }", "public function onFrontendRenderHead($head)\r\n\t{\r\n\t\treturn $head;\r\n\t}", "public function insert_head()\n {\n return '';\n }", "public function add_uhead($uid = 0, $pid = 0, $hkey = '', $hval = '')\n {\n if (!$hkey) return false;\n list ($uheads) = mysql_fetch_row($this->query('SELECT userheaders FROM '.$this->DB['tbl_profiles'].' WHERE uid=1 AND accid='.intval($pid)));\n $uheads = ($uheads) ? unserialize($uheads) : array();\n $uheads[$hkey] = $hval;\n $uheads = serialize($uheads);\n $query = 'UPDATE '.$this->DB['tbl_profiles'].' SET userheaders=\"'.$this->escape($uheads).'\" WHERE uid=1 AND accid='.intval($pid);\n return mysql_query($query);\n }", "public function setHeader($label, $head) {\r\n $this->headers[$label] = $head;\r\n }", "abstract protected function head();", "public function do_head_items()\n {\n }", "public function add_header($key, $value)\n {\n }", "public function refactory_header($opcion){\n \n $tipoUsuario=\"\";\n \n if(isset($_SESSION['id'])){ // existe sesion ?\n $tipoUsuario = $_SESSION['tipo']; \n } \n\n $this->head = Global_var::refactory_header($opcion, false, $tipoUsuario); \n \n }", "public abstract function doHead();", "function faq_therapist_head() {\n $this->output = $this->build_template($this->get_template(\"faq_therapist_head\"));\n }", "function admin_head() {\n\t\t}", "public function setHead(string $head) : self\n {\n $this->initialized['head'] = true;\n $this->head = $head;\n return $this;\n }", "function BasicHead()\n{\n print LoadTemplate(\"basic_head\");\n\n $_SESSION[\"head_printed\"] = true;\n}", "function admin_head()\n {\n }", "function admin_head()\n\t{\n\t\n\t}", "public function initaliseAdminPageHead($context) {\n\t\t$page = $context['parent']->Page;\n\t\t\n\t\tif ($page instanceof ContentPublish and $page->_context['page'] == 'index') {\n\t\t\t\n\t\t\t$sm = new SectionManager(Administration::instance());\n\t\t\t$section_id = $sm->fetchIDFromHandle($page->_context['section_handle']);\n\t\t\t$shortcuts = $this->__getShortcuts($section_id);\n\t\t\t\n\t\t\t$page->addElementToHead(new XMLElement(\n\t\t\t\t'script',\n\t\t\t\t\"Symphony.Context.add('publish_shortcuts', \" . json_encode($shortcuts) . \")\",\n\t\t\t\tarray('type' => 'text/javascript')\n\t\t\t), 902011);\n\t\t\t\n\t\t\t$page->addScriptToHead(URL . '/extensions/publish_shortcuts/assets/publish_shortcuts.publish.js', 90211);\n\t\t}\n\t}", "function addHeadInformation() {\n\t\t\t\t\t$javascriptUrl = $this->frontendJavascriptUrl;\n\t\t\t\t\tprint(\"\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\twikinvestStockQuotes_callbackUrl = '\".$this->getPluginFolderUrl().\"/wikinvest-stock-quotes.php';\n\t\t\t\t\t\twikinvestStockQuotes_blogUrl = '\".$this->getSiteUrl().\"';\n\t\t\t\t\t\twikinvestStockQuotes_wpVersion = '\".$this->getPlatformVersion().\"';\n\t\t\t\t\t</script>\n\t\t\t\t\t<script type='text/javascript' src='{$javascriptUrl}'></script>\n\t\t\t\t\t\");\n\t\t\t\t}", "function vu_insert_head($flux)\r\n{\n\t// Insertion dans l'entete des pages 'vu' d'un appel la feuille de style dediee\r\n\t$flux .= \"<link rel='stylesheet' href='\"._DIR_VU_PRIVE.\"vu_style_prive.css' type='text/css' media='all' />\\n\";\r\n\n\treturn $flux;\r\n}", "function insert_codes_head() \n{\n\techo load_codes(\"head\");\n}", "function ui_head($title) {\n print \"<!DOCTYPE html><html>\\n<head>\\n\";\n print \"<title>Jdrop | $title</title>\\n\";\n print \"<meta http-equiv='content-type' content='text/html; charset=UTF-8' />\\n\";\n print \"<meta name='viewport' content='width=device-width,initial-scale=1.0'>\\n\";\n print \"<meta name='keywords' content='mobile json phone developer software development debug performance' />\\n\";\n ui_style();\n print \"</head>\\n<body>\\n\";\n print \"<header><hgroup><h1>Jdrop</h1><h2>JSON in the cloud</h2></hgroup></header>\\n<nav>\\n<ul>\";\n ui_nav();\n print \"</ul></nav><article>\";\n ui_account();\n print \"<h2>$title</h2>\";\n}", "private function add_head(){\n $result = array();\n $company_id=$this->_request['company_id'];\n $head_name=$this->_request['head_name'];\n $description=$this->_request['description'];\n \n if(empty($company_id) || empty($head_name)|| empty($description))\n {\n $result['status'] = '0';\n $result['message']=\"Invalid data provided!\";\n $this->response($this->json($result), 200);\n }\n\n $sql=mysql_query(\"select * from tbl_heads where HeadCompanyID='\".$company_id.\"' AND HeadName='\".$head_name.\"'\",$this->db)or die(mysql_error());\n if(mysql_num_rows($sql) > 0){\n $result['status'] = '0';\n $result['message']=\"Head name already exist !\";\n $this->response($this->json($result), 200);\n }\n else\n {\n $sql = mysql_query(\"INSERT INTO `tbl_heads`(`HeadCompanyID`, `HeadName`, `HeadDescription`,`HeadStatus`,`HeadCreatedAt`) VALUES ('\".$company_id.\"','\".$head_name.\"','\".$description.\"','1','\".date('Y-m-d H:i:s').\"')\", $this->db);\n \n /* $result['id']= mysql_insert_id();*/\n $result['status'] = '1';\n $result['message']=\"Head Added\";\n $this->response($this->json($result), 200);\n }\n }", "public function register(Doku_Event_Handler $controller) {\n\n $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_tpl_metaheader_output');\n $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'toolbar');\n }", "function asc_head()\n {\n \tdo_action('asc_head');\n }", "function Page_DataRendering(&$header)\n {\n\n // Example:\n //$header = \"your header\";\n\n }", "private function header(array $h, int $key) : void {\n $rules = [];\n $rules['label'] = 'required|max:250';\n $rules['subtype'] = 'required|in:h1,h2,h3,h4';\n $v = $this->vf->make($h, $rules);\n $this->generateErrors($v, $key);\n }", "public function unregister_head ($key)\n {\n return $this->unregister('heads', $key);\n }", "function insert_head_meta() {\n\t\t$domain = $this->params->targeting_tags['Domain'];\n\t\t$pageURL = $this->params->targeting_tags['PageURL'];\n\t\t$adsafe = $this->params->targeting_tags['AdSafe'];\n\t\t$data_tags = ( $this->params->cloudflare ) ? ' data-cfasync=\"false\"' : '';\n\t\techo <<<HTML\n\t\t<script$data_tags type=\"text/javascript\">\n\t\t\tvar _ipw_custom = {\n\t\t\t\twordAds: '1',\n\t\t\t\tdomain: '$domain',\n\t\t\t\tpageURL: '$pageURL',\n\t\t\t\tadSafe: '$adsafe'\n\t\t\t};\n\t\t</script>\nHTML;\n\t}", "static function register_template($key, $html) {\n self::$templates[$key] = $html;\n }", "public static function addHeadStuff()\n\t{\n\t\tif (RL_Document::isFeed() || JFactory::getApplication()->input->getInt('print', 0))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$params = Params::get();\n\n\t\tif ( ! $params->load_bootstrap_framework && $params->load_jquery)\n\t\t{\n\t\t\tJHtml::_('jquery.framework');\n\t\t}\n\n\t\tif ($params->load_bootstrap_framework)\n\t\t{\n\t\t\tJHtml::_('bootstrap.framework');\n\t\t}\n\n\n\t\t$options = [\n\t\t\t'use_hash' => (int) $params->use_hash,\n\t\t\t'reload_iframes' => (int) $params->reload_iframes,\n\t\t\t'init_timeout' => (int) $params->init_timeout,\n\t\t\t'urlscroll' => 0,\n\t\t];\n\n\t\tRL_Document::scriptOptions($options, 'Sliders');\n\n\t\tRL_Document::script('sliders/script.min.js', ($params->media_versioning ? '7.7.9' : ''));\n\n\t\tif ($params->load_stylesheet)\n\t\t{\n\t\t\tRL_Document::style('sliders/style.min.css', ($params->media_versioning ? '7.7.9' : ''));\n\t\t}\n\n\t}", "public function get_header($key)\n {\n }", "function actunite_insert_head($flux){\r\n\r\n\t// à remplacer par une css active dont les paramètres sont définis avec CFG\r\n\t$flux .= '<!-- insertion de la css actunite--><link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path('actunite.css').'\" media=\"all\" />';\r\n\t\r\n\t$jsFile = generer_url_public('actunite.js');\r\n\t$flux .= \"<!-- insertion du js actunite --><script src='$jsFile' type='text/javascript'></script>\r\n\t<!-- fin du js actunite -->\";\r\n\t\r\n\treturn $flux;\r\n}", "public function head() {\n }", "public static function addHeadItem($html)\n {\n self::$headItems[] = $html;\n }", "function layoutgala_insert_head($flux) {\n\t$incHead = '<link rel=\"stylesheet\" href=\"spip.php?page=layoutgala\" type=\"text/css\" media=\"all\" />';\n\treturn preg_replace('#(</head>)?$#i', $incHead . \"\\$1\\n\", $flux, 1);\n}", "function nacc_head ( )\n\t{\n\tglobal $wp_query;\n\t$page_obj_id = $wp_query->get_queried_object_id();\n\tif ( $page_obj_id )\n\t\t{\n\t\t$page_obj = get_page ( $page_obj_id );\n $shortcode_obj = get_shortcode ( $page_obj->post_content );\n \n if ( $shortcode_obj )\n\t\t\t{\n\t\t\techo \"<!-- Added by the NACC plugin. -->\\n\";\n\t\t\techo '<link rel=\"stylesheet\" href=\"'.plugin_dir_url(__FILE__).'nacc2/nacc.css\" type=\"text/css\" />'.\"\\n\";\n\t\t\techo '<script type=\"text/javascript\" src=\"'.plugin_dir_url(__FILE__).'nacc2/nacc.js\"></script>'.\"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function print_head ($title,$h1,$login) {\n echo<<<END\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"it\" lang=\"it\">\n\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>$title - Cannondale</title>\n<link rel=\"StyleSheet\" href=\"CSS/style.css\" type\"text/css\">\n</head>\n<body>\n<div id=\"header\"><h1>$h1</h1>\nEND;\n\tif($login)\n\t{\n\t\tif(isset($_COOKIE['lastvisit']))\n\t\t\techo \"<h3>Ciao $_SESSION[nome], l' ultimo accesso autenticato al sito risale al $_COOKIE[lastvisit]</h3>\";\n\t}\n\techo<<<END\n</div>\nEND;\n}", "public function add($key)\n {\n }", "public function __construct()\n {\n $this->meta = new HeadMeta();\n }", "protected function addTagToHead( $arg )\n { if( is_string( $arg ) )\n {\n $this -> head_content .= $arg;\n }\n else if( is_array( $arg ) )\n {\n foreach( $arg as $str )\n {\n if( is_string( $str ) )\n {\n $this -> head_content .= $str;\n }\n }\n }\n }", "public function addHeading($uuid, $clear=false)\n\t{\n $this->startElement(\"head\"); \n $this->writeElement('uuid', $uuid);\n\t\tif ($clear) $this->writeElement('clear', '1');\n\t\t$this->endELement();\n\t\t$this->startElement(\"body\");\n\t}", "function addCustomHeadTag( $html ) {\n\t\t$this->_head['custom'][] = trim( $html );\n\t}", "public function insertHeadTags($html, $uniquenessID = null): void\n {\n $uniquenessID = $uniquenessID ?: hash(static::SHA256, $html);\n $type = $this->getTagType($html);\n if ($type === 'javascript') {\n $options = $this->getOptions($html);\n static::$headJS[$uniquenessID] = [strip_tags($html) => $options];\n ControllerCSPExtension::addJS(strip_tags($html));\n } elseif ($type === 'css') {\n $options = $this->getOptions($html); // SimpleXML does it's job here, we see the outcome\n static::$headCSS[$uniquenessID] = [strip_tags($html) => $options];\n ControllerCSPExtension::addCSS(strip_tags($html));\n } else {\n $this->customHeadTags[$uniquenessID] = $html;\n }\n }", "function ajan_head() {\n\tdo_action ( 'ajan_head' );\n}", "function addAdminHeadInformation() {\n\t\t\t\t\tglobal $pagenow;\t//which page are we in\n\t\t\t\t\t\n\t\t\t\t\t$loadInPages = array(\n\t\t\t\t\t\t\t\"post.php\",\n\t\t\t\t\t\t\t\"post-new.php\",\n\t\t\t\t\t\t\t\"page.php\",\n\t\t\t\t\t\t\t\"page-new.php\"\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\tif(in_array($pagenow,$loadInPages)) {\n\t\t\t\t\t\tprint \"<script type='text/javascript'>\n\t\t\t\t\t\t\twikinvestStockQuotes_callbackUrl = '\".$this->getPluginFolderUrl().\"/wikinvest-stock-quotes.php';\n\t\t\t\t\t\t\twikinvestStockQuotes_blogUrl = '\".$this->getSiteUrl().\"';\n\t\t\t\t\t\t\twikinvestStockQuotes_wpVersion = '\".$this->getPlatformVersion().\"';\n\t\t\t\t\t\t\twikinvestStockQuotes_buttonUrl = '\". $this->wikinvestServer .\n\t\t\t\t\t\t\t\t\t\t\t\"/plugin/images/wikinvest_btn_wp.gif';\n\t\t\t\t\t\t</script>\";\n\t\t\t\t\t\t\tprint \"<script src='{$this->backendJavascriptUrl}' type='text/javascript'></script>\";\n\t\t\t\t\t}\n\t\t\t\t}", "function add_headrow($str = '') {\n\t\t$tr = $this->html->tr();\n\t\t$tr->css = $this->css_prefix.'tr';\n\t\t$tr->id = 'tr_'. uniqid();\n\t\t\n\t\t$td = $this->html->td();\n\t\t$td->colspan = $this->_num_cols;\n\t\t$td->type = 'td';\n\t\t$td->css = $this->css_prefix.'td head';\n\t\t$td->text = $str;\n\t\t$tr->add($td);\t\n\n\t\t$this->_headrow[] = $tr;\t\n\t}", "private function reg_list_head() {\n\t\t\t\n\t\t$row_foot = '<div class=\"regular_list_head\"><div class=\"rlh_left_corner\"></div><div class=\"rlh_right_corner\"></div><div class=\"header_txt\">Regular Listing</div></div>'.LB;\n\t\t\t\n\treturn $row_foot;\n\t}", "function control_panel__add_to_head()\n\t{\n\t\tif (URL::getCurrent() == '/publish') {\n\t\t\treturn $this->css->link('spotify.css');\n\t\t}\n\t}", "function addAtHead($val) {\n\t\t$new_node = new Node($val);\n\t\t$new_node->next = $this->link->next;\n\t\t$this->link->next = $new_node;\n\t\t$this->length++;\n\t}", "public function head()\n {\n\n }", "function rest_output_link_wp_head()\n{\n}", "public function set_head_tag($tag)\n\t{\n\t\t$this->head_tags .= $tag;\n\t\treturn $this;\n\t}", "public function admin_head( ) {\n do_action('hoverboard/admin_head');\n }", "function head ($headTpl = \"head.tpl\"){\n if(!empty($headTpl)){\n $this->head = file_get_contents($this->tplDir . $headTpl);\n echo $this->head;\n return true;\n }else return false;\n }", "public function headAction()\n\t{\n\t\t$this->view->message = 'headAction has been called';\n\t\t$this->_response->ok();\n\t}", "public function headAction()\n\t{\n\t\t$this->view->message = 'headAction has been called';\n\t\t$this->_response->ok();\n\t}", "function render_register()\n {\n }", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}" ]
[ "0.7214932", "0.65563166", "0.65201354", "0.64128953", "0.6389769", "0.6387589", "0.6249856", "0.62198335", "0.6201366", "0.6166577", "0.616452", "0.61370635", "0.61292857", "0.6103324", "0.6088705", "0.6075963", "0.60347456", "0.60142076", "0.6013849", "0.6008901", "0.5998237", "0.59586036", "0.59552735", "0.5948167", "0.59443575", "0.5909731", "0.58928627", "0.5872496", "0.5861561", "0.584683", "0.5809538", "0.57906926", "0.57649684", "0.57598007", "0.5752998", "0.57402205", "0.57368463", "0.57348514", "0.5713278", "0.5706635", "0.56843454", "0.5674534", "0.5670173", "0.56417996", "0.5639625", "0.5633227", "0.56257474", "0.56252444", "0.56237113", "0.56180656", "0.5617694", "0.5617418", "0.5609471", "0.560126", "0.5584917", "0.5571906", "0.5551794", "0.55483806", "0.5547293", "0.5521559", "0.5516126", "0.54960096", "0.54914504", "0.54858935", "0.54842633", "0.5479784", "0.5462702", "0.54594606", "0.54513806", "0.54511863", "0.54472387", "0.54394376", "0.5437201", "0.54332435", "0.5421039", "0.541891", "0.541409", "0.5408335", "0.540559", "0.5404658", "0.54046077", "0.53876656", "0.53768957", "0.5371805", "0.5369234", "0.53678375", "0.53677166", "0.53677166", "0.53640616", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714", "0.53572714" ]
0.768616
0
register_foot : enregistre le foot $key
register_foot : регистрирует фут $key
public function register_foot ($key, $src = null) { return $this->register('foots', $key, $src); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function p_foot(){}", "public function unregister_foot ($key)\n {\n return $this->unregister('foots', $key);\n }", "protected function footerRegisterFields(){\n\t\t\n\t}", "public static function addToFoot($code)\n {\n static::$foot[] = $code;\n }", "function control_panel__add_to_foot()\n\t{\n\t\tif (URL::getCurrent() == '/publish') {\n\t\t\t$js = $this->js->link('spotify.js');\n\t\t\t$script = $this->js->inline('\n\t\t\t\t$(function(){\n\t\t\t\t\t$(\".spotify-input\").spotifyField();\n\t\t\t\t\t$(\"body\").on(\"addRow\", \".grid\", function() {\n\t\t\t\t\t\t$(\".spotify-input\").spotifyField();\n\t\t\t\t\t});\n\t\t\t\t})();\n\t\t\t');\n\t\t\treturn $js . $script;\n\t\t}\n\t}", "function register_my_menu() {\r\n register_nav_menu('underfoot',__( 'Under Footer' ));\r\n}", "function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)\n\t{\n\t\t// return pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_bottom,$this->marge_left,$this->page_hauteur,$object,0,$hidefreetext);\n\t}", "function setAppFooter($foot) {\n if ( $this->session_get('APP_FOOTER') !== $foot) {\n $this->session_put('APP_FOOTER', $foot);\n }\n }", "public function get_foots ($key = null)\n {\n return $this->get('foots', $key);\n }", "function Page_DataRendered(&$footer)\n {\n\n // Example:\n //$footer = \"your footer\";\n\n }", "public function load_foot_page($data){\r\n\t\t\t$this->load->view('vw-templates/body_footer');\r\n\t\t\t$this->load->view('includings/astreintes/astreintes_script', $data);\r\n\t\t\t$this->load->view('vw-templates/page_foot');\r\n\t\t}", "function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)\n\t{\n\t\tglobal $conf;\n\t\t$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;\n\t\treturn pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);\n\t}", "public function add_postAction(){\n\t\t$info = $this->getPost(array('name', 'footer'));\n\t\tif (!$info['name']) $this->output(-1, '名称不能为空.');\n\t\t\n\t\t//检测重复\n\t\t$area = Dhm_Service_Footer::getBy(array('name'=>$info['name']));\n\t\tif ($area) $this->output(-1, $info['name'].'已存在.');\n\t\t\n\t\t$ret = Dhm_Service_Footer::add($info);\n\t\tif (!$ret) {\n\t\t\t$this->output(-1, '操作失败.');\n\t\t}\n\t\t$this->output(0, '操作成功.');\n\t}", "function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)\n\t{\n\t\treturn pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_bottom,$this->marge_left,$this->page_hauteur,$object,0,$hidefreetext);\n\t}", "function form_foot($focus='')\n\t{\n\t\t$this->pg->outlineTableFoot();\n\t\t?>\n\t\t<p />\n\t\t<input type=\"submit\" value=\"Search &gt;\" class=\"btn\">\n\t\t</form>\n\t\t<?php\n\n\t\tif (strlen($focus))\n\t\t{\n\t\t\t$this->pg->addOnload(\"document.itmsearch.{$focus}.focus()\");\n\t\t}\n\t}", "public function Footer(){\n //posicion a 1.5 cm del final\n $this->SetY(-15);\n //fuente\n $this->SetFont('Arial','I', 8);\n //numero de pagina\n $this->Cell(0,10, 'Pagina '.$this->PageNo().'/{nb}',0,0,'C' );\n }", "function PageFooter() {\n global $c;\n echo <<<FOOTERTABLE\n<div id=\"page_footer\">\nWRMS: $c->code_major.$c->code_minor.$c->code_patch, DB: $c->schema_major.$c->schema_minor.$c->schema_patch\n</div>\nFOOTERTABLE;\n }", "public function footer( ) {\n do_action('hoverboard/footer');\n }", "public function load_foot_page($data){\r\n\t\t\t$this->load->view('vw-templates/body_footer');\r\n\t\t\t$this->load->view('includings/contacts/contacts_script', $data);\r\n\t\t\t$this->load->view('vw-templates/page_foot');\r\n\t\t}", "function Footer(){\n $this->SetY(-15);\n $this->SetFont('Arial','I',10);\n $this->Cell(0,10,utf8_decode('Pagina').' '.$this->PageNo(),0,1,'R'); // Nmero de la pagina \n \n \n \n }", "function footer() {\n }", "function Footer()\r\n {\r\n $this->SetY(-15);\r\n //courier italic 8\r\n $this->SetFont('courier','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n $this->SetX(5);\r\n $this->SetFont('courier','I',6);\r\n\r\n $this->Cell(0,10,'Tanggal Cetak : '.date(\"d/m/Y\"),0,0,'L');\r\n $this->SetY($this->GetY()+3);\r\n $this->Cell(0,10,'Cetak Oleh : '.$this->printby,0,0,'L');\r\n }", "function Footer(){\n\t\t$this->Cell(197,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',15);\n\t\t\n\t\t$this->Cell(100,10,'Hotline # 01785876014',0,0);\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}", "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "function Footer()\n {\n $this->SetY(-15);\n //buat garis horizontal\n $this->Line(10,$this->GetY(),210,$this->GetY());\n //Arial italic 9\n $this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright PT.SAM ' . date('Y'),0,0,'L');\n //nomor halaman\n $this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n }", "function carolina_footer (){\n remove_action('storefront_footer', 'storefront_credit', 20);\n add_action('storefront_after_footer', 'carolina_new_footer', 10);\n}", "public function onFrontedFooter()\r\n\t{}", "function page_footer($no_menu=false, $is_index=false)\n{\n\tglobal $path_to_root, $js_lib, $Validate, $Editors, $Ajax, $sql_queries;\n\t$page_header_args = func_get_args();\n\thook_invoke_all('pre_footer', $page_header_args);\n\n\tinclude_once($path_to_root.\"/themes/\".user_theme().\"/renderer.php\");\n\t$rend = new renderer();\n\t//$rend->menu_footer($no_menu, $is_index);\n\n\t$edits = \"editors = \".$Ajax->php2js($Editors).\";\";\n\t$Ajax->addScript('editors', $edits);\n\n\techo \"<script>\n\t\t_focus = '\" . get_post('_focus') . \"';\n\t\t_validate = \" . $Ajax->php2js($Validate).\";\n\t\tvar $edits\n\t</script>\";\n\n \tadd_user_js_data();\n\techo \"\\n<script type=\\\"text/javascript\\\"><!--\\n\";\n\n\tforeach($js_lib as $text)\n\t \techo $text;\n\techo \"\\n--></script>\\n\";\n\n\tif ($sql_queries) {\n\t\tdiv_start('footer_debug');\n\t\t echo \"<div class='note_msg'>$sql_queries</div>\";\n\t\tdiv_end();\n\t}\n \n}", "function render_register()\n {\n }", "function load_footer()\r\n {\r\n $this->load(\"template-footer\",true);\r\n }", "function Footer() {\n $this->SetY(-1);\n // Arial italic 8\n $this->SetFont('Arial', NULL, 6);\n $this->SetLineWidth(0);\n // Page number\n $this->Cell(16, .8, 'F71 SISTEMAS WEB - módulo contábil', 'T', 0,'L');\n $this->Cell(3, .8, 'Pagina ' . $this->PageNo(), 'T',0, 'R');\n }", "function foot(){\r\n\t\t\techo \" <div id=\\\"frameFoot\\\">\";\r\n\t\t\techo\t \" <p>Website made by ESN Valenciennes</p>\";\r\n\t\t\techo \" </div>\";\r\n\t\t}", "public function pageFooter(){\n\t\ttry{\n\t\t\tglobal $config;\n\t\t\tif(isset($_SESSION['uname']) && !empty($_SESSION['uname'])){\n\t\t\t\tinclude SRV_ROOT.'views/home/footer.tpl.php';\n\t\t\t}\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\techo 'Message: ' .$e->getMessage();\n\t\t}\n\t}", "function footer()\n{\n$this->setY(-15);\n$this->setFont(\"Arial\", 'I', 8);\n$this->cell(0, 10,\n\"This is the page footer -> Page {$this->pageNo()}/{nb}\", 0, 0, 'C');\n}", "function Footer() {\r\n\t\t$this->SetY(-15);\r\n\t\t$this->SetFont('vera', 'I', 8);\r\n\t\t$this->Cell(0,10, self::TITULO. ' - Página '.$this->PageNo().'/{nb}',0,0,'C');\r\n\t}", "function draw_footer()\r\n\t\t{\r\n\t\t?>\r\n </div><!-- container B -->\r\n \t\t<div class=\"footer\">\r\n \t\t\t<ul>\r\n \t\t\t<li><a href=\"<?= $this->get_root() ?>home/teminos_condiciones.php\"><?= $this->idioma_actual[\"terminos\"] ?></a></li>\r\n \t\t\t<? foreach($this->idiomas as $idioma): ?>\r\n\t \t\t\t<li><a href=\"?idioma=<?= $idioma['prefijo']?>\" title=\"<?= $idioma['nombre']?>\"><?= $idioma['nombre']?></a></li>\r\n \t\t\t<? endforeach ?>\r\n \t\t\t</ul>\r\n \t\t</div><!-- footer-->\r\n </div><!-- container -->\r\n </body>\r\n </html>\r\n\t\t<?php\r\n\t\t}", "function Footer()\r\n {\r\n $this->SetXY( - 10, - 5);\r\n $this->line(10, $this->GetY() - 2, $this->GetX(), $this->GetY() - 2);\r\n $this->SetX(0);\r\n $this->SetFont('Arial', 'I', 6);\r\n $this->Cell(200, 1, \"ManagerTEX (NFe 3.10) - www.datatex.com.br\", $borda, 0, 'R');\r\n }", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "public function Footer(){\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().' din '.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer(){\r\n\t\t//$this->Cell(19,0,'','TB',0,'',1);\r\n\t}", "function Footer() {\n }", "function Footer() {\n }", "function Footer() {\n }", "public function setFooter($footer) {\n // sostituisce il contenuto di <footerPH /> (PlaceHolder) in $_whole_page\n // con quello di $footer\n $this->_whole_page = str_replace(\"<footerPH />\", $footer, $this->_whole_page);\n }", "function crmpress_do_footer() {\n\n\t\tdo_action( 'crmpress_credits' );\n\n}", "function footer(){\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Times','',8);\n\t // Page number\n\t //$this->Cell(0,10,$this->PageNo(),0,0,'R');\n\t $this->Cell(0,-30,'For Use of Property Unit',0,0);\n\t}", "function Footer()\n{\n$this->SetY(-15);\n//buat garis horizontal\n$this->Line(10,$this->GetY(),210,$this->GetY());\n//Arial italic 9\n$this->SetFont('Arial','I',9);\n$this->Cell(0,10,'' .\ndate('Y m d'),0,0,'L');\n//nomor halaman\n//$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n}", "function Footer() {\n\t}", "function gestion_footer() {\n try {\n $crud = new grocery_CRUD();\n\n $crud->set_subject('Pie de Página');\n $crud->set_table('piepagina');\n\n\n\t\t\t// $crud->columns('imagen','usuario', 'email', 'password','telefono');\n\t\t\t$crud->callback_column('activo', array($this, '_renderizar_columna_activo'));\n\t\t\t// $crud->callback_column('password', array($this, 'decrypt_password_list_mode_callback'));\n\n\t\t\t$crud->field_type('nombre','readonly');\n\t\t\t$crud->field_type('activo','hidden');\n $crud->unset_add();\n\t\t\t$crud->unset_delete();\n\n\n $output = $crud->render();\n $output->seccion = \"Datos del Pie de Página\";\n\n\n $this->_gestor_output($output);\n } catch (Exception $e) {\n show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());\n }\n }", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}" ]
[ "0.6738134", "0.64230746", "0.6052581", "0.59551305", "0.5781924", "0.5725058", "0.5711631", "0.5655517", "0.5636109", "0.5592892", "0.554753", "0.5534807", "0.5532238", "0.551599", "0.550088", "0.5479979", "0.5445361", "0.5440313", "0.54208314", "0.54146093", "0.5398162", "0.5369059", "0.53664476", "0.53443277", "0.53443277", "0.53443277", "0.5344099", "0.53400654", "0.5307845", "0.5306254", "0.53014976", "0.53001696", "0.52981937", "0.5297042", "0.5282885", "0.5281721", "0.5278113", "0.52775484", "0.5270059", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52674705", "0.52660507", "0.5260827", "0.52562946", "0.52562946", "0.52562946", "0.523404", "0.52243376", "0.52227", "0.5220628", "0.5220067", "0.52180684", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815", "0.52158815" ]
0.73780274
0
unregister_css : supprime la CSS $key du head
unregister_css : удаляет CSS $key из head
public function unregister_css ($key) { return $this->unregister('css', $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_deregister_style($handle)\n{\n}", "function removeStylesheet($pattern)\n{\n $keys = array_keys($this->stylesheets);\n foreach ($keys as $key) {\n if (preg_match($pattern, $key))\n unset ($this->stylesheets [$key]);\n }\n}", "function remove_grunion_style() {\n\t\twp_deregister_style('grunion.css');\n\t}", "function udem_islandscholar_css_alter(&$css) {\n //unset($css[drupal_get_path('theme', 'omega') . '/omega/css/modules/system/system.messages.theme.css']);\n}", "function nzf_css_alter(&$css) {\n\n /**\n * If stylesheets from core or modules cause trouble in your theme add the path to spruit.info \n * before you start overriding classes\n */\n $stylesheets = theme_get_setting('unset_styles');\n foreach($stylesheets as $path) {\n unset($css[$path]);\n }\n}", "function remove_unwanted_css(){\r\n\t\t\twp_deregister_style('dashicons-css');\r\n\t\t\twp_dequeue_style('thickbox-css');\r\n\t\t\twp_dequeue_style('contact-form-7-css');\r\n\t}", "function remove_by_css(){\n echo '<style type=\"text/css\">\n #tagsdiv-post_tag, #category-adder { display: none; }\n </style>';\n}", "protected function unregister ($type, $key)\n {\n if ($type != 'css' && $type != 'js' && $type != 'heads' && $type != 'foots') {\n return false;\n }\n unset(Clementine::$register['cssjs'][$type][$key]);\n }", "function bookstore_css_alter(&$css) {\n// unset ( $css [drupal_get_path ( 'module', 'system' ) . '/system.base.css'] );\n}", "function clear_css(){\n\t\t\n\t\t$this->css_raw = '';\n\t\t$this->css_scripts = '';\n\t\t\n\t}", "public function remove_locale_stylesheet() {\n\t\tremove_action( 'wp_head', 'locale_stylesheet' );\n\t}", "public function unregister_js ($key)\n {\n return $this->unregister('js', $key);\n }", "function drupalstartertheme_css_alter(&$css) {\n unset($css[drupal_get_path('module','system').'/system.theme.css']);\n unset($css[drupal_get_path('module','system').'/system.base.css']);\n unset($css[drupal_get_path('module','system').'/system.menus.css']);\n }", "function dequeue_style_boletin(){\n if ( !is_admin() ){\n wp_deregister_style('validate-engine-css');\n }\n}", "public function removeCss()\n\t{\n\t\t// Initialise variables\n\t\t$doc = JFactory::getDocument();\n\t\t$body = JResponse::getBody();\n\n\t\t// Get Uri to template stylesheet file\n\t\t$templateUri = JUri::base(true) . '/templates/' . $doc->template . '/';\n\t\t$cssUri = $templateUri . $this->params->get('cssfile', 'css/template.css');\n\n\t\t// Replace line with link element and path to stylesheet file\n\t\t$replaced = preg_replace('~(\\s*?<link.* href=\".*?' . preg_quote($cssUri) . '(?:\\?.*)?\".*/>)~', '', $body, -1, $count);\n\n\t\tif ($count)\n\t\t{\n\t\t\tJResponse::setBody($replaced);\n\t\t}\n\n\t\treturn;\n\t}", "function dequeue_my_CSS() {\nwp_dequeue_style('Open-Sans-google-font');\nwp_deregister_style('Open-Sans-google-font');\n}", "public function reset_head_style() {\n if ( 'true' == get_query_var( 'wepos' ) ) {\n $wp_styles = wp_styles();\n $wp_styles->registered = [];\n $wp_styles->reset();\n }\n }", "function bfriend_remove_css() {\n\twp_dequeue_style( 'wp-block-library' );\n}", "function remove_styles() {\n wp_deregister_style('contact-form-7');\n wp_deregister_style('wordfenceAJAXcss');\n wp_deregister_style('style');\n}", "function mycustomfunc_remove_css_section( $wp_customize ) {\n\t$wp_customize->remove_section( 'custom_css' );\n}", "function unregister_scss_function( $name ) {\n\t\t\t$scss = WP_SCSS::instance();\n\t\t\t$scss->unregister( $name );\n\t\t}", "function SKO2013_css_alter(&$css) {\n // Remove defaults.css file.\n unset($css[drupal_get_path('module', 'system') . '/defaults.css']);\n unset($css[drupal_get_path('module', 'system') . '/system.css']);\n// unset($css[drupal_get_path('module', 'system') . '/system.base.css']);\n unset($css[drupal_get_path('module', 'system') . '/system.menus.css']);\n unset($css[drupal_get_path('module', 'system') . '/system.theme.css']);\n unset($css[drupal_get_path('module', 'user') . '/user.css']);\n}", "public function remove_header($key)\n {\n }", "public function remove_header($key)\n {\n }", "public function remove_styles(){\r\n\t\t\r\n\t\twp_dequeue_style('admin-menu');\r\n\t\twp_deregister_style('admin-menu');\r\n\t\twp_register_style(\r\n\t\t\t'admin-menu',\r\n\t\t\t$this->path . 'assets/css/modules/blank.css',\r\n\t\t\tarray(),\r\n\t\t\t$this->version\r\n\t\t);\r\n\t\twp_enqueue_style('admin-menu');\r\n\t\t\r\n\t}", "function remove( $key ) {\n\t$headers = H\\Header::instance();\n\n\t$headers->remove( $key );\n}", "public function remove_styles(){\n\t\t\n\t\twp_dequeue_style('admin-menu');\n\t\twp_deregister_style('admin-menu');\n\t\twp_register_style(\n\t\t\t'admin-menu',\n\t\t\t$this->path . 'assets/css/modules/blank.css',\n\t\t\tarray(),\n\t\t\t$this->version\n\t\t);\n\t\twp_enqueue_style('admin-menu');\n\t\t\n\t}", "public function removeHttpMeta($key)\n\t{\n\t\tunset($this->httpMeta[$key]);\n\t}", "public function unregister_head ($key)\n {\n return $this->unregister('heads', $key);\n }", "public static function removeHeader($key)\n\t{\n\t\theader_remove($key);\n\t}", "function hotel_lux_tribe_events_pro_stylesheet_url() {\r\n\twp_deregister_style('tribe-events-calendar-pro-style');\r\n\twp_deregister_style('tribe-events-full-pro-calendar-style' );\r\n\twp_deregister_style('widget-calendar-pro-style');\r\n}", "function rocket_delete_sccss_cache_file() {\r\n\t_deprecated_function( __FUNCTION__ . '()', '3.6', '\\WP_Rocket\\ThirdParty\\Plugins\\SimpleCustomCss::update_cache_file()' );\r\n\t$sccss = rocket_get_cache_busting_paths( 'sccss.css', 'css' );\r\n\r\n\tarray_map( 'unlink', glob( $sccss['bustingpath'] . 'sccss*.css' ) );\r\n\trocket_clean_domain();\r\n\trocket_sccss_create_cache_file( $sccss['bustingpath'], $sccss['filepath'] );\r\n}", "public static function clearStylesheets() {\n self::$stylesheets = array();\n }", "function armix_deregister_styles() {\n\twp_deregister_style( 'contact-form-7' );\n}", "function _pfx_remove_style_from_header_tags($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function km_remove_header_stuff() {\n\tremove_action( 'wp_head', 'rsd_link' );\t\t\t\t\t\t\t\t// link to the Really Simple Discovery service endpoint\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\t\t\t\t// link to the Windows Live Writer manifest file\n\tremove_action( 'wp_head', 'wp_shortlink_wp_head' );\n\tremove_action( 'wp_head', 'wp_generator' );\t\t\t\t\t\t// XHTML generator\n\tremove_action( 'wp_head', 'rel_canonical' );\n\tremove_action( 'wp_head', 'rel_alternate' );\n\tremove_action( 'wp_head', 'index_rel_link' );\t\t\t\t\t// index link\n}", "function removeCustomPageEnqueues(){\n wp_deregister_style('q_mk_bootstrap');\n}", "function wp_super_css_classes_deactivate() {\n\tglobal $wp_super_edit;\n\t\n\tif ( empty( $wp_super_edit ) || !is_object( $wp_super_edit ) ) return false;\n\t\n\t// Unregister OLD WP Super Edit options for this plugin\n\t$wp_super_edit->unregister_tinymce_plugin( 'supercssclasses');\n\t\n\t// Unregister Tiny MCE Buttons provided by this plugin\n\t$wp_super_edit->unregister_tinymce_button( 'styleselect' );\n\t\n\t// DEPRECATE: Unregister WP Super Edit options for this plugin\n\t$wp_super_edit->unregister_tinymce_plugin( 'wp-super-class');\t\n}", "public static function remove_css($handle = NULL)\n\t{\n\t\tif ($handle === NULL)\n\t\t{\n\t\t\treturn Assets::$css = array();\n\t\t}\n\n\t\tunset(Assets::$css[$handle]);\n\t}", "function wps_deregister_styles() {\n wp_dequeue_style( 'wp-block-library' );\n}", "function clean_head()\n{\n global $sitepress;\n remove_action('wp_head', 'rsd_link');\n remove_action('wp_head', 'wp_generator');\n remove_action('wp_head', 'feed_links', 2);\n remove_action('wp_head', 'index_rel_link');\n remove_action('wp_head', 'wlwmanifest_link');\n remove_action('wp_head', 'feed_links_extra', 3);\n remove_action('wp_head', 'start_post_rel_link', 10, 0);\n remove_action('wp_head', 'parent_post_rel_link', 10, 0);\n remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);\n remove_action('wp_head', 'print_emoji_detection_script', 7);\n remove_action('wp_head', 'rest_output_link_wp_head', 10);\n remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);\n remove_action('wp_print_styles', 'print_emoji_styles');\n remove_action('wp_head', array($sitepress, 'meta_generator_tag'));\n define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true);\n}", "function clean_header()\n{\n\tremove_action('wp_head', 'wp_print_scripts');\n\tremove_action('wp_head', 'wp_print_head_scripts', 9);\n\tremove_action('wp_head', 'wp_enqueue_scripts', 1);\n}", "function goddy_design_remove_scripts() {\n if ( is_page( '' ) ) {\n\n // Remove Styles\n wp_dequeue_style( 'parent-style' );\n wp_dequeue_style( 'child-style' );\n wp_dequeue_style( 'parent-style-css' );\n wp_deregister_style( 'parent-style' );\n wp_deregister_style( 'child-style' );\n wp_deregister_style( 'parent-style-css' );\n }\n}", "public function removeStyle(string $style)\n {\n unset($this->style[$style]);\n }", "function remove_jetpack_styles(){\nwp_deregister_style('AtD_style'); // After the Deadline\nwp_deregister_style('jetpack-carousel'); // Carousel\nwp_deregister_style('grunion.css'); // Grunion contact form\nwp_deregister_style('the-neverending-homepage'); // Infinite Scroll\nwp_deregister_style('infinity-twentyten'); // Infinite Scroll - Twentyten Theme\nwp_deregister_style('infinity-twentyeleven'); // Infinite Scroll - Twentyeleven Theme\nwp_deregister_style('infinity-twentytwelve'); // Infinite Scroll - Twentytwelve Theme\nwp_deregister_style('noticons'); // Notes\nwp_deregister_style('post-by-email'); // Post by Email\nwp_deregister_style('publicize'); // Publicize\nwp_deregister_style('sharedaddy'); // Sharedaddy\nwp_deregister_style('sharing'); // Sharedaddy Sharing\nwp_deregister_style('stats_reports_css'); // Stats\nwp_deregister_style('jetpack-widgets'); // Widgets\n}", "public static function removeStylesheet($href) {\n unset(self::$stylesheets[$href]);\n }", "function bfa_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function nuevoconcepto_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "public function removeStylesheet($filename)\n\t{\n\t\tunset($this->stylesheet[$filename]);\n\t\tunset($this->stylesheetCondition[$filename]);\n\t}", "public static function remove_editor_styles(){\n\t\t// thats why i remove their editor stylesheet here\n\t\tremove_editor_styles();\n\t}", "function clean_header()\n{\n\twp_deregister_script('comment-reply');\n}", "function unregister_header_events() {\n\n}", "function _rhd_remove_gallery_css( $css ) {\n return preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function wpfolio_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function wpfolio_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function om_css_alter(&$css) {\r\n //make a list of module css to remove \r\n $css_to_remove = array(); \r\n $css_to_remove[] = drupal_get_path('theme','om').'/css/om.css';\r\n\t$css_to_remove[] = drupal_get_path('theme','om').'/css/reset.css';\r\n //$css_to_remove[] = drupal_get_path('module','system').'/system.menus.css';\r\n\t//$css_to_remove[] = drupal_get_path('module','system').'/system.theme.css';\r\n // now we can remove the contribs from the array \r\n foreach ($css_to_remove as $index => $css_file) { \r\n unset($css[$css_file]); \r\n }\r\n}", "public function clearStyleSheets()\n {\n $this->_stylesheets = '';\n }", "function wpdocs_dequeue_style() {\n wp_dequeue_style( 'open-sans-css' );\n}", "public function clearDynamicCssFile() {\r\n\t\t$this->objectManager->get('Thucke\\\\ThRating\\\\Service\\\\TCALabelUserFuncService')->clearCachePostProc(NULL, NULL, NULL);\r\n\t}", "function unregister_default_headers($header)\n{\n}", "function btm_remove_gallery_css( $css ) {\n\t\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "public function __unset($key)\n {\n unset($this->layout[$key]);\n }", "function removeHeadLinks() {\n \tremove_action('wp_head', 'rsd_link');\n \tremove_action('wp_head', 'wlwmanifest_link');\n }", "public function unregisterFile($handle)\n {\n if (is_set($this->styles[$handle])) {\n unset($this->styles[$handle]);\n }\n }", "public function unregister_foot ($key)\n {\n return $this->unregister('foots', $key);\n }", "function mantra_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n return preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n }", "function bt_deregister_gbstyles() {\n\twp_dequeue_style('wp-block-library');\n\twp_dequeue_style('wp-block-library-theme');\n}", "function sunset_css_section_callback(){\n echo 'Customize Sunset theme with your own CSS ' ;\n}", "public function ajax_header_remove()\n {\n }", "function dequeue_style_ratings() {\n wp_deregister_style('wp-postratings');\n}", "function msgmobile_html_head_alter(&$head_elements) {\n unset($head_elements['system_meta_generator']);\n}", "function versluis2013_remove_default_headers () {\n\t// remove_theme_support ('custom-header');\n\tunregister_default_headers (array('circle', 'diamond', 'star'));\n}", "function eh_clean_header_hook(){\n\twp_deregister_script( 'comment-reply' );\n }", "function remove_agriflex_header() {\n\tremove_action( 'agriflex_header', 'agriflex_site_title', 30);\n\tremove_action( 'agriflex_after_header', 'agriflex_main_nav', 30 );\n\tremove_action( 'agriflex_header', 'agriflex_college_explore', 1 );\n\tremove_action( 'wp_head', 'typekit_js');\n}", "function dequeueCss() {\n wp_dequeue_style($this->settings->excludeCss);\n }", "function remove_indieweb_styles() {\n\tremove_action( 'wp_enqueue_scripts', array( 'IndieWeb_Plugin', 'enqueue_style' ) );\n\tremove_action( 'wp_enqueue_scripts', array( 'Semantic_Linkbacks_Plugin', 'enqueue_scripts' ) );\n}", "function dip_style_remove($tag) {\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function remove_classic_themes_css(){\n wp_dequeue_style('classic-theme-styles');\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function remove_color(){\n global $_wp_admin_css_colors;\n $_wp_admin_css_colors = 0;\n}", "public static function delCss($cssFilename, $path = RES_CSS)\n {\n static::$css = array_diff(static::$css, [$path . $cssFilename]);\n }", "public function unregisterVariable($key) {\n\t\t\n\t\t\t\\Application::unregisterVariable($key);\n\t\t\t\n\t\t}", "function child_theme_remove_ssi_inline_styles() {\n\n\tglobal $wp_widget_factory;\n\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['Simple_Social_Icons_Widget'], 'css' ) );\n\n}", "function tkno_remove_all_jp_css() {\n wp_deregister_style( 'AtD_style' ); // After the Deadline\n wp_deregister_style( 'jetpack_likes' ); // Likes\n wp_deregister_style( 'jetpack_related-posts' ); //Related Posts\n wp_deregister_style( 'jetpack-carousel' ); // Carousel\n wp_deregister_style( 'the-neverending-homepage' ); // Infinite Scroll\n wp_deregister_style( 'infinity-twentyten' ); // Infinite Scroll - Twentyten Theme\n wp_deregister_style( 'infinity-twentyeleven' ); // Infinite Scroll - Twentyeleven Theme\n wp_deregister_style( 'infinity-twentytwelve' ); // Infinite Scroll - Twentytwelve Theme\n wp_deregister_style( 'noticons' ); // Notes\n wp_deregister_style( 'post-by-email' ); // Post by Email\n wp_deregister_style( 'publicize' ); // Publicize\n wp_deregister_style( 'sharedaddy' ); // Sharedaddy\n wp_deregister_style( 'sharing' ); // Sharedaddy Sharing\n wp_deregister_style( 'stats_reports_css' ); // Stats\n wp_deregister_style( 'jetpack-widgets' ); // Widgets\n wp_deregister_style( 'jetpack-slideshow' ); // Slideshows\n wp_deregister_style( 'presentations' ); // Presentation shortcode\n wp_deregister_style( 'tiled-gallery' ); // Tiled Galleries\n wp_deregister_style( 'widget-conditions' ); // Widget Visibility\n wp_deregister_style( 'jetpack_display_posts_widget' ); // Display Posts Widget\n wp_deregister_style( 'gravatar-profile-widget' ); // Gravatar Widget\n wp_deregister_style( 'widget-grid-and-list' ); // Top Posts widget\n}", "function wpbooklist_stylizer_reset_action_callback(){\n\tglobal $wpdb;\n\tcheck_ajax_referer( 'wpbooklist_stylizer_reset_action_callback', 'security' );\n\tfile_put_contents(STYLIZER_ROOT_CSS_DIR.\"stylizer-bookview-ui.css\",'');\n\techo file_put_contents(STYLIZER_ROOT_CSS_DIR.\"stylizer-frontend-ui.css\", '#wpbooklist-stylizer-frontend-p{display:none;}');\n\twp_die();\n}", "function adfc2010_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function dispose() {\n unset($this->_stylesheet);\n }", "function jeherve_remove_all_jp_css() {\n\t\twp_deregister_style( 'AtD_style' ); // After the Deadline\n\t\twp_deregister_style( 'jetpack_likes' ); // Likes\n\t\twp_deregister_style( 'jetpack_related-posts' ); //Related Posts\n\t\twp_deregister_style( 'jetpack-carousel' ); // Carousel\n\t\twp_deregister_style( 'grunion.css' ); // Grunion contact form\n\t\twp_deregister_style( 'the-neverending-homepage' ); // Infinite Scroll\n\t\twp_deregister_style( 'infinity-twentyten' ); // Infinite Scroll - Twentyten Theme\n\t\twp_deregister_style( 'infinity-twentyeleven' ); // Infinite Scroll - Twentyeleven Theme\n\t\twp_deregister_style( 'infinity-twentytwelve' ); // Infinite Scroll - Twentytwelve Theme\n\t\twp_deregister_style( 'noticons' ); // Notes\n\t\twp_deregister_style( 'post-by-email' ); // Post by Email\n\t\twp_deregister_style( 'publicize' ); // Publicize\n\t\twp_deregister_style( 'sharedaddy' ); // Sharedaddy\n\t\twp_deregister_style( 'sharing' ); // Sharedaddy Sharing\n\t\twp_deregister_style( 'stats_reports_css' ); // Stats\n\t\twp_deregister_style( 'jetpack-widgets' ); // Widgets\n\t\twp_deregister_style( 'jetpack-slideshow' ); // Slideshows\n\t\twp_deregister_style( 'presentations' ); // Presentation shortcode\n\t\twp_deregister_style( 'jetpack-subscriptions' ); // Subscriptions\n\t\twp_deregister_style( 'tiled-gallery' ); // Tiled Galleries\n\t\twp_deregister_style( 'widget-conditions' ); // Widget Visibility\n\t\twp_deregister_style( 'jetpack_display_posts_widget' ); // Display Posts Widget\n\t\twp_deregister_style( 'gravatar-profile-widget' ); // Gravatar Widget\n\t\twp_deregister_style( 'widget-grid-and-list' ); // Top Posts widget\n\t\twp_deregister_style( 'jetpack-widgets' ); // Widgets\n\t}", "function advanced_css_remove_mod( $wp_customize ) {\n\tremove_theme_mod( 'advanced_css_layout_picker_setting' );\n}", "public function removeItem($order){\n unset($this->css[$order]);\n return $this->css;\n }", "function child_remove_parent_function() {\r\r\n\t\r\r\n\t// This stops Divi parent theme adding css in the <head>\r\r\n remove_action('wp_head', 'et_divi_add_customizer_css');\r\r\n\tremove_action('customize_controls_print_styles', 'et_divi_add_customizer_css');\r\r\n}", "public function remove($tag)\n {\n unset($this->styles[$tag]);\n }", "function remove_default_headers () {\n\tunregister_default_headers (array('circle', 'diamond', 'star'));\n}", "protected function strip_head_css() {\n\t\t\t/* capture the output and strip out some of the <style></style> nodes */\n\t\t\tob_start();\n\t\t\twp_head();\n\t\t\t$contents = ob_get_clean();\n\t\t\t/* keywords to search for within the CSS rules */\n\t\t\t$tcb_rules_keywords = array(\n\t\t\t\t'.ttfm',\n\t\t\t\t'data-tve-custom-colour',\n\t\t\t\t'.tve_more_tag',\n\t\t\t\t'.thrive-adminbar-icon',\n\t\t\t\t'#wpadminbar',\n\t\t\t\t'html { margin-top: 32px !important; }',\n\t\t\t\t'img.emoji',\n\t\t\t\t'img.wp-smiley',\n\t\t\t\t/* Social Warfare style - SUPP-6725 */\n\t\t\t\t'sw-icon-font',\n\t\t\t);\n\t\t\t/* keywords to search for within CSS style node - classes and ids for the <style> element */\n\t\t\t$tcb_style_classes = array(\n\t\t\t\t'thrive-default-styles',\n\t\t\t\t'tve_user_custom_style',\n\t\t\t\t'tve_custom_style',\n\t\t\t\t'tcb_skin_lp_typography',\n\t\t\t\t'tve_global_style',\n\t\t\t\t'tve_global_variables',\n\t\t\t\t'optm_lazyload',\n\t\t\t\t/* lightspeed styles */\n\t\t\t\t'tcb-style-',\n\t\t\t);\n\t\t\t/**\n\t\t\t * Filter list of CSS classes / DOM attributes for style nodes that should be kept\n\t\t\t *\n\t\t\t * @param array $tcb_style_classes list of strings\n\t\t\t * @param TCB_Landing_Page $this Landing Page instance\n\t\t\t *\n\t\t\t * @return array filtered list of styles\n\t\t\t */\n\t\t\t$tcb_style_classes = apply_filters( 'tcb_lp_strip_css_whitelist', $tcb_style_classes, $this );\n\n\t\t\t$theme_dependency = get_post_meta( $this->id, 'tve_disable_theme_dependency', true );\n\t\t\tif ( empty( $theme_dependency ) ) {\n\t\t\t\t$tcb_style_classes[] = 'wp-custom-css';\n\t\t\t}\n\n\t\t\tif ( preg_match_all( '#<style(.*?)>(.*?)</style>#ms', $contents, $m ) ) {\n\t\t\t\tforeach ( $m[2] as $index => $css_rules ) {\n\t\t\t\t\t$css_node = $m[1][ $index ];\n\t\t\t\t\t$remove_it = true;\n\t\t\t\t\tforeach ( $tcb_rules_keywords as $tcb_keyword ) {\n\t\t\t\t\t\tif ( strpos( $css_rules, $tcb_keyword ) !== false ) {\n\t\t\t\t\t\t\t$remove_it = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( $remove_it ) {\n\t\t\t\t\t\tforeach ( $tcb_style_classes as $style_class ) {\n\t\t\t\t\t\t\tif ( strpos( $css_node, $style_class ) !== false ) {\n\t\t\t\t\t\t\t\t$remove_it = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( $remove_it ) {\n\t\t\t\t\t\t$contents = str_replace( $m[0][ $index ], '', $contents );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo $contents; //phpcs:ignore\n\n\t\t\t/**\n\t\t\t * Support for Custom Fonts plugin\n\t\t\t */\n\t\t\tif ( class_exists( 'Bsf_Custom_Fonts_Render' ) ) {\n\t\t\t\t/** @var Bsf_Custom_Fonts_Render $bsf_renderer */\n\t\t\t\t$bsf_renderer = Bsf_Custom_Fonts_Render::get_instance();\n\t\t\t\tif ( method_exists( $bsf_renderer, 'add_style' ) ) {\n\t\t\t\t\t$bsf_renderer->add_style();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function remove_wp_block_library_css(){\n wp_dequeue_style('wp-block-library');\n wp_dequeue_style('wp-block-library-theme');\n}", "public function removeCachedHTML($key)\n {\n // TODO: Implement removeCachedHTML() method.\n }", "function remove_custom_image_header()\n{\n}" ]
[ "0.6453953", "0.6417822", "0.6409344", "0.6371502", "0.6351699", "0.6344129", "0.62612045", "0.62137896", "0.61975056", "0.6153245", "0.6128524", "0.61191154", "0.60859984", "0.6064554", "0.6050224", "0.60192585", "0.6018601", "0.6013863", "0.60079753", "0.59740394", "0.5971617", "0.5967041", "0.5964915", "0.5964915", "0.5908283", "0.5848915", "0.5842073", "0.5812305", "0.58102393", "0.58066833", "0.57990515", "0.5756203", "0.56650734", "0.56556034", "0.5654383", "0.56433594", "0.56430113", "0.56409585", "0.56389254", "0.562945", "0.5626856", "0.5615093", "0.56058556", "0.55986166", "0.5588003", "0.5578789", "0.5577631", "0.55731463", "0.5572467", "0.556858", "0.5562386", "0.55495334", "0.5534931", "0.5532023", "0.5532023", "0.553049", "0.55298746", "0.55268854", "0.5522007", "0.55190617", "0.55080205", "0.55065596", "0.5506478", "0.5471754", "0.54703367", "0.54700243", "0.54660255", "0.5448184", "0.5444973", "0.5438298", "0.54359066", "0.5434358", "0.5432458", "0.54305834", "0.54305047", "0.542157", "0.54110765", "0.5402575", "0.54014015", "0.53955466", "0.53955466", "0.53955466", "0.5390795", "0.53897256", "0.5388518", "0.53867525", "0.53829795", "0.53756255", "0.53735024", "0.5369767", "0.5368009", "0.5367722", "0.5364721", "0.5360508", "0.5357667", "0.5354184", "0.5353043", "0.5349183", "0.5325587", "0.53239435" ]
0.775059
0
unregister_js : supprime le JS $key du head
unregister_js : удаляет JS $key из head
public function unregister_js ($key) { return $this->unregister('js', $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear_js(){\n\t\t\n\t\t$this->data['js'] = '';\n\t\t\n\t}", "function removeJs($pattern = '.*')\n{\n $keys = array_keys($this->jsfiles);\n foreach ($keys as $key) {\n if (preg_match(\"/$pattern/i\", $key))\n unset ($this->jsfiles [$key]);\n }\n}", "function nzf_js_alter(&$javascript) {\n unset($javascript['sites/all/themes/nzf/js/myfonts.js']);\n unset($javascript['sites/all/themes/nzf/js/vendor/owl.carousel.min.js']);\n}", "function tw_deregister_stockholm_js(){\n\twp_deregister_script('qode_default');\n\twp_dequeue_script('qode_default');\n}", "public function removeJavascript($filename)\n\t{\n\t\tunset($this->javascript[$filename]);\n\t}", "function wp_deregister_script($handle)\n{\n}", "function deims_variable_remove_js() {\n require_once DRUPAL_ROOT . '/includes/form.inc';\n\n // drupal_html_id() very helpfully ensures that all html IDS are unique\n // on a page. Unfortunately what it doesn't realize is that the IDs\n // we are generating are going to replace IDs that already exist, so\n // this actually works against us.\n if (isset($_POST['ajax_html_ids'])) {\n unset($_POST['ajax_html_ids']);\n }\n\n list($form, $form_state) = ajax_get_form();\n drupal_process_form($form['#form_id'], $form, $form_state);\n\n // Get the information on what we're removing.\n $button = $form_state['triggering_element'];\n // Go two levels up in the form, to the whole widget.\n $element = drupal_array_get_nested_value($form, array_slice($button['#array_parents'], 0, -4));\n // Now send back the proper AJAX command to replace it.\n $return = array(\n '#type' => 'ajax',\n '#commands' => array(\n ajax_command_replace('#' . $element['#id'], drupal_render($element))\n ),\n );\n\n // Because we're doing this ourselves, messages aren't automatic. We have\n // to add them.\n $messages = theme('status_messages');\n if ($messages) {\n $return['#commands'][] = ajax_command_prepend('#' . $element['#id'], $messages);\n }\n\n return $return;\n}", "protected function unregister ($type, $key)\n {\n if ($type != 'css' && $type != 'js' && $type != 'heads' && $type != 'foots') {\n return false;\n }\n unset(Clementine::$register['cssjs'][$type][$key]);\n }", "function pixelgarage_js_alter(&$javascript) {\n $path = drupal_get_path('module', 'views_bootstrap') . '/js/views-bootstrap-carousel.js';\n unset($javascript[$path]);\n}", "function removeScriptTags($pattern = '.*')\n{\n $keys = array_keys($this->scripttags);\n foreach ($keys as $key) {\n if (preg_match(\"/src=\\\"$pattern\\\"/i\", $this->scripttags[$key]))\n unset ($this->scripttags[$key]);\n }\n}", "public function hide_with_js() {\n }", "function tecscan_js_nojs_script() {\n\t?>\n\t<script>\n\t\t//<![CDATA[\n\t\t( function() {\n\t\t\tvar c = document.body.classList;\n\t\t\tc.remove( 'no-js' );\n\t\t\tc.add( 'js' );\n\t\t} )();\n\t\t//]]>\n\t</script>\n\t<?php\n}", "public function unregisterVariable($key) {\n\t\t\n\t\t\t\\Application::unregisterVariable($key);\n\t\t\t\n\t\t}", "public function ajax_header_remove()\n {\n }", "function my_deregister_scripts(){\r\n\t\twp_deregister_script( 'wp-embed' );\r\n\t}", "function origamid_scripts() {\n wp_deregister_script('jquery');\n}", "static function _add_sticky_dismiss_javascript() {\n $params = array();\n fs_require_once_template( 'sticky-admin-notice-js.php', $params );\n }", "function child_theme_js_nojs_script() {\n\t?>\n\t<script>\n //<![CDATA[\n (function(){\n var c = document.body.classList;\n c.remove( 'no-js' );\n c.add( 'js' );\n })();\n //]]>\n\t</script>\n\t<?php\n}", "function my_init_method() {\n\twp_deregister_script( 'jquery' ); // 取消原有的 jquery 定义\n}", "function my_deregister_scripts()\r\n{\r\n wp_deregister_script('wp-embed');\r\n}", "function my_deregister_scripts()\n{\n\twp_deregister_script('wp-embed');\n}", "function my_deregister_scripts() {\n\twp_deregister_script( 'wp-embed' );\n}", "public function closeJs()\n {\n\n $jsCode = trim(ob_get_contents());\n // @ is required to prevent error for empty tags\n // should normaly not happen, but it would not be an error if\n // so ignore warnings\n @ob_end_clean();\n \n // remove <script></script>\n // / TODO implement this less error-prone\n $jsCode = substr($jsCode, 8, - 9);\n \n if ('' !== $jsCode)\n $this->addJsCode($jsCode);\n \n }", "function my_deregister_scripts(){\n wp_deregister_script( 'wp-embed' );\n}", "function my_deregister_scripts()\n{\n wp_deregister_script('wp-embed');\n}", "function stats_js_remove_stnojs_cookie() {\n\t$parsed = parse_url( admin_url() );\n?>\n<script type=\"text/javascript\">\n/* <![CDATA[ */\ndocument.cookie = 'stnojs=0; expires=Wed, 9 Mar 2011 16:55:50 UTC; path=<?php echo esc_js( $parsed['path'] ); ?>';\n/* ]]> */\n</script>\n<?php\n}", "public static function remove_js($handle = NULL)\n\t{\n\t\tif ($handle === NULL)\n\t\t{\n\t\t\treturn Assets::$js = array();\n\t\t}\n\n\t\tif ($handle === TRUE OR $handle === FALSE)\n\t\t{\n\t\t\tforeach (Assets::$js as $handle => $data)\n\t\t\t{\n\t\t\t\tif ($data['footer'] === $handle)\n\t\t\t\t{\n\t\t\t\t\tunset(Assets::$js[$handle]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tunset(Assets::$js[$handle]);\n\t}", "function ScriptRemover($arr) {\n\t\t$code = '/<script[^>]*?>.*?<\\/script>/si';\n \t\t$noscript = '';\n\t\t// $data array is passed using the form field name as the key\n\t\t// have to extract the value to make the function generic\t\t\t \n\t\t$key = array_keys($arr);\n\t\tforeach($key as $key){\t\t\t \n\t\t\t \n\t\t\t if(!is_array($arr[$key])) {\t\t\n\t\t\t\t\t$arr[$key] = preg_replace($code, $noscript, $arr[$key]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t$key1 = array_keys($arr[$key]);\n\t\t\tforeach($key1 as $key1)\n\t\t\t{\n\t\t\tif(!is_array($arr[$key][$key1])) {\t\t\n\t\t\t\t\t$arr[$key][$key1] = preg_replace($code, $noscript, $arr[$key][$key1]);\n\t\t\t\t}\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\treturn $arr;\n\t}", "function disableJavascript(){\r\n\t\t$this->usejavascript = false;\r\n\t}", "function clean_foot()\n{\n wp_deregister_script('wp-embed');\n}", "function eh_clean_header_hook(){\n\twp_deregister_script( 'comment-reply' );\n }", "function <%= prefix %>_remove_script_version($src){\n\t$parts = explode('?', $src);\n\treturn $parts[0];\n}", "public function get_js ($key = null)\n {\n return $this->get('js', $key);\n }", "function clean_header()\n{\n\twp_deregister_script('comment-reply');\n}", "function addJsAndDestroy(){\n $this->addJs();\n $this->destroy();\n }", "private function deregister_default_version_of_jquery()\n\t{\n\t\twp_deregister_script('jquery');\n\t}", "function cwpl_remove_shake() {\n remove_action( 'login_head', 'wp_shake_js', 12 );\n}", "function wp_basalcart_generate_js_header() {\n\t\t//header( 'Content-type: application/javascript' );\n\t\theader( 'Content-type: text/javascript' );\n\t\theader( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );\n\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' );\n\t\theader( 'Cache-Control: post-check=0, pre-check=0', false );\n\t\theader( 'Pragma: no-cache' );\n\t}", "public static function insertScreenCleanJs() {\n\t\tzbx_add_post_js('window.flickerfreeScreen.cleanAll();');\n\t}", "function dequeue_script_embed(){\n wp_deregister_script( 'wp-embed' );\n}", "public function unregister_head ($key)\n {\n return $this->unregister('heads', $key);\n }", "function removeJavascript($string) {\n\t\treturn preg_replace('@<script[^>]*?>.*?</script>@si', '', $string);\n\t}", "function largo_header_js() {}", "private function excludeScripts()\n {\n\n Yii::app()->clientScript->scriptMap['*.js'] = false;\n }", "public function remove_jquery( $custom_script ) {\n\t\t\tif ( ! is_editor_page() ) {\n\t\t\t\treturn $custom_script;\n\t\t\t}\n\n\t\t\t$js_search = '/src=([\"\\'])(.+?)((code.jquery.com\\/jquery-|ajax.googleapis.com\\/ajax\\/libs\\/jquery\\/))(\\d)(.+?)\\1/si';\n\n\t\t\treturn preg_replace( $js_search, 'src=$1$1', $custom_script );\n\t\t}", "private static function prevent_form_scripts_from_loading() {\n\t\tremove_action( 'init', 'FrmFormsController::front_head' );\n\t}", "protected function registerClientScript($js, $key = null)\n {\n $view = $this->getView();\n PellAsset::register($view);\n $view->registerJs($js, View::POS_END, $key);\n }", "function remove_head_scripts() { \n\t remove_action('wp_head', 'wp_print_scripts'); \n\t remove_action('wp_head', 'wp_print_head_scripts', 9); \n\t remove_action('wp_head', 'wp_enqueue_scripts', 1);\n\n\t add_action('wp_footer', 'wp_print_scripts', 5);\n\t add_action('wp_footer', 'wp_enqueue_scripts', 5);\n\t add_action('wp_footer', 'wp_print_head_scripts', 5); \n\t}", "function user_profile_fields_disable_js() {\n?>\n <script>\n jQuery(document).ready( function($) {\n var fields_to_disable = ['.user-twitter-wrap', '.user-facebook-wrap', '.user-linkedin-wrap', '.user-googleplus-wrap', '.user-pinterest-wrap'];\n for(i=0; i<fields_to_disable.length; i++) {\n $(fields_to_disable[i]).remove();\n }\n\n\t\t\t\t\t\t$(\"<br>\").insertAfter( $(\".usersignupdates\") );\n });\n </script>\n\t\t<?php\n\t\t}", "final protected function addJavascript($key, $source) {\n\t\t$this->js_includes[$key] = $source;\n\t}", "function unregister_header_events() {\n\n}", "function sdt_remove_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function remove_cf7_js(){\n if( !is_page('contato'))\n wp_deregister_script('contact-form-7');\n}", "function turtlepower_kill_legacy_js_and_css() {\n\twp_dequeue_script( 'groups_widget_groups_list-js' );\n\twp_dequeue_script( 'bp_core_widget_members-js' );\n}", "public function register_js ($key, $src = null)\n {\n return $this->register('js', $key, $src);\n }", "function genesis_sample_js_nojs_script() {\n\n\tif ( genesis_is_amp() ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<script>\n\t//<![CDATA[\n\t(function(){\n\t\tvar c = document.body.classList;\n\t\tc.remove( 'no-js' );\n\t\tc.add( 'js' );\n\t})();\n\t//]]>\n\t</script>\n\t<?php\n}", "function defenestrate_css_js_hack() {\n\twp_deregister_script('jquery');\n\twp_register_script( 'jquery', '/wp-includes/js/jquery/jquery.js', array(), '1.11.0', true );\n\n\n\t$suffix = SCRIPT_DEBUG ? '' : '.min';\n\twp_deregister_script('comment-reply');\n\twp_register_script( 'comment-reply', \"/wp-includes/js/comment-reply$suffix.js\", array(), null, true );\n}", "function remove($key) \r\n\t{\r\n\t unset($this->vars[$key]);\r\n\t}", "function pg_blog_deregister_scripts(){\n wp_deregister_script( 'wp-embed' );\n}", "function wp_embed_unregister_handler($id, $priority = 10)\n{\n}", "function asu_isearch_js_alter(&$javascript) {\n\n $asu_isearch_js = drupal_get_path('module', 'asu_isearch') . '/js/asu_isearch_omni.js';\n\n if (isset($javascript[$asu_isearch_js])) {\n\n $views_ajax_path = drupal_get_path('module', 'views') . '/js/ajax_view.js';\n\n unset($javascript[$views_ajax_path]);\n }\n}", "function enqueue_javascripts()\n\t{\n\t\twp_enqueue_script( 'wg-email-obfuscator', plugins_url( './', __FILE__ ) . 'javascript.php?prefix='.$this->prefix, array( 'jquery' ) );\n\t}", "function msgmobile_html_head_alter(&$head_elements) {\n unset($head_elements['system_meta_generator']);\n}", "function sg_remove_param_style_script($src, $handle) {\n $src = remove_query_arg( 'ver', $src );\n\n return $src;\n \n}", "protected function unlock($js) {\n if (!count($this->locks)) {\n return $js;\n }\n foreach ($this->locks as $lock => $replacement) {\n $js = str_replace($lock, $replacement, $js);\n }\n return $js;\n }", "function remove_head_scripts() {\n remove_action('wp_head', 'wp_print_scripts');\n remove_action('wp_head', 'wp_print_head_scripts', 9);\n remove_action('wp_head', 'wp_enqueue_scripts', 1);\n\n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_enqueue_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5);\n}", "function happylinux_html_remove_script($str)\n{\n return preg_replace('|<\\s*script.*?>.*?<\\s*/\\s*script\\s*>|is', '', $str);\n}", "public function addJs($js)\n\t{\n\t\tif (!array_key_exists($js, $this->js))\n\t\t{\n\t\t\t$this->js[$js] = array('loaded' => false) ;\n\t\t}\n\t}", "function remove_head_scripts() { \n remove_action('wp_head', 'wp_print_scripts'); \n remove_action('wp_head', 'wp_print_head_scripts', 9); \n remove_action('wp_head', 'wp_enqueue_scripts', 1);\n\n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_enqueue_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5); \n}", "public function addJavaScriptToPageHeader() {\n\t\tif ($this->hasConfValueString('jsFile', 's_template_special')) {\n\t\t\t$this->getFrontEnd()->additionalHeaderData[$this->prefixId.'_js']\n\t\t\t\t= '<script type=\"text/javascript\" src=\"'\n\t\t\t\t.$this->getConfValueString(\n\t\t\t\t\t'jsFile',\n\t\t\t\t\t's_template_special',\n\t\t\t\t\tTRUE\n\t\t\t\t).'\"></script>';\n\t\t}\n\t}", "function remove_wp_ver_css_js($src) {\n if (strpos($src, 'ver=')){\n $src = remove_query_arg('ver', $src);\n }\n return $src;\n}", "public function remove_header($key)\n {\n }", "public function remove_header($key)\n {\n }", "function remove( $key ) {\n\t$headers = H\\Header::instance();\n\n\t$headers->remove( $key );\n}", "function remove_head_scripts()\n{\n remove_action('wp_head', 'wp_print_scripts');\n remove_action('wp_head', 'wp_print_head_scripts', 9);\n remove_action('wp_head', 'wp_enqueue_scripts', 1);\n\n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_enqueue_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5);\n}", "function understrap_remove_scripts() {\n wp_dequeue_style( 'understrap-styles' );\n wp_deregister_style( 'understrap-styles' );\n wp_dequeue_script( 'understrap-scripts' );\n wp_deregister_script( 'understrap-scripts' );\n wp_dequeue_script( 'jquery-slim' );\n wp_deregister_script( 'jquery-slim' );\n}", "function km_footer_enqueue_scripts() {\n remove_action('wp_head', 'wp_print_scripts');\n remove_action('wp_head', 'wp_print_head_scripts', 9);\n remove_action('wp_head', 'wp_enqueue_scripts', 1);\n}", "function remove_inline_js($in)\r\n{\r\n $out = $in;\r\n\r\n if(is_array($out))\r\n {\r\n $out_x = array();\r\n foreach($out as $k=>$v)\r\n {\r\n $out_x[$k] = remove_inline_js($v);\r\n }\r\n $out = $out_x;\r\n }\r\n else\r\n {\r\n $out = preg_replace('/<(.*?)(on[a-z]{1,}[\\s]{0,}=[\\s]{0,})(.*?)>/ims', '<$1 x$2 $3>', $out);\r\n }\r\n\r\n return $out;\r\n}", "public function render_js()\n {\n return NULL;\n }", "public function removeHttpMeta($key)\n\t{\n\t\tunset($this->httpMeta[$key]);\n\t}", "function phorum_mod_disable_bundled_jquery_filter($javascript)\n{\n // with a reference to the already loaded jQuery library.\n $javascript = preg_replace(\n '/^\\s*var\\s+\\$PJ\\s*=.*$/m',\n \"if (Phorum === undefined) Phorum = { };\\n\" . // available in 5.3\n \"var \\$PJ = Phorum.jQuery = jQuery;\\n\",\n $javascript\n );\n\n return $javascript;\n}", "function rocket_get_js_enqueued_in_head() {\n\tglobal $wp_scripts, $rocket_js_enqueued_in_head;\n\n\tforeach ( $wp_scripts->done as $handle ) {\n\t\t$rocket_js_enqueued_in_head[ $handle ] = true;\n\t}\n}", "function rocket_exclude_js_divi( $excluded_js ) {\r\n\t_deprecated_function( __FUNCTION__ . '()', '3.6.3', '\\WP_Rocket\\ThirdParty\\Themes\\Divi::exclude_js' );\r\n\tif ( defined( 'ET_BUILDER_URI' ) ) {\r\n\t\t$excluded_js[] = str_replace( home_url(), '', ET_BUILDER_URI ) . '/scripts/salvattore.min.js';\r\n\t}\r\n\r\n\treturn $excluded_js;\r\n}", "protected function pjaxCleanupJs($type)\n {\n $id = \"_{$type}ModalId\";\n\n return 'jQuery(\"#'.$this->$id.'\").remove();';\n }", "function unregister_scss_function( $name ) {\n\t\t\t$scss = WP_SCSS::instance();\n\t\t\t$scss->unregister( $name );\n\t\t}", "function cache_javascript_headers()\n{\n}", "public function htheme_create_before_js(){\r\n\r\n\t\t#VARIABLES\r\n\t\t$htheme_custom_head = $GLOBALS['htheme_global_object']['settings']['general']['codeHead'];\r\n\t\t$htheme_js = '';\r\n\r\n\t\t$htheme_js .= $htheme_custom_head;\r\n\r\n\t\treturn $htheme_js;\r\n\r\n\t}", "function remove_cssjs_ver( $src ) {\n\tif( strpos( $src, '?ver=' ) )\n\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n }", "function javascript_not_enabled()\n {\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n format_notication(\"WARNING: Javascript not enabled.<BR><BR><a href='\".base_url().\"'>&lsaquo;&lsaquo; GO BACK TO HOME</a>\");\n }", "public static function getJs(){\n $str = \"\";\n ksort(self::$js);\n\n foreach (self::$js as $key => $val){\n $str.= \"<script src=\\\"$val\\\"></script>\\n\";\n unset(self::$js[$key]);\n }\n return $str;\n \n }", "function understrap_remove_scripts() {\n\t wp_dequeue_style( 'understrap-styles' );\n\t wp_deregister_style( 'understrap-styles' );\n\n\t wp_dequeue_script( 'understrap-scripts' );\n\t wp_deregister_script( 'understrap-scripts' );\n\t}", "function decultter_remove_wp_ver_css_js( $src ) {\r\n\tif ( strpos( $src, 'ver=' ) )\r\n\t\t$src = remove_query_arg( 'ver', $src );\r\n\treturn $src;\r\n}", "public function unregister_foot ($key)\n {\n return $this->unregister('foots', $key);\n }", "function evolution_remove_wp_ver_css_js( $src ) {\n\nif ( strpos( $src, 'ver=' ) )\n\n$src = remove_query_arg( 'ver', $src );\n\nreturn $src;\n}", "public function ajaxRemoveFromCart($key = null)\r\n {\r\n if (!(int)$this->config->get('remove_variant', 0)) {\r\n $key = null;\r\n }\r\n $item_id = $this->getItem()->id;\r\n $result = JBCart::getInstance()->remove($item_id, $this->identifier);\r\n\r\n $this->app->jbajax->send(array('removed' => $result));\r\n }", "function remove_cssjs_ver( $src ) {\n\tif( strpos( $src, '?ver=' ) )\n\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function optimizejs()\n\t{\n\t\t$_body = JResponse::getBody();\n\t\t$_body = explode(\"</head>\", $_body, 2);\n\t\t// Replace CSS library\n\t\t$avoid = $this->gzip_js_exclude;\n\t\t$avoid = ($avoid != '') ? (is_array($avoid) ? $avoid : array($avoid)) : array();\n\t\t\n\t\tif(is_array($avoid)) {\n\t\t\t$avoid = array_merge($avoid, $this->getExcludeJSByCondition($_body[0]));\n\t\t}\n\t\t\n\t\t$_body[0] \t= $this->replaceWithLibrary($_body[0], \"js\", $avoid, $this->merge);\n\t\t$_body \t\t= $_body[0].\"</head>\".$_body[1];\n\t\t\n\t\tif($_body) {\n\t\t\tJResponse::setBody($_body);\n\t\t}\n\t\treturn true;\n\t}", "function phorum_mod_disable_bundled_jquery_register($register)\n{\n // will not be loaded by Phorum.\n foreach ($register as $id => $entry)\n {\n if (preg_match(\n '!/jquery-\\d+\\.\\d+\\.\\d+\\.min\\.js\\)$!',\n $entry['source']\n )) {\n unset($register[$id]);\n }\n }\n\n // This takes care of reloading the javascript library when this\n // module script changes or when this module is disabled.\n $register[] = array(\n 'module' => 'disabled_bundled_jquery',\n 'source' => 'function(mod_disable_bundled_query_empty)',\n 'cache_key' => filemtime(__FILE__)\n );\n\n return $register;\n}", "function theme_remove_wp_ver_css_js($src) {\n if (strpos($src, 'ver=' )) $src = remove_query_arg( 'ver', $src );\n return $src;\n }", "function spartan_remove_wp_ver_css_js( $src ) {\n\n\tif ( strpos( $src, 'ver=' ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\n\treturn $src;\n\n}" ]
[ "0.6708173", "0.6662572", "0.66545236", "0.64491206", "0.6391858", "0.62384284", "0.61594015", "0.61516654", "0.61331713", "0.60868204", "0.6065128", "0.6045194", "0.6040527", "0.5954769", "0.5933447", "0.5930955", "0.5908155", "0.5869309", "0.580808", "0.57793784", "0.5758996", "0.5748203", "0.5735903", "0.57306236", "0.5692615", "0.56868863", "0.566979", "0.56614375", "0.5660873", "0.5656442", "0.5656033", "0.5646205", "0.5630031", "0.5618966", "0.56109726", "0.5585305", "0.55816203", "0.55781615", "0.55754036", "0.5561992", "0.5553424", "0.55320525", "0.5524912", "0.5519002", "0.5504588", "0.54896516", "0.54870653", "0.5483291", "0.54808587", "0.54540825", "0.5453407", "0.54385275", "0.5414001", "0.5413238", "0.5410015", "0.5406955", "0.5393064", "0.5383279", "0.538036", "0.5372013", "0.53614056", "0.53498125", "0.5348657", "0.5341124", "0.53370243", "0.5336947", "0.5334165", "0.532663", "0.53195506", "0.53050494", "0.52966344", "0.52876383", "0.52876383", "0.5285551", "0.52815956", "0.52678716", "0.5257308", "0.52492833", "0.5247908", "0.5242348", "0.5233069", "0.52319795", "0.5225103", "0.5215191", "0.5212457", "0.5206205", "0.52056736", "0.5200192", "0.5198346", "0.5197001", "0.51947105", "0.5194437", "0.5194292", "0.5193302", "0.51903874", "0.518462", "0.5175358", "0.51748306", "0.51701725", "0.51690227" ]
0.816653
0
unregister_head : supprime le head $key du head
unregister_head : удаляет head $key из head
public function unregister_head ($key) { return $this->unregister('heads', $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove( $key ) {\n\t$headers = H\\Header::instance();\n\n\t$headers->remove( $key );\n}", "public function remove_header($key)\n {\n }", "public function remove_header($key)\n {\n }", "public function removeHttpMeta($key)\n\t{\n\t\tunset($this->httpMeta[$key]);\n\t}", "public function unregister_foot ($key)\n {\n return $this->unregister('foots', $key);\n }", "public static function removeHeader($key)\n\t{\n\t\theader_remove($key);\n\t}", "public function removeToken($key);", "public function remove($key) {}", "protected function ogForget($key)\n\t{\n\t\tif (!is_null($this->og)) {\n\t\t\tforeach ($this->og as $index => $tag) {\n\t\t\t\tif ($tag[0] == $key) unset($this->og[$index]);\n\t\t\t}\n\t\t}\n\t}", "public function removeMeta($key)\n\t{\n\t\tunset($this->meta[$key]);\n\t}", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "function clear_head(){\n\t\t\n\t\t$this->data['head'] = '';\n\t\t\n\t}", "public function remove( $key );", "function remove($key);", "public function __unset( $key ){\n\t\t\tunset( $this->data['seomatic'][ $key ] );\n\t\t}", "public function __unset($key)\n {\n }", "public function remove( $key )\n\t{\n\t\tunset($this->nodes[$key]);\n\t}", "public function removeMeta($key)\r\n {\r\n unset($this->metadata[$key]);\r\n }", "public function __unset($key)\n {\n }", "public function __unset($key)\n {\n }", "public function __unset( $key ) { if ( isset( $this->data[$key] ) ) unset( $this->data[$key] ); }", "function deleteNode($key) {\n $node = $this->head;\n // check head\n if ($node != NULL){\n if ($node->data == $key) {\n $this->head = $node->next;\n $node = NULL;\n return;\n }\n }\n // check rest of list\n while ($node != NULL) {\n if ($node->data == $key) {\n break;\n }\n $prev = $node;\n $node = $node->next;\n }\n if ($node == NULL) {\n return;\n }\n $prev->next = $node->next;\n if ($prev->next->prev != NULL) {\n $prev->next->prev = $prev;\n }\n $node = NULL;\n }", "public function unsetHeader($header);", "public function remove(string $key): void;", "public function remove(string $key): void;", "public function __unset($key) {\n $this->remove($key);\n }", "public function remove($key)\n\t{\n\t\t\n\t\t$_SESSION[$this -> name][$key] = NULL;\n\t\t$this -> values[$key] = NULL;\n\t\t\n\t}", "function unregister_term_meta($taxonomy, $meta_key)\n{\n}", "abstract public function remove($key);", "public function remove($key)\n {\n unset($this->_registry[$key]);\n }", "public function delete_uhead($uid = 0, $pid = 0, $hkey)\n {\n if (!$hkey) return;\n list ($uheads) = mysql_fetch_row($this->query('SELECT userheaders FROM '.$this->DB['tbl_profiles'].' WHERE uid=1 AND accid='.intval($pid)));\n $uheads = ($uheads) ? unserialize($uheads) : array();\n unset($uheads[$hkey]);\n $uheads = serialize($uheads);\n $query = 'UPDATE '.$this->DB['tbl_profiles'].' SET userheaders=\"'.$this->escape($uheads).'\" WHERE uid=1 AND accid='.intval($pid);\n return mysql_query($query);\n }", "public abstract function remove($key);", "public abstract function remove($key);", "public function remove($key) {\n\n\t\t// Make sure the request exists before we try to remove it.\n\t\tif (array_key_exists($key, $this->requests)) {\n\n\t\t\t$this->requests[$key]->removeMultiHandle($this->handle);\n\t\t\tunset($this->requests[$key]);\n\t\t}\n\t}", "public function __unset($key) \n\t{\n\t\tunset($this->data[$key]);\n\t}", "public function __unset($key)\n {\n unset($this->layout[$key]);\n }", "public function remove(string $key);", "public function unregister_js ($key)\n {\n return $this->unregister('js', $key);\n }", "function __unset($key) {\n\t\t$this->clear($key);\n\t}", "public function removeItem($key);", "public function removeItem($key);", "public function __unset($key)\n\t{\n\t\t$key = lcfirst($key);\n\t\tif (isset($this->___data[$key])) unset($this->___data[$key]);\n\t}", "public function removeHeader($key)\r\n {\r\n unset($this->header_list[$key]);\r\n return $this;\r\n }", "public function __unset($key)\n {\n $this->remove($key);\n }", "abstract public function drop($key);", "abstract public function drop($key);", "public function __unset($key)\n\t{\n\t\tunset($this->data[$key]);\n\t}", "public function unset($key)\n {\n $this->bridge->unset($key);\n }", "public function __unset(string $key): void\n {\n $this->remove($key);\n }", "function node_unset($key,$what=0){\n $key = $this->key_prep($key);\n if(!isset($this->data[$key])) return FALSE;\n switch($what){\n case 0: $pat = '{^' . $key . '([@#].*)?$}'; break;\n case 1: $pat = '{^' . $key . '@.+$}'; break;\n case 2: $pat = '{^' . $key . '(@|#.*)$}'; break;\n case 3: $pat = '{^' . $key . '[@#]}'; break;\n default:\n return FALSE;\n }\n $keys = preg_grep($pat,array_keys($this->data));\n foreach($keys as $ck) unset($this->data[$ck]);\n return TRUE;\n }", "public function __unset($key)\n {\n unset($this->data[$key], $this->view_global->$key);\n }", "function remove($key) {\r\n\t\tif(array_key_exists($key, $this->data))\r\n\t\t{\r\n\t\t\tunset($this->data[$key]);\r\n\t\t}\r\n\t}", "public function __unset($key)\n\t{\n\t\tif (isset($this->_content[$key])) $this->_modified = true;\n\t\tunset($this->_content[$key]);\n\t}", "public function __unset ($key) {\n\t\t$name = $this->__name;\n\t\tif (isset($_SESSION[$name][$key])) unset($_SESSION[$name][$key]);\n\t}", "public function unregisterVariable($key) {\n\t\t\n\t\t\t\\Application::unregisterVariable($key);\n\t\t\t\n\t\t}", "public function __unset($key)\n\t{\n\t\tunset($this->_data[$key]);\n\t}", "function unregister_header_events() {\n\n}", "public function __unset($key)\n {\n if (is_object($this->resource)) {\n unset($this->resource->{$key});\n } else {\n if (is_array($this->resource)) {\n unset($this->resource[$key]);\n }\n }\n }", "public function __unset($key) {\n\n if (isset($this->_content[$key])) {\n $this->_modified = true;\n }\n\n unset($this->_content[$key]);\n }", "public function unsetData(string $key);", "public function removeHeader($header);", "public function __unset($key)\n {\n unset($this->data[$key]);\n }", "public function remove(string $key): void\n {\n unset($this->data[$key]);\n }", "public function remove($key)\n {\n $this->initialize();\n unset($this->data[$key]);\n }", "public function __unset($key){\n \n unset($this->v[$key]);\n \n }", "public function removeName($key)\n {\n unset($this->names[$key]);\n }", "public function __unset($key) {\n unset($_COOKIE[$key]);\n unset($this->storage[$key]);\n }", "public function unset($key)\n {\n unset($this->session[$key]);\n $this->database->delete($this->table, [\n \"token\" => $this->token,\n \"name\" => $key\n ]);\n }", "public function __unset(string $key) {\n\t\t\t$this->verifyDataObject();\n\t\t\tunset($this->jsonData[$key]);\n\t\t}", "protected function unregister ($type, $key)\n {\n if ($type != 'css' && $type != 'js' && $type != 'heads' && $type != 'foots') {\n return false;\n }\n unset(Clementine::$register['cssjs'][$type][$key]);\n }", "public function remove($key){\n $this->segment->remove($key);\n }", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);" ]
[ "0.68135613", "0.6779626", "0.6779626", "0.663263", "0.66182977", "0.63729775", "0.62068784", "0.6160048", "0.61312234", "0.61193424", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.611756", "0.6087596", "0.6084937", "0.6056638", "0.6040591", "0.6009865", "0.60058194", "0.6000384", "0.5975805", "0.5975805", "0.5973954", "0.5955767", "0.59490865", "0.5946519", "0.5946519", "0.5920656", "0.5906225", "0.58929676", "0.58832103", "0.5880857", "0.58646506", "0.5863799", "0.5863799", "0.5861499", "0.5856262", "0.5853501", "0.5851701", "0.5851244", "0.58504015", "0.58502984", "0.58502984", "0.58487487", "0.5846055", "0.5845623", "0.5840159", "0.5840159", "0.58154374", "0.58086544", "0.5801794", "0.5800874", "0.57997125", "0.57949704", "0.57888263", "0.57841086", "0.5766413", "0.57628727", "0.5750361", "0.57489264", "0.5745443", "0.5739528", "0.5731437", "0.572553", "0.57068986", "0.5704561", "0.5698116", "0.56968063", "0.56834155", "0.5679017", "0.56771", "0.5676742", "0.56750035", "0.56628066", "0.56628066", "0.56628066", "0.56628066", "0.56628066" ]
0.83453417
0
unregister_foot : supprime le foot $key du head
unregister_foot : удаляет foot $key из head
public function unregister_foot ($key) { return $this->unregister('foots', $key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unregister_head ($key)\n {\n return $this->unregister('heads', $key);\n }", "function remove( $key ) {\n\t$headers = H\\Header::instance();\n\n\t$headers->remove( $key );\n}", "public function register_foot ($key, $src = null)\n {\n return $this->register('foots', $key, $src);\n }", "public function remove_header($key)\n {\n }", "public function remove_header($key)\n {\n }", "function p_foot(){}", "public function removeHttpMeta($key)\n\t{\n\t\tunset($this->httpMeta[$key]);\n\t}", "public function removeMeta($key)\n\t{\n\t\tunset($this->meta[$key]);\n\t}", "protected function unregister ($type, $key)\n {\n if ($type != 'css' && $type != 'js' && $type != 'heads' && $type != 'foots') {\n return false;\n }\n unset(Clementine::$register['cssjs'][$type][$key]);\n }", "function clean_foot()\n{\n wp_deregister_script('wp-embed');\n}", "public function removeMeta($key)\r\n {\r\n unset($this->metadata[$key]);\r\n }", "function my_footer_shh() {\n \n remove_filter( 'update_footer', 'core_update_footer' ); \n\n}", "public function __unset($key)\n {\n unset($this->layout[$key]);\n }", "public function remove($key) {}", "function unregister_post_meta($post_type, $meta_key)\n{\n}", "public static function removeHeader($key)\n\t{\n\t\theader_remove($key);\n\t}", "function remove($key);", "public function get_foots ($key = null)\n {\n return $this->get('foots', $key);\n }", "public function remove( $p_key);", "public function __unset($key)\n {\n unset($this->data[$key], $this->view_global->$key);\n }", "public function __unset($key)\n {\n }", "public function remove(string $key): void;", "public function remove(string $key): void;", "public function __unset($key)\n {\n }", "public function __unset($key)\n {\n }", "public function remove( $key );", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "function unregister_header_events() {\n\n}", "public function unsetHeaderFooter() {\n\t\t$this->use_header = false;\n\t\t$this->use_header = false;\n\t}", "public function destroy(Footballer $footballer)\n {\n //\n }", "public function __unset( $key ){\n\t\t\tunset( $this->data['seomatic'][ $key ] );\n\t\t}", "function carolina_footer (){\n remove_action('storefront_footer', 'storefront_credit', 20);\n add_action('storefront_after_footer', 'carolina_new_footer', 10);\n}", "public function removeToken($key);", "function remove_storefront_footer_credit() {\n\tremove_action( 'storefront_footer', 'storefront_credit',\t\t\t20 );\n}", "public function hmRemove($key, array $fields = array())\n {\n }", "public function remove($key){\n $this->segment->remove($key);\n }", "function unregister_term_meta($taxonomy, $meta_key)\n{\n}", "public function unregisterVariable($key) {\n\t\t\n\t\t\t\\Application::unregisterVariable($key);\n\t\t\t\n\t\t}", "public function update_footer() {\n\n remove_filter( 'update_footer', 'core_update_footer' );\n }", "public function destroy($_key);", "public function removeItem($key);", "public function removeItem($key);", "public function __unset( $key ) { if ( isset( $this->data[$key] ) ) unset( $this->data[$key] ); }", "public function delete_uhead($uid = 0, $pid = 0, $hkey)\n {\n if (!$hkey) return;\n list ($uheads) = mysql_fetch_row($this->query('SELECT userheaders FROM '.$this->DB['tbl_profiles'].' WHERE uid=1 AND accid='.intval($pid)));\n $uheads = ($uheads) ? unserialize($uheads) : array();\n unset($uheads[$hkey]);\n $uheads = serialize($uheads);\n $query = 'UPDATE '.$this->DB['tbl_profiles'].' SET userheaders=\"'.$this->escape($uheads).'\" WHERE uid=1 AND accid='.intval($pid);\n return mysql_query($query);\n }", "public function unregister_js ($key)\n {\n return $this->unregister('js', $key);\n }", "public function remove($key) {\n unset($this->fields[$key]);\n }", "abstract public function drop($key);", "abstract public function drop($key);", "function setAppFooter($foot) {\n if ( $this->session_get('APP_FOOTER') !== $foot) {\n $this->session_put('APP_FOOTER', $foot);\n }\n }", "abstract public function remove($key);", "function remove($key) {\r\n\t\tif(array_key_exists($key, $this->data))\r\n\t\t{\r\n\t\t\tunset($this->data[$key]);\r\n\t\t}\r\n\t}", "function unregister_meta_key($object_type, $meta_key, $object_subtype = '')\n{\n}", "public abstract function remove($key);", "public abstract function remove($key);", "public function remove($key)\n\t{\n\t\t\n\t\t$_SESSION[$this -> name][$key] = NULL;\n\t\t$this -> values[$key] = NULL;\n\t\t\n\t}", "public function forget($key) {}", "public function __unset($key)\n\t{\n\t\tif (isset($this->_content[$key])) $this->_modified = true;\n\t\tunset($this->_content[$key]);\n\t}", "function remove($key) \r\n\t{\r\n\t unset($this->vars[$key]);\r\n\t}", "public function __unset($key) \n\t{\n\t\tunset($this->data[$key]);\n\t}", "public function unsetData($key = null);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "function remove_template_custom_field($postID = 0, $key = '') {\n\t\t\tglobal $wpdb;\n\t\t\t@$wpdb->query(\"DELETE from $wpdb->postmeta WHERE post_id = $postID and meta_key = '$key'\");\n\t\t}", "public function removeHeadersAndFooters()\n {\n $this->removeHeaders();\n $this->removeFooters();\n }", "function clear_head(){\n\t\t\n\t\t$this->data['head'] = '';\n\t\t\n\t}", "public function __unset($key) {\n\n if (isset($this->_content[$key])) {\n $this->_modified = true;\n }\n\n unset($this->_content[$key]);\n }", "public function remove(string $key);", "private function removeFooterFromTemplate() : void\n {\n $strTemplatePath = $this->strPhpDocTemplate . DIRECTORY_SEPARATOR . self::TEMPLATE_MAIN_FILE;\n $oDOMDoc = new \\DOMDocument();\n $oDOMDoc->load($strTemplatePath);\n\n $oXPath = new \\DOMXPath($oDOMDoc);\n $oNodelist = $oXPath->query(\"/template/transformations/*[@source='\" . self::TEMPLATE_FOOTER_FILE . \"']\");\n if ($oNodelist !== false && $oNodelist->length > 0) {\n $oNode = $oNodelist->item(0);\n if ($oNode != null && $oNode->parentNode !== null) {\n $oNode->parentNode->removeChild($oNode);\n }\n }\n $oDOMDoc->save($strTemplatePath);\n }", "protected function removeValue($key)\n {\n }", "protected function removeTableFromKey($key)\n {\n }", "public function __unset($key)\n\t{\n\t\t$key = lcfirst($key);\n\t\tif (isset($this->___data[$key])) unset($this->___data[$key]);\n\t}", "function remove() {\r\n\t\tif ( $this->last_key_line === -1 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tunset( $this->block[$this->last_key_line] );\r\n\t}" ]
[ "0.69673944", "0.623814", "0.61860204", "0.6104833", "0.6104833", "0.5915266", "0.5878967", "0.58520114", "0.5811085", "0.5722004", "0.5683589", "0.5663002", "0.5643398", "0.5582367", "0.5555207", "0.55471784", "0.55419534", "0.5538656", "0.5533908", "0.55246973", "0.5515974", "0.55150205", "0.55150205", "0.550714", "0.550714", "0.54894227", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5476685", "0.5464914", "0.5447358", "0.54402256", "0.5431232", "0.5425677", "0.542436", "0.541878", "0.54167736", "0.54094726", "0.54094434", "0.53892237", "0.53707343", "0.5357434", "0.5356947", "0.5356947", "0.53516793", "0.53438944", "0.53402066", "0.5337802", "0.53310794", "0.53310794", "0.5329808", "0.53281915", "0.5314959", "0.5308816", "0.52991146", "0.52991146", "0.52892196", "0.52781385", "0.52686536", "0.5256334", "0.5243963", "0.5234324", "0.52254564", "0.52254564", "0.52254564", "0.52254564", "0.52254564", "0.52254564", "0.52232057", "0.52124846", "0.52097166", "0.5204192", "0.5200778", "0.519883", "0.5195028", "0.5191135", "0.51883006", "0.5182783" ]
0.8230463
0
Add the "User Registration" trigger to specific actions
Добавьте триггер "Регистрация пользователя" в конкретные действия
public static function add_trigger_to_action( $options ) { $options['event'][] = 'user_registration'; return $options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actionRegistration() {\n\t\tif( $this->user->isLoggedIn()){ $this->redirect('Profil:default'); }\n\t\t\n\t\t\n\t}", "public function signupAction()\n\t{\n\t}", "public static function add_registration_trigger( $triggers ) {\n\t\t$triggers['user_registration'] = __( 'Successful user registration', 'frmpp' );\n\t\treturn $triggers;\n\t}", "public function setup_actions() {\r\n\t\tglobal $current_user;\r\n\t\t$current_user = wp_get_current_user();\r\n\t\t//add_filter( 'set_screen_option', array( &$this, 'filter_test' ), 10, 3 );\r\n\t\t//add_settings_field( 'test', 'Test', 'testing', 'pending-approval', 'default', $args = array() );\r\n\t\tadd_action( 'admin_menu', array( $this, 'admin_menus' ), 5 );\r\n\t\t\r\n\t\t// Process changes to member type.\r\n\t\t//add_action( 'bp_members_admin_load', array( $this, 'process_member_type_update' ) );\r\n\r\n\t\t/** Signups ***********************************************************/\r\n\r\n\t\tif ( current_user_can( 'manage_options' ) ){\r\n\r\n\t\t\t// Filter non multisite user query to remove sign-up users\r\n\t\t\tif ( ! is_multisite() ) {\r\n\t\t\t\tadd_action( 'pre_user_query', array( $this, 'remove_ura_signups_from_user_query' ), 10, 1 );\r\n\t\t\t}\r\n\r\n\t\t\t// Reorganise the views navigation in users.php and signups page\r\n\t\t\t//if ( current_user_can( $this->capability ) ) {\r\n\t\t\t\t//$nuac = new NEW_USER_APPROVE_MODEL();\r\n\t\t\t\tadd_filter( \"views_{$this->users_screen}\", array( $this, 'signup_filter_view' ), 10, 1 );\r\n\t\t\t\tadd_filter( 'set-screen-option', array( $this, 'signup_screen_options' ), 10, 3 );\r\n\t\t\t\tadd_filter( 'user_row_actions', array( &$this, 'user_row_custom_actions' ), 10, 2 );\r\n\t\t\t//}\r\n\t\t}\r\n\t\t\r\n\t}", "public function onActivation() {\n $user = wp_get_current_user();\n $this->addDefaultActions($user->ID);\n }", "public static function add_payment_trigger_to_register_user_action( $options ) {\n\t\tif ( is_callable( 'FrmRegUserController::register_user' ) ) {\n\t\t\t$options['event'][] = 'pronamic-pay-success';\n\t\t}\n\n\t\treturn $options;\n\t}", "public static function trigger_after_registration_actions( $form_id, $entry_id ) {\n\t\tFrmFormActionsController::trigger_actions( 'user_registration', $form_id, $entry_id );\n\t}", "public function register_other_users() {\n\t\tdo_action( 'a03_add_other_user_email', [\n\t\t\t'user1@abc.com',\n\t\t\t'user2@abc.com',\n\t\t\t'user3@abc.com'\n\t\t] );//apply custom hook\n\t}", "public function registerActions(){\n }", "public function register() {\n\t\t$this->_validate->validate($this->rule);\n\t\tif($this->_validate->isValid()) {\n\t\t\t$data = [\n\t\t\t\t'username' => Input::post('username'),\n\t\t\t\t'password' => Hash::passwordEncrypt(Input::post('password')),\n\t\t\t\t'email' => Input::post('email'),\n\t\t\t\t'joined' => date('Y-m-d H:i:s'),\n\t\t\t\t'user_group' => 2,\n\t\t\t\t'status' \t => 0, \n\t\t\t];\n\t\t\t$id = $this->save($data);\n\t\t\t$slug = slugify(Input::post('f_name').Input::post('l_name')).'-'.$id;\n\t\t\t$user_info = [\n\t\t\t\t'first_name' => Input::post('f_name'),\n\t\t\t\t'last_name' => Input::post('l_name'),\n\t\t\t\t'subcategory_id' => Input::post('sub_cat_id'),\n\t\t\t\t'slug' \t\t\t => $slug,\n\t\t\t\t'user_id' \t => $id,\n\t\t\t\t'created_at' \t => date('Y-m-d H:i:s'),\n\t\t\t];\n\t\t\t$save = $this->savebytable('user_detail', $user_info);\n\t\t\tif($id && $save) {\n\t\t\t\tSession::set('success', 'Your account has been registered an is in the process of activation. You will get an email after it has been activated. Thank You!');\n\t\t\t\tRedirect::to(URL . 'user/login.php');\t\t\t}\n\t\t}else{\n \tsession::set('validationErrors',$this->_validate->getErrors());\n \t}\n\t}", "public function registerAction() {\n\t\ttry{\n\t\t\t\n\t\t\t$this->userdb->getUsertypes();\n\t\t\t$this->view->ActiveMerchantsList = $this->userdb->getActiveMerchantsList();\n\t\t\t$this->view->title = Title_User_create;\n\t\t\t$params = $this->_getAllParams();\n\t\t\t/*print_r($params);\n\t\t\texit;*/\n\t\t\t//if(isset($params['firstname']) && isset($params['signup'])) {\n\t\t\t$request = $this->getRequest();\n\t\t\t$Request_Values = $request->getPost();\n\n\t\t\tif ($request->isPost()) {\n\t\t\t\n\t\t\t\tif(!$this->users -> createUser($params)) {\n\t\t\t\t\t//$this->_redirect('usermanagement/user/register');\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->_redirect('usermanagement/user/list');\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*} else{\n\t\t\t\t\n\t\t\t\t$this->_redirect('usermanagement/user/list');\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 function generalFunctionAction(){\n $datahelper = $this->getDataHelper();\n\n if( isset( $_REQUEST['form_key'] ) and strpos( $_REQUEST['form_key_value'], 'general_register_page' ) !== false ) {\n\n if(!isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] != \"on\") {\n $datahelper->displayMessage('OpenID Connect requires https. This extension will not work if your website uses http only.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if($_POST['gluu_user_role']){\n $this->update_query('gluu/oxd/gluu_user_role', trim($_POST['gluu_user_role']));\n }\n if($_POST['gluu_users_can_register']==1){\n $this->update_query('gluu/oxd/gluu_users_can_register', $_POST['gluu_users_can_register']);\n if(!empty(array_values(array_filter($_POST['gluu_new_role'])))){\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(array_values(array_filter($_POST['gluu_new_role']))));\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }else{\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(null));\n }\n }\n if($_POST['gluu_users_can_register']==2){\n $this->update_query('gluu/oxd/gluu_users_can_register', 2);\n if(!empty(array_values(array_filter($_POST['gluu_new_role'])))){\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(array_values(array_filter($_POST['gluu_new_role']))));\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }else{\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(null));\n $datahelper->displayMessage('Please enter a role to use for automatic registration or choose one of the other enrollment options.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n if($_POST['gluu_users_can_register']==3){\n $this->update_query('gluu/oxd/gluu_users_can_register', 3);\n\n if(!empty(array_values(array_filter($_POST['gluu_new_role'])))){\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(array_values(array_filter($_POST['gluu_new_role']))));\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }else{\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(null));\n }\n }\n if (empty($_POST['gluu_oxd_port'])) {\n $datahelper->displayMessage('All the fields are required. Please enter valid entries.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n else if (intval($_POST['gluu_oxd_port']) > 65535 && intval($_POST['gluu_oxd_port']) < 0) {\n $datahelper->displayMessage('Enter your oxd host port (Min. number 1, Max. number 65535)',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n else if (!empty($_POST['gluu_provider'])) {\n if (filter_var($_POST['gluu_provider'], FILTER_VALIDATE_URL) === false) {\n $datahelper->displayMessage('Please enter valid OpenID Provider URI.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n if (!empty($_POST['gluu_custom_logout'])) {\n if (filter_var($_POST['gluu_custom_logout'], FILTER_VALIDATE_URL) === false) {\n $datahelper->displayMessage('Please enter valid Custom URI.',\"ERROR\");\n }else{\n $this->update_query('gluu/oxd/gluu_custom_logout', trim($_POST['gluu_custom_logout']));\n }\n }\n else{\n $this->update_query('gluu/oxd/gluu_custom_logout', '');\n }\n if (isset($_POST['gluu_provider']) and !empty($_POST['gluu_provider'])) {\n $gluu_provider = trim($_POST['gluu_provider']);\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n $arrContextOptions=array(\n \"ssl\"=>array(\n \"verify_peer\"=>false,\n \"verify_peer_name\"=>false,\n ),\n );\n $json = file_get_contents($gluu_provider.'/.well-known/openid-configuration', false, stream_context_create($arrContextOptions));\n $obj = json_decode($json);\n if(!empty($obj->userinfo_endpoint)){\n\n if(empty($obj->registration_endpoint)){\n $datahelper->displayMessage('Please enter your client_id and client_secret.',\"SUCCESS\");\n $gluu_config = json_encode(array(\n \"gluu_oxd_port\" =>$_POST['gluu_oxd_port'],\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => \"\",\n \"gluu_client_secret\" => \"\",\n \"config_acr\" => []\n ));\n if($_POST['gluu_users_can_register']==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', $gluu_config),true);\n if(isset($_POST['gluu_client_id']) and !empty($_POST['gluu_client_id']) and\n isset($_POST['gluu_client_secret']) and !empty($_POST['gluu_client_secret'])){\n $gluu_config = json_encode(array(\n \"gluu_oxd_port\" =>$_POST['gluu_oxd_port'],\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => $_POST['gluu_client_id'],\n \"gluu_client_secret\" => $_POST['gluu_client_secret'],\n \"config_acr\" => []\n ));\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', $gluu_config),true);\n if($_POST['gluu_users_can_register']==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestOpHost($gluu_provider);\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n $get_scopes = json_encode($obj->scopes_supported);\n if(!empty($obj->acr_values_supported)){\n $get_acr = json_encode($obj->acr_values_supported);\n $get_acr = $this->update_query('gluu/oxd/gluu_acr', $get_acr);\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n else{\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n if(!empty($obj->scopes_supported)){\n $get_scopes = json_encode($obj->scopes_supported);\n $get_scopes = $this->update_query('gluu/oxd/gluu_scopes', $get_scopes);\n $register_site->setRequestScope($obj->scopes_supported);\n }\n else{\n $register_site->setRequestScope($gluu_config['config_scopes']);\n }\n $register_site->setRequestClientId($_POST['gluu_client_id']);\n $register_site->setRequestClientSecret($_POST['gluu_client_secret']);\n $status = $register_site->request();\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n $gluu_provider = $register_site->getResponseOpHost();\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n /* for admin login*/\n $register_site_admin = $this->getOxdRegisterSiteHelper();\n $register_site_admin->setRequestOpHost($gluu_provider);\n $register_site_admin->setRequestAuthorizationRedirectUri(Mage::getBaseUrl().'admin?option=getOxdAdminLogin');\n $register_site_admin->setRequestLogoutRedirectUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestContacts([$gluu_config['admin_email']]);\n $register_site_admin->setRequestClientLogoutUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestAcrValues($gluu_config['config_acr']);\n $register_site_admin->setRequestScope($gluu_config['config_scopes']);\n $register_site_admin->setRequestClientId(trim($_POST['gluu_client_id']));\n $register_site_admin->setRequestClientSecret(trim($_POST['gluu_client_secret']));\n $register_site_admin->request();\n $gluu_oxd_id_admin = $this->update_query('gluu/oxd/gluu_oxd_id_admin', $register_site_admin->getResponseOxdId());\n /*admin part end*/\n $datahelper->displayMessage('Your settings are saved successfully.',\"SUCCESS\");\n $this->redirect(\"*/*/index\");\n return;\n } else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n else{\n $_SESSION['openid_error'] = 'Error505.';\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n else{\n\n $gluu_config = json_encode(array(\n \"gluu_oxd_port\" =>trim($_POST['gluu_oxd_port']),\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => \"\",\n \"gluu_client_secret\" => \"\",\n \"config_acr\" => []\n ));\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', $gluu_config),true);\n if(trim($_POST['gluu_users_can_register'])==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestOpHost($gluu_provider);\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n $get_scopes = json_encode($obj->scopes_supported);\n if(!empty($obj->acr_values_supported)){\n $get_acr = json_encode($obj->acr_values_supported);\n $get_acr = json_decode($this->update_query('gluu/oxd/gluu_acr', $get_acr));\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n else{\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n if(!empty($obj->scopes_supported)){\n $get_scopes = json_encode($obj->scopes_supported);\n $get_scopes = json_decode($this->update_query('gluu/oxd/gluu_scopes', $get_scopes));\n $register_site->setRequestScope($obj->scopes_supported);\n }\n else{\n $register_site->setRequestScope($gluu_config['config_scopes']);\n }\n $status = $register_site->request();\n //var_dump($status);exit;\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n $gluu_provider = $register_site->getResponseOpHost();\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n /* for admin login*/\n $register_site_admin = $this->getOxdRegisterSiteHelper();\n $register_site_admin->setRequestOpHost($gluu_provider);\n $register_site_admin->setRequestAuthorizationRedirectUri(Mage::getBaseUrl().'admin?option=getOxdAdminLogin');\n $register_site_admin->setRequestLogoutRedirectUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestContacts([$gluu_config['admin_email']]);\n $register_site_admin->setRequestClientLogoutUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestAcrValues($gluu_config['config_acr']);\n $register_site_admin->setRequestScope($gluu_config['config_scopes']);\n $register_site_admin->request();\n $gluu_oxd_id_admin = $this->update_query('gluu/oxd/gluu_oxd_id_admin', $register_site_admin->getResponseOxdId());\n /*admin part end*/\n $datahelper->displayMessage('Your settings are saved successfully.',\"SUCCESS\");\n $this->redirect(\"*/*/index\");\n return;\n }\n else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n }\n else{\n $datahelper->displayMessage('Please enter correct URI of the OpenID Provider.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n\n }\n else{\n $gluu_config = json_encode(array(\n \"gluu_oxd_port\" =>trim($_POST['gluu_oxd_port']),\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => \"\",\n \"gluu_client_secret\" => \"\",\n \"config_acr\" => []\n ));\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', $gluu_config),true);\n if(trim($_POST['gluu_users_can_register'])==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n $register_site->setRequestScope($gluu_config['config_scopes']);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n $status = $register_site->request();\n\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n $gluu_provider = $register_site->getResponseOpHost();\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n $arrContextOptions=array(\n \"ssl\"=>array(\n \"verify_peer\"=>false,\n \"verify_peer_name\"=>false,\n ),\n );\n $json = file_get_contents($gluu_provider.'/.well-known/openid-configuration', false, stream_context_create($arrContextOptions));\n $obj = json_decode($json);\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestOpHost($gluu_provider);\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n\n $get_scopes = json_encode($obj->scopes_supported);\n if(!empty($obj->acr_values_supported)){\n $get_acr = json_encode($obj->acr_values_supported);\n $get_acr = $this->update_query('gluu/oxd/gluu_acr', $get_acr);\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n else{\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n if(!empty($obj->scopes_supported)){\n $get_scopes = json_encode($obj->scopes_supported);\n $get_scopes = $this->update_query('gluu/oxd/gluu_scopes', $get_scopes);\n $register_site->setRequestScope($obj->scopes_supported);\n }\n else{\n $register_site->setRequestScope($gluu_config['config_scopes']);\n }\n $status = $register_site->request();\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n /* for admin login*/\n $register_site_admin = $this->getOxdRegisterSiteHelper();\n $register_site_admin->setRequestOpHost($gluu_provider);\n $register_site_admin->setRequestAuthorizationRedirectUri(Mage::getBaseUrl().'admin?option=getOxdAdminLogin');\n $register_site_admin->setRequestLogoutRedirectUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestContacts([$gluu_config['admin_email']]);\n $register_site_admin->setRequestClientLogoutUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestAcrValues($gluu_config['config_acr']);\n $register_site_admin->setRequestScope($gluu_config['config_scopes']);\n $register_site_admin->request();\n $gluu_oxd_id_admin = $this->update_query('gluu/oxd/gluu_oxd_id_admin', $register_site_admin->getResponseOxdId());\n /*admin part end*/\n $datahelper->displayMessage('Your settings are saved successfully.',\"SUCCESS\");\n $this->redirect(\"*/*/index\");\n return;\n }\n else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n }\n else if( isset( $_REQUEST['form_key'] ) and strpos( $_REQUEST['form_key_value'], 'general_oxd_id_reset' ) !== false and !empty($_REQUEST['resetButton'])) {\n\n unset($_SESSION['openid_error']);\n\n $datahelper->displayMessage('Configurations deleted Successfully.',\"SUCCESS\");\n $this->resetConfigAction();\n }\n else if (isset( $_REQUEST['form_key'] ) and strpos( $_REQUEST['form_key_value'], 'general_oxd_edit' ) !== false) {\n if(trim($_POST['gluu_user_role'])){\n $this->update_query('gluu/oxd/gluu_user_role', trim($_POST['gluu_user_role']));\n }\n if(trim($_POST['gluu_users_can_register'])==1){\n $this->update_query('gluu/oxd/gluu_users_can_register', trim($_POST['gluu_users_can_register']));\n if(!empty(array_values(array_filter($_POST['gluu_new_role'])))){\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(array_values(array_filter($_POST['gluu_new_role']))));\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }else{\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(null));\n }\n }\n if($_POST['gluu_users_can_register']==2){\n $this->update_query('gluu/oxd/gluu_users_can_register', 2);\n if(!empty(array_values(array_filter($_POST['gluu_new_role'])))){\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(array_values(array_filter($_POST['gluu_new_role']))));\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }else{\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(null));\n $datahelper->displayMessage('Please enter a role to use for automatic registration or choose one of the other enrollment options.',\"ERROR\");\n $this->redirect(\"*/*/general\");\n return;\n }\n }\n if($_POST['gluu_users_can_register']==3){\n $this->update_query('gluu/oxd/gluu_users_can_register', 3);\n\n if(!empty(array_values(array_filter($_POST['gluu_new_role'])))){\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(array_values(array_filter($_POST['gluu_new_role']))));\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }else{\n $this->update_query('gluu/oxd/gluu_new_role', json_encode(null));\n }\n }\n $get_scopes = json_encode(array(\"openid\", \"profile\",\"email\"));\n $get_scopes = $this->update_query('gluu/oxd/get_scopes', $get_scopes);\n\n $gluu_acr = json_encode(array(\"none\"));\n $gluu_acr = $this->update_query('gluu/oxd/gluu_acr', $gluu_acr);\n\n if(!isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] != \"on\") {\n $datahelper->displayMessage('OpenID Connect requires https. This extension will not work if your website uses http only.',\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n if (empty(trim($_POST['gluu_oxd_port']))) {\n $datahelper->displayMessage('All the fields are required. Please enter valid entries.',\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n else if (intval($_POST['gluu_oxd_port']) > 65535 && intval($_POST['oxd_port']) < 0) {\n $datahelper->displayMessage('Enter your oxd host port (Min. number 0, Max. number 65535).',\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n if (!empty(trim($_POST['gluu_custom_logout']))) {\n if (filter_var(trim($_POST['gluu_custom_logout']), FILTER_VALIDATE_URL) === false) {\n $datahelper->displayMessage('Please enter valid Custom URI.',\"ERROR\");\n }else{\n $this->update_query('gluu/oxd/gluu_custom_logout', trim($_POST['gluu_custom_logout']));\n }\n }else{\n $this->update_query('gluu/oxd/gluu_custom_logout', '');\n }\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', '');\n $gluu_config = array(\n \"gluu_oxd_port\" =>$_POST['gluu_oxd_port'],\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => \"\",\n \"gluu_client_secret\" => \"\",\n \"config_acr\" => []\n );\n\n $gluu_config = $this->update_query('gluu/oxd/gluu_config', json_encode($gluu_config));\n if($_POST['gluu_users_can_register']==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $gluu_provider = $this->select_query('gluu/oxd/gluu_provider');\n if (!empty($gluu_provider)) {\n $arrContextOptions=array(\n \"ssl\"=>array(\n \"verify_peer\"=>false,\n \"verify_peer_name\"=>false,\n ),\n );\n $json = file_get_contents($gluu_provider.'/.well-known/openid-configuration', false, stream_context_create($arrContextOptions));\n $obj = json_decode($json);\n if(!empty($obj->userinfo_endpoint)){\n if(empty($obj->registration_endpoint)){\n if(isset($_POST['gluu_client_id']) and !empty($_POST['gluu_client_id']) and\n isset($_POST['gluu_client_secret']) and !empty($_POST['gluu_client_secret']) and !$obj->registration_endpoint){\n $gluu_config = array(\n \"gluu_oxd_port\" => trim($_POST['gluu_oxd_port']),\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"gluu_client_id\" => trim($_POST['gluu_client_id']),\n \"gluu_client_secret\" => trim($_POST['gluu_client_secret']),\n \"config_scopes\" => [\"openid\", \"profile\",\"email\"],\n \"config_acr\" => []\n );\n $gluu_config1 = $this->update_query('gluu/oxd/gluu_config', json_encode($gluu_config));\n if($_POST['gluu_users_can_register']==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestOpHost($gluu_provider);\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$GLOBALS['current_user']->email1]);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n if(!empty($obj->acr_values_supported)){\n $get_acr = json_encode($obj->acr_values_supported);\n $gluu_config = $this->update_query('gluu/oxd/gluu_acr', $gluu_acr);\n }\n if(!empty($obj->scopes_supported)){\n $get_scopes = json_encode($obj->scopes_supported);\n $gluu_config = $this->update_query('gluu/oxd/get_scopes', $get_scopes);\n $register_site->setRequestScope($obj->scopes_supported);\n }else{\n $register_site->setRequestScope($gluu_config['config_scopes']);\n }\n $register_site->setRequestClientId(trim($_POST['gluu_client_id']));\n $register_site->setRequestClientSecret(trim($_POST['gluu_client_secret']));\n $status = $register_site->request();\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n $gluu_provider = $register_site->getResponseOpHost();\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n /* for admin login*/\n /*$register_site_admin = $this->getOxdRegisterSiteHelper();\n $register_site_admin->setRequestOpHost($gluu_provider);\n $register_site_admin->setRequestAuthorizationRedirectUri(Mage::getBaseUrl().'admin?option=getOxdAdminLogin');\n $register_site_admin->setRequestLogoutRedirectUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestContacts([$gluu_config['admin_email']]);\n $register_site_admin->setRequestClientLogoutUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestAcrValues($gluu_config['config_acr']);\n $register_site_admin->setRequestScope($gluu_config['config_scopes']);\n $register_site_admin->setRequestClientId(trim($_POST['gluu_client_id']));\n $register_site_admin->setRequestClientSecret(trim($_POST['gluu_client_secret']));\n $register_site_admin->request();\n $gluu_oxd_id_admin = $this->update_query('gluu/oxd/gluu_oxd_id_admin', $register_site_admin->getResponseOxdId());*/\n /*admin part end*/\n $datahelper->displayMessage('Your settings are saved successfully.',\"SUCCESS\");\n $this->redirect(\"*/*/index\");\n return;\n } else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n else{\n $_SESSION['openid_error_edit'] = 'Error506';\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n }\n else{\n $gluu_config = array(\n \"gluu_oxd_port\" =>trim($_POST['gluu_oxd_port']),\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => \"\",\n \"gluu_client_secret\" => \"\",\n \"config_acr\" => []\n );\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($gluu_config)),true);\n if($_POST['gluu_users_can_register']==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestOpHost($gluu_provider);\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n $get_scopes = json_encode($obj->scopes_supported);\n if(!empty($obj->acr_values_supported)){\n $get_acr = json_encode($obj->acr_values_supported);\n $get_acr = json_decode($this->update_query('gluu/oxd/gluu_acr', $get_acr));\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n else{\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n if(!empty($obj->scopes_supported)){\n $get_scopes = json_encode($obj->scopes_supported);\n $get_scopes = json_decode($this->update_query('gluu/oxd/gluu_scopes', $get_scopes));\n $register_site->setRequestScope($obj->scopes_supported);\n }\n else{\n $register_site->setRequestScope($gluu_config['config_scopes']);\n }\n $status = $register_site->request();\n //var_dump($status);exit;\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n $gluu_provider = $register_site->getResponseOpHost();\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n /* for admin login*/\n $register_site_admin = $this->getOxdRegisterSiteHelper();\n $register_site_admin->setRequestOpHost($gluu_provider);\n $register_site_admin->setRequestAuthorizationRedirectUri(Mage::getBaseUrl().'admin?option=getOxdAdminLogin');\n $register_site_admin->setRequestLogoutRedirectUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestContacts([$gluu_config['admin_email']]);\n $register_site_admin->setRequestClientLogoutUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestAcrValues($gluu_config['config_acr']);\n $register_site_admin->setRequestScope($gluu_config['config_scopes']);\n $register_site_admin->request();\n $gluu_oxd_id_admin = $this->update_query('gluu/oxd/gluu_oxd_id_admin', $register_site_admin->getResponseOxdId());\n /*admin part end*/\n $datahelper->displayMessage('Your settings are saved successfully.',\"SUCCESS\");\n $this->redirect(\"*/*/index\");\n return;\n }\n else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n }\n else{\n $datahelper->displayMessage('Please enter correct URI of the OpenID Provider.',\"ERROR\");\n $this->redirect(\"*/*/indexEdit\");\n return;\n }\n }\n else{\n $gluu_config = array(\n \"gluu_oxd_port\" =>trim($_POST['gluu_oxd_port']),\n \"admin_email\" => Mage::getSingleton('admin/session')->getUser()->getEmail(),\n \"authorization_redirect_uri\" => Mage::getBaseUrl().'customer/account/login?option=getOxdSocialLogin',\n \"post_logout_redirect_uri\" => Mage::helper('customer')->getLogoutUrl(),\n \"config_scopes\" => [\"openid\",\"profile\",\"email\"],\n \"gluu_client_id\" => \"\",\n \"gluu_client_secret\" => \"\",\n \"config_acr\" => []\n );\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($gluu_config)),true);\n if($_POST['gluu_users_can_register']==2){\n $config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n array_push($config['config_scopes'],'permission');\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', json_encode($config)),true);\n }\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n $register_site->setRequestScope($gluu_config['config_scopes']);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n $status = $register_site->request();\n\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n $gluu_provider = $register_site->getResponseOpHost();\n $gluu_provider1 = $this->update_query('gluu/oxd/gluu_provider', $gluu_provider);\n $arrContextOptions=array(\n \"ssl\"=>array(\n \"verify_peer\"=>false,\n \"verify_peer_name\"=>false,\n ),\n );\n $json = file_get_contents($gluu_provider.'/.well-known/openid-configuration', false, stream_context_create($arrContextOptions));\n $obj = json_decode($json);\n $register_site = $this->getOxdRegisterSiteHelper();\n $register_site->setRequestOpHost($gluu_provider);\n $register_site->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $register_site->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $register_site->setRequestContacts([$gluu_config['admin_email']]);\n $register_site->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n\n $get_scopes = json_encode($obj->scopes_supported);\n if(!empty($obj->acr_values_supported)){\n $get_acr = json_encode($obj->acr_values_supported);\n $get_acr = $this->update_query('gluu/oxd/gluu_acr', $get_acr);\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n else{\n $register_site->setRequestAcrValues($gluu_config['config_acr']);\n }\n if(!empty($obj->scopes_supported)){\n $get_scopes = json_encode($obj->scopes_supported);\n $get_scopes = $this->update_query('gluu/oxd/gluu_scopes', $get_scopes);\n $register_site->setRequestScope($obj->scopes_supported);\n }\n else{\n $register_site->setRequestScope($gluu_config['config_scopes']);\n }\n $status = $register_site->request();\n if ($status['message'] == 'invalid_op_host') {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if (!$status['status']) {\n $datahelper->displayMessage('Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n if ($status['message'] == 'internal_error') {\n $datahelper->displayMessage('ERROR: '.$status['error_message'],\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n $gluu_oxd_id = $register_site->getResponseOxdId();\n if ($gluu_oxd_id) {\n $gluu_oxd_id = $this->update_query('gluu/oxd/gluu_oxd_id', $gluu_oxd_id);\n /* for admin login*/\n $register_site_admin = $this->getOxdRegisterSiteHelper();\n $register_site_admin->setRequestOpHost($gluu_provider);\n $register_site_admin->setRequestAuthorizationRedirectUri(Mage::getBaseUrl().'admin?option=getOxdAdminLogin');\n $register_site_admin->setRequestLogoutRedirectUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestContacts([$gluu_config['admin_email']]);\n $register_site_admin->setRequestClientLogoutUri(Mage::getBaseUrl().'gluufolder/adminhtml_index/logoutfromall');\n $register_site_admin->setRequestAcrValues($gluu_config['config_acr']);\n $register_site_admin->setRequestScope($gluu_config['config_scopes']);\n $register_site_admin->request();\n $gluu_oxd_id_admin = $this->update_query('gluu/oxd/gluu_oxd_id_admin', $register_site_admin->getResponseOxdId());\n /*admin part end*/\n $datahelper->displayMessage('Your settings are saved successfully.',\"SUCCESS\");\n $this->redirect(\"*/*/index\");\n return;\n }\n else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n else {\n $datahelper->displayMessage('ERROR: OpenID Provider host is required if you don\\'t provide it in oxd-default-site-config.json.',\"ERROR\");\n $this->redirect(\"*/*/index\");\n return;\n }\n }\n }\n else if( isset( $_REQUEST['form_key'] ) and strpos( $_REQUEST['form_key_value'], 'openid_config_page' ) !== false ) {\n $params = $_REQUEST;\n $message_success = '';\n\n if($_POST['send_user_type']){\n $gluu_auth_type = trim($_POST['send_user_type']);\n $gluu_auth_type = $this->update_query('gluu/oxd/gluu_auth_type', $gluu_auth_type);\n }else{\n $gluu_auth_type = $this->update_query('gluu/oxd/gluu_auth_type', 'default');\n }\n $gluu_send_user_check = trim($_POST['send_user_check']);\n $gluu_send_user_check = $this->update_query('gluu/oxd/gluu_send_user_check', $gluu_send_user_check);\n\n $gluu_send_admin_check = trim($_POST['send_admin_check']);\n $gluu_send_admin_check = $this->update_query('gluu/oxd/gluu_send_admin_check', $gluu_send_admin_check);\n if(!empty($params['scope']) && isset($params['scope'])){\n $gluu_config = json_decode($this->select_query(\"gluu/oxd/gluu_config\"),true);\n $gluu_config['config_scopes'] = $params['scope'];\n $gluu_config = json_encode($gluu_config);\n $gluu_config = json_decode($this->update_query('gluu/oxd/gluu_config', $gluu_config),true);\n }\n if(!empty($params['scope_name']) && isset($params['scope_name'])){\n $get_scopes = json_decode($this->select_query('gluu/oxd/gluu_scopes'),true);\n foreach($params['scope_name'] as $scope){\n if($scope && !in_array($scope,$get_scopes)){\n array_push($get_scopes, $scope);\n }\n }\n $get_scopes = json_encode($get_scopes);\n $get_scopes = json_decode($this->update_query('gluu/oxd/gluu_scopes', $get_scopes),true);\n }\n $gluu_acr = json_decode($this->select_query('gluu/oxd/gluu_acr'),true);\n\n if(!empty($params['acr_name']) && isset($params['acr_name'])){\n $get_acr = json_decode($this->select_query('gluu/oxd/gluu_acr'),true);\n foreach($params['acr_name'] as $scope){\n if($scope && !in_array($scope,$get_acr)){\n array_push($get_acr, $scope);\n }\n }\n $get_acr = json_encode($get_acr);\n $get_acr = json_decode($this->update_query('gluu/oxd/gluu_acr', $get_acr),true);\n }\n $gluu_config = json_decode($this->select_query('gluu/oxd/gluu_config'),true);\n $gluu_oxd_id = $this->select_query('gluu/oxd/gluu_oxd_id');\n $update_site_registration = $this->getOxdUpdateSiteRegistrationHelper();\n $update_site_registration->setRequestOxdId($gluu_oxd_id);\n $update_site_registration->setRequestAcrValues($gluu_config['acr_values']);\n $update_site_registration->setRequestAuthorizationRedirectUri($gluu_config['authorization_redirect_uri']);\n $update_site_registration->setRequestLogoutRedirectUri($gluu_config['post_logout_redirect_uri']);\n $update_site_registration->setRequestContacts([$gluu_config['admin_email']]);\n $update_site_registration->setRequestClientLogoutUri($gluu_config['post_logout_redirect_uri']);\n $update_site_registration->setRequestScope($gluu_config['config_scopes']);\n $status = $update_site_registration->request();\n $new_oxd_id = $update_site_registration->getResponseOxdId();\n if($new_oxd_id){\n $get_scopes = $this->update_query('gluu/oxd/gluu_oxd_id', $new_oxd_id);\n }\n\n $datahelper->displayMessage('Your OpenID connect configuration has been saved.',\"SUCCESS\");\n $this->redirect(\"*/*/openidconfigpage\");\n return;\n }\n }", "public function register() {\n $this->initializeRoleCap();\n add_action('user_register', array($this, 'registerUserClass'));\n }", "public function registerAction(){\n $request = $this->container->get(\"request\");\n $opciones = $request->getSession()->get('opciones');\n \n $userInterno = $request->get(\"userInterno\");\n $eliminar = $request->get(\"eliminar\");\n $update = $request->get(\"update\");\n \n if($update === 'true'){\n return $this->updateAction($request);\n }\n \n if($eliminar === 'true'){\n return $this->eliminarAction($request);\n }\n \n $entId = '';\n $entNombre = ''; \n \n if($userInterno === 'false'){\n $entId = $request->get(\"entId\");\n $entidadDao = new EntidadDao($this->container->get(\"doctrine\"));//fos_user.user_manager\n $entNombre = $entidadDao->getEntidad($entId)->getEntNombre();\n }\n \n $form = $this->container->get('fos_user.registration.form');\n $formHandler = $this->container->get('fos_user.registration.form.handler');\n \n $auditUser = $this->container->get('security.context')->getToken()->getUser();\n //$this->container->get('session')->set('auditUserIns', $auditUser->getUsername());\n \n $confirmationEnabled = $this->container->getParameter('fos_user.registration.confirmation.enabled');\n \n $process = $formHandler->processIns($entId, $userInterno, $auditUser, $confirmationEnabled);\n \n if ($process) {\n $user = $form->getData();\n \n /*****************************************************\n * Add new functionality (e.g. log the registration) *\n *****************************************************/\n \n $url= null;\n /*if ($confirmationEnabled) {\n $this->container->get('session')->set('fos_user_send_confirmation_email/email', $user->getEmail());\n $route = 'fos_user_registration_check_email';\n \n $this->setFlash('fos_user_success', 'registration.flash.user_created');\n $url = $this->container->get('router')->generate($route);\n\n } else {/**/\n //$this->authenticateUser($user);\n //$route = 'fos_user_registration_confirmed';\n if($confirmationEnabled){\n $this->setFlash('notice', 'El usuario ha sido guardado exitosamente y se envio correo electrónico para su activación');\n }else{\n $this->setFlash('notice', 'El usuario ha sido guardado exitosamente');\n }\n \n $route = 'MinSalSCAUsersBundle_mantMostrarUsuarios';\n $url = $this->container->get('router')->generate($route, array(\n 'userInterno' => $userInterno,\n 'entId' => $entId,\n 'entNombre' => $entNombre,\n 'opciones' => $opciones,\n ));\n //}\n return new RedirectResponse($url);\n }\n \n \n //FOSUserBundle:Registration:register.html\n return $this->container->get('templating')->renderResponse('MinSalSCAUsersBundle:Registration:register.html.'.$this->getEngine(), array(\n 'form' => $form->createView(),\n 'userInterno' => $userInterno,\n 'entId' => $entId,\n 'entNombre' => $entNombre,\n 'opciones' => $opciones,\n ));\n }", "public function postAction_register() {\n if (empty($_POST) || !isset($_POST['user_email'], $_POST['user_password'], $_POST['user_password2']) || !is_email($_POST['user_email'])) {\n wp_redirect($this->get_url('register'));\n die;\n }\n\n // Check email does not exists\n $user = get_user_by('email', $_POST['user_email']);\n if (is_object($user)) {\n $this->set_message('fail-register-exists', __('This email is already in use', 'wpucommunity'), 'error');\n wp_redirect($this->get_url('register'));\n die;\n }\n\n // Check password = password 2\n if ($_POST['user_password'] != $_POST['user_password2']) {\n $this->set_message('fail-register-pass', __('The two password do not match', 'wpucommunity'), 'error');\n wp_redirect($this->get_url('register'));\n die;\n }\n\n // Create user\n $register_success_url = apply_filters('wpucommunity_register_success_url', $this->get_url('account'));\n $user_login = str_replace(array('.', ' '), '', 'user-' . uniqid());\n $user_id = wp_insert_user(array(\n 'user_login' => $user_login,\n 'user_email' => $_POST['user_email'],\n 'user_pass' => $_POST['user_password'],\n 'role' => $this->role['id']\n ));\n if (is_numeric($user_id)) {\n $this->set_message('success-register', __('Your account has been successfully created', 'wpucommunity'));\n wp_signon(array('user_login' => $user_login, 'user_password' => $_POST['user_password']), false);\n wp_redirect($register_success_url);\n } else {\n $this->set_message('fail-register', __('The account could not be created', 'wpucommunity'), 'error');\n wp_redirect($this->get_url('register'));\n }\n die;\n }", "public function register_activator_user() {\n\n\t\t$current_user = $this->get_this_login_user();\n\t\t$this->append_log_in_text_file(\n\t\t\t'The user with login of: \"' . $current_user->user_login . '\" and display name of: \"' . $current_user->display_name\n\t\t\t. '\" activated this plugin',\n\t\t\tSIAWOOD_PRODUCTS_LOGS . 'activator-logs.txt',\n\t\t\t'Activator User' );\n\n\t}", "public function register_activator_user() {\n\n\t\t$current_user = $this->get_this_login_user();\n\t\t$this->append_log_in_text_file(\n\t\t\t'The user with login of: \"' . $current_user->user_login . '\" and display name of: \"' . $current_user->display_name\n\t\t\t. '\" activated this plugin',\n\t\t\tRESTAURANT_BOOKING_LOGS . 'activator-logs.txt',\n\t\t\t'Activator User' );\n\n\t}", "public function register() {\n\t\t$this->set('title_for_layout', 'Register');\n\t\t//Check if registration is allowed by the user\n\t\tif ($this->Setting->field('value', array('name' => 'register_enabled'))) {\n\t\t\t//Registration part\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t//if data was posted therefore a submitted form\n\t\t\t\tif ($this->data['User']['password'] == $this->data['User']['password_confirm']) {\n\t\t\t\t\tif ($this->data['User']['password'] != 'password') {\n\t\t\t\t\t\t$this->User->create();\n\t\t\t\t\t\tif ($this->User->save($this->request->data['User'])) {\n\t\t\t\t\t\t\t$id = $this->User->getLastInsertID();\n\t\t\t\t\t\t\t$this->log(\"[UsersController.register] user[${id}] created\", 'devtrack');\n\n\t\t\t\t\t\t\t//Check to see if an SSH key was added and save it\n\t\t\t\t\t\t\tif (!empty($this->data['User']['ssh_key'])) {\n\t\t\t\t\t\t\t\t$this->User->SshKey->create();\n\t\t\t\t\t\t\t\t$data = array('SshKey');\n\t\t\t\t\t\t\t\t$data['SshKey']['user_id'] = $id;\n\t\t\t\t\t\t\t\t$data['SshKey']['key'] = $this->request->data['User']['ssh_key'];\n\t\t\t\t\t\t\t\t$data['SshKey']['comment'] = 'Default key';\n\t\t\t\t\t\t\t\t$this->User->SshKey->save($data);\n\n\t\t\t\t\t\t\t\t// Update the sync required flag\n\t\t\t\t\t\t\t\t$this->Setting->syncRequired();\n\n\t\t\t\t\t\t\t\t$this->log(\"[UsersController.register] sshkey[\" . $this->User->SshKey->getLastInsertID() . \"] added to user[${id}]\", 'devtrack');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//Now to create the key and send the email\n\t\t\t\t\t\t\t$this->User->EmailConfirmationKey->save(\n\t\t\t\t\t\t\t\tarray('EmailConfirmationKey' => array(\n\t\t\t\t\t\t\t\t\t'user_id' => $id,\n\t\t\t\t\t\t\t\t\t'key' => $this->__generateKey(20),\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->__sendNewUserMail($id);\n\t\t\t\t\t\t\t$this->render('email_sent');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->Session->setFlash(__(\"<h4 class='alert-heading'>Error</h4>One or more fields were not filled in correctly. Please try again.\"), 'default', array(), 'error');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Session->setFlash(__(\"<h4 class='alert-heading'>Oh Dear...</h4>I see what you did there. 'password' is not a good password. Be more original!\"), 'default', array(), 'error');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash(__(\"<h4 class='alert-heading'>Error</h4>The passwords do not match. Please try again.\"), 'default', array(), 'error');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//Display an error saying that registration is not allowed\n\t\t\t$this->render('registration_disabled');\n\t\t}\n\t}", "function registerAction()\n {\n $this->viewClass = \"JsonView\";\n\n $errorMessage = $this->validateRegistration();\n\n if (!$errorMessage) {\n $user = new UserRecord();\n $user->email = $this->request->email;\n $user->password = md5($this->request->password);\n $user->role = 'webmaster';\n\n if (Config::get(\"emailConfirmationEnabled\")) {\n $user->active = 0;\n }\n\n $user->save();\n\n if (Config::get(\"emailConfirmationEnabled\")) {\n $this->set(\"message\", _t(\"The registration was successful! You must confirm your email. Check your inbox.\"));\n $verification = $this->verification->addVerification($user->userId, \"userEmail\");\n $confirmLink = Config::get(\"siteRootUrl\") . $this->moduleLink(\"confirmUserEmail/\" . $verification->code, false);\n Mailer::getInstance()->sendEmailConfirmation(\"userEmail\", $user->email, $confirmLink);\n } else {\n $this->set(\"message\", _t(\"The registration was successful! You can login now.\"));\n }\n\n $this->set(\"status\", \"ok\");\n\n } else {\n //something is wrong with webmasterData\n $this->set(\"status\", \"error\");\n $this->set(\"message\", _t($errorMessage));\n }\n }", "public function init_users_hooks() {\r\n\t\tadd_action( 'show_user_profile', array( $this, 'add_customer_meta_fields' ) );\r\n\t\tadd_action( 'edit_user_profile', array( $this, 'add_customer_meta_fields' ) );\r\n\r\n\t\tadd_action( 'personal_options_update', array( $this, 'save_customer_meta_fields' ) );\r\n\t\tadd_action( 'edit_user_profile_update', array( $this, 'save_customer_meta_fields' ) );\r\n\t}", "public function checkForActions() {\n \n // Get User\n $user = wp_get_current_user();\n \n // Get Actions\n $actions = get_field($this->id, \"user_$user->ID\");\n \n // Check if user has actions\n if ($actions === null || $actions === false) $this->addDefaultActions($user->ID);\n \n // Get where to display\n $admin = get_field($this->activated, \"user_$user->ID\");\n //$frontend = get_field('display-frontend', \"user_$user->ID\");\n \n // Adds our Plus Button on admin\n if ($admin) add_action('in_admin_header', array(&$this, 'addPlusButton'));\n \n }", "public function register() {\n if ($this->request->isPost()) {\n //pr(pathinfo($this->data['User']['photo']['name'])); die;\n if (isset($this->request->data['facebook_button'])) {\n // Check for Facebook registration\n $this->Session->write('userType', $this->request->data['User']['user_type']);\n $this->redirect(array('controller' => 'users', 'action' => 'facebook'));\n } else if (isset($this->request->data['twitter_button'])) {\n // Check for Twitter registration\n $this->Session->write('userType', $this->request->data['User']['user_type']);\n $this->redirect(array('controller' => 'users', 'action' => 'twitter'));\n } else if (isset($this->request->data['linkedin_button'])) {\n // Check for Linkedin registration\n $this->Session->write('userType', $this->request->data['User']['user_type']);\n $this->redirect(array('controller' => 'users', 'action' => 'linkedin'));\n } else {\n $data = $this->request->data;\n $data['User']['username'] = str_replace('/', '', str_replace(' ', '-', strtolower($data['User']['username'])));\n\n $flag = 0;\n\n if ($data['User']['user_type'] == 'affiliate') {\n $other_exists_user = $this->User->find('first', array('conditions' => array(\n 'status <>' => 2,\n 'other_name' => $data['User']['other_name']\n )\n )\n );\n if (!empty($other_exists_user)) {\n $flag = 1;\n }\n }\n $exists_user = $this->User->find('first', array('conditions' => array(\n 'status <>' => 2,\n 'email' => $data['User']['email']\n )\n )\n );\n\n if ($flag == 1) {\n $this->Session->setFlash(__('Affiliate name already exist.'), 'default', array(), 'error');\n return;\n }\n\n if ($exists_user) {\n $this->Session->setFlash(__('Email id already exist.'), 'default', array(), 'error');\n return;\n } else {\n $exists_user = $this->User->find('first', array('conditions' => array(\n 'status <>' => 2,\n 'username' => $data['User']['username']\n )\n )\n );\n\n if ($exists_user) {\n $this->Session->setFlash(__('Username already exist.'), 'default', array(), 'error');\n return;\n }\n\n if (isset($data['User']['photo'])) {\n $image = $data['User']['photo'];\n unset($data['User']['photo']);\n }\n\n $this->User->set($data);\n $this->User->create();\n $data['User']['role'] = UserRoleConst::RoleUser;\n $data['User']['status'] = STATUS_INACTIVE;\n $data['User']['verification_code'] = String::uuid();\n $data['User']['password'] = $this->Auth->password($data['User']['password']);\n if ($user = $this->User->save($data)) {\n $lastInsertedId = $user['User']['id'];\n\n $image_array = $image;\n $user_id = $lastInsertedId;\n $image_info = pathinfo($image_array['name']);\n $image_new_name = $image_info['filename'] . time() . '_' . $user_id;\n\n\n $dest_dir = WWW_ROOT . 'files/' . $user_id;\n\n if (!is_dir($dest_dir)) {\n mkdir($dest_dir, 0777);\n }\n $dest_dir = $dest_dir . DS;\n $thumbnails = Thumbnail::user_profile_thumbs();\n $params = array('size' => '500');\n $size_dimensions = array('width' => 20, 'height' => 20);\n $this->Uploader->upload($image_array, $dest_dir, array(), $image_new_name, $params, $size_dimensions);\n\n if ($this->Uploader->error) {\n $file_error = $this->Uploader->errorMessage;\n\n $this->Session->setFlash(__('Error occured while uploading image'), 'default', array(), 'error');\n $this->Session->setFlash(__($file_error, 'error-messages'), 'default', array(), 'error');\n } else {\n $image_new_name = $this->Uploader->filename;\n $source_path = WWW_ROOT . 'files' . DS . $user_id . DS . $image_new_name;\n $filedata = array(\n 'source_path' => $source_path,\n 'dest_dir' => $dest_dir,\n 'file_name' => $image_new_name\n );\n $file_dimension = array(\n 'width' => $this->request->data['w'],\n 'height' => $this->request->data['h'],\n 'x' => $this->request->data['x'],\n 'y' => $this->request->data['y']\n );\n //pr($filedata); die;\n $this->Uploader->crop($filedata, $file_dimension, $thumbnails, array('remove' => false));\n }\n\n $this->User->saveField('photo', $this->Uploader->filename);\n\n\n //$data['User']['password'] = $password;\n $this->User->saveField('password', $data['User']['password']);\n\n /* Send email to user */\n $this->loadModel('Emailtemplate');\n $email_content = $this->Emailtemplate->find('first', array('fields' => array('from_name', 'from_email', 'reply_to', 'subject', 'content'), 'conditions' => array('email_for' => 'Registration')));\n $content = $email_content['Emailtemplate']['content'];\n $activate_url = Router::url(array('controller' => 'users', 'action' => 'verify', $data['User']['verification_code']), true);\n $activate_url = \"<a href='$activate_url'>$activate_url</a>\";\n $content = str_replace(array('{USERNAME}', '{ACTIVATE_LINK}'), array(ucfirst($data['User']['first_name']), $activate_url), $content);\n $email_content['Emailtemplate']['content'] = $content;\n //~ pr($email_content);\n //~ die;\n $email = new CakeEmail('smtp');\n $email->from(array(ADMIN_EMAIL => APPLICATION_NAME))\n ->to($this->request->data['User']['email'])\n ->emailFormat('html')\n ->subject($email_content['Emailtemplate']['subject'])\n ->send($content);\n\n\n $this->Session->setFlash(__('Please check your inbox to activate your Account'), 'default', array(), 'success');\n $this->redirect(array('controller' => 'users', 'action' => 'register'));\n } else {\n $this->Session->setFlash(__('Please fill the required fields.'), 'default', array(), 'error');\n }\n }\n }\n }\n $this->set('title_for_layout', 'User Registration');\n }", "public static function get_registration_action() {\n\t\treturn 'admin_init';\n\t}", "public static function get_registration_action() {\n\t\treturn 'admin_init';\n\t}", "public function add_user( $options=array() ){\n\t\t\t//must event id\n\t\t\t\n\t\t\n\t\t$actions_type_id = $this->get_action_id_for_slug( array('slug' => 'attend_virtual_event') );\n\t\t\n\t}", "function register()\n\t{\n\t\t$usersConfig = &JComponentHelper::getParams( 'com_users' );\n\t\tif (!$usersConfig->get( 'allowUserRegistration' )) {\n\t\t\tJError::raiseError( 403, JText::_( 'Access Forbidden' ));\n\t\t\treturn;\n\t\t}\n\n\t\t$user \t=& JFactory::getUser();\n\n\t\tif ( $user->get('guest')) {\n\t\t\tJRequest::setVar('view', 'register');\n\t\t} else {\n\t\t\t$this->setredirect('index.php?option=com_user&task=edit',JText::_('You are already registered.'));\n\t\t}\n\n\t\tparent::display();\n\t}", "function wooconnection_trigger_register_user($registeruser){\n // Create instance of our wooconnection logger class to use off the whole things.\n $wooconnectionLogger = new WC_Logger();\n \n //Concate a error message to store the logs...\n $callback_purpose = 'Wooconnection Registration : Process of wooconnection registration trigger';\n $applicationAuthenticationDetails = getAuthenticationDetails();\n \n //Stop the below process if not authentication done with infusionsoft/keap application..\n if(empty($applicationAuthenticationDetails) || empty($applicationAuthenticationDetails[0]->user_access_token))\n {\n $addLogs = addLogsAuthentication($callback_purpose);\n return false;\n }\n \n //get the access token....\n $access_token = '';\n if(!empty($applicationAuthenticationDetails[0]->user_access_token)){\n $access_token = $applicationAuthenticationDetails[0]->user_access_token;\n }\n\n //New user id....\n $userid = $registeruser;\n\n //Woocommerce Standard trigger : Get the call name and integration name of goal \"Woocommerce User Registration\"... \n $generalRegistrationNewUserTrigger = get_campaign_goal_details(WOOCONNECTION_TRIGGER_TYPE_GENERAL,'New User Registration');\n \n //Define variables\n $generalRegistrationNewUserIntegrationName = '';\n $generalRegistrationNewUserCallName = '';\n\n //Check campaign goal details...\n if(isset($generalRegistrationNewUserTrigger) && !empty($generalRegistrationNewUserTrigger)){\n //Get and set the wooconnection goal integration name\n if(isset($generalRegistrationNewUserTrigger[0]->wc_integration_name) && !empty($generalRegistrationNewUserTrigger[0]->wc_integration_name)){\n $generalRegistrationNewUserIntegrationName = $generalRegistrationNewUserTrigger[0]->wc_integration_name;\n }\n\n //Get and set the wooconnection goal call name\n if(isset($generalRegistrationNewUserTrigger[0]->wc_call_name) && !empty($generalRegistrationNewUserTrigger[0]->wc_call_name)){\n $generalRegistrationNewUserCallName = $generalRegistrationNewUserTrigger[0]->wc_call_name;\n }\n }\n\n //Call the main trigger function..\n wooconnection_general_user_registration_trigger($userid,$generalRegistrationNewUserIntegrationName,$generalRegistrationNewUserCallName,$wooconnectionLogger,$access_token,$callback_purpose);\n}", "public function registerAction() {\r\n \t// Defaults\r\n \t$error = null;\r\n \t$status = null;\r\n \t\r\n \t$entity = new Application_Model_Userentity($this->user);\r\n \t\r\n \t$users = $entity->getAll();\r\n \t\r\n \tif ($this->request->isPost()) {\r\n\t \t// Check our post array\r\n\t\t\t$post = $this->request->getPost();\r\n\t\t\t\r\n\t\t\tif (!empty($post)) {\r\n\t\t\t\tif ($entity->exists('user','username',$post['username'])) {\r\n\t\t\t\t\t$status = false;\r\n\t\t\t\t\t$error = 'Username already taken.';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Special handling for passwords\r\n\t\t\t\t\tif (array_key_exists('password', $post)) {\r\n\t\t // Use a special method for updating passwords\r\n\t\t $post['password'] = $entity->encryptPassword($post['password']);\r\n\t\t }\r\n\t\t \r\n\t\t \t\t// Add the entity with all of the passed info\r\n\t\t \t\t$entity->addWithMeta($post);\r\n\t \t\t\t\r\n\t\t \t\t$status = $entity->isValid();\r\n\t\t \t\t$error = $entity->getError();\r\n\t\t \t}\r\n\t\t\t} else {\r\n\t\t\t\t$error = 'No data was presented to create the user with.';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->view->status_types = $this->user->getStatusTypes();\r\n\t\t$this->view->error = $error;\r\n\t\t$this->view->status = $status;\r\n }", "function registration() {\n\t\t//\n\t}", "private static function registration_email_event() {\n\t\treturn array( 'user_registration' );\n\t}", "function registrationAction()\n {\n $data = [\n 'message' => '',\n 'login' => $this->getView()->generateInput($this->loginInput),\n 'email' => $this->getView()->generateInput($this->emailInput),\n 'password' => $this->getView()->generateInput($this->passwordInput)\n ];\n\n if (isset($_POST['login']) && isset($_POST['email']) && isset($_POST['password'])) {\n $login = $_POST['login'];\n $email = $_POST['email'];\n $password = $_POST['password'];\n\n\n $valid = $this->getModel()->registration($login, $email, $password);\n if ($valid == 'true') {\n\n /*mail section*/\n\n $letter = new RegistrationEmail($email);//Creating object EmailSender\n\n $letter->send();//Sending Email with unique-link to user email\n $this->getModel()->putLink($letter->getUnique());//Unique part of link writing in DB table confirmationLinks\n\n /*end of mail section*/\n\n $this->view('content/registrationmessage');\n } else {\n $data = [\n 'login' => $this->getView()->generateInput($this->loginInput, $login),\n 'email' => $this->getView()->generateInput($this->emailInput, $email),\n 'password' => $this->getView()->generateInput($this->passwordInput, $password),\n 'message' => $this->getView()->generateMessage('Login/email is invalid or already taken.', 'danger')\n ];\n\n $this->view('content/registration', $data);\n }\n } else {\n $this->view('content/registration', $data);\n }\n }", "public function registerAction()\n {\n $this->view->render('front/auth', 'register');\n }", "function test(){\n\t//do_action('users_register_form');\n}", "public static function register(){\n add_action('admin_menu', [self::class, 'addMenu']);\n add_action('admin_init', [self::class, 'registerSettings']);\n //add_action('admin_enqueue_scripts', [self::class, 'registerScripts']);\n }", "public function doActions() {\n\t\t$action = $this->piVars['action'];\n\t\t\n\t\tif ($action == 'create') {\n\t\t\t// creates an array to be inserted into fe_users\n\t\t\tif (!empty($GLOBALS['TSFE']->fe_user->user)) {\n\t\t\t\t// incomplete data\n\t\t\t\t$this->errors[] = $this->pi_getLL('error_loggedIn');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$newUser = $this->fbApi->getPreparedUserFromFacebook($this->conf['feUserMapping.']);\n\t\t\t\n\t\t\tif (empty($newUser) || empty($newUser['username'])) {\n\t\t\t\t// incomplete data\n\t\t\t\t$this->errors[] = $this->pi_getLL('error_userIncomplete');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n\t\t\t\t'uid',\n\t\t\t\t'fe_users',\n\t\t\t\t'username like ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($newUser['username'], 'fe_users') . ' ' . $this->cObj->enableFields('fe_users'),\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t1\n\t\t\t);\n\t\t\t\n\t\t\tif (count($rows)) {\n\t\t\t\t// user already exists\n\t\t\t\t$this->errors[] = $this->pi_getLL('error_userExists');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('fe_users', $newUser);\n\t\t}\n\t}", "private function register_hooks(): void {\n\t\tadd_action( 'init', function() {\n\t\t\tif ( !aff_param_is_present() ) {\n\t\t\t\t// No param is set. Do nothing\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sponsor_id = get_sponsor_wpid_from_param();\n\t\t\tif ( $sponsor_id === NO_ID ) {\n\t\t\t\t// User doesn't exist. Do nothing\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tset_sponsor_cookie( $sponsor_id );\n\t\t\t}\n\t\t}, 10, 0 );\n\n\t\t// On user register, create sponsor relationship\n\t\tadd_action( 'user_register', function( $user_id ) {\n\t\t\t// Set user as affiliate\n\t\t\tif (Settings::instance()->get_auto_set_user_as_affiliate()) {\n\t\t\t\tset_user_as_affiliate( $user_id );\n\t\t\t\t$affiliated_by_this = true;\n\t\t\t}\n\n\t\t\t// Create sponsor relationship\n\t\t\tif (!uap_cookie_is_present()) {\n\t\t\t\t$sponsor_id = get_sponsor_wpid_from_cookie();\n\t\t\t\tif ( $sponsor_id !== NO_ID ) {\n\t\t\t\t\tset_sponsor_relationship( $user_id, $sponsor_id );\n\t\t\t\t\t$sponsor_set_by_this = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Generate log\n\t\t\t$affid = get_affid_by_id( $user_id );\n\t\t\t$sponsor = get_sponsor($user_id);\n\t\t\t$log_data = [\n\t\t\t\t'user_id' => $user_id,\n\t\t\t\t'affiliated' => !empty($affid),\n\t\t\t\t'user_affid' => $affid,\n\t\t\t\t'affiliated_by' => !empty($affiliated_by_this) ? 'mos-uap-fix' : 'uap',\n\t\t\t\t'sponsor_set' => !empty($sponsor),\n\t\t\t\t'sponsor_id' => $sponsor->ID ?? 0,\n\t\t\t\t'sponsor_set_by' => !empty($sponsor_set_by_this) ? 'mos-uap-fix' : 'uap',\n\t\t\t];\n\t\t\t$log_message = json_encode($log_data);\n\t\t\t$this->logger->log($log_message);\n\t\t}, 999, 1 );\n\t}", "public function action_register() {\r\n // Load reCaptcha if needed\r\n if(Kohana::config('useradmin')->captcha) {\r\n include Kohana::find_file('vendor', 'recaptcha/recaptchalib');\r\n $recaptcha_config = Kohana::config('recaptcha');\r\n $recaptcha_error = null;\r\n }\r\n // set the template title (see Controller_App for implementation)\r\n $this->template->title = __('User registration');\r\n // If user already signed-in\r\n if(Auth::instance()->logged_in() != false){\r\n // redirect to the user account\r\n Request::instance()->redirect('user/profile');\r\n }\r\n // Load the view\r\n $view = View::factory('user/register');\r\n // If there is a post and $_POST is not empty\r\n if ($_POST) {\r\n // Instantiate a new user\r\n $user = ORM::factory('user');\r\n // load values from $_POST\r\n $user->values($_POST);\r\n // optional checks (e.g. reCaptcha or some other additional check)\r\n $optional_checks = true;\r\n // if configured to use captcha, check the reCaptcha result\r\n if(Kohana::config('useradmin')->captcha) {\r\n $recaptcha_resp = recaptcha_check_answer($recaptcha_config['privatekey'],\r\n $_SERVER['REMOTE_ADDR'],\r\n $_POST['recaptcha_challenge_field'],\r\n $_POST['recaptcha_response_field']);\r\n if(!$recaptcha_resp->is_valid) {\r\n $optional_checks = false;\r\n $recaptcha_error = $recaptcha_resp->error;\r\n Message::add('error', __('The captcha text is incorrect, please try again.'));\r\n }\r\n }\r\n // If the post data validates using the rules setup in the user model\r\n if ($user->check() && $optional_checks) {\r\n // create the account\r\n $user->save();\r\n // Add the login role to the user (add a row to the db)\r\n $login_role = new Model_Role(array('name' =>'login'));\r\n $user->add('roles', $login_role);\r\n // sign the user in\r\n Auth::instance()->login($_POST['username'], $_POST['password']);\r\n // redirect to the user account\r\n Request::instance()->redirect('user/profile');\r\n } else {\r\n // Get errors for display in view\r\n // Note how the first param is the path to the message file (e.g. /messages/register.php)\r\n $view->set('errors', $user->validate()->errors('register'));\r\n // Pass on the old form values\r\n $_POST['password'] = $_POST['password_confirm'] = '';\r\n $view->set('defaults', $_POST);\r\n }\r\n }\r\n if(Kohana::config('useradmin')->captcha) {\r\n $view->set('captcha_enabled', true);\r\n $view->set('recaptcha_html', recaptcha_get_html($recaptcha_config['publickey'], $recaptcha_error));\r\n }\r\n $this->template->content = $view;\r\n }", "public function registered_users();", "function register(){\n \n // CALL register function from user_class create {connect to database and execute sql}\n \n // REQUIRE once register.html\n \n \n }", "function users_can_register_signup_filter()\n{\n}", "public function register()\n {\n Gate::define('Administrateur',function(User $user){\n return $user->isAdmin();\n });\n Gate::define('Professeur', function(User $user){\n return $user->isModerator();\n });\n Gate::define('Etudiant', function(User $user){\n return $user->isUser();\n });\n Gate::define('Control', function(User $user){\n return $user->isAdmin() || $user->isModerator() ? true : false;\n });\n }", "public function register()\r\n {\r\n add_action('admin_init', array($this, 'handleForm'));\r\n add_action('admin_init', array($this, 'handleDelete'));\r\n }", "public function action_register() {\n\t\t$reply = array('result' => false, 'reason' => '');\n\t\t$email = urldecode($this->request('email'));\t\t\t\t$reply['email'] = $email;\n\t\t$pass = urldecode($this->request('password'));\n\t\tif ($this->isTest($email)) {\n\t\t\t// Delete previous user if this is the test email address\n\t\t\t$user = $this->orm->get('user')->where('email',$email)->find();\n\t\t\twhile ($user->loaded()) {\n\t\t\t\t$this->db->query('delete')->table('companies_users_joins')->where('user_id',$user->id())->execute();\n\t\t\t\t$user->delete();\n\t\t\t\t$user = $this->orm->get('user')->where('email',$email)->find();\n\t\t\t}\n\t\t\t// Clean up ghost users (we need to find out who's making these - google robot?)\n\t\t\t$this->db->query('delete')->table('users')->where('email',null)->execute();\n\t\t}\n\t\t$user = $this->orm->get('user')->where('email',$email)->find();\n\t\tif ($user->loaded()) {\n\t\t\t$reply['result'] = false;\n\t\t\t$reply['reason'] = 'already exists';\n\t\t}\n\t\telse if (strlen($email)>0) {\n\t\t\t$at = strpos($email,'@');\n\t\t\tif (($at != false) && ($at > 0) && ($at < (strlen($email)-1))) {\n\t\t\t\t$auth = $this->auth->provider('password');\n\t\t\t\t// Create a new user\n\t\t\t\t$user = $this->orm->get('user');\n\t\t\t\t$user->email = $email;\n\t\t\t\t$user->password = $auth->hash_password($pass);\n\t\t\t\t$user->level_id = 1;\n\t\t\t\t$user->country_id = 7;\n\t\t\t\t$user->save();\n\t\t\t\t// Select some companies for alerts\n\t\t\t\tif ($auth->login($email,$pass)) {\n\t\t\t\t\t$reply['result'] = true;\n\t\t\t\t\t$reply['reason'] = 'register OK';\n\t\t\t\t\t$reply['url'] = '/user/';\n\t\t\t\t\t$ibex = $this->db->query('select')\n\t\t\t\t\t\t->table('companies')\n\t\t\t\t\t\t->where('index_id',$user->country_id)\n\t\t\t\t\t\t->where('top10',1)\n\t\t\t\t\t\t->execute()->as_array();\n\t\t\t\t\tforeach ($ibex as $i) {\n\t\t\t\t\t\t$this->db->query('insert')\n\t\t\t\t\t\t\t->table('companies_users_joins')\n\t\t\t\t\t\t\t->data(array(\n\t\t\t\t\t\t\t\t'user_id' => $user->id(),\n\t\t\t\t\t\t\t\t'company_id' => $i->id\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t->execute();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->ajax_reply($reply);\n\t}", "public function postRegister() {\n $user->attributes=$_POST[\"User\"];\n $user->activkey = md5($user->email).\"-\".uniqid();\n if(!$user->save()) {\n $this->render(\"register\",[\"model\"=>$user]);\n } else {\n $this->render(\"register_success\",[\"model\"=>$user]);\n }\n }", "function CB_onAfterUserRegistration($row, $param2, $param3)\r\n\t{\r\n\t\t$dispatcher =& JDispatcher::getInstance();\r\n\t\t$dispatcher->trigger('CB2Joomla', array('CBonAfterUserRegistration', $row->_cmsUser, '1'));\r\n\t}", "public function registerAction(): void\n {\n $vars = [];\n if ($_POST) {\n $register = new Register($_POST);\n $notice = $register->signUp($this->auth, $this->user);\n if ($notice['error']) {\n $vars = [\n 'error' => $notice['error'],\n ];\n } else {\n $vars = [\n 'user' => $notice['user'],\n ];\n }\n }\n $this->view->render('Sign Up Page', $vars, true);\n }", "public static function migrate_registration_actions_to_2( $form ) {\n\t\t$register_action = FrmFormAction::get_action_for_form( $form->id, 'register', 1 );\n\n\t\tif ( $register_action ) {\n\t\t\tself::create_user_email_action( $form, $register_action );\n\t\t\tself::create_admin_email_action( $form );\n\t\t\tself::update_action_for_2( $register_action );\n\t\t}\n\t}", "public function register()\n\t{\n\n\t \n\t\tif ($this->current_user)\n\t\t{\n\t\t\t$this->session->set_flashdata('notice', lang('user:already_logged_in'));\n\t\t\tredirect();\n\t\t}\n\n\t\t/* show the disabled registration message */\n\t\tif ( ! Settings::get('enable_registration'))\n\t\t{\n\t\t\t$this->template\n\t\t\t\t->title(lang('user:register_title'))\n\t\t\t\t->build('disabled');\n\t\t\treturn;\n\t\t}\n\n\t\t// Validation rules\n\t\t$validation = array(\n\t\t\tarray(\n\t\t\t\t'field' => 'password',\n\t\t\t\t'label' => lang('global:password'),\n\t\t\t\t'rules' => 'required|min_length['.$this->config->item('min_password_length', 'ion_auth').']|max_length['.$this->config->item('max_password_length', 'ion_auth').']'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'email',\n\t\t\t\t'label' => lang('global:email'),\n\t\t\t\t'rules' => 'required|max_length[60]|valid_email|callback__email_check',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'username',\n\t\t\t\t'label' => lang('user:username'),\n\t\t\t\t'rules' => Settings::get('auto_username') ? '' : 'required|alpha_dot_dash|min_length[3]|max_length[20]|callback__username_check',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'field' => 'agb',\n\t\t\t\t'label' => 'Gesch&auml;ftsbedingungen',\n\t\t\t\t'rules' => 'required',\n\t\t\t),\n\n\t\t);\n\n\t\t// --------------------------------\n\t\t// Merge streams and users validation\n\t\t// --------------------------------\n\t\t// Why are we doing this? We need\n\t\t// any fields that are required to\n\t\t// be filled out by the user when\n\t\t// registering.\n\t\t// --------------------------------\n\n\t\t// Get the profile fields validation array from streams\n\t\t$this->load->driver('Streams');\n\t\t$profile_validation = $this->streams->streams->validation_array('profiles', 'users');\n\n\t\t// Remove display_name\n\t\tforeach ($profile_validation as $key => $values)\n\t\t{\n\t\t\tif ($values['field'] == 'display_name')\n\t\t\t{\n\t\t\t\tunset($profile_validation[$key]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Set the validation rules\n\t\t$this->form_validation->set_rules(array_merge($validation, $profile_validation));\n\n\t\t// Get user profile data. This will be passed to our\n\t\t// streams insert_entry data in the model.\n\t\t$assignments = $this->streams->streams->get_assignments('profiles', 'users');\n\n\t\t// This is the required profile data we have from\n\t\t// the register form\n\t\t$profile_data = array();\n\n\t\t// Get the profile data to pass to the register function.\n\t\tforeach ($assignments as $assign)\n\t\t{\n\t\t\tif ($assign->field_slug != 'display_name')\n\t\t\t{\n\t\t\t\tif (isset($_POST[$assign->field_slug]))\n\t\t\t\t{\n\t\t\t\t\t$profile_data[$assign->field_slug] = escape_tags($this->input->post($assign->field_slug));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------\n\n\t\t// Set the validation rules\n\t\t$this->form_validation->set_rules($validation);\n\n\t\t$user = new stdClass();\n\n\t\t// Set default values as empty or POST values\n\t\tforeach ($validation as $rule)\n\t\t{\n\t\t\t$user->{$rule['field']} = $this->input->post($rule['field']) ? escape_tags($this->input->post($rule['field'])) : null;\n\t\t}\n\n\t\t// Are they TRYing to submit?\n\t\tif ($_POST)\n\t\t{\n\t\t\tif ($this->form_validation->run())\n\t\t\t{\n\t\t\t\t// Check for a bot usin' the old fashioned\n\t\t\t\t// don't fill this input in trick.\n\t\t\t\tif (escape_tags($this->input->post('d0ntf1llth1s1n')) !== ' ')\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('error', lang('user:register_error'));\n\t\t\t\t\tredirect(current_url());\n\t\t\t\t}\n\n\t\t\t\t$email = escape_tags($this->input->post('email'));\n\t\t\t\t$password = escape_tags($this->input->post('password'));\n\n\t\t\t\t// --------------------------------\n\t\t\t\t// Auto-Username\n\t\t\t\t// --------------------------------\n\t\t\t\t// There are no guarantees that we \n\t\t\t\t// will have a first/last name to\n\t\t\t\t// work with, so if we don't, use\n\t\t\t\t// an alternate method.\n\t\t\t\t// --------------------------------\n\n\t\t\t\tif (Settings::get('auto_username'))\n\t\t\t\t{\n\t\t\t\t\tif ($this->input->post('first_name') and $this->input->post('last_name'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->load->helper('url');\n\t\t\t\t\t\t$username = url_title(escape_tags($this->input->post('first_name')).'.'.escape_tags($this->input->post('last_name')), '-', true);\n\n\t\t\t\t\t\t// do they have a long first name + last name combo?\n\t\t\t\t\t\tif (strlen($username) > 19)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// try only the last name\n\t\t\t\t\t\t\t$username = url_title(escape_tags($this->input->post('last_name')), '-', true);\n\n\t\t\t\t\t\t\tif (strlen($username) > 19)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// even their last name is over 20 characters, snip it!\n\t\t\t\t\t\t\t\t$username = substr($username, 0, 20);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// If there is no first name/last name combo specified, let's\n\t\t\t\t\t\t// user the identifier string from their email address\n\t\t\t\t\t\t$email_parts = explode('@', $email);\n\t\t\t\t\t\t$username = $email_parts[0];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Usernames absolutely need to be unique, so let's keep\n\t\t\t\t\t// trying until we get a unique one\n\t\t\t\t\t$i = 1;\n\n\t\t\t\t\t$username_base = $username;\n\n\t\t\t\t\twhile ($this->db->where('username', $username)\n\t\t\t\t\t\t->count_all_results('users') > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// make sure that we don't go over our 20 char username even with a 2 digit integer added\n\t\t\t\t\t\t$username = substr($username_base, 0, 18).$i;\n\n\t\t\t\t\t\t++$i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The user specified a username, so let's use that.\n\t\t\t\t\t$username = escape_tags($this->input->post('username'));\n\t\t\t\t}\n\n\t\t\t\t// --------------------------------\n\n\t\t\t\t// Do we have a display name? If so, let's use that.\n\t\t\t\t// Othwerise we can use the username.\n\t\t\t\tif ( ! isset($profile_data['display_name']) or ! $profile_data['display_name'])\n\t\t\t\t{\n\t\t\t\t\t$profile_data['display_name'] = $username;\n\t\t\t\t}\n\n\t\t\t\t// We are registering with a null group_id so we just\n\t\t\t\t// use the default user ID in the settings.\n\t\t\t\t$id = $this->ion_auth->register($username, $password, $email, $this->affiliate_group_id, $profile_data);\n\n\t\t\t\t// Try to create the user\n\t\t\t\tif ($id > 0)\n\t\t\t\t{\n\t\t\t\t\t// Convert the array to an object\n\t\t\t\t\t$user->username = $username;\n\t\t\t\t\t$user->display_name = $username;\n\t\t\t\t\t$user->email = $email;\n\t\t\t\t\t$user->password = $password;\n\n\t\t\t\t\t// trigger an event for third party devs\n\t\t\t\t\tEvents::trigger('post_user_register', $id);\n\n\t\t\t\t\t/* send the internal registered email if applicable */\n\t\t\t\t\tif (Settings::get('registered_email'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->load->library('user_agent');\n\n\t\t\t\t\t\tEvents::trigger('email', array(\n\t\t\t\t\t\t\t'name' => $user->display_name,\n\t\t\t\t\t\t\t'sender_ip' => $this->input->ip_address(),\n\t\t\t\t\t\t\t'sender_agent' => $this->agent->browser().' '.$this->agent->version(),\n\t\t\t\t\t\t\t'sender_os' => $this->agent->platform(),\n\t\t\t\t\t\t\t'slug' => 'registered',\n\t\t\t\t\t\t\t'email' => Settings::get('contact_email'),\n\t\t\t\t\t\t), 'array');\n\t\t\t\t\t}\n\n\t\t\t\t\t// show the \"you need to activate\" page while they wait for their email\n\t\t\t\t\tif ((int)Settings::get('activation_email') === 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->session->set_flashdata('notice', $this->ion_auth->messages());\n\t\t\t\t\t\tredirect('users/activate');\n\t\t\t\t\t}\n\t\t\t\t\t// activate instantly\n\t\t\t\t\telseif ((int)Settings::get('activation_email') === 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ion_auth->activate($id, false);\n\n\t\t\t\t\t\t$this->ion_auth->login(escape_tags($this->input->post('email')), escape_tags($this->input->post('password')));\n\t\t\t\t\t\tredirect($this->config->item('register_redirect', 'ion_auth'));\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$this->ion_auth->deactivate($id);\n\n\t\t\t\t\t\t/* show that admin needs to activate your account */\n\t\t\t\t\t\t$this->session->set_flashdata('notice', lang('user:activation_by_admin_notice'));\n\t\t\t\t\t\tredirect('users/register'); /* bump it to show the flash data */\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Can't create the user, show why\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->template->error_string = $this->ion_auth->errors();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Return the validation error\n\t\t\t\t$this->template->error_string = $this->form_validation->error_string();\n\t\t\t}\n\t\t}\n\n\t\t// Is there a user hash?\n\t\telse {\n\t\t\tif (($user_hash = $this->session->userdata('user_hash')))\n\t\t\t{\n\t\t\t\t// Convert the array to an object\n\t\t\t\t$user->email = ( ! empty($user_hash['email'])) ? $user_hash['email'] : '';\n\t\t\t\t$user->username = $user_hash['nickname'];\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------\n\t\t// Create profile fields.\n\t\t// --------------------------------\n\n\t\t// Anything in the post?\n\n\t\t$this->template->set('profile_fields', $this->streams->fields->get_stream_fields('profiles', 'users', $profile_data));\n\n\t\t// --------------------------------\n\n\t\t$this->template\n\t\t\t->title(lang('user:register_title'))\n\t\t\t->set('_user', $user)\n\t\t\t->build('affiliate/register');\n\t}", "private static function create_user_email_action( $form, $register_action ) {\n\n\t\t// Only create email action if frm_send_new_user_notification returns true and reg_email_send is set\n\t\tif ( ! isset( $register_action->post_content['reg_email_sender'] ) ||\n\t\t\tapply_filters( 'frm_send_new_user_notification', true, $form, 0, $register_action ) !== true ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$title = __( 'Email Notification', 'frmreg' );\n\t\t$post_content = self::generate_post_content_for_user_email( $form->id, $register_action );\n\n\t\treturn self::create_email_action( $form, $post_content, $title );\n\t}", "public function register() {\n\t\tif( $this->getString( \"register_submit\" ) ) {\n\t\t\t$result = $this->registerUser();\n\t\t\t\n\t\t\t//if succesfull, show the Registrationcomplete view\n\t\t\t//else show the form with the faulty entered data\n\t\t\tif( $result === true ) {\n\t\t\t\t$this->view = new Views_User_Registrationcomplete();\n\t\t\t} elseif( is_array( $result ) ) {\n\t\t\t\t$this->view = new Views_User_Registrationform();\n\t\t\t\t$this->view->formresult = $result;\n\t\t\t} else {\n\t\t\t\t//if the script reaches this point, something whent wrong\n\t\t\t\t//while saving the user\n\t\t\t\t$this->view = new Views_Error_Internal();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->view = new Views_User_Registrationform();\n\t\t}\n\t\t\n\t $this->display();\n\t}", "public function registration()\n\t{\n\t\t//cast to userid to int\n\t\t$userID = intval(Session::get('userID'));\n\t\t$userProjects = $this->model->getUserProjects($userID);\n\n\t\tforeach ($userProjects as $project) {\n\t\t\t$data['projects'][] = ['id' => $project->project_id, 'name' => $project->name];\n\t\t}\n\n\t\t$data['title'] = 'Uren Registratie';\n\t\t$data['employeeName'] = 'Beau ter Ham';\n\n\t\tView::renderTemplate('header', $data);\n\t\tView::render('hours/registration', $data);\n\t\tView::renderTemplate('footer', $data);\n\n\t}", "public static function register(){\n add_action('admin_menu', [self::class, 'addMenu']);\n add_action('admin_init', [self::class, 'registerSettings']);\n }", "function register() {\r\n if ($this->request->is('post')) {\r\n switch ($this->request->data('User.Type')) {\r\n case User::_TYPE_STUDENT:\r\n return $this->redirect(array(\r\n 'controller' => 'students',\r\n 'action' => 'register',\r\n ));\r\n break;\r\n\r\n case User::_TYPE_TEACHER:\r\n return $this->redirect(array(\r\n 'controller' => 'teachers',\r\n 'action' => 'register',\r\n ));\r\n break;\r\n }\r\n }\r\n }", "public static function register() {\n\t\t/**\n\t\t * Include anything we need that relies on admin classes/functions\n\t\t */\n\t\tinclude_once dirname( __FILE__ ) . '/class-listtable.php';\n\n\t\t$hook = add_users_page(\n\t\t\t__( 'Registered OAuth Applications', 'rest_oauth2' ),\n\t\t\t_x( 'Applications', 'menu title', 'rest_oauth2' ),\n\t\t\t'list_users',\n\t\t\tself::BASE_SLUG,\n\t\t\t[ get_class(), 'dispatch' ]\n\t\t);\n\n\t\tadd_action( 'load-' . $hook, [ get_class(), 'load' ] );\n\t}", "public function onUserRegisterSuccess(Sabai_User_Identity $identity)\n {\n $stat = $this->_getStatByIdentity($identity);\n foreach (array('last_edit', 'last_edit_email', 'last_edit_password', 'last_edit_image') as $stat_type) {\n $stat->$stat_type = time();\n }\n $stat->commit();\n\n // Send user registration complete email\n $mail_sender = $this->_application->getPlugin('Mail')->getSender();\n $replacements = array(\n '{SITE_NAME}' => $site_name = $this->_application->SiteName(),\n '{SITE_URL}' => $this->_application->SiteUrl(),\n '{USER_NAME}' => $identity->username,\n '{USER_EMAIL}'=> $identity->email,\n '{LOGIN_LINK}' => $this->getUrl(),\n '{IP}' => getip(),\n );\n // Send to site admin\n $subject = strtr($this->getConfig('register_complete_admin_email_subject'), $replacements);\n $body = strtr($this->getConfig('register_complete_admin_email_body'), $replacements);\n $mail_sender->mailSend($this->_application->SiteEmail(), $subject, $body);\n\n if ($this->getConfig('register_complete_email', 'enable')) {\n // Send to registered user\n $subject = strtr($this->getConfig('register_complete_email', 'subject'), $replacements);\n $body = strtr($this->getConfig('register_complete_email', 'body'), $replacements);\n $mail_sender->mailSend($identity->email, $subject, $body);\n }\n }", "public function registrationAction()\n {\n $User = new User();\n $flag = false;\n \n if(isset($_POST['register'])){\n $User->setAttributes($_POST['register']);\n \n if($User->registerUser()) {\n $flag = true;\n }\n }\n \n $this->renderView('registration', array('user' => $User, 'flag' => $flag));\n \n return true;\n }", "public function registeruserAction()\n {\n \t$siteurl = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'] .$this->view->baseUrl();\n \t\n \t\n \t$this->view->loginStatus = $this->isLoggedIn();\n \t$translate = Zend_Registry::get('Zend_Translate');\n \n \t//if($this->view->loginStatus == 1)\n \t//$this->view->memberStatus = $this->checkUserMembership();\n \t\n \t$fitnessGeneral = new FitnessUserGeneral();\n \t$fitnessMembership = new FitnessUserMembership();\n \t\n \t$userArray = array();\n \t$usermemberArray = array();\n \t\n \t\n \tif ($this->_request->isPost()) \n\t\t{\n\t\t\t$userArray['user_first_name'] = $this->_request->getPost('user_first_name');\n\t\t\t$userArray['user_surname'] = \"\";\n\t\t\t\n\t\t\t$userArray['user_email'] = $this->_request->getPost('user_email');\n\t\t\t$userArray['user_username'] = $this->_request->getPost('user_username');\n\t\t\t$userArray['user_password'] = md5($this->_request->getPost('user_password'));\n\t\t\t$userArray['user_level'] = $this->_request->getPost('user_level');\n\t\t\t$userArray['user_type'] = 1;\n\t\t\t$userArray['user_status'] = 0;\n\t\t\t\n\t\t\t//check if username exists\n\t\t\t//$checkRecords = $fitnessGeneral->checkRecordExists($this->_request->getPost('user_username'));\n\t\t\t$checkRecords = $fitnessGeneral->checkRecordExists($this->_request->getPost('user_username'));\n\t\t\t$checkRecordsEmail = $fitnessGeneral->checkEmailExists($this->_request->getPost('user_email'));\n\t\t\t\n\t\t/*if(($checkRecords['count'] > 0) || ($checkRecordsEmail['count'] > 0))\n\t\t\t{\n\t\t\t\tif(($checkRecords['count'] > 0) && ($checkRecordsEmail['count'] == 0))\n\t\t\t\t\t{\n\t\t\t\t\t $this->view->errormsg = $translate->translate(\"Username exists. Please enter another one.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(($checkRecords['count'] == 0) && ($checkRecordsEmail['count'] > 0))\n\t\t\t\t\t{\n\t\t\t\t\t $this->view->uname = $this->_request->getPost('user_username');\n\t\t\t\t\t $this->view->errormsg = $translate->translate(\"An account for this email already exists.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(($checkRecords['count'] > 0) && ($checkRecordsEmail['count'] > 0))\n\t\t\t\t\t{\n\t\t\t\t\t \n\t\t\t\t\t $this->view->errormsg = $translate->translate(\"Email/Username exists. Please enter another one.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->view->fname = $this->_request->getPost('user_first_name');\n\t\t\t\t$this->view->surname = $this->_request->getPost('user_surname');\n\t\t\t\t$this->view->dob = $this->_request->getPost('user_dob');\n\t\t\t\t$this->view->gender = $this->_request->getPost('user_gender');\n\t\t\t\t$this->view->email = $this->_request->getPost('user_email');\n\t\t\t\t$this->view->level = $this->_request->getPost('user_level');\n\t\t\t}*/\t\n\t\t\t\n\t\tif(($checkRecords['count'] > 0))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t $this->view->errormsg = $translate->translate(\"Username exists. Please enter another one.\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t$this->view->fname = $this->_request->getPost('user_first_name');\n\t\t\t\t$this->view->surname = \"\";\n\t\t\t\t$this->view->dob = $this->_request->getPost('user_dob');\n\t\t\t\t$this->view->gender = $this->_request->getPost('user_gender');\n\t\t\t\t$this->view->email = $this->_request->getPost('user_email');\n\t\t\t\t$this->view->level = $this->_request->getPost('user_level');\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\t$fitnessGeneral->addData($userArray);\n\t\t\t\t$getLastUserId = $fitnessGeneral->getLastUserId();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//record for membership table\n\t\t\t\t$usermemberArray['user_id'] = $getLastUserId['user_id'];\n\t\t\t\t$usermemberArray['user_status'] = 1;\n\t\t\t\t$usermemberArray['trial'] = 0;\n\t\t\t\t$usermemberArray['trial_period'] = 0;\n\t\t\t\t$usermemberArray['membership_plan']= '';\n\t\t\t\t$usermemberArray['membership_validity_date'] = '';\n\t\t\t\t$usermemberArray['registration_date'] = date('Y-m-d');\n\t\t\t\t$usermemberArray['upgrade_date'] = '';\n\t\t\t\t\n\t\t\t\t$fitnessMembership->addData($usermemberArray);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($getLastUserId['user_id'] !=\"\")\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t //send confirmation mail\n\t\t\t\t\t $siteUrl = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'] .$this->view->baseUrl().\"/index/confirm/rec/\".$this->_request->getPost('user_username').\"/conf/\".base64_encode($this->_request->getPost('user_password'));\n\t\t\t\t\t\t$logoUrl = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'] .$this->view->baseUrl().\"/public/new/images/logo.jpg\";\n\t\t\t\t\t \n\t\t\t\t\t\t // To send HTML mail, the Content-type header must be set\n$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n$headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n\n// Additional headers\n$headers .= 'From: Fitness4me<info@fitness4.me>' . \"\\r\\n\";\n$headers .= 'Reply-To:Fitness4me<info@fitness4.me>'. \"\\r\\n\";\n\n\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$to = $this->_request->getPost('user_email');\n\t\t\t\t\t\t$from = \"info@fitness4.me\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$subject = \"Welcome to fitness4.me\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$defaultLang = $this->getDefaultLanguage();\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($defaultLang == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$body = \"Dear \".$this->_request->getPost('user_first_name').\"\" . \"<br/><br/>\";\n\t\t\t\t\t\t\t$body .= \"Welcome to fitness4.me.<br/>\";\n\t\t\t\t\t\t\t$body .= \"Our experts have developed exciting and efficient workouts, with the sole purpose of helping YOU achieve your goals.<br/>\";\n\t\t\t\t\t\t\t$body .= \"And in a few minutes you will have access to them on your smartphone, tablet or PC.<br/>\n\t EXERCISE ANYWHERE ANYTIME!<br/><br/>\";\n\t $body .= \"You are just one step away from getting started.<br/>\";\n\t\t\t\t\t\t\t$body .= \"Please click this link and you are ready to go:<br/><br/>\";\n\t $body .= \"<a href='$siteUrl'>Click here</a><br/>\"; \n\t\t\t\t\t\t\t$body .= \"See you on the web!<br/><br/>\";\n\t\t\t\t\t\t\t$body .= \"<img src='$logoUrl' /><br/><br/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$body = \"Hallo \".$this->_request->getPost('user_first_name').\"\" . \"<br/><br/>\";\n\t\t\t\t\t\t\t$body .= \"Willkommen bei fitness4.me.<br/>\";\n\t\t\t\t\t\t\t$body .= \"Unsere Experten haben aufregende und effektive Workouts entwickelt – mit dem alleinigen Zweck, dich beim Erreichen deiner Ziele zu unterstützen.<br/>\";\n\t\t\t\t\t\t\t$body .= \"In wenigen Minuten wirst du darauf zugreifen können - über dein Smartphone, deinen Tablet oder PC.<br/>\n\t DEIN TRAINING – WANN DU WILLST, WO DU WILLST!<br/><br/>\";\n\t $body .= \"Du bist nur einen Schritt davon entfernt, endlich loszustarten.<br/>\";\n\t\t\t\t\t\t\t$body .= \"Bitte klicke auf diesen Link und schon kannst du beginnen:<br/><br/>\";\n\t $body .= \"<a href='$siteUrl'>Klicke hier</a><br/>\"; \n\t\t\t\t\t\t\t$body .= \"Wir sehen uns im Web!<br/><br/>\";\n\t\t\t\t\t\t\t$body .= \"<img src='$logoUrl' /><br/><br/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$message = mb_convert_encoding($body,\"UTF-8\");\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tmail($to,$subject,$body,$headers);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\t$this->_redirect('/index/thankyou');\n\t\t\t}\n\t\t\t\n\t\t}\n }", "function registerAction(){\n\t\t$form = $this->getRegisterForm();\n\t\tif( $_POST ){\n\t\t\t$form->addFilter('post_validate_data', function( Form $form ){\n\t\t\t\t$fields = $form->getFields();\n\t\t\t\t$user = new Users();\n\t\t\t\t$user->email = $fields['email']->default;\n\t\t\t\t$user = $user->getByEmail();\n\n\t\t\t\t$isValid = true;\n\t\t\t\tif( isset($user[0]) ){\n\t\t\t\t\t$isValid = false;\n\t\t\t\t\t$fields['email']->addError('The email is already registered');\n\t\t\t\t}\n\t\t\t\treturn $isValid;\n\t\t\t});\n\n\t\t\t$form->submit();\n\n\t\t\tif( $form->isValid() ){\n\t\t\t\t$fields = $form->getFields();\n\t\t\t\t$user = new Users();\n\t\t\t\t$password = new Password();\n\t\t\t\t$user->email = $fields['email']->default;\n\t\t\t\t$user->password = $password->make( $fields['password']->default );\n\t\t\t\t$userId = $user->add();\n\n\t\t\t\tif( $userId !== false ){\n\t\t\t\t\t$mail = new OrangeEmail;\n\t\t\t\t\t$mail->Subject = 'Please, confirm your email';\n\t\t\t\t\t$mail->Body = Template::getView( 'orange/emails/confirm_email.html.twig', array( 'token' => TokenController::get( '3', '100 years', $userId ) ) );\n\t\t\t\t\t$mail->addAddress( $fields['email']->default );\n\t\t\t\t\t$mail->AddEmbeddedImage( Template::$pathTemplate.'/images/email-banner.jpg', 'banner', Template::$urlTemplate.'/images/email-banner.jpg', 'base64', 'image/jpeg' );\n\t\t\t\t\t$r = $mail->send();\n\n\t\t\t\t\tif( $r ){\n\t\t\t\t\t\tNoticesController::add( 'account_was_created', 'success' );\n\t\t\t\t\t\toRedirect( URL.'questionnaire' );\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$form->addNotice( 'There was an error to send email to confirm email', 'danger' );\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$form->addNotice( 'There was an error to register user', 'danger' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tself::renderRegister( $form );\n\t}", "public function actionRegistration()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n return $this->render('//registration');\n }", "function newUser($action) {\n\n\t\tglobal $page;\n\t\t$page->addLog(\"user->newUser: initiated\");\n\n\t\t// only attempt user creation if signups are allowed for this site\n\t\tif(defined(\"SITE_SIGNUP\") && SITE_SIGNUP) {\n\n\t\t\t// Get posted values to make them available for models\n\t\t\t$this->getPostedEntities();\n\t\t\t$terms = $this->getProperty(\"terms\", \"value\");\n\t\t\t$email = $this->getProperty(\"email\", \"value\");\n\n\n\t\t\t// if user already exists, return error\n\t\t\tif(!$terms) {\n\t\t\t\t$page->addLog(\"user->newUser: missing terms agreement\");\n\t\t\t\treturn array(\"status\" => \"MISSING_TERMS\");\n\t\t\t}\n\n\n\t\t\t// if user already exists, return error\n\t\t\tif($this->userExists(array(\"email\" => $email))) {\n\t\t\t\t$page->addLog(\"user->newUser: user exists ($email)\");\n\t\t\t\treturn array(\"status\" => \"USER_EXISTS\");\n\t\t\t}\n\n\n\t\t\t// does values validate - minimum is email\n\t\t\tif(count($action) == 1 && $this->validateList(array(\"email\")) && $email) {\n\n\t\t\t\t$query = new Query();\n\t\t\t\t$nickname = $this->getProperty(\"nickname\", \"value\");\n\t\t\t\t$firstname = $this->getProperty(\"firstname\", \"value\");\n\t\t\t\t$lastname = $this->getProperty(\"lastname\", \"value\");\n\n\n\t\t\t\t// get entities for current value\n\t\t\t\t$entities = $this->getModel();\n\t\t\t\t$names = array();\n\t\t\t\t$values = array();\n\n\t\t\t\tforeach($entities as $name => $entity) {\n\t\t\t\t\tif($entity[\"value\"] !== false && preg_match(\"/^(nickname|firstname|lastname|language)$/\", $name)) {\n\t\t\t\t\t\t$names[] = $name;\n\t\t\t\t\t\t$values[] = $name.\"='\".$entity[\"value\"].\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no nickname were posted, use email\n\t\t\t\tif(!$nickname) {\n\t\t\t\t\tif($firstname && $lastname) {\n\t\t\t\t\t\t$nickname = $firstname . \" \" . $lastname;\n\t\t\t\t\t}\n\t\t\t\t\telse if($firstname) {\n\t\t\t\t\t\t$nickname = $firstname;\n\t\t\t\t\t}\n\t\t\t\t\telse if($lastname) {\n\t\t\t\t\t\t$nickname = $lastname;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$nickname = $email;\n\t\t\t\t\t}\n\n\t\t\t\t\t$values[] = \"nickname='\".$nickname.\"'\";\n\t\t\t\t\t$quantity = $this->getProperty(\"quantity\", \"value\");\n\t\t\t\t\t$item_id = $this->getProperty(\"item_id\", \"value\");\n\t\t\t\t}\n\n\t\t\t\t// add member user group\n\t\t\t\t$values[] = \"user_group_id=2\";\n\n\n\t\t\t\t$sql = \"INSERT INTO \".$this->db.\" SET \" . implode(\",\", $values);\n\t\t\t\t// print $sql.\"<br>\\n\";\n\t\t\t\tif($query->sql($sql)) {\n\n\t\t\t\t\t$user_id = $query->lastInsertId();\n\n\n\t\t\t\t\t// Gererate verification code\n\t\t\t\t\t$verification_code = randomKey(8);\n\n\t\t\t\t\t// add email to user_usernames\n\t\t\t\t\t$sql = \"INSERT INTO $this->db_usernames SET username = '$email', verified = 0, verification_code = '$verification_code', type = 'email', user_id = $user_id\";\n\t\t\t\t\t// print $sql.\"<br>\\n\";\n\t\t\t\t\tif($query->sql($sql)) {\n\n\n\t\t\t\t\t\t$mobile = $this->getProperty(\"mobile\", \"value\");\n\t\t\t\t\t\tif($mobile) {\n\t\t\t\t\t\t\t$sql = \"INSERT INTO $this->db_usernames SET username = '$mobile', verified = 1, verification_code = '$verification_code', type = 'mobile', user_id = $user_id\";\n\t\t\t//\t\t\t\tprint $sql;\n\t\t\t\t\t\t\t$query->sql($sql);\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// user can send password on signup\n\t\t\t\t\t\t$raw_password = $this->getProperty(\"password\", \"value\");\n\t\t\t\t\t\t$mail_password = \"******** (password is encrypted)\";\n\n\t\t\t\t\t\t// if raw password was not sent - set temp password and include it in activation email\n\t\t\t\t\t\tif(!$raw_password || $raw_password == \"Password\") {\n\t\t\t\t\t\t\t// add temp password\n\t\t\t\t\t\t\t$raw_password = randomKey(8);\n\t\t\t\t\t\t\t$mail_password = $raw_password.\" (autogenerated password)\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// encrypt password\n\t\t\t\t\t\t$password = password_hash($raw_password, PASSWORD_DEFAULT);\n\t\t\t\t\t\t$sql = \"INSERT INTO \".$this->db_passwords.\" SET user_id = $user_id, password = '$password'\";\n\t\t\t\t\t\t// password added successfully\n\t\t\t\t\t\tif($query->sql($sql)) {\n\n\t\t\t\t\t\t\t// store signup email for receipt page\n\t\t\t\t\t\t\tsession()->value(\"signup_email\", $email);\n\n\n\n\t\t\t\t\t\t\t// VERIFICATION EMAIL\n\n\t\t\t\t\t\t\t// add log\n\t\t\t\t\t\t\t$page->addLog(\"user->newUser: created: \" . $email . \", user_id:$user_id\");\n\n\t\t\t\t\t\t\t// success\n\t\t\t\t\t\t\t// send activation email\n\t\t\t\t\t\t\tif($verification_code) {\n\n\t\t\t\t\t\t\t\t// send verification email to user\n\t\t\t\t\t\t\t\tmailer()->send(array(\n\t\t\t\t\t\t\t\t\t\"values\" => array(\n\t\t\t\t\t\t\t\t\t\t\"NICKNAME\" => $nickname, \n\t\t\t\t\t\t\t\t\t\t\"EMAIL\" => $email, \n\t\t\t\t\t\t\t\t\t\t\"VERIFICATION\" => $verification_code,\n\t\t\t\t\t\t\t\t\t\t\"PASSWORD\" => $mail_password\n\t\t\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t\t\t\"track_clicks\" => false,\n\t\t\t\t\t\t\t\t\t\"recipients\" => $email, \n\t\t\t\t\t\t\t\t\t\"template\" => \"signup\"\n\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t\t// send notification email to admin\n\t\t\t\t\t\t\t\tmailer()->send(array(\n\t\t\t\t\t\t\t\t\t\"subject\" => SITE_URL . \" - New User: \" . $email, \n\t\t\t\t\t\t\t\t\t\"message\" => \"Check out the new user: \" . SITE_URL . \"/janitor/admin/user/edit/\" . $user_id, \n\t\t\t\t\t\t\t\t\t\"tracking\" => false\n\t\t\t\t\t\t\t\t\t// \"template\" => \"system\"\n\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// error\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// send error email notification\n\t\t\t\t\t\t\t\tmailer()->send(array(\n\t\t\t\t\t\t\t\t\t\"recipients\" => $email, \n\t\t\t\t\t\t\t\t\t\"template\" => \"signup_error\"\n\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t\t// send notification email to admin\n\t\t\t\t\t\t\t\tmailer()->send(array(\n\t\t\t\t\t\t\t\t\t\"subject\" => \"New User created ERROR: \" . $email, \n\t\t\t\t\t\t\t\t\t\"message\" => \"Check out the new user: \" . SITE_URL . \"/janitor/admin/user/edit/\" . $user_id, \n\t\t\t\t\t\t\t\t\t\"tracking\" => false\n\t\t\t\t\t\t\t\t\t// \"template\" => \"system\"\n\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t// Update session values (to allow user to complete signup)\n\t\t\t\t\t\t\tsession()->value(\"user_id\", $user_id);\n\t\t\t\t\t\t\tsession()->value(\"user_nickname\", $nickname);\n\n\t\t\t\t\t\t\t// but also reset user group\n\t\t\t\t\t\t\t// - in case another user was already logged in before signup started\n\t\t\t\t\t\t\tsession()->value(\"user_group_id\", 1);\n\n\n\n\t\t\t\t\t\t\t// TERMS\n\n\t\t\t\t\t\t\t// Add terms agreement\n\t\t\t\t\t\t\t$this->acceptedTerms();\n\n\n\n\t\t\t\t\t\t\t// MAILLIST\n\n\t\t\t\t\t\t\t// maillist subscription sent as string?\n\t\t\t\t\t\t\t$maillist = getPost(\"maillist\");\n\t\t\t\t\t\t\tif($maillist) {\n\t\t\t\t\t\t\t\t// check if maillist exists\n\t\t\t\t\t\t\t\t$maillists = $page->maillists();\n\t\t\t\t\t\t\t\t$maillist_match = arrayKeyValue($maillists, \"name\", $maillist);\n\t\t\t\t\t\t\t\tif($maillist_match !== false) {\n\t\t\t\t\t\t\t\t\t$maillist_id = $maillists[$maillist_match][\"id\"];\n\t\t\t\t\t\t\t\t\t$_POST[\"maillist_id\"] = $maillist_id;\n\n\t\t\t\t\t\t\t\t\t// add maillist for current user\n\t\t\t\t\t\t\t\t\t$this->addMaillist(array(\"addMaillist\"));\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// ignore subscription if maillist does not exist\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// itemtype post save handler?\n\t\t\t\t\t\t\t// TODO: Consider if failed postSave should have consequences\n\t\t\t\t\t\t\tif(method_exists($this, \"saved\")) {\n\t\t\t\t\t\t\t\t$this->saved($user_id);\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\tmessage()->resetMessages();\n\n\t\t\t\t\t\t\t// return enough information to the frontend\n\t\t\t\t\t\t\treturn array(\"user_id\" => $user_id, \"nickname\" => $nickname, \"email\" => $email);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$page->addLog(\"user->newUser failed: (missing info)\");\n\t\treturn false;\n\t}", "public function member_signup() {\n\t\t$this->layout = 'member';\n\t\t$this->set('title_for_layout', __('Member Registration'));\n\t\t$this->set('statesOptions', $this->User->statesOptions);\n\t\tif ($this->request->is(array('post','put'))) {\n\t\t\tif ($this->Recaptcha->verify()) {\n\t\t // do something, save you data, login, whatever\n\t\t // check if deleted email\n\t\t\t\t$deleted = $this->User->find('first', array(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'User.email' => $this->request->data['User']['email'],\n\t\t\t\t\t\t'User.isactive' => 0,\n\t\t\t\t\t\t'User.activation' => NULL\n\t\t\t\t\t),\n\t\t\t\t\t'fields' => array('User.id')\n\t\t\t\t));\n\t\t\t\tif (!empty($deleted)) { \n\t\t\t\t\t$this->Session->setFlash(__('This email address has been deactivated by admin'), 'danger');\n\t\t\t\t\t$this->redirect($this->referer());\n\t\t\t\t}\n\t\t\t\t$role_type = Configure::read('Role.Member');\n\t\t\t\t$this->request->data['User']['role_id'] = $role_type['Admin'];\n\t\t\t\t$this->request->data['User']['activation'] = $this->User->randText(16);\n\t\t\t\tif ($this->User->saveAll($this->request->data)) {\n\t\t\t\t\t$this->User->sendEmail($this->request->data['User']['email'], __('Please confirm your registration'), 'member/member_signup', array(\n\t\t\t\t\t\t'activation' => $this->request->data['User']['activation'],\n\t\t\t\t\t\t'name' => $this->request->data['User']['name'],\n\t\t\t\t\t\t'user_id' => $this->User->id\n\t\t\t\t\t));\n\t\t\t\t\t\n\t\t\t\t\t//$this->Session->setFlash(__('Registration success, please check email to activate your account'),'success');\n\t\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'signup_success', $this->User->id, 'member' => true));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash(__('Registration failed'),'danger');\n\t\t\t\t}\n\t\t } else {\n\t\t // display the raw API error\n\t\t $this->Session->setFlash($this->Recaptcha->error);\n\t\t }\n\t\t\t\n\t\t}\n\t}", "public function actionEditregistrants() {\n\t\tglobal $sourceFolder, $moduleFolder;\n\n\t\tif(isset($_GET['subaction']) && isset($_GET['useremail'])) {\n\t\t\tif($_GET['subaction'] == 'edit') {\n\t\t\t\tif(isset($_POST['submitreg_form_' . $this->moduleComponentId])) {\n\t\t\t\t\tsubmitRegistrationForm($this->moduleComponentId, getUserIdFromEmail(escape($_GET['useremail'])), true, true);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\t'<a href=\"./+editregistrants\">&laquo; Back</a><br />' .\n\t\t\t\t\t\tgenerateRegistrationForm($this->moduleComponentId, $this->userId, './+editregistrants&subaction=edit&useremail=' . escape($_GET['useremail']), true) .\n\t\t\t\t\t\t'<br /><a href=\"./+editregistrants\">&laquo; Back</a><br />'\n\t\t\t\t);\n\t\t\t}\n\t\t\telseif($_GET['subaction'] == 'delete') {\n\t\t\t\tif($_GET['useremail']==\"Anonymous\")\n\t\t\t\t\t$userIdTemp = escape($_GET['registrantid']);\n\t\t\t\telse\n\t\t\t\t\t$userIdTemp = getUserIdFromEmail(escape($_GET['useremail']));\n\t\t\t\tif(!unregisterUser($this->moduleComponentId, $userIdTemp))\n\t\t\t\t\tdisplayerror('Error! User with the given e-mail ' . escape($_GET['useremail']) . ' was not found.');\n\t\t\t}\n\t\t}\n\t\telseif(isset($_GET['subaction']) && $_GET['subaction'] == 'getsuggestions' && isset($_GET['forwhat'])) {\n\t\t\techo $this->getUnregisteredUsersFromPattern(escape($_GET['forwhat']));\n\t\t\tdisconnect();\n\t\t\texit();\n\t\t}\n\t\telseif(isset($_POST['btnAddUserToForm']) && isset($_POST['useremail'])) {\n\t\t\t$hyphenPos = strpos($_POST['useremail'], '-');\n\t\t\tif($hyphenPos >= 0) {\n\t\t\t\t$userEmail = escape(trim(substr($_POST['useremail'], 0, $hyphenPos - 1)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$userEmail = escape($_POST['useremail']);\n\t\t\t}\n\n\t\t\t$targetUserId = getUserIdFromEmail($userEmail);\n\t\t\tif($targetUserId > 0) {\n\t\t\t\tif(verifyUserRegistered($this->moduleComponentId, $targetUserId)) {\n\t\t\t\t\tdisplayerror('The given user is already registered to this form.');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tregisterUser($this->moduleComponentId, $targetUserId);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdisplayerror('A user registered with the e-mail ID you entered was not found.');\n\t\t\t}\n\t\t}\n\t\telseif(isset($_POST['btnEmptyRegistrants'])) {\n\t\t\t$registeredUsers = form::getRegisteredUserArray($this->moduleComponentId);\n\t\t\t$registeredUserCount = count($registeredUsers);\n\t\t\tfor($i = 0; $i < $registeredUserCount; $i++) {\n\t\t\t\tunregisterUser($this->moduleComponentId, $registeredUsers[$i], true);\n\t\t\t}\n\t\t\tdisplayinfo('All registrations to this form have been deleted.');\n\t\t}\n\n\t\t$sortField = 'registrationdate'; /// Default Values\n\t\t$sortOrder = 'asc';\n\t\tif(isset($_GET['sortfield']))\n\t\t\t$sortField = escape($_GET['sortfield']);\n\t\tif(isset($_GET['sortorder']) && ($_GET['sortorder'] == 'asc' || $_GET['sortorder'] == 'desc'))\n\t\t\t$sortOrder = escape($_GET['sortorder']);\n\t\tglobal $ICONS;\n\t\t$html= generateFormDataTable($this->moduleComponentId, $sortField, $sortOrder, 'editregistrants');\n\t\treturn \"<fieldset><legend>{$ICONS['Form Registrants']['small']}Edit Form Registrants</legend>$html</fieldset>\";\n\t}", "function onStartRegistrationFormData($action)\n {\n $instr = _m('Note you will initially be \"sandboxed\" so your posts will not appear in the public timeline.');\n\n if (isset($this->contact)) {\n $contactuser = User::staticGet('nickname', $this->contact);\n if (!empty($contactuser)) {\n $contactlink = \"@<a href=\\\"$contactuser->uri\\\">$contactuser->nickname</a>\";\n // TRANS: User instructions after registration.\n // TRANS: %s is a clickable e-mailaddress.\n $instr = sprintf(_m('Note you will initially be \"sandboxed\" so your posts will not appear in the public timeline. '.\n 'Send a message to %s to speed up the unsandboxing process.'),$contactlink);\n }\n }\n\n $output = common_markup_to_html($instr);\n $action->elementStart('div', 'instructions');\n $action->raw($output);\n $action->elementEnd('div');\n }", "public static function get_registration_action() {\n\t\treturn 'rest_api_init';\n\t}", "function signUpAction() {\n global $template;\n\n $credentials = getPost();\n $errors = checkSignUpErrors($credentials);\n // PHOTO AVATAR\n\n if(empty($errors)) {\n insertUserModel($credentials);\n if (isset($credentials['blogger'])) {\n sendMailAskBlogger($credentials);\n }\n sendMailSignUp($credentials);\n $template = 'login';\n } else {\n $template = 'signup';\n }\n}", "static function init() {\n\t\tadd_action( 'user_register', array( __CLASS__, 'change_display_name' ) );\t\n\t}", "public function registrationSuccessful(User $user): void;", "public function registerAction() {\n\t\tif (!$this->view->getVar('sign_up_enable')) return $this->response->redirect('register/index');\n\t\t$emailRegistered = false;\n\t\t$captcha = null;\n\t\t$form = null;\n\t\tif ($this->getDI()->getRequest()->isPost()) {\n\t\t\t$form = new Signup\\SignupForm();\n\t\t\t$captcha = new Captcha\\Captcha($this->getDI()->get('config')->recaptcha);\n\t\t\t$newUser = new Users();\n\n\t\t\tif ($form->isValid($this->getDI()->getRequest()->getPost(), $newUser)\n\t\t\t\t\t&& $captcha->checkAnswer($this->getDI()->getRequest())\n\t\t\t\t\t&& !($emailRegistered = \\UsersEmails::getRegisteredEmail($newUser->email))) {\n\t\t\t\t// create new user\n\t\t\t\t$newUser->create();\n\t\t\t\t// send verification data to primary email\n\t\t\t\t$newUser->getPrimaryEmail()->sendVerifyEmail($this->getDI()->get('config'));\n\n\t\t\t\t// redirect to sing up confirmation page\n\t\t\t\treturn $this->view->pick('register/signup_confirmation');\n\t\t\t}\n\n\t\t\telse if ($emailRegistered) {\n\t\t\t\t$this->view->setVar('emailRegistered', true);\n\t\t\t}\n\t\t}\n\n\t\tif ($captcha && $form) {\n\t\t\t$this->view->setVars(array('captcha' => $captcha, 'form' => $form));\n\t\t\t$this->view->form->get('password')->clear();\n\t\t\t$this->view->form->get('confirmPassword')->clear();\n\t\t\t$this->view->messages->addError('Please, fix errors and try again!');\n\t\t}\n\n\t\t$this->dispatcher->forward(array(\n\t\t\t\t\"controller\" => \"register\",\n\t\t\t\t\"action\" => \"index\" ));\n\n\t}", "function user_row_custom_actions( $actions, $user_object ){\r\n\t\tglobal $screen;\r\n\t\t$screen = get_current_screen();\r\n\t\t$verified = get_user_meta( 'email_verification', $user_object->ID );\r\n\t\t$userspage = 'users_page_';\r\n\t\t$approve_title = __( 'Approve New User Accounts', 'user-registration-aide' );\r\n\t\t$deny_title = __( 'Deny New User Accounts', 'user-registration-aide' );\r\n\t\t$email_title = __( 'Email Another Email Verification Link to New User Accounts', 'user-registration-aide' );\r\n\t\t$activate_title = __( 'Activate New User Accounts', 'user-registration-aide' );\r\n\t\t$delete_title = __( 'Delete Denied New User Accounts', 'user-registration-aide' );\r\n\t\t$password_title = __( 'Resend Password Reset Email Notification for New User Accounts', 'user-registration-aide' );\r\n\t\t//wp_die( 'CUSTOM ROW ACTIONS ' );\r\n\t\t\r\n\t\t$approval_link = add_query_arg( array( 'action' => 'approve_user', 'user' => $user_object->ID ) );\r\n\t\t$approval_link = remove_query_arg( array( 'new_role' ), $approval_link );\r\n\t\t$approval_link = wp_nonce_url( $approval_link, 'ura-nua' );\r\n\t\t$approval_action = '<a href=\"' . esc_url( $approval_link ) . '\" title=\"'.$approve_title.'\">' . __( 'Approve', 'user-registration-aide' ) . '</a>';\r\n\t\t\r\n\t\t$denied_link = add_query_arg( array( 'action' => 'deny_user', 'user' => $user_object->ID ) );\r\n\t\t$denied_link = remove_query_arg( array( 'new_role' ), $denied_link );\r\n\t\t$denied_link = wp_nonce_url( $denied_link, 'ura-nua' );\r\n\t\t$denied_action = '<a href=\"' . esc_url( $denied_link ) . '\" title=\"'.$deny_title.'\">' . __( 'Deny', 'user-registration-aide' ) . '</a>';\r\n\t\t\r\n\t\t$resend_link = add_query_arg( array( 'action' => 'resend_email', 'user' => $user_object->ID ) );\r\n\t\t$resend_link = remove_query_arg( array( 'new_role' ), $resend_link );\r\n\t\t$resend_link = wp_nonce_url( $resend_link, 'ura-nua' );\r\n\t\t$resend_action = '<a href=\"' . esc_url( $resend_link ) . '\" title=\"'.$email_title.'\">' . __( 'Resend Email', 'user-registration-aide' ) . '</a>';\r\n\t\t\r\n\t\t$delete_link = add_query_arg( array( 'action' => 'delete_user', 'user' => $user_object->ID ) );\r\n\t\t$delete_link = remove_query_arg( array( 'new_role' ), $delete_link );\r\n\t\t$delete_link = wp_nonce_url( $delete_link, 'ura-nua' );\r\n\t\t$delete_action = '<a href=\"' . esc_url( $delete_link ) . '\">' . __( 'Delete User', 'user-registration-aide' ) . '</a>';\r\n\t\t\r\n\t\t$activate_link = add_query_arg( array( 'action' => 'activate_user', 'user' => $user_object->ID ) );\r\n\t\t$activate_link = remove_query_arg( array( 'new_role' ), $activate_link );\r\n\t\t$activate_link = wp_nonce_url( $activate_link, 'ura-nua' );\r\n\t\t$activate_action = '<a href=\"' . esc_url( $activate_link ) . '\" title=\"'.$activate_title.'\">' . __( 'Activate User', 'user-registration-aide' ) . '</a>';\r\n\t\t\r\n\t\t$password_link = add_query_arg( array( 'action' => 'resend_password_email', 'user' => $user_object->ID ) );\r\n\t\t$password_link = remove_query_arg( array( 'new_role' ), $password_link );\r\n\t\t$password_link = wp_nonce_url( $password_link, 'ura-nua' );\r\n\t\t$password_action = '<a href=\"' . esc_url( $password_link ) . '\" title=\"'.$password_title.'\">' . __( 'Resend Password Email', 'user-registration-aide' ) . '</a>';\r\n\t\t\r\n\t\tif( $screen->id == $userspage.'pending-approval' ){\r\n\t\t\t$actions[] = $approval_action;\r\n\t\t\t$actions[] = $denied_action;\r\n\t\t\t$actions[] = $activate_action;\r\n\t\t\treturn $actions;\r\n\t\t}elseif( $screen->id == $userspage.'pending-deletion' ){\r\n\t\t\t$actions[] = $approval_action;\r\n\t\t\t$actions[] = $delete_action;\r\n\t\t\t$actions[] = $activate_action;\r\n\t\t\treturn $actions;\r\n\t\t}elseif( $screen->id == $userspage.'pending-verification' ){\r\n\t\t\t$actions[] = $resend_action;\r\n\t\t\t$actions[] = $activate_action;\r\n\t\t\treturn $actions;\r\n\t\t}elseif( $screen->id == $userspage.'pending-password' ){\r\n\t\t\t$actions[] = $password_action;\r\n\t\t\t$actions[] = $activate_action;\r\n\t\t\treturn $actions;\r\n\t\t}else{\r\n\t\t\treturn $actions;\r\n\t\t}\r\n\t}", "public function register() {\n\t\t$this->layout = 'access';\n//\t\tif (empty($this->data) || !$this->isRegistrationAllowed()) {\n//\t\t\t$this->redirect('/');\n//\t\t}\n if (!empty($this->data)) {\n // $this->User->create();\n try {\n $ticket = $this->User->register($this->data);\n $msg = __d('access', 'The account %s has been created.', true);\n $this->Session->setFlash(sprintf($msg, $this->data['User']['username']), 'success');\n $this->set(compact('ticket'));\n $this->set('user', $this->data['User']);\n $template = Configure::read('Access.registration').'_registration';\n $result = $this->Notify->send(\n $template,\n\t\t\t\t\t$this->data['User']['email'],\n\t\t\t\t\t__d('access','Thanks for registering.', true)\n\t\t\t\t\t);\n\n return $this->render('plugins/access/users/'.$template.'.twig');\n\t\t\t} catch (Exception $e) {\n $this->Session->setFlash(\n __d('access', 'Something went wrong with your account. Please, try again.', true),\n 'alert'\n );\n\t\t\t\t$this->_resetPasswordErrors();\n\t\t\t}\n\t\t}\n $this->layout = false;\n\n return $this->render('plugins/access/users/register.twig');\n\t}", "private function setup_actions() {\n\t\tregister_activation_hook( __FILE__, array( $this, 'activation' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );\n\t}", "public function signup(){\n add_breadcrumb(get_config_value('brand'), url('/'));\n add_breadcrumb(t('users::strings.sign_up'), url('signup'));\n \\Session::forget('gridsrun');\n $this->loadLayout(false,false,'users_registration');\n $this->setPageTitle(t('users::strings.register'));\n }", "public static function trigger_after_registration_actions_for_user( $user ) {\n\t\tif ( ! is_object( $user ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get entry ID from user meta\n\t\t$entry_id = get_user_meta( $user->ID, 'frmreg_entry_id', 1 );\n\t\t$entry = FrmEntry::getOne( $entry_id );\n\n\t\tself::trigger_after_registration_actions( $entry->form_id, $entry->id );\n\t}", "public function register()\n\t{\n\t\tif ($this->input->post()) {\n\t\t\t$this->validateInfoRegister($this->input->post());\n\t\t\t$this->addUser($this->input->post());\n\t\t}\n\t\telse {\n\t\t\tredirect('404');\n\t\t}\n\t}", "public function add()\n\t{\n\n Event::add('ushahidi_action.nav_main_top', array($this, '_signup_button'));\n\t}", "public function actionNewuserregistration()\n {\n try{\n //insert new user to database table.\n $response = User::insert_new_user($_POST);\n if($response)\n {\n //create a 6 digit otp\n $otp = User::create_otp();\n $email = $_POST['email'];\n $phone = $_POST['phone_number'];\n //send 6 digit otp to user\n $response = User::send_otp_to_user($email,$phone,$otp);\n }\n return $response;\n \n } catch (ErrorException $ex) {\n Yii::warning($ex->getMessage());\n }\n \n }", "public function registerAction()\n {\n $form = $this->container->get('fos_user.registration.form');\n $formHandler = $this->container->get('fos_user.registration.form.handler');\n $confirmationEnabled = $this->container->getParameter('fos_user.registration.confirmation.enabled');\n\n $process = $formHandler->process($confirmationEnabled);\n if ($process) {\n $user = $form->getData();\n\n $authUser = false;\n if ($confirmationEnabled) {\n $this->container->get('session')->set('fos_user_send_confirmation_email/email', $user->getEmail());\n $route = 'fos_user_registration_check_email';\n } else {\n // Change the path to t42_backend_dashboard_index\n $route = 'fos_user_registration_registered';\n }\n\n $message = $this->container->get('translator')->trans('registration.flash.user_created', array(), 'FOSUserBundle');\n $this->setFlash('success', $message);\n $url = $this->container->get('router')->generate($route);\n $response = new RedirectResponse($url);\n\n return $response;\n }\n\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:register.html.' . $this->getEngine(), array(\n 'form' => $form->createView(),\n ));\n }", "function register(){\n\nglobal $user, $conn, $dbtables, $logged_in, $globals, $l, $AEF_SESS, $theme, $tree;\n\n\t//Load the Language File\n\tif(!load_lang('register')){\n\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t//The name of the file\n\t$theme['init_theme'] = 'register';\n\t\n\t//The name of the Page\n\t$theme['init_theme_name'] = 'Register';\n\t\n\t//Array of functions to initialize\n\t$theme['init_theme_func'] = array('mainregister_theme', \n\t\t\t\t\t\t\t\t\t'validate_theme', \n\t\t\t\t\t\t\t\t\t'age_theme', \n\t\t\t\t\t\t\t\t\t'coppa_theme',\n\t\t\t\t\t\t\t\t\t'resendact_theme');\t\n\t\t\t\t\t\t\t\t\n\t\n\t\n\t/////////////////////////////////\n\t// This is not for users\n\tif($logged_in){\n\t\n\t\treporterror($l['registered_title'], $l['registered']);\n\t\t\n\t\treturn false;\n\t\n\t}\n\t/////////////////////////////////\n\t\n\t$tree = array();//Board tree for users location\n\t$tree[] = array('l' => $globals['index_url'],\n\t\t\t\t\t'txt' => $l['index']);\n\t$tree[] = array('l' => $globals['index_url'].'act=register',\n\t\t\t\t\t'txt' => $l['register']);\n\t\n\t//My activity\n\t$globals['last_activity'] = 'r';\n\t\n\t//If a second Register act has been set\n\tif(isset($_GET['regact']) && trim($_GET['regact'])!==\"\"){\n\t\n\t\t$regact = trim($_GET['regact']);\n\t\t\n\t}else{\n\t\n\t\t$regact = \"\";\n\t\t\n\t}\n\t\n\t//The switch handler\n\tswitch($regact){\n\t\t\n\t\tcase 'validate' :\n\t\tvalidate();//Validates an email address\n\t\tbreak;\n\t\t\n\t\tcase 'age':\n\t\tage();//Age Asking form\n\t\tbreak;\n\t\t\n\t\tcase 'coppa':\n\t\tcoppa();//COPPA POLICY form\n\t\tbreak;\n\t\t\n\t\tcase 'coppaform':\n\t\tcoppaform();//COPPA POLICY Parents form - Pending\n\t\tbreak;\n\t\t\n\t\tcase 'resendact':\n\t\tresendact();//For resending activation code\n\t\tbreak;\n\t\t\n\t\tdefault :\n\t\tmainregister();\n\t\tbreak;\t\n\t\n\t}\n\t\n}", "public function on()\n {\n return User::EVENT_PREPARE_REGISTRATION;\n }", "function registerAction()\n {\n $pageTitle = 'Register';\n $registerLinkStyle = 'selected';\n require_once __DIR__ . '/../templates/register.php';\n }", "public function run()\n {\n\tif(!$this->controller->module->allowRegistration)\n\t throw new CHttpException(403, 'User registration is disabled.');\n\t\n\t$user = new User('register');\n\t$profile = $this->controller->module->createProfile($user);\n\t\n\tif(Yii::app()->request->isPostRequest) {\n\t if(FormHelper::hasData($user))\n\t\t$user->attributes = FormHelper::getData($user);\n\t if($profile && FormHelper::hasData($profile))\n\t\t$profile->attributes = FormHelper::getData($profile);\n\t\n\t $transaction = Yii::app()->db->beginTransaction();\n\t if($this->saveUserAndProfile($user, $profile)) {\n\t\t$transaction->commit();\n\t\t$this->setFlashMessage();\n\t\t$this->sendActivationEmail($user, $profile);\n\t\t$this->controller->redirect(Yii::app()->homeUrl);\n\t } else\n\t\t$transaction->rollback();\n\t}\n\t \n\t$this->controller->render('register', array(\n\t 'user' => $user,\n\t 'profile' => $profile,\n\t));\n }", "public function register_hooks() {\n\t\tadd_action( 'admin_init', array( $this, 'manage_notification' ) );\n\t}", "function flowdeveloper_form_user_register_form_alter(&$form, &$form_state, $form_id)\r\n{\r\n global $user;\r\n $drupal_user_rid = variable_get('drupal_users_role_rid');\r\n // Check if the current user is admin or in the Drupal users role to bypass authentication in flow\r\n if (array_key_exists($drupal_user_rid, $user->roles) || $user->uid == 1) {\r\n return; \r\n } else {\r\n\t$form['account']['name']['#title_display'] = 'invisible';\r\n\t$form['account']['name']['#attributes']['placeholder'] = t(\"Username\");\r\n\t$form['account']['name']['#attributes']['class'][] = \"c-ate-registration-username\";\r\n\t$form['account']['name']['#field_suffix'] = '<div class=\"form-control-feedback c-reg-user-icon\"></div>';\r\n\tunset($form['account']['name']['#description']);\r\n\r\n\t$form['account']['mail']['#title_display'] = 'invisible';\r\n\t$form['account']['mail']['#attributes']['placeholder'] = t(\"Email\");\r\n\t$form['account']['mail']['#attributes']['class'][] = \"c-ate-registration-email\";\r\n\t$form['account']['mail']['#field_suffix'] = '<div class=\"form-control-feedback c-reg-mail-icon\"></div>';\r\n\tunset($form['account']['mail']['#description']);\r\n\r\n\t$form['account']['pass']['#type'] = 'password';\r\n\t$form['account']['pass']['#title'] = t('Password');\r\n\t$form['account']['pass']['#title_display'] = 'invisible';\r\n\t$form['account']['pass']['#attributes']['placeholder'] = t(\"Password\");\r\n\t$form['account']['pass']['#attributes']['class'][] = \"c-ate-registration-password\";\r\n\t$form['account']['pass']['#field_suffix'] = '<div class=\"form-control-feedback c-reg-pass-icon\"></div>';\r\n\tunset($form['account']['pass']['#description']);\r\n\r\n\t$form['account']['pass2']['#type'] = 'password';\r\n\t$form['account']['pass2']['#title'] = 'Confirm Password';\r\n\t$form['account']['pass2']['#title_display'] = 'invisible';\r\n\t$form['account']['pass2']['#attributes']['placeholder'] = \"Confirm Password\";\r\n\t$form['account']['pass2']['#attributes']['class'][] = \"c-reg-pass2\";\r\n\r\n\t$form['actions']['submit']['#attributes']['class'][] = \"c-reg-submit\";\r\n\t$form['actions']['submit']['#attributes']['class'][] = \"c-ate-registration-create\";\r\n\t$form['actions']['submit']['#attributes']['class'][] = \"btn-primary\";\r\n\t/**\r\n\t * replace Drupal's registration validation with FDW's.\r\n\t */\r\n\t$form['#validate'][0] = 'flowdeveloper_user_register_form_validate';\r\n\r\n\t/**\r\n\t * Drupal will be called upon to complete user registration in FDW's submit function\r\n\t */\r\n\t$form['#submit'] = array('flowdeveloper_user_register_form_submit');\r\n\t\r\n\t\t\t\r\n\t$form['#after_build'][] = '_flowdeveloper_form_user_register_form_after_build';\r\n }\r\n}", "public static function get_registration_action(): string {\n\t\treturn 'template_redirect';\n\t}", "public function registerActions() {\n $this->addAction('wp_head', ['Chayka\\\\Facebook\\\\HtmlHelper', 'renderMeta']);\n $this->addAction('wp_head', ['Chayka\\\\Facebook\\\\HtmlHelper', 'renderJsInit']);\n\t $this->addAction('wp_logout', function(){\n\t\t $accessToken = Util::getItem($_SESSION, 'fb_access_token');\n\t\t if($accessToken){\n\t\t\t $fb = new Facebook\\Facebook([\n\t\t\t\t 'app_id' => FacebookHelper::getAppID(),\n\t\t\t\t 'app_secret' => FacebookHelper::getAppSecret(),\n\t\t\t\t 'default_access_token' => $accessToken, // optional\n\t\t\t ]);\n\t\t\t $logoutUrl = $fb->getRedirectLoginHelper()->getLogoutUrl($accessToken, ($_SERVER['HTTPS']?'https://':'http://').$_SERVER['SERVER_NAME']);\n\t\t\t CurlHelper::get($logoutUrl);\n\t\t\t unset($_SESSION['fb_access_token']);\n\t\t\t session_commit();\n\t\t }\n\t });\n \t/* chayka: registerActions */\n }", "public function checkRegistration(){\n if($this->registerModel->isNewUser()) {\n //if a new user have been registered\n $this->loginView->newUser = true;\n //display success message in view\n $this->loginView->displaySuccessMsg();\n //get new user from model\n $newUsername = $this->registerModel->getNewUser();\n //set $name variable in view to username stored in session\n $this->loginView->setUsername($newUsername);\n }\n }", "function UserRegistrationController()\n{\n $register_name = $_POST['register_name'];\n $register_email = $_POST['register_email'];\n $register_password = $_POST['register_password'];\n $connection = getConnection();\n UserRegistration($connection, $register_name, $register_email, $register_password);\n //robotCheck();\n sendMail();\n return [\n \"redirect:/\",\n []\n ];\n}", "public function register() {\n //call the addUser method of the UserModel object\n $result = $this->user_model->add_user();\n\n //display result\n $view = new Register();\n $view->display($result);\n }", "function cc_auto_activate_on_user_signup($user, $user_email, $key, $meta) {\n\t\t//only multisite part will be executed\n\t\t$user_id = bp_core_activate_signup($key);\n\t\t\n\t\t$options = $this->_options;\n\t\t\n\t\tif( $options['enable_login'] == 'true' )\n\t\t{\n\t\t\t//Automatically log the user in\t.\n\t\t\t//Thanks to Justin Klein's wp-fb-autoconnect plugin for the basic code to login automatically\n\t\t\t$user_info = get_userdata($user_id);\n\t\t\twp_set_auth_cookie($user_id);\n\t\n\t\t\tdo_action('wp_signon', $user_info->user_login);\n\t\t}\n\n\n\t\t\t\t\n\t\t\n\t\t//Hook if you want to do something after the login\n\t\tdo_action('bp_disable_activation_after_login');\n\t\t\n\t\t$redirection = apply_filters('dar_redirection_url',$options['redirection']);\n\t\t\n\t\tif( $redirection != '' )\n\t\t{\n\t\t\twp_safe_redirect($redirection);\n\t\t\tdie();\n\t\t}\n\t}", "function register_save()\n\t{\n\t\tglobal $mainframe;\n\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// Get required system objects\n\t\t$user \t\t= clone(JFactory::getUser());\n\t\t$pathway \t=& $mainframe->getPathway();\n\t\t$config\t\t=& JFactory::getConfig();\n\t\t$authorize\t=& JFactory::getACL();\n\t\t$document =& JFactory::getDocument();\n\n\t\t// If user registration is not allowed, show 403 not authorized.\n\t\t$usersConfig = &JComponentHelper::getParams( 'com_users' );\n\t\tif ($usersConfig->get('allowUserRegistration') == '0') {\n\t\t\tJError::raiseError( 403, JText::_( 'Access Forbidden' ));\n\t\t\treturn;\n\t\t}\n\n\t\t// Initialize new usertype setting\n\t\t$newUsertype = $usersConfig->get( 'new_usertype' );\n\t\tif (!$newUsertype) {\n\t\t\t$newUsertype = 'Registered';\n\t\t}\n\n\t\t// Bind the post array to the user object\n\t\tif (!$user->bind( JRequest::get('post'), 'usertype' )) {\n\t\t\tJError::raiseError( 500, $user->getError());\n\t\t}\n\n\t\t// Set some initial user values\n\t\t$user->set('id', 0);\n\t\t$user->set('usertype', $newUsertype);\n\t\t$user->set('gid', $authorize->get_group_id( '', $newUsertype, 'ARO' ));\n\n\t\t$date =& JFactory::getDate();\n\t\t$user->set('registerDate', $date->toMySQL());\n\n\t\t// If user activation is turned on, we need to set the activation information\n\t\t$useractivation = $usersConfig->get( 'useractivation' );\n\t\tif ($useractivation == '1')\n\t\t{\n\t\t\tjimport('joomla.user.helper');\n\t\t\t$user->set('activation', JUtility::getHash( JUserHelper::genRandomPassword()) );\n\t\t\t$user->set('block', '1');\n\t\t}\n\n\t\t// If there was an error with registration, set the message and display form\n\t\tif ( !$user->save() )\n\t\t{\n\t\t\tJError::raiseWarning('', JText::_( $user->getError()));\n\t\t\t$this->register();\n\t\t\treturn false;\n\t\t}\n\n\t\t// Send registration confirmation mail\n\t\t$password = JRequest::getString('password', '', 'post', JREQUEST_ALLOWRAW);\n\t\t$password = preg_replace('/[\\x00-\\x1F\\x7F]/', '', $password); //Disallow control chars in the email\n\t\tUserController::_sendMail($user, $password);\n\n\t\t// Everything went fine, set relevant message depending upon user activation state and display message\n\t\tif ( $useractivation == 1 ) {\n\t\t\t$message = JText::_( 'REG_COMPLETE_ACTIVATE' );\n\t\t} else {\n\t\t\t$message = JText::_( 'REG_COMPLETE' );\n\t\t}\n\n\t\t$this->setRedirect('index.php', $message);\n\t}", "public function register() {\n\n parent::post();\n\n //check if\n //1 .) from create account, no user id\n //2 .) from user invitation\n \n //must be create account\n if(empty($_POST['user_id'])) {\n\n //check if email is already register\n $isExist = $this->register->hasAccount($_POST['username']);\n //if username is already register\n if(!empty($isExist)) {\n return $this->_returnError('already_register', 'Email Adress is already register');\n\n } else {\n //create new account\n $this->user->create($_POST);\n //return success\n return $this->_returnSuccess(\n 'An email has been sent to you with detailed instructions on how to activate it'\n );\n }\n\n //else from user invitation\n } else {\n //update user information and mark nonce as expired\n $this->user->updateCreateAccount($_POST);\n\n return $this->_returnSuccess('');\n }\n }", "public function register()\n\t {\n\t \t$this->setTitle(Phpfox::getPhrase('resume.who_s_view_me'));\n\t\t$aAccount = Phpfox::getService(\"resume.account\")->getAccount();\n\t\tif($aAccount && $aAccount['view_resume']!=1)\n\t\t{\n\t\t\techo Phpfox::getPhrase('resume.your_request_has_been_sent_please_wait_approve_from_administrator');\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPhpfox::getBlock('resume.registerpopup');\n\t\t}\n\t }", "public function register()\n {\n //User::deleting no se registra aqui.\n }", "public function registerAction()\n {\n $result = $this->forward()->dispatch('User\\Controller\\Account', array('action' => 'add')); // internal redirect\n\n return $result;\n }", "public function signupAction()\n {\n $this->tag->setTitle(_t('signUp'));\n $this->app->description = _t('signUp');\n\n $this->app->layout->replace([\n 'left' => 'mdl-cell--3-col',\n 'content' => 'mdl-cell--6-col mdl-cell--8-col-tablet'\n ]);\n\n if ($this->request->isPost() == true) {\n $signup = $this->user->signup();\n\n if ($signup instanceof Users) {\n $this->flash->notice(_t('flash/notice/checkEmail'));\n } else {\n $this->view->setVar('errors', new Arr($signup));\n $this->flash->warning(_t('flash/warning/errors'));\n }\n }\n }", "public function register() {\n $this->layout = 'login';\n $userId = $this->UserAuth->getUserId();\n if ($userId) {\n $this->redirect(\"/dashboard\");\n }\n if (SITE_REGISTRATION) {\n $userGroups = $this->UserGroup->getGroupsForRegistration();\n $this->set('userGroups', $userGroups);\n if ($this->request->isPost()) {\n if (USE_RECAPTCHA && !$this->RequestHandler->isAjax()) {\n $this->request->data['User'][\n 'captcha'] = (isset($this->request->data[\n 'recaptcha_response_field'])) ? $this->request->data['recaptcha_response_field'] : \"\";\n }\n $this->User->set($this->request->data);\n if ($this->User->RegisterValidate()) {\n if (!isset($this->request->data['User']['user_group_id'])) {\n $this->request->data['User']['user_group_id'] = 4;\n } elseif (!$this->UserGroup->isAllowedForRegistration($this->request->data['User']['user_group_id'])) {\n $this->Session->setFlash(__('Please select correct register as'));\n return;\n }\n $this->request->data['User']['active'] = 1;\n if (!EMAIL_VERIFICATION) {\n $this->request->data['User']['email_verified'] = 1;\n }\n $ip = '';\n if (isset($_SERVER['REMOTE_ADDR'])) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $this->request->data['User']['ip_address'] = $ip;\n $salt = $this->UserAuth->makeSalt();\n $this->request->data['User']['salt'] = $salt;\n $this->request->data['User']['password'] = $this->UserAuth->makePassword($this->request->data['User']['password'], $salt);\n $this->User->save($this->request->data, false);\n $userId = $this->User->getLastInsertID();\n $user = $this->User->findById($userId);\n if (SEND_REGISTRATION_MAIL && !EMAIL_VERIFICATION) {\n $this->User->sendRegistrationMail($user);\n }\n if (EMAIL_VERIFICATION) {\n $this->User->sendVerificationMail($user);\n }\n if (isset($this->request->data['User']['email_verified']) && $this->request->data['User']['email_verified']) {\n $this->UserAuth->login($user);\n $this->redirect('/');\n } else {\n $this->Session->setFlash(__('Please check your mail and confirm your registration'));\n $this->redirect('/emailVerification');\n }\n }\n }\n } else {\n $this->Session->setFlash(__('Sorry new registration is currently disabled, please try again later'));\n $this->redirect('/login');\n }\n $this->set('js', array('demo/signin'));\n $this->set('css', array('styles/ecommerce', 'pages/signin'));\n }", "public function post_register() {\n\t\tif(Auth::check()) {\n\t\t\treturn Redirect::to('/');\n\t\t}\n\t\t// Get all the Inputs \n\t\t$input = Input::all();\n\t\t$rules = array(\n\t 'username' => 'required|alpha_dash|between:2,50|username',\n\t\t\t'password' => 'required|between:4,50',\n\t 'email' => 'email',\n\t\t\t'key' => 'required|match:/beta/',\n\t\t);\n\t\t$validation = Validator::make($input, $rules);\n\t\tif ($validation->fails()) {\n\t\t\treturn Redirect::to('register')->with_errors($validation)->with_input();\n\t\t}\n\t\t$user = Epic_Mongo::db('doc:user');\n\t\t// TODO - Fix EpicMongo to support this.\n\t\t// $user->_id = $input['username'];\n\t\t$user->username = strtolower($input['username']);\n\t\tif($input['email']) {\n\t\t\t$user->email = strtolower($input['email']);\n\t\t}\n\t\t$user->password = Hash::make($input['password']);\n\t\t$user->save();\n\t\tif(Auth::attempt(array(\n\t\t\t'email' => $input['username'],\n\t\t\t'password' => $input['password']\n\t\t))) {\n\t\t\treturn Redirect::to('/user');\n\t\t}\n\t\treturn Redirect::to('/login');\n\t}", "public function actionRegisterSuccess()\n\t{\n\n\t\t$this->render('registerSuccess',array(\n\t\t));\t}", "private function registerHooks()\n\t{\n\t\tadd_action('init', [$this, 'register']);\n\n\t\treturn;\n\t}", "public function register()\n\t{\n\t\t$data['title'] = 'Registreer';\n\t\t$relLinks = Types::where('name', 'Link')->first();\n\t\t$data['links'] = Actions::where('type_id', $relLinks->id)->get();\n\t\t$this->blade->render('auth/register', $data);\n\t}" ]
[ "0.67605525", "0.67407596", "0.67246664", "0.66613454", "0.6626963", "0.66132855", "0.6594289", "0.65631396", "0.63949907", "0.6388923", "0.63810784", "0.63496447", "0.6320537", "0.63075936", "0.6277792", "0.62672263", "0.623668", "0.6216726", "0.62066126", "0.6184396", "0.6180346", "0.61776495", "0.6166027", "0.6166027", "0.61619824", "0.61575425", "0.6149945", "0.61376095", "0.61119276", "0.6095234", "0.60899997", "0.6082385", "0.6069959", "0.6064842", "0.60603017", "0.6043105", "0.60352135", "0.6024393", "0.6023331", "0.602294", "0.6008382", "0.60058933", "0.5990897", "0.5976748", "0.5971875", "0.596844", "0.5964073", "0.5963115", "0.5962287", "0.59539896", "0.59538656", "0.59491557", "0.5941947", "0.59363264", "0.59336036", "0.593144", "0.5917986", "0.59109014", "0.591031", "0.59097356", "0.58977824", "0.5896772", "0.5892707", "0.58889824", "0.5888491", "0.58880746", "0.5887675", "0.58869547", "0.58793676", "0.5878096", "0.58636004", "0.585315", "0.58512133", "0.5848175", "0.58481073", "0.58398116", "0.58343905", "0.58320856", "0.5830778", "0.58270967", "0.58254886", "0.58181137", "0.58009654", "0.5800458", "0.5799269", "0.5799205", "0.5799046", "0.57985723", "0.5798129", "0.5794179", "0.5790391", "0.5789813", "0.5778875", "0.5778657", "0.5770818", "0.5764802", "0.5761518", "0.5756727", "0.5756093", "0.5751148" ]
0.702951
0
Add a new row of user meta
Добавить новую строку метаданных пользователя
public static function add_user_meta_row() { $meta_name = $meta_key = absint( $_POST['meta_name'] ); $form_id = absint( $_POST['form_id'] ); $field_id = 0; $echo = false; $fields = self::get_user_meta_fields( $form_id ); // Set action ID $action_control = FrmFormActionsController::get_form_actions( 'register' ); $action_control->_set( sanitize_title( $_POST['action_key'] ) ); include( FrmRegAppHelper::path() .'/views/_usermeta_row.php' ); die(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert_User_Meta($data){\n\t\treturn UserMeta::insert($data);\n }", "function add_user_meta($user_id, $meta_key, $meta_value, $unique = \\false)\n{\n}", "function learn_press_add_user_item_meta( $user_item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn add_metadata( 'learnpress_user_item', $user_item_id, $meta_key, $meta_value, $prev_value );\n}", "function learn_press_add_user_item_meta( $user_item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn add_metadata( 'learnpress_user_item', $user_item_id, $meta_key, $meta_value, $prev_value );\n}", "protected function insert_meta_fields(int $id, array $user) {\n if (!isset($user['meta'])) {\n return;\n }\n\n foreach ($user['meta'] as $key => $value) {\n $this->add_user_meta($id, $key, $value);\n }\n }", "protected function addRow() {\n $title = \\Faker\\Name::name();\n $fields = array(\n 'Name' =>\\Faker\\Internet::userName($title),\n 'Title' => $title,\n 'Location' => \\Faker\\Address::city(),\n 'About' => \\Faker\\Lorem::sentence(10),\n 'Email' => \\Faker\\Internet::email($title)\n );\n\n $this->prepareAndInsert($fields);\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n{\n}", "function account_migrate_create_user_metta($user_id, $user){\n add_user_meta( $user_id, 'dealer_id', $user['id'] , true );\n add_user_meta( $user_id, 'dealer_username', $user['username'] , true );\n add_user_meta( $user_id, 'dealer_acct', $user['acct'] , true );\n add_user_meta( $user_id, 'dealer_name', $user['name'] , true );\n add_user_meta( $user_id, 'dealer_country', $user['country'] , true );\n add_user_meta( $user_id, 'dealer_admin', $user['admin'] , true );\n add_user_meta( $user_id, 'dealer_pricing', $user['pricing'] , true );\n}", "public function add_meta(&$data, $meta);", "private static function order_add_meta()\n {\n }", "function addExtraLoginFields( $user ) \r\n\t{?>\r\n \t<table class=\"form-table\">\r\n \t\t<tr class = \"custom_user_field_row\">\r\n \t\t<th><label for=\"<?php $this->fieldNameInDB ?>\"><?php echo $this->labelName ?></label></th>\r\n \t\t<td>\r\n \t\t\t<input type=\"text\" id=\"<?php echo $this->fieldNameInDB ?>\" name=\"<?php echo $this->fieldNameInDB ?>\" size=\"20\" value=\"<?php echo esc_attr( get_the_author_meta( $this->fieldNameInDB, $user->ID )); ?>\">\r\n \t \t</td>\r\n \t</tr>\r\n \t</table>\r\n\t<?php }", "public function red_add_user_meta($user_id, $meta_key, $meta_value) {\n\t\tif ( ! add_user_meta( $user_id, $meta_key, $meta_value, true ) ) {\n\t\t\tupdate_user_meta( $user_id, $meta_key, $meta_value );\n\t\t}\n\t}", "function addExtraLoginFields( $user ) \r\n\t{?>\r\n \t<table class=\"form-table\">\r\n \t\t<tr class = \"custom_user_field_row_notes\">\r\n \t\t<th><label for=\"<?php $this->fieldNameInDB ?>\"><?php echo $this->labelName ?></label></th>\r\n \t\t<td>\r\n\t\t\t\t<textarea type=\"text\" id=\"<?php echo $this->fieldNameInDB ?>\" name=\"<?php echo $this->fieldNameInDB ?>\" style=\"height:200px; width:500px\"><?php echo esc_attr( get_the_author_meta( $this->fieldNameInDB, $user->ID ));?></textarea>\r\n \t \t</td>\r\n \t</tr>\r\n \t</table>\r\n\t<?php }", "function addExtraLoginFields( $user ) \r\n\t{?>\r\n \t<table class=\"form-table\">\r\n \t\t<p>\r\n \t\t<label for=\"<?php $this->fieldNameInDB ?>\">\r\n\t\t\t \t<?php echo $this->labelName ?>\r\n \t\t\t<br></br>\r\n \t\t\t<input type=\"text\" id=\"<?php echo $this->fieldNameInDB ?>\" name=\"<?php echo $this->fieldNameInDB ?>\" size=\"20\" value=\"<?php echo esc_attr( get_the_author_meta( $this->fieldNameInDB, $user->ID )); ?>\">\r\n \t \t</label>\r\n \t</p>\r\n \t</table>\r\n\t<?php }", "public function register_metadata_table() {\n\t\t$this->wpdb->{$this->meta_type . 'meta'} = $this->wpdb->prefix . $this->meta_type . 'meta';\n\t}", "public function add_customer_meta_fields($user)\n {\n }", "public static function add_meta( $user, $key, $value ) {\r\n\r\n if( ! is_object( $user ) ){\r\n $user = get_user_by( 'id', $user );\r\n }\r\n\r\n $old_value = get_user_meta( $user->ID, $key, true );\r\n\r\n if( $old_value === false ){\r\n return add_user_meta( $user->ID, $key, $value );\r\n }else{\r\n if( $old_value === $value ){\r\n return true;\r\n }else{\r\n delete_user_meta( $user->ID, $key );\r\n return add_user_meta( $user->ID, $key, $value );\r\n }\r\n }\r\n\r\n }", "public function add_user_data() {\n\t\t$options = $this->get_options();\n\t\tif ( empty( $options['setUser'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$user = $options['setUser'];\n\n\t\t$this->client->setUser( $user['identifier'], $user['firstName'], $user['fullName'], $user['email'], false );\n\t}", "function add_usermeta_at_signup( $usermeta ) {\n\t\t$usermeta['accept_tos'] = $_POST['accept_tos'];\n\t\treturn $usermeta;\n\t}", "protected function add_user_meta(int $id, string $key, $value) {\n if (!is_array($value)) {\n $value = [$value];\n }\n\n foreach ($value as $v) {\n add_user_meta($id, $key, $v);\n }\n }", "public function add_meta(&$object, $meta)\n {\n }", "public static function insertUsermeta($array,$id){\r\n\t\t\r\n\t\tforeach ($array as $key=>$value){\r\n\t\t\t$values=array('user_id'=>$id, 'meta_key'=>$key, 'meta_value'=>$value);\r\n\t\t\t$query = SharIt::db()->createCommand()->insertInto(SharDB::tableName('meta'))\r\n\t\t\t->values($values)\r\n\t\t\t->execute(); \r\n\t\t}\r\n return true;\r\n\t}", "public function addData()\n {\n $db = $this->connectToDb();\n \n $sql = \"CREATE TABLE IF NOT EXISTS $this->attribute (\n id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n userId int NOT NULL,\n $this->attribute varchar(35),\n FOREIGN KEY (userId) REFERENCES users(id))\";\n\n $db->query($sql);\n \n $sqlInsert = \"INSERT INTO $this->attribute (userId, $this->attribute) VALUES (?,?)\";\n $stmt = $db->prepare($sqlInsert);\n $stmt->execute(array($_SESSION['id'], $this->attributeValue));\n echo json_encode($this->errorList);\n }", "public function add()\n {\n return $this->table('user')->add(['id'=>3, 'name'=>'pihu', 'user'=>'pihu', 'password'=>'123', 'status'=>1]);\n //return $this->table('user')->add([3, 'pihu', 'pihu', '123', 1 ]);\n //return $this->table('user')->add([3, 'pihu', 'pihu', '123', 1]);\n //return $this->table('user')->add(3, 'pihu', 'pihu', '123', 1);\n }", "public function setMeta($name, $value)\n\t\t{\n\t\t\tSERIA_Base::db()->updateOrInsert('{user_meta_value}', array(\n\t\t\t\t'name',\n\t\t\t\t'owner'\n\t\t\t), array(\n\t\t\t\t'name',\n\t\t\t\t'owner',\n\t\t\t\t'value',\n\t\t\t\t'timestamp'\n\t\t\t), array(\n\t\t\t\t'name' => $name,\n\t\t\t\t'owner' => $this->get('id'),\n\t\t\t\t'value' => $value,\n\t\t\t\t'timestamp' => date('Y-m-d H:i:s')\n\t\t\t));\n\t\t\tSERIA_Hooks::dispatch('SERIA_User::setMeta', $this, $name, $value);\n\t\t}", "function add() {\n\t\t$this->User->init();\n\t\t$this->setAction('edit', $this->User->getID());\n\t}", "public function importUserMeta() {\n\t\t$usersPerAction = 100;\n\t\t$offset = aioseo()->transients->get( 'import_user_meta_yoast_seo' );\n\n\t\t$usersMeta = aioseo()->db\n\t\t\t->start( 'usermeta' . ' as um' )\n\t\t\t->whereRaw( \"um.meta_key IN ('facebook', 'twitter')\" )\n\t\t\t->whereRaw( \"um.meta_value != ''\" )\n\t\t\t->limit( $offset . ',' . $usersPerAction )\n\t\t\t->run()\n\t\t\t->result();\n\n\t\tif ( ! $usersMeta || ! count( $usersMeta ) ) {\n\t\t\taioseo()->transients->delete( 'import_user_meta_yoast_seo' );\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $usersMeta as $meta ) {\n\t\t\tupdate_user_meta( $meta->user_id, 'aioseo_' . $meta->meta_key, $meta->meta_value );\n\t\t}\n\n\t\tif ( count( $usersMeta ) === $usersPerAction ) {\n\t\t\taioseo()->transients->update( 'import_user_meta_yoast_seo', 100 + $offset, WEEK_IN_SECONDS );\n\t\t\taioseo()->helpers->scheduleSingleAction( aioseo()->importExport->yoastSeo->userActionName, 5 );\n\t\t} else {\n\t\t\taioseo()->transients->delete( 'import_user_meta_yoast_seo' );\n\t\t}\n\t}", "function set_custom_meta_info($user_id, $meta, $value)\r\n\t{\r\n\t\tupdate_user_meta ($user_id, $meta, $value);\t\t\r\n\t\treturn $user_id;\r\n\t\t\r\n\t}", "public static function addMeta(Meta $meta): void{\n array_push(self::$metas, $meta);\n }", "public function add_meta_data($id, $value) {\n $this->metadatafields[] = array('id' => $id, 'value' => $value);\n }", "public function run()\n {\n \n\n \\DB::table('user_meta')->delete();\n \n \\DB::table('user_meta')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'user_id' => 1,\n 'key' => 'register_ip',\n 'value' => '118.127.116.74',\n 'is_json' => 0,\n ),\n 1 => \n array (\n 'id' => 2,\n 'user_id' => 1,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/trueagency-dev/playz-local/1/379e72cd27d741f847fe6b621e4058467c51bc6aphppjXLlr.jpeg',\n 'is_json' => 0,\n ),\n 2 => \n array (\n 'id' => 3,\n 'user_id' => 1,\n 'key' => 'profile_picture_key',\n 'value' => '1/379e72cd27d741f847fe6b621e4058467c51bc6aphppjXLlr.jpeg',\n 'is_json' => 0,\n ),\n 3 => \n array (\n 'id' => 4,\n 'user_id' => 1,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 4 => \n array (\n 'id' => 5,\n 'user_id' => 1,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 5 => \n array (\n 'id' => 6,\n 'user_id' => 1,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 6 => \n array (\n 'id' => 7,\n 'user_id' => 1,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 7 => \n array (\n 'id' => 8,\n 'user_id' => 1,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 8 => \n array (\n 'id' => 9,\n 'user_id' => 1,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 9 => \n array (\n 'id' => 10,\n 'user_id' => 1,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 10 => \n array (\n 'id' => 11,\n 'user_id' => 1,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 11 => \n array (\n 'id' => 12,\n 'user_id' => 1,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 12 => \n array (\n 'id' => 13,\n 'user_id' => 1,\n 'key' => 'sent_paypal_warning_email',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 13 => \n array (\n 'id' => 14,\n 'user_id' => 1,\n 'key' => 'payment_email',\n 'value' => 'developers-facilitator@trueagency.com.au',\n 'is_json' => 0,\n ),\n 14 => \n array (\n 'id' => 15,\n 'user_id' => 1,\n 'key' => 'paypal_firstname',\n 'value' => 'test',\n 'is_json' => 0,\n ),\n 15 => \n array (\n 'id' => 16,\n 'user_id' => 1,\n 'key' => 'paypal_lastname',\n 'value' => 'facilitator',\n 'is_json' => 0,\n ),\n 16 => \n array (\n 'id' => 17,\n 'user_id' => 2,\n 'key' => 'register_ip',\n 'value' => '118.127.116.74',\n 'is_json' => 0,\n ),\n 17 => \n array (\n 'id' => 18,\n 'user_id' => 2,\n 'key' => 'website',\n 'value' => 'http://www.trueagency.com.au',\n 'is_json' => 0,\n ),\n 18 => \n array (\n 'id' => 19,\n 'user_id' => 2,\n 'key' => 'business_abn',\n 'value' => '12323432',\n 'is_json' => 0,\n ),\n 19 => \n array (\n 'id' => 20,\n 'user_id' => 2,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 20 => \n array (\n 'id' => 21,\n 'user_id' => 2,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 21 => \n array (\n 'id' => 22,\n 'user_id' => 2,\n 'key' => 'policy_food',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 22 => \n array (\n 'id' => 23,\n 'user_id' => 2,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 23 => \n array (\n 'id' => 24,\n 'user_id' => 2,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 24 => \n array (\n 'id' => 25,\n 'user_id' => 2,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 25 => \n array (\n 'id' => 26,\n 'user_id' => 2,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 26 => \n array (\n 'id' => 27,\n 'user_id' => 2,\n 'key' => 'payment_email',\n 'value' => 'developers-facilitator@trueagency.com.au',\n 'is_json' => 0,\n ),\n 27 => \n array (\n 'id' => 28,\n 'user_id' => 2,\n 'key' => 'paypal_firstname',\n 'value' => 'Test',\n 'is_json' => 0,\n ),\n 28 => \n array (\n 'id' => 29,\n 'user_id' => 2,\n 'key' => 'paypal_lastname',\n 'value' => 'facilitator',\n 'is_json' => 0,\n ),\n 29 => \n array (\n 'id' => 30,\n 'user_id' => 4,\n 'key' => 'register_ip',\n 'value' => '118.127.116.74',\n 'is_json' => 0,\n ),\n 30 => \n array (\n 'id' => 31,\n 'user_id' => 4,\n 'key' => 'title',\n 'value' => 'Miss',\n 'is_json' => 0,\n ),\n 31 => \n array (\n 'id' => 32,\n 'user_id' => 4,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 32 => \n array (\n 'id' => 33,\n 'user_id' => 4,\n 'key' => 'intended',\n 'value' => 'http://playz-v2.trueserver.com.au/prime',\n 'is_json' => 0,\n ),\n 33 => \n array (\n 'id' => 34,\n 'user_id' => 5,\n 'key' => 'register_ip',\n 'value' => '123.2.47.240',\n 'is_json' => 0,\n ),\n 34 => \n array (\n 'id' => 35,\n 'user_id' => 5,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/trueagency-dev/playz-local/5/69655801d0af4f794fefc5794b4c693c605d7833phptDDvww.jpeg',\n 'is_json' => 0,\n ),\n 35 => \n array (\n 'id' => 36,\n 'user_id' => 5,\n 'key' => 'profile_picture_key',\n 'value' => '5/69655801d0af4f794fefc5794b4c693c605d7833phptDDvww.jpeg',\n 'is_json' => 0,\n ),\n 36 => \n array (\n 'id' => 37,\n 'user_id' => 5,\n 'key' => 'website',\n 'value' => 'http://trueagency.com.au',\n 'is_json' => 0,\n ),\n 37 => \n array (\n 'id' => 38,\n 'user_id' => 5,\n 'key' => 'business_abn',\n 'value' => '21341231234',\n 'is_json' => 0,\n ),\n 38 => \n array (\n 'id' => 39,\n 'user_id' => 5,\n 'key' => 'business_summary',\n 'value' => 'Description',\n 'is_json' => 0,\n ),\n 39 => \n array (\n 'id' => 40,\n 'user_id' => 5,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"6\"]},\"2\":{\"options\":[\"2\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 40 => \n array (\n 'id' => 41,\n 'user_id' => 5,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 41 => \n array (\n 'id' => 42,\n 'user_id' => 5,\n 'key' => 'policy_food',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 42 => \n array (\n 'id' => 43,\n 'user_id' => 5,\n 'key' => 'policy_children',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 43 => \n array (\n 'id' => 44,\n 'user_id' => 5,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 44 => \n array (\n 'id' => 45,\n 'user_id' => 5,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 45 => \n array (\n 'id' => 46,\n 'user_id' => 5,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 46 => \n array (\n 'id' => 47,\n 'user_id' => 5,\n 'key' => 'payment_email',\n 'value' => 'developers-facilitator@trueagency.com.au',\n 'is_json' => 0,\n ),\n 47 => \n array (\n 'id' => 48,\n 'user_id' => 5,\n 'key' => 'paypal_firstname',\n 'value' => 'Test',\n 'is_json' => 0,\n ),\n 48 => \n array (\n 'id' => 49,\n 'user_id' => 5,\n 'key' => 'paypal_lastname',\n 'value' => 'Facilitator',\n 'is_json' => 0,\n ),\n 49 => \n array (\n 'id' => 50,\n 'user_id' => 6,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 50 => \n array (\n 'id' => 51,\n 'user_id' => 6,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/trueagency-dev/playz-local/6/0b1244999b39787caf6176d2eb3b307f7a89826dphppmdXLA.jpeg',\n 'is_json' => 0,\n ),\n 51 => \n array (\n 'id' => 52,\n 'user_id' => 6,\n 'key' => 'profile_picture_key',\n 'value' => '6/0b1244999b39787caf6176d2eb3b307f7a89826dphppmdXLA.jpeg',\n 'is_json' => 0,\n ),\n 52 => \n array (\n 'id' => 53,\n 'user_id' => 6,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 53 => \n array (\n 'id' => 54,\n 'user_id' => 6,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 54 => \n array (\n 'id' => 55,\n 'user_id' => 6,\n 'key' => 'mobile_number',\n 'value' => '0407 968 221',\n 'is_json' => 0,\n ),\n 55 => \n array (\n 'id' => 56,\n 'user_id' => 6,\n 'key' => 'business_summary',\n 'value' => 'We have been around for 15 years providing a range of kids\\' activities including holiday programs, classes and birthday parties.',\n 'is_json' => 0,\n ),\n 56 => \n array (\n 'id' => 57,\n 'user_id' => 6,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\",\"4\",\"5\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 57 => \n array (\n 'id' => 58,\n 'user_id' => 6,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 58 => \n array (\n 'id' => 59,\n 'user_id' => 6,\n 'key' => 'policy_food',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 59 => \n array (\n 'id' => 60,\n 'user_id' => 6,\n 'key' => 'policy_children',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 60 => \n array (\n 'id' => 61,\n 'user_id' => 6,\n 'key' => 'policy_allergy',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 61 => \n array (\n 'id' => 62,\n 'user_id' => 6,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 62 => \n array (\n 'id' => 63,\n 'user_id' => 6,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 63 => \n array (\n 'id' => 64,\n 'user_id' => 6,\n 'key' => 'sent_paypal_warning_email',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 64 => \n array (\n 'id' => 65,\n 'user_id' => 6,\n 'key' => 'payment_email',\n 'value' => 'developers-facilitator@trueagency.com.au',\n 'is_json' => 0,\n ),\n 65 => \n array (\n 'id' => 66,\n 'user_id' => 6,\n 'key' => 'paypal_firstname',\n 'value' => 'Test',\n 'is_json' => 0,\n ),\n 66 => \n array (\n 'id' => 67,\n 'user_id' => 6,\n 'key' => 'paypal_lastname',\n 'value' => 'Facilitator',\n 'is_json' => 0,\n ),\n 67 => \n array (\n 'id' => 68,\n 'user_id' => 7,\n 'key' => 'register_ip',\n 'value' => '203.217.41.252',\n 'is_json' => 0,\n ),\n 68 => \n array (\n 'id' => 71,\n 'user_id' => 7,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/trueagency-dev/playz-local/7/fe542356855042c3fb6c52402f52488f51c1b424phpnNn3Xv.jpeg',\n 'is_json' => 0,\n ),\n 69 => \n array (\n 'id' => 72,\n 'user_id' => 7,\n 'key' => 'profile_picture_key',\n 'value' => '7/fe542356855042c3fb6c52402f52488f51c1b424phpnNn3Xv.jpeg',\n 'is_json' => 0,\n ),\n 70 => \n array (\n 'id' => 73,\n 'user_id' => 7,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 71 => \n array (\n 'id' => 74,\n 'user_id' => 7,\n 'key' => 'business_abn',\n 'value' => '123456789',\n 'is_json' => 0,\n ),\n 72 => \n array (\n 'id' => 75,\n 'user_id' => 7,\n 'key' => 'mobile_number',\n 'value' => '0414775216',\n 'is_json' => 0,\n ),\n 73 => \n array (\n 'id' => 76,\n 'user_id' => 7,\n 'key' => 'business_summary',\n 'value' => 'fjdeorjffmsfkekdnfmanfmasfaf',\n 'is_json' => 0,\n ),\n 74 => \n array (\n 'id' => 77,\n 'user_id' => 7,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\"]},\"2\":{\"options\":[\"1\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 75 => \n array (\n 'id' => 78,\n 'user_id' => 7,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 76 => \n array (\n 'id' => 79,\n 'user_id' => 7,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 77 => \n array (\n 'id' => 80,\n 'user_id' => 7,\n 'key' => 'policy_children',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 78 => \n array (\n 'id' => 81,\n 'user_id' => 7,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 79 => \n array (\n 'id' => 82,\n 'user_id' => 8,\n 'key' => 'register_ip',\n 'value' => '101.181.153.137',\n 'is_json' => 0,\n ),\n 80 => \n array (\n 'id' => 83,\n 'user_id' => 8,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 81 => \n array (\n 'id' => 84,\n 'user_id' => 8,\n 'key' => 'business_abn',\n 'value' => '35607809839',\n 'is_json' => 0,\n ),\n 82 => \n array (\n 'id' => 85,\n 'user_id' => 8,\n 'key' => 'business_summary',\n 'value' => 'Prep for Prep is a fantastic way to prepare your child for Prep!\r\nDorinnia is a teacher with 25 years of experience. She has also been a Principal for 8 years.\r\nShe is passionate about getting children reading and writing early to give them confidence when they start their Primary School Journey.',\n 'is_json' => 0,\n ),\n 83 => \n array (\n 'id' => 86,\n 'user_id' => 8,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"2\"]},\"2\":{\"options\":[\"3\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 84 => \n array (\n 'id' => 87,\n 'user_id' => 8,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 85 => \n array (\n 'id' => 88,\n 'user_id' => 8,\n 'key' => 'policy_food',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 86 => \n array (\n 'id' => 89,\n 'user_id' => 8,\n 'key' => 'policy_children',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 87 => \n array (\n 'id' => 90,\n 'user_id' => 8,\n 'key' => 'policy_allergy',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 88 => \n array (\n 'id' => 91,\n 'user_id' => 8,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 89 => \n array (\n 'id' => 92,\n 'user_id' => 8,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 90 => \n array (\n 'id' => 93,\n 'user_id' => 8,\n 'key' => 'payment_email',\n 'value' => 'developers-facilitator@trueagency.com.au',\n 'is_json' => 0,\n ),\n 91 => \n array (\n 'id' => 94,\n 'user_id' => 8,\n 'key' => 'paypal_firstname',\n 'value' => 'Test',\n 'is_json' => 0,\n ),\n 92 => \n array (\n 'id' => 95,\n 'user_id' => 8,\n 'key' => 'paypal_lastname',\n 'value' => 'Facilitator',\n 'is_json' => 0,\n ),\n 93 => \n array (\n 'id' => 96,\n 'user_id' => 8,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 94 => \n array (\n 'id' => 97,\n 'user_id' => 7,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 95 => \n array (\n 'id' => 98,\n 'user_id' => 7,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 96 => \n array (\n 'id' => 99,\n 'user_id' => 7,\n 'key' => 'payment_email',\n 'value' => 'developers-facilitator@trueagency.com.au',\n 'is_json' => 0,\n ),\n 97 => \n array (\n 'id' => 100,\n 'user_id' => 7,\n 'key' => 'paypal_firstname',\n 'value' => 'Test',\n 'is_json' => 0,\n ),\n 98 => \n array (\n 'id' => 101,\n 'user_id' => 7,\n 'key' => 'paypal_lastname',\n 'value' => 'Facilitator',\n 'is_json' => 0,\n ),\n 99 => \n array (\n 'id' => 102,\n 'user_id' => 9,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 100 => \n array (\n 'id' => 103,\n 'user_id' => 9,\n 'key' => 'title',\n 'value' => 'Ms',\n 'is_json' => 0,\n ),\n 101 => \n array (\n 'id' => 104,\n 'user_id' => 9,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 102 => \n array (\n 'id' => 106,\n 'user_id' => 6,\n 'key' => 'email',\n 'value' => 'rachel@playz.com.au',\n 'is_json' => 0,\n ),\n 103 => \n array (\n 'id' => 107,\n 'user_id' => 6,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 104 => \n array (\n 'id' => 108,\n 'user_id' => 6,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 105 => \n array (\n 'id' => 109,\n 'user_id' => 6,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 106 => \n array (\n 'id' => 110,\n 'user_id' => 7,\n 'key' => 'email',\n 'value' => 'bruceandrachell@iinet.net.au',\n 'is_json' => 0,\n ),\n 107 => \n array (\n 'id' => 111,\n 'user_id' => 7,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 108 => \n array (\n 'id' => 112,\n 'user_id' => 7,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 109 => \n array (\n 'id' => 113,\n 'user_id' => 7,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 110 => \n array (\n 'id' => 114,\n 'user_id' => 5,\n 'key' => 'email',\n 'value' => 'mercia+tuesday@trueagency.com.au',\n 'is_json' => 0,\n ),\n 111 => \n array (\n 'id' => 115,\n 'user_id' => 5,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 112 => \n array (\n 'id' => 116,\n 'user_id' => 5,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 113 => \n array (\n 'id' => 117,\n 'user_id' => 5,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 114 => \n array (\n 'id' => 118,\n 'user_id' => 2,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 115 => \n array (\n 'id' => 119,\n 'user_id' => 2,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 116 => \n array (\n 'id' => 120,\n 'user_id' => 2,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>Testing Terms &amp; Conditions</p>',\n 'is_json' => 0,\n ),\n 117 => \n array (\n 'id' => 121,\n 'user_id' => 2,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 118 => \n array (\n 'id' => 122,\n 'user_id' => 2,\n 'key' => 'have_cancellation_policy',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 119 => \n array (\n 'id' => 123,\n 'user_id' => 2,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 120 => \n array (\n 'id' => 124,\n 'user_id' => 2,\n 'key' => 'provider_cancellation_policy',\n 'value' => '',\n 'is_json' => 0,\n ),\n 121 => \n array (\n 'id' => 125,\n 'user_id' => 2,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 122 => \n array (\n 'id' => 126,\n 'user_id' => 10,\n 'key' => 'register_ip',\n 'value' => '118.127.116.74',\n 'is_json' => 0,\n ),\n 123 => \n array (\n 'id' => 127,\n 'user_id' => 10,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 124 => \n array (\n 'id' => 128,\n 'user_id' => 10,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 125 => \n array (\n 'id' => 129,\n 'user_id' => 6,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 126 => \n array (\n 'id' => 130,\n 'user_id' => 6,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 127 => \n array (\n 'id' => 131,\n 'user_id' => 6,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>bla bla bla</p>',\n 'is_json' => 0,\n ),\n 128 => \n array (\n 'id' => 132,\n 'user_id' => 6,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 129 => \n array (\n 'id' => 133,\n 'user_id' => 6,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 130 => \n array (\n 'id' => 134,\n 'user_id' => 6,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 131 => \n array (\n 'id' => 135,\n 'user_id' => 6,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>bla bla bla</p>',\n 'is_json' => 0,\n ),\n 132 => \n array (\n 'id' => 136,\n 'user_id' => 6,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 133 => \n array (\n 'id' => 137,\n 'user_id' => 11,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 134 => \n array (\n 'id' => 138,\n 'user_id' => 12,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 135 => \n array (\n 'id' => 139,\n 'user_id' => 12,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 136 => \n array (\n 'id' => 140,\n 'user_id' => 12,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 137 => \n array (\n 'id' => 141,\n 'user_id' => 13,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 138 => \n array (\n 'id' => 142,\n 'user_id' => 14,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 139 => \n array (\n 'id' => 143,\n 'user_id' => 14,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 140 => \n array (\n 'id' => 144,\n 'user_id' => 14,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 141 => \n array (\n 'id' => 145,\n 'user_id' => 15,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 142 => \n array (\n 'id' => 146,\n 'user_id' => 15,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 143 => \n array (\n 'id' => 147,\n 'user_id' => 15,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 144 => \n array (\n 'id' => 148,\n 'user_id' => 16,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 145 => \n array (\n 'id' => 149,\n 'user_id' => 16,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 146 => \n array (\n 'id' => 150,\n 'user_id' => 16,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 147 => \n array (\n 'id' => 151,\n 'user_id' => 17,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 148 => \n array (\n 'id' => 152,\n 'user_id' => 17,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 149 => \n array (\n 'id' => 153,\n 'user_id' => 17,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 150 => \n array (\n 'id' => 154,\n 'user_id' => 18,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 151 => \n array (\n 'id' => 155,\n 'user_id' => 18,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 152 => \n array (\n 'id' => 156,\n 'user_id' => 18,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 153 => \n array (\n 'id' => 157,\n 'user_id' => 19,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 154 => \n array (\n 'id' => 158,\n 'user_id' => 19,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 155 => \n array (\n 'id' => 159,\n 'user_id' => 19,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 156 => \n array (\n 'id' => 160,\n 'user_id' => 20,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 157 => \n array (\n 'id' => 161,\n 'user_id' => 20,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 158 => \n array (\n 'id' => 162,\n 'user_id' => 20,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 159 => \n array (\n 'id' => 163,\n 'user_id' => 21,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 160 => \n array (\n 'id' => 164,\n 'user_id' => 21,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 161 => \n array (\n 'id' => 165,\n 'user_id' => 21,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 162 => \n array (\n 'id' => 166,\n 'user_id' => 21,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 163 => \n array (\n 'id' => 167,\n 'user_id' => 21,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 164 => \n array (\n 'id' => 168,\n 'user_id' => 21,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 165 => \n array (\n 'id' => 169,\n 'user_id' => 21,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 166 => \n array (\n 'id' => 170,\n 'user_id' => 21,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 167 => \n array (\n 'id' => 171,\n 'user_id' => 22,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 168 => \n array (\n 'id' => 172,\n 'user_id' => 21,\n 'key' => 'is_paypal_verified',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 169 => \n array (\n 'id' => 173,\n 'user_id' => 21,\n 'key' => 'is_paypal_business',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 170 => \n array (\n 'id' => 174,\n 'user_id' => 21,\n 'key' => 'payment_email',\n 'value' => 'donations-facilitator@playgroundideas.org',\n 'is_json' => 0,\n ),\n 171 => \n array (\n 'id' => 175,\n 'user_id' => 21,\n 'key' => 'paypal_firstname',\n 'value' => 'test',\n 'is_json' => 0,\n ),\n 172 => \n array (\n 'id' => 176,\n 'user_id' => 21,\n 'key' => 'paypal_lastname',\n 'value' => 'facilitator',\n 'is_json' => 0,\n ),\n 173 => \n array (\n 'id' => 177,\n 'user_id' => 23,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 174 => \n array (\n 'id' => 178,\n 'user_id' => 23,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 175 => \n array (\n 'id' => 179,\n 'user_id' => 23,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 176 => \n array (\n 'id' => 180,\n 'user_id' => 23,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"2\"]},\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 177 => \n array (\n 'id' => 181,\n 'user_id' => 23,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 178 => \n array (\n 'id' => 182,\n 'user_id' => 23,\n 'key' => 'policy_food',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 179 => \n array (\n 'id' => 183,\n 'user_id' => 23,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 180 => \n array (\n 'id' => 184,\n 'user_id' => 23,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 181 => \n array (\n 'id' => 185,\n 'user_id' => 24,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 182 => \n array (\n 'id' => 186,\n 'user_id' => 26,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 183 => \n array (\n 'id' => 187,\n 'user_id' => 26,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 184 => \n array (\n 'id' => 188,\n 'user_id' => 26,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 185 => \n array (\n 'id' => 189,\n 'user_id' => 26,\n 'key' => 'mobile_number',\n 'value' => '0407968221',\n 'is_json' => 0,\n ),\n 186 => \n array (\n 'id' => 190,\n 'user_id' => 26,\n 'key' => 'business_summary',\n 'value' => 'We teach music',\n 'is_json' => 0,\n ),\n 187 => \n array (\n 'id' => 191,\n 'user_id' => 26,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"2\"]},\"2\":{\"options\":[\"4\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 188 => \n array (\n 'id' => 192,\n 'user_id' => 26,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 189 => \n array (\n 'id' => 193,\n 'user_id' => 26,\n 'key' => 'policy_food',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 190 => \n array (\n 'id' => 194,\n 'user_id' => 26,\n 'key' => 'policy_children',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 191 => \n array (\n 'id' => 195,\n 'user_id' => 26,\n 'key' => 'policy_allergy',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 192 => \n array (\n 'id' => 196,\n 'user_id' => 26,\n 'key' => 'email',\n 'value' => 'rachel+1@playz.com.au',\n 'is_json' => 0,\n ),\n 193 => \n array (\n 'id' => 197,\n 'user_id' => 26,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 194 => \n array (\n 'id' => 198,\n 'user_id' => 26,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 195 => \n array (\n 'id' => 199,\n 'user_id' => 26,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 196 => \n array (\n 'id' => 200,\n 'user_id' => 26,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 197 => \n array (\n 'id' => 201,\n 'user_id' => 27,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 198 => \n array (\n 'id' => 202,\n 'user_id' => 27,\n 'key' => 'website',\n 'value' => 'http://google.com.au',\n 'is_json' => 0,\n ),\n 199 => \n array (\n 'id' => 203,\n 'user_id' => 27,\n 'key' => 'business_abn',\n 'value' => '123456789',\n 'is_json' => 0,\n ),\n 200 => \n array (\n 'id' => 204,\n 'user_id' => 27,\n 'key' => 'mobile_number',\n 'value' => '0414274533',\n 'is_json' => 0,\n ),\n 201 => \n array (\n 'id' => 205,\n 'user_id' => 27,\n 'key' => 'business_summary',\n 'value' => 'I am a provider who like to promote parties for children',\n 'is_json' => 0,\n ),\n 202 => \n array (\n 'id' => 206,\n 'user_id' => 27,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"4\",\"5\"]},\"2\":{\"options\":[\"2\",\"4\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\",\"4\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 203 => \n array (\n 'id' => 207,\n 'user_id' => 27,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 204 => \n array (\n 'id' => 208,\n 'user_id' => 27,\n 'key' => 'policy_food',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 205 => \n array (\n 'id' => 209,\n 'user_id' => 27,\n 'key' => 'policy_children',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 206 => \n array (\n 'id' => 210,\n 'user_id' => 27,\n 'key' => 'policy_allergy',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 207 => \n array (\n 'id' => 211,\n 'user_id' => 27,\n 'key' => 'email',\n 'value' => 'kristie+testprovider@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 208 => \n array (\n 'id' => 212,\n 'user_id' => 27,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 209 => \n array (\n 'id' => 213,\n 'user_id' => 27,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 210 => \n array (\n 'id' => 214,\n 'user_id' => 27,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 211 => \n array (\n 'id' => 215,\n 'user_id' => 27,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 212 => \n array (\n 'id' => 216,\n 'user_id' => 26,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1Amxj1JizdcGjnVt',\n 'is_json' => 0,\n ),\n 213 => \n array (\n 'id' => 217,\n 'user_id' => 26,\n 'key' => 'refresh_token',\n 'value' => 'rt_BARuLkA6fclFd4TZHlqimt9Y8UThzt2WkUuSLDRgex16Curc',\n 'is_json' => 0,\n ),\n 214 => \n array (\n 'id' => 218,\n 'user_id' => 26,\n 'key' => 'access_token',\n 'value' => 'sk_test_zqDlZ4notW18Zw9i4pmCyPID',\n 'is_json' => 0,\n ),\n 215 => \n array (\n 'id' => 220,\n 'user_id' => 21,\n 'key' => 'refresh_token',\n 'value' => 'rt_BAhkVmfWUfDQbR9W6TrEIrPZQtxIjF9kK5HKH14SMfOlHcmg',\n 'is_json' => 0,\n ),\n 216 => \n array (\n 'id' => 221,\n 'user_id' => 21,\n 'key' => 'access_token',\n 'value' => 'sk_test_aNLI37c0g6POvJGQzNG9csVr',\n 'is_json' => 0,\n ),\n 217 => \n array (\n 'id' => 222,\n 'user_id' => 21,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1AoKK7Af7SkYIdly',\n 'is_json' => 0,\n ),\n 218 => \n array (\n 'id' => 223,\n 'user_id' => 27,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1AnzlMFAiTSkeper',\n 'is_json' => 0,\n ),\n 219 => \n array (\n 'id' => 224,\n 'user_id' => 27,\n 'key' => 'refresh_token',\n 'value' => 'rt_BAKcfGdoacOIJx0vbrZaywJjhO86QaS99JTfqZkLhWsCW8sa',\n 'is_json' => 0,\n ),\n 220 => \n array (\n 'id' => 225,\n 'user_id' => 27,\n 'key' => 'access_token',\n 'value' => 'sk_test_YkUR5QEPg3vt9xZvJ7ADXsHQ',\n 'is_json' => 0,\n ),\n 221 => \n array (\n 'id' => 226,\n 'user_id' => 28,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 222 => \n array (\n 'id' => 227,\n 'user_id' => 28,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/28/045954de1b18deb5a953bd6e92ce91b40c5faf94phpW49ATD.jpeg',\n 'is_json' => 0,\n ),\n 223 => \n array (\n 'id' => 228,\n 'user_id' => 28,\n 'key' => 'profile_picture_key',\n 'value' => '28/045954de1b18deb5a953bd6e92ce91b40c5faf94phpW49ATD.jpeg',\n 'is_json' => 0,\n ),\n 224 => \n array (\n 'id' => 229,\n 'user_id' => 28,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 225 => \n array (\n 'id' => 230,\n 'user_id' => 28,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 226 => \n array (\n 'id' => 231,\n 'user_id' => 28,\n 'key' => 'mobile_number',\n 'value' => '1287361823716',\n 'is_json' => 0,\n ),\n 227 => \n array (\n 'id' => 232,\n 'user_id' => 28,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"2\"]},\"2\":{\"options\":[\"4\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 228 => \n array (\n 'id' => 233,\n 'user_id' => 28,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 229 => \n array (\n 'id' => 234,\n 'user_id' => 28,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 230 => \n array (\n 'id' => 235,\n 'user_id' => 28,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 231 => \n array (\n 'id' => 236,\n 'user_id' => 28,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 232 => \n array (\n 'id' => 237,\n 'user_id' => 28,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1AtYnWE7YN1MP4es',\n 'is_json' => 0,\n ),\n 233 => \n array (\n 'id' => 238,\n 'user_id' => 28,\n 'key' => 'refresh_token',\n 'value' => 'rt_BG4xemNP3Emyd9JkCnSSeFuJD3uZLAU3G7iXrnlrvMS5pqUH',\n 'is_json' => 0,\n ),\n 234 => \n array (\n 'id' => 239,\n 'user_id' => 28,\n 'key' => 'access_token',\n 'value' => 'sk_test_U3W1Axh4AutEalRpZvQpx92N',\n 'is_json' => 0,\n ),\n 235 => \n array (\n 'id' => 240,\n 'user_id' => 28,\n 'key' => 'email',\n 'value' => 'rachel+2@playz.com.au',\n 'is_json' => 0,\n ),\n 236 => \n array (\n 'id' => 241,\n 'user_id' => 28,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 237 => \n array (\n 'id' => 242,\n 'user_id' => 28,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 238 => \n array (\n 'id' => 243,\n 'user_id' => 28,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 239 => \n array (\n 'id' => 244,\n 'user_id' => 28,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 240 => \n array (\n 'id' => 245,\n 'user_id' => 28,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 241 => \n array (\n 'id' => 246,\n 'user_id' => 5,\n 'key' => 'listings_status',\n 'value' => '{\"listings\":{\"ENABLED\":[],\"DRAFT\":[],\"DELETED\":[\"BOOKING\"]},\"linkz_enabled\":false}',\n 'is_json' => 1,\n ),\n 242 => \n array (\n 'id' => 247,\n 'user_id' => 29,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 243 => \n array (\n 'id' => 248,\n 'user_id' => 29,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 244 => \n array (\n 'id' => 249,\n 'user_id' => 29,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 245 => \n array (\n 'id' => 250,\n 'user_id' => 29,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 246 => \n array (\n 'id' => 251,\n 'user_id' => 29,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 247 => \n array (\n 'id' => 252,\n 'user_id' => 29,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 248 => \n array (\n 'id' => 253,\n 'user_id' => 29,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 249 => \n array (\n 'id' => 254,\n 'user_id' => 29,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 250 => \n array (\n 'id' => 255,\n 'user_id' => 29,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1AtYnWE7YN1MP4es',\n 'is_json' => 0,\n ),\n 251 => \n array (\n 'id' => 256,\n 'user_id' => 29,\n 'key' => 'refresh_token',\n 'value' => 'rt_BGgLnlqe4qAdx2aMk1V7atQOCzaHJCLvkfEv4hCMv5FWzC8r',\n 'is_json' => 0,\n ),\n 252 => \n array (\n 'id' => 257,\n 'user_id' => 29,\n 'key' => 'access_token',\n 'value' => 'sk_test_yma25yKqlNGAFbiFcoEQAVlJ',\n 'is_json' => 0,\n ),\n 253 => \n array (\n 'id' => 258,\n 'user_id' => 29,\n 'key' => 'email',\n 'value' => 'j_sharp70@bigpond.com',\n 'is_json' => 0,\n ),\n 254 => \n array (\n 'id' => 259,\n 'user_id' => 29,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 255 => \n array (\n 'id' => 260,\n 'user_id' => 29,\n 'key' => 'business_summary',\n 'value' => 'We run kids\\' activities',\n 'is_json' => 0,\n ),\n 256 => \n array (\n 'id' => 261,\n 'user_id' => 29,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 257 => \n array (\n 'id' => 262,\n 'user_id' => 29,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 258 => \n array (\n 'id' => 263,\n 'user_id' => 29,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 259 => \n array (\n 'id' => 264,\n 'user_id' => 21,\n 'key' => 'email',\n 'value' => 'kristie+provider@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 260 => \n array (\n 'id' => 265,\n 'user_id' => 21,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 261 => \n array (\n 'id' => 266,\n 'user_id' => 21,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 262 => \n array (\n 'id' => 267,\n 'user_id' => 21,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 263 => \n array (\n 'id' => 268,\n 'user_id' => 21,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 264 => \n array (\n 'id' => 269,\n 'user_id' => 30,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 265 => \n array (\n 'id' => 270,\n 'user_id' => 30,\n 'key' => 'website',\n 'value' => 'http://playkidstestsite.com',\n 'is_json' => 0,\n ),\n 266 => \n array (\n 'id' => 271,\n 'user_id' => 30,\n 'key' => 'business_abn',\n 'value' => '51 824 753 556',\n 'is_json' => 0,\n ),\n 267 => \n array (\n 'id' => 272,\n 'user_id' => 30,\n 'key' => 'mobile_number',\n 'value' => '0456982365',\n 'is_json' => 0,\n ),\n 268 => \n array (\n 'id' => 273,\n 'user_id' => 30,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"]},\"2\":{\"options\":[\"1\",\"3\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\",\"4\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 269 => \n array (\n 'id' => 274,\n 'user_id' => 30,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 270 => \n array (\n 'id' => 275,\n 'user_id' => 30,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 271 => \n array (\n 'id' => 276,\n 'user_id' => 30,\n 'key' => 'policy_children',\n 'value' => '[\"YES\",\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 272 => \n array (\n 'id' => 277,\n 'user_id' => 30,\n 'key' => 'policy_allergy',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 273 => \n array (\n 'id' => 278,\n 'user_id' => 31,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 274 => \n array (\n 'id' => 279,\n 'user_id' => 31,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 275 => \n array (\n 'id' => 280,\n 'user_id' => 31,\n 'key' => 'find_playz',\n 'value' => 'From a friend',\n 'is_json' => 0,\n ),\n 276 => \n array (\n 'id' => 281,\n 'user_id' => 13,\n 'key' => 'listings_status',\n 'value' => '{\"listings\":{\"ENABLED\":[],\"DRAFT\":[],\"DELETED\":[]},\"linkz_enabled\":false}',\n 'is_json' => 1,\n ),\n 277 => \n array (\n 'id' => 282,\n 'user_id' => 32,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 278 => \n array (\n 'id' => 283,\n 'user_id' => 32,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 279 => \n array (\n 'id' => 284,\n 'user_id' => 32,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 280 => \n array (\n 'id' => 285,\n 'user_id' => 30,\n 'key' => 'email',\n 'value' => 'manasi.pathirana+provider@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 281 => \n array (\n 'id' => 286,\n 'user_id' => 30,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 282 => \n array (\n 'id' => 287,\n 'user_id' => 30,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 283 => \n array (\n 'id' => 288,\n 'user_id' => 30,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 284 => \n array (\n 'id' => 289,\n 'user_id' => 30,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 285 => \n array (\n 'id' => 290,\n 'user_id' => 30,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 286 => \n array (\n 'id' => 291,\n 'user_id' => 30,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1AyAnCHdsi5YvyE7',\n 'is_json' => 0,\n ),\n 287 => \n array (\n 'id' => 292,\n 'user_id' => 30,\n 'key' => 'refresh_token',\n 'value' => 'rt_BNSD8xTfDird6ulg6qa8TVEVdIp3wF5Vm09JkZyyec34GH8S',\n 'is_json' => 0,\n ),\n 288 => \n array (\n 'id' => 293,\n 'user_id' => 30,\n 'key' => 'access_token',\n 'value' => 'sk_test_Ozc6ROFvx05THeEbTe45O3yk',\n 'is_json' => 0,\n ),\n 289 => \n array (\n 'id' => 294,\n 'user_id' => 29,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/29/76c037f4a0f5e39cf2ffbdf7264b97ab270fe39dphp5XiFDq.jpeg',\n 'is_json' => 0,\n ),\n 290 => \n array (\n 'id' => 295,\n 'user_id' => 29,\n 'key' => 'profile_picture_key',\n 'value' => '29/76c037f4a0f5e39cf2ffbdf7264b97ab270fe39dphp5XiFDq.jpeg',\n 'is_json' => 0,\n ),\n 291 => \n array (\n 'id' => 296,\n 'user_id' => 29,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 292 => \n array (\n 'id' => 297,\n 'user_id' => 29,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 293 => \n array (\n 'id' => 298,\n 'user_id' => 29,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 294 => \n array (\n 'id' => 299,\n 'user_id' => 29,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 295 => \n array (\n 'id' => 300,\n 'user_id' => 33,\n 'key' => 'register_ip',\n 'value' => '1.136.109.85',\n 'is_json' => 0,\n ),\n 296 => \n array (\n 'id' => 301,\n 'user_id' => 33,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/33/5f0c6c79c34946badcbfbd177bc00228160d375fphpJibbkE.jpeg',\n 'is_json' => 0,\n ),\n 297 => \n array (\n 'id' => 302,\n 'user_id' => 33,\n 'key' => 'profile_picture_key',\n 'value' => '33/5f0c6c79c34946badcbfbd177bc00228160d375fphpJibbkE.jpeg',\n 'is_json' => 0,\n ),\n 298 => \n array (\n 'id' => 303,\n 'user_id' => 33,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 299 => \n array (\n 'id' => 304,\n 'user_id' => 33,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 300 => \n array (\n 'id' => 305,\n 'user_id' => 33,\n 'key' => 'mobile_number',\n 'value' => '0407968221',\n 'is_json' => 0,\n ),\n 301 => \n array (\n 'id' => 306,\n 'user_id' => 33,\n 'key' => 'business_summary',\n 'value' => 'We run great music classes for kids with a range of instruments.',\n 'is_json' => 0,\n ),\n 302 => \n array (\n 'id' => 307,\n 'user_id' => 33,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 303 => \n array (\n 'id' => 308,\n 'user_id' => 33,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 304 => \n array (\n 'id' => 309,\n 'user_id' => 33,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 305 => \n array (\n 'id' => 310,\n 'user_id' => 33,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 306 => \n array (\n 'id' => 311,\n 'user_id' => 33,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 307 => \n array (\n 'id' => 312,\n 'user_id' => 33,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1B141OIg63YtHuQG',\n 'is_json' => 0,\n ),\n 308 => \n array (\n 'id' => 313,\n 'user_id' => 33,\n 'key' => 'refresh_token',\n 'value' => 'rt_BSe6uUiOOH7ih0xDQHKLRMoDYv10JNr9bdhtpFQJHI07qEd1',\n 'is_json' => 0,\n ),\n 309 => \n array (\n 'id' => 314,\n 'user_id' => 33,\n 'key' => 'access_token',\n 'value' => 'sk_test_u1d8agoQFkGFgN2r4ZzBy1Fo',\n 'is_json' => 0,\n ),\n 310 => \n array (\n 'id' => 315,\n 'user_id' => 33,\n 'key' => 'email',\n 'value' => 'rachel+3@playz.com.au',\n 'is_json' => 0,\n ),\n 311 => \n array (\n 'id' => 316,\n 'user_id' => 33,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 312 => \n array (\n 'id' => 317,\n 'user_id' => 33,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 313 => \n array (\n 'id' => 318,\n 'user_id' => 33,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 314 => \n array (\n 'id' => 319,\n 'user_id' => 33,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 315 => \n array (\n 'id' => 320,\n 'user_id' => 34,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 316 => \n array (\n 'id' => 321,\n 'user_id' => 34,\n 'key' => 'title',\n 'value' => 'Ms',\n 'is_json' => 0,\n ),\n 317 => \n array (\n 'id' => 322,\n 'user_id' => 34,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 318 => \n array (\n 'id' => 327,\n 'user_id' => 36,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 319 => \n array (\n 'id' => 328,\n 'user_id' => 36,\n 'key' => 'title',\n 'value' => 'Mr',\n 'is_json' => 0,\n ),\n 320 => \n array (\n 'id' => 329,\n 'user_id' => 36,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 321 => \n array (\n 'id' => 330,\n 'user_id' => 37,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 322 => \n array (\n 'id' => 331,\n 'user_id' => 37,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 323 => \n array (\n 'id' => 332,\n 'user_id' => 37,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 324 => \n array (\n 'id' => 333,\n 'user_id' => 37,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 325 => \n array (\n 'id' => 334,\n 'user_id' => 37,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 326 => \n array (\n 'id' => 335,\n 'user_id' => 37,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 327 => \n array (\n 'id' => 336,\n 'user_id' => 37,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 328 => \n array (\n 'id' => 337,\n 'user_id' => 37,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 329 => \n array (\n 'id' => 338,\n 'user_id' => 37,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1AyAnCHdsi5YvyE7',\n 'is_json' => 0,\n ),\n 330 => \n array (\n 'id' => 339,\n 'user_id' => 37,\n 'key' => 'refresh_token',\n 'value' => 'rt_BOY1HbhYToXLWblzcA9AITWg6aZqBqObBFXMU99h155Fg6pz',\n 'is_json' => 0,\n ),\n 331 => \n array (\n 'id' => 340,\n 'user_id' => 37,\n 'key' => 'access_token',\n 'value' => 'sk_test_otVJbTaiASTKKii1vEpWPoBL',\n 'is_json' => 0,\n ),\n 332 => \n array (\n 'id' => 341,\n 'user_id' => 38,\n 'key' => 'register_ip',\n 'value' => '202.92.67.178',\n 'is_json' => 0,\n ),\n 333 => \n array (\n 'id' => 342,\n 'user_id' => 38,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/38/2ec4e4180ca8daafef415d7bdb1285e91938cf82phpgej27c.jpeg',\n 'is_json' => 0,\n ),\n 334 => \n array (\n 'id' => 343,\n 'user_id' => 38,\n 'key' => 'profile_picture_key',\n 'value' => '38/2ec4e4180ca8daafef415d7bdb1285e91938cf82phpgej27c.jpeg',\n 'is_json' => 0,\n ),\n 335 => \n array (\n 'id' => 344,\n 'user_id' => 38,\n 'key' => 'website',\n 'value' => 'http://www.google.com.au',\n 'is_json' => 0,\n ),\n 336 => \n array (\n 'id' => 345,\n 'user_id' => 38,\n 'key' => 'business_abn',\n 'value' => '12345',\n 'is_json' => 0,\n ),\n 337 => \n array (\n 'id' => 346,\n 'user_id' => 38,\n 'key' => 'mobile_number',\n 'value' => '123456',\n 'is_json' => 0,\n ),\n 338 => \n array (\n 'id' => 347,\n 'user_id' => 38,\n 'key' => 'business_summary',\n 'value' => 'Our tennis school is awesome',\n 'is_json' => 0,\n ),\n 339 => \n array (\n 'id' => 348,\n 'user_id' => 38,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\",\"3\"]},\"2\":{\"options\":[\"3\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 340 => \n array (\n 'id' => 349,\n 'user_id' => 38,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 341 => \n array (\n 'id' => 350,\n 'user_id' => 38,\n 'key' => 'policy_food',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 342 => \n array (\n 'id' => 351,\n 'user_id' => 38,\n 'key' => 'policy_children',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 343 => \n array (\n 'id' => 352,\n 'user_id' => 38,\n 'key' => 'policy_allergy',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 344 => \n array (\n 'id' => 353,\n 'user_id' => 39,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 345 => \n array (\n 'id' => 354,\n 'user_id' => 39,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 346 => \n array (\n 'id' => 355,\n 'user_id' => 39,\n 'key' => 'find_playz',\n 'value' => 'From a friend',\n 'is_json' => 0,\n ),\n 347 => \n array (\n 'id' => 356,\n 'user_id' => 38,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1B1lRmH3n4GVeCCP',\n 'is_json' => 0,\n ),\n 348 => \n array (\n 'id' => 357,\n 'user_id' => 38,\n 'key' => 'refresh_token',\n 'value' => 'rt_BOYZzPvASxn0bt9cYkLotnUraIqcPFPHeXeTmD4vjgVP625x',\n 'is_json' => 0,\n ),\n 349 => \n array (\n 'id' => 358,\n 'user_id' => 38,\n 'key' => 'access_token',\n 'value' => 'sk_test_dGvYobTCD01bEHSXVL1r2RA9',\n 'is_json' => 0,\n ),\n 350 => \n array (\n 'id' => 359,\n 'user_id' => 38,\n 'key' => 'email',\n 'value' => 'surend_dayal@hotmail.com',\n 'is_json' => 0,\n ),\n 351 => \n array (\n 'id' => 360,\n 'user_id' => 38,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 352 => \n array (\n 'id' => 361,\n 'user_id' => 38,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 353 => \n array (\n 'id' => 362,\n 'user_id' => 38,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 354 => \n array (\n 'id' => 363,\n 'user_id' => 38,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 355 => \n array (\n 'id' => 364,\n 'user_id' => 33,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 356 => \n array (\n 'id' => 365,\n 'user_id' => 33,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 357 => \n array (\n 'id' => 366,\n 'user_id' => 33,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>global T&amp; Cs</p>',\n 'is_json' => 0,\n ),\n 358 => \n array (\n 'id' => 367,\n 'user_id' => 33,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 359 => \n array (\n 'id' => 368,\n 'user_id' => 33,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 360 => \n array (\n 'id' => 369,\n 'user_id' => 33,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 361 => \n array (\n 'id' => 370,\n 'user_id' => 33,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>Global Cancellation policy</p>',\n 'is_json' => 0,\n ),\n 362 => \n array (\n 'id' => 371,\n 'user_id' => 33,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 363 => \n array (\n 'id' => 372,\n 'user_id' => 40,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 364 => \n array (\n 'id' => 373,\n 'user_id' => 40,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/40/159944a8c89a7c8bcb417c0ccfc0ee8a5e92d114phpJIDG5Q.jpeg',\n 'is_json' => 0,\n ),\n 365 => \n array (\n 'id' => 374,\n 'user_id' => 40,\n 'key' => 'profile_picture_key',\n 'value' => '40/159944a8c89a7c8bcb417c0ccfc0ee8a5e92d114phpJIDG5Q.jpeg',\n 'is_json' => 0,\n ),\n 366 => \n array (\n 'id' => 375,\n 'user_id' => 40,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 367 => \n array (\n 'id' => 376,\n 'user_id' => 40,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 368 => \n array (\n 'id' => 377,\n 'user_id' => 40,\n 'key' => 'mobile_number',\n 'value' => '0407968221',\n 'is_json' => 0,\n ),\n 369 => \n array (\n 'id' => 378,\n 'user_id' => 40,\n 'key' => 'business_summary',\n 'value' => 'We teach kids to cook+',\n 'is_json' => 0,\n ),\n 370 => \n array (\n 'id' => 379,\n 'user_id' => 40,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 371 => \n array (\n 'id' => 380,\n 'user_id' => 40,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 372 => \n array (\n 'id' => 381,\n 'user_id' => 40,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 373 => \n array (\n 'id' => 382,\n 'user_id' => 40,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 374 => \n array (\n 'id' => 383,\n 'user_id' => 40,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 375 => \n array (\n 'id' => 384,\n 'user_id' => 40,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1B141OIg63YtHuQG',\n 'is_json' => 0,\n ),\n 376 => \n array (\n 'id' => 385,\n 'user_id' => 40,\n 'key' => 'refresh_token',\n 'value' => 'rt_BSIGUysXzAuoSwwjbeQAgqdusmNfBzxCK6nnslpsj48NRX10',\n 'is_json' => 0,\n ),\n 377 => \n array (\n 'id' => 386,\n 'user_id' => 40,\n 'key' => 'access_token',\n 'value' => 'sk_test_dfkEujf0WXRtFfyFtZc07tK4',\n 'is_json' => 0,\n ),\n 378 => \n array (\n 'id' => 387,\n 'user_id' => 40,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 379 => \n array (\n 'id' => 388,\n 'user_id' => 40,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 380 => \n array (\n 'id' => 389,\n 'user_id' => 40,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>Global Tcs</p>',\n 'is_json' => 0,\n ),\n 381 => \n array (\n 'id' => 390,\n 'user_id' => 40,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 382 => \n array (\n 'id' => 391,\n 'user_id' => 40,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 383 => \n array (\n 'id' => 392,\n 'user_id' => 40,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 384 => \n array (\n 'id' => 393,\n 'user_id' => 40,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>Global TCs</p>',\n 'is_json' => 0,\n ),\n 385 => \n array (\n 'id' => 394,\n 'user_id' => 40,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 386 => \n array (\n 'id' => 395,\n 'user_id' => 40,\n 'key' => 'email',\n 'value' => 'rachel+1@playz.com.au',\n 'is_json' => 0,\n ),\n 387 => \n array (\n 'id' => 396,\n 'user_id' => 40,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 388 => \n array (\n 'id' => 397,\n 'user_id' => 40,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 389 => \n array (\n 'id' => 398,\n 'user_id' => 40,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 390 => \n array (\n 'id' => 399,\n 'user_id' => 40,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 391 => \n array (\n 'id' => 400,\n 'user_id' => 33,\n 'key' => 'title',\n 'value' => '',\n 'is_json' => 0,\n ),\n 392 => \n array (\n 'id' => 401,\n 'user_id' => 41,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 393 => \n array (\n 'id' => 404,\n 'user_id' => 41,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/41/7a045f95fc3de46f6cabc7bae1dd61db7aef6526php26g9KB.jpeg',\n 'is_json' => 0,\n ),\n 394 => \n array (\n 'id' => 405,\n 'user_id' => 41,\n 'key' => 'profile_picture_key',\n 'value' => '41/7a045f95fc3de46f6cabc7bae1dd61db7aef6526php26g9KB.jpeg',\n 'is_json' => 0,\n ),\n 395 => \n array (\n 'id' => 406,\n 'user_id' => 41,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 396 => \n array (\n 'id' => 407,\n 'user_id' => 41,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 397 => \n array (\n 'id' => 408,\n 'user_id' => 41,\n 'key' => 'mobile_number',\n 'value' => '0407968221',\n 'is_json' => 0,\n ),\n 398 => \n array (\n 'id' => 409,\n 'user_id' => 41,\n 'key' => 'business_summary',\n 'value' => 'We teach dance - all dance',\n 'is_json' => 0,\n ),\n 399 => \n array (\n 'id' => 410,\n 'user_id' => 41,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 400 => \n array (\n 'id' => 411,\n 'user_id' => 41,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 401 => \n array (\n 'id' => 412,\n 'user_id' => 41,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 402 => \n array (\n 'id' => 413,\n 'user_id' => 41,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 403 => \n array (\n 'id' => 414,\n 'user_id' => 41,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 404 => \n array (\n 'id' => 415,\n 'user_id' => 41,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 405 => \n array (\n 'id' => 416,\n 'user_id' => 41,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 406 => \n array (\n 'id' => 417,\n 'user_id' => 41,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 407 => \n array (\n 'id' => 418,\n 'user_id' => 41,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>Dance Classes - TCs&nbsp;</p>',\n 'is_json' => 0,\n ),\n 408 => \n array (\n 'id' => 419,\n 'user_id' => 41,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 409 => \n array (\n 'id' => 420,\n 'user_id' => 41,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 410 => \n array (\n 'id' => 421,\n 'user_id' => 41,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 411 => \n array (\n 'id' => 422,\n 'user_id' => 41,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>Dance classes TCs</p>',\n 'is_json' => 0,\n ),\n 412 => \n array (\n 'id' => 423,\n 'user_id' => 41,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 413 => \n array (\n 'id' => 424,\n 'user_id' => 41,\n 'key' => 'stripe_user_id',\n 'value' => 'acct_1B141OIg63YtHuQG',\n 'is_json' => 0,\n ),\n 414 => \n array (\n 'id' => 425,\n 'user_id' => 41,\n 'key' => 'refresh_token',\n 'value' => 'rt_BTRgt7PCROaaUsOj9qc8ttKv7uN6PMApVwQKncxafdLWJo5w',\n 'is_json' => 0,\n ),\n 415 => \n array (\n 'id' => 426,\n 'user_id' => 41,\n 'key' => 'access_token',\n 'value' => 'sk_test_a7A1Hipj1IF81WhPEiEvz6vC',\n 'is_json' => 0,\n ),\n 416 => \n array (\n 'id' => 427,\n 'user_id' => 42,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 417 => \n array (\n 'id' => 428,\n 'user_id' => 42,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/42/aab43f60271e640cee91a9d6eef1d0a468f67780phpNi4c57.jpeg',\n 'is_json' => 0,\n ),\n 418 => \n array (\n 'id' => 429,\n 'user_id' => 42,\n 'key' => 'profile_picture_key',\n 'value' => '42/aab43f60271e640cee91a9d6eef1d0a468f67780phpNi4c57.jpeg',\n 'is_json' => 0,\n ),\n 419 => \n array (\n 'id' => 430,\n 'user_id' => 42,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 420 => \n array (\n 'id' => 431,\n 'user_id' => 42,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 421 => \n array (\n 'id' => 432,\n 'user_id' => 42,\n 'key' => 'mobile_number',\n 'value' => '0407968221',\n 'is_json' => 0,\n ),\n 422 => \n array (\n 'id' => 433,\n 'user_id' => 42,\n 'key' => 'business_summary',\n 'value' => 'we have been around for 50 years ',\n 'is_json' => 0,\n ),\n 423 => \n array (\n 'id' => 434,\n 'user_id' => 42,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 424 => \n array (\n 'id' => 435,\n 'user_id' => 42,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 425 => \n array (\n 'id' => 436,\n 'user_id' => 42,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 426 => \n array (\n 'id' => 437,\n 'user_id' => 42,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 427 => \n array (\n 'id' => 438,\n 'user_id' => 42,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 428 => \n array (\n 'id' => 439,\n 'user_id' => 42,\n 'key' => 'refresh_token',\n 'value' => 'rt_BQnxacSFqodPZX7h6mXYzs71U85pHG7QZvFj3Hu8pzBSCu6X',\n 'is_json' => 0,\n ),\n 429 => \n array (\n 'id' => 440,\n 'user_id' => 42,\n 'key' => 'access_token',\n 'value' => 'sk_test_qiYciKWx8CBT9RtkpPWWelMN',\n 'is_json' => 0,\n ),\n 430 => \n array (\n 'id' => 441,\n 'user_id' => 42,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 431 => \n array (\n 'id' => 442,\n 'user_id' => 42,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 432 => \n array (\n 'id' => 443,\n 'user_id' => 42,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 433 => \n array (\n 'id' => 444,\n 'user_id' => 42,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>2nd listing TCs</p>',\n 'is_json' => 0,\n ),\n 434 => \n array (\n 'id' => 445,\n 'user_id' => 42,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 435 => \n array (\n 'id' => 446,\n 'user_id' => 42,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 436 => \n array (\n 'id' => 447,\n 'user_id' => 42,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 437 => \n array (\n 'id' => 448,\n 'user_id' => 42,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>second listing TCs</p>',\n 'is_json' => 0,\n ),\n 438 => \n array (\n 'id' => 449,\n 'user_id' => 42,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 439 => \n array (\n 'id' => 450,\n 'user_id' => 42,\n 'key' => 'email',\n 'value' => 'rachel+4@playz.com.au',\n 'is_json' => 0,\n ),\n 440 => \n array (\n 'id' => 451,\n 'user_id' => 42,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 441 => \n array (\n 'id' => 452,\n 'user_id' => 42,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 442 => \n array (\n 'id' => 453,\n 'user_id' => 42,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 443 => \n array (\n 'id' => 454,\n 'user_id' => 42,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 444 => \n array (\n 'id' => 455,\n 'user_id' => 37,\n 'key' => 'email',\n 'value' => 'manasi.pathirana+provider@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 445 => \n array (\n 'id' => 456,\n 'user_id' => 37,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 446 => \n array (\n 'id' => 457,\n 'user_id' => 37,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 447 => \n array (\n 'id' => 458,\n 'user_id' => 37,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 448 => \n array (\n 'id' => 459,\n 'user_id' => 37,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 449 => \n array (\n 'id' => 460,\n 'user_id' => 37,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 450 => \n array (\n 'id' => 461,\n 'user_id' => 43,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 451 => \n array (\n 'id' => 462,\n 'user_id' => 43,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 452 => \n array (\n 'id' => 463,\n 'user_id' => 43,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 453 => \n array (\n 'id' => 465,\n 'user_id' => 44,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 454 => \n array (\n 'id' => 466,\n 'user_id' => 44,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 455 => \n array (\n 'id' => 467,\n 'user_id' => 44,\n 'key' => 'find_playz',\n 'value' => 'Saw an advertisement for playz',\n 'is_json' => 0,\n ),\n 456 => \n array (\n 'id' => 468,\n 'user_id' => 37,\n 'key' => 'listings_status',\n 'value' => '{\"listings\":{\"ENABLED\":[\"BOOKING\",\"LISTING\"],\"DRAFT\":[\"BOOKING\"],\"DELETED\":[]},\"linkz_enabled\":false}',\n 'is_json' => 1,\n ),\n 457 => \n array (\n 'id' => 469,\n 'user_id' => 45,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 458 => \n array (\n 'id' => 470,\n 'user_id' => 45,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 459 => \n array (\n 'id' => 471,\n 'user_id' => 45,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 460 => \n array (\n 'id' => 472,\n 'user_id' => 45,\n 'key' => 'mobile_number',\n 'value' => '04141414141',\n 'is_json' => 0,\n ),\n 461 => \n array (\n 'id' => 473,\n 'user_id' => 45,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"3\"]},\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 462 => \n array (\n 'id' => 474,\n 'user_id' => 45,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 463 => \n array (\n 'id' => 475,\n 'user_id' => 45,\n 'key' => 'policy_food',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 464 => \n array (\n 'id' => 476,\n 'user_id' => 45,\n 'key' => 'policy_children',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 465 => \n array (\n 'id' => 477,\n 'user_id' => 45,\n 'key' => 'policy_allergy',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 466 => \n array (\n 'id' => 478,\n 'user_id' => 45,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/45/4d7339bbd14adf907798b3c0e78adec0d999831cphpebOgvw.jpeg',\n 'is_json' => 0,\n ),\n 467 => \n array (\n 'id' => 479,\n 'user_id' => 45,\n 'key' => 'profile_picture_key',\n 'value' => '45/4d7339bbd14adf907798b3c0e78adec0d999831cphpebOgvw.jpeg',\n 'is_json' => 0,\n ),\n 468 => \n array (\n 'id' => 480,\n 'user_id' => 45,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 469 => \n array (\n 'id' => 481,\n 'user_id' => 45,\n 'key' => 'business_summary',\n 'value' => 'Fun Activities are had at this place.',\n 'is_json' => 0,\n ),\n 470 => \n array (\n 'id' => 482,\n 'user_id' => 45,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 471 => \n array (\n 'id' => 483,\n 'user_id' => 45,\n 'key' => 'refresh_token',\n 'value' => 'rt_BRCmMtydJatuecA5cmrOlXQkJe2O89zwmlXKHUYrP34DLNj0',\n 'is_json' => 0,\n ),\n 472 => \n array (\n 'id' => 484,\n 'user_id' => 45,\n 'key' => 'access_token',\n 'value' => 'sk_test_PnxbCj2ueF1BhlUEFHebh4Ta',\n 'is_json' => 0,\n ),\n 473 => \n array (\n 'id' => 485,\n 'user_id' => 45,\n 'key' => 'email',\n 'value' => 'kristie+provider@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 474 => \n array (\n 'id' => 486,\n 'user_id' => 45,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 475 => \n array (\n 'id' => 487,\n 'user_id' => 45,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 476 => \n array (\n 'id' => 488,\n 'user_id' => 37,\n 'key' => 'have_terms_conditions',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 477 => \n array (\n 'id' => 489,\n 'user_id' => 37,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 478 => \n array (\n 'id' => 490,\n 'user_id' => 37,\n 'key' => 'provider_terms_condition',\n 'value' => '',\n 'is_json' => 0,\n ),\n 479 => \n array (\n 'id' => 491,\n 'user_id' => 37,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 480 => \n array (\n 'id' => 492,\n 'user_id' => 37,\n 'key' => 'have_cancellation_policy',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 481 => \n array (\n 'id' => 493,\n 'user_id' => 37,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 482 => \n array (\n 'id' => 494,\n 'user_id' => 37,\n 'key' => 'provider_cancellation_policy',\n 'value' => '',\n 'is_json' => 0,\n ),\n 483 => \n array (\n 'id' => 495,\n 'user_id' => 37,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 484 => \n array (\n 'id' => 496,\n 'user_id' => 40,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 485 => \n array (\n 'id' => 497,\n 'user_id' => 46,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 486 => \n array (\n 'id' => 498,\n 'user_id' => 33,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 487 => \n array (\n 'id' => 499,\n 'user_id' => 47,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 488 => \n array (\n 'id' => 500,\n 'user_id' => 47,\n 'key' => 'title',\n 'value' => 'Miss',\n 'is_json' => 0,\n ),\n 489 => \n array (\n 'id' => 501,\n 'user_id' => 47,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 490 => \n array (\n 'id' => 503,\n 'user_id' => 49,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 491 => \n array (\n 'id' => 504,\n 'user_id' => 49,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/49/d6b8cf35f1474e33746875359d305bb48d30917bphpuALynN.jpeg',\n 'is_json' => 0,\n ),\n 492 => \n array (\n 'id' => 505,\n 'user_id' => 49,\n 'key' => 'profile_picture_key',\n 'value' => '49/d6b8cf35f1474e33746875359d305bb48d30917bphpuALynN.jpeg',\n 'is_json' => 0,\n ),\n 493 => \n array (\n 'id' => 506,\n 'user_id' => 49,\n 'key' => 'website',\n 'value' => 'http://VSC.COM.AU',\n 'is_json' => 0,\n ),\n 494 => \n array (\n 'id' => 507,\n 'user_id' => 49,\n 'key' => 'business_abn',\n 'value' => '91236742',\n 'is_json' => 0,\n ),\n 495 => \n array (\n 'id' => 508,\n 'user_id' => 49,\n 'key' => 'mobile_number',\n 'value' => '0932678115',\n 'is_json' => 0,\n ),\n 496 => \n array (\n 'id' => 509,\n 'user_id' => 49,\n 'key' => 'business_summary',\n 'value' => 'Victorian Sate Cheerleaders is a club for boys and girls to learn how to do tumbling skills, Stunting, and Dance ',\n 'is_json' => 0,\n ),\n 497 => \n array (\n 'id' => 510,\n 'user_id' => 49,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\",\"3\",\"5\"]},\"2\":{\"options\":[\"3\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 498 => \n array (\n 'id' => 511,\n 'user_id' => 49,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 499 => \n array (\n 'id' => 512,\n 'user_id' => 49,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n ));\n \\DB::table('user_meta')->insert(array (\n 0 => \n array (\n 'id' => 513,\n 'user_id' => 49,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 1 => \n array (\n 'id' => 514,\n 'user_id' => 49,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 2 => \n array (\n 'id' => 515,\n 'user_id' => 41,\n 'key' => 'email',\n 'value' => 'rachel+2@playz.com.au',\n 'is_json' => 0,\n ),\n 3 => \n array (\n 'id' => 516,\n 'user_id' => 41,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 4 => \n array (\n 'id' => 517,\n 'user_id' => 41,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 5 => \n array (\n 'id' => 518,\n 'user_id' => 41,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 6 => \n array (\n 'id' => 519,\n 'user_id' => 41,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 7 => \n array (\n 'id' => 520,\n 'user_id' => 50,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 8 => \n array (\n 'id' => 521,\n 'user_id' => 50,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 9 => \n array (\n 'id' => 522,\n 'user_id' => 50,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 10 => \n array (\n 'id' => 523,\n 'user_id' => 50,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 11 => \n array (\n 'id' => 524,\n 'user_id' => 50,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 12 => \n array (\n 'id' => 525,\n 'user_id' => 50,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 13 => \n array (\n 'id' => 526,\n 'user_id' => 50,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 14 => \n array (\n 'id' => 527,\n 'user_id' => 50,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 15 => \n array (\n 'id' => 528,\n 'user_id' => 50,\n 'key' => 'email',\n 'value' => 'kristie+playzlinks@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 16 => \n array (\n 'id' => 529,\n 'user_id' => 50,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 17 => \n array (\n 'id' => 530,\n 'user_id' => 50,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 18 => \n array (\n 'id' => 531,\n 'user_id' => 50,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 19 => \n array (\n 'id' => 532,\n 'user_id' => 50,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 20 => \n array (\n 'id' => 533,\n 'user_id' => 50,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 21 => \n array (\n 'id' => 534,\n 'user_id' => 50,\n 'key' => 'braintree_customer_id',\n 'value' => '119634599',\n 'is_json' => 0,\n ),\n 22 => \n array (\n 'id' => 535,\n 'user_id' => 50,\n 'key' => 'braintree_payment_token',\n 'value' => '3bmvhd',\n 'is_json' => 0,\n ),\n 23 => \n array (\n 'id' => 536,\n 'user_id' => 50,\n 'key' => 'braintree_subscription_id',\n 'value' => '4tgmnr',\n 'is_json' => 0,\n ),\n 24 => \n array (\n 'id' => 537,\n 'user_id' => 50,\n 'key' => 'ext_booking_active',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 25 => \n array (\n 'id' => 538,\n 'user_id' => 50,\n 'key' => 'listings_status',\n 'value' => '{\"listings\":{\"ENABLED\":[],\"DRAFT\":[\"LISTING\"],\"DELETED\":[]},\"linkz_enabled\":true}',\n 'is_json' => 1,\n ),\n 26 => \n array (\n 'id' => 539,\n 'user_id' => 50,\n 'key' => 'subscription_type',\n 'value' => 'BRAINTREE',\n 'is_json' => 0,\n ),\n 27 => \n array (\n 'id' => 540,\n 'user_id' => 50,\n 'key' => 'subscription_status',\n 'value' => 'ACTIVE',\n 'is_json' => 0,\n ),\n 28 => \n array (\n 'id' => 541,\n 'user_id' => 50,\n 'key' => 'braintree_trial_started',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 29 => \n array (\n 'id' => 542,\n 'user_id' => 41,\n 'key' => 'braintree_customer_id',\n 'value' => '857022871',\n 'is_json' => 0,\n ),\n 30 => \n array (\n 'id' => 543,\n 'user_id' => 41,\n 'key' => 'braintree_payment_token',\n 'value' => 'b92s7d',\n 'is_json' => 0,\n ),\n 31 => \n array (\n 'id' => 544,\n 'user_id' => 41,\n 'key' => 'braintree_subscription_id',\n 'value' => 'f7wffg',\n 'is_json' => 0,\n ),\n 32 => \n array (\n 'id' => 545,\n 'user_id' => 41,\n 'key' => 'ext_booking_active',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 33 => \n array (\n 'id' => 546,\n 'user_id' => 41,\n 'key' => 'listings_status',\n 'value' => '{\"listings\":{\"ENABLED\":[\"BOOKING\"],\"DRAFT\":[\"LISTING\"],\"DELETED\":[]},\"linkz_enabled\":true}',\n 'is_json' => 1,\n ),\n 34 => \n array (\n 'id' => 547,\n 'user_id' => 41,\n 'key' => 'subscription_type',\n 'value' => 'BRAINTREE',\n 'is_json' => 0,\n ),\n 35 => \n array (\n 'id' => 548,\n 'user_id' => 41,\n 'key' => 'subscription_status',\n 'value' => 'ACTIVE',\n 'is_json' => 0,\n ),\n 36 => \n array (\n 'id' => 549,\n 'user_id' => 41,\n 'key' => 'braintree_trial_started',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 37 => \n array (\n 'id' => 550,\n 'user_id' => 51,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 38 => \n array (\n 'id' => 551,\n 'user_id' => 51,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/51/5a1e4def0ee37086657e9fbb875a6c0184548324phpvfXToi.jpeg',\n 'is_json' => 0,\n ),\n 39 => \n array (\n 'id' => 552,\n 'user_id' => 51,\n 'key' => 'profile_picture_key',\n 'value' => '51/5a1e4def0ee37086657e9fbb875a6c0184548324phpvfXToi.jpeg',\n 'is_json' => 0,\n ),\n 40 => \n array (\n 'id' => 553,\n 'user_id' => 51,\n 'key' => 'website',\n 'value' => 'http://www.apple.com.au',\n 'is_json' => 0,\n ),\n 41 => \n array (\n 'id' => 554,\n 'user_id' => 51,\n 'key' => 'business_abn',\n 'value' => '14353463463',\n 'is_json' => 0,\n ),\n 42 => \n array (\n 'id' => 555,\n 'user_id' => 51,\n 'key' => 'mobile_number',\n 'value' => '45325349843',\n 'is_json' => 0,\n ),\n 43 => \n array (\n 'id' => 556,\n 'user_id' => 51,\n 'key' => 'business_summary',\n 'value' => 'We run activities for people who like apples.',\n 'is_json' => 0,\n ),\n 44 => \n array (\n 'id' => 557,\n 'user_id' => 51,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\",\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 45 => \n array (\n 'id' => 558,\n 'user_id' => 51,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 46 => \n array (\n 'id' => 559,\n 'user_id' => 51,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 47 => \n array (\n 'id' => 560,\n 'user_id' => 51,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 48 => \n array (\n 'id' => 561,\n 'user_id' => 51,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 49 => \n array (\n 'id' => 562,\n 'user_id' => 51,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 50 => \n array (\n 'id' => 563,\n 'user_id' => 51,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 51 => \n array (\n 'id' => 564,\n 'user_id' => 51,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 52 => \n array (\n 'id' => 565,\n 'user_id' => 51,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>my terms</p>',\n 'is_json' => 0,\n ),\n 53 => \n array (\n 'id' => 566,\n 'user_id' => 51,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 54 => \n array (\n 'id' => 567,\n 'user_id' => 51,\n 'key' => 'have_cancellation_policy',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 55 => \n array (\n 'id' => 568,\n 'user_id' => 51,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 56 => \n array (\n 'id' => 569,\n 'user_id' => 51,\n 'key' => 'provider_cancellation_policy',\n 'value' => '',\n 'is_json' => 0,\n ),\n 57 => \n array (\n 'id' => 570,\n 'user_id' => 51,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 58 => \n array (\n 'id' => 571,\n 'user_id' => 51,\n 'key' => 'refresh_token',\n 'value' => 'rt_BUwg4qmsCBnj6XFu7GRLMsIb5oewQgzPWiasaWkepq1q2aPT',\n 'is_json' => 0,\n ),\n 59 => \n array (\n 'id' => 572,\n 'user_id' => 51,\n 'key' => 'access_token',\n 'value' => 'sk_test_vNwcnsitOy4RkSyWjjgsTWSN',\n 'is_json' => 0,\n ),\n 60 => \n array (\n 'id' => 573,\n 'user_id' => 52,\n 'key' => 'register_ip',\n 'value' => '115.187.156.90',\n 'is_json' => 0,\n ),\n 61 => \n array (\n 'id' => 574,\n 'user_id' => 52,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/52/10609b18b46e032d084707de4f607f08a248f860phpKOmGv2.jpeg',\n 'is_json' => 0,\n ),\n 62 => \n array (\n 'id' => 575,\n 'user_id' => 52,\n 'key' => 'profile_picture_key',\n 'value' => '52/10609b18b46e032d084707de4f607f08a248f860phpKOmGv2.jpeg',\n 'is_json' => 0,\n ),\n 63 => \n array (\n 'id' => 576,\n 'user_id' => 52,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 64 => \n array (\n 'id' => 577,\n 'user_id' => 52,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 65 => \n array (\n 'id' => 578,\n 'user_id' => 52,\n 'key' => 'reg_survey',\n 'value' => '{\"2\":{\"OTHER\":\"\"},\"3\":{\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 66 => \n array (\n 'id' => 579,\n 'user_id' => 52,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 67 => \n array (\n 'id' => 580,\n 'user_id' => 52,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 68 => \n array (\n 'id' => 581,\n 'user_id' => 52,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 69 => \n array (\n 'id' => 582,\n 'user_id' => 52,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 70 => \n array (\n 'id' => 583,\n 'user_id' => 53,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 71 => \n array (\n 'id' => 584,\n 'user_id' => 54,\n 'key' => 'register_ip',\n 'value' => '124.189.169.219',\n 'is_json' => 0,\n ),\n 72 => \n array (\n 'id' => 585,\n 'user_id' => 54,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 73 => \n array (\n 'id' => 586,\n 'user_id' => 54,\n 'key' => 'business_abn',\n 'value' => 'Out Of The Box Solutions',\n 'is_json' => 0,\n ),\n 74 => \n array (\n 'id' => 587,\n 'user_id' => 54,\n 'key' => 'mobile_number',\n 'value' => '422757074',\n 'is_json' => 0,\n ),\n 75 => \n array (\n 'id' => 588,\n 'user_id' => 54,\n 'key' => 'business_summary',\n 'value' => 'test',\n 'is_json' => 0,\n ),\n 76 => \n array (\n 'id' => 589,\n 'user_id' => 54,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"4\",\"5\"]},\"2\":{\"options\":[\"2\",\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\",\"4\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 77 => \n array (\n 'id' => 590,\n 'user_id' => 54,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"YES\"]',\n 'is_json' => 1,\n ),\n 78 => \n array (\n 'id' => 591,\n 'user_id' => 54,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 79 => \n array (\n 'id' => 592,\n 'user_id' => 54,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 80 => \n array (\n 'id' => 593,\n 'user_id' => 54,\n 'key' => 'policy_allergy',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 81 => \n array (\n 'id' => 594,\n 'user_id' => 55,\n 'key' => 'register_ip',\n 'value' => '124.189.169.219',\n 'is_json' => 0,\n ),\n 82 => \n array (\n 'id' => 595,\n 'user_id' => 55,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 83 => \n array (\n 'id' => 596,\n 'user_id' => 55,\n 'key' => 'business_abn',\n 'value' => 'Out Of The Box Solutions',\n 'is_json' => 0,\n ),\n 84 => \n array (\n 'id' => 597,\n 'user_id' => 55,\n 'key' => 'mobile_number',\n 'value' => '422757074',\n 'is_json' => 0,\n ),\n 85 => \n array (\n 'id' => 598,\n 'user_id' => 55,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"3\"]},\"2\":{\"options\":[\"4\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 86 => \n array (\n 'id' => 599,\n 'user_id' => 55,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 87 => \n array (\n 'id' => 600,\n 'user_id' => 55,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 88 => \n array (\n 'id' => 601,\n 'user_id' => 55,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 89 => \n array (\n 'id' => 602,\n 'user_id' => 55,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 90 => \n array (\n 'id' => 603,\n 'user_id' => 56,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 91 => \n array (\n 'id' => 604,\n 'user_id' => 56,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 92 => \n array (\n 'id' => 605,\n 'user_id' => 56,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 93 => \n array (\n 'id' => 606,\n 'user_id' => 56,\n 'key' => 'business_summary',\n 'value' => 'tutoring for kids',\n 'is_json' => 0,\n ),\n 94 => \n array (\n 'id' => 607,\n 'user_id' => 56,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\"]},\"2\":{\"options\":[\"3\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 95 => \n array (\n 'id' => 608,\n 'user_id' => 56,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 96 => \n array (\n 'id' => 609,\n 'user_id' => 56,\n 'key' => 'policy_food',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 97 => \n array (\n 'id' => 610,\n 'user_id' => 56,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 98 => \n array (\n 'id' => 611,\n 'user_id' => 56,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 99 => \n array (\n 'id' => 612,\n 'user_id' => 33,\n 'key' => 'listings_status',\n 'value' => '{\"listings\":{\"ENABLED\":[\"BOOKING\",\"LISTING\"],\"DRAFT\":[\"LISTING\"],\"DELETED\":[\"BOOKING\",\"LISTING\"]},\"linkz_enabled\":false}',\n 'is_json' => 1,\n ),\n 100 => \n array (\n 'id' => 613,\n 'user_id' => 57,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 101 => \n array (\n 'id' => 614,\n 'user_id' => 57,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 102 => \n array (\n 'id' => 615,\n 'user_id' => 57,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 103 => \n array (\n 'id' => 616,\n 'user_id' => 57,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\"]},\"2\":{\"options\":[\"1\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 104 => \n array (\n 'id' => 617,\n 'user_id' => 57,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 105 => \n array (\n 'id' => 618,\n 'user_id' => 57,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 106 => \n array (\n 'id' => 619,\n 'user_id' => 57,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 107 => \n array (\n 'id' => 620,\n 'user_id' => 57,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 108 => \n array (\n 'id' => 621,\n 'user_id' => 58,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 109 => \n array (\n 'id' => 622,\n 'user_id' => 58,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 110 => \n array (\n 'id' => 623,\n 'user_id' => 58,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 111 => \n array (\n 'id' => 624,\n 'user_id' => 58,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\"]},\"2\":{\"options\":[\"1\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 112 => \n array (\n 'id' => 625,\n 'user_id' => 58,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 113 => \n array (\n 'id' => 626,\n 'user_id' => 58,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 114 => \n array (\n 'id' => 627,\n 'user_id' => 58,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 115 => \n array (\n 'id' => 628,\n 'user_id' => 58,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 116 => \n array (\n 'id' => 629,\n 'user_id' => 58,\n 'key' => 'refresh_token',\n 'value' => 'rt_BazFXBWzg3hBC2Zvylo50lug5X8VFoCiPmFWz1ISvtlk6ulf',\n 'is_json' => 0,\n ),\n 117 => \n array (\n 'id' => 630,\n 'user_id' => 58,\n 'key' => 'access_token',\n 'value' => 'sk_test_lQSLSCYfqlOjqW9H2OBXWnFF',\n 'is_json' => 0,\n ),\n 118 => \n array (\n 'id' => 631,\n 'user_id' => 59,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 119 => \n array (\n 'id' => 632,\n 'user_id' => 59,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/59/39e621da6bc2846fd9f87eff5da2049f01bb79d5phpeYCUJV.jpeg',\n 'is_json' => 0,\n ),\n 120 => \n array (\n 'id' => 633,\n 'user_id' => 59,\n 'key' => 'profile_picture_key',\n 'value' => '59/39e621da6bc2846fd9f87eff5da2049f01bb79d5phpeYCUJV.jpeg',\n 'is_json' => 0,\n ),\n 121 => \n array (\n 'id' => 634,\n 'user_id' => 59,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 122 => \n array (\n 'id' => 635,\n 'user_id' => 59,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 123 => \n array (\n 'id' => 636,\n 'user_id' => 59,\n 'key' => 'business_summary',\n 'value' => 'At Sunnytime, we have over 10 years experience in providing a range of fun kids\\' activities. Our young-at-heart instructors teach kids\\' everything from crafty fun to super sports activities.',\n 'is_json' => 0,\n ),\n 124 => \n array (\n 'id' => 637,\n 'user_id' => 59,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"3\"]},\"2\":{\"options\":[\"4\",\"OTHER\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 125 => \n array (\n 'id' => 638,\n 'user_id' => 59,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 126 => \n array (\n 'id' => 639,\n 'user_id' => 59,\n 'key' => 'policy_food',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 127 => \n array (\n 'id' => 640,\n 'user_id' => 59,\n 'key' => 'policy_children',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 128 => \n array (\n 'id' => 641,\n 'user_id' => 59,\n 'key' => 'policy_allergy',\n 'value' => '[\"NOT_APPLICABLE\"]',\n 'is_json' => 1,\n ),\n 129 => \n array (\n 'id' => 642,\n 'user_id' => 59,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 130 => \n array (\n 'id' => 643,\n 'user_id' => 59,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 131 => \n array (\n 'id' => 644,\n 'user_id' => 54,\n 'key' => 'email',\n 'value' => 'james@agencymates.com',\n 'is_json' => 0,\n ),\n 132 => \n array (\n 'id' => 645,\n 'user_id' => 54,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 133 => \n array (\n 'id' => 646,\n 'user_id' => 54,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 134 => \n array (\n 'id' => 647,\n 'user_id' => 54,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 135 => \n array (\n 'id' => 648,\n 'user_id' => 54,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 136 => \n array (\n 'id' => 649,\n 'user_id' => 59,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 137 => \n array (\n 'id' => 650,\n 'user_id' => 59,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 138 => \n array (\n 'id' => 651,\n 'user_id' => 59,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 139 => \n array (\n 'id' => 652,\n 'user_id' => 59,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>Kids need to be good and not cause trouble.</p>',\n 'is_json' => 0,\n ),\n 140 => \n array (\n 'id' => 653,\n 'user_id' => 59,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 141 => \n array (\n 'id' => 654,\n 'user_id' => 59,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 142 => \n array (\n 'id' => 655,\n 'user_id' => 59,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 143 => \n array (\n 'id' => 656,\n 'user_id' => 59,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>48 hours notice for full refund.</p>\r\n<p>24 hours notice to enable a swap of days.</p>\r\n<p>Less than 24hours no refund or swap in days.</p>',\n 'is_json' => 0,\n ),\n 144 => \n array (\n 'id' => 657,\n 'user_id' => 59,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 145 => \n array (\n 'id' => 658,\n 'user_id' => 59,\n 'key' => 'refresh_token',\n 'value' => 'rt_BbhdDzKi7gJ0Y0f4NiBHOtmZpYLqzK8wVhuU9qo3x1Z5H2HU',\n 'is_json' => 0,\n ),\n 146 => \n array (\n 'id' => 659,\n 'user_id' => 59,\n 'key' => 'access_token',\n 'value' => 'sk_test_ojmzHax09UPSkswhntOb6psX',\n 'is_json' => 0,\n ),\n 147 => \n array (\n 'id' => 660,\n 'user_id' => 58,\n 'key' => 'email',\n 'value' => 'kristie+provider3@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 148 => \n array (\n 'id' => 661,\n 'user_id' => 58,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 149 => \n array (\n 'id' => 662,\n 'user_id' => 58,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 150 => \n array (\n 'id' => 663,\n 'user_id' => 58,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 151 => \n array (\n 'id' => 664,\n 'user_id' => 58,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 152 => \n array (\n 'id' => 665,\n 'user_id' => 58,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 153 => \n array (\n 'id' => 666,\n 'user_id' => 60,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 154 => \n array (\n 'id' => 667,\n 'user_id' => 60,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/60/6d8ca29bff82dce589127e6fead20e3579589bffphp7jmeOM.jpeg',\n 'is_json' => 0,\n ),\n 155 => \n array (\n 'id' => 668,\n 'user_id' => 60,\n 'key' => 'profile_picture_key',\n 'value' => '60/6d8ca29bff82dce589127e6fead20e3579589bffphp7jmeOM.jpeg',\n 'is_json' => 0,\n ),\n 156 => \n array (\n 'id' => 669,\n 'user_id' => 60,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 157 => \n array (\n 'id' => 670,\n 'user_id' => 60,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 158 => \n array (\n 'id' => 671,\n 'user_id' => 60,\n 'key' => 'mobile_number',\n 'value' => '1231231231',\n 'is_json' => 0,\n ),\n 159 => \n array (\n 'id' => 672,\n 'user_id' => 60,\n 'key' => 'business_summary',\n 'value' => 'Magic Music Lessons provide private and group music lessons on a range of instruments. Our lessons are fun and engaging and support children to fall in love with music as well as learn the techniques to play their choice of instrument.',\n 'is_json' => 0,\n ),\n 160 => \n array (\n 'id' => 673,\n 'user_id' => 60,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 161 => \n array (\n 'id' => 674,\n 'user_id' => 60,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 162 => \n array (\n 'id' => 675,\n 'user_id' => 60,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 163 => \n array (\n 'id' => 676,\n 'user_id' => 60,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 164 => \n array (\n 'id' => 677,\n 'user_id' => 60,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 165 => \n array (\n 'id' => 678,\n 'user_id' => 60,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 166 => \n array (\n 'id' => 679,\n 'user_id' => 60,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 167 => \n array (\n 'id' => 680,\n 'user_id' => 60,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 168 => \n array (\n 'id' => 681,\n 'user_id' => 60,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>parental supervision required,</p>',\n 'is_json' => 0,\n ),\n 169 => \n array (\n 'id' => 682,\n 'user_id' => 60,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 170 => \n array (\n 'id' => 683,\n 'user_id' => 60,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 171 => \n array (\n 'id' => 684,\n 'user_id' => 60,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 172 => \n array (\n 'id' => 685,\n 'user_id' => 60,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>24 hours notice to be able to book a make up lesson</p>',\n 'is_json' => 0,\n ),\n 173 => \n array (\n 'id' => 686,\n 'user_id' => 60,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 174 => \n array (\n 'id' => 687,\n 'user_id' => 60,\n 'key' => 'refresh_token',\n 'value' => 'rt_BdYWjOTCI6xIdRUzszBDi6STsqWYNhaWSplRVYEbgeaeyJA3',\n 'is_json' => 0,\n ),\n 175 => \n array (\n 'id' => 688,\n 'user_id' => 60,\n 'key' => 'access_token',\n 'value' => 'sk_test_PnGmx7YP0vv1zsokRQa6IsWB',\n 'is_json' => 0,\n ),\n 176 => \n array (\n 'id' => 689,\n 'user_id' => 61,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 177 => \n array (\n 'id' => 690,\n 'user_id' => 61,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 178 => \n array (\n 'id' => 691,\n 'user_id' => 61,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 179 => \n array (\n 'id' => 692,\n 'user_id' => 61,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\"]},\"2\":{\"options\":[\"1\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 180 => \n array (\n 'id' => 693,\n 'user_id' => 61,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 181 => \n array (\n 'id' => 694,\n 'user_id' => 61,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 182 => \n array (\n 'id' => 695,\n 'user_id' => 61,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 183 => \n array (\n 'id' => 696,\n 'user_id' => 61,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 184 => \n array (\n 'id' => 697,\n 'user_id' => 61,\n 'key' => 'email',\n 'value' => 'kristie+provider@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 185 => \n array (\n 'id' => 698,\n 'user_id' => 61,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 186 => \n array (\n 'id' => 699,\n 'user_id' => 61,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 187 => \n array (\n 'id' => 700,\n 'user_id' => 61,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 188 => \n array (\n 'id' => 701,\n 'user_id' => 61,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 189 => \n array (\n 'id' => 702,\n 'user_id' => 61,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 190 => \n array (\n 'id' => 703,\n 'user_id' => 62,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 191 => \n array (\n 'id' => 704,\n 'user_id' => 62,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 192 => \n array (\n 'id' => 705,\n 'user_id' => 62,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 193 => \n array (\n 'id' => 706,\n 'user_id' => 61,\n 'key' => 'refresh_token',\n 'value' => 'rt_BdsyaDvVR0f9xsQ7fcysG5UK5bk5VCn5lspxNAKkbVnzN8qv',\n 'is_json' => 0,\n ),\n 194 => \n array (\n 'id' => 707,\n 'user_id' => 61,\n 'key' => 'access_token',\n 'value' => 'sk_test_L1C8sKe5NewbWkr45kemeWKC',\n 'is_json' => 0,\n ),\n 195 => \n array (\n 'id' => 708,\n 'user_id' => 64,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 196 => \n array (\n 'id' => 709,\n 'user_id' => 64,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/64/95af2d217565b292e23d277f0d49ae883cbc99d6phpRoUKpZ.jpeg',\n 'is_json' => 0,\n ),\n 197 => \n array (\n 'id' => 710,\n 'user_id' => 64,\n 'key' => 'profile_picture_key',\n 'value' => '64/95af2d217565b292e23d277f0d49ae883cbc99d6phpRoUKpZ.jpeg',\n 'is_json' => 0,\n ),\n 198 => \n array (\n 'id' => 711,\n 'user_id' => 64,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 199 => \n array (\n 'id' => 712,\n 'user_id' => 64,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 200 => \n array (\n 'id' => 713,\n 'user_id' => 64,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 201 => \n array (\n 'id' => 714,\n 'user_id' => 64,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 202 => \n array (\n 'id' => 715,\n 'user_id' => 64,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 203 => \n array (\n 'id' => 716,\n 'user_id' => 64,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 204 => \n array (\n 'id' => 717,\n 'user_id' => 64,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 205 => \n array (\n 'id' => 718,\n 'user_id' => 64,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 206 => \n array (\n 'id' => 719,\n 'user_id' => 64,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 207 => \n array (\n 'id' => 720,\n 'user_id' => 64,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 208 => \n array (\n 'id' => 721,\n 'user_id' => 64,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>do what we say</p>',\n 'is_json' => 0,\n ),\n 209 => \n array (\n 'id' => 722,\n 'user_id' => 64,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 210 => \n array (\n 'id' => 723,\n 'user_id' => 64,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 211 => \n array (\n 'id' => 724,\n 'user_id' => 64,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 212 => \n array (\n 'id' => 725,\n 'user_id' => 64,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>don\\'t cancel</p>',\n 'is_json' => 0,\n ),\n 213 => \n array (\n 'id' => 726,\n 'user_id' => 64,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 214 => \n array (\n 'id' => 727,\n 'user_id' => 64,\n 'key' => 'refresh_token',\n 'value' => 'rt_BdvhomKPyXQidYNoq5oXvmME0glQUMHywKtQ4zuhujDw7kUb',\n 'is_json' => 0,\n ),\n 215 => \n array (\n 'id' => 728,\n 'user_id' => 64,\n 'key' => 'access_token',\n 'value' => 'sk_test_MAo9Jqks4mOnrSoA17PLNCBM',\n 'is_json' => 0,\n ),\n 216 => \n array (\n 'id' => 729,\n 'user_id' => 65,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 217 => \n array (\n 'id' => 732,\n 'user_id' => 65,\n 'key' => 'profile_picture_url',\n 'value' => 'https://s3-ap-southeast-2.amazonaws.com/playz-staging/playz-staging/65/257db3bc4c79ed0069130e3b5a9dd2490847e61bphpUjHE2L.jpeg',\n 'is_json' => 0,\n ),\n 218 => \n array (\n 'id' => 733,\n 'user_id' => 65,\n 'key' => 'profile_picture_key',\n 'value' => '65/257db3bc4c79ed0069130e3b5a9dd2490847e61bphpUjHE2L.jpeg',\n 'is_json' => 0,\n ),\n 219 => \n array (\n 'id' => 734,\n 'user_id' => 65,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 220 => \n array (\n 'id' => 735,\n 'user_id' => 65,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 221 => \n array (\n 'id' => 736,\n 'user_id' => 65,\n 'key' => 'business_summary',\n 'value' => 'Penny has been teaching piano for over 15 years and is able to engage all her students in a gentle fun way to learn the delights of the piano.',\n 'is_json' => 0,\n ),\n 222 => \n array (\n 'id' => 737,\n 'user_id' => 65,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"2\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 223 => \n array (\n 'id' => 738,\n 'user_id' => 65,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 224 => \n array (\n 'id' => 739,\n 'user_id' => 65,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 225 => \n array (\n 'id' => 740,\n 'user_id' => 65,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 226 => \n array (\n 'id' => 741,\n 'user_id' => 65,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 227 => \n array (\n 'id' => 742,\n 'user_id' => 65,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 228 => \n array (\n 'id' => 743,\n 'user_id' => 65,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 229 => \n array (\n 'id' => 744,\n 'user_id' => 65,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 230 => \n array (\n 'id' => 745,\n 'user_id' => 65,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>practice every day</p>',\n 'is_json' => 0,\n ),\n 231 => \n array (\n 'id' => 746,\n 'user_id' => 65,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 232 => \n array (\n 'id' => 747,\n 'user_id' => 65,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 233 => \n array (\n 'id' => 748,\n 'user_id' => 65,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 234 => \n array (\n 'id' => 749,\n 'user_id' => 65,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>don\\'t cancel</p>',\n 'is_json' => 0,\n ),\n 235 => \n array (\n 'id' => 750,\n 'user_id' => 65,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 236 => \n array (\n 'id' => 751,\n 'user_id' => 65,\n 'key' => 'refresh_token',\n 'value' => 'rt_BeJdnBfOPnCKDkpd7XznAzo8Q0MUm5xSqJqfcJADNTfckGaV',\n 'is_json' => 0,\n ),\n 237 => \n array (\n 'id' => 752,\n 'user_id' => 65,\n 'key' => 'access_token',\n 'value' => 'sk_test_ntVfwl7XpmYO3GiIInI6RcdK',\n 'is_json' => 0,\n ),\n 238 => \n array (\n 'id' => 753,\n 'user_id' => 67,\n 'key' => 'register_ip',\n 'value' => '144.132.70.191',\n 'is_json' => 0,\n ),\n 239 => \n array (\n 'id' => 756,\n 'user_id' => 67,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 240 => \n array (\n 'id' => 757,\n 'user_id' => 67,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 241 => \n array (\n 'id' => 758,\n 'user_id' => 67,\n 'key' => 'mobile_number',\n 'value' => '1982371982371983',\n 'is_json' => 0,\n ),\n 242 => \n array (\n 'id' => 759,\n 'user_id' => 67,\n 'key' => 'business_summary',\n 'value' => 'Play tennis and learn with Tim',\n 'is_json' => 0,\n ),\n 243 => \n array (\n 'id' => 760,\n 'user_id' => 67,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"3\"]},\"2\":{\"options\":[\"3\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"OTHER\"],\"OTHER\":\"bla bla\"}}',\n 'is_json' => 1,\n ),\n 244 => \n array (\n 'id' => 761,\n 'user_id' => 67,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 245 => \n array (\n 'id' => 762,\n 'user_id' => 67,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 246 => \n array (\n 'id' => 763,\n 'user_id' => 67,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 247 => \n array (\n 'id' => 764,\n 'user_id' => 67,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 248 => \n array (\n 'id' => 765,\n 'user_id' => 64,\n 'key' => 'email',\n 'value' => 'rachel+2@playz.com.au',\n 'is_json' => 0,\n ),\n 249 => \n array (\n 'id' => 766,\n 'user_id' => 64,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 250 => \n array (\n 'id' => 767,\n 'user_id' => 64,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 251 => \n array (\n 'id' => 768,\n 'user_id' => 64,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 252 => \n array (\n 'id' => 769,\n 'user_id' => 64,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 253 => \n array (\n 'id' => 770,\n 'user_id' => 64,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 254 => \n array (\n 'id' => 771,\n 'user_id' => 65,\n 'key' => 'email',\n 'value' => 'rachel+3@playz.com.au',\n 'is_json' => 0,\n ),\n 255 => \n array (\n 'id' => 772,\n 'user_id' => 65,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 256 => \n array (\n 'id' => 773,\n 'user_id' => 65,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 257 => \n array (\n 'id' => 774,\n 'user_id' => 65,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 258 => \n array (\n 'id' => 775,\n 'user_id' => 65,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 259 => \n array (\n 'id' => 776,\n 'user_id' => 70,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 260 => \n array (\n 'id' => 777,\n 'user_id' => 70,\n 'key' => 'title',\n 'value' => 'Ms',\n 'is_json' => 0,\n ),\n 261 => \n array (\n 'id' => 778,\n 'user_id' => 70,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 262 => \n array (\n 'id' => 780,\n 'user_id' => 71,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 263 => \n array (\n 'id' => 781,\n 'user_id' => 71,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 264 => \n array (\n 'id' => 782,\n 'user_id' => 71,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 265 => \n array (\n 'id' => 783,\n 'user_id' => 71,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\"]},\"2\":{\"options\":[\"1\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 266 => \n array (\n 'id' => 784,\n 'user_id' => 71,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 267 => \n array (\n 'id' => 785,\n 'user_id' => 71,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 268 => \n array (\n 'id' => 786,\n 'user_id' => 71,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 269 => \n array (\n 'id' => 787,\n 'user_id' => 71,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 270 => \n array (\n 'id' => 788,\n 'user_id' => 71,\n 'key' => 'email',\n 'value' => 'kristie+stripe@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 271 => \n array (\n 'id' => 789,\n 'user_id' => 71,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 272 => \n array (\n 'id' => 790,\n 'user_id' => 71,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 273 => \n array (\n 'id' => 791,\n 'user_id' => 71,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 274 => \n array (\n 'id' => 792,\n 'user_id' => 71,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 275 => \n array (\n 'id' => 793,\n 'user_id' => 71,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 276 => \n array (\n 'id' => 794,\n 'user_id' => 71,\n 'key' => 'refresh_token',\n 'value' => 'rt_BhGe5wRMS4xGxRcUB4IPMQQq5iiNWvQL16LAXita4qKkKzZY',\n 'is_json' => 0,\n ),\n 277 => \n array (\n 'id' => 795,\n 'user_id' => 71,\n 'key' => 'access_token',\n 'value' => 'sk_live_ZOl4tXPxTXrixOh1Nre3PqAn',\n 'is_json' => 0,\n ),\n 278 => \n array (\n 'id' => 796,\n 'user_id' => 72,\n 'key' => 'register_ip',\n 'value' => '49.184.135.207',\n 'is_json' => 0,\n ),\n 279 => \n array (\n 'id' => 797,\n 'user_id' => 72,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 280 => \n array (\n 'id' => 798,\n 'user_id' => 72,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 281 => \n array (\n 'id' => 799,\n 'user_id' => 73,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 282 => \n array (\n 'id' => 800,\n 'user_id' => 73,\n 'key' => 'title',\n 'value' => 'Mrs',\n 'is_json' => 0,\n ),\n 283 => \n array (\n 'id' => 801,\n 'user_id' => 73,\n 'key' => 'find_playz',\n 'value' => 'Google (or other search engines)',\n 'is_json' => 0,\n ),\n 284 => \n array (\n 'id' => 803,\n 'user_id' => 74,\n 'key' => 'register_ip',\n 'value' => '115.146.75.10',\n 'is_json' => 0,\n ),\n 285 => \n array (\n 'id' => 804,\n 'user_id' => 74,\n 'key' => 'website',\n 'value' => 'www.alliancesoftware_testing.com',\n 'is_json' => 0,\n ),\n 286 => \n array (\n 'id' => 805,\n 'user_id' => 74,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 287 => \n array (\n 'id' => 806,\n 'user_id' => 74,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"3\"]},\"2\":{\"options\":[\"4\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"2\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 288 => \n array (\n 'id' => 807,\n 'user_id' => 74,\n 'key' => 'policy_sunsmart',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 289 => \n array (\n 'id' => 808,\n 'user_id' => 74,\n 'key' => 'policy_food',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 290 => \n array (\n 'id' => 809,\n 'user_id' => 74,\n 'key' => 'policy_children',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 291 => \n array (\n 'id' => 810,\n 'user_id' => 74,\n 'key' => 'policy_allergy',\n 'value' => 'null',\n 'is_json' => 1,\n ),\n 292 => \n array (\n 'id' => 811,\n 'user_id' => 74,\n 'key' => 'email',\n 'value' => 'kristie+provider3@alliancesoftware.com.au',\n 'is_json' => 0,\n ),\n 293 => \n array (\n 'id' => 812,\n 'user_id' => 74,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 294 => \n array (\n 'id' => 813,\n 'user_id' => 74,\n 'key' => 'business_summary',\n 'value' => '',\n 'is_json' => 0,\n ),\n 295 => \n array (\n 'id' => 814,\n 'user_id' => 74,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 296 => \n array (\n 'id' => 815,\n 'user_id' => 74,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 297 => \n array (\n 'id' => 816,\n 'user_id' => 74,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 298 => \n array (\n 'id' => 817,\n 'user_id' => 75,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 299 => \n array (\n 'id' => 818,\n 'user_id' => 75,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 300 => \n array (\n 'id' => 819,\n 'user_id' => 75,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 301 => \n array (\n 'id' => 820,\n 'user_id' => 75,\n 'key' => 'mobile_number',\n 'value' => '0407 968 221',\n 'is_json' => 0,\n ),\n 302 => \n array (\n 'id' => 821,\n 'user_id' => 75,\n 'key' => 'business_summary',\n 'value' => 'We run fun craft activities',\n 'is_json' => 0,\n ),\n 303 => \n array (\n 'id' => 822,\n 'user_id' => 75,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"1\",\"2\",\"4\",\"5\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"1\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 304 => \n array (\n 'id' => 823,\n 'user_id' => 75,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 305 => \n array (\n 'id' => 824,\n 'user_id' => 75,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 306 => \n array (\n 'id' => 825,\n 'user_id' => 75,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 307 => \n array (\n 'id' => 826,\n 'user_id' => 75,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 308 => \n array (\n 'id' => 827,\n 'user_id' => 75,\n 'key' => 'first_tnc_copied',\n 'value' => '1',\n 'is_json' => 0,\n ),\n 309 => \n array (\n 'id' => 828,\n 'user_id' => 75,\n 'key' => 'have_terms_conditions',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 310 => \n array (\n 'id' => 829,\n 'user_id' => 75,\n 'key' => 'have_terms_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 311 => \n array (\n 'id' => 830,\n 'user_id' => 75,\n 'key' => 'provider_terms_condition',\n 'value' => '<p>be safe</p>',\n 'is_json' => 0,\n ),\n 312 => \n array (\n 'id' => 831,\n 'user_id' => 75,\n 'key' => 'terms_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 313 => \n array (\n 'id' => 832,\n 'user_id' => 75,\n 'key' => 'have_cancellation_policy',\n 'value' => 'true',\n 'is_json' => 1,\n ),\n 314 => \n array (\n 'id' => 833,\n 'user_id' => 75,\n 'key' => 'have_cancellation_file',\n 'value' => 'textbox',\n 'is_json' => 0,\n ),\n 315 => \n array (\n 'id' => 834,\n 'user_id' => 75,\n 'key' => 'provider_cancellation_policy',\n 'value' => '<p>don\\'t cancel</p>',\n 'is_json' => 0,\n ),\n 316 => \n array (\n 'id' => 835,\n 'user_id' => 75,\n 'key' => 'policy_on_enrolment_form',\n 'value' => 'false',\n 'is_json' => 1,\n ),\n 317 => \n array (\n 'id' => 836,\n 'user_id' => 75,\n 'key' => 'refresh_token',\n 'value' => 'rt_BhJWaHV9hE4xda5qRtYY6XrW2DJuwrzfcmh2YefJMF8GHsSB',\n 'is_json' => 0,\n ),\n 318 => \n array (\n 'id' => 837,\n 'user_id' => 75,\n 'key' => 'access_token',\n 'value' => 'sk_live_SNMxGL69nbC63nGYRXkrUTIc',\n 'is_json' => 0,\n ),\n 319 => \n array (\n 'id' => 838,\n 'user_id' => 75,\n 'key' => 'email',\n 'value' => 'j_sharp70@bigpond.com',\n 'is_json' => 0,\n ),\n 320 => \n array (\n 'id' => 839,\n 'user_id' => 75,\n 'key' => 'fax_number',\n 'value' => '',\n 'is_json' => 0,\n ),\n 321 => \n array (\n 'id' => 840,\n 'user_id' => 75,\n 'key' => 'payment_email',\n 'value' => '',\n 'is_json' => 0,\n ),\n 322 => \n array (\n 'id' => 841,\n 'user_id' => 75,\n 'key' => 'payment_percent_booking',\n 'value' => '',\n 'is_json' => 0,\n ),\n 323 => \n array (\n 'id' => 842,\n 'user_id' => 75,\n 'key' => 'payment_percent_invite',\n 'value' => '',\n 'is_json' => 0,\n ),\n 324 => \n array (\n 'id' => 843,\n 'user_id' => 76,\n 'key' => 'register_ip',\n 'value' => '124.19.9.210',\n 'is_json' => 0,\n ),\n 325 => \n array (\n 'id' => 844,\n 'user_id' => 76,\n 'key' => 'website',\n 'value' => '',\n 'is_json' => 0,\n ),\n 326 => \n array (\n 'id' => 845,\n 'user_id' => 76,\n 'key' => 'business_abn',\n 'value' => '',\n 'is_json' => 0,\n ),\n 327 => \n array (\n 'id' => 846,\n 'user_id' => 76,\n 'key' => 'mobile_number',\n 'value' => '1827361827361',\n 'is_json' => 0,\n ),\n 328 => \n array (\n 'id' => 847,\n 'user_id' => 76,\n 'key' => 'business_summary',\n 'value' => 'Learn to play flute',\n 'is_json' => 0,\n ),\n 329 => \n array (\n 'id' => 848,\n 'user_id' => 76,\n 'key' => 'reg_survey',\n 'value' => '{\"1\":{\"options\":[\"5\"]},\"2\":{\"options\":[\"5\"],\"OTHER\":\"\"},\"3\":{\"options\":[\"3\"],\"OTHER\":\"\"}}',\n 'is_json' => 1,\n ),\n 330 => \n array (\n 'id' => 849,\n 'user_id' => 76,\n 'key' => 'policy_sunsmart',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 331 => \n array (\n 'id' => 850,\n 'user_id' => 76,\n 'key' => 'policy_food',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 332 => \n array (\n 'id' => 851,\n 'user_id' => 76,\n 'key' => 'policy_children',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n 333 => \n array (\n 'id' => 852,\n 'user_id' => 76,\n 'key' => 'policy_allergy',\n 'value' => '[\"MORE_INFO\"]',\n 'is_json' => 1,\n ),\n ));\n \n \n }", "function newUser() {\n $r['content'] = null;\n $r['moduleTitle'] = gettext('Add user');\n\n $r['content'] = $this->userForm();\n\n return $r;\n }", "function addExtraLoginFields( $user ) \r\n\t{?>\r\n \t<table class=\"form-table\">\r\n \t\t<p class =\"custom_user_field_row\">\r\n \t\t<label for=\"<?php $this->fieldNameInDB ?>\">\r\n\t\t\t \t<b> <?php echo $this->labelName ?> </b>\r\n \t\t\t<br></br> \t \t\r\n\t\t\t <label><input type=\"radio\" name=\"<?php echo $this->fieldNameInDB ?>\" \r\n\t\t\t <?php if (strcasecmp(get_the_author_meta( $this->fieldNameInDB, $user->ID ),$this->choices[0]) == 0 ) { ?>checked=\"checked\"<?php }?> value=\"<?php echo $this->choices[0] ?>\">\r\n\t\t\t <?php echo $this->choices[0] ?><br /></label>\r\n\t\t\t \r\n <label><input type=\"radio\" name=\"<?php echo $this->fieldNameInDB ?>\"\r\n\t\t\t <?php if (strcasecmp(get_the_author_meta($this->fieldNameInDB, $user->ID ), $this->choices[1]) == 0 ) { ?>checked=\"checked\"<?php }?> value=\"<?php echo $this->choices[1] ?>\">\r\n\t\t\t <?php echo $this->choices[1] ?><br /></label>\r\n\t\t\t</label>\r\n \t</p>\r\n \t</table>\r\n\t<?php }", "public function addMeta(array $data)\n {\n foreach ($data as $key => $value) {\n $this->meta->{$key} = $value;\n }\n }", "private function addMetadata() {\n\n\t\t$metaId = $this->getParam('metadataid',true, -1);\n\t\t$metaName = $this->getParam('metadataname',true);\n\t\t$metaDesc = $this->getParam('metadatadescription',true);\n\t\t$metaPublic = (bool)$this->getParam('metadatapublic', true, false);\n\n\t\tif (!is_null($metaName) && !is_null($metaDesc)) {\n\t\t\t\n\t\t\t$metaName = preg_replace('/\\s/', '',trim($metaName));\n\t\t\t$metaDesc = trim($metaDesc);\n\t\t\t$obj = new metadataTypeObj($metaId, $metaName, $metaDesc, VCDUtils::getUserID(), $metaPublic);\n\t\t}\n\n\t\tif ($metaId == -1) {\n\t\t\tSettingsServices::addMetaDataType($obj);\n\t\t} else if ($metaId > 30) {\n\t\t\tSettingsServices::updateMetadataType($obj);\n\t\t} else {\n\t\t\tthrow new Exception(\"Wrong metadata id posted\");\n\t\t}\n\t\t\n\t\tredirect('?page=settings');\n\t}", "function pmproiufcsv_is_iu_import_usermeta($usermeta, $userdata)\r\n{\r\n\t$pmpro_fields = pmproiufcsv_getFields();\r\n\t\t\r\n\t$newusermeta = array();\r\n\tforeach($usermeta as $key => $value)\r\n\t{\t\t\r\n\t\tif(in_array($key, $pmpro_fields))\r\n\t\t\t$key = \"import_\" . $key;\r\n\t\t\t\t\r\n\t\t$newusermeta[$key] = $value;\r\n\t}\r\n\t\r\n\treturn $newusermeta;\r\n}", "public function addMetas(array $metas);", "public function addMeta($request, $response, $args)\n {\n $post = $request->getParsedBody();\n $docId = session('acct.id');\n $data = [\n 'doctor_id' => $docId,\n 'meta_key' => $post['type'],\n 'meta_value' => $post['value'],\n ];\n\n if (DB::table('DoctorMeta')->where($data)->exists()) {\n return $response->withJson(['err' => 'Data already exists']);\n }\n\n $metaId = DB::table('DoctorMeta')->insertGetId($data);\n $data['meta_id'] = encrypt($metaId);\n $html = $this->view->fetch('dr/list_item.twig', $data);\n return $response->withJson(['html' => $html]);\n }", "public function createDecoratedUser(\\WP_User $user = null, array $meta_data_array = [], array $extra_data_array = []);", "public function additional_info_metabox() {\n\t\tif ( ! function_exists( 'slt_cf_register_box' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$fields = array();\n\t\t$fields = apply_filters( 'rns_additional_info_fields', $fields );\n\t\tif ( empty( $fields ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$box = array(\n\t\t 'type' => 'user',\n\t\t 'id' => 'rns_additional_user_fields',\n\t\t 'title' => 'Additional Info',\n\t\t 'fields' => $fields,\n\t\t);\n\n\t\tslt_cf_register_box( $box );\n\t}", "public function addUser()\n {\n\n if (!empty($_POST['nom']) && !empty($_POST['prenom']) && !empty($_POST['nom']) && !empty($_POST['email'])\n && !empty($_POST['hote'])\n ) {\n $nom = htmlspecialchars($_POST['nom']);\n\n $date_registration = date('Y-m-d H:i:s');\n\n\n $tab = array(\n 'date_registration' => $date_registration,\n 'nom' => $nom,\n 'prenom' => htmlspecialchars($_POST['prenom']),\n 'email' => htmlspecialchars($_POST['email']),\n 'entreprise' => htmlspecialchars($_POST['entreprise']),\n 'hote' => htmlspecialchars($_POST['hote'])\n );\n\n $add = new Model_Admin();\n $addUser = $add->addUser($tab);\n\n }\n }", "function add($meta = array(), $post_id = 0, $is_main = \\false)\n {\n }", "function addMeta($meta)\n {\n if (is_object($meta) && is_a($meta, 'file_xspf_meta')) {\n $this->_meta[] = $meta;\n }\n }", "public function setUserData($key, $value) {\n\t\tif (isset($this->columns[$key])) {\n\t\t\t$this->columns[$key] = $value;\n\t\t} else {\n\t\t\tif (isset($this->metadata[$key])) {\n\t\t\t\t$this->metadata[$key] = $value;\n\t\t\t} else {\n\t\t\t\t$temp = new UserMeta();\n\t\t\t\t$temp->columns['key'] = $key;\n\t\t\t\t$temp->columns['value'] = $value;\n\t\t\t\t$temp->save();\n\t\t\t}\n\t\t}\n\t}", "public function updateMetaData()\n {\n AdMetaData::updateOrCreate([\n //Add unique field combo to match here\n //For example, perhaps you only want one entry per user:\n 'ad_id' => $this->id,\n ],\n [\n 'ad_id' => $this->id,\n 'user_id' => $this->user_id,\n 'country' => $this->country,\n 'created_at_ymd' => $this->created_at_date->format('ymd'),\n 'end_date_ymd' => $this->end_date->format('ymd'),\n 'price' => $this->price,\n 'price_group' => ceil($this->price / 10000),\n ]);\n\n }", "function update_usermeta($user_id, $meta_key, $meta_value)\n{\n}", "public function add_meta_data($key, $value)\n {\n }", "function bp_notifications_add_meta( $notification_id, $meta_key, $meta_value, $unique = false ) {\n\tadd_filter( 'query', 'bp_filter_metaid_column_name' );\n\t$retval = add_metadata( 'notification', $notification_id, $meta_key, $meta_value, $unique );\n\tremove_filter( 'query', 'bp_filter_metaid_column_name' );\n\n\treturn $retval;\n}", "public function addRow(array $dataRow, array $metaData = array());", "public function insert_new_record()\n\t{\n\t\t$basic_data = array();\n\t\t$meta_data = array();\n\t\t$db_object = self::_db_object();\n\t\t$users_table = UserManager::get_tables_prefix(). \"users\";\n\t\t$this->password = UserManager::hash_password($this->password);\n\t\t$this->date_registered = $db_object->sql_term('NOW()');\n\t\t\n\t\t$basic_types = UserManager::get_basic_user_data_types(); //array('login', 'password');\n\t\t\n\t\tforeach($this AS $key => $value)\n\t\t{\n\t\t\tif( in_array($key, $basic_types) && ($key != 'id') )\n\t\t\t{\n\t\t\t\t$basic_data[$key] = $value;\n\t\t\t}\n\t\t\telse if( ($key != 'id') && ($key != 'user_meta') )\n\t\t\t{\n\t\t\t\t$meta_data[] = array('data_key'=>$key, 'data_value'=>$value);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( !$this->id = self::_db_object()->insert_records($users_table, $basic_data) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->user_meta = $meta_data;\n\t\t$this->_insert_user_meta();\n\t\treturn $this->id;\n\t}", "function news_meta_add() {\n\n\tadd_meta_box (\n\t\t'news_meta',\n\t\t'news Expiration',\n\t\t'news_meta',\n\t\t'news',\n\t\t'side',\n\t\t'default');\n}", "public function AddUser()\n {\n $row= parent::row(\"INSERT INTO `usuario`( `indicador`, `nombre`, `apellido`, `correo`, `password`) VALUES ('$this->indicator','$this->name','$this->lastname','$this->email','$this->password')\");\n return $row;\n }", "public function addUser($data);", "public function addMeta($key, $value)\r\n {\r\n $this->metadata[$key] = $value;\r\n }", "public function addMeta($name,$content){\r\n $this->meta[$name] = $content;\r\n }", "static function save_metaData($userId ) {\r\n\t \tif ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) )\r\n\t \treturn ;\r\n\r\n\t\r\n\t\t/* Check if the current user has permission to edit the post. */\r\n\t\tif ( !current_user_can( 'edit_user') )\r\n\t\treturn $userId;\r\n\r\n \r\n\t \t$settings = new metaSettings();\r\n\t\t\r\n\t\t$settings->id = ( isset( $_POST['wpXSG-metaId'] ) ? $_POST['wpXSG-metaId'] : '0' );\r\n\t \t$settings->itemId = $userId ;\r\n\t\t$settings->itemType = \"author\";\r\n\t \t$settings->exclude = ( isset( $_POST['wpXSG-Exclude'] ) ? $_POST['wpXSG-Exclude'] : '0' );\r\n\t \t$settings->priority = ( isset( $_POST['wpXSG-Priority'] ) ? $_POST['wpXSG-Priority'] : 'default' );\r\n\t \t$settings->frequency = ( isset( $_POST['wpXSG-Frequency'] ) ? $_POST['wpXSG-Frequency'] : 'default' );\r\n\t\t$settings->inherit = ( isset( $_POST['wpXSG-Inherit'] ) ? $_POST['wpXSG-Inherit'] : 0 );\r\n\t\t\t\r\n\t\tdataAccess::saveMetaItem($settings );\r\n\r\n\t\t\r\n\t\r\n\t}", "public function addMeta($name, $content);", "function addCustomMeta(){\n\tglobal $post;\n\tglobal $metaBoxes;\n\t$html = \"<div class='customMeta'>\";\n\tforeach($metaBoxes[\"fields\"] as $m){\n\t\t$meta[$m] = get_post_meta($post->ID,\"custom_\".$m,true);\n\t\t$label = ucfirst($m);\n\t\t$html .= \"<div class='custRow'><label>$label:</label><input type='text' value='\".$meta[$m].\"' name='custom_$m' placeholder='$m' $required/></div>\";\n\t}\n\t$html .= \"</div><br style='clear:both;'/>\";\n\t$css = \"\n\t\t<style type='text/css'>\n\t\t\t.customMeta .custRow {\n\t\t\t\twidth:100%;\n\t\t\t\tfloat:left;\n\t\t\t\tmargin:10px 0;\n\t\t\t}\n\t\t\t.customMeta label {\n\t\t\t\tfloat:left;\n\t\t\t\twidth:10%;\n\t\t\t}\n\t\t\t.customMeta input,\n\t\t\t.customMeta textarea {\n\t\t\t\tfloat:left;\n\t\t\t\twidth:80%;\n\t\t\t}\n\t\t</style>\n\t\";\n\techo $css.$html;\n}", "function bids_add_new_member($args) {\r\n $defaults = array(\r\n 'fullname' => '',\r\n 'email' => '',\r\n 'username' => '',\r\n 'phone' => '',\r\n 'password' => '',\r\n );\r\n $r = wp_parse_args($args, $defaults);\r\n $user_id = username_exists($r['username']);\r\n if (!$user_id && email_exists($r['username']) == false) {\r\n $user_id = wp_create_user($r['username'], $r['password'], $r['email']);\r\n wp_update_user(array('ID' => $user_id, 'display_name' => $r['fullname']));\r\n add_user_meta($user_id, 'phone', $r['phone']);\r\n return TRUE;\r\n }\r\n return FALSE;\r\n}", "public function store(Request $request)\n {\n $user = $request->user;\n\n $metas = $request->meta;\n if ($userImage = $this->userImage('user_avatar', true)) {\n $user['avatar'] = $userImage;\n }\n if ($metaLogo = $this->metaImage('meta_logo', true)) {\n $metas['logo'] = $metaLogo;\n }\n $user['avatar'] = $userImage;\n $metas['maker'] = implode(\",\", $metas['maker']);\n\n $id = DB::table('users')->insertGetId($user);\n\n #Get key and value of User Meta and process it for bulk insert\n \n foreach ($metas as $key => $meta) {\n UserMeta::updateOrCreate(array('user_id'=> $id,'meta_key'=>$key, 'meta_value'=>$meta));\n }\n\n\n return redirect()->route('Ripple::users.edit', ['id'=>$id]);\n }", "function add_student() {\n\n if (isset($_POST['first_name'])) {\n $first_name = $_POST['first_name'];\n }\n\n if (isset($_POST['last_name'])) {\n $last_name = $_POST['last_name'];\n }\n\n if (isset($_POST['class'])) {\n $class_id = $_POST['class'];\n }\n\n // create a wordpress user\n $user_name = $first_name . \"_\" . $last_name . \"_\" . bin2hex(random_bytes(5));\n\t$random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );\n\t$user_id = wp_create_user( $user_name, $random_password );\n\n wp_update_user(array(\n 'ID' => $user_id,\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'role' => 'student'\n ));\n\n update_user_meta($user_id, 'first_time', 0);\n\n // add wordpress id to the students array for the class\n global $wpdb;\n $wpdb->insert(\n 'students',\n array(\n 'class_id' => $class_id,\n 'user_id' => $user_id\n\t )\n );\n\n echo $user_id;\n // create this students array\n\n die;\n\n}", "public function saveMetaToUser($user_id, $key, $value=null)\n {\n if (! Events::trigger('beforeAddMetaToUser', [$user_id, $key]))\n {\n return false;\n }\n\n $user_id = (int)$user_id;\n\n // Does this key already exist?\n $test = $this->db->where([ 'user_id' => $user_id, 'meta_key' => $key ])->get('user_meta');\n\n // Doesn't exist, so insert it.\n if (! $test->num_rows())\n {\n $data = [\n 'user_id' => $user_id,\n 'meta_key' => $key,\n 'meta_value' => $value\n ];\n\n return $this->db->insert('user_meta', $data);\n }\n\n // Otherwise, we need to update the existing.\n return $this->db->where('user_id', $user_id)\n ->where('meta_key', $key)\n ->set('meta_value', $value)\n ->update('user_meta');\n }", "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'OpenNews : Add New User';\n\n $this->loadViews(\"addNew\", $this->global, $data, NULL);\n }\n }", "public function testUserMeta()\n {\n $key = static::randomString();\n $val = static::randomString();\n\n $userId = static::createUser('author');\n\n // get a meta key that doesn't exist\n $this->assertEmpty(get_user_meta($userId, $key) );\n\n // set and get\n update_user_meta($userId, $key, $val);\n $this->assertEquals($val, array_shift(get_user_meta($userId, $key)));\n\n // change and get again\n $val2 = static::randomString();\n update_user_meta($userId, $key, $val2);\n $this->assertEquals($val2, array_shift(get_user_meta($userId, $key)));\n\n // deleting based on key\n delete_user_meta($userId, $key);\n $this->assertEmpty(get_user_meta($userId, $key));\n\n // set user meta again\n update_user_meta($userId, $key, $val);\n $this->assertEquals($val, array_shift(get_user_meta($userId, $key)));\n\n // deleting based on key and a incorrect value\n delete_user_meta($userId, $key, static::randomString());\n $this->assertEquals($val, array_shift(get_user_meta($userId, $key)));\n\n // deleting based on correct key and value\n delete_user_meta( $userId, $key, $val );\n $this->assertEmpty(get_user_meta($userId, $key) );\n\n }", "abstract protected function addRow();", "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "abstract public function add($user);", "public function addMetaFields()\n {\n\n // Get some help :-)\n $helper = Metabox::get('lbwp-nl-item');\n\n // Metabox for settings\n $boxId = 'item-settings';\n $helper->addMetabox($boxId, 'Newsletter Beitrag');\n\n // Metabox for text and link\n $helper->addTextarea('newsletterText', $boxId, 'Text', 120, array('required' => true));\n $helper->addInputText('newsletterLink', $boxId, 'Link');\n }", "function my_save_extra_profile_fields( $user_id ) {\r\n\t\tif ( !current_user_can( 'edit_user', $user_id ) ) {\r\n\t\t\treturn false;\r\n\t}\r\n\t\tupdate_usermeta($user_id, 'fullname', $_POST['fullname']);\r\n\t\tupdate_usermeta($user_id, 'designations', $_POST['designations']);\r\n\t\tupdate_usermeta($user_id, 'customrole', $_POST['customrole']);\r\n\t\tupdate_usermeta($user_id, 'facebook', $_POST['facebook']);\r\n\t\tupdate_usermeta($user_id, 'twitter', $_POST['twitter']);\r\n\t\tupdate_usermeta($user_id, 'youtube', $_POST['youtube']);\r\n\t\tupdate_usermeta($user_id, 'google', $_POST['google']);\r\n\t\tupdate_usermeta($user_id, 'linkedin', $_POST['linkedin']);\r\n\t\tupdate_usermeta($user_id, 'homepage', $_POST['homepage']);\r\n\t}", "public function action_add() {\n\t\t$this->_tpl->content = View::factory('s4k/user/manage/create', array(\n\t\t\t'groups' => Sentry::getGroupProvider()->findAll(),\n\t\t\t'permissions' => Permissions::instance()->all()\n\t\t\t)\n\t\t);\n\t}", "public function add()\n {\n $this->title = _('New User');\n unset($this->headerData);\n $this->templates = array(\n '${field}',\n '${input}',\n );\n $this->attributes = array(\n array(),\n array(),\n );\n $this->data = array();\n $fields = array(\n '<input type=\"text\" name=\"fakeusernameremembered\"/>' =>\n '<input type=\"password\" name=\"fakepasswordremembered\"/>',\n _('User Name') => sprintf(\n '<input type=\"text\" class=\"username-input\" name='\n . '\"name\" value=\"%s\" autocomplete=\"off\"/>',\n $_REQUEST['name']\n ),\n _('Friendly Name') => sprintf(\n '<input type=\"text\" class=\"friendlyname-input\" name='\n . '\"display\" value=\"%s\" autocomplete=\"off\"/>',\n $_REQUEST['name']\n ),\n _('User Password') => '<input type=\"password\" class='\n . '\"password-input1\" name=\"password\" value=\"\" autocomplete='\n . '\"off\" id=\"password\"/>',\n _('User Password (confirm)') => '<input type=\"password\" class='\n . '\"password-input2\" name=\"password_confirm\" value='\n . '\"\" autocomplete=\"off\"/>',\n _('Allow API') => '<input type=\"checkbox\" name=\"apienabled\" '\n . 'autocomplete=\"off\" id=\"apion\" checked/>'\n . '<label for=\"apion\"></label>',\n sprintf(\n '%s&nbsp;'\n . '<i class=\"icon icon-help hand fa fa-question\" title=\"%s\"></i>',\n _('Mobile/Quick Image Access Only?'),\n sprintf(\n '%s - %s, %s %s.',\n _('Warning'),\n _('if you tick this box'),\n _('this user will not be able to log into'),\n _('this FOG Management console in the future')\n )\n ) => '<input type=\"checkbox\" name=\"isGuest\" autocomplete=\"off\" id=\"'\n . 'isguest\"/>'\n . '<label for=\"isguest\"></label>',\n '&nbsp;' => sprintf(\n '<input name=\"add\" type=\"submit\" value=\"%s\"/>',\n _('Create User')\n )\n );\n self::$HookManager\n ->processEvent(\n 'USER_FIELDS',\n array(\n 'fields' => &$fields,\n 'User' => &$this->obj\n )\n );\n array_walk($fields, $this->fieldsToData);\n self::$HookManager\n ->processEvent(\n 'USER_ADD',\n array(\n 'data' => &$this->data,\n 'templates' => &$this->templates,\n 'attributes' => &$this->attributes\n )\n );\n printf(\n '<h2>%s</h2><form method=\"post\" action=\"%s\">',\n _('Add new user account'),\n $this->formAction\n );\n $this->render();\n echo '</form>';\n }", "public function create(array $data, array $meta=array()){\n\t\t$sql = new SqlManager();\n\t\tif(isset($data['password'])){\n\t\t\t// Save password as bcrypt hash``\n\t\t\t$data['password'] = Crypt::createHash($data['password']);\n\t\t}\n\t\t$sql->insert(\"user\", $data);\n\t\t$id = $sql->getLastInsertID();\n\t\t// Save meta data\n\t\tforeach($meta as $key => $value){\n\t\t\tMeta::save(\"user\", $id, $key, $value);\n\t\t}\n\t\t// Return database ID of added user\n\t\treturn $id;\n\t}", "public function AdduserAction()\n {\n \t$this->_layout->meta_title = '添加管理员';\n }", "public function addUser(){\n global $data;\n // Create a new user.\n // Define status.\n $data['baseurl'] = Doo::conf()->APP_URL;\n $data['title'] = 'Create a new user';\n $data['content'] = 'All Users must first get authorization before\n using the diagnostic system.';\n $data['save_user'] = $data['baseurl'].'index.php/admin/save_user';\n $data['method_flag']= 'addUser';\n $this->render('userform', $data);\n /*\n All Users must first get authorization before using the Leica microscope.\n Please fill-in the form below. (Starred items must be filled in.)\n Please note: This electronic form is used in lieu of an SU-13. PI will be contacted to confirm billing\n */\n\n }", "public function install_data()\n\t{\n\t\tglobal $wpdb;\n\n\t\t$wpdb->insert(\n\t\t\t$this->getName(),\n\t\t\tarray(\n\t\t\t\t'guid' => '12345123451234512345123451234512345123451234512345',\n\t\t\t\t'date_gmt' => gmdate('Y-m-d H:i:s'),\n\t\t\t)\n\t\t);\n\t}", "public function createField_infouser($item) {\n\n\t\t$rs = Capsule::select(\"INSERT INTO $this->tablename (infouserID, infouser_login, infouser_password, infouser_confirmPass, infouser_firstname, infouser_lastname, infouser_role, \n\t\t\tinfouser_businessUnit, infouser_note, infouser_active, infouser_1, infouser_2, infouser_3, infouser_4, infouser_5) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",[$item->infouserID, $item->infouser_login, $item->infouser_password, $item->infouser_confirmPass, $item->infouser_firstname, $item->infouser_lastname, \n\t\t$item->infouser_role, $item->infouser_businessUnit, $item->infouser_note, $item->infouser_active, $item->infouser_1, $item->infouser_2, $item->infouser_3, $item->infouser_4, $item->infouser_5]);\n\t\treturn $rs;\n\t}", "public static function addUser($data)\n\t{\n\t\ttry {\n\t\t\t$connection=Yii::app()->db; \n\t\t\t$user_id = $data['user_id'];\n\t\t\t$user_login = $data['user_login'];\n\t\t\t$user_pass = $data['user_pass'];\n\t\t\t$user_nicename = $data['user_nicename'];\n\t\t\t$user_email = $data['user_email'];\n\t\t\t$user_url = '';\n\t\t\t$user_status = 0;\n\t\t\t$display_name = $data['user_nicename'];\n\t\t\t$sql = \"INSERT INTO wp_users \n\t\t\t\t\t\t(ID,user_login, user_pass, user_nicename, user_email, user_url, \n\t\t\t\t\t\t\tuser_status, display_name, user_registered)\n\t\t \t \t\t\t\tVALUES \n\t\t \t \t\t\t('$user_id', '$user_login', '$user_pass', '$user_nicename', '$user_email', \n\t\t \t \t\t\t\t'$user_url', '$user_status', '$display_name', NOW())\";\n\t\t\t$capabilities = serialize(array('subscriber'));\n\t\t\t$addPermissionSql = \"INSERT INTO wp_usermeta\n\t \t\t\t\t\t\t(user_id, meta_key, meta_value)\n\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t ('$user_id', 'wp_capabilities', '$capabilities');\n\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t wp_usermeta\n\t\t\t\t\t\t\t (user_id, meta_key, meta_value)\n\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t ('$user_id', 'wp_user_level', '0');\";\n\t\t\t$command = $connection->createCommand($sql);\n\t\t\t$rowCount = $command->execute();\n\t\t\tif(!$rowCount) {\n\t\t\t\tthrow new Exception('Can\\'t add new user');\n\t\t\t} else {\n\t\t\t\t$command = $connection->createCommand($addPermissionSql);\n\t\t\t\t$command->execute();\n\t\t\t}\n\n\t\t} catch(Exception $e) {\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "function medicplus_add_item_user_profile($items) {\n\n\t// Add new item\n\t$links = Medicplus_Params::get('author_social_links');\n\tforeach($links as $k=>$v){\n\t\t$items[$k] = $v;\n\t}\n\treturn $items;\n}", "public function updateMeta($data)\n {\n // If no 'id' is in the $data array, then\n // we don't have successful insert, get out of here\n if (empty($data['id']) || ($data['method'] != 'insert' && $data['method'] != 'update'))\n {\n return $data;\n }\n\n // Collect any meta fields\n foreach ($data['fields'] as $key => $value)\n {\n if (in_array($key, $this->meta_fields))\n {\n $this->db->where('user_id', $data['id']);\n $this->db->where('meta_key', $key);\n $query = $this->db->get('user_meta');\n\n $obj = [\n 'user_id' => $data['id'],\n 'meta_key' => $key,\n 'meta_value' => $value\n ];\n\n if ($query->num_rows() == 0)\n {\n $this->db->insert('user_meta', $obj);\n }\n else if ($query->num_rows() > 0)\n {\n $this->db->where('user_id', $data['id'])\n ->where('meta_key', $key)\n ->set('meta_value', $value)\n ->update('user_meta', $obj);\n }\n }\n }\n\n return $data;\n }", "public function save_customer_meta_fields($user_id)\n {\n }", "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'Carver Consulting Inc : Add New User';\n\n $this->loadViews(\"addNew\", $this->global, $data, NULL);\n }\n }", "function add_user()\n\t{\n\t\treturn $this->add();\n\t}", "function pw_rcp_add_user_fields() {\n\t\n\t$phone = get_user_meta( get_current_user_id(), 'rcp_phone', true );\n\t$address = get_user_meta( get_current_user_id(), 'rcp_address', true );\n\t$postcode = get_user_meta( get_current_user_id(), 'rcp_postcode', true );\n\n\t?>\n\t<p>\n\t\t<label for=\"rcp_phone\"><?php _e( 'Phone number', 'rcp' ); ?></label>\n\t\t<input name=\"rcp_phone\" id=\"rcp_phone\" type=\"text\" value=\"<?php echo esc_attr( $phone ); ?>\"/>\n\t</p>\n\t<p>\n\t\t<label for=\"rcp_address\"><?php _e( 'Address', 'rcp' ); ?></label>\n\t\t<textarea name=\"rcp_address\" id=\"rcp_address\" type=\"text\"><?php echo esc_attr( $address ); ?></textarea>\n\t</p>\n\t<p>\n\t\t<label for=\"rcp_postcode\"><?php _e( 'Postcode', 'rcp' ); ?></label>\n\t\t<input name=\"rcp_postcode\" id=\"rcp_postcode\" type=\"text\" value=\"<?php echo esc_attr( $postcode ); ?>\"/>\n\t</p>\n\t<?php\n}", "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'CodeInsect : Add New User';\n\n $this->loadViews(\"addNew\", $this->global, $data, NULL);\n }\n }", "function add_site_meta($site_id, $meta_key, $meta_value, $unique = \\false)\n{\n}", "function add_post_meta($post_id, $meta_key, $meta_value, $unique = \\false)\n{\n}", "function wc_add_order_item_meta($item_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public function add_user()\n {\n $toolbar = array();\n array_push($toolbar, array('name'=>'btnSave', 'text'=>'Save', 'img'=>'assets/images/disk_save.png', 'title'=>'Click to save user'));\n $this->data['toolbar'] = $this->construct_toolbar($toolbar);\n $this->data['content'] = $this->construct_add_user_content();\n echo $this->parser->parse('administration/add_user_header.html', $this->data, true);\n }", "public function add_meta_boxes( $user ){\r\n\r\n $this->load_options();\r\n\r\n require_once BF_PATH . 'user-metabox/class-bf-user-metabox-front-end-generator.php';\r\n\r\n foreach( (array) $this->options as $metabox_id => $metabox ){\r\n\r\n $val = $this->get_full_meta_data( $metabox_id, $user );\r\n\r\n if( empty( $metabox['config']['title'] ) )\r\n $metabox['config']['title'] = __( 'Better User Options', 'better-studio' );\r\n\r\n $front_end = new BF_User_Metabox_Front_End_Generator( $metabox, $metabox_id, $val );\r\n\r\n $front_end->callback();\r\n\r\n }\r\n\r\n }", "public function addAuthorBio(Request $request){\n //nalazimo usera u tabeli 'users'\n $user = User::find($request['author_id']);\n //uzimamo unos u formu iz allposts.blade.php\n $user->bio = $request['authorbio'];\n $user->save(); // cuvamo promenu, pravimo Session::flash sa success porukom i vracamo na allposts.blade.php\n Session::flash('success', 'You have successfully add user biography!');\n return redirect()->back(); //vrati se nazad\n}", "public static function manage_user_info(){\n\t\t// self::get_user_info();\n\t\t// insert data into db or another actions\n\t}", "function update_user_extra_meta_data() {\n\tglobal $userMeta;\n\t\n\t$errors = new WP_Error;\n\t\n\t$userID = get_user_id_for_viewed_profile();\n\t\n\t//Check what groups user belongs to\n\t$user_array = array(\n\t\t\t'user_id' => $userID,\n\t\t\t'user_login' => null,\n\t\t\t'user_email' => null,\n\t\t\t'format' => '',\n\t\t\t'list_class' => 'groups',\n\t\t\t'item_class' => 'name',\n\t\t\t'order_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t\t);\n\t\n\t//Get groups of user profile being editted\n\t$user_groups_string .= do_shortcode_func( 'groups_user_groups', $user_array );\n\t\n\t//Check what group user has and display the appropriate user fields\n\tif (strpos($user_groups_string, 'Individual')) {\n\t\t$form = $userMeta->getFormData( 'Individual Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Service')) {\n\t\t$form = $userMeta->getFormData( 'Service Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Organisation')) {\n\t\t$form = $userMeta->getFormData( 'Organisation Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Concession')) {\n\t\t$form = $userMeta->getFormData( 'Concession Member' );\n\t}\n\t\n\t//$form = $userMeta->getFormData( 'Individual Member' );\n\n\t\n\t$backendFields = $form[\"fields\"]; \n\t\n\t//print \"<pre>\";\n\t//print_r($backendFields);\n\t//print \"</pre>\";\n\t\n\t\n\tif( !is_array( $backendFields ) ) return;\n\t\n\t$userData = array();\n\tforeach( $backendFields as $fieldID ){\n\t\t\t \n\t\t$fieldData = $fieldID ;\n\t\t\n\t\tif( !empty( $fieldData[ 'meta_key' ] ) )\n\t\t\t$fieldName = $fieldData[ 'meta_key' ];\n\t\telse{\n\t\t\tif( in_array( @$fieldData[ 'field_type' ], array('user_registered','user_avatar') ) )\n\t\t\t\t$fieldName = $fieldData[ 'field_type' ];\n\t\t}\n\t\t\n\t\tif( empty( $fieldName ) ) continue;\n\t\t\n\t\t$userData[ $fieldName ] = @$_POST[ $fieldName ]; \n\n\t\t// Handle non-ajax file upload\n\t\tif( in_array( $fieldData[ 'field_type' ], array( 'user_avatar', 'file' ) ) ){\n\t\t\tif( isset( $_FILES[ $fieldName ] ) ){\n\t\t\t\t$extensions = @$fieldData[ 'allowed_extension' ] ? $fieldData[ 'allowed_extension' ] : \"jpg, png, gif\";\n\t\t\t\t$maxSize = @$fieldData[ 'max_file_size' ] ? $fieldData[ 'max_file_size' ] * 1024 : 1024 * 1024;\n\t\t\t\t$file = $userMeta->fileUpload( $fieldName, $extensions, $maxSize );\n\t\t\t\tif( is_wp_error( $file ) ){\n\t\t\t\t\tif( $file->get_error_code() <> 'no_file' ) \n\t\t\t\t\t\t$errors->add( $file->get_error_code(), $file->get_error_message() );\n\t\t\t\t}else{\n\t\t\t\t\tif( is_string( $file ) )\n\t\t\t\t\t\t$userData[ $fieldName ] = $file;\n\t\t\t\t} \n\t\t\t}\n\t\t} \t\t\n\t} \n\t\n\t$userMeta->insertUser( $userData, $userID );\n}", "public function p_create_new_entry() {\n # This method should take the $_POST data submitted and add it to the database\n print_r($_POST);\n $POST['created'] = Time::now();\n \n # Load user from DB\n\t\t$q = \"SELECT user_id\n FROM users\n\t\t\tWHERE token = '\".$this->token.\"'\n\t\t\tLIMIT 1\";\t\n $POST['user_id'] = $q;\n \n echo 'Your quote is posted.'; \n }", "function shure_add_user_course($new_value) {\n\t\t$user_id = get_current_user_id();\n // Get the existing meta for 'meta_key'\n $meta = get_user_meta($user_id, 'enrolled_courses', false);\n\n\t\t//push if not in array\n\t\tif (!in_array($new_value, $meta)) {\n\t\t\t$meta[] = $new_value;\n\t\t}\n\n // Write the user meta record with the new value in it\n update_user_meta($user_id, 'enrolled_courses', $meta);\n}", "public function setEntryMeta()\n {\n // Set some values for a new entry\n if (!$this->exists) {\n $created_by = (isset(ci()->current_user->id) and is_numeric(ci()->current_user->id))\n ? ci()->current_user->id\n : null;\n\n $this->setAttribute('created_by', $created_by);\n $this->setAttribute('updated_at', '0000-00-00 00:00:00');\n $this->setAttribute('ordering_count', $this->count('id') + 1);\n } else {\n $this->setAttribute('updated_at', time());\n }\n\n return $this;\n }", "function learn_press_append_user_profile_fields( $user ) {\n\tlearn_press_admin_view( 'backend-user-profile', array( 'user' => $user ) );\n}", "function alter_table(){\n\t\t$table = $this->getTable();\n\t\t$sql = \"ALTER TABLE $table ADD `meta` TEXT AFTER `parent`;\";\n\t\techo \"Added meta columm in $table <br>\";\n\t\treturn $this->query( $sql );\n\t}", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "public function create() {\n $user = User::findOrFail(Auth::user()->id);\n $extras = Extra::where('id_user_type', $user->id_user_type)->get();\n\n return view('profile.extra.create', ['menu' => 'extras', 'user' => $user, 'extras' => $extras, 'title' => 'Επεξεργασία προφίλ - Επιπλέον πληροφορίες']);\n }", "function simpay_custom_add_metadata( $payment ) {\n\n\t$new_metadata = array();\n\t$new_metadata[ 'shirt_color' ] = 'Red';\n\t$new_metadata[ 'shirt_size' ] = 'Medium';\n\n\t// Add new metadata to existing metadata before processing payment form.\n\t$payment->metadata = array_merge( $payment->metadata, $new_metadata );\n}" ]
[ "0.7138335", "0.6967782", "0.6606692", "0.6606692", "0.6570318", "0.65311456", "0.650011", "0.6473709", "0.6449126", "0.63860685", "0.627112", "0.6259295", "0.61852026", "0.61799496", "0.6148392", "0.6129169", "0.6123073", "0.6116421", "0.6023407", "0.60031134", "0.59746706", "0.59432995", "0.5924051", "0.59111065", "0.58901864", "0.588548", "0.58629674", "0.5860452", "0.5859821", "0.58547807", "0.58479095", "0.5840859", "0.581228", "0.5808899", "0.5797805", "0.5791885", "0.5788298", "0.5775509", "0.57549447", "0.57520646", "0.57519186", "0.57489043", "0.5736585", "0.5723416", "0.5686561", "0.5684689", "0.56815916", "0.5671452", "0.5665399", "0.5655036", "0.5641633", "0.56404626", "0.56336313", "0.56288534", "0.5625991", "0.56202954", "0.56175953", "0.5598406", "0.5594469", "0.559236", "0.55729175", "0.55720913", "0.5570724", "0.556772", "0.55541545", "0.55514526", "0.5550492", "0.5549085", "0.55451256", "0.5542636", "0.55399686", "0.5534848", "0.5534437", "0.55183077", "0.5510899", "0.54973745", "0.5497065", "0.5472244", "0.5463321", "0.54542977", "0.5450023", "0.54493874", "0.5446088", "0.5439157", "0.54387116", "0.54379195", "0.54366684", "0.54335815", "0.54200405", "0.54192704", "0.5414206", "0.5413695", "0.5409371", "0.5405534", "0.5403509", "0.53997093", "0.5397871", "0.5396237", "0.539593", "0.5394499" ]
0.82543623
0
Check if an imported action is a registration action
Проверьте, является ли импортированное действие действием регистрации
private static function is_imported_registration_action( $action ) { return isset( $action['post_excerpt'] ) && $action['post_excerpt'] === 'register'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasAction($action);", "function action_exists($name)\n{\n return Plugins::instance()->action_exists($name);\n}", "function action_exists($name)\n{\n\treturn Hooks::action_exists($name);\n}", "private static function imported_action_needs_migration( $action ) {\n\t\t$settings = FrmAppHelper::maybe_json_decode( $action['post_content'] );\n\n\t\treturn isset( $settings['reg_email_msg'] ) && ! empty( $settings['reg_email_msg'] );\n\t}", "public function hasAction($name);", "public function ensureActionExists()\n {\n return method_exists($this->prolet, $this->action);\n }", "protected function _isActionAllowed($action)\n {\n \n return true;\n }", "public function isRegistered(): bool;", "function hasAction($action)\n {\n return array_key_exists($action, $this->actions);\n }", "public function is_action() {\n\t\treturn did_action( $this->name ) > 0;\n\t}", "function action_filter($name)\n{\n\treturn Hooks::action_exists($name);\n}", "function isAddAction($action)\n{\n return $action === 'add';\n}", "public function hasPermission($action);", "protected function actionAllowed($action) {\n $as = explode('.', $action, 2);\n $actions = Auth::instance()->user('actions');\n return array_value($as, 1) ? isset($actions[$as[0]][$as[1]]) : isset($actions[$as[0]]);\n }", "public function isValid($action){\n\t return USession::exists('user');\n }", "static function existsAction($action){\n $constants = API_ACTION::getConstants();\n return array_search($action, $constants);\n }", "private function isMethodExist($controller, $action) {\n $actions = get_class_methods($controller);\n foreach ($actions as $actionItem) {\n if ('action' . $action == $actionItem)\n return true;\n }\n //print_r($actions);\n return false;\n }", "private function has_permission($action) {\n\tif(in_array($action, $this->allowed_actions))\n\t\treturn true;\n\treturn false;\n}", "private function _checkAction(): bool {\n $serviceName = $this->getCalledServiceName();\n //first, check if action is set and not null\n if ($serviceName !== null) {\n $calledService = $this->getServiceByName($serviceName);\n //after that, check if action is supported by the API.\n if ($calledService !== null) {\n $allowedMethods = $calledService->getRequestMethods();\n\n if (count($allowedMethods) != 0) {\n $isValidRequestMethod = in_array(Request::getMethod(), $allowedMethods);\n\n if (!$isValidRequestMethod) {\n $this->requestMethodNotAllowed();\n } else {\n return true;\n }\n } else {\n $this->sendResponse($this->getResponseMessage('404-6'), self::E, 404);\n }\n } else {\n $this->serviceNotSupported();\n }\n } else {\n $this->missingServiceName();\n }\n\n return false;\n }", "public function isRegistered() {\n\t\n\t\treturn $this->getCallbackController()->isRegistered();\n\t}", "private function isAction($action_name) \r\n {\r\n return method_exists($this->controller, $action_name);\r\n }", "protected function _isAllowedAction($action){\n return true;\n }", "private function _checkAction($action){\n\t\tif($action!='*'){\n\t\t\treturn $action==Router::getAction();\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "protected function hasAction($url) {\n\t\t//$enableEmails = yii::$app->setting->get ( 'Enable Emails' );\n\t\t\n\t\t/*\n\t\t * if ( is_array($url))\n\t\t * if ( $id == 'manage') $id = 'index';\n\t\t *\n\t\t * $actionMap = ->actions ();\n\t\t *\n\t\t * if (isset ( $actionMap [$id] )) {\n\t\t * return true;\n\t\t * } else {\n\t\t * $action = Inflector::id2camel($id);\n\t\t * $methodName = 'action' . ucfirst($action);\n\t\t * if (method_exists ( Yii::$app->controller, $methodName )) {\n\t\t * return true;\n\t\t * }\n\t\t * }\n\t\t *\n\t\t * return false;\n\t\t */\n\t\treturn true;\n\t}", "function MyApp_Handle_Action_Allowed($action)\n { \n $res=$this->MyAction_Access_Has($action);\n if (!$res)\n {\n $action=$this->DefaultAction;\n $res=$this->MyAction_Access_Require($action);\n }\n\n if ($res) { return $action; }\n \n return False;\n }", "public function disableRegistrationActions(): bool\n {\n return $this->config['disable_registration_route'] || $this->config['registration_url'] !== null;\n }", "protected function _checkPermission($action){\n\t\t\n\t\t$allowGuests = $this->allowGuests();\n\t\t\n\t\tif(!in_array($action, $allowGuests) && !in_array('*', $allowGuests)){\t\t\t\n\t\t\t//check for logged in user\n\t\t\tif(!\\GO::user())\n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\n\t\t$module = $this->getModule();\n\t\treturn !$module || \\GO::modules()->isInstalled($module->name);\n\t}", "public static function has_action( $action, $obj, $function ) {\n\t\t$registered = has_action(\n\t\t\t$action,\n\t\t\tarray(\n\t\t\t\t$obj,\n\t\t\t\t$function,\n\t\t\t)\n\t\t);\n\t\tif ( $registered ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function if_action($actions)\n {\n return app('active')->checkAction($actions);\n }", "function isActionAllowed($actionName);", "public function checkPermission($action){\r\n\t\t// first, is the UID set?\r\n\t\t//if(!isset\r\n\t}", "private function is_valid_action($arg)\n {\n }", "function buddyexpressdesk_action($action){\n\t global $BuddyexpressDesk;\n if(array_key_exists($action, $BuddyexpressDesk->action)){\n if(is_file($BuddyexpressDesk->action[$action])){\n\t include_once($BuddyexpressDesk->action[$action]);\n\t }\n } \n else { \n echo page_404();\n exit();\n }\n}", "public function checkIfActionExists($method);", "public function hasAuthFailAction(){\n return $this->_has(1);\n }", "protected function _verifyAccess($action='load') {\n if ($action == 'load') {\n if (is_null($this->_user)) {\n return false;\n }\n }\n return true;\n }", "function isActionDefined($actionName) {\r\n $actionsFilePath = $this->getActionsPath();\r\n $actionsFile = file_get_contents($actionsFilePath);\r\n $found = is_numeric(strpos($actionsFile, \"{$actionName}action\"));\r\n if ($found) {\r\n return true;\r\n }\r\n\r\n $actionFilePath = $this->generateActionFilePath($actionName);\r\n\r\n if (file_exists($actionFilePath)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "protected function isRegistrationPossible()\n\t{\n\t\treturn (bool) $this->registration_possible;\n\t}", "public function isRegistrationAllowed()\n {\n $result = new Varien_Object(array('is_allowed' => true));\n Mage::dispatchEvent('user_registration_is_allowed', array('result' => $result));\n return $result->getIsAllowed();\n }", "private function isActionWithInput($action)\n {\n return \\in_array(\n $action,\n [\n ApiActions::CREATE,\n ApiActions::UPDATE,\n ApiActions::UPDATE_SUBRESOURCE,\n ApiActions::ADD_SUBRESOURCE,\n ApiActions::DELETE_SUBRESOURCE,\n ApiActions::UPDATE_RELATIONSHIP,\n ApiActions::ADD_RELATIONSHIP,\n ApiActions::DELETE_RELATIONSHIP\n ],\n true\n );\n }", "protected function _verifyAccess($action='load') {\n if ($action == 'load') \n {\n if (is_null($this->_user) || !$this->_user->isAdmin()) \n {\n return false;\n }\n if(empty($this->_get['series']) && empty($this->_post['series']))\n {\n return false;\n }\n }\n return true;\n }", "function allowRegistration()\r\n {\r\n $result = true;\r\n return $result;\r\n }", "public abstract function isImported();", "private function _checkIfMethodExists(Object $class, String $action)\n {\n return (int) method_exists($class, $action) === 1;\n }", "protected function _isAllowedAction($action)\n {\n return true;\n }", "public function isRegistered()\n {\n return in_array($this->loader, spl_autoload_functions(), true);\n }", "private function loadExistAction(){\n\n $actionName = $this->_params['action'].'Action';\n if(method_exists($this->_controllerObject, $actionName)){\n $this->_controllerObject->$actionName();\n }else{\n $this->loadDefaultController();\n }\n }", "public function accessAction(): bool\n {\n }", "public function hasAuthFailAction(){\n return $this->_has(7);\n }", "function is_hook( $type ) {\n\treturn in_array( $type, array( 'filter', 'action', 'filter_reference', 'action_reference' ) );\n}", "private function validateAction($action)\n {\n $actionAvailable = [self::ACTION_ADDFORCE, self::ACTION_ADDNOFORCE, self::ACTION_REMOVE, self::ACTION_UNSUB];\n if (in_array($action, $actionAvailable)) {\n return true;\n }\n return false;\n }", "public static function get_registration_action() {\n\t\treturn 'rest_api_init';\n\t}", "public function checkAction() {\n // TODO: add hooks.\n $has_permission = FALSE;\n\n // Check access for a specific action.\n switch ($this->getAction()) {\n // By default an user can \"register\" a new account if he's anonymous / unlogged.\n case \\Quanta\\Common\\User::USER_ACTION_REGISTER:\n $has_permission = !$this->actor->exists;\n break;\n // To see if an user can edit another, use node permissions.\n case \\Quanta\\Common\\User::USER_ACTION_EDIT:\n $has_permission = NodeAccess::check($this->env, \\Quanta\\Common\\Node::NODE_ACTION_EDIT, array('node' => $this->vars['edit_user']));\n break;\n // By default an user can edit his own profile.\n case \\Quanta\\Common\\User::USER_ACTION_EDIT_OWN:\n $has_permission = $this->actor->getName() == $this->vars['user']->getName();\n break;\n }\n return $has_permission;\n }", "public function registerActions(){\n }", "public function checkAction()\n {\n }", "public function action_exists($name)\n {\n if ( isset(self::$actions[$name]) )\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function canExport();", "public function isInstallable()\n {\n return in_array($this->getType(), ['module', 'extension']);\n }", "function captcha_actions_validate() {\n\t\treturn ossn_call_hook('captcha', 'actions', false, array(\n\t\t\t\t'user/register'\n\t\t));\n}", "public static function is_registered() {\r\n\t\t// If no token is set, the product is not registered.\r\n\t\tif ( empty( self::$token ) ) {\r\n\t\t\treturn false;\r\n\t\t} elseif ( self::$registered ) {\r\n\t\t\treturn true;\r\n\t\t} elseif ( get_site_transient( 'avada_envato_api_down' ) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static function get_registration_action(): string {\n\t\treturn 'template_redirect';\n\t}", "private function _isValidAction()\r\n {\r\n if (!isset($_GET['action']))\r\n return false;\r\n\r\n return in_array($_GET['action'], $this->_available);\r\n }", "protected function canRegisterAfterCheckout() {\n $completion_register_pane = $this->checkoutFlow->getPane('completion_register');\n return $completion_register_pane->getStepId() != '_disabled';\n }", "function checkAuthorization($action, $class, $obj = null) {\n if (\"Login\" == $class) return true;\n \n $class = ucfirst(strtolower($class));\n\n if (isUserAdmin() && isUserActif()) {\n $profil = \"admin\"; \n \n } else if (isUserActif()) {\n $profil = \"associate\";\n } else {\n return false;\n }\n\n global $authorizedActions;\n $bCheckAuth = (array_key_exists($class, $authorizedActions) && \n array_key_exists($action, $authorizedActions[$class]) &&\n strpos($authorizedActions[$class][$action], $profil) !== false);\n\n $bOwnerAllowed = (array_key_exists($class, $authorizedActions) && \n array_key_exists($action, $authorizedActions[$class]) &&\n strpos($authorizedActions[$class][$action], \"owner\") !== false);\n \n if ($bCheckAuth) {\n return true;\n\n } else if ($bOwnerAllowed && $obj) {\n // Get object only possible to Admin or Owners\n return checkOwner($obj);\n\n } else {\n return false;\n }\n\n}", "public function assetRegistered($asset){\n\t\treturn array_key_exists($asset,$this->assets);\n\t}", "function hasRightAccess($action)\n {\n if (array_key_exists($action, $this->actions)) {\n if ($this->actions[$action]) {\n $currentUser = User::getCurrentUser();\n return !$currentUser->isVisitor();\n } else {\n return true;\n }\n } else {\n throw new ActionNotFoundException();\n }\n }", "public function is_registration_required()\n {\n }", "public static function is_importing()\n {\n }", "public function hasActions()\n {\n if (Auth::user()->usr_papel == \"Administrador\") {\n return true;\n }\n return false;\n }", "function can($module = null, $action = null)\n{\n $per = getPermissionDefault(session('admin')->sadmin);\n $per = json_decode($per, true);\n //dd($per);\n if(isset($per[$module][$action]) && $per[$module][$action] == 1) {\n return true;\n }else{\n return false;\n }\n}", "function managementAddCheck(){\n if(isset($_GET[\"action\"]) && !empty($_GET[\"action\"])){\n return true;\n }\n else {\n return false;\n }\n }", "function is_registered( $feature_type, $feature ) {\n return !is_null( $this->get_feature( $feature_type, $feature ) );\n }", "public function hasAction($name) {\n\t\treturn $this->actions->has($name);\n\t}", "public function checkAction($fullAction)\n\t{\n\t\t$config = Config::getInstance();\n\n\t\t$fileName = '';\n\t\tlist($module, $action) = explode('/', trim($fullAction), 2);\n\t\t$this->moduleName = $module;\n\t\t$this->actionName = $action;\n\t\t$this->isSharedModule = false;\n\t\tif ($module != '' && $action != '') {\n\n\t\t\t$appFolder = $config->getFolderPath('app');\n\t\t\t$sharedFolder = $config->getFolderPath('shared');\n\n\t\t\t$fileName = Locator::getAppModuleFilePath($module, \"actions/$action.php\");\n\t\t\tif (!file_exists($fileName)) {\n\t\t\t\t// module is not defined for the application => search shared space\n\t\t\t\t$fileName = Locator::getSharedModuleFilePath($module, \"actions/$action.php\");\n\t\t\t\tif (file_exists($fileName)) {\n\t\t\t\t\t$this->isSharedModule = true;\n\t\t\t\t} else {\n\t\t\t\t\t$fileName = '';\n\t\t\t\t}\n\t\t\t\t$this->addWarning(\"Did not find the file for action $fullAction\");\n\t\t\t}\n\t\t\t// Check unauthorized requests\n\t\t\tif (!$this->checkAuthorization($module, $action)) {\n\t\t\t\t$this->addWarning(\"Authorization check failed for action $fullAction\");\n\t\t\t\t$fileName = '';\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addWarning(\"Malformed action $fullAction\");\n\t\t}\n\n\t\treturn $fileName == '' ? false : $fileName;\n\t}", "public function requiresLogin($action) {\n return TRUE;\n }", "private function isAction($action)\n {\n return (bool)preg_match(\"#/{$action}(/\\?|\\?|/$|$)#\", $this->getRequest()->getRequestUri());\n }", "function isRemoveAction($action)\n{\n return $action === 'remove';\n}", "protected function hasAction($name)\n {\n return array_key_exists($name, $this->actions) && $this->actions[$name] === true;\n }", "public function checkConf($action)\r\n\t{\r\n\t\tswitch ($action)\r\n\t\t{\r\n\t\t\tcase 'members':\r\n\t\t\t\treturn TRUE;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn FALSE;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "function validate_search_action($action)\n{\n\t// A list of valid actions (extensions can add their own actions to the array)\n\t$valid_actions = array('search', 'show_new', 'show_recent', 'show_user_posts', 'show_user_topics', 'show_subscriptions', 'show_unanswered');\n\n\t$return = ($hook = get_hook('sf_validate_actions')) ? eval($hook) : null;\n\tif ($return != null)\n\t\treturn $return;\n\n\tif (in_array($action, $valid_actions))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function checkAction($action = 'perm_sync') {\n\t\t$maySync = false;\n\t\t$this->loadModel('User');\n\t\t$this->User->recursive = -1;\n\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\tif (isset($user['User'])) {\n\t\t\t$this->loadModel('Role');\n\t\t\t$this->Role->recursive = -1;\n\t\t\t$role = $this->Role->findById($user['User']['role_id']);\n\t\t\tif ($role['Role'][$action]) {\n\t\t\t\t$maySync = true;\n\t\t\t}\n\t\t}\n\t\treturn $maySync;\n\t}", "public function isRegistered(string $name): bool;", "public function checkUserActions(string $action): bool\n {\n /* associate the called action with the toplogy page.\n * Special behaviour for the deleteWidget action which does not have any possible configuration in ACL Menus.\n * We do consider through that if user can create a widget then he also can delete it.\n * Also \"defaultEditMode\" action has no link with ACL this action is authorized for all.\n */\n if ($action == 'defaultEditMode') {\n return true;\n }\n $associativeActions = [\n 'edit' => self::TOPOLOGY_PAGE_EDIT_VIEW,\n 'share' => self::TOPOLOGY_PAGE_SHARE_VIEW,\n 'setPreferences' => self::TOPOLOGY_PAGE_SET_WIDGET_PREFERENCES,\n 'addWidget' => self::TOPOLOGY_PAGE_ADD_WIDGET,\n 'deleteWidget' => self::TOPOLOGY_PAGE_DELETE_WIDGET,\n 'setRotate' => self::TOPOLOGY_PAGE_SET_ROTATE,\n 'deleteView' => self::TOPOLOGY_PAGE_DELETE_VIEW,\n 'add' => self::TOPOLOGY_PAGE_ADD_VIEW,\n 'setDefault' => self::TOPOLOGY_PAGE_SET_DEFAULT_VIEW\n ];\n\n // retrieving menu access rights of the current user.\n $acls = new CentreonACL($this->userId);\n $userCustomViewActions = $acls->getTopology();\n if (array_key_exists($associativeActions[$action], $userCustomViewActions)) {\n return true;\n }\n return false;\n }", "public function getAction(){\n $action = Mage::app()->getFrontController()->getAction()->getFullActionName();\n if(($action != 'giftlist_index_editarlista')){\n return false;\n }\n return true;\n }", "public function getValidGlobalActions() {}", "public function hasActions()\n {\n return count($this->actions) > 0;\n }", "public function hasPermission($action)\n {\n if(in_array($action, $this->actions)){\n return $this->testPermission($this->perm, $action);\n }else{\n return $this->invalidAction();\n }\n }", "public function isExport();", "public function hasActionContext($action, $context)\n {\n return true;\n }", "public function actionMatches($module, $action);", "function hasRightAccess($action);", "function has_action($tag, $function_to_check = \\false)\n{\n}", "function actionRegistration() {\n\t\tif( $this->user->isLoggedIn()){ $this->redirect('Profil:default'); }\n\t\t\n\t\t\n\t}", "function isAllowedAction($action) {\n\t\t\treturn $this->getAdminSession( )->isAllowed( 'catalog/warehouses/' . $action );\n\t\t}", "public function is_actioned()\n {\n }", "protected function shouldRegister()\n {\n return (bool) $this->getKey();\n }", "public function checkForActions() {\n \n // Get User\n $user = wp_get_current_user();\n \n // Get Actions\n $actions = get_field($this->id, \"user_$user->ID\");\n \n // Check if user has actions\n if ($actions === null || $actions === false) $this->addDefaultActions($user->ID);\n \n // Get where to display\n $admin = get_field($this->activated, \"user_$user->ID\");\n //$frontend = get_field('display-frontend', \"user_$user->ID\");\n \n // Adds our Plus Button on admin\n if ($admin) add_action('in_admin_header', array(&$this, 'addPlusButton'));\n \n }", "private static function isSimpleAction($action)\n\t{\n\t\t$result = true;\n\n\t\t$action = (string)$action;\n\t\tif ($action == '')\n\t\t\treturn $result;\n\n\t\t$action = trim(substr($action, 8));\n\t\t$action = substr($action, 2);\n\t\t$key = strpos($action, ')');\n\t\tif ($key === false)\n\t\t\treturn $result;\n\t\t$orderName = '\\\\'.substr($action, 0, $key);\n\n\t\tpreg_match_all(\"/\".$orderName.\"(?:,|\\))/\".BX_UTF_PCRE_MODIFIER, $action, $list);\n\t\tif (isset($list[0]) && is_array($list[0]))\n\t\t\t$result = count($list[0]) <= 2;\n\n\t\treturn $result;\n\t}", "function actionsAuthDefine($name){\n\tif(array_key_exists($name, actionsAuth())){\n\t\t$userData = auth();\n\t\tif( !is_bool($userData) \n\t\t\t&& is_object($userData)\n\t\t){\n\t\t\t#guardamos en una global\n\t\t\tauthDataJWT($userData);\n\n\t\t\tif(actionsAuth()[$name] == false ){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\n\t\t\t$actionsAuthArray = explode(\",\", actionsAuth()[$name]);\n\t\t\tif( is_int( array_search($userData->rol, $actionsAuthArray ) ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif(actionsAuth()[$name] === false){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn null;\n}", "protected function _isAllowed()\n {\n return Action::_isAllowed() && $this->_authorization->isAllowed('Vnecoms_Vendors::vendors_registration_form');\n }" ]
[ "0.6708266", "0.66675335", "0.6371453", "0.6338205", "0.62673134", "0.62348634", "0.6175635", "0.61436415", "0.6129331", "0.60235965", "0.5988688", "0.5959438", "0.59424263", "0.59294176", "0.58478874", "0.5845416", "0.5815089", "0.5806358", "0.5805722", "0.5784556", "0.5782756", "0.57826614", "0.57585144", "0.5753396", "0.5753289", "0.574199", "0.573746", "0.57255644", "0.57143885", "0.57116514", "0.5686729", "0.56855065", "0.5673041", "0.5666313", "0.5625037", "0.56111306", "0.5603991", "0.5597009", "0.55933577", "0.5591858", "0.55808944", "0.5565984", "0.5550055", "0.554908", "0.5543257", "0.55413884", "0.553644", "0.5533758", "0.55314994", "0.55263174", "0.5523793", "0.5512384", "0.5501954", "0.5494095", "0.5493589", "0.5491101", "0.5485453", "0.54735166", "0.5471278", "0.54485494", "0.54482704", "0.5447958", "0.543594", "0.5432024", "0.54305905", "0.5426451", "0.5425289", "0.54137456", "0.54098046", "0.54089224", "0.5408725", "0.5401571", "0.5400265", "0.5391109", "0.5389978", "0.5388704", "0.5380045", "0.537819", "0.5377651", "0.5367204", "0.53624475", "0.5361963", "0.5344605", "0.53440726", "0.53413886", "0.5328579", "0.5326483", "0.5323307", "0.53134584", "0.5312721", "0.53082234", "0.5303844", "0.53033686", "0.5297638", "0.5293003", "0.5291998", "0.52887493", "0.52631724", "0.5262106", "0.5258508" ]
0.8063373
0
Check if an imported registration action needs migrating
Проверьте, требуется ли миграция импортированного действия регистрации
private static function imported_action_needs_migration( $action ) { $settings = FrmAppHelper::maybe_json_decode( $action['post_content'] ); return isset( $settings['reg_email_msg'] ) && ! empty( $settings['reg_email_msg'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function is_imported_registration_action( $action ) {\n\t\treturn isset( $action['post_excerpt'] ) && $action['post_excerpt'] === 'register';\n\t}", "public function isMigrated() {}", "private function should_try_migrate() {\r\n $key = $this->get_should_migrate_transient_key();\r\n\r\n $should_migrate = get_transient( $key );\r\n\r\n return ( ! is_string( $should_migrate ) || 'no' !== $should_migrate );\r\n }", "public function migrate(): bool;", "protected function migrationExists()\n {\n return !empty(glob(base_path(static::MIGRATION_PATH . '*' . static::MIGRATION)));\n }", "protected function isImportDatabaseDone() {}", "public function hasMigratedToUsernames(): bool\n {\n return $this->discriminator == '0' && $this->global_name;\n }", "public function migrate(): bool\n {\n return Arr::get($this->config, 'migrate', false);\n }", "public function isMigration()\n {\n $titleModulesActive = $this->query->from('module_active')->lists('title');\n $migrationsInstalled = $this->query->from('migration')->lists('migration');\n $allComposer = $this->composer->getAllComposer();\n\n foreach ($titleModulesActive as $titleModule) {\n if (!isset($allComposer[ $titleModule ])) {\n continue;\n }\n\n $installer = $this->composer->getNamespace($titleModule) . 'Installer';\n $dir = (new $installer)->getDir() . DS . 'Migrations';\n if (!\\is_dir($dir)) {\n continue;\n }\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (\n $fileInfo->isFile() &&\n !in_array($fileInfo->getBasename('.php'), $migrationsInstalled)) {\n return true;\n }\n }\n }\n $this->config->set('settings.module_update_time', time());\n\n return false;\n }", "public function onNeedsMigration(): bool\n\t{\n\t\t$cParams = ComponentHelper::getParams('com_akeebabackup');\n\t\t$alreadyMigrated = $cParams->get('migrated_from_pkg_akeeba', 0) == 1;\n\t\t$hasPkgAkeeba = !empty($this->upgradeModel->getExtensionId('com_akeeba'));\n\n\t\treturn $hasPkgAkeeba && !$alreadyMigrated;\n\t}", "function doesSqlMigrations() : bool ;", "public static function shouldRunMigrations()\n {\n if (! is_null(static::$runsMigrations)) {\n return static::$runsMigrations;\n }\n\n $model = config('auth.providers.users.model', 'App\\\\User');\n\n return class_exists($model)\n ? in_array(HasApiTokens::class, class_uses_recursive($model))\n : true;\n }", "private function _migrate(): bool\n {\n if ($this->migrate === false) {\n $this->stdout('Skipping applying new migrations.' . PHP_EOL, Console::FG_GREY);\n return true;\n }\n\n try {\n $script = Craft::$app->getRequest()->getScriptFile();\n } catch (InvalidConfigException $e) {\n $this->stderr('Can’t apply new migrations: ' . $e->getMessage() . PHP_EOL, Console::FG_RED);\n $this->stdout('You can apply new migrations manually by running ');\n $this->outputCommand('migrate/all --no-content');\n $this->stdout(PHP_EOL);\n return false;\n }\n\n $this->stdout('Applying new migrations ... ', Console::FG_YELLOW);\n\n $process = new Process([$script, 'migrate/all', '--no-backup', '--no-content']);\n $process->setTimeout(null);\n try {\n $process->mustRun();\n } catch (ProcessFailedException $e) {\n $this->stderr('error: ' . $e->getMessage() . PHP_EOL . PHP_EOL, Console::FG_RED);\n $this->stdout('Output:' . PHP_EOL . PHP_EOL . $process->getOutput() . PHP_EOL . PHP_EOL);\n return false;\n }\n\n $this->stdout('done' . PHP_EOL, Console::FG_GREEN);\n return true;\n }", "protected function recheckWizardsAndRowUpdaters() {}", "public function migrate()\n {\n $this->app['orchestra.publisher.migrate']->foundation();\n $this->app['events']->fire('orchestra.install.schema');\n\n return true;\n }", "public function ensureActionExists()\n {\n return method_exists($this->prolet, $this->action);\n }", "static protected function onBeforeMigrate(){}", "public function hasMigrated()\n {\n $this->_createMigrationTable();\n\n $result = $this->_connection->fetchColumn(\"SELECT version FROM \" . $this->_migrationTableName);\n\n return isset($result[0]) ? true:false;\n }", "public static function migrated()\n {\n $db = self::connect();\n $queryText=\"SELECT *\n FROM users\";\n try\n {\n $query = $db->prepare($queryText);\n $query->execute();\n return ($query->fetch(PDO::FETCH_ASSOC) != NULL);\n } catch (\\Exception $e) {\n return $e->getMessage();\n } \n }", "public static function shouldRunMigrations()\n {\n return static::$runsMigrations;\n }", "function check_import_new_users($permission)\n{\n}", "function hasUpdateImportPermission()\n \t{\n \treturn $this->perms_map[\"updateimport\"];\n \t}", "public static function verify()\r\n {\r\n if (self::needsCoreUpdate()) { // Now check for core updates\r\n add_action('admin_init', array(__CLASS__, 'updateCore'));\r\n\r\n return false;\r\n } else if (\r\n class_exists('Rootd', false) &&\r\n !self::hasStepData()\r\n ) {\r\n return true;\r\n } else if (is_admin()) {\r\n add_action('admin_init', array(__CLASS__, 'install'));\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "protected function databaseIsMigrated()\n {\n return DB::table('migrations')->where('migration', '2020_01_15_193742_create_roles_table')->exists();\n }", "public function beforeAction($action)\n {\n if (parent::beforeAction($action)) {\n if (!$this->showOnly && in_array($action->id, ['create', 'create-all','fill', 'update', 'update-all'], true)) {\n if ($this->migrationPath !== null) {\n $this->migrationPath = $this->preparePathDirectory($this->migrationPath);\n }\n if ($this->migrationNamespace !== null) {\n $this->migrationNamespace = FileHelper::normalizePath($this->migrationNamespace, '\\\\');\n $this->workingPath = $this->preparePathDirectory(FileHelper::normalizePath('@' . $this->migrationNamespace, '/'));\n } else {\n $this->workingPath = $this->migrationPath;\n }\n }\n $this->db = Instance::ensure($this->db, Connection::className());\n $this->stdout(\"Yii 2 Migration Generator Tool v2.2.1\\n\\n\", Console::FG_CYAN);\n return true;\n }\n return false;\n }", "public static function is_importing()\n {\n }", "protected function registerMigrations()\n {\n if (Authorization::$runsMigrations) {\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n }\n }", "function is_already_imported($toggl_id) {\n global $conn;\n $sql = \"SELECT * FROM mapping WHERE toggl_id = ?\";\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(1, $toggl_id);\n $stmt->execute();\n\n return $stmt->rowCount() <> 0;\n}", "public function isMigration()\n {\n if (isset($this->options[\"m\"]) && file_exists($this->options[\"m\"])) {\n $this->confFile = $this->options[\"m\"];\n return (true);\n }\n\n return(false);\n }", "public function onMigrateSettings(): bool\n\t{\n\t\t$this->migrateDownloadKey();\n\t\t$this->migrateComponentOptions();\n\t\t$this->migrateEngineKey();\n\t\t$this->migrateDatabaseData();\n\t\t$this->migrateDefaultBackupFolder();\n\n\t\treturn true;\n\t}", "private static function verifyIfMigrationsControllDbExists(){\n $errors = [ ];\n\n try{\n if (!(count(DB::select(DB::raw(\"SHOW TABLES LIKE '\".Strings::TABLE_PROJECT_MODULES.\"';\")))>0)){\n $errors[] = Strings::ERROR_MIGRATIONS_CONTROLL_DB_DOESNT_EXISTS;\n }\n }catch(Exception $e){\n $errors[] = Strings::ERROR_DATABASE_CONECTION;\n }\n\n return !empty($errors) ? $errors : true;\n }", "public abstract function isImported();", "function hasDeleteUpdateAddImportPermission()\n \t{\n \treturn $this->perms_map[\"deleteupdateaddimport\"];\n \t}", "public function isRegenerated() : bool;", "function checkSetup() {\n $db = $this->classes['db'];\n $db->select('users', array('id'));\n $result = $db->execute();\n foreach($result as $v) {\n return false;\n }\n return true;\n }", "protected function isImportEnabled() : bool {}", "public function beforeAction($action)\n {\n if (parent::beforeAction($action)) {\n\n // Flush Caches\n Yii::$app->cache->flush();\n\n // Database Connection seems not to work\n if (!$this->module->checkDBConnection()) {\n $this->redirect(['/installer/setup']);\n return false;\n }\n\n // When not at index action, verify that database is not already configured\n if ($action->id != 'finished') {\n if ($this->module->isConfigured()) {\n $this->redirect(['finished']);\n return false;\n }\n }\n\n return true;\n }\n return false;\n }", "public function checkMigrationTableExistence() {\n \n $sql = \"CREATE TABLE IF NOT EXISTS \" . $this->dbTableName . \" (\n ID INT( 11 ) AUTO_INCREMENT PRIMARY KEY,\n filename VARCHAR( 250 ) NOT NULL, \n migrated_at_timestamp int(11) NOT NULL);\";\n $this->pdo->exec($sql);\n }", "public function disableRegistrationActions(): bool\n {\n return $this->config['disable_registration_route'] || $this->config['registration_url'] !== null;\n }", "function action_exists($name)\n{\n return Plugins::instance()->action_exists($name);\n}", "public function validate(){\r\n \r\n if ($this->actionType == 'CREATE'){\r\n \r\n }else if ($this->actionType == 'UPDATE'){\r\n \r\n }\r\n return true;\r\n }", "public function isCraftDbMigrationNeeded()\n\t{\n\t\treturn version_compare(CRAFT_SCHEMA_VERSION, craft()->getSchemaVersion(), '>');\n\t}", "public function checkAction($action = 'perm_sync') {\n\t\t$maySync = false;\n\t\t$this->loadModel('User');\n\t\t$this->User->recursive = -1;\n\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\tif (isset($user['User'])) {\n\t\t\t$this->loadModel('Role');\n\t\t\t$this->Role->recursive = -1;\n\t\t\t$role = $this->Role->findById($user['User']['role_id']);\n\t\t\tif ($role['Role'][$action]) {\n\t\t\t\t$maySync = true;\n\t\t\t}\n\t\t}\n\t\treturn $maySync;\n\t}", "public static function is_importing() {\n\t\t\treturn self::get_instance()->importing;\n\t\t}", "final protected function shouldSkipImportStep() {\n // which was queued by the normal daemons, decline to do the work again.\n // This mitigates races if commits are rapidly deleted and revived.\n $flag = $this->getImportStepFlag();\n if (!$flag) {\n // This step doesn't have an associated flag.\n return false;\n }\n\n $commit = $this->commit;\n if (!$commit->isPartiallyImported($flag)) {\n // This commit doesn't have the flag set yet.\n return false;\n }\n\n\n if (!$this->shouldQueueFollowupTasks()) {\n // This task was queued by administrative tools, so do the work even\n // if it duplicates existing work.\n return false;\n }\n\n $this->log(\n \"%s\\n\",\n pht(\n 'Skipping import step; this step was previously completed for '.\n 'this commit.'));\n\n return true;\n }", "final protected function shouldSkipImportStep() {\n // which was queued by the normal daemons, decline to do the work again.\n // This mitigates races if commits are rapidly deleted and revived.\n $flag = $this->getImportStepFlag();\n if (!$flag) {\n // This step doesn't have an associated flag.\n return false;\n }\n\n $commit = $this->commit;\n if (!$commit->isPartiallyImported($flag)) {\n // This commit doesn't have the flag set yet.\n return false;\n }\n\n\n if (!$this->shouldQueueFollowupTasks()) {\n // This task was queued by administrative tools, so do the work even\n // if it duplicates existing work.\n return false;\n }\n\n $this->log(\n \"%s\\n\",\n pht(\n 'Skipping import step; this step was previously completed for '.\n 'this commit.'));\n\n return true;\n }", "private function validate() {\n\t\tif (!$this->user->hasPermission('modify', 'module/preimport')) {\n\t\t\t$this->error['warning'] = $this->language->get('error_permission');\n\t\t}\n\t\t\n\t\tif (!$this->error) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\t\n\t}", "protected function import_allowed()\n {\n }", "protected function isRegistrationPossible()\n\t{\n\t\treturn (bool) $this->registration_possible;\n\t}", "public function isRegistered(): bool;", "public function isValidAction( $action )\n {\n switch( $action ){\n case \"dml_truncate\":\n case \"dml_bulk_insert\":\n return TRUE;\n }\n return FALSE;\n }", "protected function isWizardDone() {}", "public function checkMigrations()\n {\n $migrationsBasePath = base_path('database/migrations');\n $ran = $this->migrator->getRepository()->getRan();\n $migrationFiles = $this->migrator->getMigrationFiles($migrationsBasePath);\n\n foreach ($migrationFiles as $migration) {\n $isRan = in_array($migration, $ran);\n if (!$isRan) {\n $this->addFailureMessage(sprintf('Migration: %s has not been ran', $migration));\n continue;\n }\n $this->addSuccessMessage(sprintf('Migration: %s has been ran', $migration));\n }\n }", "public static function is_migration_completed() {\n $not_migrated = LaterPay_Migrator_Model_Migration::get_not_migrated_subscriptions();\n\n if ( ! $not_migrated && LaterPay_Migrator_Model_Migration::get_all_data() ) {\n update_option( 'laterpay_migrator_is_active', 0 );\n return true;\n }\n\n return false;\n }", "protected function _isActionAllowed($action)\n {\n \n return true;\n }", "function mtcf_activation_check() {\n $plugins = apply_filters('active_plugins', get_option('active_plugins'));\n \n if ( is_multisite() ) {\n // get active plugins for the network\n $network_plugins = get_site_option('active_sitewide_plugins');\n if ( $network_plugins ) {\n $network_plugins = array_keys($network_plugins);\n $plugins = array_merge($plugins, $network_plugins);\n }\n }\n\n $deps = array('buddypress/bp-loader.php' => 'BuddyPress');\n $missing = array();\n\n foreach ( $deps as $plugin=>$name ) {\n if ( !in_array($plugin, $plugins) ) {\n $missing[] = $name;\n }\n }\n\n if ( $missing ) {\n global $mtcf_missing_plugins;\n $mtcf_missing_plugins = $missing;\n add_action('admin_notices', 'mtcf_activation_missing_plugins_notice');\n add_action('network_admin_notices', 'mtcf_activation_missing_plugins_notice');\n deactivate_plugins( plugin_basename( __FILE__ ) );\n }\n}", "function kdg_fablab_is_plugin_activation() {\n // code to be executed when plugin is activated\n if (!current_user_can('activate_plugins')) {\n return;\n }\n\n kdg_fablab_is_update_settings();\n\n set_transient('kdg-fablab-is-admin-notice', true, 5);\n\n global $wpdb;\n\n if ($wpdb->get_row(\"SELECT post_name FROM $wpdb->posts WHERE post_name = 'toestellen'\", 'ARRAY_A') === NULL) {\n set_transient(\"kdg-fablab-is-admin-notice-page-machines-made\", true, 5);\n\n wp_insert_post([\n \"post_title\" => \"Toestellen\",\n \"post_status\" => \"publish\",\n \"post_author\" => 1,\n \"post_type\" => \"page\"\n ]);\n }\n\n if ($wpdb->get_row(\"SELECT post_name FROM $wpdb->posts WHERE post_name = 'workshops'\", 'ARRAY_A') === NULL) {\n set_transient(\"kdg-fablab-is-admin-notice-page-workshops-made\", true, 5);\n\n wp_insert_post([\n \"post_title\" => \"Workshops\",\n \"post_status\" => \"publish\",\n \"post_author\" => 1,\n \"post_type\" => \"page\"\n ]);\n }\n }", "protected function _verifyAccess($action='load') {\n if ($action == 'load') {\n if (is_null($this->_user)) {\n return false;\n }\n }\n return true;\n }", "public function doesImportSettings(): bool\n {\n return isset($this->importSettingsFrom);\n }", "public function is_install_wizard_mode()\n {\n Logger::profile_framework(__METHOD__, __LINE__);\n\n if ($this->framework->session->userdata('wizard'))\n return TRUE;\n else\n return FALSE;\n }", "public function isDbImportFileExist() {\n $file_path = Yii::app()->basePath . '/data/db_template.sql';\n\n if (file_exists($file_path) && is_readable($file_path)) {\n return true;\n }\n\n return false;\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('system/convert/import');\n }", "protected function _verifyAccess($action='load') {\n if ($action == 'load') \n {\n if (is_null($this->_user) || !$this->_user->isAdmin()) \n {\n return false;\n }\n if(empty($this->_get['series']) && empty($this->_post['series']))\n {\n return false;\n }\n }\n return true;\n }", "public function hasActivation() : bool\n {\n return $this->activation()->exists();\n }", "public function isInstallable()\n {\n return in_array($this->getType(), ['module', 'extension']);\n }", "function hasAppendImportPermission()\n \t{\n \treturn $this->perms_map[\"appendimport\"];\n \t}", "function acf_has_upgrade() {}", "private function checkIfRegistered()\n {\n if (!array_filter($this->errors)) {\n $this->login();\n }\n }", "function hasAction($action);", "private function _checkAction(): bool {\n $serviceName = $this->getCalledServiceName();\n //first, check if action is set and not null\n if ($serviceName !== null) {\n $calledService = $this->getServiceByName($serviceName);\n //after that, check if action is supported by the API.\n if ($calledService !== null) {\n $allowedMethods = $calledService->getRequestMethods();\n\n if (count($allowedMethods) != 0) {\n $isValidRequestMethod = in_array(Request::getMethod(), $allowedMethods);\n\n if (!$isValidRequestMethod) {\n $this->requestMethodNotAllowed();\n } else {\n return true;\n }\n } else {\n $this->sendResponse($this->getResponseMessage('404-6'), self::E, 404);\n }\n } else {\n $this->serviceNotSupported();\n }\n } else {\n $this->missingServiceName();\n }\n\n return false;\n }", "protected function shouldRegister()\n {\n return (bool) $this->getKey();\n }", "function action_exists($name)\n{\n\treturn Hooks::action_exists($name);\n}", "public static function checkInstall()\n {\n global $wpdb;\n\n if (self::$installed == true) {\n return true;\n }\n\n $relationTable = $wpdb->prefix . self::$relationTableName;\n\n if ($wpdb->get_var(\"SHOW TABLES LIKE '$relationTable'\") == $relationTable) {\n self::$installed == true;\n return true;\n }\n\n self::install();\n }", "protected function registerMigrations()\n {\n if (Airlock::shouldRunMigrations()) {\n return $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n }\n }", "public function record_migration ()\n {\n $query = 'INSERT INTO migrations ( `name`, `create_date` ) VALUES ( \"' . $this->_db_name . '_' . $this->_tablename . '\", now() )';\n if ( mysql_query ( $query ) )\n return TRUE;\n\n else\n display ( mysql_error () );\n }", "protected function canRegisterAfterCheckout() {\n $completion_register_pane = $this->checkoutFlow->getPane('completion_register');\n return $completion_register_pane->getStepId() != '_disabled';\n }", "protected function checkForAlternativeCrudAction($action)\n {\n return null;\n }", "protected function doActionCheckIntegrity()\n {\n $this->setReturnURL($this->buildURL('upgrade', '', $this->getActionParamsCommon()));\n\n if (\\XLite\\Upgrade\\Cell::getInstance()->isUnpacked()) {\n \\Includes\\Utils\\Operator::showMessage('Checking integrity, please wait...');\n\n // Perform upgrade in test mode\n $this->runStep('upgrade', array(true));\n\n if ($this->isForce() && $this->isNextStepAvailable()) {\n $this->setReturnURL($this->buildURL('upgrade', 'install_upgrades', $this->getActionParamsCommon()));\n }\n\n } else {\n $this->showError(__FUNCTION__, static::t('unable to test files: not all archives were unpacked', array('list' => $this->getErrorEntriesHTML())));\n }\n }", "protected function _checkPermission($action){\n\t\t\n\t\t$allowGuests = $this->allowGuests();\n\t\t\n\t\tif(!in_array($action, $allowGuests) && !in_array('*', $allowGuests)){\t\t\t\n\t\t\t//check for logged in user\n\t\t\tif(!\\GO::user())\n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\n\t\t$module = $this->getModule();\n\t\treturn !$module || \\GO::modules()->isInstalled($module->name);\n\t}", "public function hasAuthFailAction(){\n return $this->_has(1);\n }", "public static function migrateOnboarding() {\n\t\t$alertEmails = wfConfig::get('alertEmails');\n\t\t$onboardingAttempt1 = wfConfig::get('onboardingAttempt1');\n\t\tif (!empty($alertEmails) && empty($onboardingAttempt1)) {\n\t\t\twfConfig::set('onboardingAttempt1', self::ONBOARDING_FIRST_LICENSE); //Mark onboarding as done\n\t\t\t\n\t\t\t$keys = array(self::TOUR_DASHBOARD, self::TOUR_FIREWALL, self::TOUR_SCAN, self::TOUR_BLOCKING, self::TOUR_LIVE_TRAFFIC);\n\t\t\tforeach ($keys as $k) {\n\t\t\t\twfConfig::set('needsNewTour_' . $k, 0);\n\t\t\t\twfConfig::set('needsUpgradeTour_' . $k, 1);\n\t\t\t}\n\t\t}\n\t}", "public function hasActions()\n {\n if (Auth::user()->usr_papel == \"Administrador\") {\n return true;\n }\n return false;\n }", "public function canExport();", "protected function registerMigrations()\n {\n if (OAuth::shouldRunMigrations()) {\n return $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n }\n }", "public function needUpgrade()\n {\n return $this->currentVersion() !== $this->userVersion();\n }", "public function hasActionColumn(): bool\n {\n return count($this->rowActions) > 0 || count($this->headerActions) > 0 || $this->inlineAdd;\n }", "function hasTruncateImportPermission()\n \t{\n \treturn $this->perms_map[\"truncateimport\"];\n \t}", "function tpf_check_required_plugins(){\n if( !is_plugin_active('carbon-fields/carbon-fields-plugin.php')){\n require_once FACTORY_DIR. '/admin/carbon-fields/carbon-fields-plugin.php';\n }\n}", "public function checkImportPrerequisites() {}", "public function is_action() {\n\t\treturn did_action( $this->name ) > 0;\n\t}", "public function migrateAction()\n {\n $modules = $this->_getModules();\n foreach ($modules as $module) {\n $propelAdapter = $this->_getAdapter($module);\n if ($propelAdapter) {\n $propelAdapter->migrate();\n\t\t\t}\n\t\t}\n }", "public function hasAuthFailAction(){\n return $this->_has(7);\n }", "private static function isOnDatabaseModuleUpdate()\n {\n //====================================================================//\n // IS FEATURE ALLOWED\n if (isset(Splash::configuration()->PsNoDatabaseModuleHooks)) {\n return false;\n }\n //====================================================================//\n // IS STORE COMMANDER\n /** @var string $requestUri */\n $requestUri = filter_input(INPUT_SERVER, 'REQUEST_URI');\n if (false !== strpos($requestUri, \"/modules/storecommander/\")) {\n return true;\n }\n\n return false;\n }", "function allow_create_users() {\n return apply_filters('import_allow_create_users', true);\n }", "public static function migrate_action_after_import( $new_id, $action ) {\n\t\tif ( self::is_imported_registration_action( $action ) && self::imported_action_needs_migration( $action ) ) {\n\n\t\t\t$form = FrmForm::getOne( $action['menu_order'] );\n\t\t\tif ( is_object( $form ) ) {\n\t\t\t\tself::migrate_registration_actions_to_2( $form );\n\t\t\t}\n\t\t}\n\t}", "function wpabstracts_db_check(){\n if(!(get_option( \"wpabstracts_db_upgraded\") == \"Y\")){\n wpabstracts_upgrade_db();\n }\n}", "protected function canLoad()\n {\n // can this action be performed?\n return true;\n }", "public function check_DB_valid_to_re_upgrade() {\n\t\t$response = new LP_REST_Response();\n\t\t$lp_db = LP_Database::getInstance();\n\t\t$response->data->can_re_upgrade = 0;\n\n\t\t$col_start_time_gmt_exist = $lp_db->check_col_table( $lp_db->tb_lp_user_items, 'start_time_gmt' );\n\t\t$col_graduation_exist = $lp_db->check_col_table( $lp_db->tb_lp_user_items, 'graduation' );\n\t\t$col_item_id_exist = $lp_db->check_col_table( $lp_db->tb_lp_order_items, 'item_id' );\n\n\t\tif ( $col_start_time_gmt_exist || ! $col_graduation_exist || ! $col_item_id_exist ) {\n\t\t\t$response->data->can_re_upgrade = 1;\n\t\t}\n\n\t\t$response->status = 'success';\n\n\t\twp_send_json( $response );\n\t}", "protected abstract function checkImportCollections();", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Ubertheme_Ubdatamigration::index');\n }" ]
[ "0.70344204", "0.6679524", "0.6530762", "0.6437569", "0.63922095", "0.62398994", "0.61288595", "0.61023206", "0.6051989", "0.5917444", "0.59040767", "0.58700407", "0.58569914", "0.58539826", "0.5849924", "0.58398247", "0.580084", "0.5784326", "0.57492745", "0.5708894", "0.5681153", "0.5676062", "0.5609073", "0.5605225", "0.5586964", "0.55803686", "0.5579004", "0.5565625", "0.55572265", "0.5552793", "0.55333483", "0.5530965", "0.5527572", "0.5526021", "0.5520306", "0.5507489", "0.5500584", "0.54876935", "0.5482418", "0.54802734", "0.54686564", "0.5452473", "0.5437782", "0.542202", "0.53960615", "0.53960615", "0.539488", "0.5360408", "0.53565407", "0.53551817", "0.5353275", "0.5345382", "0.5344986", "0.5331497", "0.5321336", "0.53088063", "0.5302464", "0.5301763", "0.5296444", "0.52808344", "0.52770853", "0.5275622", "0.52749425", "0.5274881", "0.5270954", "0.5258841", "0.5257357", "0.5252834", "0.52506983", "0.5242617", "0.52215326", "0.52212125", "0.5216989", "0.5215479", "0.5213939", "0.52084523", "0.5207696", "0.5203142", "0.51856506", "0.5178122", "0.5178078", "0.51765215", "0.5174613", "0.516794", "0.51646435", "0.51633775", "0.51630944", "0.5160747", "0.51599926", "0.5158701", "0.5154552", "0.5146873", "0.51451117", "0.5140921", "0.51341265", "0.51260674", "0.5117309", "0.5112601", "0.5100121", "0.50964564" ]
0.7406361
0
Generate the post content for the admin email action
Создать содержимое письма для действия электронной почты администратора
private static function generate_post_content_for_admin_email( $form_id ) { $post_content = array( 'email_to' => '[admin_email]', 'cc' => '', 'bcc' => '', 'from' => '[sitename] <[admin_email]>', 'reply_to' => '', 'email_subject' => self::default_admin_email_subject(), 'email_message' => self::default_admin_email_message( $form_id ), 'inc_user_info' => 0, 'plain_text' => 1, 'event' => self::registration_email_event(), ); return $post_content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function email_menu_content() {\n return Helper::load_template(\n 'email-test',\n [\n 'form_action' => admin_url('admin-post.php'),\n 'action' => $this->_form_fields['email_test_form']['action'],\n 'nounce_name' => $this->_form_fields['email_test_form']['nounce_name'],\n ]\n );\n }", "private function get_admin_email_data() {\n\n\t\t$email_data = '';\n\t\t$subject = str_replace(\n\t\t\tarray(\n\t\t\t\t'[form_url_slug]',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\ttrim( parse_url( $this->permalink, PHP_URL_PATH ), '/' ),\n\t\t\t),\n\t\t\t$this->config['to_email']['subject']\n\t\t);\n\t\tforeach ( $this->posted_data as $type => $value ) {\n\n\t\t\tif ( in_array( $type, array( 'g-recaptcha-response' ) ) ) {\n\t\t\t\t/**\n\t\t\t\t * We have done this to ensure some info is left out of the admin email.\n\t\t\t\t * Example: google reCaptcha code\n\t\t\t\t */\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Build the table for admin mail\n\t\t\t */\n\t\t\t$type_cell = '<td>' . $this->types[ $type ]['label'] . ':</td>';\n\t\t\t$value_cell = '<td>' . $value . '</td>';\n\n\t\t\t$email_data .= '<tr>' . $type_cell . $value_cell . '</tr>';\n\n\t\t\tif ( empty( $this->types[ $type ]['shortcode'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/**\n\t\t\t * Replace Subject Tags\n\t\t\t */\n\t\t\t$subject = str_replace( $this->types[ $type ]['shortcode'], $value, $subject );\n\t\t}\n\t\t$posted_data = '<table>' . $email_data . '</table>';\n\n\t\t$date_row = '<tr><td>' . __( 'Date', 'thrive-cb' ) . ':</td><td>' . date_i18n( 'F j, Y' ) . '</td></tr>';\n\t\t$time_row = '<tr><td>' . __( 'Time', 'thrive-cb' ) . ':</td><td>' . date_i18n( 'g:i a' ) . '</td></tr>';\n\t\t$date_info = '<table>' . $date_row . $time_row . '</table>';\n\n\t\t$message = $posted_data . '<br>' . '----' . '<br>' . $date_info;\n\n\t\t$message = nl2br( $message );\n\n\t\treturn array(\n\t\t\t'subject' => $subject,\n\t\t\t'message' => $message,\n\t\t);\n\t}", "protected function __generate_post() {\n\n\t\t$request_type = $this->request_type();\n\n\t\tif ( $request_type == 'standard' ) {\n\t\t\techo file_get_contents($this->root . '/views/layout.mustache');\n\t\t\treturn;\n\t\t}\n\n\t\t$post = $this->wp_model->get('post');\n\t\t$cats = $this->wp_model->get('post_cats', $post['ID']);\n\t\t$comments = $this->wp_model->get('comments');\n\t\t$content = array_merge($post, array(\n\t\t\t'post_cats' => $cats,\n\t\t\t'author' => $this->wp_model->get('author', $post['post_author'])\n\t\t));\n\n\t\tif ( $request_type == 'async' ) {\n\n\t\t\theader('Content-type: application/json');\n\t\t\techo json_encode(array(\n\t\t\t\t'type' => 'single',\n\t\t\t\t'content' => $content,\n\t\t\t\t'comments' => $comments,\n\t\t\t\t'commentform' => $this->wp_model->get('commentform', $post['ID'])\n\t\t\t));\n\t\t\texit;\n\n\t\t}\n\n\t\t$content = array_merge($content, $this->get('frame'));\n\t\t$content['comments'] = $comments;\n\n\t\t$layout = $this->mustache->loadTemplate('single');\n\t\techo $layout->render($content);\n\n\t}", "function admin_email($content){\n\t$content['to'] = get_bloginfo('admin_email');\n\tif(isset($content['html'])){\n\t\t$content['html'] = nl2br( $content['html'] );\n\t}\n\treturn $content;\n}", "function post()\n {\n\n $data['main_content'] = 'admin_post';\n $this->load->view('admin_defaults/main', $data);\n }", "public static function wpemails_cpve_savemetabox($post){\n\t\t$settings = new wpemails_cpve_settings();\n\t\t$wpemailscpve_options = $settings->wpemails_cpve_checkoptions();\n\t\t$wpemails_estatuspost = get_post_status($post->ID);\n\t\t//condicion para saber si aceptamos el email\n\t\tif(isset($_POST['publish'])){\n\t\t\t$cpmm2 = new cPanelMailManager($wpemailscpve_options['user'], $wpemailscpve_options['pass'], $wpemailscpve_options['host']);\n\t\t\tif($cpmm2->createEmail($_POST['wpemails_cpve_email_corporative'],$_POST['wpemails_cpve_email_password'],$_POST['wpemails_cpve_plan'])){\n\t\t\t\t\t$wpemails_cpve_estatus = 'success';\n\t\t\t\t\t//Obtenemos la plantilla de mensaje creada\n\t\t\t\t\t$wpemails_cpve_template = get_option('wpemails_cpve_template');\n\t\t\t\t\t//vamos a transformar nuestro template email\n\t\t\t\t\t$wpemails_cpve_template['wpemails_cpve_template'] = str_replace('{{fullname}}', $_POST['wpemails_cpve_fullname'], $wpemails_cpve_template['wpemails_cpve_template']);\n\t\t\t\t\t$wpemails_cpve_template['wpemails_cpve_template'] = str_replace('{{email}}', $_POST['wpemails_cpve_email_send'], $wpemails_cpve_template['wpemails_cpve_template']);\n\t\t\t\t\t$wpemails_cpve_template['wpemails_cpve_template'] = str_replace('{{email_corporative}}', $_POST['wpemails_cpve_email_corporative'], $wpemails_cpve_template['wpemails_cpve_template']);\n\t\t\t\t\t$wpemails_cpve_template['wpemails_cpve_template'] = str_replace('{{plan}}', $_POST['wpemails_cpve_plan'], $wpemails_cpve_template['wpemails_cpve_template']);\n\t\t\t\t\t$wpemails_cpve_template['wpemails_cpve_template'] = str_replace('{{city}}', $_POST['wpemails_cpve_full_direction'], $wpemails_cpve_template['wpemails_cpve_template']);\n\t\t\t\t\t//closed mail template\n\n\n\t\t\t\t\t//=====enviamos un correo electronico al usuario===\n\t\t\t\t\t$to = $_POST['wpemails_cpve_email_send'];\n\t\t\t\t\t$subject = 'Estatus del correo corporativo '.$_POST['wpemails_cpve_email_corporative'];\n\t\t\t\t\t$body = $wpemails_cpve_template['wpemails_cpve_template'];\n\t\t\t\t\t$headers = array('Content-Type: text/html; charset=UTF-8');\n\t\t\t\t\t//Changes\n\t\t\t\t\tadd_filter('wp_mail_from', 'new_mail_from');\n\t\t\t\t\tadd_filter('wp_mail_from_name', 'new_mail_from_name');\n\n\t\t\t\t\tfunction getEmail($email){\n\t\t\t\t\t\t$d = get_option('wpemails_cpve_emails');\n\t\t\t $emails = $d['wpemails_cpve_emails'];\n\t\t\t $e_part = explode(\"@\", $email);\n\n\t\t\t $e_return = 'wordpress@'.$e_part[1];\n\n\t\t\t for($i=0;$i<count($emails);$i++){\n\t\t\t \t$de_part = explode(\"@\", $emails[$i]);\n\t\t\t \tif($e_part[1] == $de_part[1]){\n\t\t\t \t\t$e_return = $emails[$i];\n\t\t\t \t}\n\t\t\t }\n\n\t\t\t return $e_return;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction getAsunto($email){\n\n\t\t\t\t\t\t$d = get_option('wpemails_cpve_emails');\n\t\t\t $emails = $d['wpemails_cpve_emails'];\n\t\t\t $asuntos = $d['wpemails_cpve_asuntos'];\n\t\t\t $e_part = explode(\"@\", $email);\n\t\t\t $a_return = 'Correo Corporativo';\n\n\t\t\t for($i=0;$i<count($emails);$i++){\n\t\t\t \t$de_part = explode(\"@\", $emails[$i]);\n\t\t\t \tif($e_part[1] == $de_part[1]){\n\t\t\t \t\t$a_return = $asuntos[$i];\n\t\t\t \t}\n\t\t\t }\n\n\t\t\t return $a_return;\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\tfunction new_mail_from($old) {\n\t\t\t\t\t\t$email = getEmail($_POST['wpemails_cpve_email_corporative']);\n\t\t\t\t\t \treturn $email;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction new_mail_from_name($old) {\n\t\t\t\t\t $asunto = getAsunto($_POST['wpemails_cpve_email_corporative']);\n\t\t\t\t\t return $asunto;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t//End Changes\n\t\t\t\t\twp_mail($to, $subject, $body, $headers);\n\t\t\t\t\t//============enviando correo=============\n\t\t\t\t\t//Condicion para la subscripcion\n\t\t\t\t\tif($_POST['wpmails_cpve_ofertas']!=''){\n\n\t\t\t\t\t\t$groups = explode(\",\", $_POST['wpemails_group_empleo']);\n\n\t\t\t\t\t\tif($_POST['wpmails_cpve_mejoras']!=''){\n\t\t\t\t\t\t\t$descuentos = explode(\",\", $_POST['wpemails_group_descuentos']);\n\t\t\t\t\t\t\t$groups = array_merge($groups,$descuentos);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tself::wpemails_subscription_newsletter($_POST['wpemails_cpve_fullname'],$_POST['wpemails_cpve_email_corporative'],$groups);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$wpemails_cpve_estatus = 'error';\n\t\t\t\t}\n\t\t}//condicion del status del gmail\n\n\t}", "function admin_acknowledgements () {\n\t\t\t$email_address = antispambot (\"gary@vicchi.org\");\n\t\t\t$content = array ();\n\n\t\t\t$content[] = '<p>';\n\t\t\t$content[] = __('The fact that you\\'re reading this wouldn\\'t have been possible without the help, bug fixing, beta testing, gentle prodding and overall general warmth and continued support of <a href=\"https://twitter.com/#!/wp_smith\">Travis Smith</a> and <a href=\"https://twitter.com/#!/webendev\">Bruce Munson</a>. Travis and Bruce ... you\\'re awesome. Thank you.', 'wp-biographia');\n\t\t\t$content[] = '</p><p>';\n\t\t\t$content[] = __('WP Biographia has supported translation and internationalisation for a while now. Thanks go out to <a href=\"https://twitter.com/#!/KazancExpert\">Hakan Er</a> for the Turkish translation and to <a href=\"http://wordpress.org/support/profile/kubitomakita\">Jakub Mikita</a> for the Polish translation. If you\\'d like to see WP Biographia translated into your language and want to help with the process, then please drop me an <a href=\"mailto:%s\">email</a>.', 'wp-biographia');\n\t\t\t$content[] = '</p><p>';\n\t\t\t$content[] = __('The v1.x and v2.x releases of WP Biographia were inspired and based on <a href=\"http://www.jonbishop.com\">Jon Bishop\\'s</a> <a href=\"http://wordpress.org/extend/plugins/wp-about-author/\">WP About Author</a> plugin. WP Biographia has come a long way since v1.0, including a total rewrite in v3.0, but thanks and kudos must go to Jon for writing a well structured, working WordPress plugin released under a software license that enables other plugins such as this one to be written or derived in the first place.', 'wp-biographia');\n\t\t\t$content[] = '</p>';\n\n\t\t\treturn $this->admin_postbox ('geopress-acknowledgements',\n\t\t\t\t__('Acknowledgements', 'geopress'),\n\t\t\t\timplode ('', $content));\n\t\t}", "public function postEmail()\n {\n return Response('<h1> <a href=\"'.url('/home').'\"> Your email have been sent, Click to Main page!</a></h1> ');\n }", "public function smtp_config_content() {\n $current_settings_data = $this->_plugin->get_settings_data();\n \n return Helper::load_template(\n 'smtp-config',\n [\n 'form_action' => admin_url('admin-post.php'),\n 'action' => $this->_form_fields['smtp_form']['action'],\n 'nounce_name' => $this->_form_fields['smtp_form']['nounce_name'],\n 'current_form_data' => ( is_array($current_settings_data) && !empty($current_settings_data) ) ? $current_settings_data : null\n ]\n );\n }", "public function send_email() {\n\n\t\tglobal $post;\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this is just a revision, don't send the email.\n\t\tif ( wp_is_post_revision( $post->ID ) || wp_is_post_autosave( $post->ID ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\trequire_once $_SERVER['DOCUMENT_ROOT'] . '/wp/wp-load.php';\n\n\t\t$get_meta_data = $this->set_meta_data();\n\n\t\t// print_r($get_meta_data);\n\t\t$to = $get_meta_data['page_owner_email'];\n\t\t$to_content = $get_meta_data['content_owner_email'];\n\n\t\t$subject = $get_meta_data['title'];\n\t\t$message = '1. This is a test of the wp_mail function: wp_mail is working';\n\t\t$headers = array( 'Content-Type: text/html; charset=UTF-8' );\n\n\t\t$content_subject = 'Please review ' . $get_meta_data['title'] . ' page and update your intranet page';\n\t\t$content_message =\n\t\t\t'Hello <br/>\n\t\t\t<br/>\n\t\t\tIt’s been [insert exact time] since you updated <strong> [page title] </strong> and your content might be out of date. <br/>\n\t\t\t<br/>\n\t\t\tPlease review the page and confirm that your content is still relevant and accurate. <br/>\n\t\t\t<br/>\n\t\t\t<strong>My content is out of date</strong> <br/>\n\t\t\tSend [admin’s email address] the new content changes so they can update the page. <br/>\n\t\t\t<br/>\n\t\t\t<strong>My content is up to date</strong> <br/>\n\t\t\tNotify [admin’s email address] so they can mark your content as up to date. <br/>\n\t\t\t<br/>\n\t\t\t<a href=\"\">Review your content</a>\n\t\t\t';\n\n\t\t// send test message using wp_mail function.\n\t\twp_mail( $to, $subject, $message, $headers );\n\t\twp_mail( $to_content, $content_subject, $content_message, $headers );\n\n\t}", "abstract function generatePostData();", "public function post_template($p) {\n $icon = \"&#64;\";\n $byuser = $p->fullname;\n if (!empty($p->userurl)) {\n $byuser = html_writer::link($p->userurl, $p->fullname);\n }\n $byline = get_string('postbyx', 'hsuforum', $byuser);\n\n if (!empty($p->parentfullname)) {\n $parent = $icon.$p->parentfullname;\n if (!empty($p->parentuserurl)) {\n $parent = html_writer::link($p->parentuserurl, $icon.$p->parentfullname);\n }\n }\n // Post is a reply.\n if($p->depth) {\n $byline = get_string('postbyxinreplytox', 'hsuforum', array(\n 'author' => $byuser,\n 'parent' => $parent\n ));\n }\n // Post is private reply.\n if (!empty($p->privatereply)) {\n\n $byline = get_string('postbyxinprivatereplytox', 'hsuforum', array(\n 'author' => $byuser,\n 'parent' => $parent\n ));\n }\n\n $author = s(strip_tags($p->fullname));\n $unread = '';\n if ($p->unread) {\n $unread = html_writer::tag('span', get_string('unread', 'hsuforum'), array('class' => 'hsuforum-unreadcount'));\n }\n\n return <<<HTML\n<div class=\"hsuforum-post-wrapper hsuforum-post-target\" id=\"p$p->id\" data-postid=\"$p->id\" data-discussionid=\"$p->discussionid\" data-author=\"$author\" data-ispost=\"true\">\n <div class=\"hsuforum-post-figure\">\n <img class=\"userpicture img-circle\" src=\"{$p->imagesrc}\" alt=\"\">\n </div>\n\n <div class=\"hsuforum-post-body\">\n $unread\n <h6 role=\"heading\" aria-level=\"6\" class=\"hsuforum-post-byline\">\n $byline\n </h6>\n\n <div class=\"hsuforum-post-content\">\n <strong class=\"hsuforum-post-title\">$p->subject</strong>\n $p->message\n </div>\n <time datetime=\"$p->datetime\" class=\"hsuforum-post-pubdate\">\n $p->created\n </time>\n\n $p->tools\n </div>\n</div>\nHTML;\n }", "public function post_page_render () {\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'includes/wp-posted-display-admin-post.php' );\n\t\tnew Posted_Display_Admin_Post( $this->text_domain );\n\t}", "public function run()\n {\n //add default email templates\n $emailtemplates = [\n [\n 'id'=>1,\n 'identifier'=>'contactus_template',\n 'title'=>'Thank you for Contacting Us!',\n 'content'=>'\n <!DOCTYPE html>\n<div style=\"width: auto; height: auto; position: relative;\">\n <h1 style=\"margin: 0; padding: 0; font-size: 19px; font-family: Arial; font-weight: normal; color: #ffffff; padding: 15px; padding-left: 15px; background: #16A085;\">Thank you for contacting Us</h1>\n <div style=\"width: auto; padding: 15px; padding-bottom: 30px; padding-top: 30px; border: 1px solid #16A085;\">\n <p style=\"margin: 0; padding: 0; font-family: \\'arial\\'; font-size: 15px; margin-bottom: 10px; color: #555555;\">Thank you for your enquiry. It has been forwarded to the relevant department and will be dealt with as soon as possible.</p>\n <p style=\"margin: 0; padding: 0; font-family: \\'arial\\',\\'sans-serif\\'; color: #5EB5E0;margin-bottom: 10px;\"></p>\n <p style=\"margin: 0; padding: 0; font-family: \\'arial\\'; font-size: 15px; margin-bottom: 3px; color: #555555; padding-bottom: 50px; border-bottom: 1px solid #eeeeee;\"></p>\n <p style=\"font-family: \\'arial\\'; font-size: 13px; color: #777777; margin-top: 15px;\">Team Demo</p>\n </div>\n</div>\n ',\n 'visible'=>1\n ],\n [\n 'id'=>2,\n 'identifier'=>'contactus_admin_template',\n 'title'=>'New Contact Us Message',\n 'content'=>'\n <!DOCTYPE html>\n<div style=\"width: auto; height: auto; position: relative;\">\n <h1 style=\"margin: 0; padding: 0; font-size: 19px; font-family: Arial; font-weight: normal; color: #ffffff; padding: 15px; padding-left: 15px; background: #16A085;\">Customer Message from System</h1>\n <div style=\"width: auto; padding: 15px; padding-bottom: 30px; padding-top: 30px; border: 1px solid #16A085;\">\n <p style=\"margin: 0; padding: 0; font-family: \\'arial\\'; font-size: 15px; margin-bottom: 10px; color: #555555;\">\n \tName - {{ email.contactus.contactName }} <br/>\n \tEmail - {{ email.contactus.contactEmail }} <br/>\n \tPhone - {{ email.contactus.contactPhone }} <br/>\n \tMessage - {{ email.contactus.contactMessage }}\n </p>\n <p style=\"margin: 0; padding: 0; font-family: \\'arial\\',\\'sans-serif\\'; color: #5EB5E0;margin-bottom: 10px;\"></p>\n <p style=\"margin: 0; padding: 0; font-family: \\'arial\\'; font-size: 15px; margin-bottom: 3px; color: #555555; padding-bottom: 50px; border-bottom: 1px solid #eeeeee;\"></p>\n <p style=\"font-family: \\'arial\\'; font-size: 13px; color: #777777; margin-top: 15px;\">Team Support</p>\n </div>\n</div>\n ',\n 'visible'=>1\n ],\n [\n 'id'=>3,\n 'identifier'=>'customer_register_template',\n 'title'=>'Thank you for the Registration!',\n 'content'=> '\n \n Hi {{ email.register.name }},\n \n <br><br>Thank you for your interest and our support team will get back to you.\n <br>demolink (which we given with expire time 12hr)<br><br>Team Support<br>\n \n ',\n 'visible'=>1\n ],\n [\n 'id'=>4,\n 'identifier'=>'customer_register_admin_template',\n 'title'=>'New Customer Registration',\n 'content'=>'\n \n Hi,\n \n <br><br>New user registered,\n <br><br>Name : {{ email.register.name }}\n <br>Company : {{ email.register.company }}\n <br>Email : {{ email.register.email }}<br><br><p>Team Support</p>\n \n ',\n 'visible'=>1\n ],\n [\n 'id'=>13,\n 'identifier'=>'subscription_expire_customer_template',\n 'title'=>'Subscription expired!',\n 'content'=>'\n Hi,<br><br>Subscription expired!<br> \n ',\n 'visible'=>1\n ],\n [\n 'id'=>14,\n 'identifier'=>'subscription_expire_admin_template',\n 'title'=>'Subscription expired!',\n 'content'=>'\n Hi,<br><br>Subscription expired!<br> \n ',\n 'visible'=>1\n ],\n [\n 'id'=>15,\n 'identifier'=>'staff_register_template',\n 'title'=>'New admin registration',\n 'content'=>'\n Hi,<br><br>Username : {{ email.register.email }}<br>Password : {{ email.register.password }}<br>Login Url : http://www.domainname.com/login<br><br> \n ',\n 'visible'=>1\n ]\n\n ];\n\n DB::table('email_templates')->delete();\n\n foreach($emailtemplates as $emailtemplate){\n DB::table('email_templates')->insert($emailtemplate);\n }\n }", "function wpfme_writing_encouragement( $content ) {\n\t\tglobal $post_type;\n\t\tif($post_type == \"post\"){\n\t\t$encArray = array(\n\t\t\t// Placeholders for the posts editor\n\t\t\t\"Test post message one.\",\n\t\t\t\"Test post message two.\",\n\t\t\t\"<h1>Test post heading!</h1>\"\n\t\t\t);\n\t\t\treturn $encArray[array_rand($encArray)];\n\t\t}\n\t\telse{ $encArray = array(\n\t\t\t// Placeholders for the pages editor\n\t\t\t\"Test page message one.\",\n\t\t\t\"Test page message two.\",\n\t\t\t\"<h1>Test Page Heading</h1>\"\n\t\t\t);\n\t\t\treturn $encArray[array_rand($encArray)];\n\t\t}\n\t}", "public function post() {\n\t\t\t$post_content = '';\n\t\t\t$class = get_post_class();\n\t\t\t$class = implode(' ', $class);\n\t\t\t$class .= ' '.$this->prefix;\n\t\t\t\n\t\t\t$data_atts = $this->build_article_data_atts();\n\n\t\t\t$this->single_pagination_html();\n\t\t\techo '<article class=\"'.esc_attr($class).'\" '.$data_atts.'>';\n\t\t\t\t$this->single_categories_html();\n\t\t\t\t$this->title_html();\n\t\t\t\t$this->meta_html();\n\t\t\t\tob_start();\n\t\t\t\t$this->post_html();\n\t\t\t\t$post_content .= ob_get_clean();\n\t\t\t\tif(!empty($post_content)) {\n\t\t\t\t\techo '<div class=\"cover\">'. $post_content .'</div>';\n\t\t\t\t}\n\t\t\t\t$this->after_content_html();\n\t\t\t\t$this->single_fixed_share_html();\n\t\t\t\tDfd_Theme_Helpers::dfd_link_pages();\n\t\t\techo '</article>';\n\t\t\t$this->single_bottom_html();\n\t\t\t$this->single_author_html();\n\t\t\t$this->single_related_posts_html();\n\t\t}", "public function run()\n {\n $contents = [\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Categories'], 'id' => ['title' => 'Kategori']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Content'], 'id' => ['title' => 'Konten']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Custom Links'], 'id' => ['title' => 'Tautan Khusus']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Dashboard'], 'id' => ['title' => 'Dashboard']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Geocodes'], 'id' => ['title' => 'Kode Geografis']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Login'], 'id' => ['title' => 'Masuk']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Logout'], 'id' => ['title' => 'Keluar']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Main'], 'id' => ['title' => 'Main']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Masters'], 'id' => ['title' => 'Pemilik']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Media'], 'id' => ['title' => 'Media']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Medium Categories'], 'id' => ['title' => 'Kategori Media']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Menus'], 'id' => ['title' => 'Menu']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Options'], 'id' => ['title' => 'Pilihan']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Pages'], 'id' => ['title' => 'Halaman']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Permissions'], 'id' => ['title' => 'Izin']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Posts'], 'id' => ['title' => 'Posting']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Product Categories'], 'id' => ['title' => 'Kategori Produk']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Product Testimonials'], 'id' => ['title' => 'Testimonial Produk']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Products'], 'id' => ['title' => 'Produk']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Register'], 'id' => ['title' => 'Daftar']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Roles'], 'id' => ['title' => 'Peran']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Tags'], 'id' => ['title' => 'Tag']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Testimonials'], 'id' => ['title' => 'Kesaksian']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Theme'], 'id' => ['title' => 'Theme']],\n 'postmetas' => ['template' => 'default'],\n ],\n [\n 'post' => ['author_id' => 1, 'en' => ['title' => 'Users'], 'id' => ['title' => 'Pengguna']],\n 'postmetas' => ['template' => 'default'],\n ],\n ];\n\n foreach ($contents as $content) {\n $post = CustomLinks::create($content['post']);\n (new Postmetas)->sync($content['postmetas'], $post->id);\n }\n }", "public function output_content() {\n\t\t$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;\n\t\t$user_emails = evf_get_all_email_fields_by_form_id( $form_id );\n\t\t$settings = isset( $this->form_data['settings'] ) ? $this->form_data['settings'] : array();\n\t\t$email_status = isset( $this->form_data['settings']['enable_email_notification'] ) ? $this->form_data['settings']['enable_email_notification'] : 0;\n\n\t\t// --------------------------------------------------------------------//\n\t\t// General\n\t\t// --------------------------------------------------------------------//\n\t\techo '<div class=\"evf-content-section evf-content-general-settings\">';\n\t\techo '<div class=\"evf-content-section-title\">';\n\t\tesc_html_e( 'General', 'everest-forms' );\n\t\techo '</div>';\n\t\teverest_forms_panel_field(\n\t\t\t'text',\n\t\t\t'settings',\n\t\t\t'form_title',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Form Name', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $this->form->post_title ) ? $this->form->post_title : '',\n\t\t\t\t'tooltip' => esc_html__( 'Give a name to this form', 'everest-forms' ),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'textarea',\n\t\t\t'settings',\n\t\t\t'form_description',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Form description', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'input_class' => 'short',\n\t\t\t\t'default' => isset( $this->form->form_description ) ? $this->form->form_description : '',\n\t\t\t\t'tooltip' => sprintf( esc_html__( 'Give the description to this form', 'everest-forms' ) ),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'textarea',\n\t\t\t'settings',\n\t\t\t'form_disable_message',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Form disabled message', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'input_class' => 'short',\n\t\t\t\t'default' => isset( $this->form->form_disable_message ) ? $this->form->form_disable_message : __( 'This form is disabled.', 'everest-forms' ),\n\t\t\t\t'tooltip' => sprintf( esc_html__( 'Message that shows up if the form is disabled.', 'everest-forms' ) ),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'textarea',\n\t\t\t'settings',\n\t\t\t'successful_form_submission_message',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Successful form submission message', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'input_class' => 'short',\n\t\t\t\t'default' => isset( $this->form->successful_form_submission_message ) ? $this->form->successful_form_submission_message : __( 'Thanks for contacting us! We will be in touch with you shortly', 'everest-forms' ),\n\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t'tooltip' => sprintf( esc_html__( 'Success message that shows up after submitting form. <a href=\"%1$s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#successful-form-submission-message' ) ),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'checkbox',\n\t\t\t'settings',\n\t\t\t'submission_message_scroll',\n\t\t\t$this->form_data,\n\t\t\t__( 'Automatically scroll to the submission message', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => '1',\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'select',\n\t\t\t'settings',\n\t\t\t'redirect_to',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Redirect To', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => '0',\n\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t'tooltip' => sprintf( esc_html__( 'Choose where to redirect after form submission. <a href=\"%s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#redirect-to' ) ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'0' => esc_html__( 'Same Page', 'everest-forms' ),\n\t\t\t\t\t'1' => esc_html__( 'Custom Page', 'everest-forms' ),\n\t\t\t\t\t'2' => esc_html__( 'External URL', 'everest-forms' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'select',\n\t\t\t'settings',\n\t\t\t'custom_page',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Custom Page', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => '0',\n\t\t\t\t'options' => $this->evf_get_all_pages(),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'text',\n\t\t\t'settings',\n\t\t\t'external_url',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'External URL', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $this->form->external_url ) ? $this->form->external_url : '',\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'select',\n\t\t\t'settings',\n\t\t\t'layout_class',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Layout Design', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => '0',\n\t\t\t\t'tooltip' => esc_html__( 'Choose design template for the Form', 'everest-forms' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => esc_html__( 'Default', 'everest-forms' ),\n\t\t\t\t\t'layout-two' => esc_html__( 'Classic Layout', 'everest-forms' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'text',\n\t\t\t'settings',\n\t\t\t'form_class',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Form Class', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $this->form->form_class ) ? $this->form->form_class : '',\n\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter CSS class names for the form wrapper. Multiple class names should be separated with spaces. <a href=\"%s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#form-class' ) ),\n\t\t\t)\n\t\t);\n\t\techo '<div class=\"everest-forms-border-container\"><h4 class=\"everest-forms-border-container-title\">' . esc_html__( 'Submit Button', 'everest-forms' ) . '</h4>';\n\t\teverest_forms_panel_field(\n\t\t\t'text',\n\t\t\t'settings',\n\t\t\t'submit_button_text',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Submit button text', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $settings['submit_button_text'] ) ? $settings['submit_button_text'] : __( 'Submit', 'everest-forms' ),\n\t\t\t\t'tooltip' => esc_html__( 'Enter desired text for submit button.', 'everest-forms' ),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'text',\n\t\t\t'settings',\n\t\t\t'submit_button_processing_text',\n\t\t\t$this->form_data,\n\t\t\t__( 'Submit button processing text', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $settings['submit_button_processing_text'] ) ? $settings['submit_button_processing_text'] : __( 'Processing&hellip;', 'everest-forms' ),\n\t\t\t\t'tooltip' => esc_html__( 'Enter the submit button text that you would like the button to display while the form submission is processing.', 'everest-forms' ),\n\t\t\t)\n\t\t);\n\t\teverest_forms_panel_field(\n\t\t\t'text',\n\t\t\t'settings',\n\t\t\t'submit_button_class',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Submit button class', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $settings['submit_button_class'] ) ? $settings['submit_button_class'] : '',\n\t\t\t\t'tooltip' => esc_html__( 'Enter CSS class names for submit button. Multiple class names should be separated with spaces.', 'everest-forms' ),\n\t\t\t)\n\t\t);\n\t\tdo_action( 'everest_forms_inline_submit_settings', $this, 'submit', 'connection_1' );\n\t\techo '</div>';\n\t\teverest_forms_panel_field(\n\t\t\t'checkbox',\n\t\t\t'settings',\n\t\t\t'honeypot',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Enable anti-spam honeypot', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => '1',\n\t\t\t)\n\t\t);\n\t\t$recaptcha_type = get_option( 'everest_forms_recaptcha_type', 'v2' );\n\t\t$recaptcha_key = get_option( 'everest_forms_recaptcha_' . $recaptcha_type . '_site_key' );\n\t\t$recaptcha_secret = get_option( 'everest_forms_recaptcha_' . $recaptcha_type . '_secret_key' );\n\t\tif ( ! empty( $recaptcha_key ) && ! empty( $recaptcha_secret ) ) {\n\t\t\teverest_forms_panel_field(\n\t\t\t\t'checkbox',\n\t\t\t\t'settings',\n\t\t\t\t'recaptcha_support',\n\t\t\t\t$this->form_data,\n\t\t\t\t'v3' === $recaptcha_type ? esc_html__( 'Enable Google reCAPTCHA v3', 'everest-forms' ) : ( 'yes' === get_option( 'everest_forms_recaptcha_v2_invisible' ) ? esc_html__( 'Enable Google Invisible reCAPTCHA v2', 'everest-forms' ) : esc_html__( 'Enable Google Checkbox reCAPTCHA v2', 'everest-forms' ) ),\n\t\t\t\tarray(\n\t\t\t\t\t'default' => '0',\n\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enable Google reCaptcha. Make sure the site key and secret key is set in settings page. <a href=\"%s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#enable-recaptcha-support' ) ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\teverest_forms_panel_field(\n\t\t\t'checkbox',\n\t\t\t'settings',\n\t\t\t'disabled_entries',\n\t\t\t$this->form_data,\n\t\t\tesc_html__( 'Disable storing entry information', 'everest-forms' ),\n\t\t\tarray(\n\t\t\t\t'default' => isset( $settings['disabled_entries'] ) ? $settings['disabled_entries'] : 0,\n\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t'tooltip' => sprintf( esc_html__( 'Disable storing form entries. <a href=\"%1$s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#disable-storing-entry-information' ) ),\n\t\t\t)\n\t\t);\n\n\t\tdo_action( 'everest_forms_general_settings', $this );\n\n\t\techo '</div>';\n\n\t\t// --------------------------------------------------------------------//\n\t\t// Email\n\t\t// --------------------------------------------------------------------//\n\t\t$form_name = isset( $settings['form_title'] ) ? ' - ' . $settings['form_title'] : '';\n\t\tif ( ! isset( $settings['email']['connection_1'] ) ) {\n\t\t\t$settings['email']['connection_1'] = array( 'connection_name' => __( 'Admin Notification', 'everest-forms' ) );\n\t\t\t$settings['email']['connection_1']['evf_to_email'] = isset( $settings['email']['evf_to_email'] ) ? $settings['email']['evf_to_email'] : '{admin_email}';\n\t\t\t$settings['email']['connection_1']['evf_from_name'] = isset( $settings['email']['evf_from_name'] ) ? $settings['email']['evf_from_name'] : get_bloginfo( 'name', 'display' );\n\t\t\t$settings['email']['connection_1']['evf_from_email'] = isset( $settings['email']['evf_from_email'] ) ? $settings['email']['evf_from_email'] : '{admin_email}';\n\t\t\t$settings['email']['connection_1']['evf_reply_to'] = isset( $settings['email']['evf_reply_to'] ) ? $settings['email']['evf_reply_to'] : '';\n\t\t\t$settings['email']['connection_1']['evf_email_subject'] = isset( $settings['email']['evf_email_subject'] ) ? $settings['email']['evf_email_subject'] : sprintf( __( 'New Form Entry %s', 'everest-forms' ), $form_name );\n\t\t\t$settings['email']['connection_1']['evf_email_message'] = isset( $settings['email']['evf_email_message'] ) ? $settings['email']['evf_email_message'] : '{all_fields}';\n\n\t\t\t$email_settings = array( 'attach_pdf_to_admin_email', 'show_header_in_attachment_pdf_file', 'conditional_logic_status', 'conditional_option', 'conditionals' );\n\t\t\tforeach ( $email_settings as $email_setting ) {\n\t\t\t\t$settings['email']['connection_1'][ $email_setting ] = isset( $settings['email'][ $email_setting ] ) ? $settings['email'][ $email_setting ] : '';\n\t\t\t}\n\n\t\t\t// Backward compatibility.\n\t\t\t$unique_connection_id = sprintf( 'connection_%s', uniqid() );\n\t\t\tif ( isset( $settings['email']['evf_send_confirmation_email'] ) && '1' === $settings['email']['evf_send_confirmation_email'] ) {\n\t\t\t\t$settings['email'][ $unique_connection_id ] = array( 'connection_name' => esc_html__( 'User Notification', 'everest-forms' ) );\n\n\t\t\t\tforeach ( $email_settings as $email_setting ) {\n\t\t\t\t\t$settings['email'][ $unique_connection_id ][ $email_setting ] = isset( $settings['email'][ $email_setting ] ) ? $settings['email'][ $email_setting ] : '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$email_status = isset( $settings['email']['enable_email_notification'] ) ? $settings['email']['enable_email_notification'] : '1';\n\t\t$hidden_class = '1' !== $email_status ? 'everest-forms-hidden' : '';\n\n\t\techo '<div class=\"evf-content-section evf-content-email-settings\">';\n\t\techo '<div class=\"evf-content-section-title\">';\n\t\techo '<div class=\"evf-title\">' . esc_html__( 'Email', 'everest-forms' ) . '</div>';\n\t\t?>\n\t\t<div class=\"evf-toggle-section\">\n\t\t\t<label class=\"evf-toggle-switch\">\n\t\t\t\t<input type=\"hidden\" name=\"settings[email][enable_email_notification]\" value=\"0\" class=\"widefat\">\n\t\t\t\t<input type=\"checkbox\" name=\"settings[email][enable_email_notification]\" value=\"1\" <?php echo checked( '1', $email_status, false ); ?> >\n\t\t\t\t<span class=\"evf-toggle-switch-wrap\"></span>\n\t\t\t\t<span class=\"evf-toggle-switch-control\"></span>\n\t\t\t</label>\n\t\t</div></div>\n\t\t<?php\n\t\tif ( '1' !== $email_status ) {\n\t\t\tprintf( '<p class=\"email-disable-message everest-forms-notice everest-forms-notice-info\">%s</p>', esc_html__( 'Turn on Email settings to manage your email notifications.', 'everest-forms' ) );\n\t\t}\n\n\t\tforeach ( $settings['email'] as $connection_id => $connection ) :\n\t\t\tif ( preg_match( '/connection_/', $connection_id ) ) {\n\t\t\t\techo '<div class=\"evf-content-email-settings-inner ' . esc_attr( $hidden_class ) . '\" data-connection_id=' . $connection_id . '>';\n\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'text',\n\t\t\t\t\t'email',\n\t\t\t\t\t'connection_name',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\t'',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['connection_name'] ) ? $settings['email'][ $connection_id ]['connection_name'] : __( 'Admin Notification', 'everest-forms' ),\n\t\t\t\t\t\t'class' => 'everest-forms-email-name',\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'text',\n\t\t\t\t\t'email',\n\t\t\t\t\t'evf_to_email',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\tesc_html__( 'To Address', 'everest-forms' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_to_email'] ) ? $settings['email'][ $connection_id ]['evf_to_email'] : '{admin_email}',\n\t\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter the recipient\\'s email address (comma separated) to receive form entry notifications. <a href=\"%s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#to-address' ) ),\n\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t'type' => 'fields',\n\t\t\t\t\t\t\t'form_fields' => 'email',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tif ( 'yes' === get_option( 'everest_forms_enable_email_copies' ) ) {\n\t\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t\t'text',\n\t\t\t\t\t\t'email',\n\t\t\t\t\t\t'evf_carboncopy',\n\t\t\t\t\t\t$this->form_data,\n\t\t\t\t\t\tesc_html__( 'Cc Address', 'everest-forms' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_carboncopy'] ) ? $settings['email'][ $connection_id ]['evf_carboncopy'] : '',\n\t\t\t\t\t\t\t'tooltip' => esc_html__( 'Enter Cc recipient\\'s email address (comma separated) to receive form entry notifications.', 'everest-forms' ),\n\t\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t\t'type' => 'fields',\n\t\t\t\t\t\t\t\t'form_fields' => 'email',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t\t'text',\n\t\t\t\t\t\t'email',\n\t\t\t\t\t\t'evf_blindcarboncopy',\n\t\t\t\t\t\t$this->form_data,\n\t\t\t\t\t\tesc_html__( 'Bcc Address', 'everest-forms' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_blindcarboncopy'] ) ? $settings['email'][ $connection_id ]['evf_blindcarboncopy'] : '',\n\t\t\t\t\t\t\t'tooltip' => esc_html__( 'Enter Bcc recipient\\'s email address (comma separated) to receive form entry notifications.', 'everest-forms' ),\n\t\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t\t'type' => 'fields',\n\t\t\t\t\t\t\t\t'form_fields' => 'email',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'text',\n\t\t\t\t\t'email',\n\t\t\t\t\t'evf_from_name',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\tesc_html__( 'From Name', 'everest-forms' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_from_name'] ) ? $settings['email'][ $connection_id ]['evf_from_name'] : get_bloginfo( 'name', 'display' ),\n\t\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter the From Name to be displayed in Email. <a href=\"%1$s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#from-name' ) ),\n\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t'type' => 'all',\n\t\t\t\t\t\t\t'form_fields' => 'all',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'text',\n\t\t\t\t\t'email',\n\t\t\t\t\t'evf_from_email',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\tesc_html__( 'From Address', 'everest-forms' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_from_email'] ) ? $settings['email'][ $connection_id ]['evf_from_email'] : '{admin_email}',\n\t\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter the Email address from which you want to send Email. <a href=\"%s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#from-address' ) ),\n\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t'type' => 'fields',\n\t\t\t\t\t\t\t'form_fields' => 'email',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'text',\n\t\t\t\t\t'email',\n\t\t\t\t\t'evf_reply_to',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\tesc_html__( 'Reply To', 'everest-forms' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_reply_to'] ) ? $settings['email'][ $connection_id ]['evf_reply_to'] : '',\n\t\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter the reply to email address where you want the email to be received when this email is replied. <a href=\"%1$s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#reply-to' ) ),\n\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t'type' => 'fields',\n\t\t\t\t\t\t\t'form_fields' => 'email',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'text',\n\t\t\t\t\t'email',\n\t\t\t\t\t'evf_email_subject',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\tesc_html__( 'Email Subject', 'everest-forms' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_email_subject'] ) ? $settings['email'][ $connection_id ]['evf_email_subject'] : sprintf( __( 'New Form Entry %s', 'everest-forms' ), $form_name ),\n\t\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter the subject of the email. <a href=\"%1$s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#email-subject' ) ),\n\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t'type' => 'all',\n\t\t\t\t\t\t\t'form_fields' => 'all',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\teverest_forms_panel_field(\n\t\t\t\t\t'tinymce',\n\t\t\t\t\t'email',\n\t\t\t\t\t'evf_email_message',\n\t\t\t\t\t$this->form_data,\n\t\t\t\t\tesc_html__( 'Email Message', 'everest-forms' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => isset( $settings['email'][ $connection_id ]['evf_email_message'] ) ? $settings['email'][ $connection_id ]['evf_email_message'] : __( '{all_fields}', 'everest-forms' ),\n\t\t\t\t\t\t/* translators: %1$s - general settings docs url */\n\t\t\t\t\t\t'tooltip' => sprintf( esc_html__( 'Enter the message of the email. <a href=\"%1$s\" target=\"_blank\">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#email-message' ) ),\n\t\t\t\t\t\t'smarttags' => array(\n\t\t\t\t\t\t\t'type' => 'all',\n\t\t\t\t\t\t\t'form_fields' => 'all',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'parent' => 'settings',\n\t\t\t\t\t\t'subsection' => $connection_id,\n\t\t\t\t\t\t/* translators: %s - all fields smart tag. */\n\t\t\t\t\t\t'after' => '<p class=\"desc\">' . sprintf( esc_html__( 'To display all form fields, use the %s Smart Tag.', 'everest-forms' ), '<code>{all_fields}</code>' ) . '</p>',\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tdo_action( 'everest_forms_inline_email_settings', $this, $connection_id );\n\n\t\t\t\techo '</div>';\n\t\t\t}\n\n\t\tendforeach;\n\n\t\techo '</div>';\n\t\tdo_action( 'everest_forms_settings_panel_content', $this );\n\t}", "function mail_site_posts_information(){\n \t//$count_posts = get_total_post();\n\t$data = \"\";\n\t$data .= get_total_post();\n\n\t$data .= \"Post created yesterday: \".get_posts_edited_created_yesterday('post_date').\"<br>\";\n\t$data .= \"Posts Edited Yesterday \".get_posts_edited_created_yesterday('post_modified').\"<br>\";\n\t$data .= \"Last 7 days posts: \".get_posts_created_this_week().\"<br>\";\n\t$data .= \"Last 40 posts: \".get_last_40_posts().\"<br>\";\n\t$subject = get_site_url().\" \".date('d/m/Y');\n\t$mai_add = get_option('epi_plugin_email_txtbox');\n\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\tif (empty($mai_add)) {\n\t\t$mai_add = get_option('admin_email');\n\t\t\n\t}\n\t\n\tmail($mai_add, $subject, $data,$headers);\n\n\t//echo $data;\n\n\n}", "public function getContent()\n\t{\n\t\t$this->_html .= '<h2>' . $this->l('Chronopost Pickup').'</h2>';\n\t\tif (!empty($_POST) AND Tools::isSubmit('updateDatabase')) {\n\t\t\tif (Tools::getValue('pickme_refresh') == 'true') {\n\t\t\t\t$this->updateDatabase();\n\t\t\t\t$this->_html .= $this->displayConfirmation($this->l('Database updated'));\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($_POST) AND Tools::isSubmit('submitSave'))\n\t\t{\n\t\t\t$this->_postValidation();\n\t\t\tif (!sizeof($this->_postErrors))\n\t\t\t\t$this->_postProcess();\n\t\t\telse\n\t\t\t\tforeach ($this->_postErrors AS $err)\n\t\t\t\t\t$this->_html .= '<div class=\"alert error\"><img src=\"'._PS_IMG_.'admin/forbbiden.gif\" alt=\"nok\" />&nbsp;'.$err.'</div>';\n\t\t}\n\t\t$this->_displayForm();\n\t\treturn $this->_html;\n\t}", "public function createPost()\n {\n return $this->render('admin/index.html.twig', [\n 'controller_name' => 'AdminController',\n ]);\n }", "public function postAdminAction()\n {\n $posts = $this->getDoctrine()->getManager()\n ->getRepository('AppBundle:Post')\n ->findAll();\n return $this->render('admin/post/list.html.twig', [\n 'posts' => $posts\n ]);\n }", "public function run()\n {\n EmailTemplate::truncate();\n $data = [\n [\n 'name' => 'Subscription retainment',\n 'description' => ' Dear {name}, \n\n Your {subscription_name}  amount is {subscription_amount}  plan durantion {subscription_duration} has been activated .\n \n Thank you.  ',\n 'page_type' => 'subscription_retainment',\n ],[\n \n 'name' => 'Registration',\n 'description' => 'Dear   {last_name} {first_name} ,\n\n your account has been registered. your email id    {email} and mobile number  {mobile_number} .\n \n Thank you.',\n 'page_type' => 'registration',\n ],[\n \n 'name' => 'Forgot password',\n 'description' => 'Demo {email} ,\n\n Click here to reset your password {link}.',\n 'page_type' => 'forgot_password',\n ],[\n \n 'name' => 'Subscription expired',\n 'description' => ' Dear {name},\n\n Your {subscription_name}  amount is {subscription_amount}  plan durantion {subscription_duration} has been expired .\n \n Thank you.  ',\n 'page_type' => 'Ssubscription_expired',\n ]\n ];\n EmailTemplate::insert($data);\n }", "public function action_post()\n\t{\n\t\t$post = MMI_Blog_Post::factory(MMI_Blog::DRIVER_WORDPRESS)->get_post(2010, 7, 'hello-world');\n\t\t$mustache = Kostache::factory('mmi/blog/post');\n\t\t$mustache->set(array\n\t\t(\n\t\t\t'ajax_comments' => FALSE,\n\t\t\t'bookmark_driver' => MMI_Bookmark::DRIVER_ADDTHIS,\n\t\t\t'header' => 'Testing ...',\n\t\t\t'post' => $post\n\t\t));\n\t\tMMI_Debug::dead($mustache->render());\n\t}", "function postsAdmin() {\n\t\tini_set('memory_limit', '300M');\n\t\tif ($action = getRequest('takeAction')) {\n\t\t\t$selected = getPost('selectPost');\n\t\t\tif (!empty($selected)) {\n\t\t\t\tswitch ($action) {\n\t\t\t\t\tcase 'Activate Selected':\n\t\t\t\t\t\t$updated = 0;\n\t\t\t\t\t\tforeach ($selected as $postID) {\n\t\t\t\t\t\t\t$post = new post($postID);\n\t\t\t\t\t\t\tif ($post->get('status') == 'disabled') {\n\t\t\t\t\t\t\t\t$post->set('status', 'active');\n\t\t\t\t\t\t\t\tif ($post->update()) {\n\t\t\t\t\t\t\t\t\t++$updated;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\taddSuccess($updated.' post(s) activated successfully');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Disable Selected':\n\t\t\t\t\t\t$updated = 0;\n\t\t\t\t\t\tforeach ($selected as $postID) {\n\t\t\t\t\t\t\t$post = new post($postID);\n\t\t\t\t\t\t\tif ($post->get('status') == 'active') {\n\t\t\t\t\t\t\t\t$post->set('status', 'disabled');\n\t\t\t\t\t\t\t\tif ($post->update()) {\n\t\t\t\t\t\t\t\t\t++$updated;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\taddSuccess($updated.' post(s) disabled successfully');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$controller = new postsController;\n\t\tif (getRequest('runSearch')) {\n\t\t\t$records = $controller->performSearch();\n\t\t\t$recordsFound = $controller->countRecordsFound();\n\t\t} else {\n\t\t\t$records = array();\n\t\t\t$recordsFound = 0;\n\t\t}\n\t\t$userTypes = postsController::$userTypes;\n\t\t$userTypeOptions = array(\n\t\t\t'' => ''\n\t\t);\n\t\tforeach ($userTypes as $userType => $typeValue) {\n\t\t\t$userTypeOptions[strtoupper($userType)] = ucfirst($userType);\n\t\t}\n\t\t$template = new template;\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Posts Admin');\n\t\t$template->assignClean('postTypes', postsController::getPostTypes());\n\t\t$template->assignClean('sources', postsController::$supportedSources);\n\t\t$template->assignClean('userTypes', $userTypeOptions);\n\t\t$template->assignClean('records', $records);\n\t\t$template->assignClean('recordsFound', $recordsFound);\n\t\t$template->assignClean('search', $controller->getSearchValues());\n\t\t$template->assignClean('query', $controller->getQueryComponents($recordsFound));\n\t\t$template->assignClean('admin', adminCore::getAdminUser());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('admin/postsAdmin.htm');\t\n\t}", "public function content() {\n\n ?>\n <form method=\"post\">\n <h2>API Keys</h2>\n <div class=\"wrap\">\n <div id=\"poststuff\">\n <div id=\"post-body\" class=\"metabox-holder columns-1\">\n <div id=\"post-body-content\">\n <?php $this->facebook_sso_key_metabox() ?>\n <br>\n <?php $this->google_sso_key_metabox() ?>\n <br>\n <?php DT_Ipstack_API::metabox_for_admin(); ?>\n <br>\n <?php $this->google_map_api_key_metabox() ?>\n <br>\n <?php $this->google_captcha_key_metabox() ?>\n <br>\n\n </div><!-- end post-body-content -->\n <div id=\"postbox-container-1\" class=\"postbox-container\">\n </div><!-- postbox-container 1 -->\n <div id=\"postbox-container-2\" class=\"postbox-container\">\n </div><!-- postbox-container 2 -->\n </div><!-- post-body meta box container -->\n </div>\n <!--poststuff end -->\n </div><!-- wrap end -->\n </form>\n <?php\n }", "function assign_get_admin_content() {\n\t$content = elgg_view('assign/forms/assign_form');\n\treturn $content;\n}", "private static function generate_post_content_for_user_email( $form_id, $register_action ) {\n\t\t$register_settings = $register_action->post_content;\n\n\t\t$from_name = self::get_from_name_for_user_email( $register_settings );\n\t\t$from_address = self::get_from_address_for_user_email( $register_settings );\n\t\t$subject = self::get_value_from_setting( $register_settings, 'reg_email_subject' );\n\t\t$message = self::get_message_for_user_email( $form_id, $register_settings );\n\t\t$plain_text = self::get_plain_text_setting();\n\n\t\t$post_content = array(\n\t\t\t'email_to' => self::default_to_for_user_email( $register_settings ),\n 'cc' => '',\n 'bcc' => '',\n 'from' => $from_name . ' ' . $from_address,\n 'reply_to' => '',\n 'email_subject' => $subject,\n 'email_message' => $message,\n 'inc_user_info' => 0,\n 'plain_text' => $plain_text,\n\t\t\t'event' => self::registration_email_event(),\n\t\t);\n\n\t\treturn $post_content;\n\t}", "function clpr_owner_new_coupon_email( $post_id ) {\n\tglobal $clpr_options;\n\n\t// get the post values\n\t$post = get_post( $post_id );\n\tif ( ! $post )\n\t\treturn;\n\n\t$category = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_CAT, 'name' );\n\t$store = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_STORE, 'name' );\n\t$coupon_code = get_post_meta( $post->ID, 'clpr_coupon_code', true );\n\n\t$the_title = stripslashes( $post->post_title );\n\t$the_code = stripslashes( $coupon_code );\n\t$the_cat = stripslashes( $category );\n\t$the_store = stripslashes( $store );\n\n\t$the_author = stripslashes( clpr_get_user_name( $post->post_author ) );\n\t$the_author_email = stripslashes( get_the_author_meta( 'user_email', $post->post_author ) );\n\t$the_slug = get_permalink( $post->ID );\n\t$the_content = appthemes_filter( stripslashes( $post->post_content ) );\n\t$the_content = mb_substr( $the_content, 0, 150 ) . '...';\n\n\t$the_status = stripslashes( $post->post_status );\n\n\t$dashurl = trailingslashit( CLPR_DASHBOARD_URL );\n\n\t// variables that can be used by admin to dynamically fill in email content\n\t$find = array( '/%username%/i', '/%blogname%/i', '/%siteurl%/i', '/%loginurl%/i', '/%useremail%/i', '/%title%/i', '/%code%/i', '/%category%/i', '/%store%/i', '/%description%/i', '/%dashurl%/i' );\n\t$replace = array( $the_author, get_bloginfo( 'name' ), home_url('/'), wp_login_url(), $the_author_email, $the_title, $the_code, $the_cat, $the_store, $the_content, $dashurl );\n\n\t$mailto = $the_author_email;\n\n\t// email contents start\n\t$from_name = strip_tags( $clpr_options->nc_from_name );\n\t$from_email = strip_tags( $clpr_options->nc_from_email );\n\n\t// search and replace any user added variable fields in the subject line\n\t$subject = stripslashes( $clpr_options->nc_email_subject );\n\t$subject = preg_replace( $find, $replace, $subject );\n\t$subject = preg_replace( \"/%.*%/\", \"\", $subject );\n\n\t// search and replace any user added variable fields in the body\n\t$message = stripslashes( $clpr_options->nc_email_body );\n\t$message = preg_replace( $find, $replace, $message );\n\t$message = preg_replace( \"/%.*%/\", \"\", $message );\n\n\t$email = array( 'to' => $mailto, 'subject' => $subject, 'message' => $message, 'from' => $from_email, 'from_name' => $from_name );\n\t$email = apply_filters( 'clpr_email_user_new_coupon', $email, $post_id );\n\n\tAPP_Mail_From::apply_once( array( 'email' => $email['from'], 'name' => $email['from_name'] ) );\n\tif ( $clpr_options->nc_email_type == 'text/plain' ) {\n\t\twp_mail( $email['to'], $email['subject'], $email['message'] );\n\t} else {\n\t\tappthemes_send_email( $email['to'], $email['subject'], $email['message'] );\n\t}\n\n}", "function app_new_submission_email( $post_id ) {\n\n\t// get the post values\n\t$post = get_post( $post_id );\n\tif ( ! $post )\n\t\treturn;\n\n\t$category = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_CAT, 'name' );\n\t$store = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_STORE, 'name' );\n\t$coupon_code = get_post_meta( $post->ID, 'clpr_coupon_code', true );\n\n\t$the_author = stripslashes( clpr_get_user_name( $post->post_author ) );\n\t$the_content = appthemes_filter( stripslashes( $post->post_content ) );\n\t$the_content = mb_substr( $the_content, 0, 150 ) . '...';\n\n\t// The blogname option is escaped with esc_html on the way into the database in sanitize_option\n\t// we want to reverse this for the plain text arena of emails.\n\t$blogname = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );\n\t$subject = __( 'New Coupon Submission', APP_TD );\n\n\t$message = html( 'p', __( 'Dear Admin,', APP_TD ) ) . PHP_EOL;\n\t$message .= html( 'p', sprintf( __( 'The following coupon has just been submitted on your %s website.', APP_TD ), $blogname ) ) . PHP_EOL;\n\t$message .= html( 'p',\n\t\t__( 'Details', APP_TD ) . '<br />' .\n\t\t'-----------------' . '<br />' .\n\t\tsprintf( __( 'Title: %s', APP_TD ), $post->post_title ) . '<br />' .\n\t\tsprintf( __( 'Coupon Code: %s', APP_TD ), $coupon_code ) . '<br />' .\n\t\tsprintf( __( 'Category: %s', APP_TD ), $category ) . '<br />' .\n\t\tsprintf( __( 'Store: %s', APP_TD ), $store ) . '<br />' .\n\t\tsprintf( __( 'Author: %s', APP_TD ), $the_author ) . '<br />' .\n\t\tsprintf( __( 'Description: %s', APP_TD ), $the_content ) . '<br />' .\n\t\t'-----------------'\n\t) . PHP_EOL;\n\t$message .= html( 'p', sprintf( __( 'Preview: %s', APP_TD ), get_permalink( $post->ID ) ) ) . PHP_EOL;\n\t$message .= html( 'p', sprintf( __( 'Edit: %s', APP_TD ), get_edit_post_link( $post->ID, '' ) ) ) . PHP_EOL;\n\t$message .= html( 'p', __( 'Regards,', APP_TD ) . '<br />' . __( 'Clipper', APP_TD ) ) . PHP_EOL;\n\n\t$email = array( 'to' => get_option( 'admin_email' ), 'subject' => $subject, 'message' => $message );\n\t$email = apply_filters( 'clpr_email_admin_new_coupon', $email, $post_id );\n\n\tappthemes_send_email( $email['to'], $email['subject'], $email['message'] );\n}", "public function dispatchNewPostNotificationToAdministrators( $post )\n {\n // Prepare the data that will be passed into the email view.\n //\n $data = $post->toArray();\n\n // Fetch all administrators from the database.\n //\n $administrators = $this->userRepository->getAdministrators();\n\n // Loop through the the $administrators and dispatch an\n // email to each one, notifying them of the new post.\n //\n foreach ( $administrators as $administrator )\n {\n // Push the email onto the dispatch queue.\n //\n $this->mailQueue->queue( 'emails.new.post' , $data , function ( $message ) use ( $administrator, $post )\n {\n //$message->to( $administrator->email, 'Administrator' )->bcc('jordan.dalton@ymail.com')->subject( 'New Post @ ' . config('settings.site_name') );\n $message->to( 'jordan.dalton@ymail.com' )->subject( 'New Post @ ' . config('settings.site_name') );\n } );\n }\n }", "public function display()\n {\n\t\t// action links\n\t\t$content = Display::actions(array(\n array(\n 'url' => 'event_type.php' ,\n 'content' => Display::return_icon(\n 'new_document.png',\n get_lang('Add'),\n array(),\n ICON_SIZE_MEDIUM\n )\n )\n )\n );\n $content .= Display::grid_html('event_email_template');\n return $content;\n\t}", "public function getPostContent()\n {\n return $this->postContent;\n }", "public function getContent()\n\t{\n\t\t$html = \"\";\n\t\tif (Tools::isSubmit('submit'))\n\t\t{\n\t\t\t$this->_postValidation();\n\t\t\tif (!sizeof($this->_postErrors))\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t $definedConfigs = array(\n\t\t /* general config */\n\t\t 'module_theme' => '',\n\t\t 'home_sorce' => '',\n\t\t 'lofhook' => '',\n\t\t 'module_group' => '',\n\t\t 'productids' => '',\n\t\t 'pubkey' => '',\n\t\t 'widgettype' => '',\n\t\t 'butstyle' => '',\n\t\t 'facebook' => '',\n\t\t 'twitter' => '',\n\t\t 'sharethis' => '',\n\t\t 'email' => '',\n\t\t 'plusone' => '',\n\t\t 'fblike' => '',\n\t\t 'linkedin' => '',\n\t\t 'yahoo' => '',\n\t\t 'gbuzz' => '',\n\t\t 'technorati' => '',\n\t\t 'newsvine' => '',\n\t\t 'blogmarks' => '',\n\t\t 'digg' => '',\n\t\t 'reddit' => ''\n\t\t \n\t\t );\n $listarticle = Tools::getValue('custom-num');\n $languages = Language::getLanguages();\n \n\t\t foreach( $definedConfigs as $config => $key ){\n\t\t \t\tConfiguration::updateValue($this->name.'_'.$config, Tools::getValue($config), true);\n\t\t \t}\n if(Tools::getValue('category')){\n \t\t if(in_array(\"\",Tools::getValue('category'))){\n \t\t $catList = \"\";\n \t\t }else{\n \t\t $catList = implode(\",\",Tools::getValue('category')); \n \t\t }\n Configuration::updateValue($this->name.'_category', $catList, true);\n }\n $linkArray = Tools::getValue('override_links');\n if($linkArray){\n foreach ($linkArray as $key => $value) {\n if (is_null($value) || $value == \"\") {\n unset ($linkArray[$key]);\n }\n }\n $override_links = implode(\",\",$linkArray);\n Configuration::updateValue($this->name.'_override_links', $override_links, true);\n }\n\t\t\t\t$html .= '<div class=\"conf confirm\">'.$this->l('Settings updated').'</div>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($this->_postErrors AS $err)\n\t\t\t\t{\n\t\t\t\t\t$html .= '<div class=\"alert error\">'.$err.'</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// reset current values.\n\t\t\t$this->_params = new LofParams( $this->name );\t\n\t\t}\n\t\treturn $html.$this->_getFormConfig();\n\t}", "function emailContentForm()\n\t{\n\t\tglobal $mainframe;\n\n\t\t/*\n\t\t * Initialize variables\n\t\t */\n\t\t$db\t\t= & $mainframe->getDBO();\n\t\t$user\t= & $mainframe->getUser();\n\t\t$uid\t\t= JRequest::getVar('id', 0, '', 'int');\n\n\t\t/*\n\t\t * Create a user access object for the user\n\t\t */\n\t\t$access\t\t\t\t\t\t\t= new stdClass();\n\t\t$access->canEdit\t\t\t= $user->authorize('action', 'edit', 'content', 'all');\n\t\t$access->canEditOwn\t\t= $user->authorize('action', 'edit', 'content', 'own');\n\t\t$access->canPublish\t\t= $user->authorize('action', 'publish', 'content', 'all');\n\n\t\t$row = & JModel::getInstance('content', $db);\n\t\t$row->load($uid);\n\n\t\tif ($row->id === null || $row->access > $user->get('gid'))\n\t\t{\n\t\t\tJError::raiseError( 403, JText::_(\"Access Forbidden\") );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"SELECT template\" .\n\t\t\t\t\t\"\\n FROM #__templates_menu\" .\n\t\t\t\t\t\"\\n WHERE client_id = 0\" .\n\t\t\t\t\t\"\\n AND menuid = 0\";\n\t\t\t$db->setQuery($query);\n\t\t\t$template = $db->loadResult();\n\t\t\tJContentViewHTML::emailForm($row->id, $row->title, $template);\n\t\t}\n\n\t}", "function registerPages() {\n \\Idno\\Core\\site()->template()->extendTemplate('account/menu/items','account/emailpost/menu');\n \n \n // Register the callback URL\n \\Idno\\Core\\site()->addPageHandler('account/emailposting','\\IdnoPlugins\\IdnoEmailPosting\\Pages\\Account');\n \n \n // Now, lets handle some events\n \\Idno\\Core\\site()->addEventHook('email/post',function(\\Idno\\Core\\Event $event) {\n\n $subject = $event->data()['subject'];\n $body = $event->data()['body'];\n $attachments = $event->data()['attachments'];\n $syndication = [];\n \n // Parse subject for syndication hashtags\n $matches = [];\n if (preg_match_all('/\\|[a-zA-Z]+/', $subject, $matches)) {\n $subject = explode('|', $subject);\n $subject = trim($subject[0]);\n \n foreach ($matches[0] as $match)\n $syndication[] = trim($match, '| ');\n \n }\n\t\t \n\t\t // Parse body for syndication hashtags\n\t\t $matches = [];\n if (preg_match_all('/\\|[a-zA-Z]+/m', $body, $matches)) {\n\t\t\t$body = preg_replace('/\\|[a-zA-Z]+/m', ' ', $body); // Remove tags from body\n foreach ($matches[0] as $match)\n $syndication[] = trim($match, '| ');\n }\n\t\t \n\t\t $syndication = array_unique($syndication); // Remove duplicates\n\t\t \n\t\t if (count($syndication))\n\t\t\tforeach ($syndication as $service)\n\t\t\t error_log(\"Syndicating to $service\");\n\t\t \n\t\t // Remove any blank lines from end of body (which may be left over from removing tags)\n\t\t $body = rtrim($body);\n\n // If there are attachments, see if any of them are pictures\n if (!empty($attachments)) {\n \n foreach ($attachments as $attachment) {\n \n $content_type = $attachment->getContentType();\n error_log(\"Found attachment of $content_type...\");\n \n // We know how to handle images...\n if (strpos($content_type, 'image/')!== false)\n {\n error_log(\"I know how to handle an image...\");\n \n // Write temp file\n $tmpfname = tempnam(\"/tmp\", \"IdnoEmailPosting\");\n\n $handle = fopen($tmpfname, \"w\");\n fwrite($handle, $attachment->getContent());\n fclose($handle);\n \n // Fake a file upload\n $_FILES = [\n 'photo' => [\n 'tmp_name' => $tmpfname,\n 'name' => $attachment->getFilename(),\n 'type' => $content_type\n ]\n ];\n \n $this->callAction('/photo/edit', 'IdnoPlugins\\Photo\\Pages\\Edit', ['body' => $body, 'title' => $subject, 'syndication' => $syndication]);\n }\n \n }\n }\n \n \n // If short message, post as status\n if (strlen(\"$subject $body\") <= 140) {\n $this->callAction('/status/edit', 'IdnoPlugins\\Status\\Pages\\Edit', ['body' => \"$subject $body\", 'syndication' => $syndication]);\n }\n \n // Longer form, post as post\n $this->callAction('/text/edit', 'IdnoPlugins\\Text\\Pages\\Edit', ['body' => $body, 'title' => $subject, 'syndication' => $syndication]);\n \n });\n \n\t }", "public function addpost() \n\t\t{\n\t\t\tif($this->variables->checkWhetherAdminOrSuperUser())\n\t\t\t{\n\t\t\t\treturn [\n\t\t\t\t\t'title' => $_SESSION['Superuser'] ? \\Ninja\\Variables::SUPERUSERTITLE : \\Ninja\\Variables::ADMINTITLE,\n\t\t\t\t\t'template' => 'addpost.html.php',\n\t\t\t\t\t'variables' => [\n\t\t\t\t\t\t'heading' => 'Add post',\n\t\t\t\t\t\t'categories' => $this->topics\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t} else \n\t\t\t{\n\t\t\t\t$this->variables->notAuthorized();\t\t\n\t\t\t}\n\t\t}", "public function build()\n {\n\n return $this->markdown('emails.mommz.email',['data'=>$this->data]);\n }", "function post_notification_page_content() {\n\tglobal $post_notification_page_content_glob, $wpdb;\n\tif ( $post_notification_page_content_glob ) {\n\t\treturn $post_notification_page_content_glob;\n\t}\n\n\t//It doesn't matter where this goes:\n\n\n\t$content = &$post_notification_page_content_glob;\n\t$content = array();\n\t$content['header'] = '';\n\t$content['body'] = '';\n\n\t// One-Click-Unsubscribe\n\tif ( isset( $_POST['List-Unsubscribe'] ) && 'One-Click' === $_POST['List-Unsubscribe'] ) {\n\t\t//error_log(\"(no error) Post Notification: one-click unsubscribe\");\n\t\t$post_notification_one_click_unsubscribe = true;\n\t} else {\n\t\t$post_notification_one_click_unsubscribe = false;\n\t}\n\n\n\t// ******************************************************** //\n\t// GET VARIABLES FROM URL\n\t// ******************************************************** //\n\t$action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_SPECIAL_CHARS );\n\t$addr = filter_input( INPUT_GET, 'addr', FILTER_SANITIZE_SPECIAL_CHARS );\n\t$code = filter_input( INPUT_GET, 'code', FILTER_SANITIZE_SPECIAL_CHARS );\n\n\tif ( isset( $_POST[\"addr\"] ) ) {\n\t\t$postaddr = filter_input( INPUT_POST, 'addr', FILTER_SANITIZE_SPECIAL_CHARS );\n\t\tif ( $postaddr !== '' or $postaddr !== null or $postaddr !== false ) {\n\t\t\t$addr = $postaddr;\n\t\t}\n\t}\n\tif ( isset( $_POST[\"action\"] ) ) {\n\t\t$postaction = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_SPECIAL_CHARS );\n\t\tif ( $postaction !== '' or $postaction !== null or $postactionr !== false ) {\n\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_SPECIAL_CHARS );\n\t\t}\n\t}\n\tif ( isset( $_POST[\"code\"] ) ) {\n\t\t$postcode = filter_input( INPUT_POST, 'code', FILTER_SANITIZE_SPECIAL_CHARS );\n\t\tif ( $postcode !== '' or $postcode !== null or $postcode !== false ) {\n\t\t\t$code = filter_input( INPUT_POST, 'code', FILTER_SANITIZE_SPECIAL_CHARS );\n\t\t}\n\t}\n\tif ( isset( $_POST[\"pn_cats\"] ) ) {\n\t\t$postpn_cats = filter_input( INPUT_POST, 'pn_cats', FILTER_SANITIZE_SPECIAL_CHARS );\n\t\tif ( $postpn_cats !== '' or $postpn_cats !== null or $postpn_cats !== false ) {\n\t\t\t$pn_cats = filter_input( INPUT_POST, 'pn_cats', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );\n\t\t}\n\t}\n\n\t$msg = &$content['body'];\n\n\t// filter for personal blacklisting in functions.php\n\t$excluded_email_addresses = \"\";\n\t$excluded_email_addresses = apply_filters( 'post_notification_excluded_email_addresses', $excluded_email_addresses );\n\n\tif ( $addr != '' && strlen( $addr ) > 0 && strpos( $excluded_email_addresses, $addr ) !== false ) {\n\t\t$content['header'] = \"ERROR\";\n\t\t$msg = \"ERROR\";\n\n\t\treturn $content;\n\t}\n\n\n\t// ******************************************************** //\n\t// DEFINE OTHER VARS NEEDED\n\t// ******************************************************** //\n\trequire( post_notification_get_profile_dir() . '/strings.php' );\n\n\n\t$t_emails = $wpdb->prefix . 'post_notification_emails';\n\t$t_cats = $wpdb->prefix . 'post_notification_cats';\n\n\t$from_email = get_option( 'post_notification_from_email' );\n\t$pnurl = post_notification_get_link();\n\tif ( get_option( 'post_notification_hdr_nl' ) === \"rn\" ) {\n\t\t$hdr_nl = \"\\r\\n\";\n\t} else {\n\t\t$hdr_nl = \"\\n\";\n\t}\n\t$blogname = get_option( 'blogname' );\n\n\n\t// ******************************************************** //\n\t// Code Check\n\t// ******************************************************** //\n\t//This code is not very nice in performance, but I wanted to keep it as easy to understand as possible. It's not called that often.\n\n\t//check for one-click-unsubscribtion\n\tif ( ( $code != '' ) && ( $post_notification_one_click_unsubscribe === true ) && $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '\" . $addr . \"' AND act_code = '\" . $code . \"'\" ) ) {\n\t\t// ******************************************************** //\n\t\t// one-click unsubscribe WITH AUTH\n\t\t// ******************************************************** //\n\t\t$mid = $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '$addr'\" );\n\t\tif ( $mid != '' ) {\n\t\t\t$wpdb->query( \"DELETE FROM $t_emails WHERE id = $mid\" );\n\t\t\t$wpdb->query( \"DELETE FROM $t_cats WHERE id = $mid\" );\n\t\t}\n\t} elseif ( ( $code != '' ) && $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '\" . $addr . \"' AND act_code = '\" . $code . \"'\" ) ) {\n\t\t// ******************************************************** //\n\t\t// WITH AUTH\n\t\t// ******************************************************** //\n\n\t\tif ( 1 != $wpdb->get_var( \"SELECT gets_mail FROM $t_emails WHERE email_addr = '$addr'\" ) ) {\n\t\t\t//The user just subscribed, so let's set him up\n\t\t\t$now = post_notification_date2mysql();\n\t\t\t$wpdb->query( \"UPDATE $t_emails SET gets_mail = 1, date_subscribed = '$now' WHERE email_addr = '$addr'\" );\n\t\t\t$mailid = $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '$addr'\" );\n\t\t\t$selected_cats = explode( ',', get_option( 'post_notification_selected_cats' ) );\n\t\t\t$queryCats = '';\n\t\t\tif ( ! empty( $selected_cats ) ) {\n\t\t\t\t$queryCats = \"\";\n\t\t\t\tforeach ( $selected_cats as $category ) {\n\t\t\t\t\tif ( is_numeric( $category ) ) {\n\t\t\t\t\t\t$queryCats .= \", ($mailid, $category)\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( strlen( $queryCats ) > 0 ) {\n\t\t\t\t\t$wpdb->query( \"INSERT INTO $t_cats (id, cat_id) VALUES\" . substr( $queryCats, 1 ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset( $post_notification_strings['welcome'] ) ) {\n\t\t\t\t$msg = '<h3>' . str_replace( '@@blogname', get_option( 'blogname' ), $post_notification_strings['welcome'] ) . '</h3>';\n\t\t\t} else {\n\t\t\t\t$msg = '<h3>' . $post_notification_strings['saved'] . '</h3>';\n\t\t\t}\n\t\t}\n\n\n\t\t// ******************************************************** //\n\t\t// Select Cats\n\t\t// ******************************************************** //\n\t\tif ( $action === \"subscribe\" ) {\n\t\t\t$wpdb->query( \"UPDATE $t_emails SET gets_mail = 1 WHERE email_addr = '$addr'\" );\n\t\t\t$mid = $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '$addr'\" );\n\n\t\t\tif ( get_option( 'post_notification_show_cats' ) === 'yes' ) {\n\t\t\t\t//Delete all entries\n\t\t\t\t$wpdb->query( \"DELETE FROM $t_cats WHERE id = $mid\" );\n\n\t\t\t\tif ( ! is_array( $pn_cats ) ) {\n\t\t\t\t\t$pn_cats = array();\n\t\t\t\t} //Just to make shure it doesn't crash\n\t\t\t\t//Let's see what cats we have\n\t\t\t\t$queryCats = '';\n\t\t\t\tforeach ( $pn_cats as $cat ) {\n\t\t\t\t\tif ( is_numeric( $cat ) ) {\n\t\t\t\t\t\t$queryCats .= \", ($mid, $cat)\";\n\t\t\t\t\t}//Security\n\t\t\t\t}\n\n\t\t\t\tif ( strlen( $queryCats ) > 0 ) {\n\t\t\t\t\t$wpdb->query( \"INSERT INTO $t_cats (id, cat_id) VALUES\" . substr( $queryCats, 1 ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$msg .= '<h3>' . $post_notification_strings['saved'] . '</h3>';\n\t\t}\n\n\n\t\t// ******************************************************** //\n\t\t// UNSUBSCRIBE\n\t\t// ******************************************************** //\n\t\tif ( $action === \"unsubscribe\" and is_email( $addr ) ) {\n\t\t\t$mid = $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '$addr'\" );\n\t\t\tif ( $mid != '' ) {\n\t\t\t\t$wpdb->query( \"DELETE FROM $t_emails WHERE id = $mid\" );\n\t\t\t\t$wpdb->query( \"DELETE FROM $t_cats WHERE id = $mid\" );\n\t\t\t}\n\n\t\t\t$content['header'] = $post_notification_strings['deaktivated'];\n\t\t\t$msg = str_replace(\n\t\t\t\tarray( '@@addr', '@@blogname' ),\n\t\t\t\tarray( $addr, $blogname ),\n\t\t\t\t$post_notification_strings['no_longer_activated']\n\t\t\t);\n\n\t\t\treturn $content;\n\t\t}\n\n\n\t\t// ********************************************************//\n\t\t// Subscribe-page\n\t\t// ********************************************************//\n\n\n\t\t$content['header'] = get_option( 'post_notification_page_name' );\n\n\t\t$id = $wpdb->get_var( \"SELECT id FROM $t_emails WHERE email_addr = '$addr'\" );\n\n\t\tif ( get_option( 'post_notification_show_cats' ) === 'yes' ) {\n\t\t\t$subcats_db = $wpdb->get_results( \"SELECT cat_id FROM $t_cats WHERE id = $id\" );\n\t\t\t$subcats = array();\n\t\t\tif ( isset( $subcats_db ) ) {\n\t\t\t\tforeach ( $subcats_db as $subcat ) {\n\t\t\t\t\t$subcats[] = $subcat->cat_id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get cats listing\n\t\t\t$cats_str = post_notification_get_catselect( $post_notification_strings['all'], $subcats );\n\t\t} else {\n\t\t\t$cats_str = '';\n\t\t}\n\t\t$vars = '<input type=\"hidden\" name=\"code\" value=\"' . $code . '\" /><input type=\"hidden\" name=\"addr\" value=\"' . $addr . '\" />';\n\n\t\tif ( $action === \"subscribe\" && get_option( 'post_notification_saved_tmpl' ) === 'yes' ) {\n\t\t\t$msg = post_notification_ldfile( 'saved.tmpl' );\n\t\t} else {\n\t\t\t$msg .= post_notification_ldfile( 'select.tmpl' );\n\t\t}\n\t\t$msg = str_replace( '@@action', post_notification_get_link(), $msg );\n\t\t$msg = str_replace( '@@addr', $addr, $msg );\n\t\t$msg = str_replace( '@@cats', $cats_str, $msg );\n\t\t$msg = str_replace( '@@vars', $vars, $msg );\n\t} else {\n\t\t// ******************************************************** //\n\t\t// WITHOUT AUTH\n\t\t// ******************************************************** //\n\t\t$code = '';\n\n\t\t// ******************************************************** //\n\t\t// Shortcut: maybe we don't want \n\t\t// to allow subscription if we already\n\t\t// have a Wordpress account\n\t\t// ******************************************************** //\n\t\tif ( ( $action === \"subscribe\" || $action == '' ) && is_email( $addr ) && email_exists( $addr ) ) {\n\t\t\t// filter so that a theme can prevent the confirmation email if a WP \n\t\t\t// user with that email address already exists.\n\t\t\t// todo: Language support missing for filter\n\n\t\t\t// pn_can_send_confirmation_email_to_existing_wp_users filter:\n\t\t\t// on entry, get $params array with \"send\", \"header\" and \"msg\" fields.\n\t\t\t// on exit, return the possibly modified $params array.\n\t\t\t// Set params['send'] to false to prevent the confirmation email.\n\t\t\t$params = array(\n\t\t\t\t'send' => true,\n\t\t\t\t'header' => 'User account already exists',\n\t\t\t\t'msg' => '<p>Please log into your account.</p>',\n\t\t\t);\n\t\t\t$params = apply_filters( 'pn_can_send_confirmation_email_to_existing_wp_users', $params, $addr );\n\n\t\t\tif ( $params['send'] === false ) {\n\t\t\t\t//\terror_log(\"(no error) Post Notification: no confirmation email sent to existing user: \" . $addr);\n\t\t\t\t//Output Page\n\t\t\t\t$content['header'] = $params['header'];\n\t\t\t\t$msg = $params['msg'];\n\n\t\t\t\treturn $content; //here it ends - don't show the selection screen.\n\t\t\t}\n\t\t}\n\n\t\tif ( is_email( $addr ) && post_notification_check_captcha() && post_notification_check_honeypot() ) {\n\t\t\t// ******************************************************** //\n\t\t\t// SUBSCRIBE\n\t\t\t// ******************************************************** //\n\t\t\tif ( $action === \"subscribe\" || $action == '' ) {\n\t\t\t\t$conf_url = post_notification_get_mailurl( $addr );\n\n\t\t\t\t// build confirmation email\n\t\t\t\t$mailmsg = post_notification_ldfile( 'confirm.tmpl' );\n\n\t\t\t\t$mailmsg = str_replace( '@@addr', $addr, $mailmsg );\n\t\t\t\t$mailmsg = str_replace( '@@conf_url', $conf_url, $mailmsg );\n\n\t\t\t\t//error_log(\"(no error) Post Notification: subscribe -- sending authentication email to: $addr\");\n\t\t\t\twp_mail( $addr, \"$blogname - \" . get_option( 'post_notification_page_name' ), $mailmsg, post_notification_header() );\n\n\t\t\t\t//Output Page\n\t\t\t\t$content['header'] = $post_notification_strings['registration_successful'];\n\t\t\t\t$msg = post_notification_ldfile( 'reg_success.tmpl' );\n\n\t\t\t\treturn $content; //here it ends - We don't want to show the selection screen.\n\t\t\t\t// }\n\t\t\t}\n\t\t\t// ******************************************************** //\n\t\t\t// UNSUBSCRIBE\n\t\t\t// ******************************************************** //\n\t\t\tif ( $action === \"unsubscribe\" ) {\n\t\t\t\tif ( $wpdb->get_var( \"SELECT email_addr FROM $t_emails WHERE email_addr = '$addr'\" ) ) { //There is a mail in the db\n\t\t\t\t\t$conf_url = post_notification_get_mailurl( $addr );\n\t\t\t\t\t$conf_url .= \"action=unsubscribe\";\n\n\t\t\t\t\t$mailmsg = post_notification_ldfile( 'unsubscribe.tmpl' );\n\t\t\t\t\t$mailmsg = str_replace( array( '@@addr', '@@conf_url' ), array( $addr, $conf_url ), $mailmsg );\n\t\t\t\t\twp_mail( $addr, \"$blogname - \" . $post_notification_strings['deaktivated'], $mailmsg, post_notification_header() );\n\t\t\t\t}\n\t\t\t\t$content['header'] = $post_notification_strings['deaktivated'];\n\t\t\t\t$msg = str_replace(\n\t\t\t\t\tarray( '@@addr', '@@blogname' ),\n\t\t\t\t\tarray( $addr, $blogname ),\n\t\t\t\t\t$post_notification_strings['unsubscribe_mail']\n\t\t\t\t);\n\n\t\t\t\treturn $content; //here it ends - We don't want to show the selection screen.\n\t\t\t}\n\t\t}\n\n\t\tif ( $addr != '' ) {\n\t\t\tif ( ! is_email( $addr ) ) {\n\t\t\t\t$msg .= '<p class=\"error\">' . $post_notification_strings['check_email'] . '</p>';\n\t\t\t}\n\t\t\tif ( ! post_notification_check_captcha() && $action != '' ) {\n\t\t\t\t$msg .= '<p class=\"error\">' . $post_notification_strings['wrong_captcha'] . '</p>';\n\t\t\t}\n\t\t}\n\n\t\t//Try to get the email addr\n\t\tif ( $addr == '' ) {\n\t\t\t$addr = post_notification_get_addr();\n\t\t}\n\n\t\t$content['header'] = get_option( 'post_notification_page_name' );\n\n\n\t\t$msg .= post_notification_ldfile( 'subscribe.tmpl' );\n\n\t\t$msg = str_replace( '@@action', post_notification_get_link( $addr ), $msg );\n\t\t$msg = str_replace( '@@addr', $addr, $msg );\n\t\t$msg = str_replace( '@@cats', '', $msg );\n\t\t$msg = str_replace( '@@vars', $vars, $msg );\n\n\t\tif ( get_option( 'post_notification_honeypot' ) === 'yes' ) {\n\t\t\t// error_log(\"(no error) Post Notification: honeypot_active\");\n\t\t\techo \"<style>\n #verifyemail{\n opacity: 0;\n position: absolute;\n height: 0;\n width: 0;\n z-index: -1;\n }\n </style>\";\n\t\t\t$pattern = '</form>';\n\t\t\t$replacement = 'p id=\"verifyemail\">Please DONT write anything here: <input autocomplete=\"off\" type=\"text\" name=\"email\" size=\"30\" maxlength=\"50\" placeholder=\"Your e-mail here\"></form';\n\t\t\t$msg = preg_replace( $pattern, $replacement, $msg ); //remove honeypot\n\t\t}\n\n\t\t//Do Captcha-Stuff\n\t\tif ( get_option( 'post_notification_captcha' ) == 0 ) {\n\t\t\t$msg = preg_replace( '/<!--capt-->(.*?)<!--cha-->/is', '', $msg ); //remove captcha\n\t\t} else {\n\t\t\trequire_once( POST_NOTIFICATION_PATH . 'class.captcha.php' );\n\t\t\t$captcha_code = md5( round( mt_rand( 0, 40000 ) ) );\n\t\t\t$my_captcha = new captcha( $captcha_code, POST_NOTIFICATION_PATH . '_temp' );\n\t\t\t$captchaimg = POST_NOTIFICATION_PATH_URL . '_temp/cap_' . $my_captcha->get_pic( get_option( 'post_notification_captcha' ) ) . '.jpg';\n\t\t\t$msg = str_replace( '@@captchaimg', $captchaimg, $msg );\n\t\t\t$msg = str_replace( '@@captchacode', $captcha_code, $msg );\n\t\t}\n\t}\n\n\treturn $content;\n}", "private function generateViewPostHTML() : string {\n $bodyHTMLEncoded = htmlspecialchars($this->postToDisplay->getbody(), ENT_QUOTES, 'UTF-8');\n // Retain user new lines by replacing them with <br>-tags.\n $bodyWithNewlines = str_replace(PHP_EOL, '<br>', $bodyHTMLEncoded);\n\n return $bodyWithNewlines;\n }", "private function sendEmails()\n {\n // get emails of administrators\n $adminEmails = array();\n $this->model->action('user','getUsers',\n array('result' => & $adminEmails,\n 'role' => array('=',20),\n 'status' => array('=',2),\n 'fields' => array('email') )); \n\n $adminBody = 'Hi,<br>A new comment was added to the following article:'; \n $adminBody .= '<a href=\"http://'.$this->router->getBase().'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->config->getModuleVar('article','title').'</a>';\n \n if($this->config->getModuleVar('article','default_comment_status') == 1)\n {\n $adminBody .= '<br><br>You have to validate new comments!'; \n }\n \n $this->model->action('common', 'sendMail',\n array('toEmail' => & $adminEmails,\n 'fromEmail' => '',\n 'subject' => 'New comment added',\n 'body' => (string)$adminBody)); \n \n }", "function dokan_send_scheduled_announcement_email( $post ) {\n if ( 'dokan_announcement' !== $post->post_type ) {\n return;\n }\n\n $announcement = new \\WeDevs\\DokanPro\\Admin\\Announcement();\n $announcement->trigger_mail( $post->ID );\n}", "public function action_bounce_preview()\n\t{\n\t\tglobal $context, $txt, $scripturl, $mbname, $modSettings;\n\n\t\trequire_once(SUBSDIR . '/Post.subs.php');\n\t\tTxt::load('Errors');\n\t\tTxt::load('ModerationCenter');\n\n\t\t$context['post_error']['errors'] = array();\n\n\t\t// If you can't approve emails, what are you doing here?\n\t\tif (allowedTo('approve_emails'))\n\t\t{\n\t\t\t$body = !empty($this->_req->post->body) ? trim(censor($this->_req->post->body)) : '';\n\t\t\t$context['preview_subject'] = !empty($this->_req->post->title) ? trim(Util::htmlspecialchars($this->_req->post->title)) : '';\n\n\t\t\tif (isset($this->_req->post->issuing))\n\t\t\t{\n\t\t\t\tif (empty($this->_req->post->title) || empty($this->_req->post->body))\n\t\t\t\t{\n\t\t\t\t\t$context['post_error']['errors'][] = $txt['warning_notify_blank'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (empty($this->_req->post->title))\n\t\t\t\t{\n\t\t\t\t\t$context['post_error']['errors'][] = $txt['mc_warning_template_error_no_title'];\n\t\t\t\t}\n\n\t\t\t\tif (empty($this->_req->post->body))\n\t\t\t\t{\n\t\t\t\t\t$context['post_error']['errors'][] = $txt['mc_warning_template_error_no_body'];\n\t\t\t\t}\n\n\t\t\t\t// Add in few replacements.\n\t\t\t\t/**\n\t\t\t\t * These are the defaults:\n\t\t\t\t * - {FORUMNAME} - Forum Name, the full name with all the bells\n\t\t\t\t * - {FORUMNAMESHORT} - Short and simple name\n\t\t\t\t * - {SCRIPTURL} - Web address of forum.\n\t\t\t\t * - {ERROR} - The error that was generated by the post, its unique to the post so can't render it here\n\t\t\t\t * - {SUBJECT} - The subject of the email that's being discussed, unique to the post so can't render it here\n\t\t\t\t * - {REGARDS} - Standard email sign-off.\n\t\t\t\t * - {EMAILREGARDS} - Maybe a bit more friendly sign-off.\n\t\t\t\t */\n\t\t\t\t$find = array(\n\t\t\t\t\t'{FORUMNAME}',\n\t\t\t\t\t'{FORUMNAMESHORT}',\n\t\t\t\t\t'{SCRIPTURL}',\n\t\t\t\t\t'{REGARDS}',\n\t\t\t\t\t'{EMAILREGARDS}',\n\t\t\t\t);\n\t\t\t\t$replace = array(\n\t\t\t\t\t$mbname,\n\t\t\t\t\t(!empty($modSettings['maillist_sitename']) ? $modSettings['maillist_sitename'] : $mbname),\n\t\t\t\t\t$scripturl,\n\t\t\t\t\treplaceBasicActionUrl($txt['regards_team']),\n\t\t\t\t\t(!empty($modSettings['maillist_sitename_regards']) ? $modSettings['maillist_sitename_regards'] : '')\n\t\t\t\t);\n\t\t\t\t$body = str_replace($find, $replace, $body);\n\t\t\t}\n\n\t\t\t// Deal with any BBC so it looks good for the preview\n\t\t\tif (!empty($this->_req->post->body))\n\t\t\t{\n\t\t\t\tpreparsecode($body);\n\t\t\t\t$bbc_parser = ParserWrapper::instance();\n\t\t\t\t$body = $bbc_parser->parseEmail($body);\n\t\t\t}\n\n\t\t\t$context['preview_message'] = $body;\n\t\t}\n\n\t\t$context['sub_template'] = 'generic_preview';\n\t}", "function affiche_form_edition_post($content,$idPost)\r\n{\r\n\tif(isset($_SESSION['id']))\r\n\t{\r\n\t\tif(isadmin($_SESSION['id']))\r\n\t\t{\r\n\t\t\techo \"<form name='edit_post' action='controller/actions.php' method='post'>\";\r\n\t\t\t\techo \"<textarea name='article' cols='50' row='30'>\";\r\n\t\t\t\tforeach ($content as $key => $value) {\r\n\t\t\t\t\techo $value;\r\n\t\t\t\t}\r\n\t\t\t\techo \"</textarea></br>\";\r\n\t\t\t\techo \"<input name='id_post' type='hidden' value='\".$idPost.\"'/>\";\r\n\t\t\t\techo \"<input name='action' value='Editer post' type='submit'/>\";\r\n\t\t\t\techo \"<input type='hidden' name='url' value='?page=article&POST_ID=\".$idPost.\"'/>\";\r\n\t\t\techo \"</form>\";\r\n\t\t}\r\n\t}\r\n}", "function contactAdmin()\n\t\t{\n\t\t\t$this->obTemplate->clear_cache('member/ihtml/contact-admin.html');\n\t\t\t$this->obTemplate->assign('Content', $this->obTemplate->fetch('member/ihtml/contact-admin.html'));\n\t\t\t$this->parse();\n\t\t}", "public function transformContent() {\n /* @var $cM ConnectionManager */\n $cM = $this->getServiceObject(ConnectionManager::class);\n $conn = $cM->getConnection('Forum');\n\n // get configuration from the registry\n $forumBaseURL = Registry::retrieve('DOCS', 'ForumBaseURL');\n\n $select = 'SELECT\n `topic_id`,\n `topic_title`,\n `topic_time`,\n `topic_first_poster_name`,\n `topic_last_post_time`\n FROM `de_phpbb3_topics`\n WHERE `forum_id` = \\'6\\'\n ORDER BY topic_last_post_time DESC;';\n $result = $conn->executeTextStatement($select);\n\n // get template and pre-fill it\n $template = $this->getTemplate('PostsForum');\n $templateAuthorLabel = $this->getTemplate('Author_' . $this->language);\n $templateCreationDateLabel = $this->getTemplate('CreationDate_' . $this->language);\n $template->setPlaceHolder('AuthorLabel', $templateAuthorLabel->transformTemplate());\n $template->setPlaceHolder('CreationDateLabel', $templateCreationDateLabel->transformTemplate());\n\n // create post list\n while ($data = $conn->fetchData($result)) {\n\n // fill template\n $template->setPlaceHolder('Link', $forumBaseURL . '/viewtopic.php?f=6&t=' . $data['topic_id']);\n $template->setPlaceHolder('LinkText', utf8_encode($data['topic_title']));\n $template->setPlaceHolder('Title', utf8_encode($data['topic_title']));\n\n $template->setPlaceHolder('CreationDate', utf8_encode(date('Y-m-d, H:i:s', $data['topic_time'])));\n $template->setPlaceHolder('Author', utf8_encode($data['topic_first_poster_name']));\n\n // add current post to list\n $this->setPlaceHolder('Entries', $template->transformTemplate(), true);\n\n }\n\n }", "public function autoContentCreator_admin_page()\n {\n // It also checks the value of the $_POST variable to see whether\n // there has been a form submission.\n\n // The check_admin_referer is a WordPress function that does some security\n // checking and is recommended good practice.\n\n // General check for user permissions.\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient privilege to access this page.'));\n }\n\n // Start building the page\n\n echo '<div class=\"wrap\">';\n\n echo '<h2>Generate Content</h2>';\n\n // Check whether the button has been pressed AND also check the nonce\n if (isset($_POST['autoContentCreator']) && check_admin_referer('autoContentCreator_clicked')) {\n // the button has been pressed AND we've passed the security check\n SinglePostContent::main(null);\n echo 'Done!';\n }\n\n echo '<form action=\"options-general.php?page=autoContentCreator-slug\" method=\"post\">';\n\n // this is a WordPress security feature - see: https://codex.wordpress.org/WordPress_Nonces\n wp_nonce_field('autoContentCreator_clicked');\n echo '<input type=\"hidden\" value=\"true\" name=\"autoContentCreator\" />';\n submit_button('Generate Computer Hardware Content Templates');\n echo '</form>';\n\n echo '</div>';\n\n }", "function get_form_email() {\n\tglobal $post;\n\techo psa_get_template_part( 'partials/form', 'email' );\n\texit;\n}", "function SednBackManagerTaskMailContent($ManagerMember, $Department, $FormName, $TaskTitle, $AssignMember)\n\t{\n\t\t$datetime = date(\"Y/m/d H:m:s\", strtotime('+8HOUR'));\n\n\t\t$content = <<<EOT\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Portwell KM - Notification by E-Mail</title>\n<style type=\"text/css\">\n<!--\nbody p {\n\tfont-size: 18px;\n}\n-->\n</style>\n</head>\n<body>\n<p>\nDear $ManagerMember,\n</p>\n\n<p>\n感謝您使用Portwell KM系統!\n</p>\n\n<p>\n您之前在 <font color=\"#0000ff\"><b>$Department</b></font> -> <font color=\"#0000ff\"><b>$FormName</b></font> 表單中,委託指派給 <font color=\"#0000ff\"><b>$AssignMember</b></font> 協助處理標題為 <font color=\"#0000ff\"><b>$TaskTitle</b></font> 的工作。\n<br>\n在剛剛已經成功將工作退還給 <font color=\"#0000ff\"><b>$AssignMember</b></font> 了,要求重新針對工作進行處理/測試!\n</p>\n\n<p>\n請您隨時留意您的信箱,一旦該工作有新進度時,系統會自動發信通知您!\n</p>\n\n<p>\n最後,\n<br>\n感謝您的使用與支持~\n</p>\n\n<p>\nBest Regards,\n<br>\n<a href='http://sickm.portwell.com.tw/'>Portwell KM System</a>\n<br>\n$datetime\n</p>\n</body>\n</html>\nEOT;\n\n\t\treturn $content;\n\t}", "function create_POST_backend($cp_id, $prefix, $soft_action_name, $accepted_users = 'all', $fields, $options = array()) {\n\n $validation = new Ccn_Validator();\n $action_name = $prefix.'_'.$soft_action_name;\n //$html_email_models_dir = CCN_LIBRARY_PLUGIN_DIR . '/email_models'; // TODO delete this (moved in send_email.php)\n\n $default_options = array(\n 'post_status' => 'private', // any valid post_status is ok but useful values are 'publish' to make the post available to any one and 'private' to make it hidden (for example for subscriptions)\n 'send_email' => [], // (no email sent by default) array of arrays with elements like array('addresses' => array('coco@example.com'), 'subject' => 'id_of_subject_field', 'model' => 'path_to_html_email_model', 'model_args' => array('title' => 'Merci de nous contacter'))\n 'send_to_user' => '', // if the email should be sent to the email address of the user, write here the id of the user email field\n 'create_post' => true, // créer ou non un nouveau post de type $cp_id (normalement c'est oui, sauf pour les formulaire de contact par ex)\n 'computed_fields' => [], // associative array(meta_key => function($_POST)) that creates new fields for the new post\n 'custom_validations' => [], // associative array(meta_key => function($fields, $sanitized, $existing_posts)) that does additional checks on step 2., before posting anything\n\t\t'on_before_save_post' => '', // fonction custom, or list of custom functions executed just before saving a post\n 'on_finish' => '', // fonction custom, exécutée juste avant de renvoyer la réponse du serveur\n 'steps' => [], // the steps of the corresponding html form (useful if there some condition showing/hiding fields in some cases)\n );\n $options = array_merge($default_options, $options);\n \n $fields = fields\\prepare_fields($fields);\n\n $backend_callback = function() use ($cp_id, $fields, $validation, $options) {\n $log_stack_location = 'create-cp-rest-backend.php > create_POST_backend > $backend_callback'; // this is the string included in the logs to indicate where the error came from\n $final_response = array('success' => true); // le json final qui sera renvoyé\n\n //log\\info('POST DATA', $_POST); // uncomment this to see in info logs what data comes from the client\n\n // == 1.a == sanitize the inputs\n $sanitized = array();\n $meta_keys = array();\n $i=0;\n foreach ($fields as $f) {\n // case of REPEAT-GROUP\n if ($f['type'] == 'REPEAT-GROUP') {\n\n // TODO : add field validation also for repeat groups\n\n $group_id = $f['id'];\n $new = array();\n $field_ids_html = lib\\array_flatten(array_map(function($el_field) {return fields\\get_field_ids($el_field, true);}, $f['fields']));\n\n $group_post_values = lib\\extract_fields($_POST, $field_ids_html);\n $new = lib\\array_swap_chaussette($group_post_values);\n\n // on enlève les éléments de $new qui ont un champs requis qui est vide\n $mandatory_fields = get_required_fields($f);\n $new = array_filter($new, function($el) use ($mandatory_fields) {\n $el_required = lib\\extract_fields($el, $mandatory_fields);\n return count(array_filter($el_required, function($v) {return $v == '';})) == 0;\n });\n\n $sanitized[$f['id']] = json_encode($new);\n\n // all other cases\n } else {\n $f_ids = fields\\get_field_ids($f);\n $a_priori_required = (!isset($f['required']) || $f['required']);\n log\\info('REQUIRED?', $f['id'].' :: '.$a_priori_required.' == '.json_encode(fields\\field_is_required($f['id'], $a_priori_required, $options['steps'], $_POST)));\n $not_required = (!empty($options['steps'])) ? !fields\\field_is_required($f['id'], $a_priori_required, $options['steps'], $_POST) : !$a_priori_required;\n\n foreach($f_ids as $f_id) {\n if (isset($_POST[$f_id])) {\n $res = $validation->isValidField($_POST[$f_id], $f); // TODO compléter la validation avec le field regex_pattern etc\n $res['valid'] = $res['valid'] || ($not_required && empty($_POST[$f_id]));\n if (!$res['valid']) {echo json_encode(array(\"success\" => false, \"errno\" => $res['reason'], 'descr' => 'Invalid field '.$f_id.' : '. $res['descr'])); die();}\n $sanitized[$f_id] = $_POST[$f_id];\n }\n }\n $i++;\n }\n }\n // == 1.b == add computed fields\n if (!empty($options['computed_fields'])) {\n foreach ($options['computed_fields'] as $key => $fun) {\n if (is_callable($fun)) {\n try {\n $sanitized[$key] = $fun($sanitized);\n } catch(Exception $e) {\n log\\error('CUSTOM_FUNCTION_FAILED', 'In '.$log_stack_location.' computed_field custom function failed for key='.$key.' and post_values='.json_encode($sanitized));\n echo json_encode(array('success' => false, 'errno' => 'CUSTOM_FUNCTION_FAILED', 'descr' => 'computed_field custom function failed for key='.$key));\n die();\n }\n } else {\n log\\error('INVALID_CUSTOM_FUNCTION', 'In '.$log_stack_location.' custom function for key '.$key.' is not callable');\n }\n }\n }\n\n\n //log\\info('sanitized', $sanitized); // uncomment this to log the $sanitized $_POST values sent by the client\n \n if (post_type_exists($cp_id)) {\n \n // == 2. == we verify that the unique fields are indeed unique\n // TODO check \"nonces\" too !!!\n // on récupère tous les posts de type $cp_id\n $liste_cposts = query_posts(array('post_type' => $cp_id));\n // we load all custom fields for each cpost\n $liste_cposts_customfields = array_map(function($post) {return get_post_meta($post->ID, '', true);}, $liste_cposts);\n \n // == 2.a == we check that unique fields are indeed unique\n // TODO frst filter $posts where isset($post[$f['id]])\n foreach($fields as $f) {\n if (isset($f['unique']) && $f['unique']) {\n $customfields_vals = array_map(function($post) use ($f) {return $post[$f['id']][0];}, $liste_cposts_customfields);\n if (in_array($sanitized[$f['id']], $customfields_vals)) {\n log\\error('DUPLICATE_POST_KEY', 'In '.$log_stack_location.' Une ressource avec l\\'attribut '.$f['id'].'='.$sanitized[$f['id']].' existe déjà');\n echo json_encode(array('success' => false, 'errno' => 'DUPLICATE_POST_KEY', 'descr' => 'Une ressource avec l\\'attribut '.$f['id'].'='.$sanitized[$f['id']].' existe déjà'));\n die();\n }\n }\n }\n\n // == 2.b == we check additional custom validations\n foreach ($options['custom_validations'] as $fun_name => $custom_validation_fun) {\n if (is_callable($custom_validation_fun)) {\n \n // we try to execute the custom validation function\n $res = false;\n try {\n $res = $custom_validation_fun($fields, $sanitized, $liste_cposts_customfields);\n } catch (Exception $e) {\n log\\error('CUSTOM_VALIDATION_FUNCTION_FAILED', 'In '.$log_stack_location.' for custom_validation_function \"'.$fun_name.'\"');\n echo json_encode(array('success' => false, 'errno' => 'CUSTOM_VALIDATION_FUNCTION_FAILED', 'descr' => 'custom_validation_function failed name='.$fun_name));\n die();\n }\n\n // we analyze the custom_validation result\n if ($res !== true && (!isset($res['success']) || $res['success'] !== true)) {\n $o = ['success' => false, 'errno' => 'CUSTOM_VALIDATION_ERROR', 'descr' => 'an error happened during custom validaton of post data'];\n echo json_encode(array_merge($o, $res));\n die();\n }\n } else {\n log\\error('INVALID_CUSTOM_FUNCTION', 'In '.$log_stack_location.' : function \"'.$fun_name.'\" (type='.gettype($custom_validation_fun).') in custom_validations functions is not callable');\n }\n }\n\n // == 3. == on crée un post\n if ($options['create_post']) {\n\n // we compute the reference id\n $ref_field = lib\\array_find_by_key($fields, 'type', 'reference');\n if ($ref_field === false) {\n log\\error('MISSING_REFERENCE_FIELD', 'In '.$log_stack_location.'');\n } else {\n $new_reference = fields\\create_new_reference($cp_id, $liste_cposts_customfields, $ref_field['id']); \n \n if ($new_reference === false) {\n log\\error('REFERENCE_STRING_GEN_FAILED', 'In '.$log_stack_location.' cp_id='.$cp_id.' ref_id_key='.$ref_field['id']);\n echo json_encode(['success' => false, 'errno' => 'REFERENCE_STRING_GEN_FAILED', 'descr' => 'Impossible to generate a reference for this custom post type '.$cp_id]);\n die();\n } \n $sanitized[$ref_field['id']] = $new_reference;\n }\n\n log\\info('reference created');\n\t\t\t\t\n // we execute all the on_before_save_post functions\n if (!empty($options['on_before_save_post'])) {\n if (!is_array($options['on_before_save_post'])) $options['on_before_save_post'] = array($options['on_before_save_post']);\n foreach ($options['on_before_save_post'] as $fun) {\n\n $final_response['on_before_save_post'] = array();\n \n if (function_exists($fun)){\n $res = $fun($sanitized, $liste_cposts_customfields);\n $final_response['on_before_save_post'][] = $res;\n if (!isset($res) || !isset($res['success']) || $res['success'] !== true) {\n $final_response['success'] = false;\n if (isset($res['errno'])) $final_reponse['errno'] = $res['errno'];\n\t\t\t\t\t\t\t\tif (isset($res['descr'])) $final_reponse['descr'] = $res['descr'];\n echo json_encode($final_response);\n die();\n }\n }\n\n }\n }\n\t\t\t\t\n $args = array(\n 'post_type' => $cp_id,\n 'meta_input' => $sanitized\n );\n $args['post_title'] = (isset($sanitized['post_title'])) ? $sanitized['post_title'] : 'undefined';\n $args['post_status'] = (isset($sanitized['post_status']) && $validation->isValidPostStatus($sanitized['post_status'])['valid']) ? $sanitized['post_status'] : $options['post_status'];\n $res = 0;\n //log\\info('POST ARGS', $args);\n try {\n $res = wp_insert_post($args);\n } catch(Exception $e) {\n log\\error('WP_INSERTION_FAILED_BRUTALLY', 'In '.$log_stack_location.' function wp_insert_post failed brutally. Message = '.$e->getMessage().'. With following argument : '.json_encode($args));\n echo json_encode(array('success' => false, 'error' => 'POST_INSERTION_FAILED', 'descr' => 'Post insertion failed brutally (wp_insert_post), returned message : '.$e->getMessage()));\n die();\n }\n \n if ($res == 0) {\n log\\error('WP_POST_INSERTION_FAILED', 'in '.$log_stack_location.' : post insertion failed '.$json_encode($res));\n echo json_encode(\n array_merge($final_reponse,\n array('success' => false, 'errno' => 'POST_CREATION_FAILED', 'descr' => 'Impossible de créer un post de type '.$cp_id.' avec les paramètres fournis :(')\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n die();\n } else {\n $final_response = array_merge($final_response, array('success' => true, 'id' => $res, 'create_post' => true, 'email' => false));\n }\n }\n } else if (isset($options['create_post']) && $options['create_post']) {\n log\\error('UNKNOWN_POST_TYPE', 'in '.$log_stack_location.' : post type '.$cp_id.' does not exist');\n $final_reponse = array_merge($final_reponse, array('success' => false, 'errno' => 'UNKNOWN_POST_TYPE', 'descr' => 'post type '.$cp_id.' does not exist'));\n echo json_encode($final_response); die();\n }\n\n if (count($options['send_email']) > 0) {\n\n // == 4. == on envoie un email\n $final_response['email'] = array();\n\n // we add additional {...}__pretty attributes to $sanitized for dropdown and radio elements\n $pretty_mapper = array_map(function($f) {\n if (($f['type'] == 'radio' || $f['type'] == 'dropdown') && isset($f['options'])) {\n return $f['options'];\n }\n return array();\n }, $fields);\n $pretty_mapper = lib\\array_flatten($pretty_mapper);\n foreach ($sanitized as $key => $val) if (gettype($val) == 'string' && isset($pretty_mapper[$val])) $sanitized[$key.\"__pretty\"] = $pretty_mapper[$val];\n\n foreach ($options['send_email'] as $email_obj) {\n // we send the email\n $send_result = email\\send( \n $data = $sanitized, \n $to_addresses = $email_obj['addresses'], \n $subject = $email_obj['subject'],\n $model = $email_obj['model'],\n $model_args = $email_obj['model_args'],\n $options = array('computed_data' => $email_obj['computed_data'])\n );\n\n $final_response['success'] = $send_result['success'];\n array_push($final_response['email'], $send_result);\n }\n }\n\t\t\n\t\t// == 5. == we execute a custom function if defined in options\n\t\tif (isset($options[\"on_finish\"]) && function_exists($options[\"on_finish\"])) {\n\t\t\t$res = $options[\"on_finish\"]($sanitized);\n\t\t\t$final_response['on_finish'] = $res;\n\t\t\tif (!isset($res) || !isset($res['success']) || $res['success'] !== true) {\n\t\t\t\t$final_response['success'] = false;\n\t\t\t\techo json_encode($final_response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n echo json_encode($final_response);\n die();\n };\n\n add_action('wp_ajax_'.$action_name, $backend_callback ); // for logged-in users\n if ($accepted_users == 'all') add_action('wp_ajax_nopriv_'.$action_name, $backend_callback ); // for non-logged-in users\n}", "private function sendEmails()\n {\n // get emails of administrators\n $adminEmails = array();\n $this->model->action('user','getUsers',\n array('result' => & $adminEmails,\n 'role' => array('=',20),\n 'status' => array('=',2),\n 'fields' => array('email') )); \n\n $adminBody = 'Hi,<br>A new comment was added to the following article:'; \n $adminBody .= '<a href=\"'.$this->config['site_url'].'?id_article='.$this->tplVar['article']['id_article'].'\">'.$this->tplVar['article']['title'].'</a>';\n \n if($this->config['article']['default_comment_status'] == 1)\n {\n $adminBody .= '<br><br>You have to validate new comments!'; \n }\n \n $this->model->action('common', 'sendMail',\n array('toEmail' => & $adminEmails,\n 'fromEmail' => '',\n 'subject' => 'New comment added',\n 'body' => (string)$adminBody)); \n \n }", "function display_cjm_mails () {\n /*\n * Les mails\n */\n global $wpdb;\n $res = $wpdb->get_results(\"select * from cjm_mail\");\n echo \"<h1>Les mails</h1>\";\n echo \"<p>NOM Prénom : <strong>%USERNAME%</strong></p>\";\n echo \"<p>Nom de l'événement : <strong>%evenement%</strong></p>\";\n echo \"<p>Nombre de place adulte : <strong>%nbplace%</strong></p>\";\n echo \"<p>Nombre de places enfants : <strong>%nbplace_enf%</strong></p>\";\n echo \"<p>Prix place enfant : <strong>%prix_place_enf%</strong></p>\";\n echo \"<p>Prix place adulte : <strong>%prix_place%</strong></p>\";\n echo \"<p>Prix total : <strong>%prix_total%</strong></p>\";\n foreach ($res as $key => $value) {\n $mail_message = stripslashes(stripslashes($value->content));\n $title = stripslashes(stripslashes($value->title));\n echo \"<form method='post' action='admin-post.php?action=save_email'>\";\n echo \"<input style='font-size: x-large;' type='text' name='post_title' size='50' value=\\\"\".$value->title.\"\\\" id='title\".$value->id.\"' placeholder='Titre'>\";\n wp_editor($mail_message,\"mail_content\".$value->id,array(\"wpautop\"=>false,\"dfw\"=>true));\n echo \"<input type=\\\"hidden\\\" name=\\\"id\\\" value='\".$value->id.\"'>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"save_email\\\">\";\n submit_button( 'Sauvegarder' ,'primary');\n echo \"</form>\";\n }\n}", "public function adminWebShowCretatePost()\n {\n\n $response = $this->get(route(BlogServiceProvider::NAMESPACE_PROYECT.'.admin.posts.create'));\n\n\n $response->assertResponseStatus(200);\n }", "public function notify_mods_on_post_submission(post_record $post)\n {\n /**\n * @var posts_repository $repository\n * @var module $current_module posts\n */\n global $config, $settings, $repository, $account, $current_module;\n \n $mem_ttl = 60*60;\n \n if( $account->level >= config::MODERATOR_USER_LEVEL ) return;\n if( $post->status == \"draft\" ) return;\n if( $post->creation_date > date(\"Y-m-d H:i:s\", strtotime(\"$post->creation_date + $mem_ttl seconds\")) ) return;\n \n $post_author = $post->get_author();\n $category = $this->categories_repository->get($post->main_category);\n \n $subject = replace_escaped_vars(\n $current_module->language->email_templates->post_submitted->subject,\n array(\n '{$website_name}',\n '{$post_author}',\n '{$post_title}',\n ),\n array(\n $settings->get(\"engine.website_name\"),\n $post_author->display_name,\n $post->title,\n )\n );\n \n $user_ip = get_user_ip(); $parts = explode(\".\", $user_ip); array_pop($parts);\n $segment = implode(\".\", $parts);\n $boundary = date(\"Y-m-d H:i:s\", strtotime(\"now - 7 days\"));\n $where = array(\n \"status = 'published'\",\n \"visibility = 'public'\",\n \"publishing_date >= '$boundary'\",\n \"creation_ip like '{$segment}.%'\",\n \"id_post <> '$post->id_post'\",\n );\n $other_posts_from_segment = $repository->find($where, 12, 0, \"publishing_date desc\");\n if( count($other_posts_from_segment) == 0 )\n {\n $other_posts_from_segment = \"<li>{$current_module->language->email_templates->post_submitted->none_found}</li>\";\n }\n else\n {\n $lis = \"\";\n foreach($other_posts_from_segment as $other_post)\n {\n $published = time_mini_string($other_post->publishing_date);\n $link = $other_post->get_permalink(true);\n $author_link = \"{$config->full_root_url}/user/{$other_post->author_user_name}\";\n $lis .= \"<li><a href='$author_link'>{$other_post->author_display_name}</a>\n [$published • {$other_post->creation_ip}]:\n <a href='{$link}'>{$other_post->title}</a></li>\";\n }\n $other_posts_from_segment = $lis;\n }\n \n $body = replace_escaped_vars(\n $current_module->language->email_templates->post_submitted->body,\n array(\n '{$post_author}',\n '{$main_category}',\n '{$post_link}',\n '{$post_title}',\n '{$excerpt}',\n '{$featured_image}',\n '{$ip}',\n '{$location}',\n '{$user_agent}',\n '{$other_posts_from_segment}',\n '{$post_url}',\n '{$edit_url}',\n '{$preferences}',\n '{$website_name}',\n ),\n array(\n \"<a href='{$config->full_root_url}/user/{$post_author->user_name}'>$post_author->display_name</a>\",\n \"<a href='{$config->full_root_url}/category/{$category->slug}'>{$category->title}</a>\",\n \"{$config->full_root_url}/{$post->id_post}\",\n $post->title,\n empty($post->excerpt) ? \"&mdash;\" : $post->excerpt,\n empty($post->featured_image_thumbnail)\n ? \"<p>{$current_module->language->email_templates->post_submitted->none_defined}</p>\"\n : \"<img height='200' border='1' src='{$config->full_root_url}{$post->featured_image_thumbnail}'>\",\n $user_ip,\n get_geoip_location_with_isp($user_ip),\n $_SERVER[\"HTTP_USER_AGENT\"],\n $other_posts_from_segment,\n \"{$config->full_root_url}/{$post->id_post}\",\n \"{$config->full_root_url}/posts/?edit_post={$post->id_post}&wasuuup=\" . md5(mt_rand(1, 65535)),\n \"{$config->full_root_url}/accounts/preferences.php\",\n $settings->get(\"engine.website_name\"),\n )\n );\n \n $body = unindent($body);\n broadcast_mail_to_moderators(\n $subject, $body, \"@posts:moderator_emails_for_posts\", array($post->id_author)\n );\n }", "public function create() {\n $this->data['mode'] = 'admin';\n $this->data['pagebody'] = 'admin/post-edit';\n $this->data['action'] = 'create';\n \n $this->data['id'] = '';\n $this->data['title'] = '';\n $this->data['description'] = '';\n $this->data['post'] = '';\n $this->data['images'] = array();\n \n $this->presentForm();\n $this->submit();\n $this->render();\n }", "public function build_notification( $post ) {\n $code = trim( $post->post_content );\n $code = str_ireplace( '&amp;', '&', $post->post_content );\n $code = strip_tags( $code );\n\n // Convert string to variables\n parse_str( $code ,$result);\n // version 1.3.6\n\n $type = isset($result['type']) ? $result['type']:'';\n $sender = isset($result['sender']) ? $result['sender']:'';\n $mjob_id = isset($result['mjob_id']) ? $result['mjob_id']:'';\n $post_id = isset($result['post_id']) ? $result['post_id']:'';\n $winner_id = isset($result['winner_id']) ? $result['winner_id']:''; \n $post_parent = isset($result['post_parent']) ? $result['post_parent']:'';\n $mjob_order_id = isset($result['mjob_order_id']) ? $result['mjob_order_id']:'';\n $amount = isset($result['amount']) ? $result['amount']:'';\n $review_id = isset($result['review_id']) ? $result['review_id']:'';\n $score = isset($result['score']) ? $result['score']:'';\n \n\n switch ( $type ) {\n case 'activated_user':\n $post->noti_content = __( 'Hooray! Your account has been activated. Now you can offer your stuff, buy things you need. Fast and easy!', 'enginethemes' );\n break;\n case 'approve_withdrawal':\n $post->noti_content = __( '<strong>Admin</strong> <span class=\"action-text\">approved</span> your withdrawal request.', 'enginethemes' );\n $post->noti_link = et_get_page_link( 'revenues' ) . '#withdraw-history';\n break;\n case 'decline_withdrawal':\n $post->noti_content = __( '<strong>Admin</strong> <span class=\"action-text\">rejected</span> your withdrawal request.', 'enginethemes' );\n $post->noti_link = et_get_page_link( 'revenues' ) . '#withdraw-history';\n break;\n case 'checkout_mjob_by_credit':\n $amount = mje_format_price( $amount );\n $post->noti_link = et_get_page_link( 'revenues' );\n $post->noti_content = sprintf( __( 'You\\'ve <span class=\"action-text\">spent</span> %s credit(s) on a mJob order. ', 'enginethemes' ), $amount );\n break;\n case 'new_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $post_id );\n $mjob = '<strong>' . get_the_title( $post_parent ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">ordered</span> your mJob %s.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'review_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_id ) . '#review-' . $review_id;\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $rating = '<span class=\"rate-it star\" data-score=\"' . $score . '\"></span>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">accepted</span> and put %s for your delivery of mJob %s.', 'enginethemes' ), $post->noti_sender, $rating, $mjob );\n break;\n case 'finish_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">accepted</span> your delivery for mJob %s', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'buyer_dispute_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text action-text-dispute\">disputed</span> your task for mJob %s', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'seller_dispute_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text action-text-dispute\">disputed</span> your order for mJob %s', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'resolve_mjob_order':\n global $user_ID;\n $mjob_order = mje_mjob_order_action()->get_mjob_order( $mjob_order_id );\n $post = $this->build_sender_info( $winner_id, $post );\n $post->noti_icon = '<i class=\"fa fa-info\"></i>';\n $post->noti_link = $mjob_order->permalink;\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n\n if( $winner_id == $user_ID ) {\n $winner_is = __( 'You are the winner.', 'enginethemes' );\n } else {\n $winner_is = sprintf( __( 'The winner is %s.', 'enginethemes' ), $post->noti_sender );\n }\n\n if( $mjob_order->seller_id == $user_ID ) {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">resolved</span> your disputed task for mJob %s. %s', 'enginethemes' ), $mjob, $winner_is );\n } else {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">resolved</span> your order for mJob %s. %s', 'enginethemes' ), $mjob, $winner_is );\n }\n break;\n case 'start_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s has <span class=\"action-text\">started</span> to work on your order for mJob %s.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'delay_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">delayed</span> your order for mJob %s.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'deliver_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">delivered</span> your order for mJob %s. Only one step to close the order, view your delivery and write a review for the seller.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'admin_delete_mjob_order':\n global $user_ID;\n $mjob_order = mje_mjob_order_action()->get_mjob_order( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">deleted</span> your order for mJob %s. Please contact admin for further details.', 'enginethemes' ), $mjob );\n if( $mjob_order->seller_id == $user_ID ) {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">deleted</span> your task for mJob %s. Please contact admin for further details.', 'enginethemes' ), $mjob );\n }\n break;\n case 'admin_restore_mjob_order':\n global $user_ID;\n $mjob_order = mje_mjob_order_action()->get_mjob_order( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_link = $mjob_order->permalink;\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">restored</span> your deleted order for mJob %s.', 'enginethemes'), $mjob );\n if( $mjob_order->seller_id == $user_ID ) {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">restored</span> your deleted task for mJob %s.', 'enginethemes'), $mjob );\n }\n break;\n case 'admin_pause_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">paused</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_archive_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">archived</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_approve_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">approved</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_reject_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">rejected</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_edit_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">edited</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_delete_mjob':\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">deleted</span> your mJob %s. Please contact admin for further details.', 'enginethemes' ), $mjob );\n break;\n case 'admin_restore_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">restored</span> your deleted mJob %s.', 'enginethemes' ), $mjob );\n break;\n default:\n $post->noti_content = \"\";\n\t\t\t /**\n\t\t\t\t * Add action in case other type notification\n\t\t\t\t *\n\t\t\t\t * @since 1.3.1\n\t\t\t\t * @author Tan Hoai\n\t\t\t\t */\n\n\t\t\t\tdo_action('mje_other_type_notification', $post);\n }\n\n /**\n * Filter for notification content.\n * hook into this filter to add another notification type\n *\n * @param object $post\n * @since 1.3\n * @author Tat Thien\n */\n return apply_filters( 'mje_build_notification', $post );\n }", "public function post(){\n\n $this->render('default/post'); \n //include(VIEWS.'default/post.php');\n }", "public function getContent()\n {\n Tools::redirectAdmin($this->getContainer()->get('router')->generate('training_admin_article'));\n\n Tools::redirectAdmin($this->context->link->getAdminLink(self::CONTROLLER_CONFIG));\n }", "function CreateTaskMailContent($ManagerMember, $Department, $FormName, $TaskTitle, $AssignMember)\n\t{\n\t\t$datetime = date(\"Y/m/d H:m:s\", strtotime('+8HOUR'));\n\n\t\t$content = <<<EOT\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Portwell KM - Notification by E-Mail</title>\n<style type=\"text/css\">\n<!--\nbody p {\n\tfont-size: 18px;\n}\n-->\n</style>\n</head>\n<body>\n<p>\nDear $ManagerMember,\n</p>\n\n<p>\n感謝您使用Portwell KM系統!\n</p>\n\n<p>\n您剛剛在 <font color=\"#0000ff\"><b>$Department</b></font> -> <font color=\"#0000ff\"><b>$FormName</b></font> 表單中,完成新增一筆標題為 <font color=\"#0000ff\"><b>$TaskTitle</b></font> 的工作。\n<br>\n並將該工作委託指派給 <font color=\"#0000ff\"><b>$AssignMember</b></font> 協助處理,我們已經發信通知 <font color=\"#0000ff\"><b>$AssignMember</b></font>,請求儘快進行工作的處理。\n</p>\n\n<p>\n請您隨時留意您的信箱,一旦該工作有新進度時,系統會自動發信通知您!\n</p>\n\n<p>\n最後,\n<br>\n感謝您的使用與支持~\n</p>\n\n<p>\nBest Regards,\n<br>\n<a href='http://sickm.portwell.com.tw/'>Portwell KM System</a>\n<br>\n$datetime\n</p>\n</body>\n</html>\nEOT;\n\n\t\treturn $content;\n\t}", "protected function _content_template() {\n\n }", "function gfwa_post_content( $instance ) {\n do_action( 'gfwa_post_content', $instance );\n}", "public function admin_create() {\n\t\t$this->_render['layout'] = 'admin';\n\n\t\t$document = Post::create();\n\t\t$rainbowThemes = Post::getRainbowThemes();\n\t\t$highlightThemes = Post::getHighlightThemes();\n\n\t\t// If data was passed, set some more data and save\n\t\tif ($this->request->data) {\n\t\t\t// CSRF\n\t\t\tif(!RequestToken::check($this->request)) {\n\t\t\t\tRequestToken::get(array('regenerate' => true));\n\t\t\t} else {\n\t\t\t\t$now = new MongoDate();\n\t\t\t\t$this->request->data['created'] = $now;\n\t\t\t\t$this->request->data['modified'] = $now;\n\n\t\t\t\t// If using the li3b_users plugin (or if $this->request->user is set by any user plugin), use that for the author id\n\t\t\t\t$this->request->data['_authorId'] = (isset($this->request->user['_id'])) ? $this->request->user['_id']:null;\n\t\t\t\t$this->request->data['_authorId'] = (isset($this->request->user['id'])) ? $this->request->user['id']:$this->request->data['_authorId'];\n\n\t\t\t\t// Set the pretty URL that gets used by a lot of front-end actions.\n\t\t\t\t$this->request->data['url'] = $this->_generateUrl();\n\t\t\t\t$this->request->data['draftHash'] = '_' . String::hash(String::uuid(), array('type' => 'md5'));\n\n\t\t\t\t// Save\n\t\t\t\tif($document->save($this->request->data)) {\n\t\t\t\t\tFlashMessage::write('The post has been created successfully.', 'default');\n\t\t\t\t\t$this->redirect(array('library' => 'blackprint', 'controller' => 'posts', 'action' => 'index', 'admin' => true));\n\t\t\t\t} else {\n\t\t\t\t\tFlashMessage::write('The post could not be created, please try again.', 'default');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set(compact('document', 'rainbowThemes', 'highlightThemes'));\n\t}", "public function getContent()\n {\n if (!Configuration::get('PS_SHOP_ENABLE')) {\n $this->context->controller->warnings[] = $this->l('Maintenance mode has been enabled. Note that you will not be able to do test payments as long as maintenance mode is enabled.');\n }\n\n $output = '';\n\n $this->postProcess();\n\n $this->context->smarty->assign([\n 'module_url' => $this->moduleUrl,\n 'tls_ok' => (int) Configuration::get(static::TLS_OK),\n 'id_webhook' => Configuration::get(static::WEBHOOK_ID),\n ]);\n\n $this->context->controller->addCSS($this->_path.'views/css/back.css', 'all');\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n\n $output .= $this->display(__FILE__, 'views/templates/admin/configure.tpl');\n $output .= $this->display(__FILE__, 'views/templates/admin/tlscheck.tpl');\n $output .= $this->display(__FILE__, 'views/templates/admin/webhookscheck.tpl');\n\n $output .= $this->renderMainForm();\n\n return $output;\n }", "public function create()\n {\n\n $activities = Activity::where('post_id', null)->orderBy('name', 'asc')->get();\n $message_info = null;\n\n if (env('APP_URL') == 'https://computerclassapp.herokuapp.com/') {\n $message_info_per = \"Uploaded images are deleted in every dyno restarts, you can upload your images in google drive or other cloud storage and paste the image url. \";\n } else {\n $message_info_per = null;\n }\n $variables = array(\n 'dashboard_content' => 'dashboards.admin.post.create',\n 'activities' => $activities,\n 'message_info_per' => $message_info_per\n );\n\n return view('layouts.admin')->with($variables);\n }", "public function adminForm()\r\n\t{\r\n\t\t$form['add_post'] = ipsRegistry::getClass('output')->formSimpleInput('item[add_post]', $this->itemSettings['add_post']);\r\n\t\treturn <<<EOF\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['tags_for_description']}</label>\r\n\t\t\t\t\t<div style='display: inline-block'>\r\n\t\t\t\t\t\t{post} = {$this->lang->words['post_add_tag']}\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t{$this->lang->words['tags_settable']}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>{$this->lang->words['how_many_post_add']}</label>\r\n\t\t\t\t\t{$form['add_post']}\r\n\t\t\t\t</li>\r\n\r\nEOF;\r\n\t}", "public function handler_wp_all_admin_notices()\n\t\t{\n\t\t\tglobal $post, $pagenow;\n\n\t\t\tif( ! $post instanceof WP_Post )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( 'classic' == $this->requested_editor() )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( ! in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$use_block = $this->can_use_block_editor( $post->post_type );\n\t\t\tif( ! $use_block )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$output = '';\n\n\t\t\t$post_content = '';\n\t\t\t$alb_content = Avia_Builder()->get_posts_alb_content( $post->ID );\n\n\t\t\tif( trim( $alb_content ) != '' )\n\t\t\t{\n\t\t\t\t$post_content = $alb_content;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$post_content = $post->post_content;\n\t\t\t}\n\n\n\t\t\tob_start();\n\n\t\t\twp_editor(\n\t\t\t\t\t$post_content,\n\t\t\t\t\t'content',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'_content_editor_dfw' => false,\n\t\t\t\t\t\t'drag_drop_upload' => true,\n\t\t\t\t\t\t'tabfocus_elements' => 'content-html,save-post',\n\t\t\t\t\t\t'editor_height' => 300,\n\t\t\t\t\t\t'tinymce' => array(\n\t\t\t\t\t\t\t'resize' => false,\n\t\t\t\t\t\t\t'wp_autoresize_on' => false,\n\t\t\t\t\t\t\t'add_unload_trigger' => false,\n\t\t\t\t\t\t\t'wp_keep_scroll_position' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t$editor = ob_get_clean();\n\n\t\t\t/**\n\t\t\t * Create a div which is outside Gutenberg div\n\t\t\t */\n\t\t\t$output .=\t'<div class=\"avia_temp_editor\" style=\"display: none;\">';\n\t\t\t$output .=\t\t'<div id=\"postdivrich_wrap\" class=\"\">';\n\t\t\t$output .=\t\t\t'<div id=\"postdivrich\" class=\"\">';\n\t\t\t$output .=\t\t\t\t$editor;\n\t\t\t$output .=\t\t\t'</div>';\n\t\t\t$output .=\t\t'</div>';\n\t\t\t$output .=\t'</div>';\n\n\t\t\techo $output;\n\n\t\t\treturn;\n\t\t}", "function promotion_post()\n { \n $promotion = new promotion();\n\n $promotion->date_created = date('Y-m-d H:i:s');\n $promotion->date_promoted = date('Y-m-d');\n $promotion->createdbypk = $this->get_user()->user_id;\n $promotion->date_modified = date('Y-m-d H:i:s');\n $promotion->modifiedbypk = $this->get_user()->user_id;\n // echo \"string\";\n // exit();\n \n $this->response($this->_promotion_save($promotion, 'post'));\n }", "function emailtemplate() {\n\n $sMode = $this->oInput->get('emailtemplate');\n switch($sMode) {\n case 'create':\n case 'edit':\n $this->etAddEdit($sMode);\n break;\n\n case 'delete':\n $this->etDelete();\n break;\n\n case 'view':\n $this->etView();\n break;\n\n case 'list':\n default:\n $this->etList();\n break;\n }\n\n }", "public static function build_post_content( $content_elements ) {\n\t\t$content = array();\n\t\tforeach ( $content_elements as $element ) {\n\t\t\t$content[] = self::get_content_element( $element, 'html', $element['type'] );\n\t\t}\n\t\treturn implode( \"\\n\\n\", $content );\n\t}", "public function generate()\r\n\t{\r\n\t\tadd_action ( \"admin_init\", array( &$this , \"w2p_generate\" ) );\r\n\t\tadd_action ( 'save_post', array( &$this , \"w2p_save_meta\" ) );\r\n\t}", "public function getNewsletterTemplateForPost()\n {\n $json = <<<JSON\n[\n {\n \"template_code\": \"jhjh\",\n \"template_sender_email\": \"juku@support.com\",\n \"template_sender_name\": \"jhjhh\",\n \"template_subject\": \"jhjh\",\n \"template_text\": \"<p>Follow this link to unsubscribe</p>\\r\\n<p>jkjkjj</p>\\r\\n<!-- This tag is for unsubscribe link -->\\r\\n<p><a href=\\\"{{var subscriber.getUnsubscriptionLink()}}\\\">{{var subscriber.getUnsubscriptionLink()}}</a></p>\",\n \"template_type\": \"2\"\n }\n]\nJSON;\n\n return $json;\n }", "function eoe_email_regarding_change($id, $post){\n\n $opts = wp_load_alloptions();\n\n $to = $opts[\"admin_email\"];\n $subject = \"{$opts['blogname']} - {$post->post_title}: has been edited recently\";\n $body = 'please see: <a href=\"' . $post->guid . '\">' . $post->guid . '</a>';\n $headers = array('Content-Type: text/html; charset=UTF-8');\n\n wp_mail( $to, $subject, $body, $headers );\n\n}", "protected function _content_template() {\n }", "function send_admin_email( $options, $post, $registration ){\n if($options['enable_admin_email']):\n $event = get_post($registration['eid']);\n\n // Get Event Meta Data.\n $event_id = $event->ID;\n $organizer = get_post_meta($event_id, 'sigma_event_organizer', true);\n\n $to = $options['admin_email'];\n $subject = 'Tok: ' . $registration['token'] .\n ' | St: ' . ucfirst($post['resultado']) . ' | ' .\n $registration['eid'];\n\n $message = '<h2>Name: ' . $registration['fname'] . ' ' . $registration['lname'] . '</h2>';\n $message .= '<h3>Registration Data: </h3>';\n $message .= '<pre>' . print_r($registration, true) . '</pre>';\n $message .= '<h3>IP Address: </h3>';\n $message .= $_SERVER['REMOTE_ADDR'];\n $message .= '<h3>POSTed Data: </h3>';\n $message .= '<pre>' . print_r($post, true) . '</pre>';\n $message .= '<img src=\"' . SIGMA_URL . 'assets/sigma-logo.png\" alt=\"sigma-logo\" >';\n\n $headers[] = 'From: ' . $options['send_name'] . ' <' . $options['send_email'] . '>';\n\n // Copy Developer?\n if($options['enable_dev_email'])\n $headers[] = 'Cc: Developer <' . $options['dev_email'] . '>';\n\n // Copy Organizer?\n if($options['enable_organizer_email'])\n $headers[] = 'Cc: ' . $organizer['name'] . ' <' . $organizer['mail'] . '>';\n\n $r = wp_mail($to, $subject, $message, $headers );\n return $r;\n endif;\n }", "public function createPost() {\n\n\t\treturn View::make('admin.create');\n\t\n\t}", "function SednBackEngineerTaskMailContent($ManagerMember, $Department, $FormName, $TaskTitle, $AssignMember)\n\t{\n\t\t$datetime = date(\"Y/m/d H:m:s\", strtotime('+8HOUR'));\n\n\t\t$content = <<<EOT\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Portwell KM - Notification by E-Mail</title>\n<style type=\"text/css\">\n<!--\nbody p {\n\tfont-size: 18px;\n}\n-->\n</style>\n</head>\n<body>\n<p>\nDear $AssignMember,\n</p>\n\n<p>\n您之前在 <font color=\"#0000ff\"><b>$Department</b></font> -> <font color=\"#0000ff\"><b>$FormName</b></font> 表單中,遞交給管理者 <font color=\"#0000ff\"><b>$ManagerMember</b></font> 確認標題為 <font color=\"#0000ff\"><b>$TaskTitle</b></font> 的工作。\n<br>\n在經過管理者確認後發現有錯誤。目前系統已將工作退還給您,請儘快登入到Portwell KM系統重新進行工作的處理/測試!\n</p>\n\n<p>\n<b><font color=\"#ff0000\">※ 提醒您,千萬別忘了到 My Job Management -> Waiting for Process Job (待處理工作) 頁面進行最後的確認!在確認無誤後,請點擊Submit按鈕將該工作送交給管理者請求進行確認!</font></b>\n</p>\n\n<p>\n最後,\n<br>\n感謝您的使用與支持~\n</p>\n\n<p>\nBest Regards,\n<br>\n<a href='http://sickm.portwell.com.tw/'>Portwell KM System</a>\n<br>\n$datetime\n</p>\n</body>\n</html>\nEOT;\n\n\t\treturn $content;\n\t}", "public function generatePost()\n {\n if (\\File::is($this->file_path.'post.txt')) {\n return \\File::getContent($this->file_path.'post.txt');\n }\n\n return null;\n }", "function wp_notify_mail($new_post_id)\n{\n\t // get email from custom field\n\t$emailto = get_option( 'admin_email' );\n $subject = 'New ' . get_the_title($new_post_id);\n // Email body\n $message = 'View it: ' . get_permalink($new_post_id ) . \"\\n Edit it: \" . get_edit_post_link( $new_post_id );\n\twp_mail( $emailto, $subject, $message );\n}", "public function postFormat()\n {\n return view('admin_dashboard.post.post-format');\n }", "public function onEmailGenerate(EmailSendEvent $event)\r\n {\r\n // Get content\r\n $content = $event->getContent();\r\n\t\t//substr($username, 0, strpos($username, '@'));\r\n\t\t//$shortCode = substr($content, 49, strpos($content, '}'));\r\n\r\n\t\t$startShortCode = strpos($content, '{feedman');\r\n\t\t$endShortCode= strpos($content, '}');\r\n\t\t$totalLengthShortCode = $endShortCode - $startShortCode;\r\n\t\t$orgFeedmanCode = substr($content, $startShortCode,$totalLengthShortCode+1);\r\n\t\t$feedmanCode = rtrim($orgFeedmanCode,'}');\r\n\r\n\t\t$feedIdArray = explode('=',$feedmanCode); \r\n\t\t\t$emailFeeds = array();\r\n if(count($feedIdArray) > 0 && isset($feedIdArray[1])){\r\n $feed_id = $feedIdArray[1];\r\n\t\t\t$feed = $this->em->find($feed_id,'FeedManBundle:Feed');\r\n\t\t\t$feeds = $this->em->getRepository('FeedManBundle:FeedData')->findBy( array('feed_id' => $feed->getId()));\r\n\r\n\t\t\t$feedType = $feed->getSendFeedType();\r\n\t\t\t$sendFeed = $feed->getSendFeed();\r\n\t\t\tswitch($feedType){\r\n\t\t\t\tcase 'sendall':\r\n\t\t\t\t\t$emailFeeds = $feeds;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'last_xx':\r\n\t\t\t\t\tfor($i=0; $i < $sendFeed; $i++){\r\n\t\t\t\t\t\t$emailFeeds[] = $feeds{$i};\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'selected':\r\n\t\t\t\t\t$selectedFeeds = explode(\",\",$sendFeed);\t\t\t\t\t\t\r\n\t\t\t\t\tforeach($feeds as $f){\r\n\t\t\t\t\t\tif(in_array($f->getId(),$selectedFeeds)){\r\n\t\t\t\t\t\t\t$emailFeeds[] = $f;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\r\n\t\t$msg = $this->getFeedHtml($emailFeeds);\r\n\t\t$content = str_replace($orgFeedmanCode,$msg,$content);\r\n // Set updated content\r\n $event->setContent($content);\r\n }", "public function run()\n {\n $content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';\n\n \\App\\About_content::create([\n 'image_background' => 'content-1.png',\n 'title_en' => 'As a Company',\n 'title_idn' => 'As a Company ID',\n 'content_en' => $content,\n 'content_idn' => $content . ' ID',\n 'sort' => 1,\n ]);\n\n \\App\\About_content::create([\n 'image_background' => 'content-2.png',\n 'title_en' => 'As a Friend of The Environment',\n 'title_idn' => 'As a Friend of The Environment ID',\n 'content_en' => $content,\n 'content_idn' => $content . ' ID',\n 'sort' => 2,\n ]);\n }", "public function getPostActionUrl()\n {\n return $this->getUrl('payout/index/createPost');\n }", "function MassMail($TemplateId){\r\n\t\t\r\n\t}", "public function outputForm()\n\t\t{\n\t\t\t// $configsList = $mPost->getConfigs();\n\t\t\t$this->content = $this->build($this->myPath('feedBackViews/feedBackForm'), []);\n\t\t}", "public function html_post($action_type = '', ...$extra_parameter)\r\n {\r\n $module_id_for_this_type = 114;\r\n if ($this->session->userdata('user_type') == 'Member' && !in_array($module_id_for_this_type,$this->module_access)) {\r\n redirect('404','refresh');\r\n }\r\n\r\n\r\n $html_post_handler = new Html_post_handler($this);\r\n\r\n if ($action_type == 'campaigns') {\r\n\r\n $this->campaigns_info('html');\r\n } else if ($action_type == 'create') {\r\n\r\n $html_post_handler->create();\r\n } else if ($action_type == 'add') {\r\n\r\n $this->ajax_check();\r\n $html_post_handler->add();\r\n } else if ($action_type == 'edit') {\r\n\r\n if (count($extra_parameter) > 0) {\r\n $html_post_handler->edit($extra_parameter[0]);\r\n } else {\r\n\r\n $this->ajax_check();\r\n $html_post_handler->edit_action();\r\n }\r\n } else if ($action_type == 'clone') {\r\n\r\n if (count($extra_parameter) > 0) {\r\n $html_post_handler->clone_campaign($extra_parameter[0]);\r\n } else {\r\n\r\n $this->ajax_check();\r\n $html_post_handler->add();\r\n }\r\n } else if ($action_type == 'report') {\r\n\r\n if (count($extra_parameter) > 0) {\r\n $this->campaign_report($extra_parameter[0]);\r\n } else {\r\n redirect(base_url('404'),'refresh');\r\n }\r\n }\r\n }", "public function getContent()\n {\n $displayNotification = '';\n if (((bool)Tools::isSubmit('submitLkCustomerProConf')) == true || Tools::getIsset('id_lk_customer')) {\n $displayNotification = $this->postProcess();\n }\n return $displayNotification . $this->renderForm();\n }", "public function run()\n {\n $locale='gb';\n $email = new \\App\\Models\\MailTemplates(['slug' => 'confirm_email','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'please confirm';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'reset_password','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'Reset password';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'forgot_password','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'Forgot password';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'ticket','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'New Ticket';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'order_is_submitted','from'=>'hr@hook.am','module'=>'orders']);\n $email->save();\n $email->translateOrNew($locale)->subject = '';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'order_is_canceled','from'=>'hr@hook.am','module'=>'orders']);\n $email->save();\n $email->translateOrNew($locale)->subject = '';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'order_is_completely_collected','from'=>'hr@hook.am','module'=>'orders']);\n $email->save();\n $email->translateOrNew($locale)->subject = '';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'order_is_completed','from'=>'hr@hook.am','module'=>'orders']);\n $email->save();\n $email->translateOrNew($locale)->subject = '';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'verify_id','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'Verify ID';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'reject_verify_id','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'Reject Verification ID';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'approve_verify_id','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'Approve Verification ID';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'new_referral','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'You have new referral';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'referral_bonus_claim','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'You can claim your bonus';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'referral_bonus','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'Bonus from your referral';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n\n $email = new \\App\\Models\\MailTemplates(['slug' => 'new_contact_us','from'=>'hr@hook.am']);\n $email->save();\n $email->translateOrNew($locale)->subject = 'New contact us message';\n $email->translateOrNew($locale)->content = '';\n $email->save();\n }", "public function run()\n {\n Post::create([\n 'content' => Lorem::paragraph(),\n 'author' => 1,\n 'topic_id' => 4,\n 'post_attachable_id' => 1,\n 'post_attachable_type' => 'App\\Event'\n ]);\n\n Post::create([\n 'content' => Lorem::paragraph(),\n 'author' => 1,\n 'topic_id' => 3,\n 'post_attachable_id' => 2,\n 'post_attachable_type' => 'App\\Event'\n ]);\n\n Post::create([\n 'content' => Lorem::paragraph(),\n 'author' => 1,\n 'topic_id' => 3,\n 'post_attachable_id' => 3,\n 'post_attachable_type' => 'App\\Event'\n ]);\n\n Post::create([\n 'content' => Lorem::paragraph(),\n 'author' => 1,\n 'topic_id' => 1,\n 'post_attachable_id' => 1,\n 'post_attachable_type' => 'App\\Event'\n ]);\n\n Post::create([\n 'content' => Lorem::paragraph(),\n 'author' => 1,\n 'topic_id' => 2,\n 'post_attachable_id' => 2,\n 'post_attachable_type' => 'App\\Event'\n ]);\n }", "public function getPost()\n\t\t{\n\t\t\treturn apply_filters( 'chef_sections_template_post_getter', get_post( $this->object->post_id ) );\n\t\t}", "public function bulkPostUpload()\n {\n checkPermission('add_post');\n $data['title'] = trans(\"bulk_post_upload\");\n \n echo view('admin/includes/_header', $data);\n echo view('admin/post/bulk_post_upload', $data);\n echo view('admin/includes/_footer');\n }", "public function run()\n {\n $data = [\n ['Title A','Body body body A',],\n ['Title B','Body body body B',],\n ['Title C','Body body body C',],\n ['Title D','Body body body D',],\n ['Title E','Body body body E',],\n\n ];\n\n foreach ($data as $items) {\n $post = new POST([\n 'title' => $items[0],\n 'body' => $items[1],\n ]);\n $post->save();\n }\n\n }", "function column_email( $item ) {\n\t\t$email = get_post( $item['ID'] );\n\t\t$status = strtolower ( $item [ 'status' ] );\n\t\t$view\t = $status == 'draft' ? 'edit_pup_email' : 'view_pup_email';\n\t\t$emailname = !empty( $email->post_title ) ? $email->post_title : __( '(no title)', 'edd-pup' );\n\t\t$baseurl\t = admin_url( 'edit.php?post_type=download&page=edd-prod-updates' );\n\t\t$row_actions = array();\n\t\t\t\t\n\t\tif ( $status == 'draft' ) {\n\t\t\t$row_actions['edit'] = '<a href=\"' . add_query_arg( array( 'view' => $view, 'id' => $email->ID, 'edd_pup_notice' => false ), $baseurl ) . '\">' . __( 'Edit', 'edd-pup' ) . '</a>';\n\t\t} else {\n\t\t\t$row_actions['edit'] = '<a href=\"' . add_query_arg( array( 'view' => $view, 'id' => $email->ID, 'edd_pup_notice' => false), $baseurl ) . '\">' . __( 'View', 'edd-pup' ) . '</a>';\n\t\t}\n\n\t\tif ( $status == 'pending' && edd_pup_is_processing( $item['ID'] ) == false ) {\n\t\t\t$row_actions['send'] = '<a href=\"javascript:void(0);\" class=\"edd-pup-queue-button\" data-action=\"edd_pup_send_queue\" data-email=\"'. $email->ID .'\" data-url=\"'.add_query_arg( array( 'view' => 'send_pup_ajax', 'id' => $email->ID, 'restart' => 1 ), $baseurl ).'\">' . __( 'Send Remaining', 'edd-pup' ) . '</a>';\n\t\t\t$row_actions['clear'] = '<a href=\"javascript:void(0);\" class=\"edd-pup-queue-button\" data-action=\"edd_pup_clear_queue\" data-email=\"'. $email->ID .'\" data-nonce=\"'.wp_create_nonce( 'clear-queue-' . $email->ID ).'\" >' . __( 'Clear from Queue', 'edd-pup' ) . '</a>';\t\t\t\n\t\t}\n\t\t\n\t\t$row_actions['duplicate'] = '<a href=\"' . wp_nonce_url( add_query_arg( array( 'edd_action' => 'pup_duplicate_email', 'id' => $email->ID ), $baseurl ), 'edd-pup-duplicate-nonce' ) . '\">' . __( 'Duplicate', 'edd-pup' ) . '</a>';\n\t\n\t\t$row_actions['delete'] = '<a href=\"' . wp_nonce_url( add_query_arg( array( 'edd_action' => 'pup_delete_email', 'id' => $email->ID ), $baseurl ), 'edd-pup-delete-nonce' ) . '\" onclick=\"var result=confirm(\\''. __( 'Are you sure you want to permanently delete this email?', 'edd-pup' ).'\\');return result;\">' . __( 'Delete', 'edd-pup' ) . '</a>';\n\n\t\t$row_actions = apply_filters( 'edd_pup_row_actions', $row_actions, $email );\n\n\t\treturn '<strong><a class=\"row-title\" href=\"' . add_query_arg( array( 'view' => $view, 'id' => $email->ID, 'edd_pup_notice' => false ), $baseurl ) . '\">' . $emailname . '</a></strong>' . $this->row_actions( $row_actions );\n\t}", "public function index()\n {\n\n $posts = Post::orderBy('created_at', 'desc')->get();\n $post_list = null;\n foreach ($posts as $post) {\n $activity_list = array();\n foreach ($post->Activities as $activity) {\n $activity_list[] = \"\".$activity->name.\" \".$activity->SectionTo->name.\" • \";\n }\n\n $post_list[] = (object) array(\n 'id' => $post->id,\n 'title' => $post->title,\n 'draft' => $post->draft,\n 'body' => $post->body,\n 'created_at' => date(\"M d Y\", strtotime($post->created_at)),\n 'activity_list' => $activity_list\n );\n }\n\n $variables = array(\n 'dashboard_content' => 'dashboards.admin.post.index',\n 'posts' => $posts,\n 'post_list' => $post_list\n );\n\n return view('layouts.admin')->with($variables);\n }", "public function createContent() {\n\n // Loop through the content and try to create new entries.\n foreach ($this->groups as $uuid => $group_data) {\n\n /// skip if item is not enabled\n if($group_data['status'] === false) {\n continue;\n }\n\n $user = user_load_by_mail($group_data['user']);\n\n $this->createGroup($uuid, $group_data, $user);\n\n }\n }", "function format_to_post($content)\n{\n}", "function addPost() {\n\t\t$post = new post;\n\t\t$postData = $post->fetchArray();\n\t\t$postData['gameTitle'] = '';\n\t\t$postData['gameTitleURL'] = '';\n\t\t$controller = new postsController;\n\t\t$template = new template;\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Posts Admin');\n\t\t$template->assignClean('post', $postData);\n\t\t$template->assignClean('postTypes', postsController::getPostTypes());\n\t\t$template->assignClean('sources', postsController::$supportedSources);\n\t\t$template->assignClean('statusOptions', $controller->getOptions('status'));\n\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t$template->assignClean('mode', 'add');\n\t\t$template->assignClean('admin', adminCore::getAdminUser());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('admin/postEdit.htm');\n\t}", "function construct_posts() {\n $html = \"\";\n // gets all users posts from db\n $posts = $this->model->get_users_posts();\n\n if (empty($posts)) {\n $html = \"Zatím jste nenapsal žadný příspěvek!\";\n }\n\n $html .= \"\\n<table class='table table-striped'>\\n<tbody>\\n\";\n /*\n * state 0 = just submitted - waiting for reviewer assignments\n * state 1 = waiting for reviews\n * state 2 = waiting for decision\n * state 3 = accepted/denied\n */\n foreach ($posts as $item){\n $html .= \"<tr>\n <td><a href='read_my_post/\".$item['title'].\"'>\".$item['title'].\"</a></td>\";\n\n switch ($item['state']) {\n case 0: $html .= \"<td>Čekám na přiřazení recenzentů</td>\"; break;\n case 1: $html .= \"<td>Čekám na recenze</td>\"; break;\n case 2: $html .= \"<td>Čekám na adminovo rozhodnutí</td>\"; break;\n case 3: if ($item['published'] == 1) {\n $html .= \"<td>Publikován</td>\";\n break;\n } else {\n $html .= \"<td>Zamítnut</td>\";\n break;\n }\n }\n $html .= \"</tr>\\n\";\n }\n $html .= \"</tbody>\\n</table>\\n\";\n\n return $html;\n }", "public function accueilAdmin()\n {\n $posts = $this->postManager()->getListPosts();\n for($i = 0; $i < count($posts); $i++)\n {\n $nbrComments[$i] = $this->commentManager()->getNbrComments($posts[$i]->id()); // Nombre de commentaire de chaque article\n $posts[$i]->setContent($this->cutText($posts[$i]->content(), 140)); \n $posts[$i]->setTitle(ucfirst($posts[$i]->title()));\n }\n $nbrCommentAlert = count($this->commentManager()->getListCommentsAlert()); // Nombre de commentaire signalé\n $view = new View('admin');\n $view->generate(array(\n 'posts' => $posts,\n 'nbrComments' => $nbrComments,\n 'nbrCommentAlert' => $nbrCommentAlert\n ));\n }", "function EmailTemplate_post()\r\n {\r\n \t$id = $this->post('tempId');\r\n\t\t$data['E_TEMP_NAME']=$this->post('name');\r\n\t\t$data['E_TEMP_SUBJECT']=$this->post('subject');\r\n\t\t$data['E_TEMP_BODY']=$this->post('body');\r\n\t\t$data['E_TEMP_USER_ID']=$this->post('userId');\r\n\t\tif($id==NULL){\r\n\t\t\t$result=$this->emailtemplatemodel->addEmailTemplate($data);\r\n\t\t\tif(!empty($result)){\r\n\t\t\t\t$this->set_response(['status' =>TRUE,'message'=>'Email Template inserted Successfully'], REST_Controller::HTTP_CREATED);\r\n\t\t\t}else{\r\n\t\t\t\t$this->set_response(['status' =>FALSE,'message'=>\"Failure\"], REST_Controller::HTTP_CREATED);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$result=$this->emailtemplatemodel->editEmailTemplate($id,$data);\r\n\t\t\tif($result==true){\r\n\t\t\t\t$this->set_response(['status' =>TRUE,'message'=>\"Email Template Updated successfully\"], REST_Controller::HTTP_CREATED);\r\n\t\t\t}else{\r\n\t\t\t\t$this->set_response(['status' =>FALSE,'message'=>\"Failure\"], REST_Controller::HTTP_CREATED);\r\n\t\t\t}\r\n\t\t}\r\n }", "public function mailNewsletterAction()\n {\n return $this->render('TuniAnnonceBundle:Contact:mailNewsletters.html.twig',array('page'=>'newsletters'));\n \n }" ]
[ "0.72971964", "0.68189424", "0.65874416", "0.6294258", "0.6252921", "0.61670405", "0.61635864", "0.6156515", "0.61478907", "0.6114052", "0.6112473", "0.61055243", "0.6102736", "0.61018336", "0.6091628", "0.607822", "0.607595", "0.6052166", "0.6048495", "0.60389477", "0.6013917", "0.598949", "0.5979037", "0.5975727", "0.5970173", "0.59613514", "0.5946598", "0.5918051", "0.5899085", "0.58987755", "0.5894725", "0.58945423", "0.5882028", "0.58705133", "0.5866188", "0.5859155", "0.5848506", "0.584667", "0.58379364", "0.58303183", "0.5808929", "0.58024275", "0.58009106", "0.57938033", "0.5790806", "0.5779588", "0.57784486", "0.577715", "0.5775087", "0.57669353", "0.5765145", "0.5754027", "0.5754007", "0.5736814", "0.5730244", "0.57298875", "0.5720241", "0.57189745", "0.5716275", "0.57101184", "0.570216", "0.57010376", "0.5697644", "0.5687535", "0.5681988", "0.5681137", "0.5667871", "0.5665579", "0.56652236", "0.5661765", "0.56614673", "0.56578857", "0.5652697", "0.5651244", "0.5650876", "0.56479704", "0.56335807", "0.5631475", "0.56285655", "0.5623357", "0.56131774", "0.5611469", "0.56095326", "0.5599183", "0.5596459", "0.559473", "0.55927664", "0.5586611", "0.5575021", "0.5571372", "0.5571247", "0.55662584", "0.5565481", "0.5563069", "0.55617064", "0.55612856", "0.555958", "0.55517775", "0.5549636", "0.55481744" ]
0.70918596
1
Move the user_url custom user meta to setting
Переместить пользовательский мета-пользователя user_url в настройки
private static function migrate_user_url_setting( &$register_action ) { $register_settings = $register_action->post_content; if ( ! isset( $register_settings['reg_usermeta'] ) || empty( $register_settings['reg_usermeta'] ) ) { return; } foreach ( $register_settings['reg_usermeta'] as $meta_key => $user_meta_vars ) { $meta_name = $user_meta_vars['meta_name']; if ( $meta_name === 'user_url' ) { $register_settings['reg_user_url'] = $user_meta_vars['field_id']; unset( $register_settings['reg_usermeta'][ $meta_key ] ); $register_action->post_content = $register_settings; break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_custom_meta_info($user_id, $meta, $value)\r\n\t{\r\n\t\tupdate_user_meta ($user_id, $meta, $value);\t\t\r\n\t\treturn $user_id;\r\n\t\t\r\n\t}", "public function setUserUrl($user_url)\n {\n $this->user_url = $user_url;\n }", "function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '')\n{\n}", "function myplugin_registration_save( $user_id ) {\n update_user_meta($user_id, 'prefix_first_login', '1');\n\n}", "function add_usermeta_at_signup( $usermeta ) {\n\t\t$usermeta['accept_tos'] = $_POST['accept_tos'];\n\t\treturn $usermeta;\n\t}", "function update_usermeta($user_id, $meta_key, $meta_value)\n{\n}", "function account_migrate_create_user_metta($user_id, $user){\n add_user_meta( $user_id, 'dealer_id', $user['id'] , true );\n add_user_meta( $user_id, 'dealer_username', $user['username'] , true );\n add_user_meta( $user_id, 'dealer_acct', $user['acct'] , true );\n add_user_meta( $user_id, 'dealer_name', $user['name'] , true );\n add_user_meta( $user_id, 'dealer_country', $user['country'] , true );\n add_user_meta( $user_id, 'dealer_admin', $user['admin'] , true );\n add_user_meta( $user_id, 'dealer_pricing', $user['pricing'] , true );\n}", "function save_custom_user_profile_fields($user_id){\n if(!current_user_can('manage_options'))\n return false;\n\n # save my custom field\n update_usermeta($user_id, 'phone_num', $_POST['phone_num']);\n update_usermeta($user_id, 'company', $_POST['company']);\n update_usermeta($user_id, 'user_country', $_POST['user_country']);\n update_usermeta($user_id, 'user_addr', $_POST['user_addr']);\n}", "function add_user_meta($user_id, $meta_key, $meta_value, $unique = \\false)\n{\n}", "function google_seo_meta_user()\n{\n global $settings, $uid, $memprofile, $signature, $website;\n global $google_seo_nofollow;\n\n // Canonical:\n if($settings['google_seo_meta_canonical'] && $uid > 0)\n {\n google_seo_meta_canonical(get_profile_link($uid));\n }\n\n // Nofollow:\n if($memprofile['regdate'] > $google_seo_nofollow)\n {\n $signature = google_seo_meta_nofollow($signature);\n $website = google_seo_meta_nofollow($website);\n }\n}", "public function importUserMeta() {\n\t\t$usersPerAction = 100;\n\t\t$offset = aioseo()->transients->get( 'import_user_meta_yoast_seo' );\n\n\t\t$usersMeta = aioseo()->db\n\t\t\t->start( 'usermeta' . ' as um' )\n\t\t\t->whereRaw( \"um.meta_key IN ('facebook', 'twitter')\" )\n\t\t\t->whereRaw( \"um.meta_value != ''\" )\n\t\t\t->limit( $offset . ',' . $usersPerAction )\n\t\t\t->run()\n\t\t\t->result();\n\n\t\tif ( ! $usersMeta || ! count( $usersMeta ) ) {\n\t\t\taioseo()->transients->delete( 'import_user_meta_yoast_seo' );\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $usersMeta as $meta ) {\n\t\t\tupdate_user_meta( $meta->user_id, 'aioseo_' . $meta->meta_key, $meta->meta_value );\n\t\t}\n\n\t\tif ( count( $usersMeta ) === $usersPerAction ) {\n\t\t\taioseo()->transients->update( 'import_user_meta_yoast_seo', 100 + $offset, WEEK_IN_SECONDS );\n\t\t\taioseo()->helpers->scheduleSingleAction( aioseo()->importExport->yoastSeo->userActionName, 5 );\n\t\t} else {\n\t\t\taioseo()->transients->delete( 'import_user_meta_yoast_seo' );\n\t\t}\n\t}", "function learn_press_update_user_item_meta( $user_item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'learnpress_user_item', $user_item_id, $meta_key, $meta_value, $prev_value );\n}", "function learn_press_update_user_item_meta( $user_item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'learnpress_user_item', $user_item_id, $meta_key, $meta_value, $prev_value );\n}", "function my_login_redirect( $url, $request, $user ){\n if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {\n if( 'cool' == get_user_meta( $user->ID, '_is_cool', true ) ) {\n $url = home_url('/login/');\n }\n }\n return $url;\n}", "function learn_press_add_user_item_meta( $user_item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn add_metadata( 'learnpress_user_item', $user_item_id, $meta_key, $meta_value, $prev_value );\n}", "function learn_press_add_user_item_meta( $user_item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn add_metadata( 'learnpress_user_item', $user_item_id, $meta_key, $meta_value, $prev_value );\n}", "function xrc_user_user_save( $user_id )\r\n{\r\n // verify our nonce\r\n if( ! isset( $_POST['xrc_user_nonce'] ) || ! wp_verify_nonce( $_POST['xrc_user_nonce'], 'xrc_user_nonce' ) )\r\n return;\r\n \r\n // make sure our fields are set\r\n if( ! isset( $_POST['xrc_user'] ) ) \r\n return;\r\n \r\n $save = array();\r\n foreach( $_POST['xrc_user'] as $p )\r\n {\r\n $save[] = absint( $p );\r\n }\r\n update_user_meta( $user_id, 'xrc_user_pages', $save );\r\n}", "private function addUserUrls($user) {\n\t\t$urls = array(\n\t\t\t\t'view' => $this->settings['template']['base'] . 'users/'.$user->name\n\t\t);\n\t\t$user->urls = $urls;\n\t}", "function floris_set_user_metaboxes($user_id=NULL) {\n\t $meta_key['order'] = 'meta-box-order_post';\n\t $meta_key['hidden'] = 'metaboxhidden_post';\n\t // So this can be used without hooking into user_register\n\t if ( ! $user_id)\n\t $user_id = get_current_user_id(); \n\t // Set the default order if it has not been set yet\n\t if ( ! get_user_meta( $user_id, $meta_key['order'], true) ) {\n\t $meta_value = array(\n\t 'side' => 'submitdiv,formatdiv,categorydiv,postimagediv',\n\t 'normal' => 'postexcerpt,tagsdiv-post_tag,postcustom,commentstatusdiv,commentsdiv,trackbacksdiv,slugdiv,authordiv,revisionsdiv',\n\t 'advanced' => '',\n\t );\n\t update_user_meta( $user_id, $meta_key['order'], $meta_value );\n\t }\n\t // Set the default hiddens if it has not been set yet\n\t if ( ! get_user_meta( $user_id, $meta_key['hidden'], true) ) {\n\t $meta_value = array('postcustom','trackbacksdiv','commentstatusdiv','commentsdiv','slugdiv','authordiv','revisionsdiv');\n\t update_user_meta( $user_id, $meta_key['hidden'], $meta_value );\n\t }\n\t}", "function update_user_extra_meta_data() {\n\tglobal $userMeta;\n\t\n\t$errors = new WP_Error;\n\t\n\t$userID = get_user_id_for_viewed_profile();\n\t\n\t//Check what groups user belongs to\n\t$user_array = array(\n\t\t\t'user_id' => $userID,\n\t\t\t'user_login' => null,\n\t\t\t'user_email' => null,\n\t\t\t'format' => '',\n\t\t\t'list_class' => 'groups',\n\t\t\t'item_class' => 'name',\n\t\t\t'order_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t\t);\n\t\n\t//Get groups of user profile being editted\n\t$user_groups_string .= do_shortcode_func( 'groups_user_groups', $user_array );\n\t\n\t//Check what group user has and display the appropriate user fields\n\tif (strpos($user_groups_string, 'Individual')) {\n\t\t$form = $userMeta->getFormData( 'Individual Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Service')) {\n\t\t$form = $userMeta->getFormData( 'Service Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Organisation')) {\n\t\t$form = $userMeta->getFormData( 'Organisation Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Concession')) {\n\t\t$form = $userMeta->getFormData( 'Concession Member' );\n\t}\n\t\n\t//$form = $userMeta->getFormData( 'Individual Member' );\n\n\t\n\t$backendFields = $form[\"fields\"]; \n\t\n\t//print \"<pre>\";\n\t//print_r($backendFields);\n\t//print \"</pre>\";\n\t\n\t\n\tif( !is_array( $backendFields ) ) return;\n\t\n\t$userData = array();\n\tforeach( $backendFields as $fieldID ){\n\t\t\t \n\t\t$fieldData = $fieldID ;\n\t\t\n\t\tif( !empty( $fieldData[ 'meta_key' ] ) )\n\t\t\t$fieldName = $fieldData[ 'meta_key' ];\n\t\telse{\n\t\t\tif( in_array( @$fieldData[ 'field_type' ], array('user_registered','user_avatar') ) )\n\t\t\t\t$fieldName = $fieldData[ 'field_type' ];\n\t\t}\n\t\t\n\t\tif( empty( $fieldName ) ) continue;\n\t\t\n\t\t$userData[ $fieldName ] = @$_POST[ $fieldName ]; \n\n\t\t// Handle non-ajax file upload\n\t\tif( in_array( $fieldData[ 'field_type' ], array( 'user_avatar', 'file' ) ) ){\n\t\t\tif( isset( $_FILES[ $fieldName ] ) ){\n\t\t\t\t$extensions = @$fieldData[ 'allowed_extension' ] ? $fieldData[ 'allowed_extension' ] : \"jpg, png, gif\";\n\t\t\t\t$maxSize = @$fieldData[ 'max_file_size' ] ? $fieldData[ 'max_file_size' ] * 1024 : 1024 * 1024;\n\t\t\t\t$file = $userMeta->fileUpload( $fieldName, $extensions, $maxSize );\n\t\t\t\tif( is_wp_error( $file ) ){\n\t\t\t\t\tif( $file->get_error_code() <> 'no_file' ) \n\t\t\t\t\t\t$errors->add( $file->get_error_code(), $file->get_error_message() );\n\t\t\t\t}else{\n\t\t\t\t\tif( is_string( $file ) )\n\t\t\t\t\t\t$userData[ $fieldName ] = $file;\n\t\t\t\t} \n\t\t\t}\n\t\t} \t\t\n\t} \n\t\n\t$userMeta->insertUser( $userData, $userID );\n}", "function set_value_usermeta($field, $value){\n\t\t\n\t\t$usermeta_info = get_user_meta( $field['idwhere'], $field['campo'], true );\n\n\t\t$GLOBALS['fields_info'][$field['name_field']]['value'] = $usermeta_info;\n\n\t\treturn $usermeta_info;\n\t}", "public function update_User_Meta_Value($user_id=0, $meta_key='', $meta_value=''){\n\t\treturn UserMeta::where(['user_id' => $user_id,'meta_key' => $meta_key])->update(['meta_value' => $meta_value,]);\n\t}", "function wp_bp_signup_usermeta( $usermeta ) {\n\t// phpcs:ignore WordPress.Security\n\tif ( ! empty( $_POST['question'] ) ) {\n\t\t// phpcs:ignore WordPress.Security\n\t\t$usermeta['question_id'] = $_POST['question'];\n\t}\n\n\treturn $usermeta;\n}", "function get_user_meta($user_id, $key = '', $single = \\false)\n{\n}", "private function update_user_meta($customer)\n {\n }", "function __update_user_meta( $user_id, $field_name, $value = '' ) {\n\t\tif ( empty( $value ) OR ! $value )\n\t\t{\n\t\t\tdelete_user_meta( $user_id, $field_name );\n\t\t}\n\t\telseif ( ! get_user_meta( $user_id, $field_name ) )\n\t\t{\n\t\t\tadd_user_meta( $user_id, $field_name, $value );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdate_user_meta( $user_id, $field_name, $value );\n\t\t}\n\t}", "function pmproiufcsv_is_iu_import_usermeta($usermeta, $userdata)\r\n{\r\n\t$pmpro_fields = pmproiufcsv_getFields();\r\n\t\t\r\n\t$newusermeta = array();\r\n\tforeach($usermeta as $key => $value)\r\n\t{\t\t\r\n\t\tif(in_array($key, $pmpro_fields))\r\n\t\t\t$key = \"import_\" . $key;\r\n\t\t\t\t\r\n\t\t$newusermeta[$key] = $value;\r\n\t}\r\n\t\r\n\treturn $newusermeta;\r\n}", "function get_usermeta($user_id, $meta_key = '')\n{\n}", "function swp_ua_output_settings( $profileuser ) {\n\t$metadata = get_user_meta( $profileuser->ID );\n\t$default_gravatar_url = get_avatar_url( '00000000000000000000000000000000@md5.gravatar.com', array(\n\t\t'force_default' => true,\n\t\t'size' => SWP_UA_DISPLAY_SIZE * 2\n\t) );\n\n\t$ua_attachment = isset( $metadata['ua_attachment'] ) ? $metadata['ua_attachment'][0] : '';\n\t$ua_rating = isset( $metadata['ua_rating'] ) ? $metadata['ua_rating'][0] : 'G';\n?>\n\t<h2><?php _e( 'Avatar', 'swp-ua' ); ?></h2>\n\t<table class=\"form-table\">\n\t\t<tr class=\"swp-ua-gravatar\">\n\t\t\t<th scope=\"row\"><?php _e( 'Gravatar', 'swp-ua' ); ?></th>\n\t\t\t<td>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend class=\"screen-reader-text\"><span><?php _e( 'Gravatar', 'swp-ua' ); ?></span></legend>\n\t\t\t\t\t<label for=\"ua_gravatar\">\n\t\t\t\t\t\t<input name=\"ua_gravatar\"\n\t\t\t\t\t\t type=\"checkbox\"\n\t\t\t\t\t\t id=\"ua_gravatar\"\n\t\t\t\t\t\t value=\"1\"\n\t\t\t\t\t\t <?php checked( $metadata['ua_gravatar'][0], 'true' ); ?>\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<?php echo sprintf( __( 'Uses the <a href=\"%s\">Gravatar</a> free service.', 'swp-ua' ), __( 'https://en.gravatar.com/', 'swp-ua' ) ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t\t<br>\n\t\t\t\t</fieldset>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"swp-ua-picture\">\n\t\t\t<th scope=\"row\"><?php _e( 'Profile Picture', 'swp-ua' ); ?></th>\n\t\t\t<td>\n\t\t\t\t<div class=\"swp-ua-preview\">\n\t\t\t\t\t<input class=\"storage\" type=\"hidden\" name=\"ua_attachment\" value=\"<?php echo $ua_attachment; ?>\">\n\t\t\t\t\t<div class=\"image\"\n\t\t\t\t\t\t style=\"background-image:url(<?php echo $default_gravatar_url; ?>)\"\n\t\t\t\t\t><?php\n\t\t\t\t\t\tadd_filter( 'pre_option_ua_show_avatar', '__return_true', 100 );\n\n\t\t\t\t\t\tif ( ! empty( $ua_attachment ) ) {\n\t\t\t\t\t\t\t$gravatar = get_avatar( $profileuser->ID, 96, '', '', array( 'force_gravatar' => true ) );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$gravatar = '<img class=\"avatar avatar-96 photo\" src=\"\" alt=\"\">';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\techo $gravatar;\n\t\t\t\t\t\techo get_avatar( $profileuser->ID );\n\n\t\t\t\t\t\tremove_filter( 'pre_option_ua_show_avatar', '__return_true', 100 );\n\t\t\t\t ?></div>\n\t\t\t\t\t<p class=\"description\"><?php\n\t\t\t\t\t\tif ( IS_PROFILE_PAGE ) {\n\t\t\t\t\t\t\t$description = sprintf(\n\t\t\t\t\t\t\t\t__( 'You can change your profile picture on <a href=\"%s\">Gravatar</a>.', 'swp-ua' ),\n\t\t\t\t\t\t\t\t__( 'https://en.gravatar.com/', 'swp-ua' )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$description = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Filters the user profile picture description displayed under the Gravatar.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @param string $description The description that will be printed.\n\t\t\t\t\t\t * @param WP_User $profileuser The current WP_User object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\techo apply_filters( 'user_profile_picture_description', $description, $profileuser );\n\t\t\t\t\t?></p>\n\t\t\t\t\t<div class=\"actions hide-if-no-js\">\n\t\t\t\t\t\t<button class=\"button remove-button\" disabled type=\"button\"><?php _e( 'Remove', 'swp-ua' ); ?></button>\n\t\t\t\t\t\t<button class=\"button upload-button\" type=\"button\"><?php _e( 'Select image', 'swp-ua' ); ?></button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"swp-ua-rating\">\n\t\t\t<th scope=\"row\"><?php _e( 'Rating', 'swp-ua' ); ?></th>\n\t\t\t<td>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend class=\"screen-reader-text\"><span><?php _e( 'Rating', 'swp-ua' ); ?></span></legend>\n\t\t\t\t\t<?php\n\t\t\t\t\t$ratings = array(\n\t\t\t\t\t\t'G' => __( 'G &#8212; Suitable for all audiences', 'swp-ua' ), /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */\n\t\t\t\t\t\t'PG' => __( 'PG &#8212; Possibly offensive, usually for audiences 13 and above', 'swp-ua' ), /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */\n\t\t\t\t\t\t'R' => __( 'R &#8212; Intended for adult audiences above 17', 'swp-ua' ), /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */\n\t\t\t\t\t\t'X' => __( 'X &#8212; Even more mature than above', 'swp-ua' ) /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */\n\t\t\t\t\t);\n\t\t\t\t\t?>\n\n\t\t\t\t\t<?php foreach ( $ratings as $key => $rating ) : ?>\n\t\t\t\t\t<label><input type=\"radio\" name=\"ua_rating\" value=\"<?php echo esc_attr( $key ); ?>\"<?php checked( $key, $ua_rating ); ?>><?php echo $rating; ?></label><br>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</fieldset>\n\t\t\t</td>\n\t\t<tr>\n\t</table>\n<?php\n}", "function add_user_meta_fields($default) {\n $default = wp_parse_args(array(\n 'user_hour_rate',\n 'user_profile_id',\n 'user_currency',\n 'user_skills',\n 'user_available'\n ) , $default);\n return $default;\n }", "function show_extra_user_meta_data() {\n\tglobal $userMeta, $pagenow;\n\n\t//Enqueue Scripts for dashboard profile, this needs to be placed here as this is the hook required to activate the code\n\tif( $pagenow == 'profile.php' ) {\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script( 'profile-user-meta', constant( 'EVERSION_PLUGIN_URL' ). '/js/profile-user-meta.js', array( 'jquery' ), '1.0', true );\n\t\twp_enqueue_style( 'admin-profile', constant( 'EVERSION_PLUGIN_URL' ) . '/style-profile.css' );\n\t}\n\t\n\t$userID = get_user_id_for_viewed_profile();\n\t\n\t//Check what groups user belongs to\n\t$user_array = array(\n\t\t\t'user_id' => $userID,\n\t\t\t'user_login' => null,\n\t\t\t'user_email' => null,\n\t\t\t'format' => '',\n\t\t\t'list_class' => 'groups',\n\t\t\t'item_class' => 'name',\n\t\t\t'order_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t\t);\n\t\n\t//Get groups of user profile being editted\n\t$user_groups_string = '';\n\t$user_groups_string .= do_shortcode_func( 'groups_user_groups', $user_array );\n\t\n\t//Check what group user has and display the appropriate user fields\n\tif (strpos($user_groups_string, 'Individual')) {\n\t\t$form = $userMeta->getFormData( 'Individual Member' );\n\t\techo '<h3>Individual Australian</h3>';\n\t}\n\telse if (strpos($user_groups_string, 'Service')) {\n\t\techo '<h3>Service Australian</h3>';\n\t\t$form = $userMeta->getFormData( 'Service Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Organisation')) {\n\t\techo '<h3>Organisation Australian</h3>';\n\t\t$form = $userMeta->getFormData( 'Organisation Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Concession')) {\n\t\techo '<h3>Concession Australian</h3>';\n\t\t$form = $userMeta->getFormData( 'Concession Member' );\n\t}\n\t\n\tif(isset($form)) {\n\n\t\t$fields = $form[\"fields\"]; \n\t\t\n\t\t$user = new WP_User( $userID );\n\t\t\n\t\t$formKey = 'um_backend_profile';\n\n\t\t$i = 0;\n\t\t\n\t\tforeach( $fields as $fieldID ){\n\t\t\tif( empty($fieldID) )\n\t\t\tcontinue;\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t// if first rows is not section heading then initiate html table\n\t\t\tif( ( $i == 1 ) || ( @$fields[ $fieldID ]['field_type'] <> 'section_heading' ) ){\n\t\t\t\techo \"<table class=\\\"form-table\\\"><tbody>\"; \n\t\t\t\t$inTable = true;\n\t\t\t}\n\t\t\t\n\t\t\tif( $fieldID['field_type'] == 'section_heading' ){\n\t\t\t\tif( @$inTable ){\n\t\t\t\t\techo \"</tbody></table>\";\n\t\t\t\t\t$inTable = false;\n\t\t\t\t} \n\t\t\t\techo \"<h3>\" . $fieldID['field_title'] . \"</h3> <table class='form-table'><tbody>\";\n\t\t\t\t$inTable = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(isset($fieldID['meta_key'])) {\n\t\t\t\t$fieldName = $fieldID['meta_key']; \n\t\t\t\t\n\t\t\t\tif( !$fieldName )\n\t\t\t\t\t$fieldName = $fieldID['field_type'];\n\t\t\t\t\n\t\t\t\t$fieldID['field_name'] = $fieldName;\n\t\t\t\t$fieldID['field_value'] = @$user->$fieldName;\n\t\t\t\t$fieldID['title_position'] = 'hidden';\n\t\t\t\t\n\t\t\t\t//$field = $fields[ $fieldID ];\n\t\t\t\t\n\t\t\t\t//user_meta_field_config (since 1.1.3rc2)\n\t\t\t\t//Can be modify fields data by calling this filter hook.\n\t\t\t\t//Function arguments: Form Data (array), Field ID (int), Form Name (string)\n\t\t\t\t\n\t\t\t\t$fields = apply_filters( 'user_meta_field_config', $fields, $fieldID, $formKey );\n\n\t\t\t\t$fieldDisplay = $userMeta->renderPro( 'generateField', array( \n\t\t\t\t\t'field' => $fieldID,\n\t\t\t\t\t'form' => null,\n\t\t\t\t\t'actionType' => null,\n\t\t\t\t\t'userID' => $userID,\n\t\t\t\t\t'inPage' => null,\n\t\t\t\t\t'inSection' => null,\n\t\t\t\t\t'isNext' => null,\n\t\t\t\t\t'isPrevious' => null,\n\t\t\t\t\t'currentPage' => null,\n\t\t\t\t\t'uniqueID' => 'profile',\n\t\t\t\t) );\n\t\t \n\t\t\t\t//Filter Hook: user_meta_field_display (since 1.1.3rc2)\n\t\t\t\t//Applied to field html before browser output.\n\t\t\t\t//Function arguments: HTML (string), Field ID (int), Form Name (string), Field Data (array)\n\t\t\t\t$html = apply_filters( 'user_meta_field_display', $fieldDisplay, $fieldID, $formKey, $fields );\n\t\t\t\t\n\t\t\t\t$field_id = $fieldID['field_id'];\n\t\t\t\t\n\t\t\t\tif( $fieldID ['field_type'] == 'hidden' )\n\t\t\t\t\techo $html;\n\t\t\t\telse\n\t\t\t\t\techo \"<tr><th><label for=\\\"um_field_$field_id\\\">{$fieldID['field_title']}</label></th><td>$html</td></tr>\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( @$inTable )\n\t\t\techo \"</tbody></table>\";\n\n\t\t ?> \n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tjQuery(\"#your-profile\").validationEngine();\n\t\t\t\tjQuery(\".um_rich_text\").wysiwyg({initialContent:\" \"}); \n\n\t\t\t\tumFileUploader( '<?php echo $userMeta->pluginUrl . '/framework/helper/uploader.php' ?>' ); \n\n\t\t\t\tvar form = document.getElementById( 'your-profile' );\n\t\t\t\tform.encoding = 'multipart/form-data';\n\t\t\t\tform.setAttribute('enctype', 'multipart/form-data'); \n\t\t\t});\n\t\t</script>\n\t\t<?php \n\n\t}\n}", "function save_custom_user_profile_fields($user_id){\n if(!current_user_can('manage_options'))\n return false;\n\n # save my custom field\n update_usermeta($user_id, 'jobalerts', $_POST['jobalerts']);\n}", "function custom_user_page_view_modify(&$vars) {\n // Add viewing user id.\n $current_path = \\Drupal::service('path.current')->getPath();\n $path_args = explode('/', $current_path);\n\n $vars['account'] = User::load($path_args[2]);\n \n // Add user avatar (user profile).\n $avatar_id = (int) $vars['account']->get('field_photo')->target_id;\n if ($avatar_id) {\n $file = File::load($avatar_id);\n $vars['account_avatar'] = ImageStyle::load('thumbnail')->buildUrl($file->get('uri')->value);\n }\n else{\n $vars['account_avatar'] = '/sites/default/files/styles/thumbnail/public/default_images/no_photo.png';\n }\n \n // User name and identity.\n $vars['account_name'] = $vars['account']->getUsername();\n if (trim($vars['account']->get('field_full_name')->value) != '') {\n $vars['account_name'] = trim($vars['account']->get('field_full_name')->value);\n }\n}", "function wp_user_settings()\n{\n}", "function save_custom_user_profile_fields($user_id)\n{\n if (!current_user_can('manage_options')) {\n return false;\n }\n\n $data = [\n 'days' => $_POST['days'],\n 'end_date' => $_POST['expiry_date'],\n 'order_id' => '',\n ];\n $data = json_encode($data);\n update_user_meta($user_id, 'is_general', $_POST['is_general'] ? $data : '');\n update_user_meta($user_id, 'is_acedemic', $_POST['is_acedemic'] ? $data : '');\n update_user_meta($user_id, 'is_ctpd', $_POST['is_ctpd'] ? $data : '');\n update_user_meta($user_id, 'is_ielts', $_POST['is_ielts'] ? $data : '');\n update_user_meta($user_id, 'is_demo_user', $_POST['is_demo_user'] ? $data : '');\n\n # save my custom field\n // update_usermeta($user_id, 'company', $_POST['company']);\n}", "public static function add_meta( $user, $key, $value ) {\r\n\r\n if( ! is_object( $user ) ){\r\n $user = get_user_by( 'id', $user );\r\n }\r\n\r\n $old_value = get_user_meta( $user->ID, $key, true );\r\n\r\n if( $old_value === false ){\r\n return add_user_meta( $user->ID, $key, $value );\r\n }else{\r\n if( $old_value === $value ){\r\n return true;\r\n }else{\r\n delete_user_meta( $user->ID, $key );\r\n return add_user_meta( $user->ID, $key, $value );\r\n }\r\n }\r\n\r\n }", "public function red_add_user_meta($user_id, $meta_key, $meta_value) {\n\t\tif ( ! add_user_meta( $user_id, $meta_key, $meta_value, true ) ) {\n\t\t\tupdate_user_meta( $user_id, $meta_key, $meta_value );\n\t\t}\n\t}", "public static function edit_user_profile($user) {\n $initials = get_user_meta($user->ID, 'publishing_importer_initials', FALSE);\n $value = implode(\"\\n\", $initials);\n?>\n<h3 id=\"publishing-importer\"><?= __('Importer settings', Plugin::L10N) ?></h3>\n<table class=\"form-table\">\n <tr>\n <th><label for=\"publishing_importer_initials\"><?= _x('Author Initials', 'Paraph', Plugin::L10N); ?></label></th>\n <td>\n<textarea rows=\"3\" cols=\"30\" id=\"publishing_importer_initials\" name=\"publishing_importer_initials\">\n<?= esc_textarea($value) ?>\n</textarea>\n <p class=\"description\"><?= __('Enter one paraph (short signature) per line.', Plugin::L10N) ?></p>\n </td>\n </tr>\n</table>\n<?php\n }", "function update_usermeta($field, $value){\n\n\t\tif($value != '')\n\t\tupdate_user_meta( $field['idwhere'], $field['campo'], $value );\n\n\t}", "function wp_set_all_user_settings($user_settings)\n{\n}", "protected function prepare_links($user)\n {\n }", "public function setMeta($name, $value)\n\t\t{\n\t\t\tSERIA_Base::db()->updateOrInsert('{user_meta_value}', array(\n\t\t\t\t'name',\n\t\t\t\t'owner'\n\t\t\t), array(\n\t\t\t\t'name',\n\t\t\t\t'owner',\n\t\t\t\t'value',\n\t\t\t\t'timestamp'\n\t\t\t), array(\n\t\t\t\t'name' => $name,\n\t\t\t\t'owner' => $this->get('id'),\n\t\t\t\t'value' => $value,\n\t\t\t\t'timestamp' => date('Y-m-d H:i:s')\n\t\t\t));\n\t\t\tSERIA_Hooks::dispatch('SERIA_User::setMeta', $this, $name, $value);\n\t\t}", "function wpcf_admin_user_profile_load_hook( $user )\n{\n if ( !current_user_can( 'edit_user', $user->ID ) ) {\n return false;\n }\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php';\n wpcf_admin_userprofile_init( $user );\n}", "private function set_plugin_owner() {\n\t\t// Get current user.\n\t\t$user = get_current_user_id();\n\n\t\tif ( ! empty( $user ) ) {\n\t\t\t// If network activated in multisite.\n\t\t\tif ( $this->is_network() ) {\n\t\t\t\tupdate_site_option( 'pluginbase_owner_user', $user );\n\t\t\t} else {\n\t\t\t\t// Single site.\n\t\t\t\tupdate_option( 'pluginbase_owner_user', $user );\n\t\t\t}\n\t\t}\n\t}", "protected function get_user_meta($user_id, $key)\n {\n }", "function my_save_extra_profile_fields( $user_id ) {\r\n\t\tif ( !current_user_can( 'edit_user', $user_id ) ) {\r\n\t\t\treturn false;\r\n\t}\r\n\t\tupdate_usermeta($user_id, 'fullname', $_POST['fullname']);\r\n\t\tupdate_usermeta($user_id, 'designations', $_POST['designations']);\r\n\t\tupdate_usermeta($user_id, 'customrole', $_POST['customrole']);\r\n\t\tupdate_usermeta($user_id, 'facebook', $_POST['facebook']);\r\n\t\tupdate_usermeta($user_id, 'twitter', $_POST['twitter']);\r\n\t\tupdate_usermeta($user_id, 'youtube', $_POST['youtube']);\r\n\t\tupdate_usermeta($user_id, 'google', $_POST['google']);\r\n\t\tupdate_usermeta($user_id, 'linkedin', $_POST['linkedin']);\r\n\t\tupdate_usermeta($user_id, 'homepage', $_POST['homepage']);\r\n\t}", "function setUser($user)\n {\n $this->settings['api.username'] = $user;\n }", "function setUser($user)\n {\n $this->settings['api.username'] = $user;\n }", "function delete_user_meta($user_id, $meta_key, $meta_value = '')\n{\n}", "function wpcf_admin_user_profile_save_hook( $user_id )\n{\n if ( !current_user_can( 'edit_user', $user_id ) ) {\n return false;\n }\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php';\n wpcf_admin_userprofilesave_init( $user_id );\n}", "function woocommerce_json_api_update_user_profile( $user_id ) {\n $helpers = new JSONAPIHelpers();\n $key = $helpers->getPluginPrefix() . '_settings';\n $params = serialize($_POST[$key]);\n update_user_meta($user_id,$key,$params);\n // Need this for faster access to users.\n $key2 = $helpers->getPluginPrefix() . '_api_token';\n update_user_meta($user_id,$key2,$_POST[$key]['token']);\n}", "function global_unset_wp_seo_columns() {\n \n $users = get_users();\n \n foreach( $users as $user ) {\n \n $user = (Array) $user; // cast object $user as an array\n $rows = array(\n \n // 'all pages' - edit.php?post_type=page\n array(\n 'key' => 'manageedit-pagecolumnshidden',\n 'value' => array(\n // comment out whichever columns you want to leave\n //'wpseo-score',\n 'wpseo-title',\n 'wpseo-metadesc',\n 'wpseo-focuskw'\n )\n ),\n \n // 'all posts' - edit.php\n array(\n 'key' => 'manageedit-postcolumnshidden',\n 'value' => array(\n // comment out whichever columns you want to leave\n //'wpseo-score',\n 'wpseo-title',\n 'wpseo-metadesc',\n 'wpseo-focuskw'\n )\n )\n \n );\n \n foreach( $rows as $row ) {\n update_user_meta( $user['ID'], $row['key'], $row['value'] );\n } // end foreach $rows as $row\n \n } // end foreach $users as $user\n \n}", "function swp_ua_update_meta( $user_id ) {\n // check that the current user has the capability to edit the $user_id\n if ( ! current_user_can( 'edit_user', $user_id ) ) {\n return false;\n }\n\n // new attachment ID\n $ua_attachment = intval( $_POST['ua_attachment'] );\n\n // current attachment ID\n $old_ua_attachment = get_user_meta( $user_id, 'ua_attachment', true );\n $old_ua_attachment = intval( $old_ua_attachment);\n\n // delete old avatar files if needed.\n if ( isset( $_POST['ua_gravatar'] ) || ! $ua_attachment || $ua_attachment != $old_ua_attachment ) {\n \t$hash = swp_ua_get_hash( $user_id, $old_ua_attachment );\n \t$pattern = sprintf( '%s/%s-*x*.*', swp_ua_get_uploads_path(), $hash );\n \t$files = glob( $pattern );\n\n \tif ( $files && ! empty( $files ) ) {\n \t\tforeach ( $files as $file ) {\n \t\t\twp_delete_file( $file );\n \t\t}\n \t}\n }\n\n // delete unused metadata if Gravatar is used.\n if ( isset( $_POST['ua_gravatar'] ) || ! $ua_attachment ) {\n \tdelete_user_meta( $user_id, 'ua_attachment' );\n \tdelete_user_meta( $user_id, 'ua_rating' );\n\n // update metadata according to the new attachment and rating.\n } else {\n \tupdate_user_meta( $user_id, 'ua_attachment', $ua_attachment );\n \tupdate_user_meta( $user_id, 'ua_rating', sanitize_textarea_field( $_POST['ua_rating'] ) );\n }\n\n update_user_meta( $user_id, 'ua_gravatar', isset( $_POST['ua_gravatar'] ) ? 'true' : 'false' );\n}", "private function fillFromUser($user) {\n $this->value = str_replace(self::USER_NAME_TAG, $user->getName(), $this->value);\n }", "function scisco_ap_edit_user(){\n $page_slug = get_theme_mod('scisco_ap_edit_profile_slug', 'edit-profile');\n\tanspress()->user_pages[] = array(\n 'slug' => $page_slug,\n 'label' => esc_html__( 'Edit Profile', 'scisco' ),\n 'icon' => 'apicon-gear',\n 'cb' => 'scisco_user_edit_page',\n 'order' => 99,\n 'private' => true\n );\n}", "function set_badge_to_user($user_id, $badge_url, $badge_title) \r\n\t{\r\n\t\t\r\n\t\t\t$badges = get_user_meta($user_id, '_uultra_badges', true);\r\n\t\t\t\r\n\t\t\t// find if that medallion exists\r\n\t\t\tif (is_array($badges)){\r\n\t\t\t\tforeach($badges as $k => $badge){\r\n\t\t\t\t\tif ( $badge['badge_url'] == $badge_url ) {\r\n\t\t\t\t\t\tunset($badges[$k]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $badge['badge_title'] == $badge_title ) {\r\n\t\t\t\t\t\tunset($badges[$k]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tupdate_user_meta($user_id, '_uultra_badges', true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// add new medallion to member\r\n\t\t\t$badges[] = array(\r\n\t\t\t\t'badge_url' => $badge_url,\r\n\t\t\t\t'badge_title' => $badge_title\r\n\t\t\t);\r\n\t\t\tupdate_user_meta($user_id, '_uultra_badges', $badges);\r\n\t\t\r\n\t}", "function delete_usermeta($user_id, $meta_key, $meta_value = '')\n{\n}", "function wp_edit_user_specific_init() {\n\t\n\tglobal $current_user;\n\t$opts_user_meta = get_user_meta($current_user->ID, 'aaa_wp_edit_user_meta', true);\n\t\n\t// Add ID Column\n\tif(isset($opts_user_meta['id_column']) && $opts_user_meta['id_column'] === '1') {\n\t\t\t\n\t\tfunction wp_edit_column_id($defaults){\n\t\t\t$defaults['wps_post_id'] = __('ID');\n\t\t\treturn $defaults;\n\t\t}\n\t\tadd_filter('manage_posts_columns', 'wp_edit_column_id', 5);\n\t\tadd_filter('manage_pages_columns', 'wp_edit_column_id', 5);\n\t\tfunction wp_edit_custom_column_id($column_name, $id){\n\t\t\tif($column_name === 'wps_post_id'){\n\t\t\t\techo $id;\n\t\t\t}\n\t\t}\n\t\tadd_action('manage_posts_custom_column', 'wp_edit_custom_column_id', 5, 2);\n\t\tadd_action('manage_pages_custom_column', 'wp_edit_custom_column_id', 5, 2);\n\t}\n\t\n\t// Add Tumbnail Column\n\tif(isset($opts_user_meta['thumbnail_column']) && $opts_user_meta['thumbnail_column'] === '1') {\n\t\t\n\t\tif ( !function_exists('wp_edit_AddThumbColumn') && function_exists('add_theme_support') ) {\n\t\t\t\n\t\t\t\n\t\t\t// First, check if current theme support post thumbnails\n\t\t\tfunction wpep_check_post_thumbnails() {\n\t\t\t\t\n\t\t\t\t// If current theme does not support post thumbnails\n\t\t\t\tif(!current_theme_supports('post-thumbnails')) {\n\t\t\t\t\t\n\t\t\t\t\t// Add post thumbnail support\n\t\t\t\t\tadd_theme_support('post-thumbnails', array( 'post', 'page' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tadd_action('after_theme_setup', 'wpep_check_post_thumbnails');\n\t\t\t \n\t\t\tfunction wp_edit_AddThumbColumn($cols) {\n\t\t\t\t \n\t\t\t\t$cols['thumbnail'] = __('Thumbnail', 'wp-edit'); \n\t\t\t\treturn $cols; \n\t\t\t} \n\t\t \n\t\tfunction wp_edit_AddThumbValue($column_name, $post_id) { \n\t\t \n\t\t\tif ( 'thumbnail' == $column_name ) {\n\t\t\t\t \n\t\t\t\t$thumb = get_the_post_thumbnail($post_id, array(100,70));\n\t\t\t\t \n\t\t\t\tif ( isset($thumb) && $thumb ) { echo $thumb; }\n\t\t\t\telse { echo __('None','wp-edit'); }\n\t\t\t}\n\t\t} \n\t\t \n\t\t// for posts \n\t\tadd_filter( 'manage_posts_columns', 'wp_edit_AddThumbColumn' ); \n\t\tadd_action( 'manage_posts_custom_column', 'wp_edit_AddThumbValue', 10, 2 ); \n\t\t \n\t\t// for pages \n\t\tadd_filter( 'manage_pages_columns', 'wp_edit_AddThumbColumn' ); \n\t\tadd_action( 'manage_pages_custom_column', 'wp_edit_AddThumbValue', 10, 2 ); \n\t\t}\n\t}\n\t\n\t// Hide Text Tab\n\tif(isset($opts_user_meta['hide_text_tab']) && $opts_user_meta['hide_text_tab'] === '1') {\n\t\t\n\t\tglobal $pagenow;\n\t\tif ($pagenow=='post.php' || $pagenow == 'post-new.php' || ($pagenow == \"admin.php\" && (isset($_GET['page'])) == 'cleverness-to-do-list') || ($pagenow == \"options-general.php\" && (isset($_GET['page'])) == 'ultimate-tinymce')) {\n\t\t\tfunction wp_edit_user_hide_on_todo() {\n\t\t\t\t?><style type=\"text/css\"> #excerpt-html { display: none !important; } #content-id-html { display: none !important; } #content-html { display: none !important; } #clevernesstododescription-html { display: none !important; }</style><?php\n\t\t\t}\n\t\t\tadd_filter('admin_head','wp_edit_user_hide_on_todo');\n\t\t}\n\t}\n\t\n\t// Default Visual Tab\n\tif(isset($opts_user_meta['default_visual_tab']) && $opts_user_meta['default_visual_tab'] === '1') {\n\t\t\n\t\t// If php version 7 or higher\n\t\tif ( strnatcmp( phpversion(),'7.0.0') >= 0 ) {\n\t\t\t\n\t\t\tadd_filter( 'wp_default_editor', function() { return 'tmce'; } );\n\t\t}\n\t\t// Else using php below version 7\n\t\telse {\n\t\t\t\n\t\t\tadd_filter( 'wp_default_editor', create_function('', 'return \"tmce\";') );\n\t\t}\n\t}\n\t\n\t// Disable Dashboard Widget\n\tif(isset($opts_user_meta['dashboard_widget']) && $opts_user_meta['dashboard_widget'] != '1') {\n\t\t\n\t\tadd_action('wp_dashboard_setup', 'wp_edit_user_custom_dashboard_widgets');\n\t\tfunction wp_edit_user_custom_dashboard_widgets() {\n\t\t\t\n\t\t\tglobal $wp_meta_boxes;\n\t\t\twp_add_dashboard_widget('jwl_user_tinymce_dashboard_widget', __('WP Edit Pro RSS Feed', 'wp-edit'), 'wp_edit_user_tinymce_widget', 'wp_edit_user_configure_widget');\n\t\t}\t\n\t\tfunction wp_edit_user_tinymce_widget() {\n\t\t\t\n\t\t\t$jwl_widgets = get_option( 'wp_edit_user_dashboard_options' ); // Get the dashboard widget options\n\t\t\t$jwl_widget_id = 'jwl_user_tinymce_dashboard_widget'; // This must be the same ID we set in wp_add_dashboard_widget\n\t\t\t\n\t\t\t/* Check whether we have set the post count through the controls. If we didn't, set the default to 5 */\n\t\t\t$jwl_total_items = isset( $jwl_widgets[$jwl_widget_id] ) && isset( $jwl_widgets[$jwl_widget_id]['items'] ) ? absint( $jwl_widgets[$jwl_widget_id]['items'] ) : 5;\n\t\t\t\n\t\t\t$protocol = is_ssl() === true ? 'https:' : 'http:';\n\t\t\t\n\t\t\t// Echo the output of the RSS Feed.\n\t\t\techo '<p><a href=\"//www.feedblitz.com/f/?Sub=950320\"><img title=\"Subscribe to get updates by email and more!\" border=\"0\" src=\"//assets.feedblitz.com/chicklets/email/i/25/950320.bmp\"></a><br />News updates for WP Edit Pro and Stable versions.</p>';\n\t\t\techo '<p style=\"border-bottom:#000 1px solid;\">Showing ('.$jwl_total_items.') Posts</p>';\n\t\t\techo '<div class=\"rss-widget\">';\n\t\t\t\twp_widget_rss_output( $protocol . '//feeds.feedblitz.com/wpeditpro&x=1', array(\n\t\t\t\t\t'title' => '',\n\t\t\t\t\t'items' => $jwl_total_items,\n\t\t\t\t\t'show_author' => 0,\n\t\t\t\t\t'show_date' => 1\n\t\t\t\t));\n\t\t\techo \"</div>\";\n\t\t\techo '<p style=\"text-align:center;border-top: #000 1px solid;padding:5px;\"><a target=\"_blank\" href=\"https://wpeditpro.com/\">WP Edit Pro</a> - Visual Wordpress Editor</p>';\n\t\t}\n\t\tfunction wp_edit_user_configure_widget() {\n\t\t\t\n\t\t\t$jwl_widget_id = 'jwl_user_tinymce_dashboard_widget'; // This must be the same ID we set in wp_add_dashboard_widget\n\t\t\t$jwl_form_id = 'jwl-user-dashboard-control'; // Set this to whatever you want\n\t\t\t\n\t\t\t// Checks whether there are already dashboard widget options in the database\n\t\t\tif ( !$jwl_widget_options = get_option( 'wp_edit_user_dashboard_options' ) ) {\n\t\t\t\t$jwl_widget_options = array(); // If not, we create a new array\n\t\t\t}\n\t\t\t\n\t\t\t// Check whether we have information for this form\n\t\t\tif ( !isset($jwl_widget_options[$jwl_widget_id]) ) {\n\t\t\t\t$jwl_widget_options[$jwl_widget_id] = array(); // If not, we create a new array\n\t\t\t}\n\t\t\t\n\t\t\t// Check whether our form was just submitted\n\t\t\tif ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST[$jwl_form_id]) ) {\n\t\t\t\t\n\t\t\t\t/* Get the value. In this case ['items'] is from the input field with the name of '.$form_id.'[items] */\n\t\t\t\t$jwl_number = absint( $_POST[$jwl_form_id]['items'] );\n\t\t\t\t$jwl_widget_options[$jwl_widget_id]['items'] = $jwl_number; // Set the number of items\n\t\t\t\tupdate_option( 'wp_edit_user_dashboard_options', $jwl_widget_options ); // Update our dashboard widget options so we can access later\n\t\t\t}\n\t\t\t\n\t\t\t// Check if we have set the number of posts previously. If we didn't, then we just set it as empty. This value is used when we create the input field\n\t\t\t$jwl_number = isset( $jwl_widget_options[$jwl_widget_id]['items'] ) ? (int) $jwl_widget_options[$jwl_widget_id]['items'] : '';\n\t\t\t\n\t\t\t// Create our form fields. Pay very close attention to the name part of the input field.\n\t\t\techo '<p><label for=\"jwl_user_tinymce_dashboard_widget-number\">' . __('Number of posts to show:', 'wp-edit') . '</label>';\n\t\t\techo '<input id=\"jwl_user_tinymce_dashboard_widget-number\" name=\"'.$jwl_form_id.'[items]\" type=\"text\" value=\"' . $jwl_number . '\" size=\"3\" /></p>';\n\t\t}\n\t}\n\t\n\t// Enable Post/Page Highlights\n\tif(isset($opts_user_meta['enable_highlights']) && $opts_user_meta['enable_highlights'] === '1') {\n\t\n\t\tfunction wp_edit_highlight_posts_status_colors(){\n\t\t\t\n\t\t\tglobal $current_user;\n\t\t\t$opts_user_meta = get_user_meta($current_user->ID, 'aaa_wp_edit_user_meta', true);\n\t\t\t?>\n\t\t\t<style type=\"text/css\">\n\t\t\t.status-draft{background-color: <?php (isset($opts_user_meta['draft_highlight']) ? print $opts_user_meta['draft_highlight'] : print '#FFFFFF'); ?> !important;}\n\t\t\t.status-pending{background-color: <?php (isset($opts_user_meta['pending_highlight']) ? print $opts_user_meta['pending_highlight'] : print '#FFFFFF'); ?> !important;}\n\t\t\t.status-publish{background-color: <?php (isset($opts_user_meta['published_highlight']) ? print $opts_user_meta['published_highlight'] : print '#FFFFFF'); ?> !important;}\n\t\t\t.status-future{background-color: <?php (isset($opts_user_meta['future_highlight']) ? print $opts_user_meta['future_highlight'] : print '#FFFFFF'); ?> !important;}\n\t\t\t.status-private{background-color: <?php (isset($opts_user_meta['private_highlight']) ? print $opts_user_meta['private_highlight'] : print '#FFFFFF'); ?> !important;}\n\t\t\t</style>\n\t\t\t<?php\n\t\t}\n\t\tadd_action('admin_head','wp_edit_highlight_posts_status_colors');\n\t}\n\t\n}", "function update_user_meta_data($user_id, $user_meta)\r\n{\r\n\r\n\t\tforeach($user_meta as $key => $value) {\r\n // Will return false if the previous value is the same as $new_value.\r\n\t\t\t$updated = update_user_meta( $user_id, $key, $value );\r\n \r\n\t\t\t// So check and make sure the stored value matches $new_value.\r\n\t\t\tif ( $value != get_user_meta( $user_id, $key, true ) ) \r\n\t\t\t{\r\n\t\t\t\twp_die( __( 'An error occurred : '.$key, 'textdomain' ) );\r\n\t\t\t}\r\n }\r\n\t\r\n}", "function map_meta_cap($cap, $user_id)\n{\n}", "function update_usermeta( $id, $meta_key, $meta_value ) {\r\n\tglobal $wp_users_object;\r\n\t$return = $wp_users_object->update_meta( compact( 'id', 'meta_key', 'meta_value' ) );\r\n\tif ( is_wp_error( $return ) )\r\n\t\treturn false;\r\n\treturn $return;\r\n}", "public function gf_setup_dynamic_meta_parameter($metaKey){\n $user_id = get_current_user_id();\n $meta_value = get_user_meta($user_id, $metaKey, true);\n $this->gf_setup_dynamic_parameter(\"user_$metaKey\", $meta_value);\n }", "function ramphor_user_profile_url() {\r\n}", "function g1_socials_user_fields( $user ) {\n\t$data = get_the_author_meta( 'g1_socials', $user->ID );\n\tif ( ! is_array( $data ) ) {\n\t\t$data = array();\n\t}\n\t$networks = g1_socials_user_get_supported_networks();\n\t?>\n\t<h3><?php esc_html_e( 'G1 Socials', 'g1_socials' ); ?></h3>\n\t<table class=\"form-table\">\n\t<?php\n\tforeach ( $networks as $network => $value ) {\n\t\t$network_url = isset( $data[ $network ] ) ? $data[ $network ] : '' ?>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"g1_socials[<?php echo esc_attr( $network ); ?>]\">\n\t\t\t\t\t<span class=\"g1-socials-item-icon g1-socials-item-icon-<?php echo sanitize_html_class( $network ); ?>\" title=\"<?php esc_attr( $network ); ?>\"></span>\n\t\t\t\t\t<span class=\"g1-social-admin-network-name\"><?php echo esc_html( $network ); ?></span>\n\t\t\t\t</label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"url\" pattern=\"https?://.+\" name=\"g1_socials[<?php echo esc_attr( $network ); ?>]\" id=\"g1_<?php echo esc_attr( $network ); ?>\" value=\"<?php echo esc_attr( $network_url ); ?>\" class=\"regular-text\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t<?php }?>\n\t</table><?php\n}", "function update_user_setting() {\n\t\t\n\t\t// options\n\t\t$options = wp_parse_args( $_POST, array(\n\t\t\t'name'\t\t=> '',\n\t\t\t'value'\t\t=> '',\n\t\t\t'nonce'\t\t=> '',\n\t\t));\n\t\t\n\t\t\n\t\t// validate\n\t\tif( ! wp_verify_nonce($options['nonce'], 'acf_nonce') || empty($options['name']) ) {\n\t\t\n\t\t\tdie('0');\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// upadte setting\n\t\tacf_update_user_setting( $options['name'], $options['value'] );\n\t\t\n\t\t\n\t\t// return\n\t\tdie('1');\n\t\t\n\t}", "public function _get_user_meta($user) {\n $photo = AlbumPhoto::where('photo_id', $user->photo_id)\n ->select(['file_id'])\n ->first();\n $file_id = isset($photo->file_id) ? $photo->file_id : NULL;\n $file = StorageFile::where('file_id', $file_id)->first();\n $path = isset($file->storage_path) ? $file->storage_path : NULL;\n $user['profile_photo_url'] = '';\n if (!empty($path)) {\n $user['profile_photo_url'] = \\Config::get('constants_activity.PHOTO_URL') . $path . '?type=' . urlencode($file->mime_type);\n }\n\n $photo = AlbumPhoto::where('photo_id', $user->cover_photo_id)\n ->select(['file_id'])\n ->first();\n $file_id = isset($photo->file_id) ? $photo->file_id : NULL;\n $file = StorageFile::where('file_id', $file_id)->first();\n $path = isset($file->storage_path) ? $file->storage_path : NULL;\n $user['cover_photo_url'] = '';\n if (!empty($path)) {\n $user['cover_photo_url'] = \\Config::get('constants_activity.PHOTO_URL') . $path . '?type=' . urlencode($file->mime_type);\n }\n\n return $user;\n }", "function ym_user_profille_update($username,$password,$ymuser)\r\n{\r\n\tglobal $wpdb;\r\n\t\t\r\n\t\r\n\t//prepre user meta data\r\n\t$user_meta = array();\r\n\t\r\n\t$geo_states =\tym_get_helper_states();\r\n\t$geo_countries =\tym_helper_country();\r\n\t \r\n\t$user_meta['paupress_pp_prefix'] = $ymuser['NamePrefix'];\r\n\t\r\n\t$user_meta['first_name'] = $ymuser['FirstName'];\r\n\t$user_meta['last_name'] = $ymuser['LastName'];\r\n\t$user_meta['soak_pp_job_title'] = $ymuser['Title'];\r\n\t$user_meta['paupress_address_one_1'] = $ymuser['EmpAddrLine1'];\r\n\t$user_meta['paupress_address_two_1'] = $ymuser['EmpAddrLine2'];\r\n\t$user_meta['paupress_address_city_1'] = $ymuser['EmpCity'];\r\n\t$user_meta['paupress_address_postal_code_1'] = $ymuser['EmpPostalCode'];\r\n\t$user_meta['paupress_address_country_1'] = array_search($ymuser['EmpCountry'],$geo_countries,true);\r\n\t$user_meta['paupress_address_state_1'] = array_search($ymuser['EmpLocation'],$geo_states[$user_meta['paupress_address_country_1']],true);\r\n\t//$user_meta['wp_capabilities'] = 'a:2:{s:4:\"user\";b:1;s:8:\"key-user\";b:1;}';\r\n\tif(empty($user_meta['paupress_address_state_1']) )\r\n\t\t$user_meta['paupress_address_state_1'] = $ymuser['EmpLocation'];\r\n\t\r\n\t\r\n\t\r\n \t\r\n\t$user_meta['soak_organization_id'] = $ymuser['member_id'];\r\n\t\r\n\t//$user_meta['paupress_pp_relationship'] = 'a:1:{i:0;a:2:{s:5:\"value\";i:701;s:4:\"type\";s:12:\"organization\";}}';\r\n\t$user_meta['paupress_pp_relationship'] = array( \"0\" => array( \"value\" => $ymuser['member_id'] ,\"type\" => \"organization\" ));\r\n\t$user_meta['organization'] = $ymuser['Employer'];\r\n\t\r\n\t\r\n\t$user_meta['wp_user_level'] = 0;\r\n\t$user_meta['paupress_pp_ind_type'] = \"user\";\r\n\t$user_meta['paupress_pp_user_type'] = \"ind\";\r\n\t$user_meta['soak_pp_ind_status'] = \"ACTIVE\";\r\n\t\r\n\tif($ymuser['Keyuser'] == \"Yes\" )\r\n\t{\r\n\t\t$user_meta['wp_capabilities'] = array(\"user\"=>1,\"key_user\"=>TRUE);\r\n\t\t$user_meta['soak_pp_key_user'] = \"true\";\r\n\t}\r\n\telse\r\n\t{\t\r\n\t\t$user_meta['wp_capabilities'] = array(\"user\"=>1);\r\n\t\t$user_meta['soak_pp_key_user'] = \"false\";\r\n\t}\r\n\t\r\n\t$user_meta['description'] = $ymuser['Biography'];\r\n\t$user_meta['rich_editing'] = \"TRUE\";\r\n\t$user_meta['syntax_highlighting'] = \"TRUE\";\r\n\t$user_meta['admin_color'] = \"fresh\";\r\n\t\r\n\t$user_meta['use_ssl'] = 0;\r\n\t$user_meta['show_admin_bar_front'] = \"TRUE\";\r\n\t\r\n\t$user_meta['paupress_pp_public'] = 'a:16:{s:21:\"soak_pp_last_modified\";s:5:\"false\";s:18:\"soak_pp_last_login\";s:5:\"false\";s:19:\"soak_pp_login_count\";s:5:\"false\";s:18:\"soak_pp_ind_status\";s:5:\"false\";s:17:\"soak_pp_job_title\";s:5:\"false\";s:23:\"soak_pp_last_event_date\";s:5:\"false\";s:29:\"soak_pp_events_attended_count\";s:5:\"false\";s:11:\"description\";s:5:\"false\";s:9:\"telephone\";s:5:\"false\";s:13:\"address_one_1\";s:5:\"false\";s:13:\"address_two_1\";s:5:\"false\";s:14:\"address_city_1\";s:5:\"false\";s:15:\"address_state_1\";s:5:\"false\";s:17:\"address_country_1\";s:5:\"false\";s:21:\"address_postal_code_1\";s:5:\"false\";s:20:\"soak_pp_linkedin_url\";s:5:\"false\";}';\r\n\t\r\n\t\r\n\t$user_meta['telephone'] = array(array(\"value\" => $ymuser['EmpPhone'],\"type\" => \"work\"),array(\"value\" => \"\",\"type\" => \"private\"),\r\n\t\t\t\t\t\t\t\t\tarray(\"value\" => $ymuser['Mobile'],\"type\" => \"mobile\"),array(\"value\" => \"\",\"type\" => \"fax\"));\r\n\t$user_meta['soak_pp_subscription_type'] = \"NONE\";\r\n\t\t\r\n\t\r\n\t\r\n\t$user_meta['soak_new_user_email_sent'] = 1;\r\n\t$user_meta['soak_pp_linkedin_url'] = $ymuser['linkedinURL'];\r\n\t\r\n\t$querystr = \"SELECT tt.description as `Practice Area`, CONCAT('soak_channel__', t.name) AS `meta_key`, tt.term_id AS `meta_value` FROM wp_term_taxonomy AS tt INNER JOIN wp_terms AS t ON tt.term_id = t.term_id AND taxonomy = 'soak_channel' \";\r\n\t$results = $wpdb->get_results($querystr);\r\n\r\n\t$pa_count = count($ymuser['Practiceareas']);\r\n\t$delete_user_meta = array();\r\n\tfor($i=0;$i<count($results);$i++)\r\n\t{\t\r\n\r\n\t\t$pa_key = $results[$i]->{\"meta_key\"};\r\n\t\t$pa_value = $results[$i]->{\"meta_value\"};\r\n\t\t$delete_user_meta[] = $pa_key;\r\n\t\t\r\n\t\tif( $pa_count >= 1 )\r\n\t\t{\r\n\r\n\t\t\tfor($j=0;$j<$pa_count; $j++)\r\n\t\t\t{\r\n\t\t\t\t$pa_current = html_entity_decode($results[$i]->{\"Practice Area\"});\r\n\t\t\t\t$pa_update = $ymuser['Practiceareas'][$j];\r\n\r\n\t\t\t\tif( strcasecmp(trim($pa_update),trim($pa_current)) == 0 ) \r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\t$user_meta[$pa_key] = $pa_value;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t\t\t$user_meta[$pa_key] = $pa_value;\r\n\t\t}\r\n\t}\r\n\t//die();\r\n\t\r\n\t$user_meta['soak_pp_last_modified'] = date(\"m/d/y H:i\");\r\n\t\r\n\t\r\n\t//To check the same user exists in CRF website or not. If not exists will create new account in CRF website\r\n\t$user_id = username_exists( $username );\r\n\r\n\tif(!$user_id)\r\n\t\t$user_id = email_exists($username);\r\n\r\n\t\r\n\tif ( !$user_id and email_exists($ymuser['EmailAddr']) == false ) {\r\n\t\t$user_id = wp_create_user( $username, $password, $ymuser['EmailAddr'] );\r\n\r\n\t\t$user_meta['soak_pp_show_contact_email'] = \"FALSE\";\r\n\t\t$user_meta['soak_pp_show_contact_telephone'] = \"FALSE\";\r\n\t\t\r\n\t\t\r\n\t\t//update meta data\r\n\t\tupdate_user_meta_data($user_id,$user_meta);\r\n\t\t\r\n\t\treturn $user_id;\r\n\t\t\r\n\t} \r\n\t\t//if user exist in CRF site\r\n\telseif ($user_id)\r\n\t{\r\n\t\t//If user exists update password for user CRF website to sysnch password in both YM and CRF website. \r\n\t\t//Also update member profile information to synch both YM and CRF website\r\n\t\twp_set_password($password,$user_id);\r\n\t\t\r\n\t\t//update email address\r\n\t\twp_update_user( array( 'ID' => $user_id, 'user_email' => $ymuser['EmailAddr'] ) );\r\n\t\t\r\n\t\t//delete meta practice areas\r\n\t\tdelete_user_meta_data($user_id,$delete_user_meta);\r\n\t\t\r\n\t\t//update meta data\r\n\t\tupdate_user_meta_data($user_id,$user_meta);\r\n\t\t\r\n\t\t\t\t\r\n\treturn $user_id;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t echo $user->login; //if both cases or not valied then redirecting to login.\r\n\t}\r\n\r\n\t//if user exists in YM and if password entered wrong then it will redirected to login CRF website.\r\n\tif ( is_wp_error($user) )\r\n\t\techo $user->login;\t\r\n\t\r\n\r\n\t return false;\r\n}", "function boardz_reshape_user_origin(&$u, $extension = '') {\n global $CFG;\n\n $userhostidfield = (empty($extension)) ? 'userhostid' : 'userhostid_'.$extension ;\n $userhostfield = (empty($extension)) ? 'userhost' : 'userhost_'.$extension ;\n \n if ($u->$userhostidfield == 1) {\n $u->$userhostfield = 'local';\n } elseif ($u->$userhostidfield == 2) {\n $u->$userhostfield = 'allhosts';\n } else {\n $u->$userhostfield = format_string($u->$userhostfield);\n }\n}", "function user_form_uuid_resolver_user_settings_form_alter(&$form, &$form_state) {\n $form['#submit'][] = 'uuid_resolver_user_extra_settings_form_submit';\n $form['use_alias'] = array(\n '#title' => t('Redirect to path alias.'),\n '#description' => t('If checked, the resolver will redirect to the aliased path instead of the system path.'),\n '#type' => 'checkbox',\n '#default_value' => variable_get('uuid_resolver_user_use_alias', UUID_RESOLVER_USER_USE_ALIAS),\n );\n}", "function my_show_extra_profile_fields($user) { \r\n\tfunction get_user_role($id=null){\r\n\t\tglobal $current_user;\r\n\t\t\tif(!$id) $id = $current_user->ID;\r\n\t\tif ( is_user_logged_in() ) {\r\n\t\t\t\t$user = new WP_User( $id );\r\n\t\tif ( !empty( $user->roles ) && is_array( $user->roles ) ) {\r\n\t\t\t\tforeach ( $user->roles as $role ){\r\n\t\t\t\treturn $role;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\t\t$fullName = get_the_author_meta( 'fullname', $user->ID ) == '' ? get_the_author_meta( 'nickname', $user->ID ) : get_the_author_meta( 'fullname', $user->ID );\r\n\t\t$customRole = get_the_author_meta( 'customrole', $user->ID ) == '' ? get_user_role($user->ID) : get_the_author_meta( 'customrole', $user->ID );\r\n\t\t$website = get_the_author_meta( 'homepage', $user->ID ) == '' ? get_the_author_meta( 'user_url', $user->ID ) : get_the_author_meta( 'homepage', $user->ID );\r\n\t\t$googlePlus = get_the_author_meta( 'google', $user->ID ) == '' ? get_the_author_meta( 'googleplus', $user->ID ) : get_the_author_meta( 'google', $user->ID );\r\n?>\r\n <h3>Custom profile information</h3> \r\n\t\t<table class=\"form-table\">\r\n\t\t <tr>\r\n <th><label for=\"full-name\">Full name</label></th>\r\n\t\t\t <td>\r\n\t\t<input type=\"text\" name=\"fullname\" id=\"full-name\" value=\"<?php echo $fullName; ?>\" class=\"regular-text\" /><br />\r\n\t\t\t </td>\r\n\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n <th><label for=\"designations\">Designations</label></th>\r\n\t\t\t\t<td>\r\n <input type=\"text\" name=\"designations\" id=\"designations\" value=\"<?php echo esc_attr( get_the_author_meta( 'designations', $user->ID ) ); ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th><label for=\"custom-role\">Role</label></th>\r\n <td>\r\n <input type=\"text\" name=\"customrole\" id=\"custom-role\" value=\"<?php echo $customRole; ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr> \r\n <tr>\r\n <th><label for=\"facebook\">Facebook</label></th>\r\n <td>\r\n <input type=\"text\" name=\"facebook\" id=\"facebook\" value=\"<?php echo esc_attr( get_the_author_meta( 'facebook', $user->ID ) ); ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th><label for=\"twitter\">Twitter</label></th>\r\n <td>\r\n <input type=\"text\" name=\"twitter\" id=\"twitter\" value=\"<?php echo esc_attr( get_the_author_meta( 'twitter', $user->ID ) ); ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th><label for=\"youtube\">Youtube</label></th>\r\n <td>\r\n <input type=\"text\" name=\"youtube\" id=\"youtube\" value=\"<?php echo esc_attr( get_the_author_meta( 'youtube', $user->ID ) ); ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th><label for=\"google\">Google+</label></th>\r\n <td>\r\n <input type=\"text\" name=\"google\" id=\"google\" value=\"<?php echo $googlePlus; ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th><label for=\"linkedin\">LinkedIn</label></th>\r\n <td>\r\n <input type=\"text\" name=\"linkedin\" id=\"linkedin\" value=\"<?php echo esc_attr( get_the_author_meta( 'linkedin', $user->ID ) ); ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th><label for=\"homepage\">Personal website</label></th>\r\n <td>\r\n <input type=\"text\" name=\"homepage\" id=\"homepage\" value=\"<?php echo $website; ?>\" class=\"regular-text\" /><br />\r\n </td>\r\n </tr> \r\n </table>\r\n<?php \r\n}", "function wp_user_control_logged_in_user( $customLink, $customLinkTitle, $displayAvatar ) {\n\tget_currentuserinfo(); global $current_user; ?>\n\t<div id=\"wp-user-control-sidebox\">\r\n\t\t<h3><?php echo __( 'Welcome,', 'wp-user-control' ) . ' ' . $current_user->display_name; ?></h3>\r\n <?php if ( $displayAvatar === 'enabled' ) { ?>\r\n \t<div id=\"wp-user-control-usericon\">\r\n \t<?php echo get_avatar( $current_user->ID, 60 ); ?>\r\n \t</div>\r\n <?php } ?>\r\n \t<div id=\"wp-user-control-userinfo\">\r\n \t\t<p><?php _e( \"You're logged in as\", 'wp-user-control' ); ?> \n \t\t\t<strong><?php echo $current_user->display_name; ?></strong>\n \t\t</p>\r\n \t\t<p>\r\n \t\t\t<a href=\"<?php echo wp_logout_url( wp_user_control_cleanURI( $_SERVER['REQUEST_URI'] ) ) ; ?>\"><?php _e( 'Log out', 'wp-user-control' ); ?></a> &nbsp;|&nbsp; \n \t\t\t<?php \n \t\t\t/*\r\n \t\t\t * Use admin_url() instead of network_admin_url() for WPMS because network_admin_url()\r\n \t\t\t * will always point to the primary site admin dashboard rather than the current network site\r\n \t\t\t */\r\n \t\t\tif ( force_ssl_admin() ) {\r\n \t\t\t\tif ( strpos( admin_url(), 'http://' ) == 0 ) {\r\n \t\t\t\t\t$admin_url = str_replace( 'http://', 'https://', admin_url() );\r\n \t\t\t\t} else {\n\t\t\t\t\t\t$admin_url = admin_url();\n\t\t\t\t\t}\r\n \t\t\t} else {\n\t\t\t\t\t$admin_url = admin_url();\n\t\t\t\t}\r\n \t\t\t// check user capability\r\n \t\t\tif ( current_user_can( 'manage_options' ) ) { \r\n\t \t\t\t// output admin link if appropriate\r\n \t\t\t\techo '<a href=\"' . $admin_url . '\">' . __( 'Admin', 'wp-user-control' ) . '</a>'; \r\n \t\t\t} else { \r\n \t\t\t\t// output profile link\r\n \t\t\t\techo '<a href=\"' . $admin_url . 'profile.php\">' . __( 'Profile', 'wp-user-control' ) . '</a>'; \r\n \t\t\t}\r\n \t\t\t// output custom link, if desired\r\n \t\t\tif ( !empty( $customLink ) && !empty( $customLinkTitle ) ) {\r\n \t\t\t\techo ' &nbsp;|&nbsp; <a href=\"' . $customLink . '\">' . $customLinkTitle . '</a>';\r\n \t\t\t}\r\n \t\t\t?>\r\n \t\t</p>\r\n \t</div>\r\n </div> <?php \n}", "function learn_press_update_extra_user_profile_fields( $user_id ) {\n\tif ( ! current_user_can( 'edit_user', $user_id ) ) {\n\t\treturn;\n\t}\n\n\tif ( isset( $_POST['_lp_extra_info'] ) ) {\n\t\tupdate_user_meta( $user_id, '_lp_extra_info', $_POST['_lp_extra_info'] );\n\t}\n}", "function skwp_change_author_permalinks() {\n\t\n\t global $wp_rewrite;\n\t $wp_rewrite->author_base = 'profiles';\n\t $wp_rewrite->author_structure = '/' . $wp_rewrite->author_base. '/%author%';\n\t \n\t}", "function save_user_meta_data( $user_id ) \n\t{\n\t\t//initializing variables\n\t\t$user = new WP_User( $user_id );\n\t\t$fields = array();\n\t\t\n\t\t$fields = wp_parse_args($fields, get_custom_user_fields( $user->roles[0] ));\n\t\t\n\t\t//reasons to fail\n\t\tif (empty($fields)) return false;\n\t\t\n\t\t//load library\n\t\trequire_once ABSPATH.WPINC.\"/pluggable.php\";\n\t\t\n\t\t// verify nonce\n\t\tif (!wp_verify_nonce(BRequest::getVar('user_meta_box_nonce'), basename(__FILE__))) {\n\t\t\treturn $user_id;\n\t\t}\n\t\t\n\t\t// check autosave\n\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n\t\t\treturn $user_id;\n\t\t}\n\t\t\n\t\tif (is_array($fields))\n\t\t{\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\tif (!isset($_POST[$field['id']])) continue;\n\n\t\t\t\t$old = get_user_meta($user_id, $field['id'], true);\n\t \t\t$new = BRequest::getVar($field['id'],\"\");\n\n\t \t\tif ($new && $new != $old)\n\t \t\t{\n\t \t\t\t//if ($field['type'] == \"address\") save_latitude_and_longitude($post_id,$new);\n\t \t\t\tupdate_user_meta($user_id, $field['id'], $new);\n\t \t\t}\n\t \t\telseif ('' == $new && $old)\n\t \t\t{\n\t \t\t\tdelete_user_meta($user_id, $field['id'], $old);\n\t \t\t}\n\t \t\t\n\t \t}\n\t \treturn true;\n\t }\n\t \n\t}", "function setUserSettings($user) {\r\n\r\n\t\t$user['settings'] = $this->getUserSettings($user['user_id']);\r\n\r\n\t\treturn $user;\r\n\r\n\t}", "function theme_wpdc_settings_importer() {\n if (!current_user_can('manage_options')) {\n wp_die('You do not have sufficient permissions to access this page.');\n }else{ ?>\n\n <style>\n .update-nag input {\n margin: 0;\n padding: 0;\n background: transparent;\n border: 0;\n font-size: inherit;\n color: #0073aa;\n text-decoration: underline;\n cursor: pointer;\n }\n </style>\n <div class=\"wrap\" class=\"\">\n\n <?php if (isset($_POST[\"update_settings_opuser\"])) { ?>\n <div class=\"wrap updated\">\n <?php $users = get_users();\n foreach ($users as $user){\n $user_meta = get_user_meta($user->ID);\n if(isset($user_meta['op_user'])) continue;\n add_op_user_meta( $user->ID );\n echo \"<p>UsuarioID: \".$user->ID.\" usermeta updated.</p>\";\n } ?>\n </div>\n <?php }else {\n $users = get_users();\n $cleared_users = 0;\n foreach ($users as $user){\n $user_meta = get_user_meta($user->ID);\n if(!isset($user_meta['op_user'])) $cleared_users++;\n }\n }\n ?>\n \n <h2>Configuración de usuarios y roles</h2>\n <form method=\"POST\" action=\"\">\n <?php if($cleared_users > 0) {?>\n <div class=\"wrap update-nag\">\n <p><strong>Se ha observado <?php echo $cleared_users;?> usuarios sin datos meta necesarios para el correcto funcionamiento del sitio. ¿Desea actualizarlos? </strong><input type=\"submit\" name=\"update_settings_opuser\" value=\"Actualizar usuarios\"/>\n <br>Message: Set $user_meta->op_user with default values in users with null op_user (news or imported users)</p>\n </div>\n <?php } ?>\n </form>\n\n <form method=\"POST\" action=\"\">\n <h2>Importar usuarios de AEDI</h2>\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><label for=\"automate_twitter\">Activar automatización</label></th>\n <td><input type=\"checkbox\" name=\"automate_twitter\" value=\"true\" <?php if($automate_twitter == true) echo 'checked';?>/></td>\n </tr>\n </table>\n <p class=\"submit\">\n <input type=\"hidden\" name=\"update_settings_twitter\" value=\"Y\" />\n <input type=\"submit\" class=\"button button-primary\" value=\"Guardar cambios\">\n </p>\n </form>\n\n </div>\n <?php }\n}", "public function updateMetadata(OctoberUser $user, $wordpressId)\n {\n $metadata = $this->db\n ->table('wp_usermeta')\n ->where('user_id', $wordpressId)\n ->get();\n\n // Organize the metadata for mapping to user fields\n $data = [\n 'phone' => '',\n 'street_address' => '',\n 'city' => '',\n 'state' => '',\n 'zip' => '',\n 'first_name' => '',\n 'last_name' => '',\n '_badgeos_points' => '',\n 'email_optin' => false,\n 'current_member' => false,\n 'current_member_number' => '',\n ];\n\n foreach($metadata as $mdata) {\n $data[$mdata->meta_key] = $mdata->meta_value;\n }\n\n $user->phone = $data['phone'];\n $user->street_addr = $data['street_address'];\n $user->city = $data['city'];\n $user->zip = $data['zip'];\n $user->points = $data['_badgeos_points'];\n\n // Ensures that we have a barcode id for the user\n if (empty($user->barcode_id)) {\n $user->barcode_id = $user->name;\n }\n\n // Populate state and country objects\n if (!empty($data['state'])) {\n $state = State::where('code', strtoupper($data['state']))->first();\n if (!$state) {\n $state = State::where('name', $data['state'])->first();\n }\n\n if ($state) {\n $user->state()->associate($state);\n $user->country()->associate(Country::find($state->country_id));\n }\n }\n\n $metadata = new Usermeta;\n $metadata->first_name = $data['first_name'];\n $metadata->last_name = $data['last_name'];\n $metadata->email_optin = $data['email_optin'];\n $metadata->current_member = $data['current_member'];\n $metadata->current_member_number = $data['current_member_number'];\n\n try {\n $user->forceSave();\n $user->metadata()->delete();\n $user->metadata()->save($metadata);\n } catch(Exception $e) {\n var_dump($e);\n }\n }", "function wpmu_signup_user($user, $user_email, $meta = array())\n{\n}", "public function saveUsermeta( Request $request )\n {\n //\n //{ 'meta-key':'background-color', 'meta-value' : this.settings.bgColor }\n\n if( $request->user()->id ) {\n\n $usermeta = Usermeta::where( ['meta_key' => $request->post('meta-key' ), 'user_id' => $request->user()->id ] )->first() ;\n\n if( $usermeta == null ) {\n $usermeta = new Usermeta();\n }\n\n //dd( $usermeta );\n\n $usermeta->user_id = $request->user()->id;\n $usermeta->meta_key = $request->post(\"meta-key\");\n $usermeta->meta_value = $request->post(\"meta-value\");\n $usermeta->group = \"settings\";\n\n if( $usermeta->save( ) ) {\n return response([ 'success' => true, 'message' => 'Settings saved!']);\n }\n }\n\n return response( ['message' => 'You don\\'t have permission for this', 'success' => false] , 403);\n }", "function pmproiufcsv_is_iu_pre_user_import($userdata, $usermeta) {\r\n\t//try to get user by ID\r\n\t$user = $user_id = false;\t\r\n\tif ( isset( $userdata['ID'] ) )\r\n\t\t$user = get_user_by( 'ID', $userdata['ID'] );\r\n\r\n\t//try to find user by login or email\r\n\tif ( ! $user ) {\r\n\t\tif ( isset( $userdata['user_login'] ) )\r\n\t\t\t$user = get_user_by( 'login', $userdata['user_login'] );\r\n\r\n\t\tif ( ! $user && isset( $userdata['user_email'] ) )\r\n\t\t\t$user = get_user_by( 'email', $userdata['user_email'] );\r\n\t}\r\n\t\r\n\t//if we found someone delete the import_ user meta\r\n\tif(!empty($user)) {\r\n\t\t$pmpro_fields = pmproiufcsv_getFields();\r\n\t\t\r\n\t\tforeach($pmpro_fields as $field) {\r\n\t\t\tdelete_user_meta($user->ID, \"import_\" . $field);\r\n\t\t}\r\n\t}\r\n}", "function get_profile_url($userdata, $args = array())\n{\n\t$url = _URL;\n\t\n\t// give priority to channel_slug \n\tif (_SEOMOD)\n\t{\n\t\t$url .= '/user/'. (($userdata['channel_slug'] != '') ? $userdata['channel_slug'] : $userdata['username']) .'/';\n\t\t$url .= ($args['view'] != '') ? $args['view'] .'/' : '';\n\t}\n\telse\n\t{\n\t\t$url .= '/user.php?u='. (($userdata['channel_slug'] != '') ? $userdata['channel_slug'] : $userdata['username']);\n\t\t$url .= ($args['view'] != '') ? '&view='. $args['view'] : '';\n\t}\n\t\n\treturn $url; \n}", "public function set_user_url($username, $user_id = 0)\n\t{\n\t\tif (empty($this->seo_url['user'][$user_id]))\n\t\t{\n\t\t\t$username = strip_tags($username);\n\n\t\t\t$this->seo_url['username'][$username] = $user_id;\n\n\t\t\tif ($this->seo_opt['profile_inj'])\n\t\t\t{\n\t\t\t\tif ($this->seo_opt['profile_noids'])\n\t\t\t\t{\n\t\t\t\t\t$this->seo_url['user'][$user_id] = $this->seo_static['user'] . '/' . $this->seo_url_encode($username);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->seo_url['user'][$user_id] = $this->format_url($username, $this->seo_delim['user']) . $this->seo_delim['user'] . $user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->seo_url['user'][$user_id] = $this->seo_static['user'] . $user_id;\n\t\t\t}\n\t\t}\n\t}", "function franchise_custom_profile_save($user_id) {\n if (!current_user_can('edit_user', $user_id))\n return false;\n update_user_meta($user_id, 'contact_person', $_POST['contact_person']);\n update_user_meta($user_id, 'area', $_POST['area']);\n update_user_meta($user_id, 'address', $_POST['address']);\n update_user_meta($user_id, 'working_hours', $_POST['working_hours']);\n update_user_meta($user_id, 'telephone', $_POST['telephone']);\n update_user_meta($user_id, 'lon', $_POST['lon']);\n update_user_meta($user_id, 'lat', $_POST['lat']);\n update_user_meta($user_id, 'remarks', $_POST['remarks']);\n $posted_id = get_user_meta($user_id, 'post_id', true);\n //Create a store post\n $post = array(\n 'ID' => $posted_id == '' ? 0 : $posted_id,\n 'post_type' => 'wpsl_stores',\n 'post_status' => 'publish',\n 'post_title' => wp_strip_all_tags($_POST['contact_person']),\n 'post_content' => $_POST['first_name'] . ' ' . $_POST['last_name']\n );\n\n $post_id = wp_insert_post($post);\n update_user_meta($user_id, 'post_id', $post_id); //\n update_post_meta($post_id, 'wpsl_address', $_POST['area']);\n update_post_meta($post_id, 'wpsl_city', $_POST['address']);\n update_post_meta($post_id, 'wpsl_country', 'United States');\n update_post_meta($post_id, 'wpsl_phone', $_POST['telephone']);\n update_post_meta($post_id, 'wpsl_hours', $_POST['working_hours']);\n update_post_meta($post_id, 'wpsl_lat', $_POST['lat']);\n update_post_meta($post_id, 'wpsl_lng', $_POST['lon']);\n update_post_meta($post_id, 'wpsl_country_iso', 'US');\n}", "public function set_customer_referer( $user_id ) {\n\t\t// no user id? return\n\t\tif ( ! $user_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// if we have a referer, get it and set in order meta\n\t\tif ( isset( $_COOKIE['metorik_http_referer'] ) ) {\n\t\t\t$referer = apply_filters( 'metorik_customer_referer', sanitize_text_field( $_COOKIE['metorik_http_referer'] ) );\n\t\t\tupdate_user_meta( $user_id, '_metorik_referer', $referer );\n\t\t}\n\n\t\t// If we have any UTM tags, set them\n\t\tforeach ( $this->possibleUtms as $utm ) {\n\t\t\tif ( isset( $_COOKIE['metorik_' . $utm] ) ) {\n\t\t\t\t$value = sanitize_text_field( $_COOKIE['metorik_' . $utm] );\n\t\t\t\tupdate_user_meta( $user_id, '_metorik_' . $utm, $value );\n\t\t\t}\n\t\t}\n\n\t\t// if we have a metorik engage key, get it and set in customer meta\n\t\tif ( isset( $_COOKIE['metorik_engage'] ) ) {\n\t\t\t$engage = apply_filters( 'metorik_order_engage', sanitize_text_field( $_COOKIE['metorik_engage'] ) );\n\t\t\tupdate_user_meta( $user_id, '_metorik_engage', $engage );\n\t\t}\n\t}", "function onPersonalUrls(array &$personal_urls, Title $title, SkinTemplate $skin) {\n\n global $wgArticleUrl, $wgUser;\n\n //do not display the link to Special:UserPage if the user is not in the ManuscriptEditors group\n if (!in_array('ManuscriptEditors', $wgUser->getGroups())) {\n unset($personal_urls['userpage']);\n return true;\n }\n\n //if the current user is in the ManuscriptEditors group, change the link \n $personal_urls['userpage']['href'] = $wgArticleUrl . 'Special:UserPage';\n return true;\n}", "function profile_manager_username_change_forward_hook($hook_name, $entity_type, $return_value, $parameters){\r\n\t\t$username = get_input(\"username\");\r\n\t\tif(!empty($username)){\r\n\t\t\treturn elgg_get_site_url() . \"settings/user/\" . $username;\r\n\t\t}\r\n\t}", "function the_author_meta($field = '', $user_id = \\false)\n{\n}", "function fetch_user_custom_fields(){\t\r\n\tglobal $wpdb,$current_user,$form_fields_usermeta;\r\n\t\r\n\t$args = array(\r\n\t\t\t\t'post_type' => 'custom_user_field',\r\n\t\t\t\t'post_status' => 'publish',\r\n\t\t\t\t'numberposts'\t => -1,\r\n\t\t\t\t'meta_key' => 'sort_order',\r\n\t\t\t\t'orderby' => 'meta_value_num',\r\n\t\t\t\t'meta_value_num' => 'sort_order',\r\n\t\t\t\t'order' => 'ASC'\r\n\t\t\t);\r\n\t$custom_metaboxes_fields = get_posts( $args );\r\n\tif(isset($custom_metaboxes_fields) && $custom_metaboxes_fields != '')\r\n\t{\r\n\t\t$form_fields_usermeta_usermeta = array();\r\n\t\tforeach($custom_metaboxes_fields as $custom_metaboxes)\r\n\t\t{\r\n\t\t\t$name = $custom_metaboxes->post_name;\r\n\t\t\t$site_title = stripslashes($custom_metaboxes->post_title);\r\n\t\t\t$type = get_post_meta($custom_metaboxes->ID,'ctype',true);\r\n\t\t\t$default_value = get_post_meta($custom_metaboxes->ID,'default_value',true);\r\n\t\t\t$is_require = get_post_meta($custom_metaboxes->ID,'is_require',true);\r\n\t\t\t$admin_desc = $custom_metaboxes->post_content;\r\n\t\t\t$option_values = get_post_meta($custom_metaboxes->ID,'option_values',true);\r\n\t\t\t$option_titles = get_post_meta($custom_metaboxes->ID,'option_titles',true);\r\n\t\t\t$on_registration = get_post_meta($custom_metaboxes->ID,'on_registration',true);\r\n\t\t\t$on_profile = get_post_meta($custom_metaboxes->ID,'on_profile',true);\r\n\t\t\t$on_author_page = get_post_meta($custom_metaboxes->ID,'on_author_page',true);\r\n\t\t\t\r\n\t\t\tif(is_admin())\r\n\t\t\t{\r\n\t\t\t\t$label = '<tr><th>'.$site_title.'</th>';\r\n\t\t\t\t$outer_st = '<table class=\"form-table\">';\r\n\t\t\t\t$outer_end = '</table>';\r\n\t\t\t\t$tag_st = '<td>';\r\n\t\t\t\t$tag_end = '<span class=\"message_note\">'.$admin_desc.'</span></td></tr>';\r\n\t\t\t\t$tag_before = '';\r\n\t\t\t\t$tag_after = '';\r\n\t\t\t} else {\r\n\t\t\t\t$label = $site_title;\r\n\t\t\t\t$outer_st = '<div class=\"form_row clearfix\">';\r\n\t\t\t\t$outer_end = '</div>';\r\n\t\t\t\t$tag_st = '';\r\n\t\t\t\t$tag_end = '<span class=\"message_note\">'.$admin_desc.'</span>';\r\n\t\t\t\t$tag_before = '';\r\n\t\t\t\t$tag_after = '';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($type == 'text')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'text',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" size=\"25\" class=\"textfield\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\" \t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif($type == 'head')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'head',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" size=\"25\" class=\"head\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'checkbox')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'checkbox',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" size=\"25\" class=\"checkbox\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'textarea')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'textarea',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" size=\"25\" class=\"textarea\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'texteditor')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'texteditor',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" size=\"25\" class=\"mce\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => '<div class=\"clear\">',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => '</div>',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'select')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'select',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"options\"\t => $option_values,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"option_titles\" => $option_titles,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'radio')\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'radio',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"options\"\t => $option_values,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"option_titles\" => $option_titles,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'multicheckbox')\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'multicheckbox',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"options\"\t => $option_values,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"option_titles\" => $option_titles,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => '<div class=\"form_cat\">',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => '</div>',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'date')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'date',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" size=\"25\" class=\"textfield_date\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\" \t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'upload')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'upload',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => 'id=\"'.$name.'\" class=\"textfield\"',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => $outer_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => $outer_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => $tag_st,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => $tag_end,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'head')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => $label,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'head',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => '<h1 class=\"form_title\">',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => '</h1>',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\telseif($type == 'geo_map')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'geo_map',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\t\t\r\n\t\t\t}\r\n\t\t\telseif($type == 'image_uploader')\r\n\t\t\t{\r\n\t\t\t\t$form_fields_usermeta[$name] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"label\"\t\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\"\t\t => 'image_uploader',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"default\"\t => $default_value,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"extra\"\t\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"is_require\"\t => $is_require,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_st\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"outer_end\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_st\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_end\"\t => '',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_before\" => $tag_before,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"tag_after\" => $tag_after,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_registration\" => $on_registration,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_profile\"\t => $on_profile,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"on_author_page\" => $on_author_page,\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $form_fields_usermeta;\r\n\t}/* finish if condition */\r\n\t\r\n}", "function update_profile_modified( $user_id ) {\r\n update_user_meta( $user_id, 'user_profile_updated', current_time( 'mysql' ) );\r\n}", "static function save_metaData($userId ) {\r\n\t \tif ( !isset( $_POST['wpXSG_meta_nonce'] ) || !wp_verify_nonce( $_POST['wpXSG_meta_nonce'], basename( __FILE__ ) ) )\r\n\t \treturn ;\r\n\r\n\t\r\n\t\t/* Check if the current user has permission to edit the post. */\r\n\t\tif ( !current_user_can( 'edit_user') )\r\n\t\treturn $userId;\r\n\r\n \r\n\t \t$settings = new metaSettings();\r\n\t\t\r\n\t\t$settings->id = ( isset( $_POST['wpXSG-metaId'] ) ? $_POST['wpXSG-metaId'] : '0' );\r\n\t \t$settings->itemId = $userId ;\r\n\t\t$settings->itemType = \"author\";\r\n\t \t$settings->exclude = ( isset( $_POST['wpXSG-Exclude'] ) ? $_POST['wpXSG-Exclude'] : '0' );\r\n\t \t$settings->priority = ( isset( $_POST['wpXSG-Priority'] ) ? $_POST['wpXSG-Priority'] : 'default' );\r\n\t \t$settings->frequency = ( isset( $_POST['wpXSG-Frequency'] ) ? $_POST['wpXSG-Frequency'] : 'default' );\r\n\t\t$settings->inherit = ( isset( $_POST['wpXSG-Inherit'] ) ? $_POST['wpXSG-Inherit'] : 0 );\r\n\t\t\t\r\n\t\tdataAccess::saveMetaItem($settings );\r\n\r\n\t\t\r\n\t\r\n\t}", "public function action_personal_options_update($user_id)\n {\n $auth_data = isset($_POST[$this->users_meta_key]) ? $_POST[$this->users_meta_key] : false;\n // Parse for nonce\n if (!is_array($auth_data) || !array_key_exists('nonce', $auth_data)) {\n return;\n }\n\n $is_disabling = wp_verify_nonce($auth_data['nonce'], $this->users_meta_key . 'enable_own') &&\n empty($auth_data['enable_own']);\n $is_enabling = wp_verify_nonce($auth_data['nonce'], $this->users_meta_key . 'enable_own') &&\n !empty($auth_data['enable_own']);\n // die(var_dump($is_disabling));\n\n $user_data = $this->get_auth_data($user_id);\n\n\n if ($is_disabling) {\n // Delete Auth usermeta if requested\n\n if ($this->is_auth_user($user_id)) {\n $this->delete_token($user_data['token_id']);\n }\n delete_user_meta($user_id, $this->users_meta_key);\n return;\n } else {\n\n if (!$this->is_auth_user($user_id)) {\n $data['token_id'] = $this->create_token($user_data);\n update_user_meta($user_id, $this->users_meta_key, $data);\n }\n //$this->register_auth_fields();\n //$this->register_auth_user($this->auth_fields);\n // $this->set_auth_data($new_data);\n }\n }", "function ee__login_redirect( $url, $request, $user ){\n if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {\n if( $user->has_cap( 'administrator' ) ) {\n $url = admin_url();\n } else {\n $url = home_url('/wp-admin/profile.php');\n }\n }\n return $url;\n}", "function save_usermeta_juridica(\n $user,\n $pessoaJuridica\n) {\n update_user_meta( absint($user), 'responsavel_nome_completo_do_responsavel', wp_kses_post($pessoaJuridica->responsavel_nome_completo_do_responsavel));\n update_user_meta( absint($user), 'responsavel_email_do_responsavel', $pessoaJuridica->responsavel_email_do_responsavel);\n update_user_meta( absint($user), 'responsavel_celular_do_responsavel', $pessoaJuridica->responsavel_celular_do_responsavel);\n update_user_meta( absint($user), 'responsavel_telefone_fixo_do_responsavel', $pessoaJuridica->responsavel_telefone_fixo_do_responsavel);\n update_user_meta( absint($user), 'responsavel_substituto_nome_completo_do_responsavel', $pessoaJuridica->responsavel_substituto_nome_completo_do_responsavel);\n update_user_meta( absint($user), 'responsavel_substituto_email_do_responsavel', $pessoaJuridica->responsavel_substituto_email_do_responsavel);\n update_user_meta( absint($user), 'responsavel_substituto_celular_do_responsavel', $pessoaJuridica->responsavel_substituto_celular_do_responsavel);\n update_user_meta( absint($user), 'responsavel_substituto_telefone_fixo_do_responsavel', $pessoaJuridica->responsavel_substituto_telefone_fixo_do_responsavel);\n update_user_meta( absint($user), 'nome_fantasia', get_userdata($user->id)->first_name);\n update_user_meta( absint($user), 'cnpj', $pessoaJuridica->cnpj);\n update_user_meta( absint($user), 'cep', $pessoaJuridica->cep);\n update_user_meta( absint($user), 'logradouro', $pessoaJuridica->logradouro);\n update_user_meta( absint($user), 'numero', $pessoaJuridica->numero);\n update_user_meta( absint($user), 'bairro', $pessoaJuridica->bairro);\n update_user_meta( absint($user), 'cidade', $pessoaJuridica->cidade);\n update_user_meta( absint($user), 'estado', $pessoaJuridica->estado);\n update_user_meta( absint($user), 'tipo_de_instituicao', $pessoaJuridica->tipo_de_instituicao);\n update_user_meta( absint($user), 'tamanho_da_empresa', $pessoaJuridica->tamanho_da_empresa);\n update_user_meta( absint($user), 'perfil_institucional', $pessoaJuridica->perfil_institucional);\n update_user_meta( absint($user), 'possui_ambientes_ou_grupos_voltados_a_pesquisa_e_inovacao', $pessoaJuridica->possui_ambientes_ou_grupos_voltados_a_pesquisa_e_inovacao);\n update_user_meta( absint($user), 'temas_de_interesse_', $pessoaJuridica->temas_de_interesse_);\n update_user_meta( absint($user), 'li_e_aceito_o_termo_de_adesao', $pessoaJuridica->li_e_aceito_o_termo_de_adesao);\n\n echo '<div class=\"container\">';\n echo '<div class=\"row\">';\n echo '<div class=\"col-md-12\">';\n echo '<div class=\"alert alert-success\" role=\"alert\">Registro completo!.';\n echo 'Vá para a <a href=\"' . get_site_url() . '/wp-login.php\">página de login</a></div>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n\n}", "function elgg_modifications_create_user_event_handler($event, $object_type, $object){\n\tif (elgg_instanceof($object, \"user\")) {\n\t\tif (subsite_manager_on_subsite()) {\n\t\t\t$object->setPrivateSetting(\"digest_\" . elgg_get_site_entity()->getOwnerGUID(), \"none\");\n\t\t}\n\t}\n}", "public function bp_custom_registration_role($user_id, $key, $user) {\n $userdata = array();\n $userdata['ID'] = $user_id;\n $userdata['role'] = 'veganer'; \n wp_update_user($userdata); \n }", "public static function edit_user_profile_update($user_id) {\n $new_value = filter_input(INPUT_POST, 'publishing_importer_initials');\n $new_value = preg_replace('@\\r?\\n+@', \"\\n\", $new_value);\n $new_value = array_filter(explode(\"\\n\", $new_value));\n sort($new_value);\n\n $old_value = get_user_meta($user_id, 'publishing_importer_initials', FALSE);\n if ($old_value != $new_value) {\n delete_user_meta($user_id, 'publishing_importer_initials');\n if ($new_value) {\n foreach ($new_value as $val) {\n add_user_meta($user_id, 'publishing_importer_initials', $val, FALSE);\n }\n }\n }\n }", "function custom_user_profile_fields($profileuser)\n{\n ?>\n <tr>\n <th>\n <label for=\"image\"><?php _e('Custom Local Avatar', 'ayecode'); ?></label>\n </th>\n <td>\n <?php\n // Check whether we saved the custom avatar, else return the default avatar.\n $custom_avatar = get_the_author_meta('ayecode-custom-avatar', $profileuser->ID);\n if ($custom_avatar == '') {\n $custom_avatar = get_avatar_url($profileuser->ID);\n } else {\n $custom_avatar = esc_url_raw($custom_avatar);\n }\n ?>\n <img style=\"width: 96px; height: 96px; display: block; margin-bottom: 15px;\" class=\"custom-avatar-preview\" src=\"<?php echo $custom_avatar; ?>\">\n <input type=\"text\" name=\"ayecode-custom-avatar\" id=\"ayecode-custom-avatar\" value=\"<?php echo esc_attr(esc_url_raw(get_the_author_meta('ayecode-custom-avatar', $profileuser->ID))); ?>\" class=\"regular-text\" />\n <input type='button' class=\"avatar-image-upload button-primary\" value=\"<?php esc_attr_e(\"Upload Image\", \"ayecode\"); ?>\" id=\"uploadimage\" /><br />\n <span class=\"description\">\n <?php _e('Please upload a custom avatar for your profile, to remove the avatar simple delete the URL and click update.', 'ayecode'); ?>\n </span>\n </td>\n </tr>\n </table>\n<?php\n}", "function map_taxonomy($user_id, $config, $entry, $user_pass)\n{\n\n global $wpdb;\n\n // Get all taxonomies\n $taxs = get_taxonomies();\n\n // Get all user meta\n $all_meta_for_user = get_user_meta($user_id);\n\n // Loop through meta data and map to taxonomies with same name as user meta key\n foreach ($all_meta_for_user as $taxonomy => $value) {\n\n if (in_array($taxonomy, $taxs)) { // Check if there is a Taxonomy with the same name as the Custom user meta key\n\n // Get term id\n $term_id = get_user_meta($user_id, $taxonomy, true);\n if (is_numeric($term_id)) { // Check if Custom user meta is an ID\n\n $taxonomy . '=' . $term_id . '<br>';\n\n // Add user to taxomomy term\n $term = get_term($term_id, $taxonomy);\n $termslug = $term->slug;\n wp_set_object_terms($user_id, array($termslug), $taxonomy, false);\n }\n }\n }\n}", "function cpm_url_user( $user_id, $avatar = false, $size = 48 ) {\n $user = get_user_by( 'id', $user_id );\n $link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), \"user-edit.php?user_id=$user->ID\" ) );\n $name = $user->display_name;\n\n if ( $avatar ) {\n $name = get_avatar( $user_id, $size, $user->display_name );\n }\n\n $url = sprintf( '<a href=\"%s\">%s</a>', $link, $name );\n\n return apply_filters( 'cpm_url_user', $url, $user, $link, $avatar, $size );\n}", "protected function set_meta( $key, $value ) {\n update_user_meta( $this->get_id(), $key, $value );\n }" ]
[ "0.67196053", "0.6504721", "0.64475566", "0.6304205", "0.62791413", "0.6203797", "0.6192871", "0.6119597", "0.6113319", "0.60776424", "0.6034496", "0.6026021", "0.6026021", "0.6023991", "0.6021625", "0.6021625", "0.6013231", "0.6004343", "0.5984669", "0.5979235", "0.59755665", "0.5920253", "0.59021765", "0.5889626", "0.5879039", "0.5862906", "0.58493245", "0.58345616", "0.5820471", "0.5800831", "0.57952553", "0.57823604", "0.574499", "0.5733028", "0.5727033", "0.5698927", "0.56922394", "0.56903034", "0.5669745", "0.5655375", "0.5652865", "0.5647135", "0.56467104", "0.56409645", "0.5633491", "0.562802", "0.5622172", "0.5622172", "0.5602576", "0.5601284", "0.55924296", "0.55913645", "0.55857486", "0.5552045", "0.5546721", "0.5543158", "0.5535085", "0.5511918", "0.55092174", "0.55029213", "0.5499964", "0.54912704", "0.54725295", "0.54722047", "0.5466723", "0.54531217", "0.5437804", "0.5436432", "0.54342216", "0.5424042", "0.5416762", "0.5416413", "0.5411509", "0.54085964", "0.53996587", "0.5397615", "0.53873485", "0.53832954", "0.53817177", "0.5380457", "0.5378263", "0.5377556", "0.5374132", "0.537381", "0.5360134", "0.53583556", "0.53437924", "0.5334097", "0.5330978", "0.53264296", "0.53189117", "0.5314183", "0.5311615", "0.53113073", "0.53057176", "0.53027743", "0.5293037", "0.5286846", "0.52868074", "0.52849406" ]
0.7129823
0
Get the default title for an admin email notification
Получить default заголовок для уведомления электронной почты администратора
private static function default_title_for_admin_email() { return __( 'Admin Email Notification', 'frmreg' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function default_admin_email_subject() {\n\t\treturn sprintf( __( '[%s] New User Registration' ), '[sitename]' );\n\t}", "public function getAdminTitle()\n\t{\n\t return $this->_getHelper('heidelpay')->__($this->getConfigData('title'));\n\t}", "public function getGenericTitle()\n {\n return $this->email;\n }", "public function getTITLE () {\r\n\t\tif (!empty($this->title)) {\r\n\t\t\treturn ($this->title);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn ('Invitation');\r\n\t\t}\r\n\t}", "public function get_default_email_subject() {\n\t\t\t/**\n\t\t\t * Filter the default subject.\n\t\t\t * Note: This filter will deprecate soon.\n\t\t\t *\n\t\t\t * @since 1.0\n\t\t\t */\n\t\t\t$subject = apply_filters(\n\t\t\t\t'give_offline_admin_donation_notification_subject',\n\t\t\t\t__( 'New Pending Donation', 'give' )\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the default subject\n\t\t\t *\n\t\t\t * @since 2.0\n\t\t\t */\n\t\t\treturn apply_filters(\n\t\t\t\t\"give_{$this->config['id']}_get_default_email_subject\",\n\t\t\t\t$subject,\n\t\t\t\t$this\n\t\t\t);\n\t\t}", "function getLocalizedTitle() {\r\n\t\treturn $this->getLocalizedData('title');\r\n\t}", "public function getDisplayName() {\n return 'Mail notification block title';\n }", "function getLocalizedTitle() {\n\t\treturn $this->getLocalizedData('title');\n\t}", "public function getDefaultTitle()\n {\n if (!empty($this->getTitle())) {\n return $this->getTitle();\n } elseif (!empty($this->getIpLastName().$this->getIpFirstName().$this->getIpMiddleName())) {\n return 'ИП '.$this->getIpLastName().' '.$this->getIpFirstName().' '.$this->getIpMiddleName();\n } elseif (!empty($this->getDirectorLastName().$this->getDirectorFirstName().$this->getDirectorMiddleName())) {\n return $this->getDirectorLastName().' '.$this->getDirectorFirstName().' '.$this->getDirectorMiddleName();\n } else {\n return '';\n }\n }", "function admin_notify_mailinglist_title()\n{\nreturn <<<EOF\nE-Posta listenize yeni biri kayıt oldu\nEOF;\n}", "public function getDefaultEmail() {\n return $this->getSiteminderHeaderVariable($this->config->get('user.mail_mapping'));\n }", "private static function default_subject_for_user_email() {\n\t\treturn sprintf( __( 'Welcome to %s', 'frmreg' ), '[sitename]' );\n\t}", "protected function defaultDescription()\n {\n return 'Sending an email by key.';\n }", "public function get_title() {\n\t\treturn $this->parent->get_language_constant('promotion_balloon');\n\t}", "public function get_page_title_default() {\n $ctx = $this->get_context();\n return $ctx->get_context_name(false);\n }", "function admin_notify_entry_title()\n{\nreturn <<<EOF\nYeni bir weblog yazısı yazıldı\nEOF;\n}", "public function get_title()\n {\n return $this->get_default_property(self::PROPERTY_TITLE);\n }", "public function getTitle() {\n\t\treturn Translation::defaultGet('Premanager', 'editGroup');\n\t}", "public function getDefaultSubject()\n\t{\n\t\treturn sprintf('New submission from %s', $this->form->name);\n\t}", "public function getTitle()\n {\n return !empty($this->config('title')) ? $this->config('title') : $this->_identifier;\n }", "function get_page_title_default() {\n return get_string('pluginname', 'tool_health');\n }", "public static function NewsletterPageTitle()\n\t{\n\t\t//return __('Newsletter');\n\t\treturn newsletterPlugin::getFormTitlePage();\n\t}", "public function getTitle() \n {\n return $this->getConfig( 'title' );\n }", "public function getTitle() {\n return ts('Title and Settings');\n }", "public static function modelTitle()\n {\n return Yii::t('admin/mailer', 'Mail');\n }", "function title()\n {\n $base = $this->group->getFancyName();\n\n if ($this->page == 1) {\n // TRANS: Title of inbox for group %s.\n return sprintf(_m('%s group inbox'), $base);\n } else {\n // TRANS: Page title for any but first group page.\n // TRANS: %1$s is a group name, $2$s is a page number.\n return sprintf(_m('%1$s group inbox, page %2$d'),\n $base,\n $this->page);\n }\n }", "public function getDefaultOGTitle()\n {\n return $this->owner->getTitle();\n }", "protected function _setTitle()\n {\n return $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Templates Types'));\n }", "public function getTitle()\n\t{\n\t\t$title = null;\n\t\tif(!is_null($this->title)){\n\t\t\t$title = $this->title.((!is_null($this->appendTitle)) ? $this->appendTitle : '');\n\t\t} else if (!is_null($this->defaultTitle)){\n\t\t\t$title = $this->defaultTitle;\n\t\t}\n\t\treturn $title;\n\t}", "public function getDefaultMessage()\n {\n return 'This URL is working! Please copy & paste the current URL into your <a href=\"https://signifyd.com/settings\">settings</a> page in the Notifications section';\n }", "public function get_title()\n {\n return $this->user->lang($this->titleKey).':';\n }", "public function get_title()\n {\n return __('Single Job Employer Contact', 'wp-jobsearch');\n }", "public function getTitle() {\n if ($this->group) {\n return $this->t('Section settings for @name', ['@name' => $this->group->label()]);\n }\n elseif ($this->section) {\n return $this->t('Sub-section settings for @name', ['@name' => $this->section->label()]);\n }\n\n return NULL;\n }", "public function getDefaultTitle() : ?string;", "function getTitle(){\r\n\r\n\t\t\tglobal $TitlePage;\r\n\t\t\t\r\n\t\t\tif (isset($TitlePage)) {\r\n\t\t\t\treturn $TitlePage;\r\n\t\t\t}else{\r\n\t\t\t\treturn \"Default\";\r\n\t\t\t}\r\n\t}", "public function getMENU_TITLE()\n {\n\t\treturn $this->getDetail('MENU_TITLE',$this->getValue('site_title'));\n }", "public function getTitle()\n {\n return $this->data->{'status'}==\"RESERVED\"?'Confirm':'Details';\n // return 'Confirm';\n }", "public function getMetaTitle() {\n // Get the main title by default with disabled default title generation.\n $metaTitle = $this->getMainTitle(false);\n\n // Apply custom modifications.\n if (!$this->error && $this->current_view) {\n if ($this->current_view === 'forum' && $this->current_forum) {\n $metaTitle = $this->addCurrentPageToString($metaTitle);\n } else if ($this->current_view === 'topic' && $this->current_topic) {\n $metaTitle = $this->addCurrentPageToString($metaTitle);\n }\n }\n\n return $metaTitle;\n }", "public function getTitle()\n\t{\n\t\treturn $this->_getHelper('heidelpay')->__($this->getConfigData('title'));\n\t}", "function title()\n {\n $base = $this->profile->getFancyName();\n\n // TRANS: Title of the page that shows a notice.\n // TRANS: %1$s is a user name, %2$s is the notice creation date/time.\n return sprintf(_('%1$s\\'s status on %2$s'),\n $base,\n common_exact_date($this->notice->created));\n }", "public function title()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( 'error_logs_notification' );\n\t}", "function forum_report_notification_title()\n{\nreturn <<<EOF\n{forum_name} adlı forumda bir mesaj için kontrol talebi açıldı\nEOF;\n}", "public function getTitle()\n {\n return Mage::getStoreConfig(\n 'payment/pagarme_configurations/modal_title'\n );\n }", "protected function getEmailNotificationsSubject(): string\n {\n $env = Str::upper(app()->environment());\n $name = $this->getName();\n\n return \"[{$env}] %level_name% in `{$name}` command\";\n }", "public function getTitle()\n {\n $settings = $this->getSettings();\n\n return Craft::t($settings->title);\n }", "function title()\n {\n return sprintf(\"%s收到的回复\", $this->page_owner->nickname);\n }", "public function invitationMailSubject() {\n return sprintf(_(\"Your %s access is ready\"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);\n }", "final private function getSiteTitle() {\n\t\treturn SITE_TITLE;\n\t}", "public function getTitle()\n\t{\n\t\tif (!empty($this->title)) {\n\t\t\treturn $this->title;\n\t\t} else \n\t\t\treturn $GLOBALS['action'];\n\t}", "function getWebsiteTitle() {\n\t\treturn get_language_string($this->get('website_title'));\n\t}", "protected function getTitle() : string\n\t{\n\t\t$title = str_ireplace('{TITLE}', $this->app->title->get(), $this->app->config->title);\n\n\t\t$this->app->plugins->run('system_theme_get_title', $this, $title);\n\n\t\treturn $title;\n\t}", "public function getMenuTitle(): mixed\n {\n return $this->getField('Title');\n }", "public function getTitle() {\n if (empty($this->title)) {\n $this->title = $this->getDefaultTitle();\n }\n return $this->title;\n }", "function getTitle(){\n\n\t\tglobal $pageTitle;\n\n\t\t\tif (isset($pageTitle)) {\n\t\t\t\techo $pageTitle;\n\t\t\t}else{\n\t\t\t\techo 'Default';\n\t\t\t}\n\t}", "public function getCustomFeedTitle()\n {\n return sfContext::getInstance()->getI18N()->__(\"%title% by %username%\", \n array(\"%title%\" => $this->getTitle(), \n \"%username%\" => $this->getUser()->getUsername()));\n }", "public function get_title()\n {\n return __('EA Contact Form 7', 'essential-addons-elementor');\n }", "public function getTitle() {\n\t\treturn $this->getLanguageLabelForCheck('title');\n\t}", "public function get_title() {\r\n return esc_html__( 'Contact Single 02', 'aapside-master' );\r\n }", "function getTitle() {\n\t\tglobal $pageTitle;\n\t\tif (isset($pageTitle)) {\n\t\t\techo $pageTitle;\n\t\t} else {\n\t\t\techo 'Default';\n\t\t}\n\t\t\n\t}", "function title() { return $this->conf['title']; }", "protected function defaultEmail() {\n if (!empty($this->{REDHEN_CONTACT_EMAIL_FIELD})) {\n foreach($this->{REDHEN_CONTACT_EMAIL_FIELD}[LANGUAGE_NONE] as $email) {\n if ($email['default']) {\n return $email['value'];\n }\n }\n }\n return '';\n }", "public static function getTitle($default = '') {\n if (empty(self::$viewContext->title)) {\n if (isset(self::$viewContext->body) && !empty(self::$viewContext->body->title)) {\n return htmlspecialchars(self::$viewContext->body->title);\n }\n else {\n return htmlspecialchars($default);\n }\n }\n else\n {\n return htmlspecialchars(self::$viewContext->title);\n }\n }", "function getDisplayName() {\n\t\treturn __('plugins.generic.addJournalTitle.displayName');\n\t}", "protected function getDefaultMailerName(): string\n {\n return $this->config->get('mail.default');\n }", "protected function getEmailSubject()\n {\n return is_null(config('usersys.reset_email_subject')) \n ? \"Your email verification link.\" \n : config('usersys.reset_email_subject');\n }", "public function getTitle () : ?string\n {\n return (!is_null($this->title)) ? Helpers::e($this->title) : \"Home\";\n }", "protected function getTitle()\n\t{\n\t\treturn '<h1>Meditate</h1>';\n\t}", "public function getSettingsPageTitle(): string\n {\n return $this->app->translator->translate('settings.title');\n }", "public function defaultMessage()\n {\n return \"{$this->eventName} does not exist.\";\n }", "public function getMainTitle($setDefaultTitle = true) {\n $mainTitle = false;\n\n if ($setDefaultTitle) {\n $mainTitle = __('Overview', 'asgaros-forum');\n }\n\n if (!$this->error && $this->current_view) {\n if ($this->current_view === 'forum' && $this->current_forum) {\n $mainTitle = esc_html(stripslashes($this->current_forum_name));\n } else if ($this->current_view === 'topic' && $this->current_topic) {\n $mainTitle = esc_html(stripslashes($this->current_topic_name));\n } else if ($this->current_view === 'editpost') {\n $mainTitle = __('Edit Post', 'asgaros-forum');\n } else if ($this->current_view === 'addpost') {\n $mainTitle = __('Post Reply', 'asgaros-forum').': '.esc_html(stripslashes($this->current_topic_name));\n } else if ($this->current_view === 'addtopic') {\n $mainTitle = __('New Topic', 'asgaros-forum');\n } else if ($this->current_view === 'movetopic') {\n $mainTitle = __('Move Topic', 'asgaros-forum');\n } else if ($this->current_view === 'search') {\n $mainTitle = __('Search', 'asgaros-forum');\n } else if ($this->current_view === 'subscriptions') {\n $mainTitle = __('Subscriptions', 'asgaros-forum');\n } else if ($this->current_view === 'profile') {\n $mainTitle = $this->profile->getCurrentTitle();\n } else if ($this->current_view === 'members') {\n $mainTitle = __('Members', 'asgaros-forum');\n } else if ($this->current_view === 'activity') {\n $mainTitle = __('Activity', 'asgaros-forum');\n }\n }\n\n return $mainTitle;\n }", "function getMenuTitle(){\n\t\tif($value = $this->getField(\"MenuTitle\")) {\n\t\t\treturn $value;\n\t\t} else {\n\t\t\treturn $this->getField(\"Title\");\n\t\t}\n\t}", "function get_title(){\n global $pagetitle;\n if (isset($pagetitle)){\n return $pagetitle;\n }\n else{\n return lang('default');\n }\n }", "function getTitle (){\n\t\tglobal $pageTitle;\n\n\t\tif (isset($pageTitle)) {\n\t\t\techo $pageTitle;\n\t\t}else {\n\t\t\techo 'Default';\n\t\t}\n\t}", "function forum_moderation_notification_title()\n{\nreturn <<<EOF\nKontrol Bilgilendirmesi: {forum_name}\nEOF;\n}", "public function getDescription()\n {\n return Craft::t('Guest Entries Email Notification');\n }", "public function get_title( )\n {\n return 'Admin page';\n }", "public function getTitle()\n {\n return $this->getMessage();\n }", "function forum_post_notification_title()\n{\nreturn <<<EOF\n{forum_name} adlı foruma bir mesaj gönderildi\nEOF;\n}", "function admin_notify_forum_post_title()\n{\nreturn <<<EOF\n{forum_name} adlı foruma yeni bir mesaj gönderildi\nEOF;\n}", "public function getDefaultName() {\n return $this->getSiteminderHeaderVariable($this->config->get('user.user_mapping'));\n }", "protected function getCMSTreeTitle()\n {\n $rootTitle = SiteConfig::current_site_config()->Title;\n $this->extend('updateCMSTreeTitle', $rootTitle);\n return $rootTitle;\n }", "function getTitle() {\n\t\treturn get_language_string($this->get(\"title\"));\n\t}", "public function get_title() {\r\n\t\treturn tr('Content Management', 'users');\r\n\t}", "public function title() {\n\t\treturn ItmCommon::get_option( $this->prefix, 'blogname' );\n\t}", "function getTitle () {\n\t\t\treturn _sb('menu_most_recent');\n\t\t}", "public static function get_title() {\n return static::get_string(\"title\");\n }", "public function getTitle() {\n return $this->t('Welcome back, @username', [\n '@username' => $this->currentUser->getAccountName()\n ]);\n }", "function wprss_change_title_text() {\n return __( 'Name this feed (e.g. WP Mayor)', WPRSS_TEXT_DOMAIN );\n }", "public function override_title( $admin_title ) {\n\t\tif ( $this->screen_handle() !== get_current_screen()->id ) {\n\t\t\treturn $admin_title;\n\t\t}\n\n\t\treturn esc_html__( 'AMP Onboarding Wizard', 'amp' ) . $admin_title;\n\t}", "private function getConsultantTitle()\n {\n if (version_compare(VERSION, '3.0', '<')) {\n $title = 'online_consultant';\n } else {\n $title = 'analytics_online_consultant';\n }\n\n return $title;\n }", "public function getTitle() {\r\n\t\tif (array_key_exists ( 'title', $this->data )) {\r\n\t\t\treturn $this->data ['title'];\r\n\t\t}\r\n\t\t\r\n\t\t$title = $this->getExtension ( 'Atom' )->getTitle ();\r\n\t\t\r\n\t\t$this->data ['title'] = $title;\r\n\t\t\r\n\t\treturn $this->data ['title'];\r\n\t}", "static function siteTitle(): string\n {\n return Settings::get('title');\n }", "private function getTitle() {\n $this->siteTitle = App::getInstance()->getSettings('siteTitle');\n }", "function getConferenceTitle() {\n\t\treturn $this->getLocalizedSetting('title');\n\t}", "public function getTitle()\n {\n return static::t('XML sitemap');\n }", "public function title() {\n return $this->config('fz152.privacy_policy_page')->get('title');\n }", "function appTitle()\n {\n return _m('TITLE','Blog');\n }", "public function title() {\n\n\t\t\treturn '<h1>' . $this->settings->get_option( 'title', 'ae_tools_maintenance', esc_html__( 'Temporarily Down for Maintenance', 'ascripta' ) ) . '</h1>';\n\n\t\t}", "function getTitle() {\n\t\t\tif (isset($this->title)) {\n\t\t\t\treturn $this->title;\n\t\t\t} else {\n\t\t\t\tif (isset($this->paragraphs[0])) {\n\t\t\t\t\treturn trim($this->paragraphs[0]);\n\t\t\t\t} else {\n\t\t\t\t\treturn 'Untitled Document';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function getDefaultAdminUsername()\n {\n $config = $this->getApplicationConfig();\n return isset($config['adminLogin']) ? $config['adminLogin'] : null;\n }" ]
[ "0.7480333", "0.72311896", "0.7230996", "0.7067602", "0.7032603", "0.69687444", "0.6955181", "0.6947477", "0.69472486", "0.6903266", "0.6887264", "0.68733156", "0.68577486", "0.6841936", "0.68377715", "0.683436", "0.6812161", "0.680921", "0.68023664", "0.680171", "0.679253", "0.67564154", "0.6747799", "0.6735047", "0.67312443", "0.6722574", "0.67152786", "0.6712263", "0.66970205", "0.6686043", "0.66680485", "0.6665174", "0.66609967", "0.66539377", "0.66288507", "0.6625412", "0.66171473", "0.66161275", "0.6608632", "0.6602876", "0.6591404", "0.6587775", "0.65857774", "0.6579322", "0.6567696", "0.6556733", "0.65549135", "0.65380514", "0.65303475", "0.65213317", "0.6514903", "0.6513371", "0.65028083", "0.64997244", "0.6495435", "0.64912194", "0.6488356", "0.64796245", "0.64703256", "0.6470099", "0.6465785", "0.6463883", "0.6456662", "0.6453874", "0.6453141", "0.6452678", "0.64466155", "0.64459", "0.644499", "0.6432383", "0.6428876", "0.6427314", "0.64268464", "0.6424874", "0.6423424", "0.6422771", "0.6422213", "0.6421127", "0.64153624", "0.6412241", "0.64061224", "0.64028037", "0.64009625", "0.63981277", "0.6396761", "0.63941133", "0.6392113", "0.6391864", "0.63903505", "0.6387989", "0.63810784", "0.6381009", "0.6379181", "0.6376245", "0.637205", "0.6371603", "0.63712746", "0.6370204", "0.63652575", "0.6359361" ]
0.88123894
0
Get the default To settings for a user email
Получить настройки To по умолчанию для электронной почты пользователя
private static function default_to_for_user_email( $register_settings ) { $email_field_id = self::get_value_from_setting( $register_settings, 'reg_email' ); if ( ! $email_field_id ) { $to = ''; } else { $to = '[' . $email_field_id . ']'; } return $to; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_to_email();", "public static function resolveDefaultToEmail($to = null)\n {\n // In case of multiple recipients, do not validate anything\n if (is_array($to) || strpos($to, ',') !== false) {\n return $to;\n }\n $original_to = $to;\n if (!empty($to)) {\n $to = EmailUtils::get_email_from_rfc_email($to);\n if (filter_var($to, FILTER_VALIDATE_EMAIL)) {\n return $original_to;\n }\n }\n $config = SiteConfig::current_site_config();\n $config_field = self::config()->siteconfig_to;\n if ($config_field && !empty($config->$config_field)) {\n return $config->$config_field;\n }\n if ($admin = Email::config()->admin_email) {\n return $admin;\n }\n return false;\n }", "public function getDefaultRecipient(): string\n {\n return config('contact.default_email_receiver');\n }", "public function getToEmail()\r\n {\r\n return $this->getSendEmailConfig('to');\r\n }", "protected static function getEmailSettings() {\n\t\t$menuitemid = JRequest::getInt('Itemid');\n\t\tif ($menuitemid)\n\t\t{\n\t\t\t$menu = JFactory::getApplication()->getMenu();\n\t\t\t$menuparams = $menu->getParams($menuitemid);\n\t\t\t//echo __FILE__.' ('.__LINE__.')<pre>';print_r($menuparams); echo'</pre>';\n\t\t\t$emailSettings = $menuparams->get('email');\n\t\t\t//echo __FILE__.' ('.__LINE__.')<pre>';print_r($email_menu); echo'</pre>';\n\t\t}\n\t\tif ($emailSettings === 'component' || $emailSettings === null) {\n\t\t\t// SETTINGS FROM COMPONENT\n\t\t\t$params = JComponentHelper::getParams( 'com_hbteam' );\n\t\t\t//echo __FILE__.' ('.__LINE__.')<pre>';print_r($params); echo'</pre>';\n\t\t\t$emailSettings = $params->get( 'email' );\n\t\t\t//echo __FILE__.' ('.__LINE__.')<pre>';print_r($email_com); echo'</pre>';\n\t\t}\n\t\treturn $emailSettings;\n\t}", "public function user_from_mail() {\n\t\treturn $this->config['submit']['from_email'];\n\t}", "function getTo() {\n return unserialize(parent::getToEmail());\n }", "public function get_default_email($uid, &$settings)\n {\n $return = false;\n if (isset($settings['core']['default_profile']) && $settings['core']['default_profile']) {\n $query = 'SELECT address FROM '.$this->DB['tbl_profiles'].' WHERE AND accid='.intval($settings['core']['default_profile']);\n list ($return) = mysql_fetch_row(mysql_query($query));\n }\n if (!$return) {\n $query = 'SELECT address FROM '.$this->DB['tbl_profiles'].' LIMIT 1';\n list ($return) = mysql_fetch_row(mysql_query($query));\n }\n return $return;\n }", "public function get_from_email();", "public function getDefaultEmail() {\n return $this->getSiteminderHeaderVariable($this->config->get('user.mail_mapping'));\n }", "protected function defaultEmail() {\n if (!empty($this->{REDHEN_CONTACT_EMAIL_FIELD})) {\n foreach($this->{REDHEN_CONTACT_EMAIL_FIELD}[LANGUAGE_NONE] as $email) {\n if ($email['default']) {\n return $email['value'];\n }\n }\n }\n return '';\n }", "function wp_user_control_mail_from_filter( $from_email ) {\n\t// first get options array from wordpress database\r\n\t$arr = get_option(\r\n\t\t$show = 'widget_wp-user-control-widget',\r\n\t\t$default = false\r\n\t\t);\r\n\t// check to see if option array was successfully retrieved\r\n\tif ( $arr !== false ) {\r\n\t\t// loop through options array from database\r\n\t\tforeach ( $arr as $instance_id => $properties ) {\r\n\t\t\t// make sure we're dealing with a valid instance id\r\n\t\t\tif ( is_numeric( $instance_id ) && count( $properties ) > 1 ) {\r\n\t\t\t\t// if mail from address is stored and not empty, return it\r\n\t\t\t\tif ( !empty( $properties['mailFromAddress'] ) ) {\r\n\t\t\t\t\treturn $properties['mailFromAddress'];\r\n\t\t\t\t\t// otherwise return default mail from\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn $from_email;\r\n\t\t\t\t}\r\n\t\t\t\t// instance id is not valid, or no options are saved, return default login url\r\n\t\t\t} else {\r\n\t\t\t\treturn $from_email;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// options array was not successfully retrieved, return default login url\r\n\t} else {\r\n\t\treturn $from_email;\r\n\t}\n}", "function getEmail( $which = \"to\" ) {\r\n\t\tif ($which == \"to\") {\r\n\t\t\treturn $this->_to_email;\r\n\t\t} elseif ($which == \"from\") {\r\n\t\t\treturn $this->_from_email;\r\n\t\t}\r\n\t}", "public function getTo()\n {\n return (isset($this->options['to'])) ? $this->options['to'] : null;\n }", "public function settings_default_to() {\n \t$options = get_option( 'clockwork_formidable' );\n \techo '<input id=\"formidable_sms_username\" name=\"clockwork_formidable[default_to]\" size=\"40\" type=\"text\" value=\"' . $options['default_to'] . '\" style=\"padding: 3px;\" />';\n }", "public function get_email_settings(){\r\n\t\treturn array(\r\n\t\t\t\t'subject' => $this->get_option(\"subject\"),\r\n\t\t\t\t'email_template' => $this->get_option(\"email_template\")\r\n\t\t\t);\r\n\t}", "public function wpMailFrom()\n\t{\n\t\treturn get_option( \"admin_email\" );\n\t}", "function get_from_email(){\n $__from_email = (!empty($this->opt['evore_notfiemailfrom']) )?\n htmlspecialchars_decode ($this->opt['evore_notfiemailfrom'])\n :get_bloginfo('admin_email');\n $__from_email_name = (!empty($this->opt['evore_notfiemailfromN']) )?\n ($this->opt['evore_notfiemailfromN'])\n :get_bloginfo('name');\n $from_email = (!empty($__from_email_name))?\n $__from_email_name.' <'.$__from_email.'>' : $__from_email;\n return $from_email;\n }", "function bfg_wp_mail_from() {\n\n\treturn get_option( 'admin_email' );\n\n}", "public function getMail();", "public function getMail();", "protected function get_current_user_email()\n {\n }", "public function getPersonMail();", "public function getMailOverrideToAddress()\n {\n return $this->overrideToAddress;\n }", "public function getEmailAssignmentTo()\n {\n return $this->user2->email;\n }", "public function getUserMail(){\n\t\treturn $this->userMail;\n\t}", "function get_to($email_content) {\n\t$to1 = explode (\"\\nTo: \", $email_content);\n\t$to2 = explode (\"\\n\", $to1[1]);\n\t$to = str_replace ('>', '', str_replace('<', '', $to2[0]));\n\treturn $to;\n}", "function getSystemEmailRecipients()\r\n {\r\n $db =& JFactory::getDBO();\r\n $query = \"\r\n SELECT tbl.email\r\n FROM #__users AS tbl\r\n WHERE tbl.sendEmail = '1';\r\n \"; \r\n $db->setQuery( $query );\r\n $items = $db->loadObjectList();\r\n if (empty($items))\r\n {\r\n return array();\r\n }\r\n return $items;\r\n }", "private static function db_get_mail_by_user($uid)\n\t{\n\t\t$key = 'email';\n\t\t$query=OC_DB::prepare('SELECT `configvalue` FROM `*PREFIX*preferences` WHERE `configkey` = ? AND `userid`=?');\n\t\t$result=$query->execute(array($key, $uid));\n\t\tif(OC_DB::isError($result)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$row=$result->fetchRow();\n\t\t$mail = $row['configvalue'];\n\n\t\treturn $mail;\n\n\t}", "static public function mailto()\n\t\t{\n\t\t\t# code...\n\t\t}", "public function getMailOverrideToName()\n {\n return $this->overrideToName;\n }", "public function getToUser()\n {\n return $this->toUser;\n }", "public function getAuthoremail() {}", "public function SF_Address(){\r\n\t\t\treturn $this->Send_From_Options['mail_from'];\r\n\t\t}", "private function get_replyto_email() {\n if ((bool) $this->message->get('no_reply')) {\n // Return the default no reply address.\n return get_config('moodle', 'noreplyaddress');\n }\n\n // If this message has an alternate email assigned.\n if ($this->alternate_email) {\n // Return the alternate's email address.\n return $this->alternate_email->get('email');\n }\n\n // Otherwise, return the moodle user's email.\n return $this->message_params->userfrom->email;\n }", "public function getMailServiceOptions();", "public function getMailDefaultFromAddress()\n {\n\n return $this->defaultFromAddress;\n }", "public function routeNotificationForMail()\n {\n return (isset($this->gt_email)) ? $this->gt_email : $this->personal_email;\n }", "public function getEmailPreferences()\n {\n return $this->get(self::API_BASE_URL . '/users/' . $this->subscription->uid . '/emailPreferences');\n }", "protected function getDefaultConfigurationValues() {\n $defaultValues = parent::getDefaultConfigurationValues();\n $defaultValues['subject'] = $this->getEmailSubject();\n $defaultValues['to_mail'] = $this->agencyComponent->get('field_submission_email')->value;\n\n return $defaultValues;\n }", "public function getEmailSettings(): MailSettings\n {\n return App::mailSettings();\n }", "public function getTo() {\n\t\treturn $this->getParam('to');\n\t}", "public function getTo() {\n\t\treturn $this->getParam('to');\n\t}", "public function get_to()\n {\n return $this->to;\n }", "public function getUserMail()\n {\n return $this->_user_mail;\n }", "public function getContactEmail()\n {\n return $this->options->get(self::OPT_CONTACT_EMAIL, '{undefined}');\n }", "public function getMailAddress();", "public function getEmail(){\n\t\t$email = '';\n\t\t$lti_email_vars = array( 'lis_person_contact_email_primary' );\n\t\t$email_found = false;\n\t\tforEach( $lti_email_vars as $check_me ){\n\t\t\t$temp = $this->getLtiDataValue( $check_me, $email_found );\n\t\t\tif( $email_found ){\n\t\t\t\t$email = $temp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $email;\n\t}", "public function getDefaultFrom() {\n return data_get(\n $this->config, 'from',\n data_get(\n $this->config, \"default.from\"\n )\n );\n }", "function wp_user_control_mail_from_name_filter( $from_name ) {\r\n\t// first get options array from wordpress database\r\n\t$arr = get_option(\r\n\t\t$show = 'widget_wp-user-control-widget',\r\n\t\t$default = false\r\n\t\t);\r\n\t// check to see if option array was successfully retrieved\r\n\tif ( $arr !== false ) {\r\n\t\t// loop through options array from database\r\n\t\tforeach ( $arr as $instance_id => $properties ) {\r\n\t\t\t// make sure we're dealing with a valid instance id\r\n\t\t\tif ( is_numeric( $instance_id ) && count( $properties ) > 1 ) {\r\n\t\t\t\t// if mail from address is stored and not empty, return it\r\n\t\t\t\tif ( !empty( $properties['mailFromName'] ) ) {\r\n\t\t\t\t\treturn $properties['mailFromName'];\r\n\t\t\t\t\t// otherwise return default mail from\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn $from_name;\r\n\t\t\t\t}\r\n\t\t\t\t// instance id is not valid, or no options are saved, return default login url\r\n\t\t\t} else {\r\n\t\t\t\treturn $from_name;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// options array was not successfully retrieved, return default login url\r\n\t} else {\r\n\t\treturn $from_name;\r\n\t}\r\n}", "function get_global_sender_email_address() {\n\t$global_sender_email = get_option( \"forminator_sender_email_address\", \"noreply@\" . wp_parse_url( get_site_url(), PHP_URL_HOST ) );\n\t\n\treturn apply_filters( 'forminator_sender_email_address', $global_sender_email );\n}", "public function getSenderEmail();", "public function getTo() {\r\n return $this->to;\r\n }", "public function getTo() {\r\n\t\treturn $this->to;\r\n\t}", "public static function getDefaultSmtp()\n\t{\n\t\tif (Cache::has('DefaultSmtp', '')) {\n\t\t\treturn Cache::get('DefaultSmtp', '');\n\t\t}\n\t\t$id = (new Db\\Query())->select(['id'])->from('s_#__mail_smtp')->where(['default' => 1])->scalar(Db::getInstance('admin'));\n\t\tif (!$id) {\n\t\t\t$id = (new Db\\Query())->select(['id'])->from('s_#__mail_smtp')->limit(1)->scalar(Db::getInstance('admin'));\n\t\t}\n\t\tCache::save('DefaultSmtp', '', $id, Cache::LONG);\n\n\t\treturn $id;\n\t}", "public function getTo(): ?string\n {\n return $this->to ?? null;\n }", "function anva_wp_mail_from( $original_email_address ) {\n\t$email = get_option( 'admin_email' );\n\treturn $email;\n}", "public function getTo()\n {\n\n return $this->to;\n }", "private function _getMailFromEmail() {\n return $this->getTemplate()->getTemplateSenderEmail();\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "function getUsualAccountsProfileEmail() {\n\treturn 'full@account.is.moe';\n}", "public function getFromEmail(): ?string;", "function emailSetting() {\r\n $ci = & get_instance();\r\n $user = $ci->session->userdata('user');\r\n $userId = $user['UserID'];\r\n $ci->load->model('accountant/Settings');\r\n $response = $ci->Settings->getEmailSignature($user['UserID']);\r\n return $response;\r\n }", "public function getTo ()\n {\n return $this->toAddresses;\n }", "public function getRecipient(){\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public static function get_email_message(){\n\n return get_option(self::$name_email_message_in_option_table, '');\n }", "public function routeNotificationForMail()\n {\n return $this->user != null ? $this->user->email : $this->specEmail;\n }", "public function getEmailAddress()\n {\n return $this->_getVar('user_email');\n }", "public function getNotificationsForEventsSetting() { return $this->getSettingValueForKey(CRM_SETTING_EVENTS_EMAIL); }", "public function getTo(): string;", "public function getTo(){\n\t\treturn $this->_to;\n\t}", "public function getTo()\n\t{\n\t\treturn $this->to;\n }", "public function via() {\n return ['mail'];\n }", "function _getUserEmail()\r\n {\r\n \t$user = JFactory::getUser();\r\n \t\r\n \tif ($user->get('id')) {\r\n \t\treturn $user->get('email');\r\n \t}\r\n \telseif (!empty($this->_data['email'])) {\r\n \t\treturn $this->_data['email'];\r\n \t}\r\n \telse {\r\n \t\treturn '';\r\n \t}\r\n }", "public function get_to()\n {\n return $this->m_to;\n }", "public function via()\n {\n return ['mail'];\n }", "public function via()\n {\n return ['mail'];\n }", "public function via()\n {\n return ['mail'];\n }", "public function via()\n {\n return ['mail'];\n }", "function get_to() {\n return $this->sanitize_id( $_POST['to'] );\n }", "protected function getSenderEmailAddress() {}", "protected function getSenderEmailAddress() {}", "public static function email()\n {\n return config('filament-jet.email', 'email');\n }", "protected function _getDefaultMailContents()\n\t{\n\t\t$mail = $this->lang->words['b_mailcontents'];\n\t\t\t \n\t\treturn $mail;\n\t}", "public function getEmailSettings()\n {\n return $this->db->select('*')->from('email_settings')->WHERE('id', 1)->get()->row();\n }", "public static function getEmailSettings()\n {\n return [\n Setting::MAIL_BOOKING_REMINDER => \\Yii::t('user.settings.mail.reservation_start',\n 'Am about to start a reservation.'),\n Setting::MESSAGE_UPDATE => \\Yii::t('user.settings.mail.receive_message_from_kidup_user',\n 'I receive a message from another person on KidUp.'),\n Setting::BOOKING_STATUS_CHANGE => \\Yii::t('user.settings.mail.reservation_status_changes',\n 'My outstanding booking request is accepted or declined.'),\n Setting::NEWSLETTER => \\Yii::t('user.settings.mail.kidup_newsletter_promo',\n 'Kidup wants to share some exciting news or updates.'),\n ];\n }", "public function getNotificationEmail() {}", "public function getTo() : string\n {\n return $this->to;\n }", "public function getTo() : string\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function user_from_mail_name() {\n\t\treturn wp_specialchars_decode( $this->config['submit']['from_name'], ENT_QUOTES );\n\t}", "public function getSendMail() {}" ]
[ "0.7146657", "0.71034104", "0.6907427", "0.6891215", "0.68021506", "0.6795354", "0.67336315", "0.6538374", "0.65344965", "0.6518488", "0.64702", "0.6447668", "0.6381077", "0.6369107", "0.63439596", "0.632941", "0.62976384", "0.62897956", "0.62211657", "0.61536336", "0.61536336", "0.6143433", "0.61285806", "0.6126208", "0.6090843", "0.60810465", "0.607893", "0.60653496", "0.6060208", "0.60508764", "0.6047762", "0.6036635", "0.6025775", "0.60180414", "0.60047615", "0.5990471", "0.5982106", "0.5978486", "0.5977178", "0.5974043", "0.5966353", "0.5959079", "0.5959079", "0.5956541", "0.593358", "0.59197223", "0.5917209", "0.5908659", "0.59033823", "0.5900636", "0.58959377", "0.5890403", "0.5890102", "0.58836156", "0.58790165", "0.5859846", "0.585946", "0.58563006", "0.5853964", "0.58532363", "0.58532363", "0.58532363", "0.58532363", "0.58532363", "0.58532363", "0.58532363", "0.58429176", "0.5837763", "0.5831622", "0.58286995", "0.5827352", "0.58246285", "0.5819716", "0.5819707", "0.5816111", "0.5813065", "0.5802285", "0.57965434", "0.57902235", "0.5788144", "0.57821137", "0.5777237", "0.5776042", "0.5776042", "0.5776042", "0.5776042", "0.57736105", "0.5771778", "0.5771778", "0.57669574", "0.5764058", "0.57622474", "0.5759324", "0.5747789", "0.57392627", "0.57392627", "0.5739237", "0.5739237", "0.5735048", "0.5734224" ]
0.739029
0
Get the default user email subject
Получить стандартный email-тему пользователя
private static function default_subject_for_user_email() { return sprintf( __( 'Welcome to %s', 'frmreg' ), '[sitename]' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_default_email_subject() {\n\t\t\t/**\n\t\t\t * Filter the default subject.\n\t\t\t * Note: This filter will deprecate soon.\n\t\t\t *\n\t\t\t * @since 1.0\n\t\t\t */\n\t\t\t$subject = apply_filters(\n\t\t\t\t'give_offline_admin_donation_notification_subject',\n\t\t\t\t__( 'New Pending Donation', 'give' )\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the default subject\n\t\t\t *\n\t\t\t * @since 2.0\n\t\t\t */\n\t\t\treturn apply_filters(\n\t\t\t\t\"give_{$this->config['id']}_get_default_email_subject\",\n\t\t\t\t$subject,\n\t\t\t\t$this\n\t\t\t);\n\t\t}", "public static function get_email_subject(){\n\n return get_option(self::$name_email_subject_in_option_table, '');\n }", "protected function getEmailSubject()\n {\n return is_null(config('usersys.reset_email_subject')) \n ? \"Your email verification link.\" \n : config('usersys.reset_email_subject');\n }", "public function getDefaultSubject()\n\t{\n\t\treturn sprintf('New submission from %s', $this->form->name);\n\t}", "protected function get_email_subject()\n\t{\n\t\tif (empty($this->email_subject))\n\t\t{\n\t\t\treturn $this->fuel->forms->config('email_subject');\n\t\t}\n\t\treturn $this->email_subject;\n\t}", "public function getDefaultEmail() {\n return $this->getSiteminderHeaderVariable($this->config->get('user.mail_mapping'));\n }", "private static function default_admin_email_subject() {\n\t\treturn sprintf( __( '[%s] New User Registration' ), '[sitename]' );\n\t}", "protected function getEmailSubject() {}", "protected function getEmailSubject()\n {\n return isset($this->subject) ? $this->subject : 'Your Password Reset Link';\n }", "function getEmailSubject() {\n\t\treturn $this->getTransportCredentials()->getParam(transportCredentials::PARAM_MESSAGE_SUBJECT);\n\t}", "public function getEmailSubject() {\n //Juneteenth Floating Day Request from Victor Brodsky, MD (#3)\n $subject = $this->getRequestName().\" from \".$this->getUser()->getUsernameOptimal().\" (#\".$this->getId().\")\";\n //exit('$subject='.$subject);\n return $subject;\n }", "public function getSubject($key, $default)\r\n {\r\n $email = $this->loadEmail($key);\r\n if(!isset($email['subject'])){\r\n $this->_emails[$key]['subject'] = $default;\r\n $this->throwMissingEvent($key, $this->_emails[$key]);\r\n }\r\n return $this->_emails[$key]['subject'];\r\n }", "public function getCustomerEmailSubject();", "public function getEmailSubject()\n {\n return $this->emailSubject;\n }", "public function getSubjectForEmail()\n\t{\n\t\treturn $this->getSubject() . ($this->getSequenceNumber() != null ? ' ('.$this->getSequenceNumber().')' : '');\n\t}", "protected function defaultEmail() {\n if (!empty($this->{REDHEN_CONTACT_EMAIL_FIELD})) {\n foreach($this->{REDHEN_CONTACT_EMAIL_FIELD}[LANGUAGE_NONE] as $email) {\n if ($email['default']) {\n return $email['value'];\n }\n }\n }\n return '';\n }", "public function invitationMailSubject() {\n return sprintf(_(\"Your %s access is ready\"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);\n }", "public function getSubject(): ?string\n {\n return $this->subject;\n }", "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "public function getSubject() : string\n {\n return $this->subject;\n }", "public function getSubject () : string\n {\n return $this->subject;\n }", "public function _getMailSubject() {\n\t\treturn $this->_mailSubject;\n\t}", "private function getMailSubject()\n {\n $hostname = gethostname();\n\n return sprintf($this->mailSubject, $hostname, date('Y-m-d H:i:s'));\n }", "function _erpal_calendar_get_assigned_subject() {\n $value = 'ERPAL - Notification: [erpal_project_notifications:content_label]';\n return variable_get('erpal_calendar_assigned_subject', $value);\n}", "public function getMessageSubject() :string {\n\t\treturn($this->messageSubject);\n\t}", "public function load_subject()\n\t{\n\t\t// Account for those no-subject emails\n\t\tif (!isset($this->headers['subject']))\n\t\t{\n\t\t\t$this->headers['subject'] = '';\n\t\t}\n\n\t\t// Change it to a readable form ...\n\t\t$this->subject = htmlspecialchars($this->_decode_header($this->headers['subject']), ENT_COMPAT, 'UTF-8');\n\n\t\treturn (string) $this->subject;\n\t}", "public function getSubjectName()\n {\n if (array_key_exists(\"subjectName\", $this->_propDict)) {\n return $this->_propDict[\"subjectName\"];\n } else {\n return null;\n }\n }", "public function getDefaultRecipient(): string\n {\n return config('contact.default_email_receiver');\n }", "public static function getEmailSubject()\n {\n return \"Lost password on Higify\";\n }", "public function getCreatedEmailSubject() {\n return \"New test assignment\";\n }", "public function getSubject()\n {\n return $this->getRawSubject();\n }", "public function getDefaultUser() : string\n {\n return $this->default_user;\n }", "public function get_subject() {\n\n\t\t/**\n\t\t * Filter the pick list email subject.\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @param string $subject The email subject\n\t\t * @param \\WC_PIP_Document $object The document object\n\t\t */\n\t\treturn apply_filters( 'wc_pip_pick_list_email_subject', $this->format_string( $this->subject ), $this->object );\n\t}", "public function getSubject(): string;", "public function getSubject(): string;", "protected function getSubject()\n {\n return $this->subject_prefix . ' ' . parent::getSubject();\n }", "public function getVerificationEmailSubject()\n {\n return Config::get('verifier.subject');\n }", "public function getSubject() {}", "public function getSubject() {}", "function authGetUserEmail($user)\n{\n if (!isset($user) || $user === '')\n {\n return '';\n }\n \n return get_default_email($user);\n}", "public function get_subject()\n\t{\n\t\tif (is_null($this->subject)) {\n\t\t\t$this->subject = EntityUtils::getEntity('Subject', 1);\n\t\t}\n\t\t\n\t\treturn $this->subject;\n\t}", "public function getMailDefaultFromName()\n {\n return $this->defaultFromName;\n }", "public function getEmailReturnsInitialValueForString() {\n\t\t$this->assertSame(\n\t\t\t'',\n\t\t\t$this->subject->getEmail()\n\t\t);\n\t}", "public function getSubject() { }", "public function getSubject() : string;", "protected function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->getHeaderFieldModel('Subject');\n }", "public function get_subject() {\n\n\t\treturn apply_filters( 'woocommerce_email_subject_' . $this->id, $this->format_string( $this->subject ), $this->object );\n\t}", "public static function getLastSubject(): ?string\n {\n return self::$subject;\n }", "public function subject() : string{\n\t\treturn $this->subject;\n\t}", "public function getGenericTitle()\n {\n return $this->email;\n }", "protected function get_current_user_email()\n {\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject() {\r\n\t\treturn $this->subject;\r\n\t}", "function _getUserEmail()\r\n {\r\n \t$user = JFactory::getUser();\r\n \t\r\n \tif ($user->get('id')) {\r\n \t\treturn $user->get('email');\r\n \t}\r\n \telseif (!empty($this->_data['email'])) {\r\n \t\treturn $this->_data['email'];\r\n \t}\r\n \telse {\r\n \t\treturn '';\r\n \t}\r\n }", "public function getSubject(): string\n {\n if (!$this->subject) {\n $this->subject = Utils::classBasename(static::class);\n }\n\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject()\n {\n return @$this['subject'];\n }", "public function getSubject()\n\t{\n\t\treturn $this->subject;\n\t}", "protected function getDefaultMailerName(): string\n {\n return $this->config->get('mail.default');\n }", "public function getSubject ()\n {\n return $this->subject;\n }", "public function getSubject () {\n\t\t$subject = $this->getSubjects();\n\t\tif ($subject) {\n\t\t\t$subject = $subject[0];\n\t\t}\n\n\t\treturn $subject;\n\t}", "public function getSubject()\n {\n return $this->subject;\n }", "public function getNotificationSubject()\n {\n return $this->notification_subject;\n }", "public function getSubject() {\r\n return $this->subject;\r\n }", "public function getTranslatedSubject()\n {\n return $this->translatedSubject;\n }" ]
[ "0.8045215", "0.7894757", "0.7768137", "0.76832116", "0.7672078", "0.7660967", "0.7638742", "0.76366484", "0.7392649", "0.7353502", "0.7339582", "0.7233142", "0.7126253", "0.71018106", "0.70801944", "0.70771766", "0.6999759", "0.69942254", "0.69578236", "0.69578236", "0.6937991", "0.69105595", "0.6889194", "0.6860974", "0.6853099", "0.6849988", "0.6830713", "0.6829668", "0.6807513", "0.67926687", "0.67900956", "0.6776681", "0.6760434", "0.674247", "0.67422813", "0.67422813", "0.67166954", "0.67047614", "0.66884196", "0.66884196", "0.6683808", "0.6680397", "0.66736144", "0.66706073", "0.66436833", "0.66258126", "0.66163135", "0.65955395", "0.658715", "0.65849257", "0.65791285", "0.65777653", "0.65712345", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.655268", "0.6550688", "0.65502226", "0.6541189", "0.6537674", "0.6537674", "0.6537674", "0.6537674", "0.65321106", "0.6531572", "0.6522591", "0.6507209", "0.6491554", "0.6482431", "0.6457862", "0.6449065", "0.6443852" ]
0.828016
0
Get the default admin email subject
Получить подразумеваемый email-тему для администратора
private static function default_admin_email_subject() { return sprintf( __( '[%s] New User Registration' ), '[sitename]' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_default_email_subject() {\n\t\t\t/**\n\t\t\t * Filter the default subject.\n\t\t\t * Note: This filter will deprecate soon.\n\t\t\t *\n\t\t\t * @since 1.0\n\t\t\t */\n\t\t\t$subject = apply_filters(\n\t\t\t\t'give_offline_admin_donation_notification_subject',\n\t\t\t\t__( 'New Pending Donation', 'give' )\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the default subject\n\t\t\t *\n\t\t\t * @since 2.0\n\t\t\t */\n\t\t\treturn apply_filters(\n\t\t\t\t\"give_{$this->config['id']}_get_default_email_subject\",\n\t\t\t\t$subject,\n\t\t\t\t$this\n\t\t\t);\n\t\t}", "public static function get_email_subject(){\n\n return get_option(self::$name_email_subject_in_option_table, '');\n }", "private static function default_subject_for_user_email() {\n\t\treturn sprintf( __( 'Welcome to %s', 'frmreg' ), '[sitename]' );\n\t}", "protected function getEmailSubject()\n {\n return is_null(config('usersys.reset_email_subject')) \n ? \"Your email verification link.\" \n : config('usersys.reset_email_subject');\n }", "protected function get_email_subject()\n\t{\n\t\tif (empty($this->email_subject))\n\t\t{\n\t\t\treturn $this->fuel->forms->config('email_subject');\n\t\t}\n\t\treturn $this->email_subject;\n\t}", "public function getDefaultSubject()\n\t{\n\t\treturn sprintf('New submission from %s', $this->form->name);\n\t}", "private static function default_title_for_admin_email() {\n\t\treturn __( 'Admin Email Notification', 'frmreg' );\n\t}", "protected function getEmailSubject() {}", "protected function getEmailSubject()\n {\n return isset($this->subject) ? $this->subject : 'Your Password Reset Link';\n }", "public function getDefaultEmail() {\n return $this->getSiteminderHeaderVariable($this->config->get('user.mail_mapping'));\n }", "function getEmailSubject() {\n\t\treturn $this->getTransportCredentials()->getParam(transportCredentials::PARAM_MESSAGE_SUBJECT);\n\t}", "public function getCustomerEmailSubject();", "public function getEmailSubject() {\n //Juneteenth Floating Day Request from Victor Brodsky, MD (#3)\n $subject = $this->getRequestName().\" from \".$this->getUser()->getUsernameOptimal().\" (#\".$this->getId().\")\";\n //exit('$subject='.$subject);\n return $subject;\n }", "public function invitationMailSubject() {\n return sprintf(_(\"Your %s access is ready\"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);\n }", "public function getEmailSubject()\n {\n return $this->emailSubject;\n }", "public static function getEmailSubject()\n {\n return \"Lost password on Higify\";\n }", "public function getCreatedEmailSubject() {\n return \"New test assignment\";\n }", "public function getSubjectForEmail()\n\t{\n\t\treturn $this->getSubject() . ($this->getSequenceNumber() != null ? ' ('.$this->getSequenceNumber().')' : '');\n\t}", "protected function defaultEmail() {\n if (!empty($this->{REDHEN_CONTACT_EMAIL_FIELD})) {\n foreach($this->{REDHEN_CONTACT_EMAIL_FIELD}[LANGUAGE_NONE] as $email) {\n if ($email['default']) {\n return $email['value'];\n }\n }\n }\n return '';\n }", "public function getSubject () : string\n {\n return $this->subject;\n }", "public function getSubject() : string\n {\n return $this->subject;\n }", "function _erpal_calendar_get_assigned_subject() {\n $value = 'ERPAL - Notification: [erpal_project_notifications:content_label]';\n return variable_get('erpal_calendar_assigned_subject', $value);\n}", "protected function getSubject()\n {\n return $this->subject_prefix . ' ' . parent::getSubject();\n }", "public function _getMailSubject() {\n\t\treturn $this->_mailSubject;\n\t}", "public function getMessageSubject() :string {\n\t\treturn($this->messageSubject);\n\t}", "public function getVerificationEmailSubject()\n {\n return Config::get('verifier.subject');\n }", "function getCajaverdeAdminMail()\n {\n return env('CAJAVERDE_ADMIN_MAIL');\n }", "public function getSubject(): ?string\n {\n return $this->subject;\n }", "public function getAdminEmail(): string\n {\n return $this->authSession->getUser()->getEmail();\n }", "private function getMailSubject()\n {\n $hostname = gethostname();\n\n return sprintf($this->mailSubject, $hostname, date('Y-m-d H:i:s'));\n }", "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "protected function _getRestoreEmailSubject() {\n return '[%s] Een nieuwe versie staat live';\n }", "public function getSubject($key, $default)\r\n {\r\n $email = $this->loadEmail($key);\r\n if(!isset($email['subject'])){\r\n $this->_emails[$key]['subject'] = $default;\r\n $this->throwMissingEvent($key, $this->_emails[$key]);\r\n }\r\n return $this->_emails[$key]['subject'];\r\n }", "protected function getEmailNotificationsSubject(): string\n {\n $env = Str::upper(app()->environment());\n $name = $this->getName();\n\n return \"[{$env}] %level_name% in `{$name}` command\";\n }", "public function subject() : string{\n\t\treturn $this->subject;\n\t}", "protected function getEmailSubject() {\n return t('New FOIA request received for @agency_component_name', ['@agency_component_name' => $this->agencyComponent->label()]);\n }", "public function get_subject() {\n\n\t\treturn apply_filters( 'woocommerce_email_subject_' . $this->id, $this->format_string( $this->subject ), $this->object );\n\t}", "public function getTranslatedSubject()\n {\n return $this->translatedSubject;\n }", "public function getSubjectName()\n {\n if (array_key_exists(\"subjectName\", $this->_propDict)) {\n return $this->_propDict[\"subjectName\"];\n } else {\n return null;\n }\n }", "public function getSubject()\n {\n return $this->getHeaderFieldModel('Subject');\n }", "public function getSubject(): string;", "public function getSubject(): string;", "public function getAdminEmail()\n {\n return $this->adminEmail;\n }", "protected function getDefaultMailerName(): string\n {\n return $this->config->get('mail.default');\n }", "public function red_get_admin_email() {\n\t\t$e = get_option('woocommerce_new_order_recipient');\n\t\tif ( ! $e ) {\n\t\t\t$e = get_option('admin_email');\n\t\t}\n\t\treturn $e;\n\t}", "public function get_subject()\n\t{\n\t\tif (is_null($this->subject)) {\n\t\t\t$this->subject = EntityUtils::getEntity('Subject', 1);\n\t\t}\n\t\t\n\t\treturn $this->subject;\n\t}", "public function getAdminmail( )\n {\n return $this->orgesab_orgesabAdminEmail;\n }", "public function getSubject()\n {\n return @$this['subject'];\n }", "public function getSubject()\n {\n return $this->getRawSubject();\n }", "public function getNotificationSubject()\n {\n return $this->notification_subject;\n }", "public function get_subject() {\n\n\t\t/**\n\t\t * Filter the pick list email subject.\n\t\t *\n\t\t * @since 3.0.0\n\t\t * @param string $subject The email subject\n\t\t * @param \\WC_PIP_Document $object The document object\n\t\t */\n\t\treturn apply_filters( 'wc_pip_pick_list_email_subject', $this->format_string( $this->subject ), $this->object );\n\t}", "public function getGenericTitle()\n {\n return $this->email;\n }", "public function message(){\n\n return \"$this->email, an admin, sent a message\";\n\n }", "public function getSubject() {\r\n\t\treturn $this->subject;\r\n\t}", "public function getSubject(): string\n {\n if (!$this->subject) {\n $this->subject = Utils::classBasename(static::class);\n }\n\n return $this->subject;\n }", "public function getSubject()\n\t{\n\t\treturn $this->subject;\n\t}", "public function getSubject() {}", "public function getSubject() {}", "public static function get_email_message(){\n\n return get_option(self::$name_email_message_in_option_table, '');\n }", "public function getDefaultAdminUsername()\n {\n $config = $this->getApplicationConfig();\n return isset($config['adminLogin']) ? $config['adminLogin'] : null;\n }", "public function getSubject ()\n {\n return $this->subject;\n }", "protected function getAuthorEmailReplacement()\n {\n return $this->domain->config('composer.author.email');\n }", "protected function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() {\n return $this->subject;\n }", "public function getSubject() { }" ]
[ "0.80849075", "0.79979295", "0.78325814", "0.7804562", "0.7696526", "0.7647615", "0.7518753", "0.7506262", "0.7301314", "0.7247958", "0.7222714", "0.7155061", "0.71453094", "0.71396893", "0.70762277", "0.69440913", "0.6942621", "0.6919129", "0.68852556", "0.68609655", "0.6853627", "0.6844584", "0.6843228", "0.68243146", "0.68130016", "0.67939353", "0.6781924", "0.6769735", "0.67493594", "0.6732642", "0.6697037", "0.6697037", "0.669183", "0.6674559", "0.6670297", "0.66471845", "0.6644765", "0.6641754", "0.6640672", "0.6626269", "0.66142523", "0.66057414", "0.66057414", "0.66045076", "0.66044927", "0.6601799", "0.65884954", "0.6574875", "0.6572981", "0.656686", "0.6566642", "0.65595245", "0.6556517", "0.6534143", "0.65326685", "0.6532666", "0.65324235", "0.65312177", "0.65312177", "0.6530844", "0.65298414", "0.65213054", "0.65205824", "0.65162915", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.65104103", "0.6498615", "0.6498615", "0.6498615", "0.6498615", "0.6494344" ]
0.8351542
0
Get the registration email event
Получить событие электронной почты регистрации
private static function registration_email_event() { return array( 'user_registration' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNotificationRegistrationUsersEmail();", "public function getEmail() {\n return $this->formState->get('pre_registration_email');\n }", "public function getNotificationEmail() {}", "function getEventEmail() \n {\n return $this->getValueByFieldName( 'event_contactEmail' );\n }", "public function getRegistrant() {\n\t\treturn sprintf(\n\t\t\t_t(\"EventRegistration.REGISTRANT\", \"%s (%s)\"),\n\t\t\t$this->Name,\n\t\t\t$this->Email\n\t\t);\n\t}", "public function sendRegistrationEmail()\n {\n if (is_null($this->user)) {\n throw new InvalidArgumentException('A user needs to be created first');\n\n }\n $this->mailResponse = event(new UserWasRegistered($this->user));\n\n return $this->mailResponse;\n }", "public function getGenEmail()\n\t{\n\t\treturn $this->gen_email;\n\t}", "public function getEmail()\n {\n return $this->getValueByKey($this->response['return'], 'email');\n }", "function events(){\n\t\t\n\t\t//if you're here we assume you want to change event so we \"deselect\" the current event from session\n\t\t$this->Session->del('Event');\n\t\t\n\t\t$this->set('events', $this->Event->getEvents());\n\t\t//$email = $this->Admin->resendConfirmEmail(($this->Session->read('Event', 'Registrator')));\n\t\t\n\t\t//return $email;\n\t\t\n\t}", "public function getNotificationFromEmail();", "public function getReminderEmail()\n {\n // TODO: Implement getReminderEmail() method.\n }", "public function getEmail() {\n return isset($this->container['Email']) ? $this->container['Email'] : null;\n\t}", "public function getReminderEmail()\n {\n\treturn $this->email;\n }", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function get_email(){\n\t\treturn $this->email;\n\t}", "public function get_email()\n {\n return $this->_email;\n }", "public function get_email()\n {\n return $this->_email;\n }", "public function get_email()\n {\n return $this->_email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function get_email()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmailForEmailReminder(): string;", "public function get_email() {\n return $this->email;\n }", "public function get_email() {\n return $this->email;\n }", "function GetEmail()\r\n\t{\r\n\t\treturn $this->m_email;\r\n\t}", "function get_email() {\n if($this->email == null) { $this->fetch_info(); }\n \n return $this->email;\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getReminderEmail()\n {\n return $this->email;\n }", "public function getEmail()\n\t{\n\t\treturn $this->response['email'] ? : null;\n\t}", "public function getSenderEmail();", "public function getEmail() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"email\");\n\t}", "public function getEmail() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"email\");\n\t}", "public function getEmail() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"email\");\n\t}", "public function getEmail()\n\t{\n\t}", "public function getEmail()\n {\n return $this->getValueByKey($this->response, 'email');\n }", "function getEmail() {\n\t\treturn $this->email;\n\t}", "public function getEmail(){\n\t\treturn $this->__get('email');\n\t}", "public function getEmail() { return $this->email; }", "public function getEmail() { return $this->email; }", "public function getReminderEmail()\n {\n // TODO: Implement getReminderEmail() method.\n }", "public function getReminderEmail() {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->response['email'] ?: null;\n }", "public function getReminderEmail() {\n\t\treturn $this->email;\n\t}", "public function getReminderEmail() {\n\t\treturn $this->email;\n\t}", "function getEmail()\r\n\t{\r\n\t\treturn $this->email;\r\n\t}", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmailForVerification() {}", "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "public function getEmail()\r\n {\r\n return $this->_email;\r\n }", "public function getReminderEmail()\n\t{\n\t\treturn $this->mail;\n\t}" ]
[ "0.7492953", "0.7084015", "0.7004034", "0.6708592", "0.6689798", "0.6672994", "0.6657357", "0.6526006", "0.6492346", "0.6488521", "0.6475798", "0.64499044", "0.644837", "0.64423764", "0.64422333", "0.64422333", "0.64422333", "0.64422333", "0.64338064", "0.64319736", "0.64319736", "0.64319736", "0.64264643", "0.64180464", "0.64039826", "0.64026797", "0.64026797", "0.6400551", "0.6385758", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6371964", "0.6350428", "0.6350428", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6345741", "0.6343885", "0.6343831", "0.63341635", "0.63341635", "0.63341635", "0.6329759", "0.63112795", "0.63107765", "0.63070273", "0.6301606", "0.6301606", "0.6300471", "0.6300286", "0.6298335", "0.6297232", "0.6297232", "0.6292614", "0.62902856", "0.62902856", "0.62902856", "0.62902856", "0.62902856", "0.62902856", "0.62902856", "0.62902856", "0.62902856", "0.62902063", "0.6289578", "0.6285189", "0.62704223" ]
0.80970347
0
Get a random host reference with the specified role, skipping hosts which failed recent health checks.
Получить случайный хост с указанным ролью, пропуская хосты, которые не прошли недавние проверки работоспособности.
public function getAnyHostForRole($role) { $hosts = $this->getAllHostsForRole($role); shuffle($hosts); foreach ($hosts as $host) { $health = $host->getHealthRecord(); if ($health->getIsHealthy()) { return $host; } } throw new PhabricatorClusterNoHostForRoleException($role); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllHostsForRole($role) {\n // if the role is explicitly set to false at the top level, then all hosts\n // have the role disabled.\n if (idx($this->config, $role) === false) {\n return array();\n }\n\n $hosts = array();\n foreach ($this->hosts as $host) {\n if ($host->hasRole($role)) {\n $hosts[] = $host;\n }\n }\n return $hosts;\n }", "private function selectHost($cluster){\n\n $tempCandidate=array();\n if(is_array($cluster)){\n foreach($cluster as $candidate){\n for($i=0 ; $i < $candidate['proportion']; $i++){\n $tempCandidate[] = $candidate['host']; \n } \n }\n }else{\n return false;\n }\n\n if(0 == count($tempCandidate)){\n return false;\n }\n\n return $tempCandidate[array_rand($tempCandidate)];\n }", "public function getRandomNode() {\n\t\tif (empty($this->nodes)) throw new ClusterException('Node list is empty.');\n\t\t$randomKey = array_rand($this->nodes);\n\t\t$randomValue = $this->nodes[$randomKey];\n\t\t$node = null;\n\t\tif (is_array($randomValue)) {\n\t\t\t// $randomKey is an IP address and $randomValue is an array of options we pass to Node.\n\t\t\t$node = new Node($randomKey, $randomValue);\n\t\t} else {\n\t\t\t// $randomKey is an index and $randomValue is the IP address of the node.\n\t\t\t$node = new Node($randomValue);\n\t\t}\n\t\tunset($this->nodes[$randomKey]);\n\t\treturn $node;\n\t}", "protected function randomReadHost($readerHost)\n {\n return $readerHost[mt_rand(0, count($readerHost) - 1)];\n }", "public function testNoFallbackOnCustomHost() {\n\n // reuse default options so that fallback host order is not randomized again\n $opts = [\n 'key' => 'fake.key:veryFake',\n 'httpClass' => 'tests\\HttpMockInitTestTimeout',\n 'restHost' => 'custom.host.com',\n ];\n $ably = new AblyRest( $opts );\n try {\n $ably->time(); // make a request\n $this->fail('Expected the request to fail');\n } catch(AblyRequestException $e) {\n $this->assertEquals( [ 'custom.host.com' ], $ably->http->failedHosts, 'Expected to have tried only the custom host' );\n }\n }", "protected function randPort() {\n $array_rand = array_rand($this->portstack, 1);\n $return = $this->portstack[$array_rand];\n unset($this->portstack[$array_rand]);\n return $return;\n }", "public function testFallbackHostsFailFirst3() {\n $opts = [\n 'key' => 'fake.key:veryFake',\n 'httpClass' => 'tests\\HttpMockInitTestTimeout',\n 'httpMaxRetryCount' => 5,\n ];\n $ably = new AblyRest( $opts );\n $ably->http->failAttempts = 3;\n $data = $ably->time(); // make a request\n \n $this->assertEquals( 999999, $data, 'Expected to receive test data' );\n $this->assertEquals( 3, count( $ably->http->failedHosts ), 'Expected 3 hosts to fail' );\n }", "function get_temp_role() {\n global $DB;\n\n // I use a DB query here to avoid a weird caching issue.\n if ($id = $DB->get_record('config_plugins', array('plugin' => 'local_temporary_enrolments', 'name' => 'roleid') )->value ) {\n return $DB->get_record('role', array('id' => $id));\n }\n}", "public function getRandomMirror($type)\n\t{\n\n\t\t$mirrors = $this->getMirrors();\n\n\t\treturn $mirrors[$type][array_rand($mirrors[$type])];\n\n\t}", "public function random() {\n $count = count($this->collection);\n if ($count === 0) return false;\n return $this->collection[rand(0, $count-1)];\n }", "private function get_random_url() {\n\t\t// Pick a random WordPress page\n\t\tglobal $wpdb;\n\n\t\t$id = $wpdb->get_var( \"SELECT ID FROM {$wpdb->prefix}posts WHERE post_status='publish' AND post_password='' AND post_type='post' ORDER BY RAND() LIMIT 0,1\" );\n\t\tif ( $id ) {\n\t\t\t$url = get_permalink( $id );\n\n\t\t\tif ( $url ) {\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function testFallbackHosts() {\n $defaultOpts = new ClientOptions();\n $hostWithFallbacks = array_merge( [ $defaultOpts->restHost ], $defaultOpts->fallbackHosts );\n $hostWithFallbacksSorted = $hostWithFallbacks; // copied by value\n sort($hostWithFallbacksSorted);\n\n $opts = [\n 'key' => 'fake.key:veryFake',\n 'httpClass' => 'tests\\HttpMockInitTestTimeout',\n 'httpMaxRetryCount' => 5,\n ];\n $ably = new AblyRest( $opts );\n try {\n $ably->time(); // make a request\n $this->fail('Expected the request to fail');\n } catch(AblyRequestException $e) {\n $this->assertEquals( $hostWithFallbacks[0], $ably->http->failedHosts[0], 'Expected to try restHost first' );\n $this->assertNotEquals( $hostWithFallbacks, $ably->http->failedHosts, 'Expected to have fallback hosts randomized' );\n\n $failedHostsSorted = $ably->http->failedHosts; // copied by value;\n sort($failedHostsSorted);\n $this->assertEquals( $hostWithFallbacksSorted, $failedHostsSorted, 'Expected to have tried all the fallback hosts' );\n }\n }", "public function randomPlace()\n {\n $count = $this->createQueryBuilder('p')\n ->select('COUNT(p)')\n ->getQuery()\n ->getSingleScalarResult();\n\n // retourne un lieu au hasard\n return $this->createQueryBuilder('p')\n ->setFirstResult(rand(0, $count - 1))\n ->setMaxResults(1)\n ->getQuery()\n ->getSingleResult();\n\n }", "private function getRandomCheer()\n {\n $strings = [\n ':thumbsup: Whoop Whoop! ',\n ':thumbsup: Yayyy! ',\n ':thumbsup: Awesome! ',\n ':thumbsup: Woohooo! '\n ];\n\n return $strings[rand(0,3)];\n }", "function bp_core_get_random_member() {\r\n\tglobal $bp;\r\n\r\n\tif ( isset( $_GET['random-member'] ) ) {\r\n\t\t$user = bp_core_get_users( array( 'type' => 'random', 'per_page' => 1 ) );\r\n\t\tbp_core_redirect( bp_core_get_user_domain( $user['users'][0]->id ) );\r\n\t}\r\n}", "function get_random_server() {\n \tglobal $db;\n\t\t\n\t\t$srv = $db->get_row(\"SELECT * FROM servers ORDER BY RAND() LIMIT 1\");\n\t\t\n\t\treturn $srv;\n }", "function eino_get_random_image() {\n\n\t$eino_random_images = get_posts( array( 'numberposts' => 1, 'post_type' => 'attachment', 'meta_key' => '_wp_attachment_is_custom_background', 'meta_value' => get_option( 'stylesheet' ), 'orderby' => 'rand', 'nopaging' => true ) );\n\t\n\tforeach ( (array) $eino_random_images as $eino_random_image ) {\n\t\t$eino_random_image = esc_url_raw( $eino_random_image->guid );\n\t}\n\t\n\treturn $eino_random_image;\n\t\n}", "function getRandomColor(){\n $color = ['green', 'red', 'black', 'pink', 'orange', 'teal', 'violet', 'brown', 'grey', ''];\n $index = array_rand($color, 1);\n\n return $color[$index];\n}", "protected function getRandomEndpoint(): Endpoint\n {\n ++$this->counter;\n $endpointKey = 'server'.$this->counter;\n\n $this->endpointExcludes[] = $endpointKey;\n $this->lastEndpoint = $endpointKey;\n\n return $this->client->getEndpoint($endpointKey);\n }", "public static function findRandom() {\n\t\ttry {\n\t\t\t$row = DB::getInstance()->selectRandomRow(self::$table_name);\n\t\t\treturn new Client($row['name'], $row['status'], false);\n\t\t} catch(PDOException $e) {\n\t\t\tif($e->getCode() === '42S02') {\n\t\t\t\tthrow new TableMissesException($e->getMessage(), 0, $e);\n\t\t\t} else {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function getNodeRandom() {\n\n\t\t$row = $this -> fetchRow($this -> select() -> order('rand()'));\n\n\t\tif(!is_object($row)) {\n\t\t\treturn $this -> getRoot();\n\t\t}\n\n\t\treturn $row;\n\t}", "protected function randTile() {\n $array_rand = array_rand($this->tilestack, 1);\n $return = $this->tilestack[$array_rand];\n unset($this->tilestack[$array_rand]);\n return $return;\n }", "public function getRandomDashboardTile()\r\n {\r\n if (count($this->possibilities) > 0) {\r\n $key = array_rand($this->possibilities, 1);\r\n $funct = $this->possibilities[$key];\r\n $result = $this->$funct();\r\n while (!$result) {\r\n $this->removeOption($this->possibilities[$key]);\r\n if (count($this->possibilities) < 1) {\r\n return false;\r\n }\r\n $key = array_rand($this->possibilities, 1);\r\n $funct = $this->possibilities[$key];\r\n $result = $this->$funct();\r\n }\r\n $this->removeOption($this->possibilities[$key]);\r\n return $this->tile;\r\n }\r\n return false;\r\n }", "public function getRandomProxy($skipWait = false)\n {\n if (count($this->proxyArray) == 0) {\n throw new ProxyManagerNoMoreProxiesException;\n }\n $proxies = $this->database->getProxies();\n $dbProxy = $proxies[mt_rand(0, count($this->proxyArray) - 1)];\n $proxy = new RotatingProxy($dbProxy['proxy'], $dbProxy['min_wait'], $dbProxy['max_wait'], $dbProxy['updated_at']);\n $secondsToWait = $proxy->getSecondsToWait();\n if (!$skipWait && $secondsToWait > 0) {\n sleep($secondsToWait);\n }\n $this->database->incrementProxy($dbProxy['id']);\n return $proxy;\n }", "function zen_rand($min = null, $max = null) {\n static $seeded;\n\n if (!isset($seeded)) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n }", "public function testCustomHostAndFallbacks() {\n $defaultOpts = new ClientOptions([\n 'restHost' => 'rest.custom.com',\n 'fallbackHosts' => [\n 'first-fallback.custom.com',\n 'second-fallback.custom.com',\n 'third-fallback.custom.com',\n ],\n ]);\n $hostWithFallbacks = array_merge( [ $defaultOpts->restHost ], $defaultOpts->fallbackHosts );\n $hostWithFallbacksSorted = $hostWithFallbacks; // copied by value\n sort($hostWithFallbacksSorted);\n\n $opts = array_merge ( $defaultOpts->toArray(), [\n 'key' => 'fake.key:veryFake',\n 'httpClass' => 'tests\\HttpMockInitTestTimeout',\n 'httpMaxRetryCount' => 3,\n ] );\n $ably = new AblyRest( $opts );\n try {\n $ably->time(); // make a request\n $this->fail('Expected the request to fail');\n } catch(AblyRequestException $e) {\n $this->assertEquals( $hostWithFallbacks[0], $ably->http->failedHosts[0], 'Expected to try restHost first' );\n // $this->assertNotEquals( $hostWithFallbacks, $ably->http->failedHosts, 'Expected to have fallback hosts randomized' ); // this may fail when randomized order matches the original order\n \n $failedHostsSorted = $ably->http->failedHosts; // copied by value;\n sort($failedHostsSorted);\n $this->assertEquals( $hostWithFallbacksSorted, $failedHostsSorted, 'Expected to have tried all the fallback hosts' );\n }\n }", "function getBackground($range,$dir)\n{\n\t$n = rand(1,$range);\n\treturn $dir.$n.\".png\";\n}", "function thunder_user_role($role){\r\n\t\tglobal $wp_roles;\r\n\t\t$roles = $wp_roles->get_names();\r\n\t\treturn $roles[$role];\r\n\t}", "public function getRandomColor()\n {\n return $this->colors[array_rand($this->colors)];\n }", "public function testGetUserByRoleDoesNotReturnUserWhenOnlySomeRolesMatch()\n {\n $this->initialise();\n $this->assertFalse($this->module->getUserByRole(\"administrator\"));\n }", "public function getParticipant($role);", "public function get_role($role)\n {\n }", "public function detachRole($role);", "public function detachRole($role);", "protected function getHostRole(RequestEvent $event): ?string\n {\n $hostRole = null;\n $hostname = $event->getRequest()->getHttpHost();\n\n foreach ($this->config as $hostPattern => $role) {\n if ($this->isValid($hostPattern, $hostname)) {\n $hostRole = $role;\n\n break;\n }\n }\n\n return $hostRole;\n }", "public function randomOrFail(): User {\n\t\t$parts = explode('\\\\', $this->getEntityName());\n\t\t$alias = mb_strtolower(mb_substr($parts[array_key_last($parts)], 0, 1));\n\t\t$qb = $this->createQueryBuilder($alias);\n\t\t$maxId = (int) $qb->select(sprintf('Max(%s.id)', $alias))->getQuery()->getResult()[0][1];\n\t\t$randomId = mt_rand(1, $maxId);\n\t\t$qb->resetDQLParts();\n\t\treturn $qb\n\t\t\t->select($alias)\n\t\t\t->from($this->getEntityName(), $alias)\n\t\t\t->where(sprintf('%s.id = :id', $alias))\n\t\t\t->setParameter('id', $randomId)\n\t\t\t->getQuery()\n\t\t\t->getSingleResult()\n\t\t\t;\n\t}", "public function testIndexUserHostsEmpty()\n {\n $crawler = $this->callUrl('GET', '/command-scheduler/list/rights');\n\n $result = $crawler->filter('tr.userHost')->count();\n $this->assertEquals(0, $result);\n }", "final public function get_host()\n {\n try\n {\n return $this->host;\n }\n catch (Exception $e)\n {\n throw $e;\n }\n }", "protected function getRandomBackground()\n\t{\n\t\t$availableBackgrounds = array(\n\t\t\t'/background/recipewallpapera.jpg',\n\t\t\t'/background/recipewallpaperb.jpg',\n\t\t\t'/background/recipewallpaperc.jpg',\n\t\t\t'/background/recipewallpaperd.jpg',\n\t\t\t'/background/recipewallpapere.jpg',\n\t\t\t'/background/recipewallpaperf.jpg',\n\t\t\t'/background/recipewallpaperg.jpg',\n\t\t\t'/background/recipewallpaperh.jpg',\n\t\t\t'/background/recipewallpaperi.jpg',\n\t\t\t'/background/recipewallpaperj.jpg',\n\t\t);\n\n\t\t//check if selected file exists and else try again\n\t\t$image = array_rand($availableBackgrounds);\n\t\t$attempts = 0;\n\t\t$foundFile = false;\n\t\twhile(!$foundFile && $attempts < 10)\n\t\t{\t\n\t\t\tif(file_exists('img'.$availableBackgrounds[$image]))\n\t\t\t{\n\t\t\t\t$foundFile = true;\n\t\t\t}\n\t\t\t$attempts++;\n\t\t}\t\t\n\n\t\tif($foundFile)\n\t\t{\n\t\t\treturn $availableBackgrounds[$image];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\n\t}", "public function testFailOnMissingHost()\n {\n $credentialsFunc = $this->credentialsFunc;\n\n $credentialsFunc('123456', function ($err = null, $credentials = null) use ($credentialsFunc) {\n $this->assertNull($err);\n\n $options = [\n 'credentials' => $credentials\n ];\n\n $auth = Client::message(null, 8080, 'some message', $options);\n $this->assertNull($auth);\n });\n }", "private function getRandomNumber()\n\t{\n\t\treturn $r = rand(0,($this->boxes - 1));\n\t}", "private function createTestClientWithNoRole(): TestClient\n {\n return static::createClient();\n }", "public function viewAgent() {\n\t\t$array = array(1, 2, 3, 4, 6, 7);\n\t\t$array = array_diff($array, [3, 4]);\n\t\t$array = array_values($array);\n\t\treturn $array[array_rand($array)];\n\t\t// $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);\n\t\t// return $array[array_rand($array, 1)];\n\t}", "public function accountLess($role)\n {\n if ($role == config('define.superAdmin')) {\n $result = Account::where('role_id', '<>', $role)->get();\n } else {\n $result = Account::where('role_id', config('define.user'))->get();\n }\n\n return $result;\n }", "public function getRandomRefcode() {\n\t\t$enabledRefcodes = self::getEnabledRefcodes();\n\t\t$i = mt_rand(0, (count($enabledRefcodes) - 1));\n\t\t\n\t\treturn $enabledRefcodes[$i];\n\t}", "public function getRandomNeocities()\n {\n try {\n $neo = $this->client->request('GET', 'https://neocities.org/browse?sort_by=views');\n $neo->filter('a.neo-Screen-Shot')->each(function (Crawler $node) use (&$urls) {\n $hrefAttr = $node->filter('a')->extract(['href']);\n if (isset($hrefAttr[0])) {\n try {\n $url = new Url($hrefAttr[0]);\n $urls[] = $url->getUrl();\n } catch (InvalidUrlException $e) {\n }\n }\n });\n\n if (sizeof($urls) == 0) {\n throw new \\Exception('No URLs to select from Neocities');\n }\n return $urls[array_rand($urls)];\n } catch (RequestException $e) {\n return false;\n }\n }", "public function get($random);", "static function random($name,$component='') {\n\t\t$var = self::get_var_by_parms($name,CMS::site(),$component);\n\t\tif (!$var) return false;\n\t\twhile ($var->vartype=='dir') {\n\t\t\t$vars = (array) self::db()->find_dir($var->id,CMS::site(),$component)->select();\n\t\t\tshuffle($vars);\n\t\t\t$var = $vars[0];\n\t\t}\n\t\treturn self::$types[$var->vartype]->get($var);\n\t}", "public function get(string $role, array $scope, bool $load = true);", "public function return_random(){\n $make_array = array($this->make_cap(), $this->make_straight(), $this->make_ninety(), $this->make_tee());\n $random_number = rand(0, sizeof($make_array)-1);\n\n return $make_array[$random_number];\n }", "function generateIPSection() \n{\n\tsrand(microtime() * 1000000);\n\treturn rand(0,255);\n}", "function findRandom() {\n\t\treturn $this->first(array('order' => 'RAND()'));\n\t}", "public function detachRole($role)\r\n\t{\r\n\t\t$this->roles = null;\r\n\t\r\n\t\treturn $this->roles()->detach($role);\r\n\t}", "function getAddr() {\n $address = Address::inRandomOrder()->first();\n if (!is_null($address)) {\n return $address->id;\n }else{\n $address = factory(Address::class)->create();\n }\n return $address->id;\n}", "public function getRandomCompany($excludeDeleted = true, $online = true, $contact = false, $except = null) {\n $db = Zend_Registry::get('dbAdapter');\n $select = $db->select()->from('companys', array('id'))->order('RAND()')->limit(1);\n\n if ($excludeDeleted) {\n $select->where('deleted=0');\n }\n if ($online) {\n $select->where('status=1');\n }\n if ($contact) {\n $select->where('contactId > 0');\n }\n\n if (!is_null($except)) {\n $select->where('id not in (?)', $except);\n }\n\n $row = $db->fetchRow($select);\n $company = new Yourdelivery_Model_Company($row['id']);\n\n $this->assertTrue($company instanceof Yourdelivery_Model_Company);\n $this->assertTrue($company->isPersistent());\n\n return $company;\n }", "protected function loadHostsnotinme()\n {\n $find = array('id' => $this->get('hosts'));\n $this->set(\n 'hostsnotinme',\n self::getSubObjectIDs(\n 'Host',\n $find,\n 'id',\n true\n )\n );\n unset($find);\n }", "public function testCachedFallback() {\n $timeout = 2000;\n $ably = new AblyRest( array_merge( self::$defaultOptions, [\n 'key' => self::$testApp->getAppKeyDefault()->string,\n 'fallbackRetryTimeout' => $timeout,\n 'httpClass' => 'tests\\HttpMockCachedFallback',\n 'fallbackHosts' => [\n 'a.ably-realtime.com',\n 'b.ably-realtime.com',\n 'c.ably-realtime.com',\n 'd.ably-realtime.com',\n 'e.ably-realtime.com',\n ],\n ]));\n\n // The main host is called and there's an error\n $ably->time();\n $this->assertEquals( 1, $ably->http->errors );\n\n // The cached host is used: no error\n $ably->time();\n $ably->time();\n $ably->time();\n $this->assertEquals( 1, $ably->http->errors );\n\n // The cached host has expired, we've an error again\n sleep( $timeout / 1000 );\n $ably->time();\n $this->assertEquals( 2, $ably->http->errors );\n }", "public function get_random_post(): ?WP_Post {\n return parent::get_random_post();\n }", "public static function seedRole($role)\n {\n $roles = self::getFileContent('roles.json');\n\n if (! in_array($role->name, $roles)) {\n $role = $role->toArray();\n unset($role['id']);\n $roles[] = $role;\n self::saveFileContent('roles.json', $roles);\n }\n }", "function tep_rand($min = null, $max = null) {\n static $seeded;\n\n if ( ! isset($seeded)) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n }", "public function getHost() {\r\n\t\t$log = Zend_Registry::get('logger');\r\n\t\t$log->log('Website_Model_Party->getHost',Zend_Log::DEBUG);\r\n\t\t\r\n\t\tif(!$this->_host){\r\n\t\t\t$this->_host = Website_Model_CbFactory::factory('Website_Model_Member',$this->hostId);\r\n\t\t}\r\n\t\treturn $this->_host;\r\n\t}", "public static function randomColour()\n {\n $random = [\n 'rgb' => null,\n 'hex' => null,\n 'hsl' => null\n ];\n foreach(array('R', 'G', 'B') as $colour=>$key){\n $val = mt_rand(0,255);\n $random['rgb'][$key] = $val;\n $dechex = dechex($val);\n if(strlen($dechex) < 2)\n {\n $dechex = \"0\" . $dechex;\n }\n $random['hex'] .= $dechex;\n }\n $random['hsl'] = self::hexToHsl($random['hex']);\n\n return $random;\n }", "public function testDeleteRole() {\n $this->drupalPostForm(\"admin/people/roles/manage/{$this->rid_low}/delete\", NULL, t('Delete'));\n $this->drupalPostForm('admin/people/roles/add', array('label' => 'low', 'id' => 'low'), t('Save'));\n $this->drupalGet('admin/people/permissions');\n $this->assertNoFieldChecked(\n \"edit-{$this->rid_high}-assign-low-role\",\n t('Permissions are updated when role is deleted.'),\n t('Role Delegation')\n );\n }", "public function getRandomGUID();", "protected function getRandomBackgroundColor()\n {\n $colors = $this->getBackgroundColors();\n return $colors[array_rand($colors)];\n }", "public function Random()\n {\n return $this->model->GetAllEntries(\"rand()\",false,1)[0];\n\n }", "public function deleted(Role $role)\n {\n //\n }", "function RandColor( $dontuse, $image )\r\n {\r\n $x=0;\r\n \r\n do\r\n {\r\n srand( ( ( int ) ( ( double ) microtime() * 1000000 ) ) ); \r\n\r\n $color = imagecolorallocate( $image, rand( 0, 255 ), rand( 0, 255 ), rand( 0, 255 ) );\r\n\r\n if( array_search( $color, $dontuse ) ) // is this color in the last 10 array?\r\n imagecolordeallocate($image, $color ); // ...yes, free the mem ( don't overload the server )...\r\n else\r\n break; \r\n \r\n }while( $x < 1000 ); // reasonable probibility ( don't want to hang to long on the server )..\r\n \r\n return $color;\r\n }", "abstract protected function getHost();", "public static function get_activated_theme_by_role ($role) {\n\t\t//return ($theme) ? $theme->name : ''; \n\t\t\n\t\t$theme = unserialize(config(\"themes.\".$role));\n\t \treturn ($theme) ? $theme->name : ''; \t \n\t}", "function bp_get_participant_role() {\n\t_doing_it_wrong( 'bp_get_participant_role', __( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );\n}", "function randColor() {\n return sprintf('#%06X', mt_rand(0, 0xFFFFFF));\n}", "public static function fromRole(string $role): self\n {\n throw new self(\\sprintf(self::MESSAGE,$role));\n }", "public function getHost()\n {\n if (!$this->isLoaded('host')) {\n $this->set('host', new Host($this->get('hostID')));\n }\n return $this->get('host');\n }", "public function getRandomAgent()\n {\n switch (mt_rand(0,9))\n {\n case 0: case 1: case 2: case 3: return 'Firefox';\n case 4: case 5: case 6: return 'Internet Explorer';\n case 7: case 8: return 'Opera';\n case 9: return 'Safari';\n }\n }", "function members_get_delete_role_url( $role ) {\n\n\t$url = add_query_arg( array( 'action' => 'delete', 'role' => $role ), members_get_edit_roles_url() );\n\n\treturn wp_nonce_url( $url, 'delete_role', 'members_delete_role_nonce' );\n}", "public function getRandom()\n {\n\n return $this->repository->getRandom(); \n\n }", "protected function getProxy(){\n\t\tif(isset($this->settings['proxies'])&&is_array($this->settings['proxies'])){\n\t\t\tif(count($this->settings['proxies'])==1){\n\t\t\t\treset($this->settings['proxies']);\n\t\t\t\treturn current($this->settings['proxies']);\n\t\t\t}else{\n\t\t\t\t$this->settings['proxies'][array_rand($this->settings['proxies'])];\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public static function getRandomMessage() {\n $min = 0;\n $max = count(self::$messages) - 1;\n\n $randomIndex = rand($min, $max);\n\n return self::$messages[$randomIndex];\n }", "public function getHostVerified(){\n $customerData=$this->getCustomerDetails();\n return $this->verifyhost->load ( $customerData->getId(), 'host_id' );\n }", "protected function test_special_role($role) {\n\t\tlist($type,$subtype,$attributes) = $this->_split_special_role($role);\n\t\t$handle = $this->factory('Acl_'.$type,array($this->application));\n\t\treturn $handle->test($subtype,$attributes);\n\t}", "function getRandom()\n {\n $randm = 'rand-'.rand(1000,9999);\n return $randm;\n }", "public function getRandomPosition()\n {\n return $this->getPositionAt(new Coordinate(rand(1, $this->size_x), rand(1, $this->size_y)));\n }", "public function get_random() { \r\n\r\n\t\t$args = array(); \r\n\t\t$results = $this->sendCommand('shuffle_status',$args); \r\n\t\t\r\n\t\treturn $results; \r\n\r\n\t}", "function GetRandContent($purpose = 2)\n\t{\n\t\t$sql = \"SELECT `ID` FROM `content` WHERE `purpose` = $purpose ORDER BY RAND() LIMIT 1\";\n\t\t$contentID = DB::QueryToValue($sql);\n\t\t\n\t\tif ($contentID)\n\t\t{\n\t\t\t$content = new Content ( $contentID );\n\t\t\treturn $content;\n\t\t}\n\t\t// return result\n\t\treturn null;\n\t}", "public function detachRole($role)\n {\n return $this->roles()->detach($role);\n }", "private function returnRoute($role)\n {\n //Valeur par défaut, si par exemple c'est admin\n $route = 'campagne_brhp_show';\n switch ($role) {\n case 'ROLE_SHD':\n $route = 'campagne_shd_show';\n break;\n case 'ROLE_AH':\n $route = 'campagne_ah_show';\n break;\n case 'ROLE_BRHP':\n $route = 'campagne_brhp_show';\n break;\n }\n\n return $route;\n }", "public function random()\n {\n return $this->get();\n }", "public function detachRole($role, $team = null);", "public function testGetUserByRoleDoesNotReturnUserWhenUserDoesNotHaveAllRolesSpecified()\n {\n $this->initialise();\n $this->assertFalse($this->module->getUserByRole(array(\"administrator\", \"editor\", \"moderator\")));\n }", "public function getRandomDeliverRange(Yourdelivery_Model_Servicetype_Abstract $service) {\n $ranges = $service->getRanges(1000, $service->isPremium());\n shuffle($ranges);\n return $ranges[0];\n }", "public function testFallbackHosts400() {\n\n $opts = [\n 'key' => 'fake.key:veryFake',\n 'httpClass' => 'tests\\HttpMockInitTestTimeout',\n ];\n\n $ably = new AblyRest( $opts );\n $ably->http->httpErrorCode = 401;\n $ably->http->errorCode = 40101; // auth error\n\n try {\n $ably->time(); // make a request\n $this->fail('Expected the request to fail');\n } catch(AblyRequestException $e) {\n $this->assertEquals( [ 'rest.ably.io' ], $ably->http->failedHosts, 'Expected to have tried only the default host' );\n }\n }", "public function randomAuthorAction()\n {\n //$authorsList = $this->authorsRepository->findAll();\n $authorsList = $this->authorsRepository->findByUidList($this->settings['randomAuthor']['authorUidList']);\n $this->view->assign('author', $authorsList[rand(0, count($authorsList) - 1)]);\n }", "public function testDisallowedHosts($host) {\n $robots_txt = \\curl_get_content('/robots.txt', \"-H 'Host: $host'\");\n $this->assertEquals('User-agent: *', $robots_txt[0]);\n $this->assertEquals('Disallow: /', $robots_txt[1]);\n }", "public function testDisallowedHosts($host) {\n $robots_txt = \\curl_get_content('/robots.txt', \"-H 'Host: $host'\");\n $this->assertEquals('User-agent: *', $robots_txt[0]);\n $this->assertEquals('Disallow: /', $robots_txt[1]);\n }", "private function getRandomProperty($props)\n {\n $sub = [];\n foreach ($props as $prop) {\n //if (!in_array($prop->dataType, array('object', 'NULL'))) {\n if ($prop->dataType !== 'object') {\n $sub[] = $prop;\n }\n }\n if (empty($sub)) {\n return false;\n }\n $prop = $sub[array_rand($sub)];\n\n return (object)array(\n 'visibility' => $prop->visibility,\n 'property' => $prop->name,\n 'value' => $this->getRandomValue($prop->dataType),\n );\n }", "public function detachRole($role)\n {\n $this->roles = null;\n return $this->roles()->detach($role);\n }", "public function getRandomIP()\n {\n return mt_rand(0,255).'.'.mt_rand(0,255).'.'.mt_rand(0,255).'.'.mt_rand(0,255);\n }", "public static function invertRole($role){\n\t\tif($role == self::LEADER){\n\t\t\treturn self::FOLLOWER;\n\t\t}else if($role == self::FOLLOWER){\n\t\t\treturn self::LEADER;\n\t\t}\n\t\treturn null;\n\t}", "function previous_page_link_plus(){\n\t\treturn array( 'role' => 'escort', 'orderby' => 'rand' );\n\t}" ]
[ "0.57848364", "0.5396375", "0.51178455", "0.51065993", "0.50574166", "0.50262177", "0.46832457", "0.4659294", "0.46250734", "0.4620465", "0.45542213", "0.45341724", "0.4529889", "0.4516323", "0.4479596", "0.44733015", "0.4467424", "0.44588575", "0.44531468", "0.444967", "0.4430791", "0.44252712", "0.4407098", "0.4405488", "0.43830824", "0.43809003", "0.43802217", "0.4378764", "0.4356142", "0.43513286", "0.43302894", "0.43203336", "0.43160683", "0.43160683", "0.43065354", "0.43019667", "0.42945212", "0.4294063", "0.42940345", "0.42922804", "0.42712215", "0.42593387", "0.42559096", "0.42552817", "0.42548525", "0.4250986", "0.4245883", "0.42429736", "0.42325702", "0.4216924", "0.42036912", "0.41897985", "0.41760004", "0.41757149", "0.41685894", "0.4144742", "0.4136976", "0.4135016", "0.413092", "0.41243646", "0.4119117", "0.41159716", "0.41090533", "0.410424", "0.40999436", "0.40962222", "0.40887475", "0.4085395", "0.40847164", "0.4080223", "0.4077495", "0.40757588", "0.40745366", "0.4059895", "0.4056007", "0.40526545", "0.40500632", "0.40499845", "0.40493777", "0.40488377", "0.40458262", "0.4043828", "0.4038994", "0.40356594", "0.40318403", "0.4026706", "0.4023599", "0.40222543", "0.40177074", "0.40168497", "0.40166044", "0.40119767", "0.4011956", "0.40076518", "0.40076518", "0.40070722", "0.4005615", "0.40046", "0.4003242", "0.39996728" ]
0.71526206
0
Get all configured hosts for this service which have the specified role.
Получить все настроенные хосты для этого сервиса, которые имеют указанную роль.
public function getAllHostsForRole($role) { // if the role is explicitly set to false at the top level, then all hosts // have the role disabled. if (idx($this->config, $role) === false) { return array(); } $hosts = array(); foreach ($this->hosts as $host) { if ($host->hasRole($role)) { $hosts[] = $host; } } return $hosts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHosts()\n {\n if (array_key_exists(\"hosts\", $this->_propDict)) {\n return $this->_propDict[\"hosts\"];\n } else {\n return null;\n }\n }", "public function getHosts()\n {\n }", "public function hosts() {\n\t\t$res = $this->zap->request($this->zap->base . 'core/view/hosts/');\n\t\treturn reset($res);\n\t}", "public function getHosts() {\n\t\tif (!$this->isValid) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn array_unique(zbx_objectValues($this->expressions, 'host'));\n\t}", "protected function getHosts(): array\n {\n if ($this->hostnames) {\n return $this->hostnames;\n }\n\n $pattern = $this->hostnameMatchPattern;\n $hostnames = array_intersect_key($_ENV, array_flip(preg_grep($pattern, array_keys($_ENV))));\n\n $entries = [];\n foreach ($hostnames as $name) {\n $entries[] = $name;\n }\n return $entries;\n }", "public function all_hostnames() {\n\t\treturn $this->hostnames;\n\t}", "public function getHosts()\n {\n $this->connect();\n // Ensure pings are up-to-date\n foreach ($this->hosts as $host) {\n $this->pingHost($host['host'], $host['port']);\n }\n return $this->hosts;\n }", "public function getESHosts(){\n $ar = new AlertRepository();\n $indices = $this->getDateValuesForArray($this->getValidIndices($ar->getAllIndices()));\n return $this->getAllHosts($indices);\n }", "public function GetHosts()\n {\n $hosts = array();\n\n if ($this->IsValidAuthToken())\n {\n $request = new ZabbixWrapper();\n $request->Create(\"host.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixHostGetRequest();\n $request->params->output = array(\"hostid\", \"host\");\n //selectInterfaces = new string[] { \"interfaceid\", \"ip\" }\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response))\n {\n foreach ($response[\"result\"] as $item)\n {\n $hosts[] = Host::WithNameAndID($item[\"host\"], $item[\"hostid\"]);\n }\n }\n }\n\n return $hosts;\n }", "public function getAnyHostForRole($role) {\n $hosts = $this->getAllHostsForRole($role);\n shuffle($hosts);\n foreach ($hosts as $host) {\n $health = $host->getHealthRecord();\n if ($health->getIsHealthy()) {\n return $host;\n }\n }\n throw new PhabricatorClusterNoHostForRoleException($role);\n }", "public function findAll()\n {\n $vhostNodes = array();\n foreach ($this->getSystemConfiguration()->getContainers() as $containerNode) {\n foreach ($containerNode->getHost()->getVhosts() as $vhostNode) {\n $vhostNodes[$vhostNode->getPrimaryKey()] = $vhostNode;\n }\n }\n return $vhostNodes;\n }", "private function getHosts() {\n if (!isset($this->hosts)) {\n $hosts = trim($this->config('str_hosts'));\n $this->hosts = ($hosts) ? explode( \"\\n\", $hosts) : [];\n }\n return $this->hosts;\n }", "public function hosts() {\n\n return $this->hasMany(Host::class);\n\n }", "public function hosts() : array\n {\n return [$this->allSubdomainsOfApplicationUrl()];\n }", "public function list_hosts(){\n $input=array(\n 'module' => 'MysqlFE',\n 'function' => 'listhosts'\n );\n\n $query=$this->build_query($input);\n $raw=$this->query($query);\n $ob=json_decode($raw, false);\n return $status=$ob->cpanelresult->data;\n }", "protected function retrieveReplSetHosts()\n {\n if (!$this->replSet) {\n throw new MongoConnectionException(\"Cannot retrieve replication set host list. Connection not configured as a replSet connection.\");\n }\n\n $protocol = $this->connectToFirstAvailableHost();\n\n $is_master = $this->selectDB('admin')->command([\n 'isMaster' => 1,\n ], [\n 'protocol' => $protocol // Explicitly use this host so we don't mess up caching with read/write protocol functions while we're still bootstrapping\n ]);\n\n if (!isset($is_master['setName']) || $is_master['setName'] != $this->replSet) {\n throw new MongoConnectionException(\"Could not ascertain replSet information from seed host ({$protocol->getServerHash()}). Are you sure this host is configured as a member of replset: '{$this->replSet}'?\");\n }\n\n $hosts = [];\n $replset_hosts = isset($is_master['hosts']) ? $is_master['hosts'] : array();\n $replset_passive_hosts = isset($is_master['passive']) ? $is_master['passive'] : array();\n $all_hosts = array_merge($replset_hosts, $replset_passive_hosts);\n foreach ($all_hosts as $host_str) {\n $host_parts = $this->parseHostString($host_str);\n if ($host_str === $is_master['primary']) {\n $host_parts['state'] = static::STATE_PRIMARY;\n } else {\n $host_parts['state'] = static::STATE_STARTUP;\n }\n $hosts[$host_parts['hash']] = $host_parts;\n }\n\n return $hosts;\n }", "public function get_exception_hosts()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $hosts = array();\n\n try {\n $rules = $this->_get_rules();\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_ERROR);\n }\n\n foreach ($rules as $rule) {\n if (!($rule->get_flags() & Rule::OUTGOING_BLOCK))\n continue;\n\n if ($rule->get_flags() & (Rule::WIFI | Rule::CUSTOM))\n continue;\n\n if (!strlen($rule->get_address()))\n continue;\n\n $hostinfo = array();\n $hostinfo['name'] = $rule->get_name();\n $hostinfo['enabled'] = $rule->is_enabled();\n $hostinfo['host'] = $rule->get_address();\n\n $hosts[] = $hostinfo;\n }\n\n return $hosts;\n }", "public function getHosts(){\n return $this->trackers;\n }", "public function get_block_hosts()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $hosts = array();\n\n $rules = $this->_get_rules();\n\n foreach ($rules as $rule) {\n if (!($rule->get_flags() & Rule::INCOMING_BLOCK))\n continue;\n\n if ($rule->get_flags() & Rule::CUSTOM)\n continue;\n\n $info = array();\n $info['name'] = $rule->get_name();\n $info['host'] = $rule->get_address();\n $info['enabled'] = $rule->is_enabled();\n\n $hosts[] = $info;\n }\n\n return $hosts;\n }", "function getSudoerHosts() {\n\t\tif ( isset( $this->sudoerInfo[0]['sudohost'] ) ) {\n\t\t\t$hosts = $this->sudoerInfo[0]['sudohost'];\n\t\t\tarray_shift( $hosts );\n\t\t\treturn $hosts;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "public function getKnownAliasHosts($cacheMinutes = null){\n\t\t$hosts = array();\n\t\t$query = \"SELECT DISTINCT host_id FROM `\".Tbl::get('TBL_ALIAS_HOST').\"`\";\n\t\t$this->query->exec($query, $cacheMinutes);\n\t\twhile (($host_id = $this->query->fetchField(\"host_id\")) != false) {\n\t\t\t$hosts[] = new Host($host_id);\n\t\t}\n\t\treturn $hosts;\n\t\t\n\t}", "private function getAllHosts($indicesArr){\n $result = array();\n // echo\"<pre>\";print_r($indicesArr);die;\n foreach($indicesArr as $key=>$value){\n $result[] = $value->es_host;\n }\n return $result;\n }", "public function get_hosts() {\n\t\t$hosts = array();\n\t\tforeach ( $this->model->get_languages_list() as $lang ) {\n\t\t\t$hosts[ $lang->slug ] = wp_parse_url( $this->home_url( $lang ), PHP_URL_HOST );\n\t\t}\n\t\treturn $hosts;\n\t}", "public function getVirtualHosts()\n {\n return $this->virtualHosts;\n }", "public function getHostsForService(Service $service)\n {\n $droplet = $this->api->droplet();\n $droplets = $droplet->getAll();\n\n $hosts = [];\n foreach ($droplets as $droplet) {\n $host = new Droplet($droplet, $this->api);\n $host->setProvider($this);\n\n if (($instance = $service->isThisYourHost($host)) !== false) {\n $host->setService($service);\n $host->setInstance($instance);\n $hosts[] = $host;\n }\n }\n\n return $hosts;\n }", "function getAvailableVhosts($config)\n {\n $ret = array();\n $ldap = $config->get_ldap_link();\n $ldap->cd ($config->current['BASE']);\n\n /* Search for vhosts ...\n */\n $ldap->search(\"(&(objectClass=apacheConfig)(apacheServerName=*))\",array(\"apacheServerName\"));\n\n $ForwardVhosts = array();\n $zones = array();\n\n while($at = $ldap->fetch()){\n $ForwardVhosts[$at['dn']] = $at;\n }\n\n foreach($ForwardVhosts as $dn => $obj){\n\n if(preg_match(\"/\".$dn.\"/\",$Rdn)){\n $zones[$Robj['apacheServerName'][0]] =$obj['apacheServerName'][0];\n } \n }\n return($zones);\n }", "public function GetHostsByHostGroup($arg)\n {\n $hosts = array();\n\n if (is_string($arg) || is_int($arg))\n {\n if ($this->IsValidAuthToken())\n {\n $hostGroupID = (is_int($arg))?($arg):($this->GetHostGroupID($arg));\n\n $request = new ZabbixWrapper();\n $request->Create(\"host.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixHostGetRequest();\n $request->params->output = array(\"hostid\", \"host\");\n $request->params->groupids = $hostGroupID;\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response))\n {\n foreach ($response[\"result\"] as $item)\n {\n $hosts[] = Host::WithNameAndID($item[\"host\"], $item[\"hostid\"]);\n }\n }\n }\n }\n\n return $hosts;\n }", "public function getHostComponents()\n {\n if (array_key_exists(\"hostComponents\", $this->_propDict)) {\n return $this->_propDict[\"hostComponents\"];\n } else {\n return null;\n }\n }", "public function getHosts($hostType)\n\t\t{\n\t\t\tif(!isset($this->id))\n\t\t\t\treturn FALSE;\n\t\t\tglobal $conn;\n\t\t\t\n\t\t\t$get = $conn->prepare(\"SELECT host FROM ITSM_Application_Host WHERE application = ? AND relationship = ?\");\n\t\t\t$get->bindParam(1, $this->id);\n\t\t\t$get->bindParam(2, $hostType);\n\t\t\t$get->execute();\n\t\t\t\n\t\t\t$hosts = [];\n\t\t\t\n\t\t\tforeach($get->fetchAll(\\PDO::FETCH_COLUMN, 0) as $hostId)\n\t\t\t{\n\t\t\t\t$host = new itsmcore\\Host($hostId);\n\t\t\t\t\n\t\t\t\tif($host->load())\n\t\t\t\t\t$hosts[] = $host;\n\t\t\t}\n\t\t\t\n\t\t\treturn $hosts;\n\t\t}", "public function getAllByRole($role = null)\n {\n $users = User::where('role', '=', $role)->get();\n\n if ($users->count()) {\n $users = $users->keyBy('northstar_id');\n $ids = array_keys($users->all());\n\n $accounts = $this->getBatchedCollection($ids);\n\n foreach ($accounts as $account) {\n $account = $this->appendRole($account, $users[$account->id]->role);\n }\n\n return collect($accounts);\n }\n\n return $users;\n }", "public function getBatchHosts()\n {\n $hosts = $this->getSetting( 'SYSTEM_BATCH_HOSTS' );\n\n $options = array();\n\n foreach( $hosts as $host ) {\n $options[] = array( 'host' => $host,\n 'port' => 4730 );\n }\n\n return $options;\n }", "function func_getModulesByRole($role)\n\t{\n\t\t$condition = \"module_role = '\" . $role . \"' AND module_enabled = 1\";\n\t\treturn func_getMultiRowFromTable(\"modules\", $condition);\n\t}", "public static function getTrustedHosts(): array\n {\n return self::proxy()->getTrustedHosts();\n }", "public function all()\n {\n return $this->role->all();\n }", "public function _get_allhost(){\n global $dbconn_zabbix;\n $sql = \"SELECT hostid,host,ip,port,status FROM \".ZABBIX_HOSTS_TABLE;\n if(MODE_DEBUG == true){\n echo $sql;\n echo \"<br>\";\n }\n $result = mysql_query($sql,$dbconn_zabbix);\n while($row = mysql_fetch_assoc($result)){\n $rows[$row['hostid']] = $row;\n }\n mysql_free_result($result);\n return $rows;\n }", "public function getHostCount()\n {\n return self::getClass('HostManager')\n ->count(\n array(\n 'id' => $this->get('hosts'),\n )\n );\n }", "public function discover() {\n $services = array();\n $service_list = require Path::getConfigDir() . '/services.php';\n\n foreach($service_list as $service_name => $service_options) {\n foreach($service_options['groups'] as $group) {\n if(User::get()->isAuthorized($group)) {\n $services[$service_name] = $service_options['description'];\n break;\n }\n }\n }\n\n return $services;\n }", "function get_all_hostnames()\n {\n $allDomainNames = $this->conf->HostAliases;\n if ($this->conf->Domain)\n array_push($allDomainNames, $this->conf->Domain);\n $allDomainNames = array_map('strtolower', $allDomainNames);\n return $allDomainNames;\n }", "public function getPrivsByRole($role)\n {\n }", "public function getAllVHosts() {\n\n\t\t\t$file = file_get_contents($this->config->apache_path .'other'. SEP .'vhost-app.conf');\n\t\t\t$hosts = explode('#----------', $file);\n\n\t\t\t$data = array();\n\n\t\t\tforeach($hosts as $host) {\n\n\t\t\t\t$lines = explode(\"\\n\", $host);\n\n\t\t\t\t//if(!isset($lines[4])) break;\n\t\t\t\t//if($lines[2] != '<VirtualHost *:80>') break;\n\t\t\t\tif(empty($lines[1])) break;\n\n\n\t\t\t\t$_name = str_replace('#---- ', '', $lines[1]);\n\t\t\t\t$_name = str_replace(' ----#', '', $_name);\n\n\n\t\t\t\t$_dir = str_replace(\"\\tDocumentRoot \", '', $lines[4]);\n\n\t\t\t\tif($_name != '<VirtualHost *:80>') {\n\t\t\t\t\t$data[] = array($_name, $_dir);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $data;\n\n\t\t}", "public function get_hoster_houses () {\r\n return $this->host_houses->get_list_of_houses(Auth::user()->id);\r\n }", "function getHosts(){\r\n\t\t\r\n\t\t$mountJsonData = array(\"jsonrpc\" => \"2.0\", \"method\" => \"host.get\", \r\n\t\t\t\t\t\t\t\"params\" => array(\r\n\t\t\t\t\t\t\t\t\t \"output\" => array (\"hostid\" => \"hostid\", \"host\" => \"host\"),\r\n\t\t\t\t\t\t\t\t\t \"selectInterfaces\" => array (\"interfaceid\" => \"interfaceid\", \"ip\" => \"ip\")\r\n\t\t\t\t\t\t\t\t\t ),\r\n\t\t\t\t\t\t\t\"id\" => $_SESSION[\"ID\"], \"auth\" => $_SESSION[\"USER\"]);\r\n\r\n $json_data_string = json_encode($mountJsonData);\t\t\r\n\t\t$result = setOpt($json_data_string, \"GET\");\t\t\r\n\t\treturn $result;\r\n\t}", "public static function getServiceHostByModule($module)\n {\n $req = new \\Nlp\\NlpStringRequest();\n $req->setContent($module);\n list($reply, $status) = self::getClient(RPC_SERVICE_ADDRESS)->Service($req)->wait();\n if ($status->code != 0) {\n return [];\n }\n $message = $reply->getRes();\n $hosts = [];\n foreach ($message as $host) {\n $hosts[] = $host;\n }\n return $hosts;\n }", "private static function getRemoteServiceSites()\n\t{\n\t\tstatic $ret;\n\t\tif (!$ret) {\n\t\t\t$ret = array();\n\t\t\tif (defined('\\Foomo\\EXTERNAL_SERVICE_SITES')) {\n\t\t\t\t$siteUrls = explode(', ', \\Foomo\\EXTERNAL_SERVICE_SITES);\n\t\t\t\tforeach ($siteUrls as $siteUrl) {\n\t\t\t\t\t$ret[] = trim($siteUrl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function lookupHosts($topic);", "public function getHostSettings()\n {\n return [\n [\n \"url\" => \"/services/sandbox/rest/returns\",\n \"description\" => \"No description provided\",\n ]\n ];\n }", "public function getRoleAssignments(Role $role);", "function fetchHosts() {\n //\n \n }", "public function getAllowedHostnames()\n {\n return $this->_urlValidator->getAllowedHostnames();\n }", "public function getRouteOptions()\n {\n $this->prepare();\n\n $options = [];\n\n foreach ($this->hosts as $host => $opts) {\n $options['default' === $host ? '' : $host] = $opts['cache_prefix'];\n }\n\n $options += $this->cachePrefix;\n\n return $options;\n }", "public function getAvailableAuthenticationServers(): array {\n /** @var array $available_servers */\n $available_servers = $this->storage\n ->getQuery()\n ->condition('status', 1)\n ->execute();\n\n $result = [];\n foreach ($this->config->get('sids') as $configured_server) {\n if (isset($available_servers[$configured_server])) {\n $result[] = $configured_server;\n }\n }\n return $result;\n }", "protected function getHostActions()\n {\n $urls = array();\n\n foreach (Hook::all('Monitoring\\\\HostActions') as $hook) {\n foreach ($hook->getActionsForHost($this->object) as $id => $url) {\n $urls[$id] = $url;\n }\n }\n\n return $urls;\n }", "public function getClusters()\n\t{\n\t\tif (!isset($this->configuration['kestrel'])) {\n\t\t\tthrow new Exception('The configuration file does not contain a \\'kestrel\\' element');\n\t\t}\n\n\t\t$clusters = array();\n\n\t\tforeach ($this->configuration['kestrel'] as $clusterName=>$clusterNodes) {\n\t\t\t$clusters[$clusterName] = new Kestrel_Cluster($clusterName);\n\t\t\tforeach ($clusterNodes as $nodeName=>$nodeConfig) {\n\t\t\t\t$clusters[$clusterName]->addServer(new Kestrel_Server($nodeName, $nodeConfig['host'], $nodeConfig['port'], $clusterName));\n\t\t\t}\n\t\t}\n\n\t\treturn $clusters;\n\t}", "protected function getRemoteHost($namespace): array\n {\n $config = $this->config->get('remote-view.hosts');\n if (isset($config[$namespace]) === false) {\n throw new RemoteHostNotConfiguredException('No remote host configured for namespace # '\n .$namespace.'. Please check your remote-view.php config file.');\n }\n\n return $config[$namespace];\n }", "function user_host_list($userObj_or_id, $options = array()) {\n if(!$userObj_or_id) return [];\n $userObj = any2obj('user', $userObj_or_id);\n $host_ids = array();\n if($userObj->user_level >= USER_LEVEL_OWNER || user_has_role($userObj, USER_ROLE_OWNER)) $host_ids[] = $userObj->id; // this user is a host\n if($linked_host_ids = linked_users($userObj)) { // todo: filter by role = owner\n $host_ids = array_merge($host_ids, $linked_host_ids);\n }\n return $host_ids;\n}", "public function getHostVariables(): array\n {\n return $this->hostVariables;\n }", "public function hostnames(): HasMany\n {\n return $this->hasMany(config('tenancy.models.hostname'));\n }", "public function all()\n {\n return $this->role->get(['id','name','slug'])\n ->where('slug','!=','admin')\n ->where('slug','!=','superadmin')\n ->where('slug','!=','practice')\n ->toArray();\n }", "public function allAddresses()\n {\n return $this->addresses;\n }", "public function listAll(){\n try{\n $sql = 'select * from user u inner join role r on u.id_role = r.id_role';\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $result = $stm->fetchAll();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "public function getAll() {\n\t\treturn $this->_db->query('SELECT * FROM roles')->fetchAll();\n\t}", "public function getConfiguration(): array\n {\n $arrDefaultConfiguration = [\n 'hosts' => '',\n ];\n\n try {\n $yamlParser = new Parser();\n\n $arrConfiguration = $yamlParser->parse(file_get_contents(dirname(__FILE__).'/../Resources/config/elasticsearch.yml'));\n if (!empty($arrConfiguration)) {\n if (isset($arrConfiguration['hosts'])) {\n $arrConfiguration['hosts'] = [\n $arrConfiguration['hosts'],\n ];\n }\n\n return $arrConfiguration;\n }\n\n return $arrDefaultConfiguration;\n } catch (\\Exception $e) {\n return $arrDefaultConfiguration;\n }\n }", "public function index()\n {\n return Host::orderBy('name')->get();\n }", "public function getHostSettings(): array\n {\n return [\n [\n \"url\" => \"http://rollun-openapi/openapi/HelloUser/v1\",\n \"description\" => \"No description provided\",\n ],\n [\n \"url\" => \"http://localhost:8080/openapi/HelloUser/v1\",\n \"description\" => \"No description provided\",\n ]\n ];\n }", "public function relevantCentres()\n {\n // default to empty collection\n $centres = collect();\n switch ($this->role) {\n case \"foodmatters_user\":\n // Just get all centres\n $centres = Centre::all();\n break;\n case \"centre_user\":\n // If we have one, get our centre's neighbors\n if (!is_null($this->centre)) {\n $centres = $this->centre->neighbors;\n }\n break;\n }\n return $centres;\n }", "function get_auth_urls_by_role($role_id) {\n\t\t$this->ci->load->model('authmodel');\n\t\treturn $this->ci->authmodel->get_auth_urls_by_role($role_id);\n\t}", "public function getAddresses()\n {\n return array_keys($this->mailboxes);\n }", "public function roles(): Collection;", "public function getDbnHosts()\n {\n return $this->dbnHosts;\n }", "public function hosts(): HostsRequestBuilder {\n return new HostsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public static function getAllRemoteServiceDescriptions()\n\t{\n\t\t$ret = array();\n\t\t$siteUrls = self::getRemoteServiceSites();\n\t\tif (count($siteUrls) > 0) {\n\t\t\tforeach ($siteUrls as $siteUrl) {\n\t\t\t\t$serviceUrl = $siteUrl . '/r/modules/services/index.php?class=serviceTools&action=getAvailableServices';\n\t\t\t\t$host = parse_url($siteUrl, PHP_URL_HOST);\n\t\t\t\tif (!($serialized = @file_get_contents($serviceUrl))) {\n\t\t\t\t\ttrigger_error('could not read from ' . $serviceUrl, E_USER_WARNING);\n\t\t\t\t}\n\t\t\t\tif (($siteServices = unserialize($serialized)) && is_array($siteServices)) {\n\t\t\t\t\t$ret[$host] = array('foomo' => array(), 'site' => array());\n\t\t\t\t\tforeach (array('foomo', 'site') as $domain) {\n\t\t\t\t\t\tforeach ($siteServices[$domain] as $serviceUri) {\n\t\t\t\t\t\t\t$serviceUrl = $siteUrl . $serviceUri;\n\t\t\t\t\t\t\tif (($serviceDescription = self::getServiceDescription($serviceUrl))) {\n\t\t\t\t\t\t\t\t$ret[$host][$domain][] = $serviceDescription;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function index()\n {\n $sites = Sites::with('hosting')->get();\n return $sites;\n }", "function get_users_by_role( $role ) {\n\t\t$wp_user_search = new WP_User_Query( array( 'role' => $role, 'fields' => 'all' ) );\n\t\treturn $wp_user_search->get_results();\n\t}", "public function getLinkedHostsByServiceDescription($serviceDescription, $getHostName = false)\n {\n $hosts = array();\n\n $select = 'SELECT h.host_id ';\n if ($getHostName) {\n $select .= ', h.host_name ';\n }\n\n $from = 'FROM host_service_relation hsr, host h, service s ';\n\n $where = 'WHERE hsr.host_host_id = h.host_id '\n . 'AND hsr.service_service_id = s.service_id '\n . 'AND s.service_description = \"' . $this->db->escape($serviceDescription) . '\" ';\n\n $query = $select . $from . $where;\n\n $result = $this->db->query($query);\n\n while ($row = $result->fetchRow()) {\n if ($getHostName) {\n $hosts[] = $row['host_name'];\n } else {\n $hosts[] = $row['host_id'];\n }\n }\n $hosts = array_unique($hosts);\n\n return $hosts;\n }", "public function index(Role $role)\n {\n return $this->showAll($role->permissions);\n }", "public function getBindableAddresses(): array {\n return array_unique(array_merge(...array_values(array_map(function ($vhost) {\n return $vhost->getBindableAddresses();\n }, $this->vhosts))));\n }", "function hsk_get_all_roles(){\n global $wp_roles;\n return $roles = $wp_roles->get_names();\n}", "public function getHosts($params = array()){\n $params_string = '';\n if(count($params) > 0){\n $params_string = '?';\n foreach($params AS $key=>$value){\n $params_string .= urlencode($key).\"=\".urlencode($value).\"&\";\n }\n $params_string = rtrim($params_string, '&');\n $params_string = trim($params_string);\n \n }\n\n return $this->GET($this->url_path . \"/fibs/fib0/hosts/\" . $params_string)->asJSON($this->debug);\n }", "public function getAllRoles() {\n\t\t\t$sql = \"SELECT * FROM roles\";\n\t\t\t$result_set = $this->connection->query($sql); \n\n\t\t\tif($this->connection->errno) {\n\t\t\t\techo \"Error: \".$this->connection->error;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn $result_set;\n\t\t}", "private function getAllIndicesForHost($indicesArr, $host){\n $result = array();\n foreach($indicesArr as $key=>$value){\n $result[$value->es_host][] = $value->es_index;\n }\n // echo \"<pre>\";print_r($result);die;\n return $result[$host];\n }", "public function fetchAllEshops()\n {\n return $this->askServer('eshops');\n }", "private static function roles()\n {\n return collect(app(Roles::class)->all());\n }", "public function getAll() {\n\t\t$servers = $this->db->get('servers')->result_array();\n\t\treturn array_map(array($this, \"addAvailability\"), $servers);\n\t}", "public static function configured(): array\n {\n $engines = array_keys(static::$_engines);\n\n return array_map(function ($key) {\n return (string)$key;\n }, $engines);\n }", "public function getSites() {\n return array_unique(array_map(function ($key) {\n return $this->getDrushAliasSite($key);\n }, array_keys($this->getDrushAliases())));\n }", "public function getMembersByRole(string $role): array\n {\n $members = [];\n foreach ($this->getMemberships() as $membership) {\n if ($membership->getRole() === $role\n // make sure we don't return NULL from memberships marked for deletion\n && $membership->getUser()) {\n $members[] = $membership->getUser();\n }\n }\n\n return $members;\n }", "public function GetHostGroups()\n {\n $hostgroups = array();\n\n if ($this->IsValidAuthToken())\n {\n $request = new ZabbixWrapper();\n $request->Create(\"hostgroup.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixHostGroupGetRequest();\n $request->params->output = array(\"groupid\", \"name\");\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response))\n {\n foreach ($response[\"result\"] as $item)\n {\n $hostgroups[] = HostGroup::WithNameAndID($item[\"name\"], $item[\"groupid\"]);\n }\n }\n }\n\n return $hostgroups;\n }", "public function getApmAgentRemoteConfig() : array\n {\n return $this->getEventIntake()->getApmAgentRemoteConfig();\n }", "protected function getAddresses() {\n\t\tif (!$this->_addresses) {\n\t\t\t$memberAddressesMapper = $this->getServiceLocator()->get('\\Account\\Mapper\\MemberAddressesMapper'); /* @var $memberAddressesMapper \\Account\\Mapper\\MemberAddressesMapper */\n\t\t\t$this->_addresses = $memberAddressesMapper->fetchManyForMemberId($this->id);\n\t\t}\n\t\treturn $this->_addresses;\n\t}", "function getHosts(){\r\n $sql = (\"SELECT * FROM `hosts` ORDER BY datacenter DESC\");\r\n $results = mysql_query($sql) or die (mysql_error());\r\n $num = mysql_numrows($results);\r\n $i = 0;\r\n if ($num != 0){\r\n while ($i < $num){\r\n $hosts[] = array(\"id\" => mysql_result($results,$i,\"id\"),\r\n \"ip\" => mysql_result($results,$i,\"ip\"),\r\n \"datacenter\" => mysql_result($results,$i,\"datacenter\"),\r\n \"hostname\" => mysql_result($results,$i,\"hostname\"),\r\n \"memory\" => mysql_result($results,$i,\"memory\"),\r\n \"user\" => mysql_result($results,$i,\"user\"),\r\n \"password\" => mysql_result($results,$i,\"password\"),\r\n \"active\" => mysql_result($results,$i,\"active\")\r\n );\r\n $i++;\r\n }\r\n }\r\n\r\n return($hosts);\r\n}", "public function getAddresses() : array\n {\n return $this->addresses;\n }", "public static function getAll()\n\t{\n\t\tif (Cache::has('SmtpServers', 'all')) {\n\t\t\treturn Cache::get('SmtpServers', 'all');\n\t\t}\n\t\t$all = (new Db\\Query())->from('s_#__mail_smtp')->indexBy('id')->all(Db::getInstance('admin'));\n\t\tCache::save('SmtpServers', 'all', $all, Cache::LONG);\n\n\t\treturn $all;\n\t}", "public function getServers()\n {\n return $this->remote->select()->from('server')->fetchAll();\n }", "public function getHostTrackers()\n {\n if (array_key_exists(\"hostTrackers\", $this->_propDict)) {\n return $this->_propDict[\"hostTrackers\"];\n } else {\n return null;\n }\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM role';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getServers(): array\n {\n return $this->servers;\n }", "public function testQueryHostGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function get_domains() {\n\t\tif ( !empty( $this->_config['domain'] ) ) {\n\t\t\treturn (array) $this->_config['domain'];\n\t\t}\n\n\t\treturn array();\n\t}", "public function getAddresses() {\n\t\treturn $this->addresses;\n\t}", "public function listConfigNodes()\n {\n return Request::Request(\"/cluster/config/nodes\");\n }" ]
[ "0.61616516", "0.6026476", "0.59804785", "0.59650046", "0.5898533", "0.5858013", "0.58556503", "0.5813566", "0.5796908", "0.5794209", "0.5780122", "0.5723459", "0.5708841", "0.5656751", "0.56539977", "0.55368835", "0.54071933", "0.5320258", "0.52993244", "0.5239249", "0.5211185", "0.51537687", "0.5136721", "0.5123884", "0.51029664", "0.50816965", "0.5009865", "0.5001914", "0.49578348", "0.49271372", "0.49213678", "0.4887481", "0.48722664", "0.48532832", "0.48465192", "0.48369268", "0.48217067", "0.4800056", "0.47928405", "0.47576714", "0.47472277", "0.4747002", "0.4713646", "0.4710964", "0.47017342", "0.47017252", "0.46994257", "0.4670755", "0.46594477", "0.4639215", "0.46346465", "0.4627158", "0.4590898", "0.45786127", "0.45716637", "0.45712158", "0.45621306", "0.45604134", "0.45588276", "0.4556552", "0.4553417", "0.45427185", "0.45419258", "0.4538006", "0.4528892", "0.45287934", "0.45213506", "0.449927", "0.44938982", "0.44898626", "0.44865108", "0.4484431", "0.4477785", "0.4477427", "0.44758853", "0.44746917", "0.44724965", "0.4468005", "0.44641134", "0.44577247", "0.44557184", "0.44344902", "0.4423502", "0.4418961", "0.4416436", "0.4414316", "0.4408742", "0.44051874", "0.43954438", "0.4386069", "0.43847683", "0.43815193", "0.43801963", "0.43754977", "0.4368116", "0.43585527", "0.43509433", "0.43463153", "0.4343975", "0.43429768" ]
0.806224
0
Load all valid PhabricatorFulltextStorageEngine subclasses
Загрузить все допустимые подклассы PhabricatorFulltextStorageEngine
public static function loadAllFulltextStorageEngines() { return id(new PhutilClassMapQuery()) ->setAncestorClass('PhabricatorFulltextStorageEngine') ->setUniqueMethod('getEngineIdentifier') ->execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function loadAll()\n {\n global $taxonomies_infos;\n\n // Classes\n $subclasses = self::getSubclasses();\n foreach ($subclasses as $class) {\n $instance = new $class;\n $taxonomies_infos = array_merge(\n $taxonomies_infos,\n $instance->getTaxonomiesInfo()\n );\n\n self::load($class);\n }\n }", "protected function initStorageObjects() {\n\t\t$this->content = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->images = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->categories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->properties = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->reviews = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->type = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\n\t\t$this->assistance = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\n\t\t$this->vehicles = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\n\t\t$this->resources = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->image = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->images = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->contactImage = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->contentImage = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->dates = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->targetGroups = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->categories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->documents = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->choices = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->splashPages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects(): void\n {\n $this->pages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->approvals = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->authors = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\n }", "protected function initStorageObjects()\n {\n $this->comments = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->tags = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t* Do not modify this method!\n\t\t* It will be rewritten on each save in the kickstarter\n\t\t* You may modify the constructor of this class instead\n\t\t*/\n\t\t$this->preview = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t$this->assets = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t$this->subCategories = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "public function testLoad()\r\n\t{\r\n\t\t$engines = array(\r\n\t\t\t'MyISAM',\r\n\t\t\t'MEMORY',\r\n\t\t\t'InnoDB',\r\n\t\t\t'BerkeleyDB',\r\n\t\t\t'BLACKHOLE',\r\n\t\t\t'EXAMPLE',\r\n\t\t\t'ARCHIVE',\r\n\t\t\t'CSV',\r\n\t\t\t'ndbcluster',\r\n\t\t\t'FEDERATED',\r\n\t\t\t'MRG_MYISAM',\r\n\t\t\t'ISAM'\r\n\t\t);\r\n\r\n\t\tforeach($engines as $engine)\r\n\t\t{\r\n\t\t\t$se = StorageEngine::model()->findAllByAttributes(array(\r\n\t\t\t\t'Engine' => $engine\t\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\tif(count($se) == 0)\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t$se = $se[0];\r\n\t\t\t\r\n\t\t\t$this->assertType('StorageEngine', $se);\r\n\t\t\t$this->assertType('string', $se->Comment);\r\n\t\t\t$this->assertType('string', $se->Support);\r\n\t\t}\r\n\t}", "private function load_types()\n {\n unset($this->types);\n if (! $this->storage instanceof midcom_helper_datamanager_storage)\n {\n $this->storage = new midcom_helper_datamanager_storage_null($this->schema);\n }\n\n $this->types = new midcom_helper_datamanager_typeproxy($this->schema, $this->storage);\n }", "protected function initStorageObjects()\n {\n $this->lieu = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->oeuvres = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->lieu = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->oeuvres = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->answers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->ipLocks = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->cities = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->languages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->categories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n //$this->county = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects(): void\n {\n $this->results = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->ort = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->zeitraum = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initializeStorageObjects() {}", "protected function initStorageObjects()\n {\n\n $this->fachListe = new ObjectStorage();\n $this->seite = new ObjectStorage();\n\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->infoWindowImages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->categories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->map = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->report = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->questions = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->allowedTechnicians = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->favoriteUser = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->favoriteAd = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->elements = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "abstract protected function loadEntities();", "protected function initStorageObjects()\n {\n $this->subPages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->txHgontemplateContactperson = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->file = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->image = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "function loadCore()\n\t{\n\t\tforeach($this->core as $s)\n\t\t{\n\t\t\trequire_once(e_PLUGIN.\"tagwords/section/e_tagwords_{$s}.php\");\n\t\t\t$name = \"e_tagwords_{$s}\";\n\t\t\tif(class_exists($name))\n\t\t\t{\n\t\t\t\tif(!is_object($name))\n\t\t\t\t{\n\t\t\t\t\t$this->$name = new $name;\n\t\t\t\t}\n\t\t\t\t$this->tagwords[] = $s;\n\t\t\t}\n\t\t}\n\t}", "protected function initStorageObjects()\n {\n $this->files = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage(); \n }", "protected function initStorageObjects() {\n\t\t$this->category = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects() {\n\t\t$this->category = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n /**\n * Do not modify this method!\n * It will be rewritten on each save in the extension builder\n * You may modify the constructor of this class instead\n */\n $this->relatedProducts = new ObjectStorage();\n\n $this->images = new ObjectStorage();\n\n $this->attributeFiles = new ObjectStorage();\n\n $this->links = new ObjectStorage();\n\n $this->subProducts = new ObjectStorage();\n\n $this->falLinks = new ObjectStorage();\n\n $this->categories = new ObjectStorage();\n\n $this->attributeValues = new ObjectStorage();\n\n $this->assets = new ObjectStorage();\n\n $this->accessories = new ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->locations = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->lendDates = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->reservations = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n }", "protected function initStorageObjects()\n {\n $this->skills = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n \n }", "protected function initStorageObjects()\n {\n \n }", "protected function initStorageObjects()\n {\n \n }", "protected function initStorageObjects()\n {\n $this->states = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groups = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public static function getStorageEngine();", "protected function initStorageObjects() {\n $this->posts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function load_classes()\r\n\t{\r\n\t\t$classes = array (\r\n\t\t\t'T5_Endpoint_Interface',\r\n\t\t\t'T5_Post_Meta_Interface',\r\n\t\t\t'T5_Language_Interface',\r\n\t\t\t'T5_Public_Preview_Language',\r\n\t\t\t'T5_Endpoint',\r\n\t\t\t'T5_Publish_Box_View',\r\n\t\t\t'T5_Render_Endpoint',\r\n\t\t\t'T5_Post_Meta',\r\n\t\t);\r\n\r\n\t\tforeach ( $classes as $class )\r\n\t\t{\r\n\t\t\tif ( ! class_exists( $class ) and ! interface_exists( $class ) )\r\n\t\t\t\trequire \"$this->dir/php/$class.php\";\r\n\t\t}\r\n\t}", "protected function initStorageObjects()\n {\n $this->atributos = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function setNodeEntityTypes(): void {\n $node_types = $this->entityTypeManager->getStorage('node_type')->loadMultiple();\n foreach ($node_types as $node_type) {\n $class_name = str_replace('_', '', ucwords($node_type->id(), '_'));\n $namespaced_class = 'App\\\\Entity\\\\' . $class_name;\n if (class_exists($namespaced_class)) {\n self::$nodeEntityTypes[$node_type->id()] = $namespaced_class;\n continue;\n }\n self::$nodeEntityTypes[$node_type->id()] = Node::class;\n }\n }", "public function getStorageEngine(): StorageEngineInterface {\n\t\t$class = Configure::read('DataTables.StorageEngine.class');\n\t\treturn new $class();\n\t}", "protected function initStorageObjects() {\r\n\t\t// empty\r\n\t}", "function ufhealth_gravityforms_secure_storage_gf_loader() {\n\n\tif ( ! method_exists( 'GFForms', 'include_addon_framework' ) ) {\n\t\treturn;\n\t}\n\n\tGFForms::include_addon_framework();\n\n\trequire_once UFHEALTH_GRAVITY_FORMS_SECURE_STORAGE_INCLUDES . 'classes/class-gf-secure-storage-addon.php';\n\n\tGFAddOn::register( '\\UFHealth\\Gravity_Forms_Secure_Storage\\GF_Secure_Storage_Addon' );\n\n}", "protected function initStorageObjects()\n {\n $this->questions = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n $this->dealers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "private function initFieldsTypes() {\n // Get all files in Field directory\n $fieldsFiles = scandir(HUMANOID_ACF_EXTENDED_PATH . '/includes/Core/Fields/');\n\n // Init default type\n new Field();\n\n foreach($fieldsFiles as $file) {\n // Don't want those files\n if (in_array($file, array('.', '..', 'Field.php'))) {\n continue;\n }\n\n // Get a list of supported fields (the ones for which we have a class and for which we\n // can call a Filter function to do things on)\n $fileName = explode('.', $file);\n $fileName = $fileName[0];\n $this->supportedTypes[] = strtolower($fileName);\n\n // Initialize classes dynamically\n $class = \"\\\\AcfExtended\\\\Core\\\\Fields\\\\\" . $fileName;\n $fieldClass = new $class();\n\n // When we load values, some fields lire repeaters needs a special treatment\n if ($fieldClass->isSpecialField()) {\n $this->specialFields[] = strtolower($fileName);\n }\n }\n }", "private function LoadObjects()\r\n\t{\r\n\t\t$this->MetaTags \t= new MetaTag($this->File);\r\n\t\t$this->Content \t\t= new Content($this->File);\r\n\t\t$this->Menu\t\t\t= new Menu();\r\n\t\t$this->News \t\t= new News();\r\n\t\t$this->Panel \t\t= new Panel();\r\n\t\t$this->Footer \t\t= new Footer();\r\n\t\t$this->Email \t\t= new Email();\r\n\t}", "protected function initStorageObjects()\n {\n $this->gallery = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function loadAll()\n\t{\n\t\t$loader = new GenericLoader();\n\t\treturn $loader->loadAll($this);\n\t}", "public function selectStorageEngines($data, array $params) {\n $length = strlen($data);\n\n $mysql_key = 'storage.mysql-engine.max-size';\n $mysql_limit = PhabricatorEnv::getEnvConfig($mysql_key);\n\n $engines = array();\n if ($mysql_limit && $length <= $mysql_limit) {\n $engines[] = new PhabricatorMySQLFileStorageEngine();\n }\n\n $local_key = 'storage.local-disk.path';\n $local_path = PhabricatorEnv::getEnvConfig($local_key);\n if ($local_path) {\n $engines[] = new PhabricatorLocalDiskFileStorageEngine();\n }\n\n $s3_key = 'storage.s3.bucket';\n if (PhabricatorEnv::getEnvConfig($s3_key)) {\n $engines[] = new PhabricatorS3FileStorageEngine();\n }\n\n if ($mysql_limit && empty($engines)) {\n // If we return no engines, an exception will be thrown but it will be\n // a little vague (\"No valid storage engines\"). Since this is a default\n // case, throw a more specific exception.\n throw new Exception(\n 'This file exceeds the configured MySQL storage engine filesize '.\n 'limit, but no other storage engines are configured. Increase the '.\n 'MySQL storage engine limit or configure a storage engine suitable '.\n 'for larger files.');\n }\n\n return $engines;\n }", "protected function initStorageObjects()\n {\n $this->uniformProductNamesUniformeProductnaam = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->uniformProductNamesGerelateerdProduct = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n \t$this->col = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "abstract protected function loadAllEntityNames();", "protected function _initEngines()\n {\n foreach ($this->_engines as $name=>$conf) {\n self::$_log->info(\"Initaliting server engine: $name\");\n $className = '\\Seraphp\\Server\\\\'.$conf['class'].'Engine';\n require_once $conf['class'].'Engine.class.php';\n $this->_engines[$name] = new $className($conf);\n }\n }", "protected function loadFasts(): void\n {\n $fasts = json_decode(file_get_contents(APP_DB));\n $mapped_fasts = array_map(function ($fast) {\n return new FastInstance($fast);\n }, $fasts);\n\n $this->all_fasts = $mapped_fasts;\n }", "public function contentEntityStorage();", "public function load($class);", "public static function init_content_types() {\n self::log('CMS', 'CMS::init_content_types() searching: ' . PATH_CONTENT_TYPES_ROOT);\n\n $folders = array();\n $files = scandir(PATH_CONTENT_TYPES_ROOT);\n foreach ($files as $entry) {\n if (strpos($entry, '.type.') !== false) {\n $path = PATH_CONTENT_TYPES_ROOT . $entry;\n self::log('CMS', 'CMS::init_content_types() found: ' . $path);\n $folders[] = array($path, $entry);\n }\n }\n\n $folders_addon = array();\n if (is_dir(PATH_CONTENT_TYPES_ROOT_ADDON)) {\n $files = scandir(PATH_CONTENT_TYPES_ROOT_ADDON);\n foreach ($files as $entry) {\n if (strpos($entry, '.type.') !== false) {\n $path = PATH_CONTENT_TYPES_ROOT_ADDON . $entry;\n self::log('CMS', 'CMS::init_content_types() found: ' . $path);\n $folders_addon[] = array($path, $entry);\n }\n }\n }\n\n foreach ($folders as $v) {\n include($v[0]);\n $module = explode('.', $v[1]);\n $module_name = ucwords($module[0]);\n $try = method_exists($module_name, '__registar_callback');\n if ($try) {\n /** NOTE: format changes in PHP 5.2.3 * */\n call_user_func(array($module_name, '__registar_callback'));\n }\n }\n\n if (is_dir(PATH_CONTENT_TYPES_ROOT_ADDON)) {\n foreach ($folders_addon as $v) {\n include($v[0]);\n $module = explode('.', $v[1]);\n $module_name = ucwords($module[0]);\n $try = method_exists($module_name, '__registar_callback');\n if ($try) {\n /** NOTE: format changes in PHP 5.2.3 * */\n call_user_func(array($module_name, '__registar_callback'));\n }\n }\n }\n }", "public function load()\n {\n foreach ($this->loaders as $loader){\n $loader->load();\n $loader->save();\n }\n }", "protected function initStorageObjects()\n {\n $this->images = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->optimizedMedia = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function loadEngineFiles()\n\t{\n\t\trequire_once 'engine/helper.php';\n\t\trequire_once 'engine/mailing_bodybuilder.php';\n\t}", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->orders = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "public static function init() {\n\t\tcore::loadClass(\"database\");\n\t\tcore::loadClass(\"person_model\");\n\t\tcore::loadClass(\"key_type_model\");\n\t\tcore::loadClass(\"key_status_model\");\n\n\t\t/* Child tables */\n\t\tcore::loadClass(\"key_history_model\");\n\t}", "protected function initStorageObjects(): void\n {\n $this->upvotedBy = new ObjectStorage();\n $this->downvotedBy = new ObjectStorage();\n $this->reportedBy = new ObjectStorage();\n $this->reactionRel = new ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->products = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public abstract function load();", "public abstract function load();", "abstract public function loadClass($class);", "public function __load();", "protected function loadMainLibraryFiles()\n {\n $this->classLib->load('core', 'Base', __FILE__, __LINE__);\n $this->classLib->load('core', 'DataFilter', __FILE__, __LINE__); \n $this->classLib->load('core', 'AppMessage', __FILE__, __LINE__);\n $this->classLib->load('core', 'CondorDB', __FILE__, __LINE__);\n $this->classLib->load('core', 'CondorDBObject', __FILE__, __LINE__);\n $this->classLib->load('core', 'VersionedDBObjects', __FILE__, __LINE__);\n $this->classLib->load('core', 'Module', __FILE__, __LINE__);\n $this->classLib->load('core', 'ListModule', __FILE__, __LINE__);\n $this->classLib->load('core', 'ListModuleItems', __FILE__, __LINE__);\n $this->classLib->load('core', 'Auth', __FILE__, __LINE__);\n $this->classLib->load('text', 'PolyText', __FILE__, __LINE__);\n $this->classLib->load('text', 'TextDbObject', __FILE__, __LINE__);\n $this->classLib->load('core', 'Page', __FILE__, __LINE__);\n $this->classLib->load('core', 'CondorLinkWriter', __FILE__, __LINE__);\n $this->classLib->load('users', 'User', __FILE__, __LINE__);\n $this->classLib->load('users', 'Session', __FILE__, __LINE__);\n $this->classLib->load('cache', 'Itibiti', __FILE__, __LINE__); //Cache class\n $this->classLib->load('cache', 'CondorMemcache', __FILE__, __LINE__); //Memcache wrapper class\n $this->classLib->load('core', 'ClassBuilder', __FILE__, __LINE__);\n $this->classLib->load('core', 'MobileDetect', __FILE__, __LINE__); //Simple class to detect mobile devices by user agent\n $this->classLib->load('core', 'ContentAppearanceTracking', __FILE__, __LINE__); // Content appearance tracking\n\n $this->classLib->load('mediaManager', 'AttachMediaFiles', __FILE__, __LINE__);\n $this->classLib->load('ihotelier', 'IhotelierData', __FILE__, __LINE__);\n $this->classLib->load('localUsers', 'LocalUser', __FILE__, __LINE__);\n $this->classLib->load('contentBlocks', 'ContentBlock', __FILE__, __LINE__);\n $this->classLib->load('pages', 'Pages', __FILE__, __LINE__);\n $this->classLib->load('sitePublisher', 'SitePublisher', __FILE__, __LINE__);\n $this->classLib->load('sitePublisher', 'PublishedPageRenderer', __FILE__, __LINE__);\n $this->classLib->load('contentApproval', 'ContentApproval', __FILE__, __LINE__); \n $this->interfaceLib->load('contentApproval', 'ApprovalInterface', __FILE__, __LINE__); \n $this->classLib->load('contentApproval', 'ModuleItem', __FILE__, __LINE__);\n $this->classLib->load('contentApproval', 'Model', __FILE__, __LINE__);\n \n $this->classLib->load('core', 'NewRelic', __FILE__, __LINE__);\n\n $this->functionLib->load('core', 'writeLinkTo', __FILE__, __LINE__);\n $this->functionLib->load('core', 'loadModuleFunction', __FILE__, __LINE__);\n $this->functionLib->load('core', 'currentDataSection', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getDataSectionDirectory', __FILE__, __LINE__);\n $this->functionLib->load('core', 'condorFileToHREF', __FILE__, __LINE__);\n $this->functionLib->load('core', 'condorHREFToFile', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getLocalCXML', __FILE__, __LINE__);\n $this->functionLib->load('core', 'stripSlashesDeep', __FILE__, __LINE__);\n $this->functionLib->load('core', 'replaceHashVars', __FILE__, __LINE__);\n $this->functionLib->load('core', 'createCurrentTaskMenu', __FILE__, __LINE__);\n $this->functionLib->load('ihotelier', 'ihotelierGetLanguageId', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getSnippet', __FILE__, __LINE__);\n $this->functionLib->load('core', 'closeHtmlTags', __FILE__, __LINE__);\n $this->functionLib->load('core', 'getHtmlSnippet', __FILE__, __LINE__);\n $this->functionLib->load('core', 'slashomatic', __FILE__, __LINE__);\n $this->functionLib->load('google', 'websiteOptimizer', __FILE__, __LINE__);\n $this->functionLib->load('contentApproval', 'init', __FILE__, __LINE__);\n\n $this->exceptionLib->load('core', 'NoAuthorizationException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'InvalidParameterException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'MySQLException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'DBConnectionException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'FileNotFoundException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'FubarException', __FILE__, __LINE__);\n $this->exceptionLib->load('core', 'ContentAppearanceSaveRejectedException', __FILE__, __LINE__);\n }", "public static function Store() : ContentTypeStore\n {\n return ContentTypeStore::load();\n }", "private function loadClasses() {\n // Include all of the class files.\n foreach($this->class_list as $file => $class_name_array) {\n require_once realpath($file);\n }\n\n // Call the classes_loaded hook.\n Docgen_Hooks::call('classes_loaded');\n }", "protected function initStorageObjects()\n {\n $this->books = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "private static function loadTermClasses() {\n\n\t\tif (!self::$termClassesLoaded) {\n\n\t\t\t$path = KenedoPlatform::p()->getComponentDir('com_configbox').'/classes/calc_term_types';\n\t\t\t$conditionFiles = KenedoFileHelper::getFiles($path, '.php$');\n\n\t\t\tforeach ($conditionFiles as $file) {\n\t\t\t\tinclude_once($path.'/'.$file);\n\t\t\t}\n\n\t\t\t$path = KenedoPlatform::p()->getDirCustomization().'/'.'calc_term_types';\n\t\t\tif (is_dir($path)) {\n\t\t\t\t$customConditionFiles = KenedoFileHelper::getFiles($path, '.php$');\n\t\t\t\tforeach ($customConditionFiles as $file) {\n\t\t\t\t\tinclude_once($path.'/'.$file);\n\t\t\t\t}\n\t\t\t}\n\t\t\tself::$termClassesLoaded = true;\n\t\t}\n\n\t}", "public static function attachFTSearchListener()\n {\n $all_classes = ClassInfo::allClasses();\n $data_objects = Config::inst()->get(self::class, 'data_objects');\n $exclude_classes = Config::inst()->get(self::class, 'exclude_classes');\n\n foreach ($data_objects as $classname => $fields) {\n if (isset($all_classes[strtolower($classname)]) && !in_array($classname, $exclude_classes)) {\n // detect which class we should extend with\n $ext_prefix = DataObject::has_extension($classname, Versioned::class) ? 'Versioned' : 'NonVersioned';\n\n $classname::add_extension('Axllent\\\\FTSearch\\\\Extensions\\\\' . $ext_prefix . 'FTSearchExt');\n\n $do = DataObject::singleton($classname);\n\n if ($hasOne = $do->hasOne()) {\n foreach ($hasOne as $relationship => $class) {\n if (!is_string($class)) {\n continue;\n }\n if (isset($all_classes[strtolower($class)]) && !in_array($class, $exclude_classes)) {\n self::_attachFTSearchTrigger($class);\n }\n }\n }\n\n if ($hasMany = $do->hasMany()) {\n foreach ($hasMany as $relationship => $class) {\n if (!is_string($class)) {\n continue;\n }\n if (isset($all_classes[strtolower($class)]) && !in_array($class, $exclude_classes)) {\n self::_attachFTSearchTrigger($class);\n }\n }\n }\n\n if ($manyMany = $do->manyMany()) {\n foreach ($manyMany as $relationship => $class) {\n if (!is_string($class)) {\n continue;\n }\n if (isset($all_classes[strtolower($class)]) && !in_array($class, $exclude_classes)) {\n self::_attachFTSearchTrigger($class);\n }\n }\n }\n\n if ($belongsTo = $do->belongsTo()) {\n foreach ($belongsTo as $relationship => $class) {\n if (!is_string($class)) {\n continue;\n }\n if (isset($all_classes[strtolower($class)]) && !in_array($class, $exclude_classes)) {\n self::_attachFTSearchTrigger($class);\n }\n }\n }\n }\n }\n }", "public function register_content_types() {\n\t\tforeach ( $this->content_types as $content_type_class ) {\n\t\t\t$this->register_content_type( new $content_type_class() );\n\t\t}\n\t}", "protected function initStorageObjects()\n {\n $this->image = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->image = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->image = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "abstract public function load();", "abstract public function load();", "abstract public function load();", "abstract public function load();", "abstract public function load();", "protected function initStorageObjects()\n {\n $this->detailsq = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "abstract protected function getNeededEntityClasses(): array;", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->orderUid = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "private function loading_classes($class_name) {\r\n $path_regex = 'td';\r\n\r\n // foreach regex path, the class name is verified for a start matching\r\n if ((strpos($class_name, $path_regex) !== false) and (strpos($class_name, $path_regex) === 0)) {\r\n\r\n $class_settings = td_api_base::get_by_id($class_name);\r\n\r\n if (!empty($class_settings)) {\r\n if (array_key_exists('file', $class_settings)) {\r\n $class_file_path = $class_settings['file'];\r\n\r\n if (isset($class_file_path) and !empty($class_file_path)) {\r\n // set the autoloaded key for that component\r\n td_api_base::_debug_set_class_is_autoloaded($class_name);\r\n\r\n\r\n//\t if ($class_name == 'td_page_views') {\r\n//\t\t print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 4)); //return only 4 call stack frames\r\n//\t\t die;\r\n//\t }\r\n\r\n // require_once($class_file_path); - we need to use load_template to make our single_templates work like wordpress\r\n // with load_template we prepare the globals ($post etc for the files)\r\n // we should not use the global $post or any other globals in our classes without explicit declaration\r\n load_template($class_file_path, true);\r\n }\r\n } else {\r\n td_util::error(__FILE__, \"Missing parameter: 'file'\");\r\n }\r\n }\r\n }\r\n\t}", "public function setStorageEngine()\n\t{\n\t\tif ($this->engine)\n\t\t{\n\t\t\t$this->query(\"SET storage_engine = '\".$this->engine.\"'\");\n\t\t}\n\t}", "protected function initStorageObjects()\n {\n /**\n * Do not modify this method!\n * You may modify the constructor of this class instead\n */\n $this->days = new ObjectStorage();\n }", "public function checkAndCreateEntities()\n {\n $storage = $this\n ->entityTypeManager\n ->getStorage($this->getEntityType());\n\n foreach ((array) $this->readKeys() as $value) {\n // Create an entity query for our entity type.\n $query = $storage\n ->getQuery()\n ->condition('wmsettings_key', $value['key'])\n ->condition('type', $value['bundle']);\n\n // Return the entities.\n $entities = $query->execute();\n\n if (empty($entities)) {\n $entity = $storage->create([\n 'type' => $value['bundle'],\n 'wmsettings_key' => $value['key'],\n ]);\n\n $entity->save();\n $entities[] = $entity;\n } else {\n $entities = $storage->loadMultiple($entities);\n }\n\n // Make sure translations, if available, are always published\n /** @var ContentEntityInterface $entity */\n foreach ($entities as $entity) {\n if (!$entity->hasField('content_translation_status')) {\n continue;\n }\n\n foreach ($entity->getTranslationLanguages() as $language) {\n $entity->getTranslation($language->getId())\n ->set('content_translation_status', 1)\n ->save();\n }\n }\n }\n }" ]
[ "0.57953745", "0.5685961", "0.563723", "0.5632021", "0.5617356", "0.56070435", "0.5596831", "0.55610335", "0.55588514", "0.5516573", "0.55030555", "0.55030555", "0.5472325", "0.54533637", "0.5449941", "0.5449941", "0.5446886", "0.5435241", "0.54253525", "0.5404773", "0.5403279", "0.5395123", "0.53908044", "0.5378014", "0.5375616", "0.53600854", "0.53535", "0.53483605", "0.5344742", "0.5336485", "0.5312259", "0.53061825", "0.5287962", "0.5287962", "0.5287885", "0.5273762", "0.52648485", "0.52573925", "0.52520615", "0.5244329", "0.5244329", "0.5244329", "0.5243707", "0.5227008", "0.52201945", "0.5216192", "0.52107906", "0.5187136", "0.51776797", "0.51651365", "0.515797", "0.5156512", "0.5146618", "0.5139183", "0.5102651", "0.51013285", "0.50869584", "0.5081549", "0.5074188", "0.5071638", "0.50673944", "0.5065943", "0.5064181", "0.5062829", "0.5062676", "0.50516313", "0.50370574", "0.5025735", "0.5011802", "0.50060517", "0.5002725", "0.50018364", "0.49989334", "0.49963343", "0.49857476", "0.49857476", "0.4981987", "0.49814934", "0.49728808", "0.49693856", "0.4955476", "0.495382", "0.4939287", "0.4937249", "0.4931696", "0.49203634", "0.49203634", "0.49203634", "0.49151218", "0.49151218", "0.49151218", "0.49151218", "0.49151218", "0.49057382", "0.4897382", "0.48944175", "0.48665223", "0.48637506", "0.4858437", "0.4856264" ]
0.7747293
0
GETTERS Retourne identifiant de l'invitation
GETTERS Возвращает идентификатор приглашения
public function getId_invitation() { return $this->_id_invitation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInviteeUserId();", "public function show(Invitation $invitation)\n {\n //\n }", "public function show(Invitation $invitation)\n {\n //\n }", "function invitation ($id=null) {\n\t\t$this->layout = 'snappi-guest';\n\t\t// get Group data\n\t\t$options = array(\n\t\t\t'contain'=>array('Owner.id', 'Owner.username'),\n\t\t\t'fields'=>'Group.*',\t\t// MUST ADD 'fields' for containable+permissionable\n\t\t\t'conditions'=>array('Group.id'=>$id),\n\t\t);\n\t\t$this->Group->contain(array('Owner.id', 'Owner.username'));\n\t\t$data = $this->Group->find('first', $options);\n\t\t\n\t\t// invitation from:\n\t\tif (isset($this->params['url']['uuid'])) {\n\t\t\t$badges = ClassRegistry::init('User')->getBadges($this->params['url']['uuid']);\n\t\t}\n\t\t\n\t\t$this->set('title_for_layout', \"An Invitation to Join {$data['Group']['type']} {$data['Group']['title']}\");\n\t\t$this->set(compact('id', 'owner_name', 'data', 'badges'));\t\n\t\t$this->render('invitation');\t\t\n\t}", "public function invite($id)\n{\n}", "function alphasss_invitation()\n{\n global $alphasss_invitation;\n\n return $alphasss_invitation;\n}", "function get_invitation_type($type){\t\n\t\tif($type == 'S')\n\t\t return 'Sent';\n\t\treturn 'Received'; \n\t}", "public function invites();", "public function getInvitationMode()\n {\n return $this->invitationMode;\n }", "public function getInvitable()\n {\n return $this->invitable;\n }", "function inviteFriend($mailFriend)\n{\n $errorInvitMailFriend = \"\";\n $alertOkChange = '';\n $alertErrorMail = '';\n $alertErrorPseudo = '';\n $alertErrorPsw = '';\n $alertErrorNbrPeople = '';\n $alertErrorPagination = '';\n $aPlanningToday = makeRappelPlanning();\n\n $invit = new Invitation();\n $user = new User();\n $relation = new RelationUser();\n\n $verifIsExistFriend = $user->get('email', $mailFriend);\n\n if ($verifIsExistFriend != false) {\n $verifIsRelationExist = $relation->getRelationBetweenUsers($verifIsExistFriend[0]['id_user'], $_SESSION['idUser']);\n if ($verifIsExistFriend[0]['email'] == $_SESSION['email']) {\n $errorInvitMailFriend = \"Vous ne pouvez pas vous envoyer à vous-même une invitation...\";\n spaceUser($alertOkChange, $alertErrorMail, $alertErrorPseudo, $alertErrorPsw, $alertErrorNbrPeople, $errorInvitMailFriend, $alertErrorPagination);\n } elseif ($verifIsRelationExist != false) {\n $errorInvitMailFriend = \"Vous êtes déjà ami avec cette personne...\";\n spaceUser($alertOkChange, $alertErrorMail, $alertErrorPseudo, $alertErrorPsw, $alertErrorNbrPeople, $errorInvitMailFriend, $alertErrorPagination);\n } else {\n $aInVitIsAllReadyExist = $invit->getInvitation($_SESSION['idUser'], $verifIsExistFriend[0]['id_user']);\n if ($aInVitIsAllReadyExist == false) {\n $invit->sendInvitationMail($mailFriend, $verifIsExistFriend[0]['id_user']);\n $aDataInvit = array(\n \"id_send\" => $_SESSION['idUser'],\n \"id_receive\" => $verifIsExistFriend[0]['id_user']\n );\n $invit->hydrate($aDataInvit);\n $resInvitation = $invit->add($invit);\n if ($resInvitation == false) {\n $errorInvitMailFriend = \"Le traitement de la demande n'a pas correctement aboutit...\";\n spaceUser($alertOkChange, $alertErrorMail, $alertErrorPseudo, $alertErrorPsw, $alertErrorNbrPeople, $errorInvitMailFriend, $alertErrorPagination);\n } else {\n $errorInvitMailFriend = \"L'invitation a bien été envoyée !\";\n spaceUser($alertOkChange, $alertErrorMail, $alertErrorPseudo, $alertErrorPsw, $alertErrorNbrPeople, $errorInvitMailFriend, $alertErrorPagination);\n }\n } else {\n $invit->sendInvitationMail($mailFriend, $verifIsExistFriend[0]['id_user']);\n $errorInvitMailFriend = \"Une demande a déjà été réalisé. Nous avons renvoyé une nouvelle demande\";\n spaceUser($alertOkChange, $alertErrorMail, $alertErrorPseudo, $alertErrorPsw, $alertErrorNbrPeople, $errorInvitMailFriend, $alertErrorPagination);\n }\n }\n } else {\n $invit->sendInvitationCreateAcompteMail($mailFriend);\n $errorInvitMailFriend = \"Cet e-mail, ou cet utilisateur n'existe pas dans nos données... nous lui avons envoyé une invitation à vous rejoindre sur Kajoo !\";\n spaceUser($alertOkChange, $alertErrorMail, $alertErrorPseudo, $alertErrorPsw, $alertErrorNbrPeople, $errorInvitMailFriend, $alertErrorPagination);\n }\n}", "public function edit(Invitation $invitation)\n {\n //\n }", "public function edit(Invitation $invitation)\n {\n //\n }", "public function invitedAction ()\n {\n $this->_helper->viewRenderer->setNoRender();\n\n $validator = new Zend_Validate_EmailAddress();\n $receiver = trim($this->_request->q);\n\n if (!$validator->isValid($receiver)) {\n echo '2';\n return;\n }\n\n $modelUri = $this->_privateConfig->modeluri;\n $accountMail = $this->_owApp->user->getEmail();\n $resource = $this->_owApp->selectedResource;\n\n if (InvitationDB::wasInvited($modelUri, $accountMail, $receiver, $resource)) {\n echo '1';\n return;\n }\n\n echo '0';\n }", "function getInvitation($idinvitation) {\n\n\t\t\t$method = INVITATIONS . \"/$idinvitation\";\n\n\t\t\t$verbmethod = \"GET\";\n\n\t\t\t$params = array();\n\n\t\t\t$params = array_filter($params, function($item) { return !is_null($item); });\n\n\t\t\t$response = json_decode($this->zyncroApi->callApi( $method, $params, $verbmethod), true);\n\n\t\t\treturn $response;\n\t\t}", "function getAuthenticatedParticipant();", "function getAuthenticatedParticipant();", "public function ShowSendInvitation()\n {\n $invitationController = new InvitationController($this->Core);\n echo $invitationController->ShowSend(Request::GetPost(\"Users\"));\n }", "protected function _initInvitation()\n\t{\n\t\t$this->_title($this->__('Customers'))->_title($this->__('Invitations'));\n\t\t/** @var Df_Invitation_Model_Invitation $invitation */\n\t\t$invitation = Df_Invitation_Model_Invitation::ld($this->getRequest()->getParam('id'));\n\t\tif (!$invitation->getId()) {\n\t\t\tMage::throwException(df_h()->invitation()->__('Invitation not found.'));\n\t\t}\n\t\tMage::register('current_invitation', $invitation);\n\t\treturn $invitation;\n\t}", "public function actionInvite()\r\n {\r\n $this->showSubmenu = false;\r\n $message = '';\r\n $model = new Invitations();\r\n if (isset($_POST['Invitations'])) {\r\n $model->setAttributes($_POST['Invitations']);\r\n if ($model->validate()) {\r\n //posli mail\r\n $hash_gen = new CPSHash();\r\n $model->hash = $hash_gen->hash();\r\n MailSender::sendInvitation($model->email, $model->hash);\r\n $model->save();\r\n $message = 'Pozvánka odoslaná';\r\n }\r\n }\r\n $this->render('invite', array('model' => $model, 'message' => $message));\r\n }", "public function getParticipant();", "public function viewInvitation($eventId = null) {\n $event = null;\n if($eventId != null) {\n $event = \\App\\Event::find($eventId);\n } else {\n $user = \\App\\Event::find(Auth::event()->id);\n }\n \n if ($event != null) {\n return view('invitation/view', [\n 'event' => $event\n ]);\n } else {\n return redirect('error')->with('error', 'Event does not exist.');\n }\n }", "public function getRecipient();", "public function invitations()\n {\n return $this->hasMany(Invitation::class);\n }", "public function invitations()\n {\n return $this->hasMany(Invitation::class);\n }", "public function invitations()\n {\n return $this->hasMany(Invitation::class);\n }", "public function invitationAction()\n {\n $this->disableLayout();\n\n $communityId = $this->getParam('communityId');\n $directAdd = $this->_getParam('directadd');\n if (isset($directAdd) && $directAdd == 'true') {\n $directAdd = 1;\n } else {\n $directAdd = 0;\n }\n\n if (!isset($communityId)) {\n throw new Zend_Exception('Must pass a communityId parameter');\n }\n $communityDao = $this->Community->load($communityId);\n if (!$communityDao) {\n throw new Zend_Exception('Invalid communityId', 404);\n }\n if (!$this->Community->policyCheck($communityDao, $this->userSession->Dao, MIDAS_POLICY_WRITE)\n ) {\n throw new Zend_Exception('Write permission required on the community', 403);\n }\n\n $this->view->directAdd = $directAdd;\n }", "public function actionInvite()\n\t{\n\t\t/*\n\t\t$inviteeID = Yii::app()->getRequest()->getParam('contactID');\t\n\t\t//$notification = UserNotifications::model()->find(array('condition'=>'userID=:inviteeID', 'params'=>array(':inviteeID'=>$inviteeID)));\n\n\t\t$currentUser = Users::model()->getUserStoriesByName(Yii::app()->user->name);\n\t\t*/\n\n\t\tif(isset($_GET['host']) && isset($_GET['guest'])) {\n\n\t\t\t$guestID = htmlspecialchars($_GET['guest']);\n\t\t\t$hostID = htmlspecialchars($_GET['host']);\n\n\t\t\t$hostName = Users::model()->getUserNameByID($hostID);\n\t\t\n\t\t\t//TODO: move to model\n\t\t\t$notification = new UserNotifications;\n\t\t\t$notification->userID = $guestID;\n\t\t\t$notification->notText = strToUpper($hostName) . ' ruft Sie an';\n\t\t\t$notification->notLink = Yii::app()->createUrl('call/accepted', array('host'=> $hostID, 'guest' => $guestID, 'isInvited'=>'1'));\n\t\t\t$notification->inviterID = $hostID;\n\t\t\t$notification->save();\n\t\t\t/*\t\t\t\t\n\t\t\t$invitee = Users::model()->getUserStoriesAndMusicAndImagesByID($inviteeID);\n\t\t\t\t\t\n\t\t\t$this->render('//site/calling', array('invitee'=>$invitee, 'notification' => $notification));\t\t\t\n\t\t\t*/\n\n\t\t\t$conversationPartners = Users::model()->getUserStoriesAndMusicAndImagesByID($guestID, $hostID);\n\t\t\t\n\t\t\tif(!empty($conversationPartners)) {\n\t\t\t\t$this->render('calling', array('conversationPartners' => $conversationPartners, 'notification' => $notification));\n\t\t\t} else {\n\t\t\t\techo \"No results from DB\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"GET NOT SET\";\n\t\t\t$this->render('room');//, array('conversationPartners' => $conversationPartners));\n\t\t}\t\t\n\n\t}", "public function foodbakery_send_invitation_callback() {\n\t global $foodbakery_plugin_options;\n\t $email = foodbakery_get_input('foodbakery_email_address', NULL, 'STRING');\n\t $user_type = foodbakery_get_input('foodbakery_user_type', NULL, 'STRING');\n\t $user_type = isset($user_type) && $user_type != '' ? $user_type : 'team-member';\n\n\t if ($email == NULL) {\n\t\t$response_array = array(\n\t\t 'type' => 'error',\n\t\t 'msg' => esc_html__('Please provide email address', 'foodbakery'),\n\t\t);\n\t\techo json_encode($response_array);\n\t\twp_die();\n\t }\n\t if (email_exists($email)) {\n\t\t$response_array = array(\n\t\t 'type' => 'error',\n\t\t 'msg' => esc_html__('Email address already exists', 'foodbakery'),\n\t\t);\n\t\techo json_encode($response_array);\n\t\twp_die();\n\t }\n\t $randkey = substr(str_shuffle(str_repeat(\"0123456789abcdefghijklmnopqrstuvwxyz\", 25)), 0, 25);\n\t $user_details = array(\n\t\t'email' => $email,\n\t\t'permissions' => foodbakery_get_input('permissions', '', 'ARRAY'),\n\t\t'user_type' => $user_type,\n\t\t'invited_by' => get_current_user_id(),\n\t );\n\t update_option($randkey, $user_details);\n\t $login_page = ( isset($foodbakery_plugin_options['foodbakery_login_page']) && $foodbakery_plugin_options['foodbakery_login_page'] != '' ) ? get_permalink($foodbakery_plugin_options['foodbakery_login_page']) : site_url();\n\t $email_array = array(\n\t\t'to' => $email,\n\t\t'login_url' => '<a href=\"' . $login_page . '?key=' . $randkey . '\">' . esc_html__('Invitation Link', 'foodbakery') . '</a>',\n\t );\n\n\t do_action('foodbakery_invitation_sent_email', $email_array);\n\n\t $response_array = array(\n\t\t'type' => 'success',\n\t\t'msg' => esc_html__('Invitation successfully sent!', 'foodbakery'),\n\t );\n\t echo json_encode($response_array);\n\t wp_die();\n\t}", "public function getInvId()\n {\n return $this->inv_id;\n }", "public function index()\n {\n $teacher =TeacherProfile::where('user_id', Auth::user()->id)->first();\n $school = SchoolProfile::where('user_id', Auth::user()->id)->first();\n $invitations = Invitation::where('to', Auth::user()->email)->latest()->get();\n $replies = Invitation::where('from', Auth::user()->email)->latest()->get();\n return view('frontend.pages.invitation.index', compact('school','teacher','invitations','replies'));\n }", "function invitation_modal() {\n if (get_setting(\"disable_user_invitation_option_by_patients\") && $this->login_user->user_type == \"patient\") {\n redirect(\"forbidden\");\n }\n\n if (!$this->can_edit_patients()) {\n redirect(\"forbidden\");\n }\n\n validate_submitted_data(array(\n \"patient_id\" => \"required|numeric\"\n ));\n\n $patient_id = $this->input->post('patient_id');\n $this->can_access_this_patient($patient_id);\n\n $this->access_only_allowed_members_or_patient_contact($patient_id);\n\n $view_data[\"patient_info\"] = $this->Patients_model->get_one($patient_id);\n $this->load->view('patients/contacts/invitation_modal', $view_data);\n }", "public function invited()\n {\n return $this->belongsToMany(User::class, 'reminder_guests')\n ->wherePivot('status', ReminderStatus::PENDING)\n ->withPivot('user_id', 'reminder_id', 'status')\n ->withTimestamps();\n }", "function requestedBy(){\r\n return $this->user_one;\r\n }", "public function getInvite()\n {\n $value = $this->get(self::INVITE);\n return $value === null ? (integer)$value : $value;\n }", "function send_invitation() {\n if (get_setting(\"disable_user_invitation_option_by_patients\") && $this->login_user->user_type == \"patient\") {\n redirect(\"forbidden\");\n }\n\n if (!$this->can_edit_patients()) {\n redirect(\"forbidden\");\n }\n\n $patient_id = $this->input->post('patient_id');\n $this->can_access_this_patient($patient_id);\n\n $email = trim($this->input->post('email'));\n\n validate_submitted_data(array(\n \"patient_id\" => \"required|numeric\",\n \"email\" => \"required|valid_email|trim\"\n ));\n\n $this->access_only_allowed_members_or_patient_contact($patient_id);\n\n $email_template = $this->Email_templates_model->get_final_template(\"patient_contact_invitation\");\n\n $parser_data[\"INVITATION_SENT_BY\"] = $this->login_user->first_name . \" \" . $this->login_user->last_name;\n $parser_data[\"SIGNATURE\"] = $email_template->signature;\n $parser_data[\"SITE_URL\"] = get_uri();\n $parser_data[\"LOGO_URL\"] = get_logo_url();\n\n $verification_data = array(\n \"type\" => \"invitation\",\n \"code\" => make_random_string(),\n \"params\" => serialize(array(\n \"email\" => $email,\n \"type\" => \"patient\",\n \"patient_id\" => $patient_id,\n \"expire_time\" => time() + (24 * 60 * 60) //make the invitation url with 24hrs validity\n ))\n );\n\n $save_id = $this->Verification_model->save($verification_data);\n $verification_info = $this->Verification_model->get_one($save_id);\n\n $parser_data['INVITATION_URL'] = get_uri(\"signup/accept_invitation/\" . $verification_info->code);\n\n //send invitation email\n $message = $this->parser->parse_string($email_template->message, $parser_data, TRUE);\n if (send_app_mail($email, $email_template->subject, $message)) {\n echo json_encode(array('success' => true, 'message' => lang(\"invitation_sent\")));\n } else {\n echo json_encode(array('success' => false, 'message' => lang('error_occurred')));\n }\n }", "function participant()\n {\n $this->db->select('*, invite.id as idi');\n $this->db->from('invite');\n $this->db->join('session', 'session.id = invite.id_session');\n $requete= $this->db->get();\n return $requete->result();\n }", "function friend_user_ws_invite($args = NULL){\r\n\tif(!isset($args)){\r\n\t\t$args = $_REQUEST;\r\n\t}\r\n\t\r\n\t// return print_r($_REQUEST, true);\r\n\textract($args);\r\n\r\n\tif(!isset($inviter_user_id)){\r\n\t\t$inviter_user_id = $_SESSION['user_id'];\r\n\t}\r\n\t\r\n\tif(!isset($invitee_user_id)){\r\n\t\treturn \"0\";\r\n\t}\r\n\t\r\n//\t$invitee_user_id_expl = explode(\"_\", $invitee_user_id);\r\n\r\n\t// return \"id yg anda undang: \" . $invitee_user_id;\r\n\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Social');\t// Social: Circles, Friends, FriendInvitations, PersonalMessages, Shout\r\n\t$lilo_mongo->selectCollection('FriendInvitations');\t//\tFriendInvitation: lilo_id, inviter_user_id, invitee_user_id, circle_array, invite_time\r\n\r\n\t$invitation_data = array('inviter_user_id' => $inviter_user_id, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'invitee_user_id' => $invitee_user_id, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'circle_array' => $circle_array, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'invite_time' => time());\r\n\r\n\t$invitation_id = $lilo_mongo->insert($invitation_data);\r\n\t$lilo_mongo->update($invitation_data, array_merge($invitation_data, array('lilo_id' => (string)$invitation_id)), array(\"multiple\" => false) );\r\n\r\n\treturn \"1\";\r\n}", "function invite(){\n\n\t\t$id = $this->session->readEntry('user')->id_utilisateur;\n\n\t\t$this->loadModel('Etat');\n\t\t$this->loadModel('Chess');\n\t\t$parties = $this->Chess->innerJoin(array(\n\t\t\t'champs' => array('partie.id_partie', 'id_utilisateur_blanc', 'id_utilisateur_noir', 'dat_debut'),\n\t\t\t'tableEtrangere' => $this->Etat->table,\n\t\t\t'jointure' => 'etat_partie.cod_etat = partie.cod_etat',\n\t\t\t'conditions' => array('id_utilisateur_noir' => $id, 'lib_etat' => 'Validation')\n\t\t));\n\n\t\tforeach ($parties as $k => $v) {\n\t\t\t($v->id_utilisateur_blanc == $id) ? $id_adversaire = $v->id_utilisateur_noir : $id_adversaire = $v->id_utilisateur_blanc;\n\t\t\t$v->adversaire = $this->Users->findAdversaire($id_adversaire);\n\t\t}\n\n\t\t$this->render(__FUNCTION__, array('invitations' => $parties));\n\t}", "public function show(Invited $invited)\n {\n //\n }", "public function getInviteStatus();", "public function setId_invitation($id_invitation)\n {\n $id_invitation = (int) $id_invitation;\n $this->_id_invitation = $id_invitation;\n }", "public function eventListMyInvitationsAction(Request $request)\n {\n $repository = $this->getDoctrine()->getRepository('AppBundle:Event');\n /* @var $repository \\AppBundle\\Entity\\EventRepository */\n \n $user = $this->container->get('security.context')->getToken()->getUser();\n /* @var $user \\AppBundle\\Entity\\User */\n \n $events = $repository->findWithInvitationForUser($user); \n \n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $events, \n $request->query->getInt('page', 1),\n 2\n );\n \n return $this->render('AppBundle:Event:list_my_invitations.html.twig', array(\n 'pagination' => $pagination\n ));\n }", "public function getInteractionId();", "public function getResponsibleUserId(): int;", "public function GetIdInventario()\n\t{\n\t\treturn $this->idInv;\n\t}", "public function __construct(Invitation $i)\n {\n $this->i = $i;\n }", "public function getInviteFriend(){\n if(Auth::check()){\n return view('dashboard.invite-friend');\n }else{\n Auth::logout();\n return redirect('/');\n }\n }", "public function invitationsendAction()\r\n\t{\r\n\t\t$this -> _helper -> layout -> disableLayout();\r\n\t\t$this -> _helper -> viewRenderer -> setNoRender(TRUE);\r\n\t\t\r\n\t\t// Authentication\r\n\t\tif (!$this -> _helper -> requireUser -> isValid())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$invitationTable = Engine_Api::_() -> getDbtable('invitations', 'contactimporter');\r\n\t\t$invitationId = $this -> _getParam('id');\r\n\t\t$api = Engine_Api::_() -> getApi('core', 'Contactimporter');\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\t\tif (strpos($invitationId, \",\") === FALSE)\r\n\t\t{\r\n\t\t\t$invitation = $invitationTable->find($invitationId)->current();\r\n\t\t\tif ($invitation->type == 'email')\r\n\t\t\t{\r\n\t\t\t\t$result_message = $api -> resendInvitationEmail($viewer, $invitation -> email, $invitation -> message, '');\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$invitationIds = explode(\",\", $invitationId);\r\n\t\t\t$select = $invitationTable->select()->where(\"`invitation_id` IN (?)\", $invitationIds);\r\n\t\t\t//echo $select; exit;\r\n\t\t\t$invitations = $invitationTable->fetchAll($select);\r\n\t\t\tforeach($invitations as $invitation)\r\n\t\t\t{\r\n\t\t\t\tif ($invitation->type == 'email')\r\n\t\t\t\t{\r\n\t\t\t\t\t$result_message = $api -> resendInvitationEmail($viewer, $invitation -> email, $invitation -> message, '');\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\techo Zend_Json::encode(array(\r\n\t\t\t\t\t\"error\"=> 0,\r\n\t\t\t\t\t\"message\" => Zend_Registry::get(\"Zend_Translate\")->_(\"Resent invitation successfully!\")\r\n\t\t));\r\n\t\texit;\r\n\t}", "public function accept_invitation(Request $request)\n {\n $type = Notification::find($request->id)->type;\n\n switch($type)\n {\n Case 1:\n //Add user to project as regular user\n Project::find(Notification::find($request->id)->notifiable_id)\n ->users()\n ->attach(Notification::find($request->id)->recipient_id,[\n 'status'=>0\n ]);\n break;\n Case 2:\n Project::find(Notification::find($request->id)->notifiable_id)\n ->users()\n ->updateExistingPivot(Notification::find($request->id)->recipient_id,[\n 'status'=>1\n ]);\n break;\n }\n //Delete notification\n Notification::destroy($request->id);\n\n return view('view_notifications');\n }", "public function actionSetInvitationToAccepted() {\n\t\tif(!empty($_GET['notID'])) {\n\n\t\t\t$notID = htmlspecialchars($_GET['notID']);\n\n\t\t\t$notification = UserNotifications::model()->getNotificationByID($notID);\n\t\t\t$notification->notAnswer = 'yes';\n\t\t\t$notification->save();\n\t\t\techo $notification->notID;\n\n\t\t} else {\n\t\t\techo \"Could not mark Notification as Answered\";\n\t\t}\n\t}", "public function myInviteList()\r\n {\r\n\r\n $status = request()->input('status', 2); //Invite Member Status\r\n $user_id = Users::getUserId();\r\n $user = Users::where(\"id\", $user_id)->first();\r\n\r\n if (empty($user)) {\r\n return $this->error(\"Member Not Found\");\r\n }\r\n\r\n $list = Users::where('parent_id', $user_id);\r\n if ($status != 2) {\r\n $list = $list->where('status', $status);\r\n }\r\n $list = $list->orderBy('id', 'desc')->get()->toArray();\r\n\r\n return $this->success($list);\r\n }", "public function inviteUser($email, $tangleId, $inviterId, $message) {\n\n $randomString = $this->generateRandomString(30);\n\n $tangleRepo = $this->getDoctrine()->getRepository('MegasoftEntangleBundle:Tangle');\n $tangle = $tangleRepo->findOneById($tangleId);\n\n $newInvitationCode = new InvitationCode();\n $newInvitationCode->setCode($randomString);\n if ($this->isNewMember($email)) {\n $newInvitationCode->setUserId(null);\n } else {\n $userEmailRepo = $this->getDoctrine()->getRepository('MegasoftEntangleBundle:UserEmail');\n $user = $userEmailRepo->findOneByEmail($email)->getUser();\n $newInvitationCode->setUser($user);\n }\n\n $newInvitationCode->setTangle($tangle);\n $newInvitationCode->setInviterId($inviterId);\n $newInvitationCode->setExpired(false);\n $newInvitationCode->setCreated(new DateTime(\"NOW\"));\n $newInvitationCode->setEmail($email);\n\n $this->getDoctrine()->getManager()->persist($newInvitationCode);\n $this->getDoctrine()->getManager()->flush();\n\n $title = \"you are invited to \" . $tangle->getName();\n $body = \"<!DOCTYPE html>\n <html lang=\\\"en\\\">\n <head>\n </head>\n <body>\n Hello!<br>\n <p>\" . $message . \"</p>\n http://\".$_SERVER['HTTP_HOST'].\"/invitation/\" . $randomString . \"\n <p>Cheers,<br>Entangle Team</p>\n </body>\n </html>\";\n\n $notificationCenter = $this->get('notification_center.service');\n $notificationCenter->sendMailToEmail($email, $title, $body);\n }", "public function reply(){\n\n $school = SchoolProfile::where('user_id', Auth::user()->id)->first();\n $teacher = TeacherProfile::where('user_id', Auth::user()->id)->first();\n return view('frontend.pages.invitation.reply',compact('school','teacher'));\n }", "public function getParticipants();", "public function getinvjcredito()\r\n {\r\n return $this->invjcredito;\r\n }", "public function sendinvitationAction()\n {\n $this->disableLayout();\n $this->disableView();\n\n $communityId = $this->getParam('communityId');\n $userId = $this->getParam('userId');\n $email = $this->getParam('email');\n\n $community = $this->Community->load($communityId);\n if (!$community) {\n throw new Zend_Exception('Invalid communityId', 404);\n }\n if (!$this->Community->policyCheck($community, $this->userSession->Dao, MIDAS_POLICY_WRITE)\n ) {\n throw new Zend_Exception('Write permission required on the community', 403);\n }\n $isAdmin = $this->Community->policyCheck($community, $this->userSession->Dao, MIDAS_POLICY_ADMIN);\n\n $groupId = $this->getParam('groupId');\n if (isset($groupId)) {\n $group = $this->Group->load($groupId);\n if ($group->getCommunityId() != $community->getKey()) {\n throw new Zend_Exception('Specified group is not in the specified community');\n }\n if (!$isAdmin && $groupId == $community->getAdmingroupId()) {\n throw new Zend_Exception('Only members of the admin group may invite users to the admin group');\n }\n } else {\n $group = $community->getMemberGroup();\n }\n\n if (isset($userId)) { // invite an existing user by id\n $user = $this->User->load($userId);\n if ($user == false) {\n throw new Zend_Exception('Invalid userId');\n }\n $this->_sendUserInvitation($user, $group);\n } elseif (isset($email)) { // invite an existing or non-existing user by email\n $email = strtolower($email);\n $existingUser = $this->User->getByEmail($email);\n if ($existingUser) {\n $this->_sendUserInvitation($existingUser, $group);\n } else {\n /** @var NewUserInvitationModel $newuserModel */\n $newuserModel = MidasLoader::loadModel('NewUserInvitation');\n $newuserinvite = $newuserModel->createInvitation($email, $group, $this->userSession->Dao);\n\n $url = $this->getServerURL().$this->view->webroot;\n $subject = 'Community Invitation';\n $body = $this->userSession->Dao->getFullName().' has invited you to join the <b>'.$community->getName().'</b> community on Midas Platform.<br/><br/>'.'<a href=\"'.$url.'/user/emailregister?email='.$email.'&authKey='.$newuserinvite->getAuthKey().'\">Click here</a> to complete your user registration '.'if you wish to join.';\n\n $result = Zend_Registry::get('notifier')->callback(\n 'CALLBACK_CORE_SEND_MAIL_MESSAGE',\n array(\n 'to' => $email,\n 'subject' => $subject,\n 'html' => $body,\n 'event' => 'community_invite',\n )\n );\n\n if ($result) {\n echo JsonComponent::encode(array(true, 'Invitation sent to '.$email));\n } else {\n echo JsonComponent::encode(array(true, 'Invitation created but not sent'));\n }\n }\n } else {\n throw new Zend_Exception('Must pass userId or email parameter');\n }\n }", "public function actionPollNotificationsInviter () \n\t{\t\t\t\n\t\tif(!empty($_GET['guestID'])) {\n\t\t\t$inviteeID = $_GET['guestID'];\n\t\t\t\t\n\t\t\t$notification = UserNotifications::model()->pollForAnsweredNots($inviteeID);\n\t\t\t\t\t\n\t\t\tif(!empty($notification)) {\n\t\t\t\t$notJSON = CJSON::encode($notification);\n\t\t\t\t\t//echo \"<a id='invitationLink' href='\".$notification->notLink.\"'>\".$notification->notText.\"</a>\";\n\t\t\t\techo $notJSON;\n\t\t\t} else {\n\t\t\t\techo \"no notifications\";\n\t\t\t\t\t//var_dump($notification);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\techo \"Error reading Notifications\";\n\t\t}\t\n\t}", "public function __construct(\n public ModelsTeamInvitation $invitation,\n ) {\n }", "function showInvitations($link, $user) {\n\t$userId = mysqli_fetch_assoc(mysqli_query($link, 'SELECT `user_id` FROM `users` WHERE `user_name`=\"' . $user . '\"'));\n\t$_invite = 'SELECT * FROM `invitations` LEFT JOIN `users` ON invitations.resever_id = users.user_id WHERE `invitations`.`resever_id`=\"' . $userId['user_id'] . '\"';\n\n\t$invitations = mysqli_query($link, $_invite);\n\tif (mysqli_num_rows($invitations) > 0) {\n\t\t$result = array();\n\t\twhile ($row = mysqli_fetch_assoc($invitations)) {\n\t\t\t$sender = mysqli_query($link, 'SELECT `user_name` FROM `users` WHERE `user_id`=\"' . $row['sender_id'] . '\"');\n\t\t\t$sender = mysqli_fetch_assoc($sender);\n\t\t\t$result[] = $sender['user_name'];\n\t\t}\n\t\treturn $result;\n\t} else {\n\t\treturn false;\n\t}\n}", "function invite ($id) {\n\t\t$this->layout = 'snappi-guest';\n\t\t// get Group data\n\t\t$options = array(\n\t\t\t'contain'=>array('Owner.id', 'Owner.username'),\n\t\t\t'fields'=>'Group.*',\t\t// MUST ADD 'fields' for containable+permissionable\n\t\t\t'conditions'=>array('Group.id'=>$id),\n\t\t);\n\t\t$this->Group->contain(array('Owner.id', 'Owner.username'));\n\t\t$data = $this->Group->find('first', $options);\n\t\t$badges = ClassRegistry::init('User')->getBadges(AppController::$userid);\n\t\t$this->set(compact('data', 'badges'));\n\t}", "public static function interviewers(){\n return self::where('roleid','=',3)->get(); // 3 is the role id of Interviewer\n }", "function churchdb_invitePersonToSystem($id) {\n global $base_url;\n\n $loginstr = churchcore_createOnTimeLoginKey($id);\n $content = \"<h3>Hallo [Vorname],</h3><P>\";\n\n $content .= htmlize(getConf('invite_email_text', \"invitation.email.standard.text\", getConf('site_name')));\n $content .= '<p><a href=\"'. $base_url. \"?q=profile&loginstr=$loginstr&id=$id\".\n '\" class=\"btn btn-royal\">Auf %sitename anmelden</a>';\n $res = churchcore_sendEMailToPersonIDs($id, \"Einladung zu \". getConf('site_name'), $content, getConf('site_mail'), true);\n cdb_log(\"Person $id wurde zu \". getConf('site_name'). \" eingeladen:\". $content, 2, $id);\n //TODO: is $content in log really needed? no name; if admin clicks link, ontimelogin will be deleted, ...\n}", "public function getIdentifiant()\n {\n return $this->identifiant;\n }", "public function getIdentifiant()\n {\n return $this->identifiant;\n }", "function acceptFriend($friendIdToAccept)\n{\n $invit = new Invitation();\n $relation = new RelationUser();\n\n $aDataUser = array(\n \"id_user\" => $_SESSION['idUser'],\n \"id_friend\" => $friendIdToAccept,\n \"modif_recipe\" => 0,\n \"modif_planning\" => 0,\n \"modif_shop\" => 0\n );\n\n $relation->hydrate($aDataUser);\n $relation->add($relation); // on ajoute la relation à la bdd DES 2 COTES!!!!\n\n $delInvit = $invit->delete($friendIdToAccept, $_SESSION['idUser']); // on supprime l'invitation\n\n spaceUser(\"L'invitation a bien été Acceptée !\", \"\", \"\", \"\", \"\", \"\",\"\");\n}", "protected function __prepareInviteTo()\r\n {\r\n $recipients = $this->getRecipients();\r\n $recipients = array_unique( array_merge( $recipients['valid']['users'], $recipients['valid']['guests'] ) );\r\n return join(', ',$recipients);\r\n \r\n }", "function sendinviteAction(){\n\t\tinclude('php/functions_redir.php' );\n\t\t$to = $_REQUEST['to'];\n\t\t\n\t\t$sql = \"SELECT * FROM eric_mile_users.list_invite\n\t\t\t\tWHERE `id` = '$to'\n\t\t\t\tLIMIT 1\";\n\t\t\t\t\n\t\t$res = $this->db->exec($sql);\n\t\tif( count($res) < 1 ){\n\t\t\t$this->Redirect('admin/users/request' );\n\t\t}\n\t\t\n\t\t$this->vars['to'] = $res[0];\n\t\t$this->vars['to']['uniq'] = base_base2base($res[0]['id'], 10, 59);\n\t\t$this->vars['uid'] = base_base2base($res[0]['date'], 10, 59);\n\t\t$this->vars['email']['subject'] = 'Your invitation to MILE.fm';\n\t\t$this->vars['email']['message'] = $this->Render('email-invite' );\n\t\t\n\t\t$this->view = 'admin/write-invite';\n\t}", "public static function teamInvitationController()\n {\n return Features::getOption(Features::teams(), 'invitation.controller');\n }", "public function action()\n {\n $teamId = $this->route('teamId');\n $memberId = $this->route('memberId');\n\n $user = $this->user();\n $team = $user->teams()->findOrFail($teamId);\n $member = $team->users()->findOrFail($memberId);\n\n $member->invite();\n\n return $member;\n }", "public function lookInvitation($id_detail)\n {\n if (!Session::get('id_pengguna')) {\n return view('landing.login', compact('id_detail'));\n }\n\n $to_invite = TimEventDetail::find($id_detail);\n if ($to_invite) {\n $from_invite = TimEventDetail::with('participantRef', 'penggunaMhsRef', 'penggunaParticipantRef')->where('tim_event_id', $to_invite->tim_event_id)->where('role', 'ketua')->first();\n if ($from_invite->penggunaMhsRef) {\n $from_invite->penggunaMhsRef->nama_mhs = $from_invite->penggunaMhsRef->nim;\n try {\n $mhs = $this->api_mahasiswa->getMahasiswaByNim($from_invite->penggunaMhsRef->nim);\n $from_invite->penggunaMhsRef->nama_mhs = $mhs->mahasiswa_nama;\n } catch (\\Throwable $err) {\n }\n }\n }\n\n return view('landing.event.invitation_team', compact('id_detail', 'to_invite', 'from_invite'));\n }", "public function info()\n {\n $inv = R::findOne('mod_invite_log', 'client_id = :cid', array('cid'=>$this->_identity->id));\n $inviter = null;\n if($inv) {\n $inviter = $inv->inviter_first_name . ' '. $inv->inviter_last_name[0].'.';\n }\n \n $mod = new Box_Mod('invite');\n $config = $mod->getConfig();\n \n return array(\n 'message' => $config['message'],\n 'invitations' => $this->_getInvitationsLeft(),\n 'inviter' => $inviter,\n );\n }", "public function invites()\n {\n return $this->belongsToMany(Reminder::class, 'reminder_guests')\n ->using(ReminderGuest::class)\n ->wherePivot('status', ReminderStatus::PENDING)\n ->withPivot('user_id', 'reminder_id', 'status', 'created_at')\n ->with('owner')\n ->withTimestamps();\n }", "public function inviteAction() {\r\n\r\n //CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //IF SITEPAGEEVENT SUBJECT IS NOT THEN RETURN\r\n if (!$this->_helper->requireSubject('sitepageevent_event')->isValid())\r\n return;\r\n\r\n //PREPARE DATA\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $sitepageevent = Engine_Api::_()->core()->getSubject();\r\n $friends = $viewer->membership()->getMembers();\r\n\r\n //PREPARE FORM\r\n $this->view->form = $form = new Sitepageevent_Form_Invite();\r\n\r\n $count = 0;\r\n foreach ($friends as $friend) {\r\n if ($sitepageevent->membership()->isMember($friend, null)) {\r\n continue;\r\n }\r\n $form->users->addMultiOption($friend->getIdentity(), $friend->getTitle());\r\n $count++;\r\n }\r\n $this->view->count = $count;\r\n\r\n //IF NOT POST OR FORM NOT VALID, RETURN\r\n if (!$this->getRequest()->isPost()) {\r\n return;\r\n }\r\n\r\n //IF NOT POST OR FORM NOT VALID, RETURN\r\n if (!$form->isValid($this->getRequest()->getPost())) {\r\n return;\r\n }\r\n\r\n //PROCESS\r\n $db = $sitepageevent->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $usersIds = $form->getValue('users');\r\n foreach ($friends as $friend) {\r\n if (!in_array($friend->getIdentity(), $usersIds)) {\r\n continue;\r\n }\r\n $sitepageevent->membership()->addMember($friend)->setResourceApproved($friend);\r\n\r\n Engine_Api::_()->getDbtable('notifications', 'activity')->addNotification($friend, $viewer, $sitepageevent, 'sitepageevent_invite');\r\n }\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //SHOWING THE SUCCESS MESSAGE\r\n return $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Members invited.')),\r\n 'layout' => 'default-simple',\r\n 'parentRefresh' => 10,\r\n 'smoothboxClose' => 10\r\n ));\r\n }", "public function accept_invite() {\n\t\t$this->inviter_id = 0;\n\t\t$this->is_confirmed = 1;\n\t\t$this->date_modified = bp_core_current_time();\n\t}", "public function actionCreate($invitationCode) {\n $userAccount = $this->accounts->getInvitedUser($this->bag->code = $code = Fari_Escape::text($invitationCode));\n \n if (empty($code) OR empty($userAccount)) {\n $this->renderAction('expired');\n } else {\n $this->bag->account = $userAccount;\n $this->renderAction();\n }\n\t}", "function invite_token_values($type = 'all', $object = NULL) {\n $values = array();\n if ($type == 'invite' && is_object($object)) {\n $values['inviter'] = check_plain($object->inviter->name);\n $values['inviter-raw'] = $object->inviter->name;\n $values['invite-mail'] = $object->email;\n $values['invite-message'] = check_plain($object->data['message']);\n $values['invite-message-raw'] = $object->data['message'];\n $values['join-link'] = url('invite/accept/'. $object->code, array('absolute' => TRUE));\n }\n return $values;\n}", "public function getUrl()\n {\n return $this->getData()['instant_invite'];\n }", "public function inviteresendAction()\r\n\t{\r\n\t\t// Authentication\r\n\t\tif (!$this -> _helper -> requireUser -> isValid())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$api = Engine_Api::_() -> getApi('core', 'Contactimporter');\r\n\t\t$settings = Engine_Api::_() -> getApi('settings', 'core');\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\r\n\t\t// Get selected contacts\r\n\t\t$invite_id = intval($this -> _getParam('id'));\r\n\r\n\t\t$table = Engine_Api::_() -> getDbtable('invites', 'invite');\r\n\r\n\t\t$select = $table -> select() -> where('id = ?', $invite_id) -> where('user_id = ?', $viewer -> getIdentity());\r\n\r\n\t\t$invitation = $table -> fetchRow($select);\r\n\r\n\t\tif (empty($invitation))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$result_message = $api -> resendInvitationEmail($viewer, $invitation -> recipient, $invitation -> message, '');\r\n\t}", "function refuseFriend($friendIdToRefuse)\n{\n $invit = new Invitation();\n $delInvit = $invit->delete($friendIdToRefuse, $_SESSION['idUser']);\n\n spaceUser(\"L'invitation a bien été supprimée !\", \"\", \"\", \"\", \"\", \"\", \"\");\n}", "public function get() {\n\t\t$event = $this->app->db->queryRow('SELECT * FROM events WHERE end_time > NOW() ORDER BY start_time ASC LIMIT 1');\n\n\t\t// Fetch people who could be invited\n\t\t$people = $this->app->db->queryAllRows('SELECT p.id, p.given_name, p.family_name, p.email, p.org, AVG(pa.rating) as avgrating, a.type, a.invite_code, a.invite_date_sent, a.invite_date_reminded, a.ticket_type, a.ticket_id, IF(ticket_type IS NOT NULL, %s, IF(a.invite_code IS NOT NULL, %s, %s)) as status FROM people p INNER JOIN attendance a ON p.id=a.person_id AND a.event_id=%d LEFT JOIN participation pa ON p.id=pa.person_id GROUP BY p.id ORDER BY status, a.type=%s DESC, avgrating DESC', 'Attending', 'Invited', 'Registered', $event['id'], $event['id'], 'VIP');\n\n\t\t$this->addViewData(array(\n\t\t\t'event' => $event,\n\t\t\t'people' => $people\n\t\t));\n\t\t$this->renderView('admin/invite');\n\t}", "public function actionSetInvitationToRejected() {\n\t\tif(!empty($_GET['notID'])) {\n\t\t\t\n\t\t\t$notID = htmlspecialchars($_GET['notID']);\n\n\t\t\t$notification = UserNotifications::model()->getNotificationByID($notID);\n\t\t\t$notification->notAnswer = 'no';\n\t\t\t$notification->save();\t\n\t\t\n\t\t\t$inviterID = $notification->inviterID;\n\t\t\t$inviterName = Users::model()->getUserNameByID($inviterID);\n\n\t\t\techo $inviterName;\n\n\t\t} else {\n\t\t\techo \"Could not mark Notification as Answered\";\n\t\t}\n\t}", "static function getInvitedCodeURL($code) {\r\n\t\t$url = Art_Server::getHost() . '/invitation?code=' . $code->code;\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "public function getInvCode()\n {\n return $this->inv_code;\n }", "public function hasInvitee(){\n return $this->_has(4);\n }", "private static function generateInvitation() {\n return hash(\"sha512\", base_convert(rand(0, (int) 10e16), 10, 36));\n }", "private function check_for_user_invitation_code () {\n\t\t\n\t\t$user = M('user')\n\t\t\t->where(\"`id` = $this->userID\")\n\t\t\t->find();\n\t\t\n\t\tif (!$user['invitation_code'] || $user['invitation_code'] == '') {\n\t\t\twhile (true) {\n\t\t\t\t$inviteCode = mt_rand(10000000, 99999999);\n\t\t\t\t$res = M('user')\n\t\t\t\t\t->where(\"`invitation_code`='$inviteCode'\")\n\t\t\t\t\t->find();\n\t\t\t\t\t\n\t\t\t\tif (!$res) {\n\t\t\t\t\t$userData['invitation_code'] = $inviteCode;\n\t\t\t\t\tM('user')\n\t\t\t\t\t\t->where(\"`id` = $this->userID\")\n\t\t\t\t\t\t->save($userData);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getSender();", "public function actionListInvitesByUser()\n {\n $email = Yii::$app->request->get('email');\n return $this->renderPartial('listInvitesByUser', [\n 'email' => $email\n ]);\n }", "function meetingInfo_action($meetingId, $moderatorPw)\n {\n }", "public function teaminvitation(Request $request){\n\n if($request->has('username')) {\n $id = Account::where('username', $request->username)->first();\n } else {\n $id = Account::where('accountID', $request->accountID)->first();\n }\n $mytime = Carbon::now();\n DB::table('notifications')->insert([\n 'message' => 'team invitation',\n 'accountID' => $id->accountID,\n 'date' => $mytime->toDateTimeString(),\n 'href' => 'teamview/id=' . $request->elink,\n 'seen' => '0'\n ]);\n return redirect()->back();\n }", "protected function generateInvitation()\n\t{\n\t\t$this->activation_key = Util::generateRandomString(60);\n $result = $this->save();\n if (! $result) {\n $err = Util::errorToString($this->errors);\n }\n\t\treturn $result;\n\t}", "public function getInvitationView(Request $data){\n\n \t//\tdd($data->all());\n $checkInvitation = Event::where('id',$data->eventId)->pluck('eventInvitationPicture');\n $invitationConfigured = 0;\n\n if($checkInvitation[0] != null){\n $invitationConfigured = 1;\n }\n \n\n \t$eventData = DB::table('events')->where('id', $data->eventId)->get();\n\n \t$eventName = $eventData[0]->eventName;\n $eventAdminStatus = $eventData[0]->event_open_for_admin;\n \t// Check roles to show/not show products\n \n\n $roleAuth = User::getUserPermissions(Auth::user()->id)->pluck('UR.role_id');\n\n $userEventRoleAuth = User::getUserEventPermissions(Auth::user()->id)->where('UE.event_id', $data->eventId)->pluck('UE.user_type_id');\n\n if(count($userEventRoleAuth) <= 0){\n $userEventRoleAuth = array(0);\n }\n\n //Mostrar los usuarios segun el tipo de ususario logueado\n $permissions=\"\";\n\n /*\n * Permissions\n * 1: access to all functions in event (supera admins, full admins, admins(event owner))\n * 2: subadmin\n * 3: sellers and speakers (Create products, offers, generate badge)\n */\n\n\n if($roleAuth[0] == 1 || $roleAuth[0] == 2 || $userEventRoleAuth[0] ==1 ){\n\n $permissions = 1;\n $typeName = 'Administrador';\n }\n else if($roleAuth[0] == 3){\n //subadmin\n if($userEventRoleAuth[0] ==2){\n $permissions = 2;\n $typeName = 'Subadministrador';\n }\n //sellers, speakers\n else if($userEventRoleAuth[0] == 3){\n $permissions = 3;\n $typeName = 'Representante';\n }\n else if($userEventRoleAuth[0] == 4){\n $permissions = 3;\n $typeName = 'Conferencista';\n }\n }\n\n $tickets = DB::table('invitations as I')->join('users as U', 'U.id', 'I.userFrom')->select('I.id as CODE', 'U.userFirstName as FFNAME', 'U.userLastName as FLNAME', 'I.status as STATUS', 'I.recipientEmail as RECIPIENT', 'I.created_at as DATE')->where('event_id', $data->eventId)->get();\n $countTickets = count($tickets);\n\n //dd($tickets);\n\n \treturn view('backend.admin.invitations.admin-invitations', ['eventId' => $data->eventId, 'eventName' => $eventName, \n 'permissions' => $permissions, 'invitations' => $tickets, \n 'cTickets' => $countTickets,\n 'invitationConfigured' => $invitationConfigured,\n 'eventAdminStatus' => $eventAdminStatus]);\n }", "function get_uninvitable(){\r\n \r\n global $db ;\r\n global $user ;\r\n \r\n $response = array() ;\r\n \r\n $response[] = $this->owner ;\r\n \r\n $db->query( \"SELECT `user` FROM `group_membership` WHERE `group`='\".$this->id.\"'\" ) ;\r\n \r\n while( ( $u = $db->field() ) != false ){\r\n \r\n $response[] = $u ;\r\n }\r\n \r\n // blocked by the owner/has blocked the owner\r\n \r\n $db->query( \"SELECT `blocker`, `blockee` from `profile_block`\r\n WHERE `blocker` ='\".$this->owner->id.\"'\r\n OR `blockee` ='\".$this->owner->id.\"'\" ) ;\r\n \r\n while( ( $b = $db->assoc() ) != false ){\r\n \r\n if( $b['blockee'] == $this->id and ! in_array($b['blocker'], $response) ){\r\n \r\n $response[] = $b['blocker'] ;\r\n \r\n } elseif( $b['blocker'] == $this->id and ! in_array($b['blockee'], $response) ) {\r\n \r\n $response[] = $b['blockee'];\r\n }\r\n }\r\n \r\n // already invited, or has an invite pending approval\r\n \r\n $db->query( \"SELECT `invitee` FROM `invitations`\r\n WHERE `module`='group'\r\n AND `module_item_id`='\".$this->id.\"'\r\n AND `invitee`='\".$user->id.\"'\r\n AND `expired` = '0'\" ) ;\r\n\r\n \r\n while( ( $i = $db->field() ) != false ){\r\n \r\n if( ! inarray( $i, $response ) ){\r\n $response[] = $i ;\r\n }\r\n }\r\n \r\n return $response ;\r\n }", "function get_invitation_text($status){\t\n\t\tswitch($status){\n\t\t\tcase 'A':\n\t\t\t $text = 'Interested'; \n\t\t\t\t\tbreak;\n\t\t\tcase 'R':\t\t\n\t\t\t\t\t$text = 'Not Interested'; \n\t\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t$text = 'Response Awaited';\n\t\t\t\t\t \n\t\t}\n\t\treturn $text;\n\t}", "private function pendingInvitations()\n {\n return $invitations = Invitation::with('project')\n ->where('recipient_id', auth()->user()->user_id)\n ->whereNotNull('from_id')\n ->whereNull('updated_at')\n ->orwhereHas('memberships', function ($q) {\n $q->whereIn(\n 'role_position',\n [\n 'Co-Principal Investigator',\n 'Lead Principal Investigator',\n ]\n )\n ->where('individuals_id', auth()->user()->user_id);\n })\n ->whereNull('from_id')\n ->whereNull('updated_at')\n ->get();\n }", "public function approveInvitation( Request $request){\n\n $id= $request['InvitationId'];\n $invitation = Invitation::where('InvitationId',$id)->first();\n\n $invitation->InvitationResponse = 1;\n// return $reservation;\n $invitation->save();\n //******** MAKE THAT USER FRIEND IF INVITATION IS APPROVED **********//\n $attributes=[\n\n 'UserOneId' =>$invitation->InvitationSenderId,\n 'UserTwoId' =>$invitation->InvitationReceiverId,\n 'Status' => 1,\n ];\n Friend::create($attributes);\n\n //******* SEND RESERVATION TO THE RESTAURANT ********************//\n $reservation=[\n\n 'ReservationMakerId' =>$invitation->InvitationSenderId,\n 'ReservationMaker2' =>$invitation->InvitationReceiverId,\n 'ReservationDate' =>$invitation->InvitationDate,\n 'ReservationStartTime' =>$invitation->InvitationStartTime,\n 'ReservationEndTime' =>$invitation->InvitationEndTime,\n 'ReservationRestaurantId' =>$invitation->RestaurantId,\n 'ReservationResponse' =>0\n\n ];\n Reservation::create($reservation);\n\n\n $notification=[\n\n 'NotificationToId1' =>$invitation->InvitationSenderId,\n 'NotificationToId2' =>$invitation->InvitationReceiverId,\n\n 'NotificationFormId' =>$invitation->RestaurantId,\n 'type'=>'Uapprove'\n\n\n\n ];\n Notification::create($notification);\n\n return back()->withFlashMessage('Invitation approved');\n\n\n }", "function invite()\r\n\t{\r\n\t\t$data['menu']=$this->dbm->getmenu();\r\n\t\t\t\t\r\n\t\t$data['user']=$user=$this->session->userdata(\"user\");\r\n\t\tif($data['user']==false)\r\n\t\t\tredirect(\"\");\r\n\t\t$data['page']=\"invite\";\r\n\t\t$data['g_site']=$this->g_site;\r\n\t\t$data['g_init']=true;\r\n\t\t$data['g_specialnext']='showsendinvite()';\r\n\t\t$data['g_invitemsg']='Please click the following url to get signed up with LocalSquare and become my friend. <a href=\"'.site_url(\"invite/{$user['inviteid']}\").'\">'.site_url(\"invite/{$user['inviteid']}\").'</a> Exclusive private deals are available in LocalSquare. I want to share this with you.</div>';\r\n\t\t$this->load->view(\"index\",$data);\r\n\t}", "public function getIdentity()\n {\n }", "function venture_invite_token_values($type, $object) {\n $values = array();\n if ($type == 'invite' && is_object($object)) {\n global $user;\n $profile = venture_profile_retrieve($user->uid);\n \n if ($object->data['message']) {\n // Remove extraneous spaces from message as they might cause improper wrapping\n $message = preg_replace('! +(\\r|\\n)!', '$1', $object->data['message']); \n $message = \" {$profile->field_first_name[0]['value']} says:\\n\\n\\\"$message\\\"\";\n }\n \n $values['venture-user-name'] = venture_profile_get_name($profile, FALSE);\n $values['venture-message'] = $message;\n }\n return $values;\n}" ]
[ "0.69574994", "0.6598531", "0.6598531", "0.65034556", "0.6491997", "0.63781065", "0.6353506", "0.6273466", "0.6241524", "0.6107385", "0.60919106", "0.6081142", "0.6081142", "0.60660094", "0.6060181", "0.6013913", "0.6013913", "0.5970906", "0.5936609", "0.5899488", "0.5898589", "0.58934766", "0.5879695", "0.58736485", "0.58736485", "0.58736485", "0.58588666", "0.58526826", "0.58307993", "0.57875705", "0.5785357", "0.576768", "0.5762441", "0.5749838", "0.57407826", "0.5738715", "0.5729811", "0.5710571", "0.5706383", "0.5695555", "0.56919765", "0.56558245", "0.56495327", "0.56285334", "0.5628248", "0.56120205", "0.5610926", "0.5602913", "0.56027335", "0.5601932", "0.55975264", "0.55928034", "0.5573102", "0.5572456", "0.5565256", "0.5562218", "0.5560325", "0.5559008", "0.5557674", "0.5557395", "0.5553757", "0.5552976", "0.554714", "0.5520161", "0.5520161", "0.5508287", "0.55060905", "0.55056643", "0.55011475", "0.55008906", "0.54806817", "0.5477303", "0.54709375", "0.5463323", "0.54620194", "0.5459991", "0.54576415", "0.5447814", "0.54460186", "0.5445992", "0.54428136", "0.5438185", "0.54347163", "0.54333645", "0.5432123", "0.54281527", "0.5424744", "0.54235864", "0.54213977", "0.5417164", "0.5414395", "0.54103273", "0.53987736", "0.53963536", "0.5391672", "0.5390096", "0.53847986", "0.53788173", "0.5375786", "0.53651404" ]
0.753631
0
Package of functions for operations on upload forms html_write_form_line: Function to write a line in the form Function to write a line in the form Returns nothing Input: $field_name: the name of the field $is_required: a boolean whether field is required $has_error: a boolean whether field has error $field_error: the error message $input_type: the type of input (hidden, text, textarea, select) $field_input: an array which content depends on input_type $field_desc: the description of the field
Пакет функций для операций с формами загрузки html_write_form_line: Функция для записи строки в форму Функция для записи строки в форму Возвращает ничего Вход: $field_name: имя поля $is_required: булевое значение, указывающее, является ли поле обязательным $has_error: булевое значение, указывающее, есть ли ошибка в поле $field_error: сообщение об ошибке $input_type: тип ввода (hidden, text, textarea, select) $field_input: массив, содержимое которого зависит от input_type $field_desc: описание поля
function html_write_form_line($field_name, $is_required, $has_error, $field_error, $input_type, $field_input, $field_desc) { // Header print <<<STRING <tr> <th STRING; // Red field if ($has_error) { print " class=\"redtext\""; } // Close "th" tag print ">"; // Field name if ($is_required) { print "*"; } print $field_name; // Field error if ($has_error) { print " (".$field_error.")"; } // Prepare for input print <<<STRING :</th> <td> STRING; // Input switch ($input_type) { case "hidden": break; case "text": // Get maxlength, name and value $maxlength=$field_input['maxlength']; if ($maxlength===NULL || !is_int($maxlength)) { // System error $_SESSION['errors']=array(); $_SESSION['errors'][0]=array(); $_SESSION['errors'][0]['code']=1860; $_SESSION['errors'][0]['message']="Error in upload_form.php: maxlength is not specified correctly (maxlength=$maxlength)"; $_SESSION['l_errors']=1; // Redirect to system error page header('Location: '.$url_root.'system_error.php'); exit(); } $name=$field_input['name']; $value=$field_input['value']; print <<<STRING <input type="text" size="28" maxlength="$maxlength" name="$name" value="$value" STRING; $onkeydown=$field_input['onkeydown']; if ($onkeydown!=NULL) { print " onkeydown=\"$onkeydown\" onkeyup=\"$onkeydown\""; } print " />"; break; case "textarea": // Get maxlength, name and value $maxlength=$field_input['maxlength']; if ($maxlength===NULL || !is_int($maxlength)) { // System error $_SESSION['errors']=array(); $_SESSION['errors'][0]=array(); $_SESSION['errors'][0]['code']=1860; $_SESSION['errors'][0]['message']="Error in upload_form.php: maxlength is not specified correctly (maxlength=$maxlength)"; $_SESSION['l_errors']=1; // Redirect to system error page header('Location: '.$url_root.'system_error.php'); exit(); } $name=$field_input['name']; $value=$field_input['value']; print <<<STRING <textarea name="$name" cols="30" rows="4" STRING; if ($maxlength!=0) { print " onkeydown=\"limitText(this, $maxlength)\""; } print <<<STRING >$value</textarea> STRING; break; case "select": // Get name and options $name=$field_input['name']; $options=$field_input['options']; $n_options=$field_input['n_options']; $form_loader_id=$_SESSION['login']['cc_id']; $form_loader_name=$_SESSION['login']['user_name']; print <<<STRING <select name="$name" style="width:220px"> <option value="$form_loader_id"> Myself ($form_loader_name) </option>\n STRING; for ($i=0; $i<$n_options; $i++) { $value=$options['id'][$i]; $name=$options['name'][$i]; if(!is_numeric(substr($name,0,1))){ //to remove non-observatory "cc" print <<<STRING <option value="$value"> $name </option>\n STRING; } } print <<<STRING </select> STRING; break; case "radio": // Get name and options $name=$field_input['name']; $options=$field_input['options']; $n_options=$field_input['n_options']; for ($i=0; $i<$n_options; $i++) { $value=$options['value'][$i]; $display=$options['display'][$i]; $checked=$options['checked'][$i]; if ($i==0) { print "\t\t\t\t\t\t\t"; } else { print "&#09;"; } print "<input type=\"radio\""; if ($checked) { print " checked=\"yes\""; } print " name=\"$name\" value=\"$value\">$display</input>"; } break; default: // System error $_SESSION['errors']=array(); $_SESSION['errors'][0]=array(); $_SESSION['errors'][0]['code']=1860; $_SESSION['errors'][0]['message']="Error in upload_form.php: input_type could not be recognized (input_type=$input_type)"; $_SESSION['l_errors']=1; // Redirect to system error page header('Location: '.$url_root.'system_error.php'); exit(); } // Field description print <<<STRING </td> <td><span style="font-size:10px"> $field_desc </span></td> </tr> STRING; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_to_form ($line) {\n\t\t$this->form_lines[]= $line.\"\\n\";\n\t}", "function writeFormField($id, $label, $type) {\n echo \"<label for=\\\"$id\\\">$label</label><br>\";\n if ($type == 'text') {\n echo \"<input type=\\\"text\\\" name=\\\"$id\\\" id=\\\"$id\\\" required=\\\"true\\\">\";\n } else if ($type == 'textarea') {\n echo \"<textarea id=\\\"$id\\\" name=\\\"$id\\\"></textarea>\";\n }\n echo \"<br><br><br>\";\n}", "function addFormField (&$father, $name, $placeholder, $id, $type, $fa_icon, $required, $data_error)\r\n\t{\r\n\t\t$form_level = $father->ownerDocument->createElement (\"div\");\r\n\t\t$form_level->setAttribute (\"class\", \"form-level form-group\");\r\n\t\t\r\n\t\t$input = $form_level->ownerDocument->createElement (\"input\");\r\n\t\t$input->setAttribute (\"id\", $id);\r\n\t\t$input->setAttribute (\"class\", \"input-block\");\r\n\t\t$input->setAttribute (\"name\", $name);\r\n\t\t$input->setAttribute (\"placeholder\", $placeholder);\r\n\t\t$input->setAttribute (\"value\", \"\");\r\n\t\t$input->setAttribute (\"type\", $type);\r\n\t\tif ($data_error)\r\n\t\t{\r\n\t\t\t$input->setAttribute (\"data-error\", $data_error);\r\n\t\t}\r\n\t\tif ($required)\r\n\t\t{\r\n\t\t$input->setAttribute (\"required\", \"\");\r\n\t\t}\r\n\t\t\r\n\t\t$form_level->appendChild ($input);\r\n\t\t\r\n\t\t$icon = $form_level->ownerDocument->createElement (\"span\");\r\n\t\t$icon->setAttribute (\"class\", \"form-icon fa \" . $fa_icon);\r\n\t\t$form_level->appendChild ($icon);\r\n\t\t\r\n\t\t$error_field = $form_level->ownerDocument->createElement (\"div\");\r\n\t\t$error_field->setAttribute (\"class\", \"help-block with-errors\");\r\n\t\t$form_level->appendChild ($error_field);\r\n\t\t$father->appendChild ($form_level);\r\n\t}", "function entry_form(&$entry, $title = NULL, $id = NULL) {\n global $entry_types, $extra_index_fields, $extra_urlkey_fields, $extra_textarea_fields,\n $entry_field_index, $entry_field_printed;\n if (!isset($entry)) return;\n $type = strtolower($entry['entrytype']);\n if (!$type) return;\n $fields = $entry_types[$type];\n if (!$fields) return;\n echo h_start('form', array('action' => $_SERVER['PHP_SELF'],\n\t\t\t 'name' => 'entry_form',\n\t\t\t 'method' => 'post',\n\t\t\t 'enctype' => 'multipart/form-data'));\n echo h('p',\n\t ($title ? h('strong', $title).' &nbsp; ' : '').\n\t h_hidden('fn', 'entry').\n\t ($id ? h_hidden('id', $id) : '').\n\t h_submit('Submit').\n\t h_button('Cancel', 'window.back()').\n\t h_submit('Don\\'t check errors', 'nocheck').\n\t h_file().\n\t h('br').'If there are multiple authors, editors, urls, or keywords please enter them on separate lines.'\n\t );\n echo h_start('p');\n echo h('strong', 'Required fields ').h_help('?', 'required').h('br');\n foreach ($extra_index_fields as $f)\n entry_field($entry, $f);\n foreach ($fields['required'] as $f)\n entry_field($entry, $f);\n for ($i = 1; $i <= 3; $i++)\n entry_field($entry, NULL);\n echo h('strong', 'Optional fields ').h_help('?', 'optional').h('br');\n foreach ($extra_urlkey_fields as $f)\n entry_field($entry, $f);\n foreach ($fields['optional'] as $f)\n entry_field($entry, $f);\n foreach ($entry as $f => $v)\n if (!$entry_field_printed[$f] && !in_array($f, $extra_textarea_fields))\n entry_field($entry, $f);\n for ($i = 1; $i <= 3; $i++)\n entry_field($entry, NULL);\n foreach ($extra_textarea_fields as $f)\n entry_field($entry, $f);\n echo h_hidden('nfield', $entry_field_index);\n echo h_end('p');\n echo h_end('form');\n}", "public function createUploadForm() {\r\n $fileInput = $this->createFileInput();\r\n $titleInput = $this->createPrivateInput();\r\n $descInput = $this->createDescInput();\r\n $privInput = $this->createPrivacyInput();\r\n $categoryInput = $this->createCategoryInput();\r\n $uploadButton = $this->createUploadButton();\r\n return \"\r\n <form action='processing.php' method='POST' enctype='multipart/form-data'>\r\n $fileInput\r\n $titleInput\r\n $descInput\r\n $privInput\r\n $categoryInput\r\n $uploadButton\r\n </form>\r\n \";\r\n }", "function fnln_addFields(){ ?>\n\t\t<p>\n\t\t\t<label for=\"first_name\">First Name</label>\n\t\t\t<input type=\"text\" name=\"first_name\" id=\"first_name\" class=\"input\" value=\"\" size=\"20\" />\n\t\t</p>\n <p>\n\t\t\t<label for=\"last_name\">Last Name</label>\n\t\t\t<input type=\"text\" name=\"last_name\" id=\"last_name\" class=\"input\" value=\"\" size=\"20\" />\n\t\t</p>\n\t\t<?php\n\n}", "protected function upload_form()\n {\n }", "function write_form($fields_to_write = null, $mode=WRITE_NORMAL)\n {\n $h = parent::write_form($fields_to_write, $mode);\n\t\t\n\t\t// stored value /////////////////////////////\n\t\t$__val = date('Y-m-d H:i');\n//\t\t$h['gtrwebsite_contact_stored_input'] = date('Y-m-d H:i');\n\t\t\n\t\t\t\t\t$tmp_data = array(\n\t\t\t\t\t\t\t\t\t\t'name' => 'gtrwebsite_contact_stored_input',\n\t\t\t\t\t\t\t\t\t\t'id' => 'gtrwebsite_contact_stored_input',\n\t\t\t\t\t\t\t\t\t\t'value' => $__val,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\n//\t\t$h['gtrwebsite_contact_stored_input'] = form_input($tmp_data);\n\t\t\n return $h;\n }", "function drawFieldForm () {\n\t\t\t$file_enc_type = false;\n\t\t\t$rfields = array();\n\t\t\t$ffields = array ();\n\t\t\t$rcnt = 0;\n\t\t\t$fcnt = 0;\n\t\t\tfor ($i=0; $i<count($this->formElements); $i++) {\n\t\t\t\tif ($this->formElements[$i]->required == \"yes\") {\n\t\t\t\t\tif ($this->formElements[$i]->type == \"date\") {\n\t\t\t\t\t\t$rfields[$rcnt][0] = $this->formElements[$i]->name . \"_m\";\n\t\t\t\t\t\t$rfields[$rcnt++][1] = $this->formElements[$i]->label . \" (Month)\";\n\t\t\t\t\t\t$rfields[$rcnt][0] = $this->formElements[$i]->name . \"_d\";\n\t\t\t\t\t\t$rfields[$rcnt++][1] = $this->formElements[$i]->label . \" (Day)\";\n\t\t\t\t\t\t$rfields[$rcnt][0] = $this->formElements[$i]->name . \"_y\";\n\t\t\t\t\t\t$rfields[$rcnt][1] = $this->formElements[$i]->label . \" (Year)\";\n\t\t\t\t\t\t$rcnt++;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->formElements[$i]->multiple) {\n\t\t\t\t\t\t$rfields[$rcnt][0] = $this->formElements[$i]->name . \"[]\";\n\t\t\t\t\t\t$rfields[$rcnt][1] = $this->formElements[$i]->label;\n\t\t\t\t\t\t$rcnt++;\n\t\t\t\t\t}\n\t\t\t\t\t// don't check for a value in a file field if something was passed in\n\t\t\t\t\telse if ($this->formElements[$i]->type == \"file\" &&\n\t\t\t\t\t\t\t\t\t $this->formElements[$i]->value == \"\") {\n\t\t\t\t\t\t$rfields[$rcnt][0] = $this->formElements[$i]->name;\n\t\t\t\t\t\t$rfields[$rcnt][1] = $this->formElements[$i]->label;\n\t\t\t\t\t\t$rcnt++;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->formElements[$i]->type != \"file\") {\n\t\t\t\t\t\t$rfields[$rcnt][0] = $this->formElements[$i]->name;\n\t\t\t\t\t\t$rfields[$rcnt][1] = $this->formElements[$i]->label;\n\t\t\t\t\t\t$rcnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($this->formElements[$i]->type == \"file\") {\n\t\t\t\t\t$file_enc_type = true;\n\t\t\t\t\t$ffields[$fcnt][0] = $this->formElements[$i]->name;\n\t\t\t\t\t$ffields[$fcnt][1] = $this->formElements[$i]->label;\n\t\t\t\t\t$fcnt++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo \"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\\n\";\n\t\t\techo \"var req_fields = new Array (\";\n\t\t\tfor ($i=0; $i < (count($rfields)-1); $i++) {\n\t\t\t\techo \"'\" . $rfields[$i][0] . \"',\";\n\t\t\t}\n\t\t\techo \"'\" . $rfields[count($rfields)-1][0] . \"');\\n\";\n\t\t\techo \"var req_labels = new Array (\";\n\t\t\tfor ($i=0; $i < (count($rfields)-1); $i++)\n\t\t\t\techo \"'\" . $rfields[$i][1] . \"',\";\n\t\t\techo \"'\" . $rfields[count($rfields)-1][1] . \"');\\n\";\n\t\t\tif (count($ffields) > 0) {\n\t\t\t\techo \"var file_fields = new Array (\";\n\t\t\t\tfor ($i=0; $i < (count($ffields)-1); $i++) {\n\t\t\t\t\techo \"'\" . $ffields[$i][0] . \"',\";\n\t\t\t\t}\n\t\t\t\techo \"'\" . $ffields[count($ffields)-1][0] . \"');\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo 'var file_fields = new Array();';\n\t\t\t}\n\n\t\t\techo \"function validate\" . $this->formname . \"(frmname) {\\n\" .\n\t\t\t\t \" var frm = document.forms[frmname];\\n\" .\n\t\t\t\t \"\tvar valid = true;\\n\" .\n\t\t\t\t \"\tvar msg = \\\"Please enter the following information:\\\";\\n\" .\n\t\t\t\t \"\tvar currEl;\\n\" .\n\t\t\t\t \" var tempName;\\n\" .\n\t\t\t\t \"\tfor (var i=0; i<req_fields.length; i++) {\\n\" .\n\t\t\t\t \"\t\tcurrEl = frm.elements[req_fields[i]];\\n\" .\n\t\t\t\t \"\t\tif ((currEl.type == \\\"text\\\" || currEl.type == \\\"file\\\") && currEl.value ==\\\"\\\") {\\n\" .\n\t\t\t\t \"\t\t\tvalid = false;\\n\" .\n\t\t\t\t \"\t\t\tmsg += \\\"\\\\n * \\\" + req_labels[i];\\n\" .\n\t\t\t\t \"\t\t}\\n\" .\n\t\t\t\t \"\t\telse if (currEl.type == \\\"textarea\\\" && currEl.innerText ==\\\"\\\") {\\n\" .\n\t\t\t\t \"\t\t\tvalid = false;\\n\" .\n\t\t\t\t \"\t\t\tmsg += \\\"\\\\n * \\\" + req_labels[i];\\n\" .\n\t\t\t\t \"\t\t}\\n\" .\n\t\t\t\t \" else if (currEl.type == \\\"select-one\\\" && currEl.selectedIndex < 1) {\\n\" .\n\t\t\t\t \" valid = false;\\n\" .\n\t\t\t\t \" msg += \\\"\\\\n * \\\" + req_labels[i];\\n\" .\n\t\t\t\t \" }\\n\" .\n\t\t\t\t \" else if (currEl.type == \\\"select-multiple\\\" && currEl.selectedIndex == -1) {\\n\" .\n\t\t\t\t \" valid = false;\\n\" .\n\t\t\t\t \" msg += \\\"\\\\n * \\\" + req_labels[i];\\n\" .\n\t\t\t\t \" }\\n\" .\n\t\t\t\t \"\t}\\n\" .\n\t\t\t\t \"\tif (!valid)\\n\" .\n\t\t\t\t \"\t\talert (msg);\\n\" .\n\t\t\t\t \"\treturn valid;\\n\" .\n\t\t\t\t\"}\" .\n\t\t\t\"</script>\\n\";\n\t\t\techo \"<table border=\\\"0\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\">\";\n\t\t\techo \"<form name=\\\"\" . $this->formname . \"\\\" action=\\\"\" . $this->formaction . \"\\\" method=\\\"$this->method\\\"\";\n\t\t\tif ($this->validate) {\n\t\t\t\techo \" onsubmit=\\\"return validate\" . $this->formname . \"(this.name);\\\"\";\n\t\t\t}\n\t\t\tif ($file_enc_type) {\n\t\t\t\techo \" enctype=\\\"multipart/form-data\\\">\" .\n\t\t\t\t\t\"<input type=\\\"hidden\\\" name=\\\"MAX_FILE_SIZE\\\" value=\\\"3000000\\\">\";\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \" enctype=\\\"application/x-www-form-urlencoded\\\">\";\n\t\t\techo\t\"<input type=\\\"hidden\\\" name=\\\"paction\\\" value=\\\"\" . $this->paction . \"\\\">\";\n\t\t\tfor ($i=0; $i<count($this->formElements); $i++) {\n\t\t\t\t$curr_el = $this->formElements[$i];\n\t\t\t\t// hidden form element\n\t\t\t\tif ($curr_el->type == \"hidden\")\n\t\t\t\t\t$this->writeHidden ($curr_el);\n\t\t\t\t// form section\n\t\t\t\telse if ($curr_el->type == \"section\")\n\t\t\t\t\t$this->writeSection ($curr_el);\n\t\t\t\t// form description\n\t\t\t\telse if ($curr_el->type == \"description\")\n\t\t\t\t\t$this->writeDescription ($curr_el);\n\t\t\t\t// text form element\n\t\t\t\telse if ($curr_el->type == \"text\" || $curr_el->type == \"password\") {\n\t\t\t\t\t$this->writeText ($curr_el);\n\t\t\t\t}\n\t\t\t\t// image element\n\t\t\t\telse if ($curr_el->type == \"image\")\n\t\t\t\t\t$this->writeImage ($curr_el);\n\t\t\t\t// checkbox form element\n\t\t\t\telse if ($curr_el->type == \"checkbox\")\n\t\t\t\t\t$this->writeCheckbox ($curr_el);\n\t\t\t\t// file form element\n\t\t\t\telse if ($curr_el->type == \"file\")\n\t\t\t\t\t$this->writeFileField ($curr_el);\n\t\t\t\t// textarea form element\n\t\t\t\telse if ($curr_el->type == \"textarea\") {\n\t\t\t\t\techo \"<tr><td width=\\\"30%\\\" class=\\\"formLabel\\\" align=\\\"right\\\" valign=\\\"top\\\">\" . $curr_el->label . \":&nbsp;</td><td>\" .\n\t\t\t\t\t\t\"<textarea rows=\\\"7\\\" cols=\\\"45\\\" name=\\\"\" . $curr_el->name . \"\\\">\" .\n\t\t\t\t\t\t$curr_el->value . \"</textarea></td></tr>\";\n\t\t\t\t}\n\t\t\t\t// date form element\n\t\t\t\telse if ($curr_el->type == \"date\") {\n\t\t\t\t\techo \"<tr><td width=\\\"30%\\\" class=\\\"formLabel\\\">\" . $curr_el->label . \":&nbsp;</td><td>\";\n\t\t\t\t\techo \"<select name=\\\"\" . $curr_el->name . \"_m\\\"><option value=\\\"-1\\\"/>\";\n\t\t\t\t\tfor ($j=1; $j<13; $j++) {\n\t\t\t\t\t\techo \"<option value=\\\"\" . $j . \"\\\" \";\n\t\t\t\t\t\tif ($j == date(\"m\", $curr_el->value))\n\t\t\t\t\t\t\techo \"selected\";\n\t\t\t\t\t\techo \">\" . $j;\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select>&nbsp;/&nbsp;<select name=\\\"\" . $curr_el->name . \"_d\\\"><option value=\\\"-1\\\"/>\";\n\t\t\t\t\tfor ($j=1; $j<32; $j++) {\n\t\t\t\t\t\techo \"<option value=\\\"\" . $j . \"\\\" \";\n\t\t\t\t\t\tif ($j == date(\"d\", $curr_el->value))\n\t\t\t\t\t\t\techo \"selected\";\n\t\t\t\t\t\techo \">\" . $j;\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select>&nbsp;/&nbsp;<select name=\\\"\" . $curr_el->name . \"_y\\\"><option value=\\\"-1\\\"/>\";\n\t\t\t\t\tfor ($j=date(\"Y\", $curr_el->startDate); $j<date(\"Y\", $curr_el->endDate); $j++) {\n\t\t\t\t\t\techo \"<option value=\\\"\" . $j . \"\\\" \";\n\t\t\t\t\t\tif ($j == date(\"Y\", $curr_el->value))\n\t\t\t\t\t\t\techo \"selected\";\n\t\t\t\t\t\techo \">\" . $j;\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select></td></tr>\";\n\t\t\t\t}\n\t\t\t\t// select form element\n\t\t\t\telse if ($curr_el->type == \"select\")\n\t\t\t\t\t$this->writeSelectBox ($curr_el);\n\t\t\t}\n\t\t\techo \"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\";\n\t\t\t$this->writeBackButton ();\n\t\t\tif ($this->deletelabel != \"\")\n\t\t\t\techo \"&nbsp;<input type=\\\"button\\\" value=\\\"\" . $this->deletelabel . \"\\\" onclick=\\\"javascript: document.\" .\n\t\t\t\t\t$this->formname . \".paction.value='deleteItem';document.\" . $this->formname . \".submit();\\\">\";\n\t\t\techo \"&nbsp;<input type=\\\"submit\\\" value=\\\"\" . $this->submitlabel . \"\\\">\";\n\t\t\tif ($this->editlabel != \"\")\n\t\t\t\techo \"&nbsp;<input type=\\\"button\\\" value=\\\"\" . $this->editlabel . \"\\\" onclick=\\\"javascript: document.\" .\n\t\t\t\t\t$this->formname . \".paction.value='editItem';document.\" . $this->formname . \".submit();\\\">\";\n\t\t\t$this->writeActionButton ();\n\t\t\t$this->writeNextButton ();\n\t\t\techo \"</td></tr>\";\n\t\t\techo \"</form></table>\";\n\t\t}", "abstract public function add_fields($data, Latter_Form $form);", "private function generate_user_fields() {\n $this->html_output = \"\";\n\n if (!is_array($this->require))\n return false;\n $html = <<<eol\n <!--//[form for additional information]\n * This is not a template\n //-->\n <table border='0' width=\"80%\" align=\"center\">\n <form name=\"additional\" method=\"post\" enctype=\"multipart/form-data\">\neol;\n //////////////////////////////////////\n foreach ($this->fields_user as $field) {\n $html_field = html_form_input($field['fld_type'], $field['fld_name'], $field['fld_value'], $field['fld_attr'], $field['fld_rowscols']);\n if ($field['fld_require']) {\n $rqr = $usrconf['require_image'] = \"<font color='red'>*</font>\";\n }\n $html.= <<<html\n<tr>\n<td class=\"fld-title\">{$field['fld_title']} {$rqr} </td>\n</tr>\n<tr>\n<td class=\"fld-content\" ><div id=\"{$field['fld_name']}\"> {$html_field} <div class=\"{$field['fld_name']}\"> </div></div> </td>\n</tr>\n<tr>\n<td class=\"fld-descr\">{$field['fld_descr']}</td>\n</tr>\n<tr> <td class=\"fld-space\">&nbsp; </td> </tr>\nhtml;\n }\n //////////////////////////////////////\n global $language;\n $html.= <<<eol\n </table>\n <p> <input type=\"submit\" name=\"submit\" value=\"{$language['lan.submit']}\"> </p>\n </form>\n\neol;\n $this->html_output.= $html;\n }", "function theme_form_file ($field) {\n $output = '<fieldset class=\"form-row\">';\n if (!empty($field['label'])) {\n $output .= '<label>' . $field['label'] . '</label>';\n }\n $output .= '<input type=\"file\" name=\"' . $field['name'] . '\"/>';\n $output .= '</fieldset>';\n return $output;\n}", "public function generatePage($necessaryFields, $fieldsType){\n\t\n\t\t$settings = simplexml_load_file('../data/settings.xml');\n\t\n\t\t$whatFile = $this->returnFile($this->whatFileBase);\n\t\t\n\t\t$xpathQuery = $this->xpathQuery;\n\n\t\t$toEdit = $this->runXpath($whatFile, $xpathQuery);\n\t\t\n\t\t$toEdit = $toEdit[0][0];\n\t\t\n\t\t$id = $toEdit->attributes()->id;\n\t\t\n\t\tif($fieldsType=='add'){\n\t\t\t$formAction = $this->addFormAction;\n\t\t}\n\t\tif($fieldsType=='edit'){\n\t\t\t$formAction = $this->editFormAction;\n\t\t}\n\t\t\n\t\t\n\t\techo \"<form action=\\\"\".$formAction.\"\\\" method=\\\"POST\\\">\";\n\t\t\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"type\\\"value=\\\"\".$this->XMLname.\"\\\">\";\n\t\t\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"id\\\"value=\\\"\".$id.\"\\\">\";\n\t\t\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"authKey\\\" value=\\\"\".$settings->authKey.\"\\\">\";\n\t\n\t\tforeach($necessaryFields as $field){\n\t\t\t$name = $field[0];\n\t\t\t$type = $field[1];\n\t\t\t$label = $field[2];\n\t\t\t$placeholder = $field[3];\n\t\t\t\n\t\t\tif($fieldsType=='add'){\n\t\t\t\t$toEdit->$name = '';\n\t\t\t}\n\t\t\tif($fieldsType=='edit'){\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'text':\n\t\t\t\t\techo \"<label for=\\\"\".$name.\"\\\">\".$label.\"</label><input name=\\\"\".$name.\"\\\" type=\\\"text\\\" placeholder=\\\"\".$placeholder.\"\\\" value=\\\"\".$toEdit->$name.\"\\\" class=\\\"span6\\\">\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'mdtextarea':\n\t\t\t\t\techo \"<label for=\\\"\".$name.\"\\\">\".$label.\"</label><div id=\\\"wmd-button-bar\\\"></div><div id=\\\"editorWrapper\\\"><div id=\\\"preview-switcher\\\">Preview</div><textarea id=\\\"wmd-input\\\" name=\\\"content\\\" class=\\\"span6\\\" rows=\\\"20\\\" placeholder=\\\"\".$placeholder.\"\\\">\".stripslashes($toEdit->$name).\"</textarea><div id=\\\"previewWrapper\\\"><div id=\\\"wmd-preview\\\" class=\\\"wmd-panel wmd-preview\\\"></div></div></div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\techo \"<label for=\\\"excerpt\\\">\".$label.\"</label><textarea name=\\\"\".$name.\"\\\" id=\\\"\".$name.\"\\\" placeholder=\\\"\".$placeholder.\"\\\" class=\\\"span6\\\" rows=\\\"10\\\">\".$toEdit->$name.\"</textarea>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'heading':\n\t\t\t\t\techo \"<h4>\".$label.\"</h4>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'templateDropdown':\n\t\t\t\t\t$currentTheme = $settings->theme;\n\t\t\t\t\t$currentTemplate = $toEdit->template;\n\t\t\t\t\t\n\t\t\t\t\techo \"<label for=\\\"\".$name.\"\\\">\".$label.\"</label><select id=\\\"\".$name.\"\\\" name=\\\"\".$name.\"\\\" class=\\\"span6\\\">\";\n\n\t\t\t\t\tforeach (glob(\"../themes/\".$currentTheme.\"/\".$this->fileType.\"*\") as $filename) {\n\n\t\t\t\t\t\t$templatename = str_replace(\"../themes/\".$currentTheme.\"/\", \"\", $filename);\n\n\n\t\t\t\t\t\tif($templatename==$currentTemplate){\n\t\t\t\t\t\techo \"<option value=\\\"\".$templatename.\"\\\" selected=\\\"selected\\\">\".$templatename.\"</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\techo \"<option value=\\\"\".$templatename.\"\\\">\".$templatename.\"</option>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'categoriesSelect':\n\t\t\t\t\t\n\t\t\t\t\t$postCategories = $toEdit->categories->category;\n\t\t\t\t\t$postCategories = (array) $postCategories;\n\n\t\t\t\t\t$categories = simplexml_load_file('../data/categories.xml');\n\n\t\t\t\t\t$count=0;\n\t\t\t\t\tforeach ($categories as $category){\n\n\n\t\t\t\t\tif (in_array($category->title, $postCategories)) {\n\t\t\t\t\techo \"\n\t\t\t\t\t<label class=\\\"checkbox\\\">\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"categories[]\\\" value=\\\"\".$category->title.\"\\\" checked=\\\"checked\\\">\".$category->title.\"\n\t\t\t\t\t</label>\n\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\techo \"\n\t\t\t\t\t<label class=\\\"checkbox\\\">\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"categories[]\\\" value=\\\"\".$category->title.\"\\\">\".$category->title.\"\n\t\t\t\t\t</label>\n\t\t\t\t\t\";\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$count++;\n\n\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\techo \"<input type=\\\"Submit\\\" class=\\\"btn btn-large\\\" value=\\\"\".$this->saveButtonText.\"\\\">\";\n\t\t\n\t\techo \"</form>\";\n\t\t\n\t\t\n\n\t}", "public function htmlForm(htmlPrps $htmlprps,$fields){\n\n }", "function fieldForm()\n {\n global $table;\n\n $table->table_column('<b>'.$this->description.': </b>'.$this->_specifyNotNull(), '33%', '', 'right');\n $table->table_column(html_form_PassWordField($this->name, $this->length, $this->maxlength, $this->default), '67%', '', 'left');\n $table->table_nextRowWithColumns();\n }", "function smiley_upload()\n{\n\t$content=\"\n\t<form action='$_SERVER[WEB_ROOT]/scripts/form_shim.php' enctype='multipart/form-data' method='post'>\n\t<h1>Upload a New Smiley</h1>\n\tSmileys have to be .gif or .png format, and less than 10k<br/><br/>\n\t<input type='hidden' name='MAX_FILE_SIZE' value='10240'/>\n\tfile: <input type='file' name='newsmiley'/><br/>\n\tname: <input type='text' name='newsmileyname' value=''/><br/><br/>\n\t<input type='submit' name='action' value='upload smiley'/>\n\t</form>\";\n\noutput(\"Upload a New Smiley\",$content,'','uploading a new smiley');\n}", "function defineFormRow () {\n $wt = 0;\n \n $form = array(\n '#tree' => TRUE,\n );\n \n $form['cid'] = array(\n '#type' => 'select',\n '#title' => t('Particpant'),\n '#weight' => $wt++\n );\n \n $form['spec_chars'] = array(\n '#value' => l(t('Special characters'), ''),\n '#weight' => $wt++\n );\n \n $form['statement'] = array(\n '#type' => 'textarea',\n '#title' => t('Particpant statement'),\n '#weight' => $wt++\n );\n \n $form['statement_format'] = filter_form(FILTER_FORMAT_DEFAULT, $wt++);\n \n $form['image'] = array(\n '#type' => 'textfield',\n '#title' => t('Image'),\n '#weight' => $wt++\n );\n \n $form['delete'] = array(\n '#type' => 'submit',\n '#value' => '-',\n '#description' => t(\"Remove this statement.\"),\n '#submit' => array('interview_delete_statement_submit'), // If no javascript action.\n '#ahah' => array(\n // 'path' => 'interview/js/statement/delete/' . $i,\n 'wrapper' => 'interview-statements',\n 'method' => 'replace',\n 'progress' => 'none',\n 'effect' => 'fade',\n ),\n '#weight' => $wt++\n );\n \n $form['add'] = array(\n '#type' => 'submit',\n '#value' => '+',\n '#description' => t(\"Add another statement.\"),\n '#submit' => array('interview_add_statement_submit'), // If no javascript action.\n '#ahah' => array(\n // 'path' => 'interview/js/statement/add/' . $i,\n 'wrapper' => 'interview-statements',\n 'method' => 'replace',\n 'progress' => 'none',\n 'effect' => 'fade',\n ),\n '#weight' => $wt++\n );\n \n return $form;\n }", "static function addEntryForm() { ?>\n <section class=\"form1\">\n <h2>Add a new entry</h2>\n <form method=\"post\">\n Name: <input type=\"text\" name=\"nameInput\"><br>\n Email: <input type=\"email\" name=\"emailInput\"><br>\n Number of terms: <input type=\"text\" name=\"termsInput\"><br>\n Date of Birth: <input type=\"date\" name=\"dateInput\"><br>\n Dept:\n <select name=\"deptInput\">\n <option value=\"Select...\">Please select one option</option>\n <option value=\"ACCT\">Accounting</option>\n <option value=\"BUSN\">Business</option>\n <option value=\"CSIS\">Computing Studies</option>\n <option value=\"MGMT\">Management</option>\n </select><br>\n Feedback:<br>\n <textarea name=\"feedbackInput\" cols=\"60\" rows=\"5\"></textarea><br>\n <input type=\"submit\" name=\"submit\" value=\"Add entry\">\n </form>\n </section>\n <?php\n }", "function processForm() {\r\n\t\t\r\n\t\t\t// Get name from field and put it into a string variable\r\n\t\t\t$name = $_POST['name'];\r\n\t\t\t$info = \"$name\";\r\n\r\n\t\t\t// Separate name and checkbox information\r\n\t\t\t$info = $info . \"\\n\";\r\n\r\n\t\t\t// Append checkbox information to the string variable\r\n\t\t\tforeach ($_POST['myCheckBox'] as $check => $choice) {\t\r\n\t\t\t \tif(isset($choice)){\r\n\t\t\t\t\t$info = $info . \", \" . $choice;\r\n\t\t\t \t} \r\n\t\t\t}\r\n\r\n\t\t\t// Separate checkbox and radio information\r\n\t\t\t$info = $info . \"\\n\";\r\n\r\n\t\t\t// Append radio information to the string variable\r\n\t\t\tforeach ($_POST['cardType'] as $check => $choice) {\t\r\n\t\t\t \tif(isset($choice)){\r\n\t\t\t\t\t$info = $info . \", \" . $choice;\r\n\t\t\t \t} \r\n\t\t\t}\r\n\r\n\t\t\t// Space for next customer's choice\r\n\t\t\t$info = $info . \"\\n\\n\";\r\n\r\n\t\t\t// Write to a file\r\n\t\t\t$file = \"order.csv\";\r\n\t\t\tfile_put_contents($file, $info, FILE_APPEND|LOCK_EX);\r\n\r\n\t\t\t// Thank the user very kindly\r\n\t\t\trequire('thankyou.php');\r\n\t\t\r\n\t\t}", "function form_creation(){\r\n?>\t\r\n<form>\r\n\tFirst name: <input type=\"text\" name=\"firstname\"><br>\r\n\tLast name: <input type=\"text\" name=\"lastname\"><br>\r\n\tMessage: <textarea name=\"message\">Enter text here...</textarea>\r\n</form>\r\n<?php\r\n}", "abstract function process_form();", "function write_form($fields_to_write = null, $mode=WRITE_NORMAL)\n\t{\n\t\t$h = parent::write_form($fields_to_write, $mode);\n\n\t\treturn $h;\n\t}", "function generateFormPart( $name, $attributes ) {\n\t\tglobal $TAB, $TAB2, $TAB3, $TAB4;\n\t\t$html = \"\";\n\t\t$inline = (array_key_exists('inline', $attributes) ? \"\" : \"<br />\") . \"\\n\";\n\t\t$after = array_key_exists('after', $attributes);\n\t\tif($name === \"checkbox\" && array_key_exists( \"groupby\", $attributes ) ) {\n\t\t\t$start .= \"<input type='$name'\";\n\t\t\tif( array_key_exists( \"values\", $attributes ) ) {\n\t\t\t\t$checked = in_array( array($value), $_POST );\n\t\t\t\tforeach( $attributes[\"values\"] as $val ) {\n\t\t\t\t\t$html .= \"$TAB2<label>\" . ($after ? \"\" : $val) . \"$start name='$attributes[groupby]' value='$val' \";\n\t\t\t\t\t$html .= ($checked ? \"checked='checked'\" : '') . \"/>\" . ($after ? $val : \"\") . \"</label>$inline\";\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $html;\n\t\t}\n\t\telse {\n\t\t\t$label = keyInArray( \"label\", $attributes );\n\t\t\t$html = $TAB2 . ($label ? (\"<label>\" . ($after ? \"\" : $label)) : \"\");\n\t\t\tif($name === 'area') {\n\t\t\t\t$html .= ( $label ? \"<br />\" : \"\" ) . \"<textarea\";\n\t\t\t\t$init = keyInArray('description', $_POST);\n\t\t\t\t$init2 = keyInArray('init', $attributes);\n\t\t\t\t$html2 = \">\" . ($init ? $init : $init2) . \"</textarea>\";\n\t\t\t}\n\t\t\telse if($name === 'dropdown') {\n\t\t\t\t$html .= \"<select name='\" . keyInArray( \"name\", $attributes, \"dropdown\" ) . \"'>\\n\";\n\t\t\t\t$selected = keyInArray( 'traits', $_POST);\n\t\t\t\tif( array_key_exists( \"options\", $attributes ) ) {\n\t\t\t\t\tforeach( $attributes[\"options\"] as $option ) {\n\t\t\t\t\t\t$html .= \"$TAB4<option value='$option' \";\n\t\t\t\t\t\t$html .= $selected == $option ? \"selected='selected' \" : '';\n\t\t\t\t\t\t$html .= \">$option</option>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $html . \"$TAB3</select><br />\\n\";\n\t\t\t}\n\t\t\telse {\t// assuming it is a valid \"<input type='$name'>\"\n\t\t\t\t$html .= \"<input type='$name'\";\n\t\t\t\t$html2 = \" />\";\n\t\t\t}\n\t\n\t\t\tforeach( $attributes as $key => $attr ) {\n\t\t\t\tif( $key !== 'label' && $key !== 'init' && $key !== 'inline' && $key !== 'after' ) {\n\t\t\t\t\t$html .= \" $key='$attr'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$id = keyInArray( 'id', $attributes );\n\t\t\t$val = keyInArray( 'value', $attributes );\n\t\t\t$value = keyInArray( $id, $_POST );\n\t\t\tif($name === 'checkbox')\n\t\t\t\t$html .= $value ? \" checked='checked'\" : \"\";\n\t\t\telse if($name !== 'password')\n\t\t\t\t$html .= \" value='\" . ($value ? $value : $val) . \"'\";\n\t\n\t\t\treturn \"$html$html2\" . ($label ? (($after ? $label : \"\") . \"</label>\") : \"\") . $inline;\n\t\t}\n\t}", "public function createForm()\n\t{\n\t\t$formHTML = '\n\t\t<div class=\"form-container\">\n <form method=\"post\" enctype=\"multipart/form-data\" class=\"upload-form\">\n\t\t\t\t<p id=\"' . self::$messageID . '\">' . $this->message . '</p>\n\t\t\t\t<div class=\"form-group\">\n \t\t<label for=\"' . self::$file . '\">Upload an image</label>\n \t\t<input type=\"file\" name=\"' . self::$file . '\" id=\"' . self::$file . '\" value=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form-group\">\n \t\t<label for=\"' . self::$description . '\" >Add an optional description</label>\n \t\t<input type=\"text\" name=\"' . self::$description . '\" class=\"form-control\" id=\"' . self::$description . '\" value=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<input id=\"\" type=\"submit\" name=\"' . self::$upload . '\" class=\"btn btn-default\" value=\"Upload\" />\n\t\t\t</form>\n\t\t</div>';\n\n\t\treturn $formHTML;\n }", "static function add_field() {\n echo '<fieldset><p>';\n // Add check box for enabling\n BsaUtil::add_checkbox(self::OPTION_NAME);\n // Add description\n echo '</p><p>' .\n __('Please input the content to be displayed as copyright at the end of articles. '\n . '%link% is reserved as the link of the article.', 'bjh-site-assistant');\n // Add text area, name OPTIONS_GROUP[OPTION_INFO] will let form submit to save to the right option\n // Enable to input the copyright info only if the option is checked\n $txtArea = '</p><p><textarea class=\"large-text\" id=\"%s\" name=\"%s[%s]\" %s rows=\"2\">%s</textarea>'\n . '</p></fieldset><br />';\n echo sprintf($txtArea,\n self::OPTION_INFO,\n BsaConst::OPTIONS_GROUP,\n self::OPTION_INFO,\n (BsaUtil::is_enabled(self::OPTION_NAME) ? '' : 'readonly'),\n BsaUtil::get_value(self::OPTION_INFO, ''));\n // echo '</p><p><textarea class=\"large-text\" id=\"'. self::OPTION_INFO . '\" '\n // . (BsaUtil::is_enabled(self::OPTION_NAME) ? '' : 'disabled')\n // . ' name=\"' . BsaConst::OPTIONS_GROUP . '[' . self::OPTION_INFO . ']\" rows=\"3\">'\n // . BsaUtil::get_value(self::OPTION_INFO, '')\n // . '</textarea></p></fieldset><br />';\n BsaUtil::control_field(self::OPTION_NAME, self::OPTION_INFO);\n }", "function writeFileField ($ce) {\n\t\t\techo \"<tr><td align=\\\"right\\\"><strong>$ce->label:&nbsp;</strong></td><td>\" .\n\t\t\t\t\t\t\"<input type=\\\"file\\\" name=\\\"\" . $ce->name . \"\\\" value=\\\"\" . $ce->value .\"\\\">\" .\n\t\t\t\t\t \"</td></tr>\";\n\t\t}", "function build_html_from_form_data($form_data, $fields, $steps = array()) {\n\n // ===========================================\n // == 1. == preparation\n // ===========================================\n $fields = prepare_fields($fields);\n\n if (empty($steps)) {\n $steps[] = array(\n 'id' => \"__only_step\",\n 'fields' => lib\\array_map_attr($fields, 'id'),\n );\n }\n\n // ===========================================\n // == 2. == PARAMETERS\n // ===========================================\n\n $table_names = lib\\array_transform_mapper($fields, 'id', 'html_label');\n \n // final HTML\n $html = \"<table style=\\\"border-collapse:collapse;\\\">\\n\";\n $td_attrs_name = 'style=\"padding: 4px 12px;border:1px solid #447;background-color:#dedede;\"';\n $td_attrs_val = 'style=\"padding: 4px 12px;border:1px solid #447;\"';\n $td_attrs_title = 'style=\"background: gray;\n color: white;\n padding: 4px 12px;\n border: 1px solid black;\"';\n\n\n // ===========================================\n // == 3. == HTML build\n // ===========================================\n foreach ($steps as $step) {\n\n // == 3.a == preparation\n // case of a switch step\n if (isset($step['switch'])) {\n $step['fields'] = lib\\array_flatten(array_map(function($sw) {return $sw['fields'];}, $step['switch']));\n }\n\n // == 3.b == build the step title\n // step title\n // the step title\n $titre = '<tr><td '.$td_attrs_title.' colspan=\"2\">'.(isset($step['title']) ? $step['title'] : $step['id']).'</td></tr>';\n if (!isset($step['title']) && substr($step['id'], 0, 2) == '__') $titre = '';\n $html .= $titre;\n\n // for each field, with put line in the table\n foreach ($step['fields'] as $fid) {\n\n $field = lib\\array_find_by_key($fields, 'id', $fid);\n if ($field === false) continue;\n\n $field_values = extract_field_post_data($field, $form_data);\n $field_names = get_field_html_labels($field);\n \n if (lib\\array_has_string_key($field_values)) {\n\n foreach ($field_values as $key => $val) {\n if (empty($val)) continue;\n $html .= '<tr>';\n $html .= '<td '.$td_attrs_name.'>'.$field_names[$key].'</td>';\n $html .= '<td '.$td_attrs_val.'>'.$val.'</td>';\n $html .= \"</tr>\\n\";\n }\n\n } else { // repeat-group\n \n $field_lines = array_map(function($el) {\n return '<td>' . implode($el, '</td><td>') . '</td>';\n }, $field_values);\n\n $field_header = '<td>' . implode('</td><td>', array_keys($field_values[0])) . '</td>';\n\n $val = '<table>'.$field_header.'<tr>' . implode('</tr><tr>', $field_lines) . '</tr></table>';\n\n $html .= '<tr>';\n $html .= '<td '.$td_attrs_name.'>'.$field['id'].'</td>';\n $html .= '<td '.$td_attrs_val.'>'.$val.'</td>';\n $html .= \"</tr>\\n\";\n }\n }\n\n }\n\n return $html.'</table>';\n\n}", "function renderForm($id, $firstname, $lastname, $quote, $info, $link, $img, $errors)\n{\n ?>\n\n <?php include \"inc/html_top.php\"; ?>\n\n <body>\n\n <form action=\"<?php echo basename($_SERVER[\"SCRIPT_FILENAME\"], '.php') . \".php\" ?>\" method=\"post\" enctype=\"multipart/form-data\">\n\n <fieldset>\n <legend>Tell us a little about yourself...</legend>\n\n <input type=\"hidden\" name=\"id\" value=\"<?php echo $id; ?>\">\n <div class=\"form-group\">\n <div class=\"row\">\n <div class=\"col-3\">\n <label for=\"firstname\" class=\"bold\">First Name or Nickname: *</label>\n <input type=\"text\" class=\"form-control <?php if ($errors['firstname']) {\n echo 'is-invalid';\n } ?>\" name=\"firstname\" id=\"firstname\"\n value=\"<?php echo $firstname; ?>\" required>\n </div>\n <div class=\"col-3\">\n <label for=\"lastname\" class=\"bold\">Last Name: *</label>\n <input type=\"text\" class=\"form-control <?php if ($errors['lastname']) {\n echo 'is-invalid';\n } ?>\" name=\"lastname\" id=\"lastname\"\n value=\"<?php echo $lastname; ?>\" required>\n </div>\n </div>\n </div>\n\n <div class=\"form-group\">\n <div class=\"row\">\n <div class=\"col-10\">\n <label for=\"quote\" class=\"bold\">Quote: *</label>\n <input type=\"text\" class=\"form-control <?php if ($errors['quote']) {\n echo 'is-invalid';\n } ?>\" name=\"quote\" id=\"quote\" value=\"<?php echo $quote; ?>\" required>\n </div>\n </div>\n <div>Max: 20 words</div>\n </div>\n\n <div class=\"form-group\">\n <div class=\"row\">\n <div class=\"col-11\">\n <label for=\"info\" class=\"bold\">About: *</label>\n <input type=\"text\" class=\"form-control <?php if ($errors['info']) {\n echo 'is-invalid';\n } ?>\" name=\"info\" id=\"info\" value=\"<?php echo $info; ?>\" required>\n </div>\n </div>\n <div>Max: 80 words</div>\n </div>\n <div class=\"form-group\">\n <div class=\"row\">\n <div class=\"col-6\">\n <label for=\"link\" class=\"bold\">Link to Personal Page: *</label>\n <input type=\"text\" class=\"form-control <?php if ($errors['link']) {\n echo 'is-invalid';\n } ?>\" name=\"link\" id=\"link\" value=\"<?php echo $link; ?>\" required>\n </div>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"img\" class=\"bold\">Profile Picture</label>\n <input type=\"file\" class=\"form-control-file <?php if ($errors[\"img\"]) {\n echo \"is-invalid\";\n } ?>\" id=\"img\" name=\"img\" accept=\"image/x-png,image/gif,image/jpeg\">\n </div>\n <?php if ($img != '') { ?>\n <div class=\"form-check\">\n <input type=\"checkbox\" class=\"form-check-input\" id=\"removeImg\" name=\"removeImg\">\n <label for=\"removeImg\">Remove Old Profile Picture</label>\n </div>\n <?php } ?>\n <div class=\"text-danger shadow-text font-weight-bolder\">* required</div>\n <div class=\"row\">\n <div class=\"col mt-4\">\n <input class=\"btn btn-success\" type=\"submit\" name=\"submit\" id=\"submit\" value=\"Submit\">\n </div>\n </div>\n </fieldset>\n </form>\n\n <div class=\"rf-buttons\">\n <a class=\"btn btn-primary\" href=\"studentlist.php\">Cancel</a>\n </div>\n\n <?php include \"inc/scripts.php\" ?>\n\n </body>\n </html>\n <?php\n}", "public function MakeForm($FormTypes, $class = null, $select = null, $selectcat = null, $classData, $file = false, $selectbox = false, $selectImage = false, $selectcate = false)\n {\n echo \"<form method='POST' data-validate \";\n if ($file == true) {\n echo \"action='/cms/assets/scripts/upload.php'\";\n }\n\n echo \"enctype='multipart/form-data'>\";\n//Foreaches Formtypes to make input, formtypes is an array in User.php class that holds the values for each input field\n echo \"<input name='mode' type='hidden' value='SAVE'>\";\n\n if ($file == true) {\n echo \"<input name='file' type='file'>\";\n }\n\n foreach ($FormTypes as $key => $value) {\n\n\n if ($value[\"type\"] === \"text\" || $value[\"type\"] === \"date\" || $value[\"type\"] === \"password\" || $value[\"type\"] === \"email\" || $value[\"type\"] === \"tel\" || $value[\"type\"] === \"hidden\") {\n\n echo \"<div class='form-group'>\";\n //Makes a label from arrFormElm array\n echo \"<label>\" . $value[\"label\"] . \"</label></br>\";\n\n //Makes a input from arrFormElm array & from Class data\n echo \"<input data-requried=\\\"1\\\" class='form-control' name='\" . $value[\"dbname\"] . \"' type='\" . $value[\"type\"] . \"' placeholder='\" . $value[\"placeholder\"] . \"' value='\" . $value[\"value\"] . \"'><br>\\n\";\n echo \"</div>\\n\";\n }\n\n\n if ($value[\"type\"] === \"textarea\") {\n echo \"<div class='form-group'>\";\n //Makes a label from arrFormElm array\n echo \"<label>\" . $value['label'] . \"</label></br>\";\n\n //Makes a input from arrFormElm array & from Class data\n echo \"<textarea id='' data-requried=\\\"1\\\" class='form-control summernote' name='\" . $value[\"dbname\"] . \"' type='\" . $value[\"type\"] . \"' placeholder='\" . $value[\"placeholder\"] . \"' value='\" . $value[\"value\"] . \"'>\" .\n $value[\"value\"] .\n \"</textarea><br>\\n\";\n echo \"</div>\\n\";\n\n }\n }\n\n\n if ($selectbox == true) {\n //calls $classdata(current class your using) class, to use arrFormElm array\n $classData = new $classData();\n\n //foreaches $arrFormelm's key to Elmvalue\n foreach ($classData->arrFormElm as $key => $Elmvalue) {\n\n //Checks for type => select in $user->arrFormElm\n if ($Elmvalue[\"type\"] === \"select\") {\n\n echo \"<select class='form-control'>\\n\";\n //Foreach $select(Database)\n foreach ($select as $key => $value) {\n\n //Gets $select's value from $elmValue's dbname(array)\n echo \"<option value = '\" . $value[$Elmvalue[\"vcTitle\"]] . \"'>\" . $value[$Elmvalue[\"dbname\"]] . \"</option>\\n\";\n }\n echo \"</select>\\n \";\n }\n }\n }\n\n if ($selectImage == true) {\n $image = new image();\n foreach ($image->arrFormElm as $key => $Elmvalue) {\n\n //Checks for type => select in $user->arrFormElm\n if ($Elmvalue[\"type\"] === \"select\") {\n echo \"<label>Billede</label>\";\n echo \"<select name='vcImage' class='form-control'>\\n\";\n //Foreach $select(Database)\n foreach ($select as $value) {\n\n //Gets $select's value from $elmValue's dbname(array)\n echo \"<option value = '\" . $value[$Elmvalue[\"dbname\"]] . \"'>\" . $value[\"vcTitle\"] . \"</option>\\n\";\n }\n echo \"</select>\\n \";\n }\n }\n }\n\n if ($selectcate == true) {\n $category = new shopcategory();\n $rows = $category->getSelect();\n foreach ($category->arrFormElm as $key => $Elmvalue) {\n\n //Checks for type => select in $user->arrFormElm\n if ($Elmvalue[\"type\"] === \"select\") {\n echo \"<label>Kategori</label>\";\n echo \"<select name='iParentID' class='form-control'>\\n\";\n //Foreach $select(Database)\n\n echo \"<option value='-1'>Over Kategori</option>\\n\";\n foreach ($rows as $value) {\n //Gets $select's value from $elmValue's dbname(array)\n echo \"<option value = '\" . $value[\"iCategoryID\"] . \"'>\" . $value[\"vcTitle\"] . \"</option>\\n\";\n }\n echo \"</select>\\n \";\n }\n }\n }\n\n\n echo \"<button type='submit' name='submit' class=\\\"btn btn-success\\\">GEM</button>\";\n echo \"<a href='?mode=list' class=\\\"btn btn-danger\\\">Tilbage</a>\";\n echo \"</form>\";\n\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n\t$form['info_link'] = [\n\t\t'#type' => 'item',\n\t\t'#markup' => \"See also: <a href='about_upload' target='_blank'>Upload Requirements</a>\",\n\t]; \n\t$form['table_link'] = [\n\t '#type' => 'item',\n\t '#markup' => \"See also: <a href='issn_table'>ISSN Linking List Management Page</a>\",\n\t]; \n\t\n\t//After submission, if there were any invalid lines, print them to this table\n\tif($form_state->get('submitted') == 1 && $form_state->get('lineError') == 1) {\n\t\t$form['t_download'] = [\n '#type' => 'submit',\n\t\t\t\t'#prefix' => \"<b>Invalid Lines:</b><br>\",\n '#value' => $this->t('Download'),\n '#submit' => array(\n '::downloadForm'\n )\n\t\t];\n\t\t\n\t\t$form['table'] = array(\n\t\t\t'#type' => 'table',\n\t\t\t'#header' => array(\n\t\t\t\tt('Line #'),\n\t\t\t\tt('p_issn'),\n\t\t\t\tt('e_issn'),\n\t\t\t\tt('l_issn'),\n\t\t\t\tt('title'),\n\t\t\t\tt('Reason(s)'),\n\t\t\t),\n\t\t);\n\t\t\n\t\t//Print the values of each row into the table\n\t\t$counter = 0;\n\t\tforeach($form_state->get('tabledata') as $row) {\n\t\t\t\n\t\t\t//Line number\n\t\t\t$form['table'][$counter]['Line #'] = array(\n\t\t\t\t'#type' => 'item',\n\t\t\t\t'#description' => $row[0],\n\t\t\t);\n\t\t\t\n\t\t\t//P-issn\n\t\t\t$form['table'][$counter]['p_issn'] = array(\n\t\t\t\t'#type' => 'item',\n\t\t\t\t'#description' => $row[1],\n\t\t\t);\n\t\t\t\n\t\t\t//E-issn\n\t\t\t$form['table'][$counter]['e_issn'] = array(\n\t\t\t\t'#type' => 'item',\n\t\t\t\t'#description' => $row[2],\n\t\t\t);\n\t\t\t\n\t\t\t//L-issn\n\t\t\t$form['table'][$counter]['l_issn'] = array(\n\t\t\t\t'#type' => 'item',\n\t\t\t\t'#description' => $row[3],\n\t\t\t);\n\t\t\t\n\t\t\t//Title\n\t\t\t$form['table'][$counter]['title'] = array(\n\t\t\t\t'#type' => 'item',\n\t\t\t\t'#description' => $row[4],\n\t\t\t);\n\t\t\t\n\t\t\t//Reason for line being declined\n\t\t\t$form['table'][$counter]['Reason(s)'] = array(\n\t\t\t\t'#type' => 'item',\n\t\t\t\t'#description' => $row[5],\n\t\t\t);\n\t\t\t\n\t\t\t$counter++;\n\t\t}\n\t}\n\telse { //Otherwise, print all the input elements\n\t\t\t\n\t\t//File upload element\n\t\t$form['file_upload'] = [\n\t\t\t'#type' => 'managed_file',\n\t\t\t'#title' => t('Upload a file into the database here:'),\n\t\t\t'#size' => 20,\n\t\t\t'#upload_location' => 'public://uploads/',\n\t\t\t'#upload_validators' => array('file_validate_extensions' => array('csv tsv')),\n\t\t\t'#required' => true,\n\t\t];\n\t\t\t\t\n\t\t//Submit button\n\t\t$form['submit'] = [\n\t\t\t'#type' => 'submit', //standard form button for submission\n\t\t\t'#value' => t('Submit'), //the text printed on the submit button\n\t\t];\n\t}\n\t\n return $form;\n }", "function makeHTMLForm($cmd,&$conf)\t{\n\t\t//$fields = array_intersect( array_unique(t3lib_div::trimExplode(\",\",$conf[$cmd.'.']['show_fields'],1)) , array_unique(t3lib_div::trimExplode(\",\",$conf[$cmd.'.']['fields'],1)));\n\t\t//$reqFields = array_intersect( array_unique(t3lib_div::trimExplode(\",\",$conf[$cmd.'.'][\"required\"],1)) , array_unique(t3lib_div::trimExplode(\",\",$conf[$cmd.'.']['show_fields'],1)));\n\t\t$fields = t3lib_div::trimExplode(\",\",$conf[$cmd.'.']['show_fields'],1);\n\t\t$reqFields = t3lib_div::trimExplode(\",\",$conf[$cmd.'.'][\"required\"],1);\n\t\t\n\t\t$out_array = array();\n\t\t$out_sheet = 0;\n\t\t$fsc=0;\n\t\t$fsi=0;\n\t\t$tabLabels=explode(chr(10),$conf[\"tabLabels\"]);\n\t\t\n\t\t// avoid JS conflict errors !!!\n\t\t$this->RTEcounter=0;\n\t\twhile(list(,$fN)=each($fields))\t{\n\t\t\t$parts = explode(';',$fN);\n\t\t\t$fN = $parts[0];\t \n\t\t\tif($fN=='--div--') {\n\t\t\t\tif($conf[\"divide2tabs\"]) {\n\t\t\t\t\t$out_sheet++;\n\t\t\t\t\t$out_array[$out_sheet] = array();\n\t\t\t\t\t$out_array[$out_sheet]['title'] = $this->metafeeditlib->getLL($parts[1]?$parts[1]:'Tab '.$out_sheet,$conf);\n\t\t\t\t\t//$out_array[$out_sheet]['title'] = $tabLabels[$out_sheet]?$tabLabels[$out_sheet]:'Tab '.$out_sheet;\n\t\t\t\t}\n\t\t\t } else {\n\t\t\t\tif($fN=='--fse--' && $fsc) {\n\t\t\t\t\t$out_array[$out_sheet][]='</fieldset></div>';\n\t\t\t\t\t$fsc--;\n\t\t\t\t }\n\t\t\t\tif($fN=='--fsb--') {\n\t\t\t\t\tif ($fsc) {\n\t\t\t\t\t\t$out_array[$out_sheet][]='</fieldset></div>';\n\t\t\t\t\t\t$fsc--;\n\t\t\t\t\t}\n\t\t\t \t\t$fsc++;\t\t\t\t\t\n\t\t\t \t\t$fsclib='';\n\t\t\t \t\tif ($conf['list.']['fieldSetNames.'][$fsi]) $fsclib='<legend>'.$conf['list.']['fieldSetNames.'][$fsi].'</legend>';\n\t\t\t\t\t$out_array[$out_sheet][]='<div class=\"'.$this->caller->pi_getClassName('form-row').'\"><fieldset>'.$fsclib;\n\t\t\t\t\t$fsi++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($fN=='--fse--' || $fN=='--fsb--') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$fieldCode = $this->getFormFieldCode($cmd,$conf,$fN,0,$cmd);\n\t\t\t\tif ($fieldCode)\t{\n\t\t\t\n\t\t\t\t // NOTE: There are two ways to make a field required. The new way is to include 'required' in evalValues for a field. The old one is to have the the field in the required list.\n\t\t\t\t //\t The new way take precedence over the old way. So if the new field has some evalValues, it makes no different if the field is in the required list or not.\n\t\t\t\t $feData=$conf['inputvar.']['fedata'];\n\t\t\t\t $msg = '';\n\t\t\t\t $reqMarker = '';\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t\t\t\t if($conf[$cmd.'.']['evalValues.'][$fN]) {\t\t// evalValues defined\n\t\t\t\t \t$reqMarker = in_array('required',t3lib_div::trimExplode(',',$conf[$cmd.'.']['evalValues.'][$fN])) ? $conf['required_marker'] : '';\n\t\t\t\t }\n\t\t\t\n\t\t\t\t if (in_array($fN,$reqFields)) {\t\t\t\t\t\t\t\t // No evalValues, but field listed in required list.\n\t\t\t\t\t\t$msg .= '<!--###SUB_REQUIRED_FIELD_'.$fN.'###--><div class=\"'.$this->caller->pi_getClassName('form-error-field').' '.$this->caller->pi_getClassName('form-required-message').'\">'.($conf['evalErrors.'][$fN.'.']['required']?$conf['evalErrors.'][$fN.'.']['required']:$this->metafeeditlib->getLL(\"required_message\",$conf)).'</div><!--###SUB_REQUIRED_FIELD_'.$fN.'###-->';\n\t\t\t\t\t\t//$msg .= '<!--###SUB_REQUIRED_FIELD_'.$fN.'###--><div'.$this->caller->pi_classParam('form-required-message').'>'.($conf['evalErrors.'][$fN.'.']['required']?$conf['evalErrors.'][$fN.'.']['required']:$this->metafeeditlib->getLL(\"required_message\",$conf)).'</div><!--###SUB_REQUIRED_FIELD_'.$fN.'###-->';\n\t\t\t\t\t\t$reqMarker = $conf['required_marker'];\n\t\t\t\t }\n\t\t\t\n\t\t\t\t $helpIcon = ($conf['show_help_icons'] ? '<div'.$this->caller->pi_classParam('form-help-icon').'>'.$this->helpIcon($fN).'</div>' : '');\n\t\t\t \t $tab=array();\n\t\t\t \t $res=$this->metafeeditlib->getForeignTableFromField($fN,$conf,'',$tab,__METHOD__);\n\t\t\t \t $table=$res['relTable'];\n\t\t\t\t $fNiD=$res['fNiD'];\n\t\t\t\t\t$masterTable=$cmd=='blog'?'tx_metafeedit_comments':$conf['table'];\n\t\t\t\t\t$evclasses='';\n\t\t\t\t\t$evals=t3lib_div::trimexplode(',',$conf['TCAN'][$masterTable]['columns'][$fN]['config']['eval']);\n\t\t\t\t\tforeach($evals as $ev) {\n\t\t\t\t\t\t$evclasses.=' '.$this->caller->pi_getClassName('form-data-'.$ev);\n\t\t\t\t\t}\n\t\t\t\t $label = $this->metafeeditlib->getLLFromLabel($conf['TCAN'][$table]['columns'][$fNiD]['label'],$conf);\n\t\t\t\t $out_array[$out_sheet][]='<div class=\"'.$this->caller->pi_getClassName($fsc?'fsc':'form-row').' '.$this->caller->pi_getClassName(($fsc?'fsc-':'form-row-').$fN).'\">\n\t\t\t\t\t<div class=\"'.$this->caller->pi_getClassName($fsc?'fsl':'form-label').' '.$this->caller->pi_getClassName(($fsc?'fsl-':'form-label-').$fN).'\">\n\t\t\t\t\t<div'.$this->caller->pi_classParam($fsc?'fsrm':'form-required-marker').'>'.$reqMarker.'</div>\n\t\t\t\t\t'.$label. '\n\t\t\t\t\t'.$helpIcon.'\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"###CSS_ERROR_FIELD_'.$fN.'###'.$this->caller->pi_getClassName($fsc?'fsf':'form-field').$evclasses.'\">'.$fieldCode.'</div>'.$msg.'</div>';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($out_sheet>0) {\t // There were --div-- dividers around. Create parts array for the tab menu:\n\t\t\t$parts = array();\n\t\t\tforeach($out_array as $idx => $sheetContent)\t{\n\t\t\t\tunset($sheetContent['title']);\n\t\t\t\t\t$parts[] = array(\n\t\t\t\t\t 'label' => $out_array[$idx]['title'],\n\t\t\t\t\t 'content' => '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>'.\n\t\t\t\t\t implode(chr(10),$sheetContent).\n\t\t\t\t\t '</td></tr></table>'\n\t\t\t\t );\n\t\t\t} \n\t\t\t$content = $this->addCallersPiVars($this->templateObj->getDynTabMenu($parts, 'TCEforms:'.$table.':'.$row[$conf['uidField']]),$conf);\n\t\t} else {\t\t\t// Only one, so just implode:\n\t\t\t$content = is_array($out_array[$out_sheet]) ? $this->addCallersPiVars(implode(chr(10),$out_array[$out_sheet]),$conf) : 'makeHTMLForm() :: No form generated! (Probably no fields defined in typoscript option show_fields)';\n\t\t}\n\t\t\n\t\treturn $content;\n\t}", "private function _render_file($field = array())\n\t{\n\t\t$output = '';\n\n\t\t$name = $this->_field_name($field['name']);\n\t\t$id = $this->_field_id($name);\n\n\t\t// Validation\n\t\t$validation = form_error($name);\n\n\t\t// Open wrapper\n\t\t$output .= $this->_wrapper_open($name, 'file');\n\n\t\t// Add validation error to the field\n\t\t$attr = $this->_field_validation_class($validation, (array)$field['attributes']);\n\n\t\t$fld = array(\n\t\t\t'name' => $name,\n\t\t\t'id' => $id,\n\t\t\t'value' => set_value($name, $field['value'])\n\t\t);\n\n\t\t$settings = array_merge($attr, $fld);\n\n\t\t// Build the label\n\t\t$output .= $this->_field_label($field['label'], $id, $field['rules'], $field['type']);\n\n\t\t// Validation error between\n\t\tif ( ! $this->_config['collective_errors'] AND $this->_config['field_error_location'] == 'between')\n\t\t{\n\t\t\t$output .= $validation;\n\t\t}\n\n\t\t// Build the field\n\t\t$output .= form_upload($settings);\n\n\t\t// Close wrapper\n\t\t$output .= $this->_wrapper_close($name);\n\n\t\treturn $output;\n\t}", "function ddcl_fin_plate_step14_form($form, &$form_state, $no_js_use = FALSE)\n{\n\tglobal $base_url;\n\tglobal $user;\n\tdrupal_set_title(t('d. Weld > iii. Minimum weld thickness'));\n\t$img_path = '';\n\t$markup_text = '\n\t<b> d. Weld </b> <br>\n\t&emsp; <b> iii. Minimum weld thickness</b> [Reference: Handbook on Structural Steel Detailing, INSDAG - Chapter 5, Section 5.2.3, Page 5.7] <br>\n\t\t\t\t<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\">\n\t\t\t\t <msub>\n\t\t\t\t\t<mi>t</mi>\n\t\t\t\t\t<mrow class=\"MJX-TeXAtom-ORD\">\n\t\t\t\t\t <mi>w</mi>\n\t\t\t\t\t <mi>e</mi>\n\t\t\t\t\t <mi>l</mi>\n\t\t\t\t\t <mi>d</mi>\n\t\t\t\t\t <mo>,</mo>\n\t\t\t\t\t <mi>m</mi>\n\t\t\t\t\t <mi>i</mi>\n\t\t\t\t\t <mi>n</mi>\n\t\t\t\t\t</mrow>\n\t\t\t\t </msub>\n\t\t\t\t <mo>=</mo>\n\t\t\t\t <mn>0.8</mn>\n\t\t\t\t <msub>\n\t\t\t\t\t<mi>t</mi>\n\t\t\t\t\t<mi>p</mi>\n\t\t\t\t </msub>\n\t\t\t\t</math>\n\t\t\t\t\n\t\t\t\t&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;\n\t\t\t\tWhere, <br>\n\t\t\t\t\t&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;\n\t\t\t\t\t<math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n\t\t\t\t\t\t<msub>\n\t\t\t\t\t\t\t<mi>t</mi>\n\t\t\t\t\t\t\t<mi>p</mi>\n\t\t\t\t\t\t</msub>\n\t\t\t\t\t</math> - thickness of plate \n\t\t\t\t\t<br>\n\t\n\t<hr>';\n\t// All the real form fields.\n\t$form = array();\n\t$form['step14_field1_fieldset'] = array(\n\t\t'#type' => 'fieldset',\n\t\t'#tree' => TRUE,\n\t\t'#prefix' => '<div id=\"step14-field1-fieldset-wrapper\">',\n\t\t'#suffix' => '</div>'\n\t);\n\t$query = db_select('ddcl_fin_plate_form_step14_feedback');\n\t$query->fields('ddcl_fin_plate_form_step14_feedback');\n\t$query->condition('uid', $user->uid);\n\t$form_step14_data = $query->execute();\n\tif ($form_step14_data)\n\t{\n\t\tif ($step14_data = $form_step14_data->fetchObject())\n\t\t{\n\t\t\t$form['step14_field1_fieldset']['step14_field1_question1'] = array(\n\t\t\t\t'#markup' => $markup_text\n\t\t\t);\n\t\t\t$form['step14_field1_fieldset']['step14_field1_question_ok'] = array(\n\t\t\t\t'#title' => '<strong>Is this ok/not ok</strong>',\n\t\t\t\t'#type' => 'radios',\n\t\t\t\t'#options' => array(\n\t\t\t\t\t'Ok' => 'Ok',\n\t\t\t\t\t'Not ok' => 'Not ok'\n\t\t\t\t),\n\t\t\t\t'#default_value' => $step14_data->question_ok_not_ok,\n\t\t\t\t'#required' => true\n\t\t\t);\n\t\t\t$form['step14_field1_fieldset']['step14_field1_question_not_ok_comment'] = array(\n\t\t\t\t//'#title' => 'If not, ple?',\n\t\t\t\t'#type' => 'textarea',\n\t\t\t\t'#default_value' => $step14_data->question_not_ok_comment,\n\t\t\t\t'#states' => array(\n\t\t\t\t\t'visible' => array(\n\t\t\t\t\t\t':input[name=\"step14_field1_fieldset\\\\[step14_field1_question_ok\\\\]\"]' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'value' => t('Not ok')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$earlier_comments = _fetch_exsiting_ddcl_fin_plate_comments($step14_data->id, $step14_data->data_relation);\n\t\t\t$icom = 1;\n\t\t\t$form['step14_field1_fieldset']['exsiting_comments_title'] = array(\n\t\t\t\t'#markup' => 'Earlier comment<br>'\n\t\t\t);\n\t\t\tforeach ($earlier_comments as $rowcomment)\n\t\t\t{\n\t\t\t\t$form['step14_field1_fieldset']['exsiting_comments' . $icom] = array(\n\t\t\t\t\t'#markup' => $rowcomment\n\t\t\t\t);\n\t\t\t\t$icom++;\n\t\t\t} //$earlier_comments as $rowcomment\n\t\t\tif (empty($form_state['step14_num_comment']))\n\t\t\t{\n\t\t\t\t$form_state['step14_num_comment'] = 1;\n\t\t\t} //empty($form_state['step14_num_comment'])\n\t\t\t$step14_temp1 = 0;\n\t\t\tfor ($step14_i = 0; $step14_i < $form_state['step14_num_comment']; $step14_i++)\n\t\t\t{\n\t\t\t\t$step14_temp1 = $step14_i;\n\t\t\t\t$form['step14_field1_fieldset'][$step14_i][\"comment\"] = array(\n\t\t\t\t\t\"#type\" => \"textarea\",\n\t\t\t\t\t\"#title\" => \"Comment \" . ($step14_temp1 + 1),\n\t\t\t\t\t\"#default_value\" => \"\"\n\t\t\t\t);\n\t\t\t} //$i = 0; $i < $form_state['step1_num_comment']; $i++\n\t\t\t$form['step14_field1_fieldset'][\"step14_comment_count\"] = array(\n\t\t\t\t\"#type\" => \"hidden\",\n\t\t\t\t\"#value\" => $step14_temp1\n\t\t\t);\n\t\t\t$form['step14_field1_fieldset']['add_comment'] = array(\n\t\t\t\t'#type' => 'submit',\n\t\t\t\t'#value' => t('Add more comment'),\n\t\t\t\t'#limit_validation_errors' => array(),\n\t\t\t\t'#submit' => array(\n\t\t\t\t\t'step14_comment_add_more_add_one'\n\t\t\t\t),\n\t\t\t\t'#ajax' => array(\n\t\t\t\t\t'callback' => 'step14_comment_add_more_callback',\n\t\t\t\t\t'wrapper' => 'step14-field1-fieldset-wrapper'\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($form_state['step14_num_comment'] > 1)\n\t\t\t{\n\t\t\t\t$form['step14_field1_fieldset']['remove_comment'] = array(\n\t\t\t\t\t'#type' => 'submit',\n\t\t\t\t\t'#value' => t('Remove comment'),\n\t\t\t\t\t'#limit_validation_errors' => array(),\n\t\t\t\t\t'#submit' => array(\n\t\t\t\t\t\t'step14_comment_add_more_remove_one'\n\t\t\t\t\t),\n\t\t\t\t\t'#ajax' => array(\n\t\t\t\t\t\t'callback' => 'step14_comment_add_more_callback',\n\t\t\t\t\t\t'wrapper' => 'step14-field1-fieldset-wrapper'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} //$form_state['step1_num_comment'] > 1\n\t\t\tif ($no_js_use)\n\t\t\t{\n\t\t\t\tif (!empty($form['step14_field1_fieldset']['remove_comment']['#ajax']))\n\t\t\t\t{\n\t\t\t\t\tunset($form['step14_field1_fieldset']['remove_comment']['#ajax']);\n\t\t\t\t} //!empty($form['step14_field1_fieldset']['remove_comment']['#ajax'])\n\t\t\t\tunset($form['step14_field1_fieldset']['add_comment']['#ajax']);\n\t\t\t} //$no_js_use\n\t\t\t$form[\"step1_page_id\"] = array(\n\t\t\t\t\"#type\" => \"hidden\",\n\t\t\t\t\"#value\" => \"step1\"\n\t\t\t);\n\t\t\t$form['previous1'] = array(\n\t\t\t\t'#type' => 'submit',\n\t\t\t\t'#value' => 'Previous',\n\t\t\t\t'#submit' => array(\n\t\t\t\t\t'ddcl_fin_plate_step14_form_previous_submit'\n\t\t\t\t)\n\t\t\t);\n\t\t\t$form['next2'] = array(\n\t\t\t\t'#type' => 'submit',\n\t\t\t\t'#value' => 'Save & Next',\n\t\t\t\t'#submit' => array(\n\t\t\t\t\t'ddcl_fin_plate_step14_form_next_submit'\n\t\t\t\t)\n\t\t\t);\n\t\t} //$step14_data = $form_step14_data->fetchObject()\n\t\telse\n\t\t{\n\t\t\t$form['step14_field1_fieldset']['step14_field1_question1'] = array(\n\t\t\t\t'#markup' => $markup_text\n\t\t\t);\n\t\t\t$form['step14_field1_fieldset']['step14_field1_question_ok'] = array(\n\t\t\t\t'#title' => '<strong>Is this ok/not ok</strong>',\n\t\t\t\t'#type' => 'radios',\n\t\t\t\t'#options' => array(\n\t\t\t\t\t'Ok' => 'Ok',\n\t\t\t\t\t'Not ok' => 'Not ok'\n\t\t\t\t),\n\t\t\t\t//'#default_value' => $step14_data->question_ok_not_ok,\n\t\t\t\t'#required' => true\n\t\t\t);\n\t\t\t$form['step14_field1_fieldset']['step14_field1_question_not_ok_comment'] = array(\n\t\t\t\t//'#title' => 'If not, ple?',\n\t\t\t\t'#type' => 'textarea',\n\t\t\t\t//'#default_value' => $step14_data->question_not_ok_comment,\n\t\t\t\t'#states' => array(\n\t\t\t\t\t'visible' => array(\n\t\t\t\t\t\t':input[name=\"step14_field1_fieldset\\\\[step14_field1_question_ok\\\\]\"]' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'value' => t('Not ok')\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\tif (empty($form_state['step14_num_comment']))\n\t\t\t{\n\t\t\t\t$form_state['step14_num_comment'] = 1;\n\t\t\t} //empty($form_state['step14_num_comment'])\n\t\t\t$step14_temp1 = 0;\n\t\t\tfor ($step14_i = 0; $step14_i < $form_state['step14_num_comment']; $step14_i++)\n\t\t\t{\n\t\t\t\t$step14_temp1 = $step14_i;\n\t\t\t\t$form['step14_field1_fieldset'][$step14_i][\"comment\"] = array(\n\t\t\t\t\t\"#type\" => \"textarea\",\n\t\t\t\t\t\"#title\" => \"Comment \" . ($step14_temp1 + 1),\n\t\t\t\t\t\"#default_value\" => \"\"\n\t\t\t\t);\n\t\t\t} //$i = 0; $i < $form_state['step1_num_comment']; $i++\n\t\t\t$form['step14_field1_fieldset'][\"step14_comment_count\"] = array(\n\t\t\t\t\"#type\" => \"hidden\",\n\t\t\t\t\"#value\" => $step14_temp1\n\t\t\t);\n\t\t\t$form['step14_field1_fieldset']['add_comment'] = array(\n\t\t\t\t'#type' => 'submit',\n\t\t\t\t'#value' => t('Add more comment'),\n\t\t\t\t'#limit_validation_errors' => array(),\n\t\t\t\t'#submit' => array(\n\t\t\t\t\t'step14_comment_add_more_add_one'\n\t\t\t\t),\n\t\t\t\t'#ajax' => array(\n\t\t\t\t\t'callback' => 'step14_comment_add_more_callback',\n\t\t\t\t\t'wrapper' => 'step14-field1-fieldset-wrapper'\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($form_state['step14_num_comment'] > 1)\n\t\t\t{\n\t\t\t\t$form['step14_field1_fieldset']['remove_comment'] = array(\n\t\t\t\t\t'#type' => 'submit',\n\t\t\t\t\t'#value' => t('Remove comment'),\n\t\t\t\t\t'#limit_validation_errors' => array(),\n\t\t\t\t\t'#submit' => array(\n\t\t\t\t\t\t'step14_comment_add_more_remove_one'\n\t\t\t\t\t),\n\t\t\t\t\t'#ajax' => array(\n\t\t\t\t\t\t'callback' => 'step14_comment_add_more_callback',\n\t\t\t\t\t\t'wrapper' => 'step14-field1-fieldset-wrapper'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} //$form_state['step1_num_comment'] > 1\n\t\t\tif ($no_js_use)\n\t\t\t{\n\t\t\t\tif (!empty($form['step14_field1_fieldset']['remove_comment']['#ajax']))\n\t\t\t\t{\n\t\t\t\t\tunset($form['step14_field1_fieldset']['remove_comment']['#ajax']);\n\t\t\t\t} //!empty($form['step14_field1_fieldset']['remove_comment']['#ajax'])\n\t\t\t\tunset($form['step14_field1_fieldset']['add_comment']['#ajax']);\n\t\t\t} //$no_js_use\n\t\t\t$form[\"step1_page_id\"] = array(\n\t\t\t\t\"#type\" => \"hidden\",\n\t\t\t\t\"#value\" => \"step1\"\n\t\t\t);\n\t\t\t$form['previous1'] = array(\n\t\t\t\t'#type' => 'submit',\n\t\t\t\t'#value' => 'Previous',\n\t\t\t\t'#submit' => array(\n\t\t\t\t\t'ddcl_fin_plate_step14_form_previous_submit'\n\t\t\t\t)\n\t\t\t);\n\t\t\t$form['next2'] = array(\n\t\t\t\t'#type' => 'submit',\n\t\t\t\t'#value' => 'Save & Next',\n\t\t\t\t'#submit' => array(\n\t\t\t\t\t'ddcl_fin_plate_step14_form_next_submit'\n\t\t\t\t)\n\t\t\t);\n\t\t} //$step14_data = $form_step14_data->fetchObject()\n\t} //$form_step14_data\n\treturn $form;\n}", "function input($name,$type,$value){\n echo \"<div class=\\\"fieldRow\\\">\", \\PHP_EOL;\n echo \"<input type=\\\"$type\\\" id=\\\"$name\\\" name=\\\"$name\\\" value=\\\"$value\\\" />\", \\PHP_EOL;\n echo \"</div>\", \\PHP_EOL;\n $this->fieldNames[] = $name;\n }", "function cyon_custom_form($atts, $content = null){\n\t$html = '<form action=\"\" method=\"post\" class=\"cyonform\">\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>Simple Fields</legend>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formtext\">Text</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\">\n\t\t\t\t\t\t\t<input type=\"text\" id=\"formtext\" name=\"formtext\" value=\"\" class=\"medium\" />\n\t\t\t\t\t\t\t<div class=\"description\">This is a description</div>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formemail\">Email</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\"><input type=\"email\" id=\"formemail\" name=\"formemail\" value=\"\" class=\"medium\" /></dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formphone\">Phone</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\"><input type=\"text\" id=\"formphone\" name=\"formphone\" value=\"\" class=\"medium\" /></dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formfile\">File</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\"><input type=\"file\" id=\"formfile\" name=\"formfile\" value=\"\" /></dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formerror\">Error <span class=\"required\">*</span></label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\"><input type=\"text\" id=\"formerror\" name=\"formerror\" class=\"medium error\" value=\"\" /></dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label>Multiple</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\"><input type=\"text\" name=\"multi1\" class=\"small\" value=\"\" placeholder=\"Field 1\" /> <input type=\"text\" name=\"multi2\" class=\"small\" value=\"\" placeholder=\"Field 2\" /> <input type=\"text\" name=\"multi3\" class=\"small\" value=\"\" placeholder=\"Field 3\" /></dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formselect\">Select</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\">\n\t\t\t\t\t\t\t<select name=\"formselect\" id=\"formselect\">\n\t\t\t\t\t\t\t\t<option value=\"\">- Please select -</option>\n\t\t\t\t\t\t\t\t<option>Option 1</option>\n\t\t\t\t\t\t\t\t<option>Option 2</option>\n\t\t\t\t\t\t\t\t<option>Option 3</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label>Checkboxes</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\">\n\t\t\t\t\t\t\t<ul class=\"selection\">\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"formcheckbox[]\" id=\"formcheck1\" /> <label for=\"formcheck1\">Checkbox 1</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"formcheckbox[]\" id=\"formcheck2\" /> <label for=\"formcheck2\">Checkbox 2</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"formcheckbox[]\" id=\"formcheck3\" /> <label for=\"formcheck3\">Checkbox 3</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label>Radio Buttons</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\">\n\t\t\t\t\t\t\t<ul class=\"selection\">\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"formradio[]\" id=\"formradio1\" /> <label for=\"formradio1\">Radio 1</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"formradio[]\" id=\"formradio2\" /> <label for=\"formradio2\">Radio 2</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"formradio[]\" id=\"formradio3\" /> <label for=\"formradio3\">Radio 3</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<dl class=\"field\">\n\t\t\t\t\t\t<dt class=\"label\"><label for=\"formtextarea\">Textarea</label></dt>\n\t\t\t\t\t\t<dd class=\"inputs\"><textarea id=\"formtextarea\" name=\"formtextarea\" rows=\"5\" class=\"large\"></textarea></dd>\n\t\t\t\t\t</dl>\n\t\t\t\t</fieldset>\n\t\t\t\t<p class=\"submit\"><button type=\"submit\" class=\"button\">'.__('Submit Form').'</submit></p>\n\t\t\t</form>';\n\treturn $html;\n}", "function display_addpdt_form()\n {\n echo <<<_END\n <div class=\"content_section\">\n\n <h2>Add a product: Step 1 of 2</h2>\n <p>Please fill out the form below to add the product. Note that all feilds are compulsory</p>\n <div class=\"contact_form\">\n <form action=\"admin.php\" method=\"POST\">\n <label>Name</label>\n <input type=\"text\" value=\"\" name=\"name\" size=\"50\"/>\n <label>Price</label>\n <input type=\"text\" value=\"\" name=\"price\" size=\"50\"/>\n <label>Description</label>\n <textarea name=\"desc\" rows=\"10\" cols=\"45\">\n </textarea>\n <div class=\"cleaner\"></div>\n <input type=\"submit\" value=\"Send\"/>\n </form>\n<div class=\"cleaner\"></div>\n </div>\n\n\n </div>\n_END;\n }", "function write_form($fields_to_write = null, $mode=WRITE_NORMAL)\n\t{\n\t\t$h = parent::write_form($fields_to_write, $mode);\n $applicationList = SHIN_Core::$_models['sys_structapplication_model']->getApplicationListForDD(null, null);\n \n $h[$this->table_name . '_idApplication_input'] = '<select id=\"sys_menurows_idApplication\" name=\"sys_menurows_idApplication\"><option value=\"\"></option>';\n foreach($applicationList as $key => $value) {\n if($this->idApplication == $key) {\n $h[$this->table_name . '_idApplication_input'] .= '<option value=\"' . $key . '\" selected=\"selected\">' . $value . '</option>'; \n } else {\n $h[$this->table_name . '_idApplication_input'] .= '<option value=\"' . $key . '\">' . $value . '</option>'; \n } \n }\n $h[$this->table_name . '_idApplication_input'].= '</select>';\n \n $h[$this->table_name . '_idMenu_input'] = SHIN_Core::$_models['sys_menu_model']->getMenuDDForVizualization($this->table_name, $this->idMenu);\n \n if(!$this->isDefinite()) {\n $h[$this->table_name . '_idPanel_input'] = '<select id=\"' . $this->table_name . '_idPanel\" name=\"' . $this->table_name . '_idPanel\"><option value=\"\"></option></select>';\n $h[$this->table_name . '_idGrp_input'] = '<select id=\"' . $this->table_name . '_idGrp\" name=\"' . $this->table_name . '_idGrp\"><option value=\"\"></option></select>';\n } else {\n $h[$this->table_name . '_idPanel_input'] = SHIN_Core::$_models['sys_menu_model']->getPanelDDForVizualization($this->table_name, $this->idPanel);\n \n $grpList = SHIN_Core::$_models['sys_menugrp_model']->getGrpListByIds($this->idMenu, $this->idPanel);\n $h[$this->table_name . '_idGrp_input'] = '<select id=\"' . $this->table_name . '_idGrp\" name=\"' . $this->table_name . '_idGrp\"><option value=\"\"></option>';\n foreach($grpList as $key => $value) {\n if($key == $this->idPanel) {\n $h[$this->table_name . '_idGrp_input'] .= '<option value=\"' . $key . '\" selected=\"selected\">' . $value . '</option>'; \n } else {\n $h[$this->table_name . '_idGrp_input'] .= '<option value=\"' . $key . '\">' . $value . '</option>'; \n }\n }\n $h[$this->table_name . '_idGrp_input'].= '</select>';\n }\n \n return $h;\n\t}", "public function renderUploadForm() {}", "function socialwiki_print_edit_form_default_fields($format, $upload = false, $deleteuploads = array()) {\n global $CFG, $PAGE, $OUTPUT;\n\n // Hidden values.\n echo '<input type=\"hidden\" name=\"sesskey\" value=\"' . sesskey() . '\" />';\n echo '<input type=\"hidden\" name=\"format\" value=\"' . $format . '\"/>';\n\n // Attachments.\n require_once($CFG->dirroot . '/lib/form/filemanager.php');\n\n $filemanager = new moodlequickform_filemanager('attachments', get_string('wikiattachments', 'socialwiki'),\n array('id' => 'attachments'), array('subdirs' => false, 'maxfiles' => 99, 'maxbytes' => $CFG->maxbytes));\n\n $value = file_get_submitted_draft_itemid('attachments');\n if (!empty($value) && !$upload) {\n $filemanager->setvalue($value);\n }\n\n echo '<fieldset class=\"socialwiki-upload-section clearfix\"><legend class=\"ftoggler\">'\n . get_string(\"uploadtitle\", 'socialwiki') . '</legend>';\n echo $OUTPUT->container_start('mdl-align socialwiki-form-center aaaaa');\n echo $filemanager->tohtml();\n echo $OUTPUT->container_end();\n\n $cm = $PAGE->cm;\n $context = context_module::instance($cm->id);\n\n echo $OUTPUT->container_start('mdl-align socialwiki-form-center socialwiki-upload-table');\n socialwiki_print_upload_table($context, 'socialwiki_upload', $value, $deleteuploads);\n echo $OUTPUT->container_end();\n echo \"</fieldset>\";\n\n $btnhtml = '<input class=\"socialwiki-button\" type=\"submit\" name=\"editoption\" value=\"';\n echo $btnhtml . get_string('save', 'socialwiki') . '\"/>';\n echo $btnhtml . get_string('upload', 'socialwiki') . '\"/>';\n echo $btnhtml . get_string('preview') . '\"/>';\n echo $btnhtml . get_string('cancel') . '\" />';\n}", "function print_form(){\n\t\t\n\t\t?>\n <form action=\"<?php echo $_SERVER['PHP_SELF']; ?>\" method=\"post\">\n\t<fieldset>\n \t<legend>Conact</legend>\n \t<label>Name: <input type=\"text\" name=\"name\" value=\"\" /></label>\n \n <br /><label>Email: <input type=\"text\" name=\"email\" value=\"\" /></label>\n \n <br /><label>Purpose:<br />\n \tWork: <input type=\"checkbox\" name=\"purpose\" value=\"work\" />\n General: <input type=\"checkbox\" name=\"purpose\" value=\"general\" checked=\"checked\" />\n </label>\n <br />\n <label>Comments:\n <br /><textarea name=\"comments\"></textarea>\n </label>\n </fieldset>\n <input type=\"submit\" name=\"process\" value=\"Submit\" /><input type=\"reset\" value=\"Reset\" />\n</form>\n <?php\t\n\t}", "protected function saveForms($type, $fields){\n $way = base_path('resources/views/vendor/request');\n if(!file_exists($way)){\n return File::makeDirectory($way, 577, true);\n }\n $filename = ''.$way.\"/\".$type['alias'].'.blade.php';\n $forms = config('webmagic.request.form');\n $file = fopen($filename, 'a');\n\n $type = str_replace('replacement', $type['alias'], $forms['form']);\n fwrite($file, $type);\n \n foreach($fields as $field){\n $name = str_replace('replacement', $field['name'], $forms['name_field']);\n fwrite($file, $name);\n $field = str_replace('replacement', $field['name'], $forms['field']);\n fwrite($file, $field);\n }\n\n fwrite($file, $forms['button']);\n fclose($file);\n\n return true;\n }", "function htaccess_form() {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<form id='mainform' method='post' action='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=acphtaccess_do'>\n<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />\n<div class='information-box'>\n\t<table cellpadding='0' cellspacing='0'>\n\t<tr>\n\t\t<td width='1%' valign='top'>\n \t\t\t<img src='{$this->ipsclass->skin_acp_url}/images/folder_components/security/id_card_ok.png' alt='information' />\n\t\t</td>\n\t\t<td width='100%' valig='top' style='padding-left:10px'>\n \t\t\t<h2 style='margin:0px'>Защита АЦ с помощью .htaccess</h2>\n\t\t\t <p style='margin:0px'>\n\t\t\t \t<br />\n\t\t\t \tInvision Power Board может создать файл «.htaccess», который защитит директорию админцентра.\n\t\t\t\t<br />\n\t\t\t\t<br />\n\t\t\t\t<strong>Помните</strong>\n\t\t\t\t<br />\n\t\t\t\tИспользуя этот инструмент, вы перезапишите любой имеющийся файл защиты в директории админцентра. После сохранения данных, вам будет предложено ввести указанные имя пользователя и пароль. Хотим заметить, что если вы переименуете директорию админцентра, вам так же будет необходимо удалить этот файл при помощи FTP-программы — в противном случае доступ в админцентр для вас будет заблокирован.\n\t\t\t\t<br />\n\t\t\t\t<br />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend><strong>Имя пользователя</strong></legend>\n\t\t\t\t\t<input type='text' name='name' size='40' value='{$_POST['name']}' />\n\t\t\t\t</fieldset>\n\t\t\t\t<br />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend><strong>Пароль</strong></legend>\n\t\t\t\t\t<input type='password' name='pass' size='40' value='{$_POST['pass']}' />\n\t\t\t\t</fieldset>\n\t\t\t\t<br />\n\t\t\t\t<input type='submit' value=' Создать файл ' />\n\t\t\t </p>\n\t\t</td>\n\t</tr>\n\t</table>\n</div>\n</form>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function FormGenerator($form_id)\n {\n global $mysql, $CMS_LANG;\n if (strtolower($form_id) == $_SESSION['REQUEST_PARAMS'][0] && $_SESSION['REQUEST_PARAMS'][1] == 'sendok') $text[] = '<p align=\"center\" style=\"color: #eee4c5;\">' . $CMS_LANG['REQUEST_SEND'] . '!</p>';\n if (strlen(FORM_ERROR) > 10) $text[] = '<p style=\"color: red;\">' . FORM_ERROR . '</p>';\n include_once(CMS_CLASSES . 'forms.class.php');\n $form = new GenForms();\n // смотрим активна ли она или что-то там еще\n $fdata = $mysql->sql(\"SELECT * FROM \" . PREFIX . \"forms WHERE name_id = '\" . $form_id . \"'\", 1);\n if ($fdata['ACTIVE'] != 1) return '';\n // получим список полей данной формы\n $elements = $form->GetElements($form_id);\n if ($form_id != 'Order' && $form_id != 'FeedBack') $text[] = '<div><b>' . $fdata['NAME'] . '</b></div><br/>';\n foreach ($elements as $r) {\n if ($r['TYPE'] != \"select\" && $r['TYPE'] != 'radio') {\n $addhtml = ' style=\"width: 100%;\"';\n if ($r['TYPE'] == 'email') $r['TYPE'] = 'text';\n if ($r['TYPE'] == 'textarea') $addhtml = ' rows=\"5\" cols=\"20\" style=\"width: 100%; height: 150px; background-image: none;\"';\n $le = array(\"name\" => $r['NAME'],\n \"value\" => '',\n \"type\" => $r['TYPE'],\n \"extrahtml\" => (!eregi('radio|checkbox', $r['TYPE']) ? 'class=\"field\"' . $addhtml : $addhtml));\n if ($r['MAIN'] == 1) {\n $le[\"minlength\"] = 1;\n $le[\"length_e\"] = $CMS_LANG['FILL_FIELD'];\n }\n $form->add($le);\n unset($le);\n } elseif ($r['TYPE'] == \"select\") {\n $options = $form->GetOptions(1, $r['GROUP_ID']);\n $form->add(array(\"name\" => $r['NAME'], \"type\" => $r['TYPE'], \"value\" => '', \"options\" => $options, \"extrahtml\" => 'class=\"field\" style=\"width: 100%;\"'));\n } elseif ($r['TYPE'] == \"radio\") {\n $options = $form->GetOptions(1, $r['GROUP_ID'], 'radio');\n $foo = 0;\n foreach ($options as $v) {\n $form->add(array(\"name\" => $r['NAME'] . '[]', \"type\" => $r['TYPE'], \"value\" => $v));\n $foo++;\n }\n }\n }\n $TmpUrl = $_REQUEST['url'];\n if (strpos($TmpUrl, '.')) $TmpUrl = substr($TmpUrl, 0, strpos($TmpUrl, '.'));\n $text[] = $form->get_start($form_id, \"post\", $_SERVER['CMS_ROOT_URL'] . SITELANG . '/' . $TmpUrl . '.html', \"\", $form_id);\n\n // генерим цифровой код\n include_once(CMS_CLASSES . 'anti.php');\n\n if ($form_id == 'FeedBack') {\n // теперь выводим все элементы формы\n $text[] = '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">';\n $text[] = '<tr><td width=\"50%\" style=\"padding-right: 5px;\"><table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" width=\"100%\">';\n foreach ($elements as $r) {\n if ($r['NAME'] == 'Message') $text[] = '</table></td><td style=\"padding-left: 5px;\"><table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" width=\"100%\">';\n if ($r['TYPE'] != 'radio') $text[] = '<tr><td valign=\"top\">' . $r['TEXT'] . ($r['MAIN'] == 1 ? '<font color=\"red\">*</font>' : '') . ':</td></tr>';\n $text[] = '<tr><td>';\n if ($r['TYPE'] == 'radio') {\n for ($t = 0; $t < $foo; $t++) {\n $text[] = $form->get($r['NAME'] . '[]') . ' ' . $options[$t] . '<br>';\n }\n } else {\n $text[] = $form->get($r['NAME']);\n }\n $text[] = '</td></tr>';\n }\n $anti = new AntiSpam();\n $code = base64_encode($anti->Rand(5));\n $text[] = '<tr><td>Введите число, указанное на картинке<font color=\"red\">*</font>:</td></tr>';\n $text[] = '<tr><td><img src=\"/as.php?code=' . $code . '\" alt=\"\" border=\"0\" style=\"float: left; margin-right: 10px;\"><input type=\"text\" name=\"FormCode\" value=\"\" class=\"field\" style=\"width: 93px;\" maxlength=\"5\"><input type=\"hidden\" name=\"FormOriCode\" value=\"' . $code . '\"></td></tr>';\n $text[] = '</table></td></tr><tr><td colspan=\"2\" align=\"center\" style=\"padding-top: 10px;\"><input type=\"hidden\" name=\"form_id\" value=\"' . $form_id . '\"><input type=\"submit\" name=\"SendForm\" value=\"' . $CMS_LANG['SUBMIT_BUTTON'] . '\" class=\"submit_main\" style=\"width: auto;\"></td></tr>';\n $text[] = '</table>';\n } else {\n // теперь выводим все элементы формы\n $text[] = '<table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" width=\"100%\">';\n foreach ($elements as $r) {\n if ($r['TYPE'] != 'radio') $text[] = '<tr><td valign=\"top\">' . $r['TEXT'] . ($r['MAIN'] == 1 ? '<font color=\"red\">*</font>' : '') . ':</td></tr>';\n $text[] = '<tr><td>';\n if ($r['TYPE'] == 'radio') {\n for ($t = 0; $t < $foo; $t++) {\n $text[] = $form->get($r['NAME'] . '[]') . ' ' . $options[$t] . '<br>';\n }\n } else {\n $text[] = $form->get($r['NAME']);\n }\n $text[] = '</td></tr>';\n }\n $anti = new AntiSpam();\n $code = base64_encode($anti->Rand(5));\n $text[] = '<tr><td>' . $CMS_LANG['CAPTCHA'] . '<font color=\"red\">*</font>:</td></tr>';\n $text[] = '<tr><td><img src=\"/as.php?code=' . $code . '\" alt=\"\" border=\"0\" style=\"float: left; margin-right: 10px;\"><input type=\"text\" name=\"FormCode\" value=\"\" class=\"field\" style=\"width: 93px;\" maxlength=\"5\"><input type=\"hidden\" name=\"FormOriCode\" value=\"' . $code . '\"></td></tr>';\n $text[] = '<tr><td align=\"center\"><input type=\"hidden\" name=\"form_id\" value=\"' . $form_id . '\"><input type=\"submit\" name=\"SendForm\" value=\"' . $CMS_LANG['SUBMIT_BUTTON'] . '\" class=\"submit_main\" style=\"width: auto;\"></td></tr>';\n $text[] = '</table>';\n }\n\n $text[] = $form->get_finish('', $after);\n return implode(\"\\r\\n\", $text);\n }", "public function generateForm()\n\t{\n\t\t//$this->params->getPostedValues( $postArray );\n\t\t$this->updateFormParams();\n\t\t$params = $this->getFormParams();\n\t\t\n\t\t$html = \"\n\t <br />\n\t <H4>Processing Run Parameters</H4>\n\t <hr />\";\n\t\t\n\t\t$html.= $params->insertStackedTextField( \"runname\", 20 );\n\t\t$html.= \"<br/>\\n\";\n\t\t$html.= $params->insertStackedTextField( \"outdir\", 56 );\n\t\t$html.= \"<br/>\\n\";\n\t\t$html.= $params->insertTextArea( \"description\");\n\t\t\t\n\t\t$html.= \"<br/>\\n\";\n\n\t\treturn $html;\n\t}", "function add_my_field( $form ) {\n $description = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1001', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Activity Category',\n 'pageNumber' => 1, // Ensure this is correct \n ) );\n \n // Create a Single Line text field for the title\n $title = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1002', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Activity Details',\n 'pageNumber' => 1, // Ensure this is correct\n ) );\n \n\n $year = GF_Fields::create( array(\n 'type' => 'number',\n 'id' => '1003', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Year',\n 'pageNumber' => 1, // Ensure this is correct \n ) );\n\n//*************************** START conditional additions for presentation\n $presentation_title = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1004', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Title of Presentation',\n 'pageNumber' => 1, // Ensure this is correct \n ) );\n\n $presentation_host = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1005', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Presentation Host',\n 'pageNumber' => 1, // Ensure this is correct \n ) );\n\n $presentation_location = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1006', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Location of Presentation',\n 'pageNumber' => 1, // Ensure this is correct \n ) );\n\n //visitor hosting\n $hosting_source = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1007', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Visitor University or Organization name',\n 'pageNumber' => 1, // Ensure this is correct \n ) );\n\n $hosting_activity = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1008', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Activity performed e.g. lecture, assessment, research interview',\n 'pageNumber' => 1, // Ensure this is correct \n\n ) );\n //*************************** END conditional additions\n\n //*************************** START conditional additions for Impact\n //create a checkbox for impact\n \n $impact = GF_Fields::create( array(\n 'type' => 'checkbox',\n 'id' => '1009', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Does this activity have or potentially have societal impact?',\n 'pageNumber' => 1, // Ensure this is correct \n 'choices' => [ array(\n 'text' => 'Yes',\n 'value' => 'yes',\n 'isSelected' => false,\n 'price' => ''\n )\n ],\n 'inputs' => [\n array(\n 'id' => '1009.1',\n 'label' => 'Yes',\n 'name' => ''\n )\n ],\n ) );\n \n $impact_type = GF_Fields::create( array(\n 'type' => 'checkbox',\n 'id' => '1010', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => '',\n 'pageNumber' => 1, // Ensure this is correct \n 'choices' => [\n array(\n \"text\" => \"Use of intellectual contribution in education\",\n \"value\" => \"Use of intellectual contribution in education\",\n 'isSelected' => false,\n ),\n array(\n \"text\" => \"Use of intellectual contribution in organizations\",\n \"value\" => \"Use of intellectual contribution in organizations\",\n 'isSelected' => false,\n ),\n array(\n \"text\" => \"Use of intellectual contribution in research\",\n \"value\" => \"Use of intellectual contribution in research\",\n 'isSelected' => false,\n ),\n array(\n \"text\" => \"Use of intellectual contribution in society\",\n \"value\" => \"Use of intellectual contribution in society\",\n 'isSelected' => false,\n ),\n \n ],\n 'inputs' => [\n array(\n \"id\" => \"1010.1\",\n \"value\" => \"Use of intellectual contribution in education\",\n \"name\" => '',\n ),\n array(\n \"id\" => \"1010.2\",\n \"value\" => \"Use of intellectual contribution in organizations\",\n \"name\" => '',\n ),\n array(\n \"id\" => \"1010.3\",\n \"value\" => \"Use of intellectual contribution in research\",\n \"name\" => '',\n ),\n array(\n \"id\" => \"1010.4\",\n \"value\" => \"Use of intellectual contribution in society\",\n \"name\" => '',\n ), \n \n\n ],\n ) );\n\n//*************************** END conditional additions for Impact\n\n\n//*************************** START conditional additions for external collab\n //create a checkbox for external org\n //DONT FORGET TO ADD TO FORM CONSTRUCTION AND CHANGE INITIAL VARIABLE NAME \n $external = GF_Fields::create( array(\n 'type' => 'checkbox',\n 'id' => '1011', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Has an external organization contributed to your course? ',\n 'pageNumber' => 1, // Ensure this is correct \n 'choices' => [ array(\n 'text' => 'Yes',\n 'value' => 'yes',\n 'isSelected' => false,\n 'price' => ''\n )\n ],\n 'inputs' => [\n array(\n 'id' => '1011.1',\n 'label' => 'Yes',\n 'name' => ''\n )\n ],\n) );\n\n$course_info = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1012', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Course Code and Title',\n 'pageNumber' => 1, // Ensure this is correct \n) );\n\n$term = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1013', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Term and Year',\n 'pageNumber' => 1, // Ensure this is correct \n) );\n\n$collab = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1014', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Organization Name',\n 'cssClass' => 'REID',\n 'pageNumber' => 1, // Ensure this is correct \n) );\n\n$location = GF_Fields::create( array(\n 'type' => 'text',\n 'id' => '1015', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Location of organization (city, country)',\n 'pageNumber' => 1, // Ensure this is correct \n) );\n\n\n$collab_choices = array(\n array(\n 'text' => 'Guest lecture',\n 'value' => 'Guest Lecture',\n 'isSelected' => false,\n 'price' => '' //only populated if a product, product option, shipping field\n ),\n array(\n 'text' => 'Assess course',\n 'value' => 'Assess course',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Traineeship',\n 'value' => 'Traineeship',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Mentor',\n 'value' => 'Mentor',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Co-produce teaching materials (cases, texts, tools)',\n 'value' => 'Co-produce teaching materials (cases, texts, tools)',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Study visit',\n 'value' => 'Study visit',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Thesis work',\n 'value' => 'Thesis work',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Networks (academic or professional)',\n 'value' => 'Networks',\n 'isSelected' => false,\n 'price' => ''\n ),\n array(\n 'text' => 'Other',\n 'value' => 'Other',\n 'isSelected' => false,\n 'price' => ''\n ),\n );\n\n\n$collab_type = GF_Fields::create( array(\n 'type' => 'select',\n 'id' => '1016', // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'required' => true,\n 'label' => 'Type of collaboration',\n 'choices' => $collab_choices,\n 'pageNumber' => 1, // Ensure this is correct\n) );\n\n // Create a repeater for the team members and add the name and email fields as the fields to display inside the repeater.\n $evidence = GF_Fields::create( array(\n 'type' => 'repeater',\n //'description' => 'No max',\n 'id' => 1000, // The Field ID must be unique on the form\n 'formId' => $form['id'],\n 'label' => 'Academic/Professional/Scholarly Activities',\n 'addButtonText' => 'Add another activity', // Optional\n 'removeButtonText' => 'Remove activity', // Optional\n //'maxItems' => 3, // Optional\n 'pageNumber' => 1, // Ensure this is correct\n 'fields' => array( $description, \n $title, \n $year, \n $presentation_title, \n $presentation_host, \n $presentation_location, \n $hosting_source, \n $hosting_activity, \n $impact, \n $impact_type, \n $external,\n $course_info,\n $term,\n $collab,\n $location,\n $collab_type,\n ), // Add the fields here. ***DON'T FORGET!!!!\n ) );\n \n //$form['fields'][] = $evidence;\n array_splice( $form['fields'], 2, 0, array( $evidence ) );\n return $form;\n}", "public function form()\n {\n $this->number('file_size', 'Файл предельного размера загрузки')->help('От 0 до не ограничивают размер блока:kb')->rules('required');\n $this->tags('file_ext', 'Разрешить расширение файла загрузки')->help('Другие суффиксы, разделенные запятыми, не заполняют ограничения типа')->rules('required');\n $this->number('image_size', 'Picture предельного размера загружаемых')->help('От 0 до не ограничивают размер блока:kb')->rules('required');\n $this->tags('image_ext', 'Разрешить загружать фотографии суффикс')->help('Другие суффиксы, разделенные запятыми, не заполняют ограничения типа')->rules('required');\n $this->number('thumbnail_size', 'размер миниатюр');\n }", "function system_descriptions_new_desc_form_submit($form, &$form_state){\n\t\t\t$name = $form_state['values']['file_name_html'];\n\t\t\t$user = $form_state['values']['user_name'];\n\t\t\t$section = $form_state['values']['section_name'];\n\t\t\t$folder = $form_state['values']['folder_name'];\n\t\t\t$prob = $form_state['values']['problem_name'];\n\t\t\t$content = $form_state['values']['editor_info'];\n\t\t\t$path = (time()*1000).$name.\".html\";\n\t\t\t$type = \"cketext\";\n\t\t\t$save_file = true;\n\t\t\t$q_res = $query=db_insert('system_descriptions')\n\t\t\t\t->fields(array(\n\t\t\t\t\t'sd_name' => ''.$name,\n\t\t\t\t\t'sd_folder' => ''.$folder,\n\t\t\t\t\t'sd_uname' => ''.$user,\n\t\t\t\t\t'sd_pname' => ''.$prob,\n\t\t\t\t\t'sd_section' => ''.$section,\n\t\t\t\t\t'sd_path' => ''.$path,\n\t\t\t\t\t'sd_type' => ''.$type\n\t\t\t\t))->execute();\n\t\t\tif($save_file){\n\n\t\t\t\t$file = drupal_get_path('module', 'system_descriptions').'/uploads/'.$path;\n\t\t\t\tglobal $no_cache_tag;\n\t\t\t\t$content = $no_cache_tag.$content;\n\t\t\t\tfile_put_contents($file, $content, FILE_APPEND | LOCK_EX);\n\t\t\t\techo \"file save success!\";\n\t\t\t}\n\t\t\t\n\t\t\t$form_state['redirect'] = array(\n\t\t\t\t'sysdescs',\n\t\t\t\tarray(\n\t\t\t\t\t'query' => array(\n\t\t\t\t\t\t'msg' => 'added',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\t\n}", "function input_field($errors, $name, $label, $type) {\n\techo '<div class=\"required_field\">';\n\tlabel($name, $label);\n\t$value = posted_value($name);\n\techo \"<input type=\\\"$type\\\" id=\\\"$name\\\" name=\\\"$name\\\" value=\\\"$value\\\"/>\"; \n\terrorLabel($errors, $name);\n\techo '</div>';\n}", "function createForm(){\n\t\t$this->content = '<form enctype=\"multipart/form-data\" action=\"'.htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')).'\" method=\"post\" name=\"surveyform\" onsubmit=\"checkSurvey(); return false;\">'.$this->content.'</form>';\n\t}", "public function generateAdditionalFormRight()\n\t{\n\t\t$this->updateFormParams();\n\t\t$params = $this->getFormParams();\n\t\t\n\t\t$fieldSize = 5;\n\t\t\n\t\t$html .= \"\n\t <br />\n\t <H4>Limiting numbers</H4>\n\t <hr />\";\n\t\t\n\t\t$html.= $params->insertTextField( \"clip\", $fieldSize, \"(pixels)\", 'appion.clipdiam' );\n\t\t$html.= $params->insertTextField( \"bin\", $fieldSize, '', 'appion.partbin' );\n\t\t$html.= $params->insertTextField( \"numpart\", $fieldSize );\n\t\t\t\t\n\t\t$html .= \"\n\t <br />\n\t <H4>Filters</H4>\n\t <hr />\";\n\n\t\t$html.= $params->insertTextField( \"lp\", $fieldSize, \"(&Aring;ngstroms)\",'appion.lpstackval' );\n\t\t$html.= $params->insertTextField( \"hp\", $fieldSize, \"(&Aring;ngstroms)\", 'appion.hpstackval' );\n\n\t\t$html .= \"\n\t <br />\n\t <H4>ISAC Parameters</H4>\n\t <hr />\";\n\n\t\t$html.= $params->insertTextField( \"generations\", $fieldSize, '', 'isac.generations' );\n\t\t$html.= $params->insertTextField( \"thld_grp\", $fieldSize, '', 'isac.thld_grp' );\n\t\t$html.= $params->insertTextField( \"img_per_grp\", $fieldSize, '', 'isac.img_per_grp' );\n\t\t$html.= $params->insertTextField( \"stab_ali\", $fieldSize, '', 'isac.stab_ali' );\n\t\t$html.= $params->insertTextField( \"ir\", $fieldSize, '', 'isac.ir' );\n\t\t$html.= $params->insertTextField( \"ou\", $fieldSize, '', 'isac.ou' );\n\t\t\n\t\t$html .= \"\n\t <br />\n\t <H4>Advanced ISAC Parameters</H4>\n\t <hr />\";\n\t\t\n\t\t$html.= $params->insertTextField( \"rs\", $fieldSize, '', 'isac.rs' );\n\t\t$html.= $params->insertTextField( \"ts\", $fieldSize, '', 'isac.ts' );\n\t\t$html.= $params->insertTextField( \"xr\", $fieldSize, '', 'isac.xr' );\n\t\t$html.= $params->insertTextField( \"yr\", $fieldSize, '', 'isac.yr' );\n\t\t$html.= $params->insertTextField( \"maxit\", $fieldSize, '', 'isac.maxit' );\n\t\t$html.= $params->insertTextField( \"FL\", $fieldSize, '', 'isac.FL' );\n\t\t$html.= $params->insertTextField( \"FH\", $fieldSize, '', 'isac.FH' );\n\t\t$html.= $params->insertTextField( \"FF\", $fieldSize, '', 'isac.FF' );\n\t\t$html.= $params->insertTextField( \"init_iter\", $fieldSize, '', 'isac.init_iter' );\n\t\t$html.= $params->insertTextField( \"main_iter\", $fieldSize, '', 'isac.main_iter' );\n\t\t$html.= $params->insertTextField( \"iter_reali\", $fieldSize, '', 'isac.iter_reali' );\n\t\t$html.= $params->insertTextField( \"match_first\", $fieldSize, '', 'isac.match_first' );\n\t\t$html.= $params->insertTextField( \"max_round\", $fieldSize, '', 'isac.max_round' );\n\t\t$html.= $params->insertTextField( \"match_second\", $fieldSize, '', 'isac.match_second' );\n\t\t$html.= $params->insertTextField( \"indep_run\", $fieldSize, '', 'isac.indep_run' );\n\t\t$html.= $params->insertTextField( \"thld_err\", $fieldSize, '', 'isac.thld_err' );\n\t\t\n\t\t// When loading this page the first time, use the switchDefaults javascript function to set \n\t\t// form parameters based on the currently selected stack.\n\t\tif (!$_POST['process']) {\n\t\t\t// TODO: this checkbox is being set to on after switching to off and then reloading page...\n\t\t\tif ( $params->getParamValue( \"use_align_stack\" ) == \"on\" ) {\n\t\t\t\t$html.= \"<script>document.viewerform.stack.disabled=true;switchDefaults(document.viewerform.alignstack.options[document.viewerform.alignstack.selectedIndex].value);</script>\\n\";\n\t\t\t} else {\n\t\t\t\t$html.= \"<script>document.viewerform.alignstack.disabled=true;switchDefaults(document.viewerform.stack.options[document.viewerform.stack.selectedIndex].value);</script>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "private function addFieldsOnWebform() {\n $this->drupalLogin($this->rootUser);\n $this->drupalGet(Url::fromRoute('entity.webform.civicrm', [\n 'webform' => $this->webform->id(),\n ]));\n $this->enableCivicrmOnWebform();\n\n $this->getSession()->getPage()->clickLink('Activities');\n $this->getSession()->getPage()->selectFieldOption('activity_number_of_activity', 1);\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->htmlOutput();\n $this->getSession()->getPage()->selectFieldOption('Activity Type', '- User Select -');\n $this->assertSession()->assertWaitOnAjaxRequest();\n\n $this->saveCiviCRMSettings();\n $this->assertSession()->pageTextContains('Added 4 fields to the form');\n $this->assertSession()->pageTextContains('Saved CiviCRM settings');\n }", "function addCommentForm($htmlFileName, $orderId, $orderIdShort, $clientId, $phone)\n{\n // Get file data.\n $htmlFileData = file_get_contents($htmlFileName);\n $htmlFileData = str_replace(\"<!-- UNPAID\", \"\", $htmlFileData);\n $htmlFileData = str_replace(\"-->\", \"\", $htmlFileData);\n // Replace fake variables with real values.\n $htmlFileData = str_replace(\"{phone}\", $phone, $htmlFileData);\n $htmlFileData = str_replace(\"{orderId}\", $orderId, $htmlFileData);\n $htmlFileData = str_replace(\"{orderIdShort}\", $orderIdShort, $htmlFileData);\n $htmlFileData = str_replace(\"{clientId}\", $clientId, $htmlFileData);\n return ($htmlFileData);\n}", "function addFormField(&$formField, $label = \"\", $pageId = \"\", $errormsg = false) {\n $this->formFields[] =& $formField;\n $this->formFieldLabels[$formField->getId()] = $label;\n $this->formFieldPageIds[$formField->getId()] = $pageId;\n if ($errormsg) {\n $this->formFieldErrors[$formField->getId()] = new Error($errormsg);\n }\n }", "public function form($form_array, $form_name, $type='form', $option_count=null, $request_from=null){\r\n \t\t\r\n \t\t//print $form_name.\"<br><br>\";\r\n \t\t//print_r($form_array);print \"<br><br>\";\r\n \t\t\r\n \t\tif (empty($form_array))\r\n \t\t\tif (empty($form_id) || !is_numeric($form_id))\r\n\t \t\tsetErrMsg($this->file_name.\" Line : \".__LINE__.\" <br /> Method: \".__METHOD__.\" <br /> Msg: from array if empty\");\r\n \t\t\r\n \t\tglobal $smarty;\r\n \t\t$smarty->assign('checked','');\r\n \t\t\r\n \t\t$data_class = new DataClass();\r\n \t\t\t\r\n \t\tif ($type != 'recursive')\r\n \t\t\t$html = \"\";\r\n \t\t\t\r\n \t\tforeach ($form_array as $key=>$val){\r\n \t\t\t\r\n \t\t\t$form_field = $form_array[$key];\r\n \t\t\t\r\n \t\t\tswitch ($form_field['type']){\r\n \t\t\t\t\r\n \t\t\t\tcase 'text':\r\n \t\t\t\t\t\t$html .= '<tr';\r\n \t\t\t\t\t\tif ($form_field['divClass'])\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['divClass'].'\" ';\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['divId']){\r\n \t\t\t\t\t\t\tif ($form_field['divId'] == 'other_size_id' || $form_field['divId'] == 'other_maxlength_id'){\r\n \t\t\t\t\t\t\t\t$html .= ' id=\"'.$key.'\" ';\r\n \t\t\t\t\t\t\t}else {\r\n \t\t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['divId'].'\" ';\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t$html .= '>'.\"\\n\".'<th width=\"200\" scope=\"row\"';\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n \t\t\t\t\t\t$html .= '>'.$form_field['label'];\r\n \t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\";\r\n \t\t\t\t\t\t$html .= '<td><input type=\"'.$form_field['type'].'\" name=\"pd['.$key.']\" value=\"';\r\n \t\t\t\t\t\tif ($form_field['value'] && $type == 'form'){\r\n \t\t\t\t\t\t\tswitch ($form_field['value']){\r\n \t\t\t\t\t\t\t\tcase 'date':\r\n \t\t\t\t\t\t\t\t\t$date = $data_class->dateValue();\r\n \t\t\t\t\t\t\t\t\t$html .= $date;\r\n \t\t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\t\tdefault:\r\n \t\t\t\t\t\t\t\t\t$html .= $form_field['value'];\r\n \t\t\t\t\t\t\t\tbreak;\t\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$html .='{$pd.'.$key.'}';\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t$html .='\" size=\"'.$form_field['size'].'\" class=\"'.$form_field['class'].'\"'; \r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['id'])\r\n \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['id'].'\"';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .=' maxlength=\"'.$form_field['maxlength'].'\" /> ';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 例の表示\r\n \t\t\t\t\t\tif ($form_field['exemple'])\r\n \t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 補足説明の表示\r\n \t\t\t\t\t\tif ($form_field['description'])\r\n \t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .='</td>'.\"\\n\".'</tr>'.\"\\n\\n\";\r\n \t\t\t\t\tbreak;\r\n\r\n \t\t\t\tcase 'textarea':\r\n \t\t\t\t\t\t$html .= '<tr';\r\n \t\t\t\t\t\tif ($form_field['divClass'])\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['divClass'].'\" ';\r\n \t\t\t\t\t\tif ($form_field['divId'])\r\n \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['divId'].'\" ';\r\n \t\t\t\t\t\t$html .= '>'.\"\\n\".'<th width=\"200\" scope=\"row\"';\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n \t\t\t\t\t\t$html .= '>'.$form_field['label'];\r\n \t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\";\r\n \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td><textarea name=\"pd['.$key.']\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($form_field['id'])\r\n \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['id'].'\" ';\r\n\t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['class'])\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['class'].'\" ';\r\n \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .='rows=\"'.$form_field['rows'].'\" cols=\"'.$form_field['cols'].'\" />{$pd.'.$key.'}</textarea>';\r\n\t\t\t\t\t\t\r\n \t\t\t\t\t\t// 例の表示\r\n\t\t\t\t\t\tif ($form_field['exemple'])\r\n \t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 補足説明の表示\r\n \t\t\t\t\t\tif ($form_field['description'])\r\n \t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n \t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>'.\"\\n\".'</tr>'.\"\\n\\n\";\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'select':\r\n \t\t\t\t\t\t$list = array();\r\n \t\t\t\t\t\tif ($form_field['options']){\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\tif (is_array($form_field['options']))\r\n \t\t\t\t\t\t\t\t$list = $form_field['options'];\r\n \t\t\t\t\t\t\telse if (is_string($form_field['options']))\r\n \t\t\t\t\t\t\t\t$list = explode('::', $form_field['options']);\r\n\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\tarray_unshift($list, 0);\r\n \t\t\t\t\t\t\tunset($list[0]);\r\n \t\t\t\t\t\t\t$form_field['data'] = $key.'_options';\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t}elseif ($form_field['data']){\r\n \t\t\t\t\t\t\t$list = $data_class->$form_field['data']();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t$smarty->assign($form_field['data'],$list);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$selected = array();\r\n \t\t\t\t\t\tif ($form_field['selected'] && $type != 'conf'){\r\n \t\t\t\t\t\t\t$selected = $form_field['selected'];\r\n \t\t\t\t\t\t\t$smarty->assign('selected_'.$key,$selected);\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif (empty($form_field['selected_name'])){\r\n \t\t\t\t\t\t\t$form_field['selected_name'] = '選択してください';\r\n \t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\t$html .= '<tr';\r\n \t\t\t\t\t\tif ($form_field['divClass'])\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['divClass'].'\" ';\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['divId'])\r\n \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['divId'].'\" ';\r\n \t\t\t\t\t\t$html .= '>'.\"\\n\".'<th width=\"200\" scope=\"row\"';\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n \t\t\t\t\t\t$html .= '>'.$form_field['label'];\r\n \t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\".'<td>\r\n\t\t\t\t\t\t\t\t<select name=\"pd['.$key.']';\r\n\t\t\t\t\t\t\t\tif ($form_field['other'])\r\n \t\t\t\t\t\t\t\t\t$html .= '[]';\r\n\t\t\t\t\t\t\t\t$html .= '\" ';\r\n\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tif ($form_field['id'])\r\n \t\t\t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['id'].'\"';\r\n \t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t$html .=' class=\"'.$form_field['class'].'\">\r\n\t\t\t\t\t\t\t\t \t<option value=\"\">'.$form_field['selected_name'].'</option>\r\n\t\t\t\t\t\t\t\t {foreach key=id item=val from=$'.$form_field['data'].'}\r\n\t\t\t\t\t\t\t\t \t<option ';\r\n\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t\tif ($form_field['opt_val']=='value')\r\n\t\t\t\t\t\t\t\t\t\t$html .= 'value=\"{$val}\" {if $pd.'.$key.' == $val} selected {/if}';\r\n\t\t\t\t\t\t\t\t \telse\r\n\t\t\t\t\t\t\t\t\t\t$html .= 'value=\"{$id}\" {if $pd.'.$key.' == $id} selected {/if}';\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$html .= 'value=\"{$id}\" {if $selected_'.$key.' == $id} selected {/if}';\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \t$html .= ' >{$val}</option>\r\n\t\t\t\t\t\t\t\t {/foreach}\r\n\t\t\t\t\t\t\t\t</select>';\r\n\t\t\t\t\t\t\t\t \t\r\n \t\t\t\t\t\t// 例の表示\r\n\t\t\t\t\t\tif ($form_field['exemple'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 補足説明の表示\r\n \t\t\t\t\t\tif ($form_field['description'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['other']){\r\n \t\t\t\t\t\t\t$expl = explode('::', $form_field['other']);\r\n \t\t\t\t\t\t\t$size = $expl[0] != \"\" ? $expl[0] : 60;\r\n \t\t\t\t\t\t\t$maxlength = $expl[1] !=\"\" ? $expl[1] : 50;\r\n \t\t\t\t\t\t\t$html .= '<br />{$pd.'.$key.'.other}<input type=\"text\" name=\"pd.'.$key.'.other\" value=\"{$pd.'.$key.'.other}\" size=\"'.$size.'\" class=\"wFull\" maxlength=\"'.$maxlength.'\" />';\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>'.\"\\n\".'</tr>';\r\n \t\t\t\t\tbreak;\r\n\r\n \t\t\t\t\tcase 'radio':\r\n \t\t\t\t\t\t$list = array();\r\n \t\t\t\t\t\tif ($form_field['options']){\r\n\r\n \t\t\t\t\t\t\tif (is_array($form_field['options']))\r\n \t\t\t\t\t\t\t\t$list = $form_field['options'];\r\n \t\t\t\t\t\t\telse if (is_string($form_field['options']))\r\n \t\t\t\t\t\t\t\t$list = explode('::', $form_field['options']);\r\n \t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tarray_unshift($list, 0); \r\n\t\t\t\t\t\t\tunset($list[0]);\r\n\t\t\t\t\t\t\t$form_field['data'] = $key.'_options';\r\n \t\t\t\t\t\t}elseif ($form_field['data']){\r\n \t\t\t\t\t\t\t$list = $data_class->$form_field['data']();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t$smarty->assign($form_field['data'],$list);\r\n\r\n \t\t\t\t\t\t$checked = \"\";\r\n \t\t\t\t\t\tif ($form_field['checked'] && $type != 'conf'){\r\n \t\t\t\t\t\t\t$checked = $form_field['checked'];\r\n \t\t\t\t\t\t\t$smarty->assign('checked_'.$key,$checked);\t\r\n \t\t\t\t\t\t}\r\n\r\n\r\n \t\t\t\t\t\t$html .= '<tr';\r\n \t\t\t\t\t\tif ($form_field['divClass']){\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['divClass'].'\" ';\r\n \t\t\t\t\t\t\tif ($form_field['divClass'] == 'other_div_class'){\r\n \t\t\t\t\t\t\t\t$html .= ' id=\"'.$key.'\" ';\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif ($request_from == 'yes_no_ajax'){\r\n \t\t\t\t\t\t\t\t$html .= ' onClick=\"getOtherDivId(this.id)\" ' ;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif ($form_field['divId'] && $form_field['divClass'] != 'other_div_class'){\r\n \t\t\t\t\t\t\tif ($form_field['divId'] == 'other_check_id'){\r\n \t\t\t\t\t\t\t\t$html .= 'id=\"'.$key.'\" ';\r\n \t\t\t\t\t\t\t}else {\r\n \t\t\t\t\t\t\t\t$html .= 'id=\"'.$form_field['divId'].'\" ';\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t$html .= '>'.\"\\n\".'<th width=\"200\" scope=\"row\"';\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n \t\t\t\t\t\t$html .= '>'.$form_field['label'];\r\n \t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\".'<td>'.\"\\n\";\r\n\t\t\t\t\t\t\t\t$html .= '<ul class=\"inlineList\">';\r\n\t\t\t\t\t\t\t\t$html .= '{foreach from=$'.$form_field['data'].' key=id item=val }';\r\n\t\t\t\t\t\t\t\t$html .= '<li><label class=\"radio\"><input type=\"radio\"';\r\n\t\t\t\t\t\t\t\tif ($form_field['id'])\r\n \t\t\t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['id'].'\"';\r\n \t\t\t\t\t\t\t\t$html .= ' name=\"pd['.$key.']';\r\n \t\t\t\t\t\t\t\tif ($form_field['other'])\r\n \t\t\t\t\t\t\t\t\t$html .= '[]';\r\n \t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t$html .= '\" value=\"{$id}\"{if $pd.'.$key.'}';\r\n \t\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tif ($form_field['other']){\r\n \t\t\t\t\t\t\t\t\t$html .= '\" {if $id==$pd.'.$key.'.0';\r\n \t\t\t\t\t\t\t\t}else {\r\n \t\t\t\t\t\t\t\t\t$html .= '{if $id==$pd.'.$key.'}checked{/if}{else}{if $id==$checked_'.$key;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\t$html .='} checked {/if}{/if}/>{$val}</label></li>'.\"\\n\";\r\n \t\t\t\t\t\t\t\t$html .= '{/foreach}</ul>';\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t// 例の表示\r\n \t\t\t\t\t\tif ($form_field['exemple'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 補足説明の表示\r\n \t\t\t\t\t\tif ($form_field['description'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['other']){\r\n \t\t\t\t\t\t\t$expl = explode('::', $form_field['other']);\r\n \t\t\t\t\t\t\t$size = $expl[0] != \"\" ? $expl[0] : 60;\r\n \t\t\t\t\t\t\t$maxlength = $expl[1] !=\"\" ? $expl[1] : 50;\r\n \t\t\t\t\t\t\t$html .= '<input type=\"text\" name=\"pd['.$key.'][other]\" value=\"{$pd.'.$key.'.1}\" size=\"'.$size.'\" class=\"wFull\" maxlength=\"'.$maxlength.'\" />';\r\n \t\t\t\t\t\t}\r\n\t\t\t\t\t\t$html .= '</td>'.\"\\n\".'</tr>'.\"\\n\";\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t\tcase 'checkbox':\r\n \t\t\t\t\t\t$list = array();\r\n \t\t\t\t\t\tif ($form_field['options']){\r\n \t\t\t\t\t\t\tif (is_array($form_field['options']))\r\n \t\t\t\t\t\t\t\t$list = $form_field['options'];\r\n \t\t\t\t\t\t\telse if (is_string($form_field['options']))\r\n \t\t\t\t\t\t\t\t$list = explode('::', $form_field['options']);\r\n \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tarray_unshift($list, 0); \r\n\t\t\t\t\t\t\tunset($list[0]);\r\n\t\t\t\t\t\t\t$form_field['data'] = $key.'_options';\r\n \t\t\t\t\t\t}elseif ($form_field['data']){\r\n \t\t\t\t\t\t\t$list = $data_class->$form_field['data']();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t$smarty->assign($form_field['data'],$list);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['checked'] && $type != 'conf'){\r\n \t\t\t\t\t\t\t$check_list = explode('::', $form_field['checked']);\r\n \t\t\t\t\t\t\t$smarty->assign('checked',$check_list);\t\r\n \t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\t$html .= '<tr';\r\n \t\t\t\t\t\tif ($form_field['divClass'])\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['divClass'].'\" ';\r\n \t\t\t\t\t\tif ($form_field['divId'])\r\n \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['divId'].'\" ';\r\n \t\t\t\t\t\t$html .= '>'.\"\\n\".'<th width=\"200\" scope=\"row\"';\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n \t\t\t\t\t\t$html .= '>'.$form_field['label'];\r\n \t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\".'<td>';\r\n\t\t\t\t\t\t\t\t$html .= '{foreach from=$'.$form_field['data'].' key=id item=val }';\r\n\t\t\t\t\t\t\t\t$html .= '<input type=\"checkbox\"';\r\n\t\t\t\t\t\t\t\tif ($form_field['id'])\r\n \t\t\t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['id'].'\"';\r\n\t\t\t\t\t\t\t\t$html .=' name=\"pd['.$key.'][]\" value=\"{$id}\" {if $id==$pd.'.$key.'} checked ';\r\n\t\t \t\t\t\t\t\t$html .= ' {elseif $checked} {if in_array($id , $checked)} checked {/if} ';\r\n\t\t \t\t\t\t\t\t$html .= ' {elseif $pd.'.$key.'} {if in_array($id , $pd.'.$key.')} checked {/if} {/if}'; \r\n\t\t \t\t\t\t\t\t$html .= ' /> {$val}'.\"\\n\";\r\n\t\t\t\t\t\t\t\t$html .= '{/foreach}';\r\n\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t// 例の表示\r\n \t\t\t\t\t\tif ($form_field['exemple'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 補足説明の表示\r\n \t\t\t\t\t\tif ($form_field['description'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['other']){\r\n \t\t\t\t\t\t\t$expl = explode('::', $form_field['other']);\r\n \t\t\t\t\t\t\t$size = $expl[0] != \"\" ? $expl[0] : 60;\r\n \t\t\t\t\t\t\t$maxlength = $expl[1] !=\"\" ? $expl[1] : 50;\r\n \t\t\t\t\t\t\t$html .= '<input type=\"text\" name=\"pd['.$key.'][other]\" value=\"{$pd.'.$key.'.other}\" size=\"'.$size.'\" class=\"wFull\" maxlength=\"'.$maxlength.'\" />';\r\n \t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$html .= '</td>'.\"\\n\".'</tr>';\r\n \t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'options':\r\n \t\t\t\t\t\t$html .= '<tr>'.\"\\n\".'<th>'.$form_field['label'];\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\";\r\n \t\t\t\t\t\t$html .= '<td>'.\"\\n\";\r\n\r\n \t\t\t\t\t\tif ($form_field['divClass'] || $form_field['divId'])\r\n \t\t\t\t\t\t\t$html .= '<div';\r\n \t\t\t\t\t\tif ($form_field['divClass'])\r\n \t\t\t\t\t\t\t$html .= ' class=\"'.$form_field['divClass'].'\" ';\r\n\r\n \t\t\t\t\t\tif (preg_match('/^ynradio/', $form_name)){\r\n \t\t\t\t\t\t\tif ($form_field['divId'])\r\n\t \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['divId'].'_'.$option_count.'\" ';\r\n \t\t\t\t\t\t}\r\n\r\n \t\t\t\t\t\tif ($form_field['divClass'] || $form_field['divId'])\r\n \t\t\t\t\t\t\t$html .= '>'.\"\\n\";\r\n\r\n \t\t\t\t\t\tif (preg_match('/^ynradio/', $form_name)){\r\n\t\t \t\t\t\t\t\t$html .= '{foreach from=$pd.'.$key.' key=id item=val}';\r\n\t\t\t \t\t\t\t\t$html .= '<div class=\"option{$id+1}_'.$form_field['for'].'_'.$option_count.'\" id=\"option{$id+1}_'.$form_field['for'].'_'.$option_count.'_id\" >';\r\n\t\t\t \t\t\t\t\t$html .= '<input type=\"text\" name=\"pd['.$form_field['for'].'_'.$option_count.'_options][]\" value=\"{$val|htmlspecialchars}\" size=\"60\" class=\"wFull\" id=\"option{$id+1}_id\" maxlength=\"50\" />';\r\n\t\t\t \t\t\t\t\t$html .= '</div>'.\"\\n\";\r\n\t\t \t\t\t\t\t\t$html .= '{/foreach}';\r\n\t\t \t\t\t\t\t\t$html .= '</div>'.\"\\n\";\r\n\r\n\t\t\t\t\t\t\t\t$html .='<div id=\"add_remove_'.$form_field['for'].'_'.$option_count.'\">';\r\n\t\t\t\t\t\t\t\t$html .='<input type=\"button\" name=\"'.$form_field['for'].'_'.$option_count.'\" value=\" + \" id=\\'addButton_'.$option_count.'\\' onClick=\"optionAdd(\\'addButton_'.$option_count.'_{($pd.'.$key.'|count)+1}:\\');\" />';\r\n\t\t\t\t\t\t\t\t$html .='<input type=\"button\" name=\"'.$form_field['for'].'_'.$option_count.'\" value=\" - \" id=\\'removeButton_'.$option_count.'\\' onclick=\"optionRemove(\\'removeButton_'.$option_count.'_{($pd.'.$key.'|count)}:\\')\" />';\r\n\t \t\t\t\t\t\t$html .= '</div>'.\"\\n\";\r\n \t\t\t\t\t\t}else {\r\n \t\t\t\t\t\t\t$html .= '<div';\r\n\t \t\t\t\t\t\t\tif ($form_field['divId'])\r\n\t \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['divId'].'\" ';\r\n \t\t\t\t\t\t\t$html .= '>';\r\n \t\t\t\t\t\t\t$html .= '{foreach from=$pd.'.$key.' key=id item=val}';\r\n\t\t \t\t\t\t\t$html .= '<div class=\"option{$id+1}_'.$form_field['for'].'\" id=\"option{$id+1}_'.$form_field['for'].'_id\" >';\r\n\t\t\t\t\t\t\t$html .= '<input type=\"text\" name=\"pd[options][]\" value=\"{$val|htmlspecialchars}\" size=\"60\" class=\"wFull\" id=\"option{$id+1}_id\" maxlength=\"50\" />';\r\n\t\t\t\t\t\t\t$html .= '</div>'.\"\\n\";\r\n\t \t\t\t\t\t\t$html .= '{/foreach}';\r\n\t \t\t\t\t\t\t$html .= '</div>';\r\n\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$html .='<input type=\"button\" name=\"'.$form_field['for'].'\" value=\" + \" id=\\'addButton\\' />';\r\n\t\t\t\t\t\t\t$html .='<input type=\"button\" name=\"'.$form_field['for'].'\" value=\" - \" id=\\'removeButton\\'/>';\r\n\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<br />';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 例の表示\r\n \t\t\t\t\t\tif ($form_field['exemple'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t// 補足説明の表示\r\n \t\t\t\t\t\tif ($form_field['description'])\r\n \t\t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= \"\\n\".'</td>'.\"\\n\".'</tr>'.\"\\n\\n\";\r\n \t\t\t\t\t\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'ajax_zip':\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$pref_list = $data_class->prefecture();\r\n \t\t\t\t\t\t$smarty->assign('pref_list',$pref_list);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '\r\n \t\t\t\t\t\t<tr><th width=\"200\" scope=\"row\">郵便番号 <span class=\"require\">※</span></th>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"pd[post_code1]\" value=\"{$pd.post_code1}\" id=\"pd[post_code1]\" size=\"3\" maxlength=\"3\" class=\"w100\" />-\r\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"pd[post_code2]\" value=\"{$pd.post_code2}\" id=\"pd[post_code2]\" size=\"4\" maxlength=\"4\" class=\"w100\"\r\n\t\t\t\t\t\t\t\t onKeyUp=\"AjaxZip2.zip2addr(\\'pd[post_code1]\\',\\'pd[pref_id]\\',\\'pd[city_name]\\',\\'pd[post_code2]\\',null,\\'pd[area1]\\');\" />\r\n\t\t\t\t\t\t\t</td></tr>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th width=\"200\" scope=\"row\">都道府県 <span class=\"require\">※</span></th>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t<select name=\"pd[pref_id]\" id=\"pd[pref_id]\" class=\"dropdown\">\r\n\t\t\t\t\t\t\t\t <option value=\"\">選択してください</option>\r\n\t\t\t\t\t\t\t\t {foreach from=$pref_list key=id item=val }\r\n\t\t\t\t\t\t\t\t \t<option value=\"{$id}\" {if $pd.pref_id == $id } selected {/if}>{$val}</option>\r\n\t\t\t\t\t\t\t\t {/foreach}\r\n\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th width=\"200\" scope=\"row\">市区町村 <span class=\"require\">※</span></th>\r\n\t\t\t\t\t\t\t<td><input type=\"text\" name=\"pd[city_name]\" id=\"pd[city_name]\" value=\"{$pd.city_name}\" size=\"10\" readonly class=\"wFull\"></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th width=\"200\" scope=\"row\">番地 <span class=\"require\">※</span></th>\r\n\t\t\t\t\t\t\t<td><input type=\"text\" name=\"pd[area1]\" id=\"pd[area1]\" value=\"{$pd.area1}\" size=\"50\" class=\"wFull\" /></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<th width=\"200\" scope=\"row\">建物名</th>\r\n\t\t\t\t\t\t\t<td><input type=\"text\" name=\"pd[area2]\" value=\"{$pd.area2}\" size=\"50\" class=\"wFull\" /></td>\r\n\t\t\t\t\t\t\t</tr>';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'privacy':\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .='\r\n \t\t\t\t\t\t<div class=\"confirmBox01\">';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['pp_detail_ex'])\r\n \t\t\t\t\t\t\t$html .= $form_field['pp_detail_ex'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '<br /><br />\r\n \t\t\t\t\t\t';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['url_txt'] && $form_field['url'])\r\n \t\t\t\t\t\t\t$html .= '<p><a href=\"'.$form_field['url'].'\" class=\"file\">'.$form_field['url_txt'].'</a> <span class=\"red fontS\">※</span></p>';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['pp_detail'])\r\n \t\t\t\t\t\t\t$html .= '<p>'.$form_field['pp_detail'].'</p>';\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '</div>';\r\n \t\t\t\t\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'name':\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '<tr>';\r\n \t\t\t\t\t\t$html .= '<th width=\"200\" scope=\"row\"';\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n \t\t\t\t\t\t$html .= '>';\r\n \t\t\t\t\t\t$html .= '<div>'.$form_field['field_labels1'].'</div></th>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<span class=\"w2em\">'.$form_field['field_labels3'].'</span><span class=\"radiusBox\"><input name=\"pd[name]\" type=\"text\" class=\"w130 txtTypeMust\" id=\"entry_name_1\" value=\"\" onBlur=\"changeValue(this.id);\" /></span>\r\n\t\t\t\t\t\t\t<span class=\"w2em\">'.$form_field['field_labels4'].'</span><span class=\"radiusBox\"><input name=\"pd[name2]\" type=\"text\" class=\"w130 txtTypeMust\" id=\"entry_name_2\" value=\"\" onBlur=\"changeValue(this.id);\" /></span>\r\n\t\t\t\t\t\t\t<span class=\"blue\">全角</span><br />';\r\n\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\tif ($form_field['exemple'] || $form_field['description']){\r\n\t \t\t\t\t\t\t\t$html .= '\r\n\t\t\t\t\t\t\t\t<span class=\"quote\">';\r\n\t\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t// 例の表示\r\n\t \t\t\t\t\t\t\tif ($form_field['exemple'])\r\n\t \t\t\t\t\t\t\t\t$html .='<br />'.$form_field['exemple'];\r\n\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t// 補足説明の表示\r\n\t \t\t\t\t\t\t\tif ($form_field['description'])\r\n\t \t\t\t\t\t\t\t\t$html .='<br />'.$form_field['description'];\r\n\t \t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$html .= '</span>';\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$html .= '\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\r\n\t\t\t\t\t\t\t<tr>';\r\n\t \t\t\t\t\t\t$html .= '<th width=\"200\" scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>';\r\n\t \t\t\t\t\t\t$html .= '<div>'.$form_field['field_labels2'].'</div></th>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<span class=\"w2em\">'.$form_field['field_labels5'].'</span><span class=\"radiusBox\"><input name=\"pd[kana]\" type=\"text\" class=\"w130 txtTypeMust\" id=\"entry_kana_name_1\" value=\"\" onBlur=\"changeValue(this.id);\" /></span>\r\n\t\t\t\t\t\t\t<span class=\"w2em\">'.$form_field['field_labels6'].'</span><span class=\"radiusBox\"><input name=\"pd[kana2]\" type=\"text\" class=\"w130 txtTypeMust\" id=\"entry_kana_name_2\" value=\"\" onBlur=\"changeValue(this.id);\" /></span>\r\n\t\t\t\t\t\t\t<span class=\"blue\">全角カナ</span>\r\n\t\t\t\t\t\t\t';\r\n \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($form_field['exemple1'] || $form_field['description1']){\r\n\t \t\t\t\t\t\t\t$html .= '\r\n\t\t\t\t\t\t\t\t<span class=\"quote\">';\r\n\t\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t// 例の表示\r\n\t \t\t\t\t\t\t\tif ($form_field['exemple1'])\r\n\t \t\t\t\t\t\t\t\t$html .='<br />'.$form_field['exemple1'];\r\n\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t// 補足説明の表示\r\n\t \t\t\t\t\t\t\tif ($form_field['description1'])\r\n\t \t\t\t\t\t\t\t\t$html .='<br />'.$form_field['description1'];\r\n\t \t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$html .= '</span>';\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$html .= '\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>';\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'address':\r\n \t\t\t\t\t\r\n \t\t\t\t\t\t$pref_list = $data_class->prefecture();\r\n \t\t\t\t\t\t$smarty->assign('pref_list',$pref_list);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '\r\n \t\t\t\t\t\t\t<tr>\r\n \t\t\t\t\t\t\t<th width=\"200\" scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>';\r\n \t\t\t\t\t\t$html .= $form_field['field_labels1'].'</th>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"pd[post_code1]\" value=\"{$pd.post_code1}\" id=\"pd[post_code1]\" size=\"3\" maxlength=\"3\" class=\"w100\" />-\r\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"pd[post_code2]\" value=\"{$pd.post_code2}\" id=\"pd[post_code2]\" size=\"4\" maxlength=\"4\" class=\"w100\"\r\n\t\t\t\t\t\t\t\t onKeyUp=\"AjaxZip2.zip2addr(\\'pd[post_code1]\\',\\'pd[pref_id]\\',\\'pd[city_name]\\',\\'pd[post_code2]\\',null,\\'pd[area1]\\');\" />\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<tr>';\r\n\t \t\t\t\t\t\t$html .= '<th width=\"200\" scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>'.$form_field['field_labels2'].'</th>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t<select name=\"pd[pref_id]\" id=\"pd[pref_id]\" class=\"dropdown\">\r\n\t\t\t\t\t\t\t\t <option value=\"\">選択してください</option>\r\n\t\t\t\t\t\t\t\t {foreach from=$pref_list key=id item=val }\r\n\t\t\t\t\t\t\t\t \t<option value=\"{$id}\" {if $pd.pref_id == $id } selected {/if}>{$val}</option>\r\n\t\t\t\t\t\t\t\t {/foreach}\r\n\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<tr>';\r\n\t \t\t\t\t\t\t$html .= '<th width=\"200\" scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>'.$form_field['field_labels3'].'</th>\r\n\t\t\t\t\t\t\t<td><input type=\"text\" name=\"pd[city_name]\" id=\"pd[city_name]\" value=\"{$pd.city_name}\" size=\"60\" class=\"wFull\"></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<tr>';\r\n\t \t\t\t\t\t\t$html .= '<th width=\"200\" scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>'.$form_field['field_labels4'].'</th>\r\n\t\t\t\t\t\t\t<td><input type=\"text\" name=\"pd[area1]\" id=\"pd[area1]\" value=\"{$pd.area1}\" size=\"50\" class=\"wFull\" /></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t';\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'mail':\r\n \t\t\t\t\t\t$html .= '<tr>\r\n\t\t\t\t\t\t<th scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '><div>'.$form_field['field_labels1'].'</div></th>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<div class=\"mb10\"><span class=\"radiusBox\"><input name=\"pd[mailaddr]\" type=\"text\" class=\"w370 txtTypeMust\" id=\"pd_mailaddr\" value=\"\" onBlur=\"changeValue(this.id);\" /></span></div>\r\n\t\t\t\t\t\t<div class=\"mb10\">確認のため、もう一度ご入力ください。</div>\r\n\t\t\t\t\t\t<div><span class=\"radiusBox\"><input name=\"pd[mail_confirm]\" type=\"text\" class=\"w370 txtTypeMust\" id=\"pd_mail_confirm\" value=\"\" onBlur=\"changeValue(this.id);\" /></span></div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>';\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'birthday':\r\n \t\t\t\t\t\t$year_type = $data_class->yearType();\r\n \t\t\t\t\t\t$smarty->assign('year_type',$year_type);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '<tr>\r\n\t\t\t\t\t\t<th scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>'.$form_field['label'].'</th>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<div class=\"clearfix\">\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListBirth\">\r\n\t\t\t\t\t\t<dt><span class=\"wpfNbox\"><select name=\"pd[year_type]\" id=\"pd_year_type\" class=\"dropdown\">\r\n\t\t\t\t\t\t\t<option value=\"\">選択してください</option>\r\n\t\t\t\t\t\t\t{foreach from=$year_type key=id item=val }\r\n\t\t\t\t\t\t\t\t<option value=\"{$id}\" {if $pd.year_type == $id } selected {/if}>{$val}</option>\r\n\t\t\t\t\t\t\t{/foreach}\r\n\t\t\t\t\t\t</select></span></dt>\r\n\t\t\t\t\t\t<dd></dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListBirth\">\r\n\t\t\t\t\t\t<dt><span class=\"wpfRbox\"><input name=\"pd[birth_year]\" type=\"text\" size=\"4\" maxlength=\"4\" class=\"w100\" id=\"pd_birth_year\" value=\"{$pd.birth_year}\" onBlur=\"RemoveErrroClass(this.id);\" /></span><span class=\"wpfWide1em\">'.$form_field['field_labels1'].'</span></dt>\r\n\t\t\t\t\t\t<dd><div class=\"wpfSpace\">例:53</div></dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListBirth\">\r\n\t\t\t\t\t\t<dt><span class=\"wpfRbox\"><input name=\"pd[birth_month]\" type=\"text\" size=\"4\" maxlength=\"2\" class=\"w100\" id=\"pd_birth_month\" value=\"{$pd.birth_month}\" onBlur=\"RemoveErrroClass(this.id);\" /></span><span class=\"wpfWide1em\">'.$form_field['field_labels2'].'</span></dt>\r\n\t\t\t\t\t\t<dd><div class=\"wpfSpace\">例:12</div></dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListBirth\">\r\n\t\t\t\t\t\t<dt><span class=\"wpfRbox\"><input name=\"pd[birth_day]\" type=\"text\" size=\"4\" maxlength=\"2\" class=\"w100\" id=\"pd_birth_day\" value=\"{$pd.birth_day}\" onBlur=\"RemoveErrroClass(this.id);\" /></span><span class=\"wpfWide1em\">'.$form_field['field_labels3'].'</span></dt>\r\n\t\t\t\t\t\t<dd><div class=\"wpfSpace\">例:25</div></dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>';\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n \t\t\t\tcase 'tel':\r\n \t\t\t\t\t\t$html .= '<tr>\r\n\t\t\t\t\t\t<th scope=\"row\"';\r\n\t \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n\t \t\t\t\t\t\t\t$html .= ' class=\"wpfMustBox\"';\r\n\t \t\t\t\t\t\t$html .= '>'.$form_field['label'].'</th>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<div class=\"clearfix\">\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListTel\">\r\n\t\t\t\t\t\t<dt><span class=\"radiusBox\"><input name=\"pd[tel]\" type=\"text\" maxlength=\"4\" class=\"w100\" id=\"pd_tel\" value=\"\" onBlur=\"changeValue(this.id);\" /></span> −</dt>\r\n\t\t\t\t\t\t<dd>';\r\n \t\t\t\t\t\t\tif (!empty($form_field['exemple']))\r\n\t\t\t\t\t\t\t\t$html .= '例:'.$form_field['exemple'];\r\n\t\t\t\t\t\t$html .= '</dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListTel\">\r\n\t\t\t\t\t\t<dt><span class=\"radiusBox\"><input name=\"pd[tel2]\" type=\"text\" maxlength=\"4\" class=\"w100\" id=\"pd_tel_2\" value=\"\" onBlur=\"changeValue(this.id);\" /></span> −</dt>\r\n\t\t\t\t\t\t<dd>';\r\n \t\t\t\t\t\t\tif (!empty($form_field['exemple1']))\r\n\t\t\t\t\t\t\t\t$html .= '例:'.$form_field['exemple1'];\r\n\t\t\t\t\t\t$html .= '</dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t<dl class=\"wpfInlineListTel\">\r\n\t\t\t\t\t\t<dt><span class=\"radiusBox\"><input name=\"pd[tel3]\" type=\"text\" maxlength=\"4\" class=\"w100\" id=\"pd_tel_3\" value=\"\" onBlur=\"changeValue(this.id);\" /></span></dt>\r\n\t\t\t\t\t\t<dd>';\r\n \t\t\t\t\t\t\tif (!empty($form_field['exemple2']))\r\n\t\t\t\t\t\t\t\t$html .= '例:'.$form_field['exemple2'];\r\n\t\t\t\t\t\t$html .= '</dd>\r\n\t\t\t\t\t\t</dl>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>';\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t\t\r\n\r\n \t\t\t\tcase 'ynSelect':\r\n \t\t\t\t\t\t$list = $data_class->$form_field['data']();\r\n \t\t\t\t\t\t$smarty->assign($form_field['data'],$list);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '</table>'.\"\\n\".'<div id=\"add_yn_field_html\"></div>'.\"\\n\".'<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"wpfTblAdm\"><tr>'.\"\\n\".\r\n \t\t\t\t\t\t'<th width=\"200\" scope=\"row\">'.$form_field['label'].'</th>'.\"\\n\".\r\n \t\t\t\t\t\t'<td>'.\"\\n\".\r\n\t\t\t\t\t\t'<select name=\"pd['.$key.']\" id=\"ynSelect\" class=\"dropdown\">'.\"\\n\".\r\n\t\t\t\t\t\t\t'<option value=\"\">選択してください</option>'.\"\\n\".\r\n\t\t\t\t\t\t\t'{foreach from=$'.$form_field['data'].' key=id item=val }\r\n\t\t\t\t\t\t\t\t<option value=\"{$id|make_id}\" {if $pd.'.$key.' == $id } selected {/if}>{$val}</option>\r\n\t\t\t\t\t\t\t{/foreach}'.\"\\n\".\r\n\t\t\t\t\t\t'</select>'.\"\\n\".\r\n\t\t\t\t\t\t'<input type=\"button\" name=\"yn_field_add\" id=\"add_yn_field\" value=\"追加\">'.\"\\n\".\r\n\t\t\t\t\t\t'</td>'.\"\\n\".\r\n\t\t\t\t\t\t'</tr>'.\"\\n\";\r\n \t\t\t\t\tbreak;\r\n\r\n \t\t\t\tcase 'file':\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '<tr><th width=\"200\" scope=\"row\" >'.$form_field['label'];\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tif ($form_field['required'] == 1)\r\n \t\t\t\t\t\t\t$html .= '<span class=\"red\">※</span>';\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t$html .= '</th>'.\"\\n\".'<td>';\r\n\t\t\t\t\t\t$html .= '<input type=\"file\" name=\"'.$key.'\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($form_field['id'])\r\n \t\t\t\t\t\t\t$html .= ' id=\"'.$form_field['id'].'\"';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .=' />\r\n\t\t\t\t\t\t\t{if $pd.'.$key.'}\r\n\t\t\t\t \t\t\t\t<img src=\"'.$GLOBALS['gl_wpcms_Info']['wpcms_path'].'/wpform/file/imageDisplay/module/{$module}/image_name/{$pd.'.$key.'}\" >\r\n\t\t\t\t \t\t\t\t<input type=\"hidden\" name=\"pd['.$key.']\" value=\"{$pd.'.$key.'}\">\r\n\t\t\t\t \t\t\t\t<input type=\"button\" name=\"image_delete\" value=\"Delete\" onClick=\"window.location = \\'{$self}/imageDelete/{$module}_id/{$pd.id|make_id}/image_name/{$pd.'.$key.'}\\'\">\r\n\t\t\t\t \t\t\t{/if}\r\n\t\t\t\t\t\t</td>';\r\n\t\t\t\t\t\t$html .= \"\\n\".'</tr>';\r\n\t\t\t\t\t\r\n \t\t\t\t\tbreak;\r\n \t\t\t\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t$cache_dir = HOME_DIR.\"/cache\";\r\n \t\t\r\n \t\t$file = $cache_dir.\"/\".$form_name.\".tpl\";\r\n \t\t\r\n \t\t$fp = fopen($file, 'w');\r\n \t\tfwrite($fp, $html);\r\n \t\tfclose($fp);\r\n \t\t\r\n \t\t\r\n \t\tglobal $smarty;\r\n \t\t\r\n \t\t$fetch_html = $smarty->fetch($file);\r\n\r\n \t\treturn $fetch_html;\r\n \t\t\r\n \t\t\t\r\n \t}", "function add_new() {\n global $output;\n\n $output .= \"<center>\n\t\t<form method=\\\"POST\\\" action=\\\"doadd_new\\\" name=\\\"form1\\\">\n\t\t<input type=\\\"hidden\\\"name=\\\"type\\\" value=\\\"POST\\\"/>\n <div id=\\\"pane1\\\"><br />\n<table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n<tr><td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">General:</td></tr>\n<tr>\n <td>entry:</td>\n <td><input type=\\\"text\\\" name=\\\"entry\\\" size=\\\"8\\\" maxlength=\\\"11\\\" value=\\\"0\\\" /></td>\n<td>displayid:</td>\n <td><input type=\\\"text\\\" name=\\\"displayid\\\" size=\\\"8\\\" maxlength=\\\"11\\\" value=\\\"0\\\" /></td>\n <td>requiredlevel:</td>\n <td><input type=\\\"text\\\" name=\\\"requiredlevel\\\" size=\\\"8\\\" maxlength=\\\"4\\\" value=\\\"0\\\" /></td>\n <td>itemlevel:</td>\n <td><input type=\\\"text\\\" name=\\\"itemlevel\\\" size=\\\"8\\\" maxlength=\\\"4\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr><td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Names:</td></tr>\n<tr>\n <td>Name1:</td>\n <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"name1\\\" size=\\\"30\\\" maxlength=\\\"225\\\" value=\\\"\\\" /></td>\n <td>Name2:</td>\n <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"name2\\\" size=\\\"30\\\" maxlength=\\\"225\\\" value=\\\"\\\" /></td>\n</tr>\n<tr>\n <td>Name3:</td>\n <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"name3\\\" size=\\\"30\\\" maxlength=\\\"225\\\" value=\\\"\\\" /></td>\n <td>Name4:</td>\n <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"name4\\\" size=\\\"30\\\" maxlength=\\\"225\\\" value=\\\"\\\" /></td>\n</tr>\n<tr>\n <td>description:</td>\n <td colspan=\\\"8\\\"><input type=\\\"text\\\" name=\\\"description\\\" size=\\\"82\\\" maxlength=\\\"225\\\" value=\\\"\\\" /></td>\n</tr>\n<tr><td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Item Types:</td></tr>\n<tr>\n <td>item classes:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"class\\\">\n\t\t<option value=\\\"0\\\">0 - consumables</option>\n\t\t<option value=\\\"1\\\">1 - containers</option>\n\t\t<option value=\\\"2\\\">2 - weapons</option>\n\t\t<option value=\\\"3\\\">3 - jewels</option>\n\t\t<option value=\\\"4\\\">4 - armor</option>\n\t\t<option value=\\\"5\\\">5 - reagants</option>\n\t\t<option value=\\\"6\\\">6 - projectiles</option>\n\t\t<option value=\\\"7\\\">7 - trade goods</option>\n\t\t<option value=\\\"9\\\">9 - recipes</option>\n\t\t<option value=\\\"11\\\">11 - quivers</option>\n\t\t<option value=\\\"12\\\">12 - quests</option>\n\t\t<option value=\\\"13\\\">13 - keys</option>\n\t\t<option value=\\\"14\\\">14 - permanents?</option>\n\t\t<option value=\\\"15\\\">15 - miscellaneous</option>\n\t</select></td>\n <td>subclasses:</td>\n <td colspan=\\\"3\\\"><select name=\\\"subclass\\\">\n <optgroup label=\\\"Class 0: consumables\\\">\n\t\t<option value=\\\"0\\\">0 - consumable</option>\n\t<optgroup label=\\\"Class 1: containers\\\">\n\t\t<option value=\\\"0\\\">0 - bag</option>\n\t\t<option value=\\\"1\\\">1 - soul bag</option>\n\t\t<option value=\\\"2\\\">2 - herb bag</option>\n\t\t<option value=\\\"3\\\">3 - enchanter bag</option>\n\t\t<option value=\\\"4\\\">4 - engineer bag</option>\n\t\t<option value=\\\"5\\\">5 - jewel bag</option>\n\t\t<option value=\\\"6\\\">6 - miner bag</option>\n\t<optgroup label=\\\"Class 2: weapons\\\">\n\t\t<option value=\\\"0\\\">0 - axe_1hand</option>\n\t\t<option value=\\\"1\\\">1 - axe_2hand</option>\n\t\t<option value=\\\"2\\\">2 - bow</option>\n\t\t<option value=\\\"3\\\">3 - rifle</option>\n\t\t<option value=\\\"4\\\">4 - mace_1hand</option>\n\t\t<option value=\\\"5\\\">5 - mace_2hand</option>\n\t\t<option value=\\\"6\\\">6 - polearm</option>\n\t\t<option value=\\\"7\\\">7 - sword_1hand</option>\n\t\t<option value=\\\"8\\\">8 - sword_2hand</option>\n\t\t<option value=\\\"10\\\">10 - staff</option>\n\t\t<option value=\\\"13\\\">13 - fist</option>\n\t\t<option value=\\\"14\\\">14 - other</option>\n\t\t<option value=\\\"15\\\">15 - dagger</option>\n\t\t<option value=\\\"16\\\">16 - thrown</option>\n\t\t<option value=\\\"18\\\">18 - crossbow</option>\n\t\t<option value=\\\"19\\\">19 - wand</option>\n\t\t<option value=\\\"20\\\">20 - fishing pole</option>\n\t<optgroup label=\\\"Class 3: jewels\\\">\n\t\t<option value=\\\"0\\\">0 - red socket</option>\n\t\t<option value=\\\"1\\\">1 - blue socket</option>\n\t\t<option value=\\\"2\\\">2 - yellow socket</option>\n\t\t<option value=\\\"3\\\">3 - red or blue socket</option>\n\t\t<option value=\\\"4\\\">4 - blue or yellow socket</option>\n\t\t<option value=\\\"5\\\">5 - red or yellow socket</option>\n\t\t<option value=\\\"6\\\">6 - meta socket</option>\n\t<optgroup label=\\\"Class 4: armor\\\">\n\t\t<option value=\\\"0\\\">0 - miscellaneous</option>\n\t\t<option value=\\\"1\\\">1 - cloth</option>\n\t\t<option value=\\\"2\\\">2 - leather</option>\n\t\t<option value=\\\"3\\\">3 - mail</option>\n\t\t<option value=\\\"4\\\">4 - plate</option>\n\t\t<option value=\\\"6\\\">6 - shield</option>\n\t\t<option value=\\\"7\\\">7 - libram</option>\n\t\t<option value=\\\"8\\\">8 - idol</option>\n\t\t<option value=\\\"9\\\">9 - totem</option>\n\t<optgroup label=\\\"Class 5: reagents\\\">\n\t\t<option value=\\\"0\\\">0 - reagent</option>\n\t<optgroup label=\\\"Class 6: projectiles\\\">\n\t\t<option value=\\\"2\\\">2 - arrows</option>\n\t\t<option value=\\\"3\\\">3 - bullets</option>\n\t<optgroup label=\\\"Class 7: trade goods\\\">\n\t\t<option value=\\\"0\\\">0 - trade goods</option>\n\t\t<option value=\\\"1\\\">1 - parts</option>\n\t\t<option value=\\\"2\\\">2 - explosives</option>\n\t\t<option value=\\\"3\\\">3 - devices</option>\n\t<optgroup label=\\\"Class 9: recipes\\\">\n\t\t<option value=\\\"0\\\">0 - book</option>\n\t\t<option value=\\\"1\\\">1 - leatherworking</option>\n\t\t<option value=\\\"2\\\">2 - {tailoring</option>\n\t\t<option value=\\\"3\\\">3 - engineering</option>\n\t\t<option value=\\\"4\\\">4 - blacksmithing</option>\n\t\t<option value=\\\"5\\\">5 - cooking</option>\n\t\t<option value=\\\"6\\\">6 - alchemy</option>\n\t\t<option value=\\\"7\\\">7 - first_aid</option>\n\t\t<option value=\\\"8\\\">8 - enchanting</option>\n\t\t<option value=\\\"9\\\">9 - fishing</option>\n\t\t<option value=\\\"10\\\">10 - jewelcrafting</option>\n\t</optgroup>\n\t<optgroup label=\\\"Class 11: quivers\\\">\n\t\t<option value=\\\"2\\\">2 - quiver</option>\n\t\t<option value=\\\"3\\\">3 - ammo_pouch</option>\n\t</optgroup>\n\t<optgroup label=\\\"Class 12: quests\\\">\n\t\t<option value=\\\"0\\\">0 - quest</option>\n\t</optgroup>\n\t<optgroup label=\\\"Class 13: keys\\\">\n\t\t<option value=\\\"0\\\">0 - key</option>\n\t</optgroup>\n\t<optgroup label=\\\"Class 14: permanents\\\">\n\t <option value=\\\"0\\\">0 - permanent</option>\n </optgroup>\n\t<optgroup label=\\\"Class 15: miscellaneous\\\">\n\t<option value=\\\"0\\\">0 - miscellaneous</option>\n\t</optgroup>\n </select></td>\n</tr>\n<tr>\n <td>item quality:</td>\n\t <td colspan=\\\"2\\\"><select name=\\\"quality\\\">\n\t\t<option value=\\\"0\\\">0 - poor</option>\n\t\t<option value=\\\"1\\\">1 - common</option>\n\t\t<option value=\\\"2\\\">2 - uncommon</option>\n\t\t<option value=\\\"3\\\">3 - rare</option>\n\t\t<option value=\\\"4\\\">4 - epic</option>\n\t\t<option value=\\\"5\\\">5 - legendary</option>\n\t\t<option value=\\\"6\\\">6 - artifact</option>\n\t</select></td>\n <td>inventory type:</td>\n\t <td colspan=\\\"2\\\"><select name=\\\"inventorytype\\\">\n\t <option value=\\\"0\\\">0 - other</option>\n\t\t<option value=\\\"1\\\">1 - head</option>\n\t\t<option value=\\\"2\\\">2 - neck</option>\n\t\t<option value=\\\"3\\\">3 - shoulder</option>\n\t\t<option value=\\\"4\\\">4 - shirt</option>\n\t\t<option value=\\\"5\\\">5 - chest</option>\n\t\t<option value=\\\"6\\\">6 - belt</option>\n\t\t<option value=\\\"7\\\">7 - legs</option>\n\t\t<option value=\\\"8\\\">8 - feet</option>\n\t\t<option value=\\\"9\\\">9 - wrist</option>\n\t\t<option value=\\\"10\\\">10 - gloves</option>\n\t\t<option value=\\\"11\\\">11 - finger</option>\n\t\t<option value=\\\"12\\\">12 - trinket</option>\n\t\t<option value=\\\"13\\\">13 - one_hand</option>\n\t\t<option value=\\\"14\\\">14 - shield</option>\n\t\t<option value=\\\"15\\\">15 - bow</option>\n\t\t<option value=\\\"16\\\">16 - back</option>\n\t\t<option value=\\\"17\\\">17 - two_hand</option>\n\t\t<option value=\\\"18\\\">18 - bag</option>\n\t\t<option value=\\\"19\\\">19 - tabard</option>\n\t\t<option value=\\\"20\\\">20 - robe</option>\n\t\t<option value=\\\"21\\\">21 - main_hand</option>\n\t\t<option value=\\\"22\\\">22 - fist_weapon</option>\n\t\t<option value=\\\"23\\\">23 - off_hand</option>\n\t\t<option value=\\\"24\\\">24 - projectile</option>\n\t\t<option value=\\\"25\\\">25 - thrown</option>\n\t\t<option value=\\\"26\\\">26 - ranged</option>\n\t\t<option value=\\\"28\\\">28 - relic</option>\n\t</select></td>\n <td>bonding:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"bonding\\\">\n\t\t<option value=\\\"0\\\">0 - none</option>\n\t\t<option value=\\\"1\\\">1 - on pick up</option>\n\t\t<option value=\\\"2\\\">2 - on equip</option>\n\t\t<option value=\\\"3\\\">3 - on use</option>\n\t\t<option value=\\\"4\\\">4 - quest item 1</option>\n\t\t<option value=\\\"5\\\">5 - quest item 2</option>\n\t</select></td>\n</tr>\n<tr>\n <td><span>itemset:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"itemset\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n <td>flags:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"Flags\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n</table>\n</div>\";\n\n$output .= \"<div id=\\\"pane2\\\">\n <table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n\t<tr><td colspan=\\\"10\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Vendors:</td></tr>\n\t<tr>\n\t <td>buy price:</td>\n\t <td colspan=\\\"2\\\"><input type=\\\"text\\\" name=\\\"BuyPrice\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t <td>sell price:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"SellPrice\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t <td><span>extended cost:</td>\n\t <td colspan=\\\"2\\\"><input type=\\\"text\\\" name=\\\"ItemExtendedCost\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"NULL\\\" /></td>\n\t</tr>\n\t<tr><td colspan=\\\"10\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Containers:</td></tr>\n\t<tr>\n\t<td>bag family:</td>\n\t <td colspan=\\\"4\\\"><select name=\\\"BagFamily\\\">\n\t\t<option value=\\\"0\\\">0 - none</option>\n\t\t<option value=\\\"1\\\">1 - arrows</option>\n\t\t<option value=\\\"2\\\">2 - bullets</option>\n\t\t<option value=\\\"3\\\">3 - soul shards</option>\n\t\t<option value=\\\"6\\\">6 - herbs</option>\n\t\t<option value=\\\"7\\\">7 - enchanting</option>\n\t\t<option value=\\\"8\\\">8 - engineering</option>\n\t\t<option value=\\\"9\\\">9 - keys</option>\n\t\t<option value=\\\"10\\\">10 - jewels</option>\n\t\t<option value=\\\"11\\\">11 - mining</option>\n\t </select></td>\n\t<td>bag slots:</td>\n\t<td colspan=\\\"4\\\"><input type=\\\"text\\\" name=\\\"ContainerSlots\\\" size=\\\"10\\\" maxlength=\\\"3\\\" value=\\\"0\\\" /></td>\n\t</tr>\n\t<tr>\n\t\t<tr><td colspan=\\\"10\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Materials:</td></tr>\n\t<tr>\n\t<td>lock:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"lock_material\\\">\n\t\t<option value=\\\"-1\\\">-1 - consumable</option>\n\t\t<option value=\\\"-1\\\">0 - none</option>\n\t\t<option value=\\\"1\\\">1 - metal</option>\n\t\t<option value=\\\"2\\\">2 - wood</option>\n\t\t<option value=\\\"3\\\">3 - liquid</option>\n\t\t<option value=\\\"4\\\">4 - jewelry</option>\n\t\t<option value=\\\"5\\\">5 - chain</option>\n\t\t<option value=\\\"6\\\">6 - plate</option>\n\t\t<option value=\\\"7\\\">7 - cloth</option>\n\t\t<option value=\\\"8\\\">8 - leather</option>\n\t </select></td>\n\t<td>page:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"page_material\\\">\n\t\t<option value=\\\"0\\\">0 - none</option>\n\t\t<option value=\\\"1\\\">1 - parchment</option>\n\t\t<option value=\\\"2\\\">2 - stone</option>\n\t\t<option value=\\\"3\\\">3 - marble</option>\n\t\t<option value=\\\"4\\\">4 - silver</option>\n\t\t<option value=\\\"5\\\">5 - bronze</option>\n\t\t<option value=\\\"6\\\">6 - valentine</option>\n\t\t<option value=\\\"7\\\">7 - illidari</option>\n\t </select></td>\n <td>durability:</td>\n <td><input type=\\\"text\\\" name=\\\"MaxDurability\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\t\n<tr>\n <td>language id:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"page_language\\\">\n\t\t<option value=\\\"0\\\">0 - other</option>\n\t\t<option value=\\\"1\\\">1 - unknown</option>\n\t\t<option value=\\\"2\\\">2 - unknown</option>\n\t\t<option value=\\\"7\\\">7 - common</option>\n\t\t<option value=\\\"8\\\">8 - demonic</option>\n\t\t<option value=\\\"11\\\">11 - draconic</option>\n\t\t<option value=\\\"35\\\">35 - draenei</option>\n\t </select></td>\t\n <td>sheath id:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"sheathID\\\">\n\t\t<option value=\\\"0\\\">0 - other</option>\n\t\t<option value=\\\"1\\\">1 - 2hand weapon</option>\n\t\t<option value=\\\"2\\\">2 - staff</option>\n\t\t<option value=\\\"3\\\">3 - 1hand weapon</option>\n\t\t<option value=\\\"4\\\">4 - shield</option>\n\t\t<option value=\\\"5\\\">5 - rod</option>\n\t\t<option value=\\\"7\\\">7 - off hand</option>\n\t </select></td> \n\t <td>}quest id:</td>\n\t <td><input type=\\\"text\\\" name=\\\"quest_id\\\" size=\\\"6\\\" maxlength=\\\"5\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>max count:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"maxcount\\\" size=\\\"6\\\" maxlength=\\\"5\\\" value=\\\"0\\\" /></td>\n\t<td>unique:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"Unique\\\" size=\\\"6\\\" maxlength=\\\"5\\\" value=\\\"0\\\" /></td>\n\t<td>lock id:</td>\n\t <td><input type=\\\"text\\\" name=\\\"lock_id\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>randomprop:</td>\n <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"randomprop\\\" size=\\\"6\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>reqdisenchantskill:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"RequiredDisenchantSkill\\\" size=\\\"6\\\" maxlength=\\\"10\\\" value=\\\"-1\\\" /></td>\n\t<td>page id:</td>\n <td colspan=\\\"2\\\"><input type=\\\"text\\\" name=\\\"page_id\\\" size=\\\"6\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>zoneid:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"ZoneNameID\\\" size=\\\"6\\\" maxlength=\\\"10\\\" value=\\\"0\\\" /></td>\n\t<td>mapid:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"mapid\\\" size=\\\"6\\\" maxlength=\\\"10\\\" value=\\\"NULL\\\" /></td>\n\t<td>totemcategory:</td>\n\t <td colspan=\\\"2\\\"><input type=\\\"text\\\" name=\\\"TotemCategory\\\" size=\\\"6\\\" maxlength=\\\"10\\\" value=\\\"NULL\\\" /></td>\n</tr>\n </table>\n</div>\";\n\n$output .= \"<div id=\\\"pane3\\\">\n<table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n\t<tr><td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Stats:</td></tr>\n\t<tr>\n\t <td>Slot1:</td>\n\t <td><select name=\\\"stat_type1\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n <td><input type=\\\"text\\\" name=\\\"stat_value1\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n <td>Slot2:</td>\n\t <td><select name=\\\"stat_type2\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value2\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Slot3:</td>\n\t <td><select name=\\\"stat_type3\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n <td><input type=\\\"text\\\" name=\\\"stat_value3\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n <td>Slot4:</td>\n\t <td><select name=\\\"stat_type4\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value4\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>Slot5:</td>\n\t <td><select name=\\\"stat_type5\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value5\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n\t <td>Slot6:</td>\n\t <td><select name=\\\"stat_type6\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value6\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>Slot7:</td>\n\t <td><select name=\\\"stat_type7\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value7\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n\t <td>Slot8:</td>\n\t <td><select name=\\\"stat_type8\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value8\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>Slot9:</td>\n\t <td><select name=\\\"stat_type9\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value9\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n\t <td>Slot10:</td>\n\t <td><select name=\\\"stat_type10\\\">\n\t <option value=\\\"0\\\">0: none</option>\n\t <option value=\\\"1\\\">1: mana</option>\n\t <option value=\\\"2\\\">2: health</option>\n\t\t<option value=\\\"3\\\">3: agility</option>\n\t\t<option value=\\\"4\\\">4: strength</option>\n\t\t<option value=\\\"5\\\">5: intellect</option>\n\t\t<option value=\\\"6\\\">6: spirit</option>\n\t\t<option value=\\\"7\\\">7: stamina</option>\n\t\t<option value=\\\"12\\\">12: defense</option>\n\t\t<option value=\\\"13\\\">13: dodge</option>\n\t\t<option value=\\\"14\\\">14: parry</option>\n\t\t<option value=\\\"15\\\">15: shield-block</option>\n\t\t<option value=\\\"16\\\">16: melee-hit</option>\n\t\t<option value=\\\"17\\\">17: range-hit</option>\n\t\t<option value=\\\"18\\\">18: spell-hit</option>\n\t\t<option value=\\\"19\\\">19: melee-crit</option>\n\t\t<option value=\\\"20\\\">20: ranged-crit</option>\n\t\t<option value=\\\"21\\\">21: spell-crit</option>\n\t\t<option value=\\\"28\\\">28: melee-haste</option>\n\t\t<option value=\\\"29\\\">29: ranged-haste</option>\n\t\t<option value=\\\"30\\\">30: spell-haste</option>\n\t\t<option value=\\\"31\\\">31: hit-rating</option>\n\t\t<option value=\\\"32\\\">32: crit-rating</option>\n\t\t<option value=\\\"35\\\">35: resist-rating</option>\n\t\t<option value=\\\"36\\\">36: haste-rating</option>\n\t </select></td>\n\t <td><input type=\\\"text\\\" name=\\\"stat_value10\\\" size=\\\"10\\\" maxlength=\\\"6\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n <td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Resistances:</td>\n</tr>\n<tr>\n\t<td colspan=\\\"2\\\">armor:</td>\n\t <td><input type=\\\"text\\\" name=\\\"armor\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td colspan=\\\"2\\\">block:</td>\n\t <td><input type=\\\"text\\\" name=\\\"block\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td colspan=\\\"2\\\">holy resistance:</td>\n\t <td><input type=\\\"text\\\" name=\\\"holy_res\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td colspan=\\\"2\\\">fire resistance:</td>\n\t <td><input type=\\\"text\\\" name=\\\"fire_res\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td colspan=\\\"2\\\">nature resistance:</td>\n\t <td><input type=\\\"text\\\" name=\\\"nature_res\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td colspan=\\\"2\\\">frost resistance:</td>\n\t <td><input type=\\\"text\\\" name=\\\"frost_res\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td colspan=\\\"2\\\">shadow resistance:</td>\n\t <td><input type=\\\"text\\\" name=\\\"shadow_res\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n <td colspan=\\\"2\\\">arcane resistance:</td>\n\t <td><input type=\\\"text\\\" name=\\\"arcane_res\\\" size=\\\"10\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n </table>\n</div>\";\n\n$output .= \"<div id=\\\"pane4\\\">\n<table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n<tr>\n <td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Weapon properties:</td>\n</tr>\n<tr>\n <td>delay:</td>\n <td colspan=\\\"2\\\"><input type=\\\"text\\\" name=\\\"delay\\\" size=\\\"10\\\" maxlength=\\\"11\\\" value=\\\"0\\\" /></td>\t \n <td>range:</td>\n <td><input type=\\\"text\\\" name=\\\"range\\\" size=\\\"10\\\" maxlength=\\\"40\\\" value=\\\"0\\\" /></td>\n <td>ammo type:</td>\n\t <td colspan=\\\"2\\\"><select name=\\\"ammo_type\\\">\n\t\t<option value=\\\"0\\\">0 - none</option>\n\t\t<option value=\\\"2\\\">2 - arrows</option>\n\t\t<option value=\\\"3\\\">3 - bullets</option>\n\t </select></td>\n</tr>\n<tr>\n <td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Weapon damage:</td>\n</tr>\n<tr>\n\t<td>Type1:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"dmg_type1\\\">\n\t\t<option value=\\\"0\\\">0: physical</option>\n\t\t<option value=\\\"1\\\">1: holy</option>\n\t\t<option value=\\\"2\\\">2: fire</option>\n\t\t<option value=\\\"3\\\">3: nature</option>\n\t\t<option value=\\\"4\\\">4: frost</option>\n\t\t<option value=\\\"5\\\">5: shadow</option>\n\t\t<option value=\\\"6\\\">6: arcane</option>\n\t </select></td>\n\t<td>min - max:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"dmg_min1\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /> - <input type=\\\"text\\\" name=\\\"dmg_max1\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>Type2:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"dmg_type2\\\">\n\t\t<option value=\\\"0\\\">0: physical</option>\n\t\t<option value=\\\"1\\\">1: holy</option>\n\t\t<option value=\\\"2\\\">2: fire</option>\n\t\t<option value=\\\"3\\\">3: nature</option>\n\t\t<option value=\\\"4\\\">4: frost</option>\n\t\t<option value=\\\"5\\\">5: shadow</option>\n\t\t<option value=\\\"6\\\">6: arcane</option>\n\t </select></td>\n\t<td>min - max:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"dmg_min2\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /> - <input type=\\\"text\\\" name=\\\"dmg_max2\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Type3:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"dmg_type3\\\">\n\t\t<option value=\\\"0\\\">0: physical</option>\n\t\t<option value=\\\"1\\\">1: holy</option>\n\t\t<option value=\\\"2\\\">2: fire</option>\n\t\t<option value=\\\"3\\\">3: nature</option>\n\t\t<option value=\\\"4\\\">4: frost</option>\n\t\t<option value=\\\"5\\\">5: shadow</option>\n\t\t<option value=\\\"6\\\">6: arcane</option>\n\t </select></td>\n\t<td>min - max:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"dmg_min3\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /> - <input type=\\\"text\\\" name=\\\"dmg_max3\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Type4:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"dmg_type4\\\">\n\t\t<option value=\\\"0\\\">0: physical</option>\n\t\t<option value=\\\"1\\\">1: holy</option>\n\t\t<option value=\\\"2\\\">2: fire</option>\n\t\t<option value=\\\"3\\\">3: nature</option>\n\t\t<option value=\\\"4\\\">4: frost</option>\n\t\t<option value=\\\"5\\\">5: shadow</option>\n\t\t<option value=\\\"6\\\">6: arcane</option>\n\t </select></td>\n\t<td>min - max:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"dmg_min4\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /> - <input type=\\\"text\\\" name=\\\"dmg_max4\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Type5:</td>\n\t <td colspan=\\\"3\\\"><select name=\\\"dmg_type5\\\">\n\t\t<option value=\\\"0\\\">0: physical</option>\n\t\t<option value=\\\"1\\\">1: holy</option>\n\t\t<option value=\\\"2\\\">2: fire</option>\n\t\t<option value=\\\"3\\\">3: nature</option>\n\t\t<option value=\\\"4\\\">4: frost</option>\n\t\t<option value=\\\"5\\\">5: shadow</option>\n\t\t<option value=\\\"6\\\">6: arcane</option>\n\t </select></td>\n\t<td>min - max:</td>\n\t <td colspan=\\\"3\\\"><input type=\\\"text\\\" name=\\\"dmg_min5\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /> - <input type=\\\"text\\\" name=\\\"dmg_max5\\\" size=\\\"8\\\" maxlength=\\\"45\\\" value=\\\"0\\\" /></td>\n</tr>\n </table>\n</div>\"; \n\n$output .= \"<div id=\\\"pane5\\\">\n<table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n<tr><td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Spell properties:</td></tr>\n<tr>\n\t<td>ID1:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellid_1\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Trigger1:</td>\n\t <td><select name=\\\"spelltrigger_1\\\">\n\t\t<option value=\\\"0\\\">0: on use</option>\n\t\t<option value=\\\"1\\\">1: on equip</option>\n\t\t<option value=\\\"2\\\">2: chance on hit</option>\n\t</select></td>\n\t<td>Charges1:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcharges_1\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Cooldown1:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcooldown_1\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category1:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategory_1\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category cooldown1:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategorycooldown_1\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>ID2:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellid_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Trigger2:</td>\n\t <td><select name=\\\"spelltrigger_2\\\">\n\t\t<option value=\\\"0\\\">0: on use</option>\n\t\t<option value=\\\"1\\\">1: on equip</option>\n\t\t<option value=\\\"2\\\">2: chance on hit</option>\n\t </select></td>\n\t<td>Charges2:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcharges_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Cooldown2:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category2:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategory_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category cooldown2:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategorycooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>ID3:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellid_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Trigger3:</td>\n\t <td><select name=\\\"spelltrigger_2\\\">\n\t\t<option value=\\\"0\\\">0: on use</option>\n\t\t<option value=\\\"1\\\">1: on equip</option>\n\t\t<option value=\\\"2\\\">2: chance on hit</option>\n\t </select></td>\n\t<td>Charges3:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcharges_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Cooldown3:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category3:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategory_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category cooldown3:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategorycooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>ID4:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellid_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Trigger4:</td>\n\t <td><select name=\\\"spelltrigger_2\\\">\n\t\t<option value=\\\"0\\\">0: on use</option>\n\t\t<option value=\\\"1\\\">1: on equip</option>\n\t\t<option value=\\\"2\\\">2: chance on hit</option>\n\t </select></td>\n\t<td>Charges4:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcharges_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>Cooldown4:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category4:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategory_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category cooldown4:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategorycooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>ID5:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellid_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Trigger5:</td>\n\t <td><select name=\\\"spelltrigger_2\\\">\n\t\t<option value=\\\"0\\\">0: on use</option>\n\t\t<option value=\\\"1\\\">1: on equip</option>\n\t\t<option value=\\\"2\\\">2: chance on hit</option>\n\t </select></td>\n\t<td>Charges5:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcharges_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>Cooldown5:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category5:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategory_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t<td>Category cooldown5:</td>\n\t <td><input type=\\\"text\\\" name=\\\"spellcategorycooldown_2\\\" size=\\\"8\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n </table>\n</div>\";\n\n$output .= \"<div id=\\\"pane6\\\">\n<table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n<tr>\n <td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Requirements:</td>\n</tr>\n<tr>\n <td>allowable class:</td>\n <td><select multiple=\\\"multiple\\\" name=\\\"AllowableClass[]\\\" size=\\\"4\\\">\n\t\t<option value=\\\"-1\\\">-1 - all</option>\n\t\t<option value=\\\"1\\\">1 - warrior</option>\n\t\t<option value=\\\"2\\\">2 - paladin</option>\n\t\t<option value=\\\"3\\\">3 - warrior,paladin</option>\n\t\t<option value=\\\"4\\\">4 - hunter</option>\n\t\t<option value=\\\"8\\\">8 - rogue</option>\n\t\t<option value=\\\"9\\\">9 - warrior,rogue</option>\n\t\t<option value=\\\"15\\\">15 - warrior,paladin,hunter,rogue</option>\n\t\t<option value=\\\"16\\\">16 - priest</option>\n\t\t<option value=\\\"21\\\">21 - warrior,hunter,priest</option>\n\t\t<option value=\\\"28\\\">28 - hunter,rogue,priest</option>\n\t\t<option value=\\\"29\\\">29 - warrior,hunter,rogue,priest</option>\n\t\t<option value=\\\"64\\\">64 - shaman</option>\n\t\t<option value=\\\"66\\\">66 - paladin,shaman</option>\n\t\t<option value=\\\"68\\\">68 - hunter,shaman</option>\n\t\t<option value=\\\"69\\\">69 - warrior,hunter,shaman</option>\n\t\t<option value=\\\"73\\\">73 - warrior,rogue,shaman</option>\n\t\t<option value=\\\"74\\\">74 - paladin,rogue,shaman</option>\n\t\t<option value=\\\"79\\\">79 - warrior,paladin,hunter,rogue,shaman</option>\n\t\t<option value=\\\"128\\\">128 - mage</option>\n\t\t<option value=\\\"134\\\">134 - paladin,hunter,mage</option>\n\t\t<option value=\\\"140\\\">140 - hunter,rogue,mage</option>\n\t\t<option value=\\\"141\\\">141 - warrior,hunter,rogue,mage</option>\n\t\t<option value=\\\"153\\\">153 - warrior,rogue,priest,mage</option>\n\t\t<option value=\\\"210\\\">210 - paladin,priest,shaman,mage</option>\n\t\t<option value=\\\"256\\\">256 - warlock</option>\n\t\t<option value=\\\"265\\\">265 - warrior,rogue,warlock</option>\n\t\t<option value=\\\"274\\\">274 - paladin,priest,warlock</option>\n\t\t<option value=\\\"284\\\">284 - hunter,rogue,priest,warlock</option>\n\t\t<option value=\\\"326\\\">326 - paladin,hunter,shaman,warlock</option>\n\t </select></td>\n <td>allowable race:</td>\n <td><select multiple=\\\"multiple\\\" name=\\\"AllowableRace[]\\\" size=\\\"5\\\">\n\t\t<option value=\\\"-1\\\">-1 - all</option>\n\t\t<option value=\\\"0\\\">0 - </option>\n\t\t<option value=\\\"32\\\">32 - tauren</option>\n\t\t<option value=\\\"68\\\">68 - dwarf,gnome</option>\n\t\t<option value=\\\"415\\\">415 - alliance</option>\n\t\t<option value=\\\"658\\\">658 - gnome</option>\n\t\t<option value=\\\"690\\\">690 - troll</option>\n\t\t<option value=\\\"1101\\\">1101 - draenei</option>\n\t\t<option value=\\\"2047\\\">2047 - bloodelf</option>\n\t\t<option value=\\\"31232\\\">31232 - </option>\n\t\t<option value=\\\"32767\\\">32767 - </option>\n\t\t<option value=\\\"2147483647\\\">2147483647 - </option>\n\t </select></td>\n</tr>\n<tr>\n\t <td>required skill:</td>\n\t <td><input type=\\\"text\\\" name=\\\"RequiredSkill\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t <td>required skill rank:</td>\n\t <td><input type=\\\"text\\\" name=\\\"RequiredSkillRank\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td><span>required skill subrank:</span></td>\n\t <td><input type=\\\"text\\\" name=\\\"requiredSkillSubRank\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t <td><span>required player rank1:</span></td>\n\t <td><input type=\\\"text\\\" name=\\\"requiredplayerrank1\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t</tr>\n<tr>\n\t <td><span>required faction:</span></td>\n\t <td><input type=\\\"text\\\" name=\\\"RequiredFaction\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n <td><span>required player rank2:</span></td>\n\t <td><input type=\\\"text\\\" name=\\\"requiredplayerrank2\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td><span>required faction standing:</span></td>\n\t <td><input type=\\\"text\\\" name=\\\"RequiredFactionStanding\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n\t <td><span>arena rank requirement:</span></td>\n\t <td><input type=\\\"text\\\" name=\\\"ArenaRankRequirement\\\" size=\\\"15\\\" maxlength=\\\"30\\\" value=\\\"0\\\" /></td>\n</tr>\n </table>\n</div>\";\n\n$output .= \"<div id=\\\"pane7\\\">\n <table class=\\\"lined\\\" style=\\\"width: 720px;\\\">\n<tr><td colspan=\\\"8\\\" class=\\\"large_bold\\\" align=\\\"left\\\">Sockets:</td></tr>\n<tr>\n\t<td>color1:</td>\n\t <td><select name=\\\"socketColor_1\\\">\n\t\t<option value=\\\"0\\\">0: none</option>\n\t\t<option value=\\\"1\\\">1: meta</option>\n\t\t<option value=\\\"2\\\">2: red</option>\n\t\t<option value=\\\"4\\\">4: yellow</option>\n\t\t<option value=\\\"8\\\">8: blue</option>\n\t </select></td>\n\t<td>content1:</td>\n\t <td><input type=\\\"text\\\" name=\\\"unk201_3\\\" size=\\\"15\\\" maxlength=\\\"10\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>color2:</td>\n\t <td><select name=\\\"socketColor_2\\\">\n\t\t<option value=\\\"0\\\">0: none</option>\n\t\t<option value=\\\"1\\\">1: meta</option>\n\t\t<option value=\\\"2\\\">2: red</option>\n\t\t<option value=\\\"4\\\">4: yellow</option>\n\t\t<option value=\\\"8\\\">8: blue</option>\n\t </select></td>\n\t<td>content2:</td>\n\t <td><input type=\\\"text\\\" name=\\\"unk201_5\\\" size=\\\"15\\\" maxlength=\\\"10\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t <td>color3:</td>\n\t <td><select name=\\\"socketColor_3\\\">\n\t\t<option value=\\\"0\\\">0: none</option>\n\t\t<option value=\\\"1\\\">1: meta</option>\n\t\t<option value=\\\"2\\\">2: red</option>\n\t\t<option value=\\\"4\\\">4: yellow</option>\n\t\t<option value=\\\"8\\\">8: blue</option>\n\t </select></td>\n\t<td>content3:</td>\n\t <td><input type=\\\"text\\\" name=\\\"unk201_7\\\" size=\\\"15\\\" maxlength=\\\"10\\\" value=\\\"0\\\" /></td>\n</tr>\n<tr>\n\t<td>bonus:</td>\n\t <td><input type=\\\"text\\\" name=\\\"socketBonus\\\" size=\\\"15\\\" maxlength=\\\"10\\\" value=\\\"NULL\\\" /></td>\n\t<td>gem properties:</td>\n\t <td><input type=\\\"text\\\" name=\\\"GemProperties\\\" size=\\\"15\\\" maxlength=\\\"10\\\" value=\\\"NULL\\\" /></td>\n</tr>\n </table>\n</div>\n </form>\n<script>setupPanes(\\\"container\\\", \\\"tab1\\\")</script>\";\n\n $output .= \"<table class=\\\"hidden\\\">\n<tr><td>\";\n makebutton(\"save to db\", \"item.php?action=doadd_new\",170);\n\t\tmakebutton(\"save as sql\", \"javascript:do_submit('form1',1)\",170);\n\t\tmakebutton(\"browse items\", \"item.php\",170);\n $output .= \"</td></tr>\n\n</table></center>\";\n\n}", "public function MakeForm() {\r\n $this->AddLabel(\"uploadfile\",\"Select file to upload:\");\r\n $this->AddFile(\"uploadfile\");\r\n $this->AddBR();\r\n $this->AddHR();\r\n $this->AddSubmit(\"upload\",\"Begin upload\");\r\n }", "public function inline_form_new_image( $item_id, $item_type )\n{\n$IPBHTML = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n$IPBHTML .= <<<EOF\n\n\t<div class='acp-box'>\n\t\t<h3 style='min-height:37px;'>{$this->lang->words['upload_image']}</h3>\n\t\t<form action='{$this->settings['base_url']}&amp;module=shop&amp;section=shop&amp;do=newImage&amp;item_id={$item_id}&amp;item_type={$item_type}' method='post' enctype='multipart/form-data'>\n\t\t<table class='ipsTable double_pad'>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<label for='upload_photo'>{$this->lang->words['new_image']}</label>\n\t\t\t\t\t<input type='file' size='30' id='upload_photo' name='upload_photo' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<div class='acp-actionbar'>\n\t\t\t<input type='submit' value='{$this->lang->words['save']}' class='button' />\n\t\t</div>\n\t\t</form>\n\t</div>\n\n<!--\n<div class='inlineFormEntry'>\n\t<div class='inlineFormLabel'>\n\t\t{$this->lang->words['new_image']}\n\t</div>\n\t<div class='inlineFormInput'>\n\t\t<input type='file' size='30' id='upload_photo' name='upload_photo' />\n\t</div>\n</div>\n<div class='inlineFormSubmit'><input type='submit' value='{$this->lang->words['save']}' /></div>\n</form>-->\nEOF;\n\nreturn $IPBHTML;\n}", "function AddContactFormField($page_list_id)\r\n {\r\n global $CFG,$objSmarty;\r\n if(is_array($_POST['default_value']))\r\n {\r\n $value = implode(\",\",$_POST['default_value']);\r\n }\r\n else\r\n {\r\n $value = $_POST['default_value'];\r\n }\r\n $insqry = \" INSERT INTO \".$CFG['table']['temp_contact_form_field'].\" SET page_list_id='\".$page_list_id.\"', domain_id='\".$_SESSION['domain_id'].\"',field_label_name='\".$_POST['label_name'].\"', field_post_name='\".str_replace(\" \",\"-\",$_POST['label_name']).\"', field_type='\".$_POST['field_type'].\"', value='\".$value.\"',required='\".$_POST['required'].\"', place_holder='\".$_POST['place_holder'].\"', instruction='\".$_POST['instruction'].\"',spacing='\".$_POST['spacing'].\"',size='\".$_POST['width'].\"',addeddate=now();\";\r\n $this->ExecuteQuery($insqry,'insert');\r\n }", "function OutputForm()\n\t{\n\t\tglobal $modx;\n\t\t$_SESSION['fdmcpt']=0;\n\t\t// eForm var\n\t\t$this->eform['tpl'] =$this->parameters['eform_tpl'] ? $this->parameters['eform_tpl'] :'fdmEform';\n\t\t$this->eform['formid'] = $this->parameters['eform_formid'] ? $this->parameters['eform_formid'] : 'fdmForm';\n\t\t$this->eform['report'] = $this->parameters['eform_report'] ? $this->parameters['eform_report'] : '';\n\t\t$this->eform['thankyou'] = $this->parameters['eform_thankyou'] ? $this->parameters['eform_thankyou'] : '';\n\t\t$this->eform['to'] = $this->parameters['eform_to'] ? $this->parameters['eform_to'] : $modx->config['emailsender'];\n\t\t$this->eform['noemail'] = isset($this->parameters['eform_noemail']) ? $this->parameters['eform_noemail'] : true;\n\t\t$this->eform['subject'] = $this->parameters['eform_subject'] ? $this->parameters['eform_modified subject'] : 'FDM: notification '.$modx->config['site_url'];\n\t\t$this->eform['autosender'] = $this->parameters['eform_autosender'] ? $this->parameters['eform_autosender'] : NULL;\n\t\t$this->eform['debug'] =$this->parameters['eform_debug'] ? $this->parameters['eform_debug'] : 0;\n\t\tif(!function_exists('mergeFields'))\n\t\t{\n\t\t\tinclude_once($modx->config['base_path'].'assets/snippets/FDM/includes/fdm.functions.inc.php');\n\t\t}\n\t\t\n \t\t$beforeFunc=(empty($_POST))?'mergeFields':''; // to keep the edited fields if there is a validation error\n\t\t// call to eForm\n\t\t$params['debug'] = $this->eform['debug'];\n\t\t$params['formid'] = $this->eform['formid'];\n\t\t// $params['eformOnBeforeFormParse'] = 'beforeparse';\n\t\t$params['eFormOnBeforeFormMerge'] = $beforeFunc;\n\t\t$params['eformOnBeforeMailSent'] = 'fillDoc';\n\t\t$params['eFormOnValidate'] = 'displayEformError';\n\t\t$params['eFormOnMailSent'] = 'allok';\n\t\t$params['protectSubmit'] = '1'; // else problem\n\t\t// $params['sessionVars'] = 'fdmid', //$_SESSION['fdmid'];\n\t\t// $params['postOverides'] = '0';\n\t\t$params['to'] = $this->eform['to'];\n\t\t$params['tpl'] = $this->eform['tpl'];\n\t\t$params['subject'] = $this->eform['subject'];\n\t\t$params['noemail'] = $this->eform['noemail'];\n\t\t$params['report'] = $this->eform['report'];\n\t\t$params['thankyou'] = $this->eform['thankyou'];\n\t\t$params['allowhtml'] = '1';\n\t\t$params['sendAsText'] = '1';\n\t\t$params['autosender'] = $this->eform['autosender'];\n\t\t$eformOutput = $modx->runSnippet('eForm',$params);\n\t\tif($this->config['output'])\n\t\t{\n\t\t\techo $eformOutput;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$modx->setPlaceholder('fdmEform',$eformOutput);\n\t\t}\n\t}", "public function upload_form_handler()\n {\n }", "function get_form_fields($name='',$description='',$default='',$public_view=1,$owner_view=1,$owner_set=1,$encrypted=0,$type='long_text',$required=0,$show_on_join_form=0,$show_in_posts=0,$show_in_post_previews=0,$order=NULL,$only_group='',$locked=0)\n\t{\n\t\t$fields=new ocp_tempcode();\n\t\t$hidden=new ocp_tempcode();\n\n\t\trequire_code('form_templates');\n\t\trequire_code('encryption');\n\t\trequire_lang('fields');\n\n\t\tif ($locked==0)\n\t\t\t$fields->attach(form_input_line(do_lang_tempcode('NAME'),do_lang_tempcode('DESCRIPTION_NAME'),'name',$name,true));\n\t\telse\n\t\t\t$hidden->attach(form_input_hidden('name',$name));\n\n\t\t$fields->attach(form_input_line(do_lang_tempcode('DESCRIPTION'),do_lang_tempcode('DESCRIPTION_DESCRIPTION'),'description',$description,false));\n\t\t$fields->attach(form_input_line(do_lang_tempcode('DEFAULT_VALUE'),do_lang_tempcode('DESCRIPTION_DEFAULT_VALUE_CPF'),'default',$default,false,NULL,10000));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('OWNER_VIEW'),do_lang_tempcode('DESCRIPTION_OWNER_VIEW'),'owner_view',$owner_view==1));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('OWNER_SET'),do_lang_tempcode('DESCRIPTION_OWNER_SET'),'owner_set',$owner_set==1));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('PUBLIC_VIEW'),do_lang_tempcode('DESCRIPTION_PUBLIC_VIEW'),'public_view',$public_view==1));\n\t\tif ((is_encryption_enabled()) && ($name==''))\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('ENCRYPTED'),do_lang_tempcode('DESCRIPTION_ENCRYPTED'),'encrypted',$encrypted==1));\n\n\t\trequire_code('fields');\n\t\t$type_list=nice_get_field_type($type,$name!='');\n\t\t$fields->attach(form_input_list(do_lang_tempcode('TYPE'),do_lang_tempcode('DESCRIPTION_FIELD_TYPE'),'type',$type_list));\n\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('REQUIRED'),do_lang_tempcode('DESCRIPTION_REQUIRED'),'required',$required==1));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('SHOW_ON_JOIN_FORM'),do_lang_tempcode('DESCRIPTION_SHOW_ON_JOIN_FORM'),'show_on_join_form',$show_on_join_form==1));\n\t\t$orderlist=new ocp_tempcode();\n\t\t$num_cpfs=$GLOBALS['FORUM_DB']->query_value('f_custom_fields','COUNT(*)');\n\t\tif ($name=='') $num_cpfs++;\n\t\t$selected_one=false;\n\t\tfor ($i=0;$i<(is_null($order)?$num_cpfs:max($num_cpfs,$order));$i++)\n\t\t{\n\t\t\t$selected=(($i===$order) || (($name=='') && ($i==$num_cpfs-1)));\n\t\t\tif ($selected) $selected_one=true;\n\t\t\t$orderlist->attach(form_input_list_entry(strval($i),$selected,integer_format($i+1)));\n\t\t}\n\t\tif (!$selected_one)\n\t\t{\n\t\t\t$orderlist->attach(form_input_list_entry(strval($order),true,integer_format($order+1)));\n\t\t}\n\t\t$fields->attach(form_input_list(do_lang_tempcode('ORDER'),do_lang_tempcode('DESCRIPTION_FIELD_ORDER'),'order',$orderlist));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('SHOW_IN_POSTS'),do_lang_tempcode('DESCRIPTION_SHOW_IN_POSTS'),'show_in_posts',$show_in_posts==1));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('SHOW_IN_POST_PREVIEWS'),do_lang_tempcode('DESCRIPTION_SHOW_IN_POST_PREVIEWS'),'show_in_post_previews',$show_in_post_previews==1));\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name','g_is_super_admin'),array('g_is_private_club'=>0));\n\t\tif ($locked==0)\n\t\t{\n\t\t\t$groups=new ocp_tempcode();\n\t\t\t//$groups=form_input_list_entry('-1',false,do_lang_tempcode('_ALL'));\n\t\t\tforeach ($rows as $group)\n\t\t\t{\n\t\t\t\tif ($group['id']!=db_get_first_id())\n\t\t\t\t\t$groups->attach(form_input_list_entry(strval($group['id']),count(array_intersect(array($group['id']),explode(',',$only_group)))!=0,get_translated_text($group['g_name'],$GLOBALS['FORUM_DB'])));\n\t\t\t}\n\t\t\t$fields->attach(form_input_multi_list(do_lang_tempcode('GROUP'),do_lang_tempcode('DESCRIPTION_FIELD_ONLY_GROUP'),'only_group',$groups));\n\t\t} else\n\t\t{\n\t\t\t$hidden->attach(form_input_hidden('only_group',''));\n\t\t}\n\n\t\treturn array($fields,$hidden);\n\t}", "function commentForm($row='', $legend='Add a Comment') {\n global $type, $spc;\n $maxRows = 5;\n $maxCols = 65;\n $stSize = 30;\n $captcha = showCaptchaImage();\n print \"<br/><br/>\\n<fieldset>\\n<legend>&nbsp; $legend &nbsp;</legend>\\n\";\n print \"<table>\\n\";\n print \"<tr><td>Name:</td><td><input name='cmtName' size='$stSize' maxlength='256' value='\".$row['cmtName'].\"'></td></tr>\\n\";\n print \"<tr><td>Email:</td><td><input name='cmtEmail' size='$stSize' maxlength='256' value='\".$row['cmtEmail'].\"'>$spc<input type='checkbox' name='hideEmail' value='Y' \".(($row['hideEmail'] == \"Y\") ? \"checked\" : \"\").\"> hide</td></tr>\\n\";\n if ($type == \"G\") {\n print \"<tr><td>Website:</td><td><input name='cmtWebsite' size='$stSize' maxlength='256' value='\".$row['cmtWebsite'].\"'>$spc<input type='checkbox' name='hideWebsite' value='Y' \".(($row['hideWebsite'] == \"Y\") ? \"checked\" : \"\").\"> hide</td></tr>\\n\";\n }\n print \"<tr><td>Subject:</td><td><input name='cmtSubject' size='$stSize' maxlength='256' value='\".$row['cmtSubject'].\"'></td></tr>\\n\";\n print \"<tr><td colspan='2'><textarea name='cmtText' rows='$maxRows' cols='$maxCols'>\".$row['cmtText'].\"</textarea></td></tr>\\n\";\n if ($type != \"G\") {\n print \"<tr><td align='right'><input type='checkbox' name='replyNotify' value='Y' \".(($row['replyNotify'] == \"Y\") ? \"checked\" : \"\").\"></td><td>$spc Notify me of followup comments via email</td></tr>\\n\";\n }\n print \"<tr><td colspan='2'><br/></td></tr>\\n\";\n print \"<tr><td colspan='2'>\";\n print \"Enter the letters: <input name='captcha' size='12'>$spc$captcha</td></tr>\\n\";\n print \"<tr><td colspan='2'><br/></td></tr>\\n\";\n print \"<tr><td colspan='2'>\n <input type='submit' name='cmtSubmit' value='Preview'>$spc$spc\n <input type='submit' name='cmtSubmit' value='Save'>$spc$spc\n <input type='submit' name='cmtSubmit' value='Cancel'>$spc$spc\n <input type='submit' name='foo' value='Click here if letters are unreadable'></td></tr>\\n\";\n # all the last does is load another CAPTCHA pic. All vars are passed in $_POST[]\n print \"</table>\\n</fieldset>\\n\";\n}", "private function upload( $field_details , $field_id, $value, $serial_number ){\n\t\t\t//$t = DATATYPE - integer; FUNCTION - defines the tab index as well as the element name\n\t\t\t//$ctrl = DATATYPE - string; FUNCTION - sets the default value of the element\n\t\t\t$returning_html_data = '<input type=\"file\" tabindex=\"'.$serial_number.'\" class=\"form-gen-element '. ( ( isset( $field_details[ 'class' ]) ) ? $field_details[ 'class' ] : '' ) .' '.$this->lbl.'\" name=\"'.$field_id.'\" '.(isset($this->disable_form_element[$field_id])?$this->disable_form_element[$field_id]:'').' acceptable-files-format=\"'.(isset( $field_details['acceptable_files_format'] )?$field_details['acceptable_files_format']:'').'\" ' . ( isset ( $field_details['attributes'] ) ? $field_details['attributes'] : '' ) . ' data-value=\"'.$value.'\" />';\n\t\t\t\n\t\t\treturn $returning_html_data;\n\t\t}", "abstract public function processForm();", "function entry($fields = NULL) {\n global $_id, $_nocheck, $file_error_types;\n if (!$fields) $fields = get_fields();\n if (!$fields) return;\n $err = $_nocheck ? NULL : entry_errors($fields, $_id);\n if ($err) {\n echo h('p', h('strong', 'Entry errors'));\n echo h('ol', h('li', implode(\"\\n</li><li>\", $err)));\n echo h('p', 'Please go back to fix the errors or \nsubmit with the \"Don\\'t check errors\" button.');\n echo \"<pre>Entry: \";\n print_r($fields);\n echo \"\\$_FILES: \";\n print_r($_FILES[\"file\"]);\n echo \"\\$_REQUEST: \";\n print_r($_REQUEST);\n echo \"\\$_SERVER: \";\n print_r($_SERVER);\n echo \"</pre>\\n\";\n } else {\n insert($fields, $_id);\n }\n}", "private function edit_page () {\r\n\t\t?>\r\n\t\t<style>\r\n\t\t\t#chargeio_submit_container {\r\n\t\t\t\tclear: both;\r\n\t\t\t}\r\n\r\n\t\t\t.chargeio_col_heading {\r\n\t\t\t\tpadding-bottom: 2px;\r\n\t\t\t\tborder-bottom: 1px solid #ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\twidth: 120px;\r\n\t\t\t}\r\n\r\n\t\t\t.chargeio_field_cell {\r\n\t\t\t\tpadding: 6px 17px 0 0;\r\n\t\t\t\tmargin-right: 15px;\r\n\t\t\t}\r\n\r\n\t\t\t.chargeio_validation_error {\r\n\t\t\t\tbackground-color: #FFDFDF;\r\n\t\t\t\tmargin-top: 4px;\r\n\t\t\t\tmargin-bottom: 6px;\r\n\t\t\t\tpadding-top: 6px;\r\n\t\t\t\tpadding-bottom: 6px;\r\n\t\t\t\tborder: 1px dotted #C89797;\r\n\t\t\t}\r\n\r\n\t\t\t.chargeio_validation_error span {\r\n\t\t\t\tcolor: red;\r\n\t\t\t}\r\n\r\n\t\t\t.left_header {\r\n\t\t\t\tfloat: left;\r\n\t\t\t\twidth: 200px;\r\n\t\t\t}\r\n\r\n\t\t\t.margin_vertical_10 {\r\n\t\t\t\tmargin: 10px 0;\r\n\t\t\t\tpadding-left: 5px;\r\n\t\t\t\tmin-height: 17px;\r\n\t\t\t}\r\n\r\n\t\t\t.margin_vertical_30 {\r\n\t\t\t\tmargin: 30px 0;\r\n\t\t\t\tpadding-left: 5px;\r\n\t\t\t}\r\n\r\n\t\t\t.width-1 {\r\n\t\t\t\twidth: 300px;\r\n\t\t\t}\r\n\r\n\t\t\t.gfp_chargeio_invalid_form {\r\n\t\t\t\tmargin-top: 30px;\r\n\t\t\t\tbackground-color: #FFEBE8;\r\n\t\t\t\tborder: 1px solid #CC0000;\r\n\t\t\t\tpadding: 10px;\r\n\t\t\t\twidth: 600px;\r\n\t\t\t}\r\n\t\t</style>\r\n\r\n\t\t<script type=\"text/javascript\" src=\"<?php echo GFCommon::get_base_url() ?>/js/gravityforms.js\"></script>\r\n\t\t<script type=\"text/javascript\">var form = Array();</script>\r\n\r\n\t\t<div class=\"wrap\">\r\n\t\t<img alt=\"<?php _e( 'ChargeIO', 'gfp-chargeio' ) ?>\" style=\"margin: 15px 7px 0pt 0pt; float: left;\"\r\n\t\t\t\t src=\"<?php echo self::$_this->get_base_url() ?>/images/chargeio_wordpress_icon_32.png\"/>\r\n\r\n\t\t<h2><?php _e( 'ChargeIO Transaction Settings', 'gfp-chargeio' ) ?></h2>\r\n\r\n\t\t<?php\r\n\r\n\t\t//getting setting id (0 when creating a new one)\r\n\t\t$id = ! empty( $_POST['chargeio_setting_id'] ) ? $_POST['chargeio_setting_id'] : absint( $_GET['id'] );\r\n\t\t$feed = empty( $id ) ? array(\r\n\t\t\t'meta' => array(),\r\n\t\t\t'is_active' => true ) : GFP_ChargeIO_Data::get_feed( $id );\r\n\t\t$is_validation_error = false;\r\n\r\n\t\t//updating meta information\r\n\t\tif ( rgpost( 'gfp_chargeio_submit' ) ) {\r\n\r\n\t\t\t$feed['form_id'] = absint( rgpost( 'gfp_chargeio_form' ) );\r\n\t\t\t$feed['meta']['type'] = rgpost( 'gfp_chargeio_type' );\r\n\t\t\t$feed['meta']['update_post_action'] = rgpost( 'gfp_chargeio_update_action' );\r\n\r\n\t\t\t// chargeio conditional\r\n\t\t\t$feed['meta']['chargeio_conditional_enabled'] = rgpost( 'gfp_chargeio_conditional_enabled' );\r\n\t\t\t$feed['meta']['chargeio_conditional_field_id'] = rgpost( 'gfp_chargeio_conditional_field_id' );\r\n\t\t\t$feed['meta']['chargeio_conditional_operator'] = rgpost( 'gfp_chargeio_conditional_operator' );\r\n\t\t\t$feed['meta']['chargeio_conditional_value'] = rgpost( 'gfp_chargeio_conditional_value' );\r\n\r\n\t\t\t//-----------------\r\n\r\n\t\t\t$customer_fields = $this->get_customer_fields();\r\n\t\t\t$feed['meta']['customer_fields'] = array();\r\n\t\t\tforeach ( $customer_fields as $field ) {\r\n\t\t\t\t$feed['meta']['customer_fields'][$field['name']] = $_POST[\"chargeio_customer_field_{$field[\"name\"]}\"];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$merchant_fields = $this->get_merchant_fields();\r\n\t\t\t$feed['meta']['merchant_fields'] = array();\r\n\t\t\tforeach ( $merchant_fields as $field ) {\r\n\t\t\t\t$feed['meta']['merchant_fields'][$field['name']] = isset($_POST[\"chargeio_merchant_field_{$field[\"name\"]}\"]) ? $_POST[\"chargeio_merchant_field_{$field[\"name\"]}\"] : \"\";\r\n\t\t\t}\r\n\r\n\t\t\t$feed = apply_filters( 'gfp_chargeio_save_feed', $feed );\r\n\r\n\t\t\t$is_validation_error = apply_filters( 'gfp_chargeio_feed_validation', false, $feed );\r\n\r\n\t\t\tif ( ! $is_validation_error ) {\r\n\t\t\t\t$id = GFP_ChargeIO_Data::update_feed( $id, $feed[\"form_id\"], $feed[\"is_active\"], $feed[\"meta\"] );\r\n\t\t\t\t?>\r\n\t\t\t\t<div class=\"updated fade\"\r\n\t\t\t\t\t\t style=\"padding:6px\"><?php echo sprintf( __( \"Feed Updated. %sback to list%s\", 'gfp-chargeio' ), \"<a href='?page=gfp_chargeio'>\", '</a>' ) ?></div>\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$is_validation_error = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$form = isset( $feed['form_id'] ) && $feed['form_id'] ? $form = RGFormsModel::get_form_meta( $feed['form_id'] ) : array();\r\n\t\t$settings = self::$_this->get_settings(); \r\n\t\t?>\r\n\t\t<form method=\"post\" action=\"\">\r\n\t\t\t<input type=\"hidden\" name=\"chargeio_setting_id\" value=\"<?php echo $id ?>\"/>\r\n\r\n\t\t\t<div class=\"margin_vertical_10 <?php echo $is_validation_error ? 'chargeio_validation_error' : '' ?>\">\r\n\t\t\t\t<?php\r\n\t\t\t\tif ( $is_validation_error ) {\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<span><?php _e( 'There was an issue saving your feed. Please address the errors below and try again.' ); ?></span>\r\n\t\t\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</div>\r\n\t\t\t<!-- / validation message -->\r\n\r\n\r\n\r\n\t\t\t<?php\r\n\r\n\t\t\tif ( has_action( 'gfp_chargeio_feed_transaction_type' ) ) {\r\n\t\t\t\tdo_action( 'gfp_chargeio_feed_transaction_type', $settings, $feed );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$feed['meta']['type'] = 'product' ?>\r\n\r\n\t\t\t\t<input id=\"gfp_chargeio_type\" type=\"hidden\" name=\"gfp_chargeio_type\" value=\"product\">\r\n\r\n\r\n\t\t\t<?php } ?>\r\n\r\n\r\n\t\t\t<div id=\"chargeio_form_container\" valign=\"top\"\r\n\t\t\t\t\t class=\"margin_vertical_10\" <?php echo empty( $feed['meta']['type'] ) ? \"style='display:none;'\" : '' ?>>\r\n\t\t\t\t<label for=\"gfp_chargeio_form\"\r\n\t\t\t\t\t\t\t class=\"left_header\"><?php _e( 'Gravity Form', 'gfp-chargeio' ); ?> <?php gform_tooltip( 'chargeio_gravity_form' ) ?></label>\r\n\r\n\t\t\t\t<select id=\"gfp_chargeio_form\" name=\"gfp_chargeio_form\"\r\n\t\t\t\t\t\t\t\tonchange=\"SelectForm(jQuery('#gfp_chargeio_type').val(), jQuery(this).val(), '<?php echo rgar( $feed, 'id' ) ?>');\">\r\n\t\t\t\t\t<option value=\"\"><?php _e( 'Select a form', 'gfp-chargeio' ); ?> </option>\r\n\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t$active_form = rgar( $feed, 'form_id' );\r\n\t\t\t\t\t$available_forms = GFP_ChargeIO_Data::get_available_forms( $active_form );\r\n\r\n\t\t\t\t\tforeach ( $available_forms as $current_form ) {\r\n\t\t\t\t\t\t$selected = absint( $current_form->id ) == rgar( $feed, 'form_id' ) ? 'selected=\"selected\"' : '';\r\n\t\t\t\t\t\t?>\r\n\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\tvalue=\"<?php echo absint( $current_form->id ) ?>\" <?php echo $selected; ?>><?php echo esc_html( $current_form->title ) ?></option>\r\n\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t\t</select> &nbsp;&nbsp; <img src=\"<?php echo GFP_ChargeIO::get_base_url() ?>/images/loading.gif\" id=\"chargeio_wait\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle=\"display: none;\"/>\r\n\r\n\t\t\t\t<div id=\"gfp_chargeio_invalid_product_form\" class=\"gfp_chargeio_invalid_form\" style=\"display:none;\">\r\n\t\t\t\t\t<?php _e( 'The form selected does not have any Product fields. Please add a Product field to the form and try again.', 'gfp-chargeio' ) ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"gfp_chargeio_invalid_creditcard_form\" class=\"gfp_chargeio_invalid_form\" style=\"display:none;\">\r\n\t\t\t\t\t<?php _e( 'The form selected does not have a credit card field. Please add a credit card field to the form and try again.', 'gfp-chargeio' ) ?>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"chargeio_field_group\"\r\n\t\t\t\t\t valign=\"top\" <?php echo strlen( rgars( $feed, \"meta/type\" ) ) == 0 || empty( $feed[\"form_id\"] ) ? \"style='display:none;'\" : '' ?>>\r\n\r\n\r\n\t\t\t\t<?php do_action( 'gfp_chargeio_feed_before_billing', $feed, $form ); ?>\r\n\t\t\t\t<div class=\"margin_vertical_10\"\r\n\t\t\t\t\t\t id=\"gfp_chargeio_billing_info\" <?php echo ( false == apply_filters( 'gfp_chargeio_display_billing_info', true, $feed ) ) ? \"style='display:none;'\" : '' ?>>\r\n\t\t\t\t\t<label\r\n\t\t\t\t\t\tclass=\"left_header\"><?php _e( 'Billing Information', 'gfp-chargeio' ); ?> <?php gform_tooltip( 'chargeio_customer' ) ?></label>\r\n\r\n\t\t\t\t\t<div id=\"chargeio_customer_fields\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tif ( ! empty( $form ) )\r\n\t\t\t\t\t\t\techo $this->get_customer_information( $form, $feed );\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<?php do_action( 'gfp_chargeio_feed_after_billing', $feed, $form ); ?>\r\n\r\n\t\t\t\t<?php do_action( 'gfp_chargeio_feed_before_merchant', $feed, $form ); ?>\r\n\t\t\t\t<div class=\"margin_vertical_10\">\r\n\t\t\t\t\t<label\r\n\t\t\t\t\t\tclass=\"left_header\"><?php _e( 'Merchant Options', 'gfp-chargeio' ); ?> <?php gform_tooltip( 'chargeio_options' ) ?></label>\r\n\r\n\t\t\t\t\t<div id=\"chargeio_merchant_fields\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tif ( ! empty( $form ) )\r\n\t\t\t\t\t\t\techo $this->get_merchant_information( $form, $feed );\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<?php do_action( 'gfp_chargeio_feed_after_merchant', $feed, $form ); ?>\r\n\r\n\r\n\t\t\t\t<div class=\"margin_vertical_10\">\r\n\t\t\t\t\t<label\r\n\t\t\t\t\t\tclass=\"left_header\"><?php _e( 'Other Options', 'gfp-chargeio' ); ?> <?php gform_tooltip( 'chargeio_options' ) ?></label>\r\n\r\n\t\t\t\t\t<ul style=\"overflow:hidden;\">\r\n\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$display_post_fields = ! empty( $form ) ? GFCommon::has_post_field( $form['fields'] ) : false;\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t<li\r\n\t\t\t\t\t\t\tid=\"chargeio_post_update_action\" <?php echo $display_post_fields && 'subscription' == $feed['meta']['type'] ? '' : \"style='display:none;'\" ?>>\r\n\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"gfp_chargeio_update_post\" id=\"gfp_chargeio_update_post\"\r\n\t\t\t\t\t\t\t\t\t\t value=\"1\" <?php echo rgar( $feed['meta'], 'update_post_action' ) ? \"checked='checked'\" : \"\" ?>\r\n\t\t\t\t\t\t\t\t\t\t onclick=\"var action = this.checked ? 'draft' : ''; jQuery('#gfp_chargeio_update_action').val(action);\"/>\r\n\t\t\t\t\t\t\t<label class=\"inline\"\r\n\t\t\t\t\t\t\t\t\t\t for=\"gfp_chargeio_update_post\"><?php _e( 'Update Post when subscription is canceled.', 'gfp-chargeio' ); ?> <?php gform_tooltip( 'chargeio_update_post' ) ?></label>\r\n\t\t\t\t\t\t\t<select id=\"gfp_chargeio_update_action\" name=\"gfp_chargeio_update_action\"\r\n\t\t\t\t\t\t\t\t\t\t\tonchange=\"var checked = jQuery(this).val() ? 'checked' : false; jQuery('#gfp_chargeio_update_post').attr('checked', checked);\">\r\n\t\t\t\t\t\t\t\t<option value=\"\"></option>\r\n\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\tvalue=\"draft\" <?php echo 'draft' == rgar( $feed[\"meta\"], 'update_post_action' ) ? \"selected='selected'\" : \"\" ?>><?php _e( 'Mark Post as Draft', 'gfp-chargeio' ) ?></option>\r\n\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\tvalue=\"delete\" <?php echo 'delete' == rgar( $feed[\"meta\"], 'update_post_action' ) ? \"selected='selected'\" : \"\" ?>><?php _e( 'Delete Post', 'gfp-chargeio' ) ?></option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t<?php do_action( 'gfp_chargeio_feed_options', $feed, $form ) ?>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t\r\n\t\t\t\t<?php do_action( 'gfp_chargeio_feed_setting', $feed, $form ); ?>\r\n\r\n\t\t\t\t<div id=\"gfp_chargeio_conditional_section\" valign=\"top\" class=\"margin_vertical_10\">\r\n\t\t\t\t\t<label for=\"gfp_chargeio_conditional_optin\"\r\n\t\t\t\t\t\t\t\t class=\"left_header\"><?php _e( 'ChargeIO Condition', 'gfp-chargeio' ); ?> <?php gform_tooltip( 'chargeio_conditional' ) ?></label>\r\n\r\n\t\t\t\t\t<div id=\"gfp_chargeio_conditional_option\">\r\n\t\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\">\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"gfp_chargeio_conditional_enabled\" name=\"gfp_chargeio_conditional_enabled\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t value=\"1\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t onclick=\"if(this.checked){jQuery('#gfp_chargeio_conditional_container').fadeIn('fast');} else{ jQuery('#gfp_chargeio_conditional_container').fadeOut('fast'); }\" <?php echo rgar( $feed['meta'], 'chargeio_conditional_enabled' ) ? \"checked='checked'\" : '' ?>/>\r\n\t\t\t\t\t\t\t\t\t<label for=\"gfp_chargeio_conditional_enable\"><?php _e( 'Enable', 'gfp-chargeio' ); ?></label>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\t\t\tid=\"gfp_chargeio_conditional_container\" <?php echo ! rgar( $feed['meta'], 'chargeio_conditional_enabled' ) ? \"style='display:none'\" : '' ?>>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div id=\"gfp_chargeio_conditional_fields\" style=\"display:none\">\r\n\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'Send to ChargeIO if ', 'gfp-chargeio' ) ?>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t<select id=\"gfp_chargeio_conditional_field_id\" name=\"gfp_chargeio_conditional_field_id\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"optin_select\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonchange='jQuery(\"#gfp_chargeio_conditional_value_container\").html(GetFieldValues(jQuery(this).val(), \"\", 20));'> </select>\r\n\t\t\t\t\t\t\t\t\t\t\t<select id=\"gfp_chargeio_conditional_operator\" name=\"gfp_chargeio_conditional_operator\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"is\" <?php selected( 'is', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'is', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"isnot\" <?php selected( 'isnot', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'is not', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\">\" <?php selected( '>', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'greater than', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"<\" <?php selected( '<', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'less than', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"contains\" <?php selected( 'contains', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'contains', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"starts_with\" <?php selected( 'starts_with', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'starts with', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"ends_with\" <?php selected( 'ends_with', rgar( $feed['meta'], 'chargeio_conditional_operator' ), true ); ?>>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'ends with', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t\t</select>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"gfp_chargeio_conditional_value_container\" name=\"gfp_chargeio_conditional_value_container\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t style=\"display:inline\"></div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div id=\"gfp_chargeio_conditional_message\" style=\"display:none\">\r\n\t\t\t\t\t\t\t\t\t\t\t<?php _e( 'To create a registration condition, your form must have a field supported by conditional logic', 'gfp-chargeio' ) ?>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- / chargeio conditional -->\r\n\r\n\t\t\t\t<div id=\"chargeio_submit_container\" class=\"margin_vertical_30\">\r\n\t\t\t\t\t<input type=\"submit\" name=\"gfp_chargeio_submit\"\r\n\t\t\t\t\t\t\t\t value=\"<?php echo empty( $id ) ? __( ' Save ', 'gfp-chargeio' ) : __( 'Update', 'gfp-chargeio' ); ?>\"\r\n\t\t\t\t\t\t\t\t class=\"button-primary\"/> <input type=\"button\" value=\"<?php _e( 'Cancel', 'gfp-chargeio' ); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t class=\"button\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t onclick=\"javascript:document.location='admin.php?page=gfp_chargeio'\"/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</form>\r\n\t\t</div>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\r\n\t\t\tfunction SelectType( type ) {\r\n\t\t\t\tjQuery( \"#chargeio_field_group\" ).slideUp();\r\n\r\n\t\t\t\tjQuery( \"#chargeio_field_group input[type=\\\"text\\\"], #chargeio_field_group select\" ).val( \"\" );\r\n\r\n\t\t\t\tjQuery( \"#chargeio_field_group input:checked\" ).attr( \"checked\", false );\r\n\r\n\t\t\t\tif ( type ) {\r\n\t\t\t\t\tjQuery( \"#chargeio_form_container\" ).slideDown();\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_form\" ).val( \"\" );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tjQuery( \"#chargeio_form_container\" ).slideUp();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction SelectForm( type, formId, settingId ) {\r\n\t\t\t\tif ( !formId ) {\r\n\t\t\t\t\tjQuery( \"#chargeio_field_group\" ).slideUp();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tjQuery( \"#chargeio_wait\" ).show();\r\n\t\t\t\tjQuery( \"#chargeio_field_group\" ).slideUp();\r\n\r\n\t\t\t\tvar mysack = new sack( ajaxurl );\r\n\t\t\t\tmysack.execute = 1;\r\n\t\t\t\tmysack.method = 'POST';\r\n\t\t\t\tmysack.setVar( \"action\", \"gfp_select_chargeio_form\" );\r\n\t\t\t\tmysack.setVar( \"gfp_select_chargeio_form\", \"<?php echo wp_create_nonce( 'gfp_select_chargeio_form' ) ?>\" );\r\n\t\t\t\tmysack.setVar( \"type\", type );\r\n\t\t\t\tmysack.setVar( \"form_id\", formId );\r\n\t\t\t\tmysack.setVar( \"setting_id\", settingId );\r\n\t\t\t\tmysack.encVar( \"cookie\", document.cookie, false );\r\n\t\t\t\tmysack.onError = function () {\r\n\t\t\t\t\tjQuery( \"#chargeio_wait\" ).hide();\r\n\t\t\t\t\talert( '<?php _e( 'Ajax error while selecting a form', 'gfp-chargeio' ) ?>' )\r\n\t\t\t\t};\r\n\t\t\t\tmysack.runAJAX();\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tfunction EndSelectForm( form_meta, customer_fields, merchant_fields, additional_functions ) {\r\n\t\t\t\t//setting global form object\r\n\t\t\t\tform = form_meta;\r\n\r\n\t\t\t\tif ( !( typeof additional_functions === 'null' ) ) {\r\n\t\t\t\t\tvar populate_field_options = additional_functions.populate_field_options;\r\n\t\t\t\t\tvar post_update_action = additional_functions.post_update_action;\r\n\t\t\t\t\tvar show_fields = additional_functions.show_fields;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar populate_field_options = '';\r\n\t\t\t\t\tvar post_update_action = '';\r\n\t\t\t\t\tvar show_fields = '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar type = jQuery( \"#gfp_chargeio_type\" ).val();\r\n\r\n\t\t\t\tjQuery( \".gfp_chargeio_invalid_form\" ).hide();\r\n\t\t\t\tif ( ( 'product' == type || 'subscription' == type || 'update-subscription' == type ) && GetFieldsByType( ['product'] ).length == 0 ) {\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_invalid_product_form\" ).show();\r\n\t\t\t\t\tjQuery( \"#chargeio_wait\" ).hide();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse if ( ( 'product' == type || 'subscription' == type || 'update-billing' == type ) && GetFieldsByType( ['creditcard'] ).length == 0 ) {\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_invalid_creditcard_form\" ).show();\r\n\t\t\t\t\tjQuery( \"#chargeio_wait\" ).hide();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tjQuery( \".chargeio_field_container\" ).hide();\r\n\t\t\t\tjQuery( \"#chargeio_customer_fields\" ).html( customer_fields );\r\n\t\t\t\tif ( populate_field_options.length > 0 ) {\r\n\t\t\t\t\tvar func;\r\n\t\t\t\t\tfor ( var i = 0; i < populate_field_options.length; i++ ) {\r\n\t\t\t\t\t\tfunc = new Function( populate_field_options[ i ] );\r\n\t\t\t\t\t\tfunc();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tjQuery( \"#chargeio_merchant_fields\" ).html( merchant_fields );\r\n\t\t\t\tif ( populate_field_options.length > 0 ) {\r\n\t\t\t\t\tvar func;\r\n\t\t\t\t\tfor ( var i = 0; i < populate_field_options.length; i++ ) {\r\n\t\t\t\t\t\tfunc = new Function( populate_field_options[ i ] );\r\n\t\t\t\t\t\tfunc();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar post_fields = GetFieldsByType( [\"post_title\", \"post_content\", \"post_excerpt\", \"post_category\", \"post_custom_field\", \"post_image\", \"post_tag\"] );\r\n\t\t\t\tif ( post_update_action.length > 0 ) {\r\n\t\t\t\t\tvar func;\r\n\t\t\t\t\tfor ( var i = 0; i < post_update_action.length; i++ ) {\r\n\t\t\t\t\t\tfunc = new Function( 'type', 'post_fields', post_update_action[ i ] );\r\n\t\t\t\t\t\tfunc( type, post_fields );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_update_post\" ).attr( \"checked\", false );\r\n\t\t\t\t\tjQuery( \"#chargeio_post_update_action\" ).hide();\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Calling callback functions\r\n\t\t\t\tjQuery( document ).trigger( 'chargeioFormSelected', [form] );\r\n\r\n\t\t\t\tjQuery( \"#gfp_chargeio_conditional_enabled\" ).attr( 'checked', false );\r\n\t\t\t\tSetChargeIOCondition( \"\", \"\" );\r\n\r\n\t\t\t\tjQuery( \"#chargeio_field_container_\" + type ).show();\r\n\t\t\t\tif ( show_fields.length > 0 ) {\r\n\t\t\t\t\tvar func;\r\n\t\t\t\t\tfor ( var i = 0; i < show_fields.length; i++ ) {\r\n\t\t\t\t\t\tfunc = new Function( 'type', show_fields[ i ] );\r\n\t\t\t\t\t\tfunc( type );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tjQuery( \"#chargeio_field_group\" ).slideDown();\r\n\t\t\t\tjQuery( \"#chargeio_wait\" ).hide();\r\n\t\t\t}\r\n\r\n\r\n\t\t\tfunction GetFieldsByType( types ) {\r\n\t\t\t\tvar fields = new Array();\r\n\t\t\t\tfor ( var i = 0; i < form[\"fields\"].length; i++ ) {\r\n\t\t\t\t\tif ( IndexOf( types, form[\"fields\"][i][\"type\"] ) >= 0 )\r\n\t\t\t\t\t\tfields.push( form[\"fields\"][i] );\r\n\t\t\t\t}\r\n\t\t\t\treturn fields;\r\n\t\t\t}\r\n\r\n\t\t\tfunction IndexOf( ary, item ) {\r\n\t\t\t\tfor ( var i = 0; i < ary.length; i++ )\r\n\t\t\t\t\tif ( ary[i] == item )\r\n\t\t\t\t\t\treturn i;\r\n\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\r\n\t\t</script>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\r\n\t\t\t// ChargeIO Conditional Functions\r\n\r\n\t\t\t<?php\r\n\t\t\t\tif ( ! empty( $feed['form_id'] ) ) {\r\n\t\t\t\t\t?>\r\n\r\n\t\t\t// initialize form object\r\n\t\t\tform = <?php echo GFCommon::json_encode( $form )?>;\r\n\r\n\t\t\t// initializing registration condition drop downs\r\n\t\t\tjQuery( document ).ready( function () {\r\n\t\t\t\tvar selectedField = \"<?php echo str_replace( '\"', '\\\"', $feed[ 'meta' ][ 'chargeio_conditional_field_id' ] )?>\";\r\n\t\t\t\tvar selectedValue = \"<?php echo str_replace( '\"', '\\\"', $feed[ 'meta' ][ 'chargeio_conditional_value' ] )?>\";\r\n\t\t\t\tSetChargeIOCondition( selectedField, selectedValue );\r\n\t\t\t} );\r\n\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\t?>\r\n\r\n\t\t\tfunction SetChargeIOCondition( selectedField, selectedValue ) {\r\n\r\n\t\t\t\t// load form fields\r\n\t\t\t\tjQuery( \"#gfp_chargeio_conditional_field_id\" ).html( GetSelectableFields( selectedField, 20 ) );\r\n\t\t\t\tvar optinConditionField = jQuery( \"#gfp_chargeio_conditional_field_id\" ).val();\r\n\t\t\t\tvar checked = jQuery( \"#gfp_chargeio_conditional_enabled\" ).attr( 'checked' );\r\n\r\n\t\t\t\tif ( optinConditionField ) {\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_message\" ).hide();\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_fields\" ).show();\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_value_container\" ).html( GetFieldValues( optinConditionField, selectedValue, 20 ) );\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_value\" ).val( selectedValue );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_message\" ).show();\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_fields\" ).hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( !checked ) {\r\n\t\t\t\t\tjQuery( \"#gfp_chargeio_conditional_container\" ).hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tfunction GetFieldValues( fieldId, selectedValue, labelMaxCharacters ) {\r\n\t\t\t\tif ( !fieldId )\r\n\t\t\t\t\treturn \"\";\r\n\r\n\t\t\t\tvar str = \"\";\r\n\t\t\t\tvar field = GetFieldById( fieldId );\r\n\t\t\t\tif ( !field )\r\n\t\t\t\t\treturn \"\";\r\n\r\n\t\t\t\tvar isAnySelected = false;\r\n\r\n\t\t\t\tif ( ( 'post_category' == field['type'] ) && field['displayAllCategories'] ) {\r\n\t\t\t\t\tstr += '<?php $select = wp_dropdown_categories( array(\r\n\t\t\t\t\t'orderby' => 'name',\r\n\t\t\t\t\t'hide_empty' => 0,\r\n\t\t\t\t\t'echo' => false,\r\n\t\t\t\t\t'hierarchical' => true,\r\n\t\t\t\t\t'name' => 'gfp_chargeio_conditional_value',\r\n\t\t\t\t\t'id' => 'gfp_chargeio_conditional_value',\r\n\t\t\t\t\t'class' => 'optin_select'\r\n\t\t\t\t\t));\r\n\t\t\t\t\techo str_replace( \"\\n\",\"\", str_replace( \"'\",\"\\\\'\",$select ) ); ?>';\r\n\t\t\t\t}\r\n\t\t\t\telse if ( field.choices ) {\r\n\t\t\t\t\tstr += '<select id=\"gfp_chargeio_conditional_value\" name=\"gfp_chargeio_conditional_value\" class=\"optin_select\">'\r\n\r\n\t\t\t\t\tfor ( var i = 0; i < field.choices.length; i++ ) {\r\n\t\t\t\t\t\tvar fieldValue = field.choices[i].value ? field.choices[i].value : field.choices[i].text;\r\n\t\t\t\t\t\tvar isSelected = fieldValue == selectedValue;\r\n\t\t\t\t\t\tvar selected = isSelected ? \"selected='selected'\" : \"\";\r\n\t\t\t\t\t\tif ( isSelected )\r\n\t\t\t\t\t\t\tisAnySelected = true;\r\n\r\n\t\t\t\t\t\tstr += \"<option value='\" + fieldValue.replace( /'/g, \"&#039;\" ) + \"' \" + selected + \">\" + TruncateMiddle( field.choices[i].text, labelMaxCharacters ) + \"</option>\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( !isAnySelected && selectedValue ) {\r\n\t\t\t\t\t\tstr += \"<option value='\" + selectedValue.replace( /'/g, \"&#039;\" ) + \"' selected='selected'>\" + TruncateMiddle( selectedValue, labelMaxCharacters ) + \"</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstr += \"</select>\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tselectedValue = selectedValue ? selectedValue.replace( /'/g, \"&#039;\" ) : \"\";\r\n\t\t\t\t\tstr += \"<input type='text' placeholder='<?php _e( 'Enter value', 'gfp-chargeio' ); ?>' id='gfp_chargeio_conditional_value' name='gfp_chargeio_conditional_value' value='\" + selectedValue.replace( /'/g, \"&#039;\" ) + \"'>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn str;\r\n\t\t\t}\r\n\r\n\t\t\tfunction GetFieldById( fieldId ) {\r\n\t\t\t\tfor ( var i = 0; i < form.fields.length; i++ ) {\r\n\t\t\t\t\tif ( form.fields[i].id == fieldId )\r\n\t\t\t\t\t\treturn form.fields[i];\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tfunction TruncateMiddle( text, maxCharacters ) {\r\n\t\t\t\tif ( text.length <= maxCharacters )\r\n\t\t\t\t\treturn text;\r\n\t\t\t\tvar middle = parseInt( maxCharacters / 2 );\r\n\t\t\t\treturn text.substr( 0, middle ) + \"...\" + text.substr( text.length - middle, middle );\r\n\t\t\t}\r\n\r\n\t\t\tfunction GetSelectableFields( selectedFieldId, labelMaxCharacters ) {\r\n\t\t\t\tvar str = \"\";\r\n\t\t\t\tvar inputType;\r\n\t\t\t\tfor ( var i = 0; i < form.fields.length; i++ ) {\r\n\t\t\t\t\tfieldLabel = form.fields[i].adminLabel ? form.fields[i].adminLabel : form.fields[i].label;\r\n\t\t\t\t\tfieldLabel = typeof fieldLabel == 'undefined' ? '' : fieldLabel;\r\n\t\t\t\t\tinputType = form.fields[i].inputType ? form.fields[i].inputType : form.fields[i].type;\r\n\t\t\t\t\tif ( IsConditionalLogicField( form.fields[i] ) ) {\r\n\t\t\t\t\t\tvar selected = form.fields[i].id == selectedFieldId ? \"selected='selected'\" : \"\";\r\n\t\t\t\t\t\tstr += \"<option value='\" + form.fields[i].id + \"' \" + selected + \">\" + TruncateMiddle( fieldLabel, labelMaxCharacters ) + \"</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn str;\r\n\t\t\t}\r\n\r\n\t\t\tfunction IsConditionalLogicField( field ) {\r\n\t\t\t\tinputType = field.inputType ? field.inputType : field.type;\r\n\t\t\t\tvar supported_fields = [\"checkbox\", \"radio\", \"select\", \"text\", \"website\", \"textarea\", \"email\", \"hidden\", \"number\", \"phone\", \"multiselect\", \"post_title\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"post_tags\", \"post_custom_field\", \"post_content\", \"post_excerpt\", \"total\"];\r\n\r\n\t\t\t\tvar index = jQuery.inArray( inputType, supported_fields );\r\n\r\n\t\t\t\treturn index >= 0;\r\n\t\t\t}\r\n\r\n\t\t</script>\r\n\r\n\t<?php\r\n\r\n\t}", "function aiken_display_form()\n{\n $name_tools = get_lang('ImportAikenQuiz');\n $form = '<div class=\"actions\">';\n $form .= '<a href=\"exercise.php?show=test&'.api_get_cidreq().'\">' .\n Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).'</a>';\n $form .= '</div>';\n $form_validator = new FormValidator(\n 'aiken_upload',\n 'post',\n api_get_self().\"?\".api_get_cidreq(),\n null,\n array('enctype' => 'multipart/form-data')\n );\n $form_validator->addElement('header', $name_tools);\n $form_validator->addElement('text', 'total_weight', get_lang('TotalWeight'));\n $form_validator->addElement('file', 'userFile', get_lang('DownloadFile'));\n $form_validator->addButtonUpload(get_lang('Upload'), 'submit');\n $form .= $form_validator->returnForm();\n $form .= '<blockquote>'.get_lang('ImportAikenQuizExplanation').'<br /><pre>'.get_lang('ImportAikenQuizExplanationExample').'</pre></blockquote>';\n echo $form;\n}", "function setup_Form_html()\n\t\t\t{\n\t\t\t\t$opt_image = mnml_themeoption($this->name, 'attr');\n\t\t\t\t$opt_thumb = ( mnml_themeoption($this->name.'-thumb') ? mnml_themeoption($this->name.'-thumb', 'attr') : $opt_image );\n\n\t\t\t\t$html =\t'<div class=\"the1-upload-field-wrapper\">' .\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"'. esc_attr($this->name) .'\" value=\"'.$opt_image.'\" class=\"upload-field the1-upload-field\" />' .\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"'.esc_attr($this->name).'-thumb\" value=\"'.$opt_thumb.'\" class=\"the1-upload-field-thumb\" />' .\n\t\t\t\t\t\t\t'<div style=\"line-height:0;\">' .\n\t\t\t\t\t\t\t\t'<div class=\"the1-upload-thumb\">' . \n\t\t\t\t\t\t\t\t\t'<div class=\"the1-upload-thumbinner\">' . ( $opt_thumb ? '<img src=\"'.$opt_thumb.'\"/>' : '' ) . '</div>' .\n\t\t\t\t\t\t\t\t\t'<div class=\"the1-upload-remove\"></div>' .\n\t\t\t\t\t\t\t\t'</div>' .\n\t\t\t\t\t\t\t'</div>' .\n\t\t\t\t\t\t\t'<a href=\"javascript:void(0);\" class=\"the1-btn2 the1-upload-btn\">+ Add Image</a>' .\n\t\t\t\t\t\t'</div>';\n\t\t\t\t\n\t\t\t\t$this->form_html = $html;\n\t\t\t}", "private function add_new_line(){\r\n\r\n $this->fields[] = array( 'newline' => true );\r\n\r\n }", "function form() {\n\tglobal $dbh, $bus_tbl;\n\t\n\t$noncert_adverts_form = table_form_header('* indicates required field');\n\t\n\t$noncert_adverts_form .= table_form_field('<span class=\"required\">*Name:</span>','<input name=\"name\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"'.$bus_tbl->name.'\">');\n\t$noncert_adverts_form .= table_form_field('<span class=\"required\">Address:</span>','<input name=\"address\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"'.$bus_tbl->address.'\">');\n\t$noncert_adverts_form .= table_form_field('<span class=\"required\">*City:</span>','<input name=\"city\" type=\"text\" size=\"50\" maxlength=\"100\" value=\"'.$bus_tbl->city.'\">');\n\t\t\t\t\n\t$noncert_adverts_form .= table_form_field('<span class=\"required\">*State:</span>','<select name=\"state\">'.gen_state_dd($bus_tbl->state).'</select>');\n\t$noncert_adverts_form .= table_form_field('<span class=\"required\">*Zip:</span>','<input name=\"zip\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"'.$bus_tbl->zip.'\">');\n\t$noncert_adverts_form .= table_form_field('Phone:','<input name=\"phone\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"'.$bus_tbl->phone.'\">');\n\t$noncert_adverts_form .= table_form_field('Email:','<input name=\"email\" type=\"text\" size=\"50\" maxlength=\"160\" value=\"'.$bus_tbl->email.'\">');\n\t$noncert_adverts_form .= table_form_field('URL:','<input name=\"url\" type=\"text\" size=\"50\" maxlength=\"120\" value=\"'.$bus_tbl->url.'\">');\n\t$noncert_adverts_form .= table_form_field('*Description:','<input name=\"description\" type=\"text\" size=\"50\" maxlength=\"200\" value=\"'.$bus_tbl->description.'\">');\n\n\t$noncert_adverts_form .= table_span_form_field('<center><input name=\"id\" type=\"hidden\" value=\"'.$bus_tbl->id.'\"><input name=\"submit\" type=\"submit\" value=\"Submit\"></center>');\n\t\n return $noncert_adverts_form;\n }", "function renderForm($word, $definition, $firstChapter, $error)\n\n{\n\n?>\n\n<!DOCTYPE html>\n\n<html>\n\n<head>\n\n<title>New Record</title>\n\n</head>\n\n<body>\n\n<?php\n\n// if there are any errors, display them\n\nif ($error != '') {\n\necho '<div style=\"padding:4px; border:1px solid red; color:red;\">'.$error.'</div>';\n\n}\n\n?>\n\n\n\n<form action=\"\" method=\"post\">\n\n<div>\n\n<strong>Word: *</strong> <input type=\"text\" name=\"word\" value=\"<?php echo $first; ?>\" /><br/>\n\n<strong>Definition: *</strong> <input type=\"text\" name=\"definition\" value=\"<?php echo $last; ?>\" /><br/>\n \n<strong>First Chapter: *</strong> <input type=\"text\" name=\"firstChapter\" value=\"<?php echo $last; ?>\" /><br/>\n\n<p>* required</p>\n\n<input type=\"submit\" name=\"submit\" value=\"Submit\">\n\n</div>\n\n</form>\n\n</body>\n\n</html>\n\n<?php\n\n\n}", "function display_form() {\n \n echo \"<form action='{$_SERVER['PHP_SELF']}' method='post' enctype='multipart/form-data'>\\n\";\n \n echo \"<p><strong><label for='{$this->field_name}'>Please select a file:</strong><br/>\\n\";\n \n echo \"<input type='hidden' name='MAX_FILE_SIZE' value='{$this->max_filesize}' />\\n\";\n \n echo \"<input type='file' name='{$this->field_name}' id='{$this->field_name}' />\\n\";\n \n echo \"</label></p>\\n\";\n \n echo \"<p><input type='submit' name='submit' value='Upload File' /></p>\\n\";\n \n echo \"</form>\\n\";\n \n }", "public static function write()\n {\n if(Request::fileUploaded()) { \n $fileid = uniqid().\".\".pathinfo($_FILES['fileToUpload']['name'], PATHINFO_EXTENSION);\n $target_file =BP.\"uploads/\".$fileid;\n\n move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file);\n } else {\n $fileid=\"none\";\n }\n /*\n * write applicants info in a single line of the csv file \n * NOTICE: the user could use a comma or new line character in the two textareas which WILL break this app\n * TODO: fix this with strtr\n */\n extract(Request::postArray());\n \n $myfile=fopen(\"public/studneti.txt\",\"a\");\n \n fwrite($myfile, $name.\",\".$email.\",\".$course.\",\".$year.\",\".$motivation.\",\".$foreknowledge.\",\".$languages.\",\".$fileid.PHP_EOL);\n \n \n }", "function tep_draw_file_field($name, $required = false) {\n $field = tep_draw_input_field($name, '', '', $required, 'file');\n\n return $field;\n }", "function vistaportal_submit_form($form, &$form_state) {\n $form = array();\n $form['#attributes'] = array('enctype' => array(\"multipart/form-data\"));\n $form['foo'] = array(\n '#type' => 'fieldset',\n //'#title' => t('Submission'),\n '#collapsible' => FALSE,\n '#prefix' => '<div id=\"submission-fieldset-wrapper\">',\n '#suffix' => '</div>',\n );\n $form['foo']['text'] = array(\n '#prefix' => '<div id=\"submit-page\">',\n '#markup' => t(\"<h1>Are you ready to submit your step 1 of your application?</h1><br>\n <p>Congratulations! Please click on the submit button below. Your <br>\n application will be sent immediately to a physician recruiter<br>\n assigned to your medical specialty. He or she will review your file <br>\n and be in contact within one business day to discuss your specific <br>\n interests and our current openings.</p>\"),\n '#suffix' => '</div>',\n );\n //This is the line separator\n $form['foo']['line3'] = array(\n '#prefix' => '<div class=\"line-solid-submit\">',\n //'#markup' => '<hr>',\n '#suffix' => '</div>',\n );\n\n $form['foo']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Submit'),\n '#submit' => array('vistaportal_submit_form_submit'),\n '#attributes' => array('class' => array('education-submit'))\n );\n $form['foo']['prev'] = array(\n '#type' => 'submit',\n '#value' => t('Previous'),\n '#limit_validation_errors' => array(),\n '#attributes' => array('class' => array('button prev prev')),\n '#submit' => array('vistaportal_submit_previous'),\n );\n $form['foo']['prev']['#attributes'] = array('class' => array('prev'));\n return $form;\n }", "function print_add_headline() {\n\t\t\tglobal $PHP_SELF, $connect;\n\t\t\t\n\t\t\tif (!$_POST['submit']) {\n\t\t\t\techo \"<p>Utilice el formulario que se presenta abajo para agregar noticias del proyecto.</p>\\n\\n\";\n\t\t\t\techo \"<form action=\\\"$PHP_SELF\\\" method=\\\"post\\\">\\n\";\n\t\t\t\techo \"<p>Título:&#160;&#160;<input type=\\\"text\\\" name=\\\"title\\\" size=\\\"40\\\" /></p>\\n\";\n\t\t\t\techo \"<p>Noticias:</p>\\n\";\n\t\t\t\techo \"<p><textarea name=\\\"news\\\" cols=\\\"70\\\" rows=\\\"20\\\"></textarea></p>\\n\";\n\t\t\t\techo \"<p><input type=\\\"submit\\\" name=\\\"submit\\\" value=\\\"Remitir\\\" /></p>\\n\";\n\t\t\t\techo \"</form>\\n\\n\";\n\t\t\t} else {\n\t\t\t\t$title = $_POST['title'];\n\t\t\t\t$news = $_POST['news'];\n\t\t\t\t$errorList = array();\n\t\t\t\t$count = 0;\n\t\t\t\tif (!$title) {\n\t\t\t\t\t$errorList[$count] = 'Invalid entry: Title';\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\tif (!$news) {\n\t\t\t\t\t$errorList[$count] = 'Invalid entry: News';\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\tif (sizeof($errorList) == 0) {\n\t\t\t\t\t$query = \"INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')\";\n\t\t\t\t\t$result = mysql_query($query) or die(\"Error: $query.\");\n\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\tdie(\"Error: $result.\");\n\t\t\t\t\t}\n\t\t\t\t\techo \"<p>La entrada fue agregada exitosamente. Puede bien sea <a href=\\\"list.php\\\">ver todos los titulares, <a href=\\\"add.php\\\">agregar otro titular</a> o <a href=\\\"/\\\">volver a la página principal de DarwinPorts</a>.</p>\\n\\n\";\n\t\t\t\t\tcreate_rss();\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p>Han ocurrido los siguientes errores:</p>\\n\\n\";\n\t\t\t\t\techo \"<ul>\\n\";\n\t\t\t\t\tfor ($x = 0; $x < sizeof($errorList); $x++) {\n\t\t\t\t\t\techo \"<li>$errorList[$x]</li>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"</ul>\\n\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function form(&$dat,$resno,$admin=\"\"){\n global $addinfo; $msg=\"\"; $hidden=\"\";\n\n $maxbyte = MAX_KB * 1024;\n $no=$resno;\n\n if($resno){\n $msg .= \"[<a href=\\\"\".PHP_SELF2.\"\\\">Return</a>]\\n\";\n $msg .= \"<table width='100%'><tr><th bgcolor=#e04000>\\n\";\n $msg .= \"<font color=#FFFFFF>Posting mode: Reply</font>\\n\";\n $msg .= \"</th></tr></table>\\n\";\n }\n if($admin){\n $hidden = \"<input type=hidden name=admin value=\\\"\".ADMIN_PASS.\"\\\">\";\n $msg = \"<h4>You can use raw HTML tags in this.</h4>\";\n }\n\n $dat.=$msg.'<center>\n<form action=\"'.PHP_SELF.'\" method=\"POST\" enctype=\"multipart/form-data\">\n<input type=hidden name=mode value=\"regist\">\n'.$hidden.'\n<input type=hidden name=\"MAX_FILE_SIZE\" value=\"'.$maxbyte.'\">\n';\n\n if($no){\n $dat.='<input type=hidden name=resto value=\"'.$no.'\">';\n }\n\n $dat.='<table cellpadding=1 cellspacing=1>\n <tr><td bgcolor=#eeaa88><b>Name</b></td><td><input type=text name=name size=\"28\"></td></tr>\n <tr><td bgcolor=#eeaa88><b>E-mail</b></td><td><input type=text name=email size=\"28\"></td></tr>\n <tr><td bgcolor=#eeaa88><b>Subject</b></td><td><input type=text name=sub size=\"35\">\n <input type=submit value=\"Post\"></td></tr>\n <tr><td bgcolor=#eeaa88><b>Comment</b></td><td><textarea name=com cols=\"48\" rows=\"4\" wrap=soft></textarea></td></tr>\n ';\n\n if(RESIMG || !$resno){\n $dat.='<tr><td bgcolor=#eeaa88><b>File</b></td>\n <td><input type=file name=upfile size=\"35\">\n [<label><input type=checkbox name=textonly value=on>No File</label>]</td></tr>';\n }\n\n $dat.='<tr><td bgcolor=#eeaa88><b>Password</b></td><td><input type=password name=pwd size=8 maxlength=8 value=\"\"><small>(Password used for file deletion)</small></td></tr>\n <tr><td colspan=2>\n <small>\n <ul>\n <LI>Supported file types are: GIF, JPG, PNG</LI>\n <LI>Maximum file size allowed is '.MAX_KB.' KB</LI>\n <LI>Images greater than '.MAX_W.'x'.MAX_H.' pixels will be thumbnailed.</LI>\n <LI>Protect your username, use tripcodes!</LI>\n </ul>\n '.$addinfo.'</small></td></tr></table></form><img src=\"./banners/403.gif\" width=\"468\" height=\"60\" border=\"0\" alt=\"403CHAN\"><img alt=\"FORKHEAD\" border=\"0\" height=\"60\" width=\"468\" src=\"./banners/forkhead.png\"></center><hr>';\n}", "protected function ___buildInputDataForm() {\n\t\n\t\t/** @var InputfieldForm $form */\n\t\t$form = $this->modules->get('InputfieldForm');\n\t\t$form->action = './';\n\t\t$form->method = 'post';\n\t\t$form->attr('id', 'import_form');\n\t\n\t\t/** @var InputfieldTextarea $f */\n\t\t$f = $this->modules->get('InputfieldTextarea');\n\t\t$f->attr('name', 'import_data');\n\t\t$f->label = $this->_x('Import', 'button');\n\t\t$f->icon = 'paste';\n\t\t$f->description = $this->_('Paste in the data from an export.');\n\t\t$f->description .= \"\\n**Experimental/beta feature: database backup recommended for safety.**\";\n\t\t$f->notes = $this->_('Copy the export data from another installation and then paste into the box above with CTRL-V or CMD-V.');\n\t\t$form->add($f);\n\n\t\t/** @var InputfieldSubmit $f */\n\t\t$f = $this->wire('modules')->get('InputfieldSubmit') ;\n\t\t$f->attr('name', 'submit_import');\n\t\t$f->attr('value', $this->_('Preview'));\n\t\t$form->add($f);\n\t\t\n\t\treturn $form; \n\t}", "function renderExistingFormElement($field_type, $field_name, $field_value, $field_caption, $default_text, $required, $field_elements, $field_length='', $tool_tip='')\n\t{\n\t\t// handles the rendering of already filled in user forms\n\t\tglobal $lang, $config;\n\t\t$field_value_raw=$field_value;\n\t\t$field_value=htmlentities($field_value, ENT_COMPAT, $config['charset']);\n\n\t\t$display = '';\n\t\t$display .= \"<tr>\";\n\t\tswitch ($field_type) {\n\n\t\t\tcase \"lat\":\n\t\t\tcase \"long\":\n\t\t\tcase \"text\": // handles text input boxes\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td><td align=\\\"left\\\" class=\\\"row_main\\\"><input type=\\\"text\\\" name=\\\"$field_name\\\" value=\\\"$field_value\\\" style=\\\"width:100px;\\\" \";\n\t\t\t\tif ($field_length != '' && $field_length != 0)\n\t\t\t\t{\n\t\t\t\t\t$display .= 'maxlength=\"'.$field_length.'\" ';\n\t\t\t\t}\n\t\t\t\t$display .= \" />\";\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"date\":\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\tif ($field_value != '')\n\t\t\t\t{\n\t\t\t\t\tif ($config['date_format']==1) {\n\t\t\t\t\t\t$format=\"m/d/Y\";\n\t\t\t\t\t}\n\t\t\t\t\telseif ($config['date_format']==2) {\n\t\t\t\t\t\t$format=\"Y/d/m\";\n\t\t\t\t\t}\n\t\t\t\t\telseif ($config['date_format']==3) {\n\t\t\t\t\t\t$format=\"d/m/Y\";\n\t\t\t\t\t}\n\t\t\t\t\t$field_value=date($format,\"$field_value\");\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td><td align=\\\"left\\\" class=\\\"row_main\\\"><input type=\\\"text\\\" name=\\\"$field_name\\\" value=\\\"$field_value\\\" style=\\\"width:100px;\\\" \";\n\n\t\t\t\t$display .= 'onFocus=\"javascript:vDateType=\\'' . $config['date_format'] . '\\'\" onKeyUp=\"DateFormat(this,this.value,event,false,\\'' . $config['date_format'] . '\\')\" onBlur=\"DateFormat(this,this.value,event,true,\\'' . $config['date_format'] . '\\')\" />(' . $config['date_format_long'] . ')';\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\n\t\t\t\tbreak;\n\t\t\tcase \"textarea\": // handles textarea input\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td><td align=\\\"left\\\" class=\\\"row_main\\\"><textarea name=\\\"$field_name\\\" cols=\\\"40\\\" rows=\\\"6\\\">$field_value</textarea>\";\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"select\": // handles single item select boxes\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td><td align=\\\"left\\\" class=\\\"row_main\\\"><select name=\\\"$field_name\\\" size=\\\"1\\\">\";\n\t\t\t\t$index_list = explode(\"||\", $field_elements);\n\t\t\t\tforeach($index_list as $list_item) {\n\t\t\t\t\t$display .= '<option value=\"'.$list_item.'\"';\n\t\t\t\t\tif ($list_item == $field_value_raw || $list_item == \"{lang_$field_value_raw}\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$display .= ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$display .= '>'.$list_item.'</option>';\n\t\t\t\t}\n\t\t\t\t$display .= \"</select>\";\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"select-multiple\": // handles multiple item select boxes\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\" valign=\\\"top\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td>\";\n\t\t\t\t$display .= \"<td align=\\\"left\\\" class=\\\"row_main\\\" ><select name=\\\"$field_name\" . \"[]\\\" multiple=\\\"multiple\\\">\";\n\t\t\t\t$feature_index_list = explode(\"||\", $field_elements);\n\t\t\t\tforeach($feature_index_list as $feature_list_Value => $feature_list_item) {\n\t\t\t\t\t$display .= \"<option value=\\\"$feature_list_item\\\" \";\n\t\t\t\t\t// now, compare it against the list of currently selected feature items\n\t\t\t\t\t$field_value_list = explode(\"||\", $field_value_raw);\n\t\t\t\t\tsort($field_value_list);\n\t\t\t\t\tforeach($field_value_list as $field_value_list_item) {\n\t\t\t\t\t\tif ($field_value_list_item == $feature_list_item || $field_value_list_item == \"{lang_$feature_list_item}\") {\n\t\t\t\t\t\t\t$display .= \"selected=\\\"selected\\\"\";\n\t\t\t\t\t\t} // end if\n\t\t\t\t\t} // end while\n\t\t\t\t\t$display .= \" >$feature_list_item</option>\";\n\t\t\t\t} // end while\n\t\t\t\t$display .= \"</select>\";\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"divider\": // handles dividers in forms\n\t\t\t\t$display .= \"<td align=\\\"left\\\" class=\\\"row_main\\\" colspan=2><strong>$field_caption</strong></td>\";\n\t\t\t\tbreak;\n\t\t\tcase \"price\": // handles price input\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td>\";\n\t\t\t\t$display .= \"<td align=\\\"left\\\" class=\\\"row_main\\\">$config[money_sign]<input type=\\\"text\\\" name=\\\"$field_name\\\" value=\\\"$field_value\\\" style=\\\"width:100px;\\\" onchange=\\\"if (!IsNumeric(form.\" . $field_name . \".value)) { \talert('\". $lang['form_alert_numbers_or_decimal'].\"\" . $field_caption . \"\" . $lang['form_alert_field'] . \"'); form.\" . $field_name . \".focus();form.\" . $field_name . \".value=''; } \\\" \";\n\t\t\t\tif ($field_length != '' && $field_length != 0)\n\t\t\t\t{\n\t\t\t\t\t$display .= 'maxlength=\"'.$field_length.'\" ';\n\t\t\t\t}\n\t\t\t\t$display .= '/>';\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"url\": // handles url input fields\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\" ><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong><br />($lang[dont_forget_http])</td>\";\n\t\t\t\t$display .= \"<td align=\\\"left\\\" class=\\\"row_main\\\"><input type=\\\"text\\\" name=\\\"$field_name\\\" value=\\\"$field_value\\\" style=\\\"width:100px;\\\" \";\n\t\t\t\tif ($field_length != '' && $field_length != 0)\n\t\t\t\t{\n\t\t\t\t\t$display .= 'maxlength=\"'.$field_length.'\" ';\n\t\t\t\t}\n\t\t\t\t$display .= '/>';\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"email\": // handles email input\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong><br />($lang[email_example])</td>\";\n\t\t\t\t$display .= \"<td align=\\\"left\\\" class=\\\"row_main\\\"><input type=\\\"text\\\" name=\\\"$field_name\\\" value=\\\"$field_value\\\" style=\\\"width:100px;\\\" \";\n\t\t\t\tif ($field_length != '' && $field_length != 0)\n\t\t\t\t{\n\t\t\t\t\t$display .= 'maxlength=\"'.$field_length.'\" ';\n\t\t\t\t}\n\t\t\t\t$display .= '/>';\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"checkbox\": // handles checkboxes\n\t\t\t\t$display .= '<td colspan=\"2\" align=\"left\" class=\"row_main\">';\n\t\t\t\t$feature_index_list = explode(\"||\", $field_elements);\n\t\t\t\tsort($feature_index_list);\n\t\t\t\t$display .= '<table class=\"admin_option_table\">';\n\t\t\t\t$display .= '<tr><td colspan=\"3\" class=\"admin_option_caption\">'.$field_caption.' ';\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= '<span class=\"required\">*</span>';\n\t\t\t\t}\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '<br /><br /></td></tr>';\n\t\t\t\t$display .= '<tr>';\n\t\t\t\t$count = 1;\n\t\t\t\t$numcols = 3;\n\t\t\t\tforeach($feature_index_list as $feature_list_Value => $feature_list_item) {\n\t\t\t\t\t$display .= \"<td><input type=\\\"checkbox\\\" value=\\\"$feature_list_item\\\" name=\\\"$field_name\" . \"[]\\\"\";\n\t\t\t\t\t// now, compare it against the list of currently selected feature items\n\t\t\t\t\t$field_value_list = explode(\"||\", $field_value_raw);\n\t\t\t\t\tsort($field_value_list);\n\t\t\t\t\tforeach ($field_value_list as $field_value_list_item) {\n\t\t\t\t\t\tif ($field_value_list_item == $feature_list_item || $field_value_list_item == \"{lang_$feature_list_item}\") {\n\t\t\t\t\t\t\t$display .= \"checked=\\\"checked\\\"\";\n\t\t\t\t\t\t} // end if\n\t\t\t\t\t} // end while\n\t\t\t\t\t$display .= \" />$feature_list_item</td>\";\n\t\t\t\t\tif ($count % $numcols == 0) {\n\t\t\t\t\t\t$display .= '</tr><tr>';\n\t\t\t\t\t}\n\t\t\t\t\t$count++;\n\t\t\t\t} // end while\n\t\t\t\t$display .= '</tr></table>';\n\t\t\t\t$display .= \"</td>\";\n\t\t\t\tbreak;\n\t\t\tcase \"option\": // handles options\n\t\t\t\t$display .= '<td colspan=\"2\" align=\"left\" class=\"row_main\">';\n\t\t\t\t$feature_index_list = explode(\"||\", $field_elements);\n\t\t\t\tsort($feature_index_list);\n\t\t\t\t$display .= '<table class=\"admin_option_table\">';\n\t\t\t\t$display .= '<tr><td colspan=\"3\" class=\"admin_option_caption\">'.$field_caption.' ';\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= '<span class=\"required\">*</span>';\n\t\t\t\t}\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '<br /><br /></td></tr>';\n\t\t\t\t$display .= '<tr>';\n\t\t\t\t$count = 1;\n\t\t\t\t$numcols = 3;\n\t\t\t\tforeach($feature_index_list as $feature_list_Value => $feature_list_item) {\n\t\t\t\t\t$display .= \"<td><input type=\\\"radio\\\" value=\\\"$feature_list_item\\\" name=\\\"$field_name\\\" \";\n\t\t\t\t\t// now, compare it against the list of currently selected feature items\n\t\t\t\t\tif ($feature_list_item == $field_value_raw || $feature_list_item == \"{lang_$field_value_raw}\") {\n\t\t\t\t\t\t$display .= \"checked=\\\"checked\\\" \";\n\t\t\t\t\t} // end if\n\t\t\t\t\t$display .= \" />$feature_list_item</td>\";\n\t\t\t\t\tif ($count % $numcols == 0) {\n\t\t\t\t\t\t$display .= '</tr><tr>';\n\t\t\t\t\t}\n\t\t\t\t\t$count++;\n\t\t\t\t} // end while\n\t\t\t\t$display .= '</tr></table>';\n\t\t\t\t$display .= \"</td>\";\n\t\t\t\tbreak;\n\t\t\tcase \"number\": // deals with numbers\n\t\t\tcase \"decimal\":\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\"><strong>$field_caption \";\n\t\t\t\tif ($required == \"Yes\") {\n\t\t\t\t\t$display .= \"<span class=\\\"required\\\">*</span>\";\n\t\t\t\t}\n\t\t\t\t$display .= \"</strong></td>\";\n\t\t\t\t$display .= \"<td align=\\\"left\\\" class=\\\"row_main\\\"><input type=\\\"text\\\" name=\\\"$field_name\\\" value=\\\"$field_value\\\" style=\\\"width:100px;\\\" onchange=\\\"if (!IsNumeric(form.\" . $field_name . \".value)) { \talert('\". $lang['form_alert_numbers_or_decimal'].\"\" . $field_caption . \"\" . $lang['form_alert_field'] . \"'); form.\" . $field_name . \".focus();form.\" . $field_name . \".value=''; } \\\" \";\n\t\t\t\tif ($field_length != '' && $field_length != 0)\n\t\t\t\t{\n\t\t\t\t\t$display .= 'maxlength=\"'.$field_length.'\" ';\n\t\t\t\t}\n\t\t\t\t$display .= '/>';\n\t\t\t\tif ($tool_tip != '') {\n\t\t\t\t\t$display .= ' <a href=\"#\" class=\"tooltip\"><img src=\"images/info.gif\" width=\"16\" height=\"16\" /><span>'.$tool_tip.'</span></a>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td>';\n\t\t\t\tbreak;\n\t\t\tcase \"submit\": // handles submit buttons\n\t\t\t\t$display .= \"<td align=\\\"center\\\" class=\\\"row_main\\\"><input type=\\\"submit\\\" value=\\\"$field_value\\\" /></td>\";\n\t\t\t\tbreak;\n\t\t\tdefault: // the catch all... mostly for errors and whatnot\n\t\t\t\t$display .= \"<td align=\\\"right\\\" class=\\\"row_main\\\">no handler yet</td>\";\n\t\t} // end switch statement\n\t\t$display .= \"</tr>\";\n\t\treturn $display;\n\t}", "public function processForm();", "function file($name, $value, $label){\n echo \"<div class=\\\"fieldRow\\\" id=\\\"filePath\\\"><p>$label</p>\";\n echo \"<input id=\\\"$name\\\" type=\\\"text\\\" value=\\\"$value\\\" placeholder=\\\"$label\\\">\";\n echo \"<button onclick=\\\"choose_file('$name');\\\">Upload</button>\";\n echo \"</div>\";\n $this->fieldNames[] = $name;\n }", "function renderForm($name = '', $email ='', $error = '', $id = '', $summary = '', $category = '')\n{ ?>\n<!DOCTYPE HTML>\n<html>\n<head>\n <link href=\"style.css\" type=\"text/css\" rel=\"stylesheet\">\n <link href=\"https://fonts.google.com/?category=Sans+Serif\">\n <script src=\"formcon.js\">\n </script>\n<title>\n <?php if ($id != '') { print \"Edit Record\"; } else { print \"New Record\"; } ?>\n</title>\n</head>\n <body>\n <h1><?php if ($id != '') { print \"Edit Record\"; } else { print \"New Record\"; } ?></h1>\n<?php if ($error != '') {\nprint \"<div style='padding:4px; border:1px solid red; color:red'>\" . $error\n. \"</div>\";\n} ?>\n\n<form action=\"\" method=\"post\">\n<div>\n<?php if ($id != '') { ?>\n<input type=\"hidden\" name=\"id\" value=\"<?php print $id; ?>\" />\n<p>ID: <?php print $id; ?></p>\n<?php } ?>\n\nSummary: <input type=\"text\" name=\"summary\"\nvalue=\"<?php print $summary; ?>\"/>\nName: <input type=\"text\" name=\"name\"\nvalue=\"<?php print $name; ?>\"/><br/>\nEmail: <input type=\"text\" name=\"email\"\nvalue=\"<?php print $email; ?>\"/>\nCategory: <input type=\"text\" name=\"category\"\nvalue=\"<?php print $category; ?>\"/>\n<p>All fields required</p>\n<input type=\"submit\" name=\"submit\" value=\"Submit\" />\n</div>\n</form>\n</body>\n</html>\n\n<?php }", "function viewFormExtendedCoreContentFormDocumentAddSingle( ) // action with visual\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$str=\"\";\n\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\" <!-- viewFormExtendedCoreContentFormDocumentAddSingle() --> \";\n\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n <form action=\\\"\\\" method='post' enctype='multipart/form-data' multiple >\";\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n <input type='file' name='file' id='documentAddSingle' onChange=\\\"onChangeDocumentAddSingleDocument()\\\" class='margin-10px;' >\";\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n</form>\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<div id='documentAddSingleFileName'></div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<div id='documentAddSingleFileSize'></div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<div id='documentAddSingleFileType'></div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<div id='documentAddSingleFileError'></div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<div id='documentAddSingleProgress' class='documentProgressBar'><img src='imgs/progressBarDone.png' id='documentAddSingleProgressA' ><img src='imgs/progressBarNotYet.png' id='documentAddSingleProgressB' ></div>\";\n\t\t\t\t\t\t\t\t\t\t\t\t// \" <progress id='progress' style='margin-top 10px;'></progress></div>\";\n\n\n\t\t\t\t\t\t\t\t\t\t\t// dropbox\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<div id='documentAddSingleDropZone''>Drop file here ...</div>\";\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n<script>\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n function handleAddSingleDragOver(evt) { \";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n evt.stopPropagation(); \";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n evt.preventDefault(); \";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n evt.dataTransfer.dropEffect = 'copy'; \";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n }\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n function handleAddSingleFileSelect(evt) {\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n evt.stopPropagation();\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n evt.preventDefault();\";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n var files = evt.dataTransfer.files; \";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n if (files.length>0) { documentAddSingleDocumentFile( files[0] ); } // alert('handleAddSingleFileSelect'+files.length); \";\n\t\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n }\";\n\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n // Setup the dnd listeners.\";\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n var dropZone = document.getElementById('documentAddSingleDropZone');\";\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n dropZone.addEventListener('dragover', handleAddSingleDragOver, false); \";\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n dropZone.addEventListener('drop', handleAddSingleFileSelect, false); \";\n\n\t\t\t\t\t\t\t\t\t\t\t$str=$str.\"\\n</script>\";\n\n\n\t\t\t\t\t\t\t\t\t\t\treturn $str;\n\t\t\t\t\t\t\t\t\t\t}", "private function createForm(): void\n {\n $this->createRecordInFormat()\n ->addEditRecordsInFormatFields()\n ->addOtherFields();\n }", "function print_form()\n{\n print <<<END\n <form action=\"$_SERVER[REQUEST_URI]\" method=\"POST\">\n <fieldset>\n <legend>UNIX Manual Query</legend>\n <table>\n <tr><td>Format</td><td><select name=\"format\"><option value=\"html\">HTML</option><!--<option value=\"ps\">PostScript</option>--><option value=\"pdf\">PDF</option></select></td></tr>\n <tr><td>Section</td><td><input name=\"section\" type=\"text\"><td></tr>\n <tr><td>Command</td><td><input name=\"command\" type=\"text\"></td></tr>\n <tr><td colspan=\"2\"><input name=\"submit\" type=\"submit\" value=\"Go\"></td></tr>\n </table>\n </fieldset>\n </form>\nEND;\n}", "function t_formfield($field)\r\n{\r\n switch($field['type'])\r\n {\r\n case Form_Field::CHECKBOX:\r\n return '<input type=\"checkbox\" ' .\r\n 'value=\"1\" ' .\r\n 'name=\"' . $field['name'] . '\" ' .\r\n ($_REQUEST[$field['name']] ? ' checked=\"checked\"' : '') .\r\n $field['tag_attributes'] . ' />';\r\n\r\n case Form_Field::SELECT:\r\n return '<select name=\"' . $field['name'] . '\" ' . $field['tag_attributes'] . '>' .\r\n Form_Field::OptionsSimple($field['options'], $_REQUEST[$field['name']]) .\r\n '</select>';\r\n\r\n case Form_Field::TEXT:\r\n return '<input type=\"text\" ' .\r\n 'name=\"' . $field['name'] . '\" ' .\r\n 'value=\"' . htmlspecialchars($_REQUEST[$field['name']], ENT_QUOTES) . '\" ' .\r\n $field['tag_attributes'] . ' />';\r\n\r\n case Form_Field::TEXTAREA:\r\n return '<textarea name=\"' . $field['name'] . '\" ' . $field['tag_attributes'] . '>' . htmlspecialchars($_REQUEST[$field['name']]) . '</textarea>';\r\n }\r\n}", "public function insert() {\r\n\t\tif( !$this->targetUrl ) {\r\n\t\t\tthrow new \\ErrorException( 'The target URL for the form is not set, please use setTarget / setTargetUrl' );\r\n\t\t}\r\n\t\t$cssClass = $this->cssClass ? $this->cssClass : 'generic_form';\r\n\t\t\r\n\t\t$this->insertFormBody( $this->targetUrl, $cssClass );\r\n\t\t$this->insertFields();\r\n\t\t\r\n\t\t$this->insertNonceField();\r\n\t\t$this->_insertReferrerField();\r\n\t\t$this->insertSubmitButton( $this->submitButtonName, $this->submitButtonDescription );\r\n\t\t\r\n\t\t// doing this stuff after the insertion, allow the fields to register javascript within insert function\r\n\t\t// not really good in term of conception but work for the moment\r\n\t\t$jss = array_unique( $this->jsFiles );\r\n\t\tforeach( $jss as $js ) {\r\n\t\t\t$this->frontController->getViewHelper()->addJavascriptFile( $js );\r\n\t\t}\r\n\t\t\r\n\t\t$jsVars = $this->javascriptVars;\r\n\t\tforeach( $jsVars as $jsKey => $jsVar ){\r\n\t\t\t$this->frontController->getViewHelper()->addJavascriptVar( $jsKey, $jsVar );\r\n\t\t}\r\n\t\t\r\n\t\t$this->frontController->getViewHelper()->addCssFile( 'form.css' );\r\n\t\t$csss = array_unique( $this->cssFiles );\r\n\t\tforeach( $csss as $cssFile ){\r\n\t\t\t$this->frontController->getViewHelper()->addCssFile( $cssFile );\r\n\t\t}\r\n\t\t$this->frontController->getViewHelper()->addJavascriptVar( '_error_messages', Field::getErrorMessages() );\r\n\t\t\r\n\t\t$this->insertFormBodyEnd();\r\n\t}", "function getFormElementFile($elementName,$value,$isRequired,$elementHelpName,$elementTooltip,$elementSize,$elementTypeOptions,$elementMoreThan,$elementLessThan,$elementCheckInt,&$jsOutput,&$htmlOutput)\n\t\t {\n\t\t \tif($isRequired && $value == '')\t/// Check $value == '', because if it isn't, there's no point making the user upload the same file again\n\t\t\t\t$validCheck=\" class=\\\"required\\\"\";\n\t\t\telse\n\t\t\t\t$validCheck=\"\";\n\n\t\t\tglobal $sourceFolder;\n\t\t\trequire_once(\"$sourceFolder/upload.lib.php\");\n\t\t\t$htmlOutput .= getFileUploadField($elementName,\"form\", 2*1024*1024, $validCheck);\n\n\t\t\tglobal $uploadFolder;\n\t\t\tif($value != '') {\n\t\t\t\t$htmlOutput .= '<br />(Leave blank to keep current file : <a href=\"./' . $value . '\">'.$value.'</a>)';\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function form()\n {\n\n $this->number('novel_id', __('小说ID'))->required();\n $this->switch('override_allow', __('允许覆盖'))->states($this->allow_states)->required();\n $this->multipleFile(self::SECTIONS_FIELD, '请选择文件')\n ->help($this->file_notice)\n ->removable()\n ->required();\n }", "function rcw_newproduct_formstart()\r\n{\r\n\techo '<label>Title:<input name=\"rcw_itemname\" type=\"text\" value=\"\" size=\"50\" maxlength=\"100\" /></label> \r\n <br />\r\n <label>Description:<input name=\"rcw_desc\" type=\"text\" value=\"\" size=\"50\" maxlength=\"250\" /></label> \r\n <br /> \r\n <label>Base Price:<input name=\"rcw_baseprice\" type=\"text\" value=\"\" size=\"7\" maxlength=\"7\" /></label>';\r\n}", "public function printAddIoTForm($id){\n\t\t\tglobal $standard;\n\t\t\tif ($id == \"non\"){\n\t\t\t?><div class=\"formula\"><h1>Add IoT device</h1>\n\t\t\t\t<form><label for=\"facility\">IoT Type:</label><select id=\"iot_type\" name=\"iot_type\" type=\"select\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$options = $this->getIotTypes();\n\t\t\t\t\tforeach ($options as $option) {\n\t\t\t\t\techo \"<option value=\\\"\".$option['id'].\"\\\">\".$option['name'].\"</option>\";\n\t\t\t\t\t}\n\t\t\t\t\t?></select></form>\n\t\t\t<form action=\"iot.php\" method=\"post\" id=\"form_iot\">\n\t\t\t</form>\n\t\t\t<?php\n\t\t\t} else {\n\t\t\t$datas = $standard->get_iot($id);\n\t\t\techo \"<div class=\\\"formula\\\"><h1>Edit IoT</h1><form action=\\\"iot.php\\\" method=\\\"post\\\">\";\n\t\t\t\tforeach ($datas as $data) {\n\t\t\t\techo \"<label for=\\\"name\\\">Name</label> <input type=\\\"text\\\" name=\\\"name\\\" value=\\\"\".$data['name'].\"\\\" required>\";\n\t\t\t\techo \"<label for=\\\"description\\\">Description</label> <input type=\\\"text\\\" name=\\\"description\\\" value=\\\"\".$data['description'].\"\\\">\";\n\t\t\t\techo \"<label for=\\\"acceptable_values\\\">Acceptable values</label> <input type=\\\"text\\\" title=\\\"A description of what possible values to return\\\" name=\\\"acceptable_values\\\" value=\\\"\".$data['acceptable_values'].\"\\\">\";\n\t\t\t\techo \"<label for=\\\"zone\\\">Zone</label><select name=\\\"zone\\\">\";\n\t\t\t\t$options = $standard->get_zone();\n\t\t\t\t\tforeach ($options as $option) {\n\t\t\t\t\t\techo \"<option value=\\\"\".$option['id'].\"\\\"\";\n\t\t\t\t\t\tif ($option['id'] == $data['zone']){\n\t\t\t\t\t\t\techo \"selected\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \">\".$option['name'].\"</option>\";\n\t\t\t\t\t}\n\t\t\t\techo \"</select>\";\n\t\t\t\t$types = $this->getIotTypes($data['iot_type_id']);\n\t\t\t\t\tforeach ($types as $type) {\n\t\t\t\t\t\t// code...\n\t\t\t\t\t\techo \"<label for=\\\"type\\\">IoT Type</label> <input type=\\\"text\\\" name=\\\"type\\\" value=\\\"\".$type['name'].\"\\\" readonly>\";\n\t\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"iot_type\\\" value=\\\"\".$type['id'].\"\\\">\";\n\t\t\t\t\t}\n\n\t\t\t\t// IF WEB-CAM SHOW FIELD\n\t\t\t\tif ($data['iot_type_id'] == 5){\n\t\t\t\t\techo \"<label for=\\\"img_url\\\">Cam URL</label> <input type=\\\"text\\\" name=\\\"img_url\\\" value=\\\"\".$data['img_url'].\"\\\">\";\n\t\t\t\t}\telse {\n\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"img_url\\\" value=\\\"\\\">\";\n\t\t\t\t}\n\t\t\t\techo \"<label for=\\\"local_name\\\">Local name</label> <input type=\\\"text\\\" name=\\\"local_name\\\" value=\\\"\".$data['local_name'].\"\\\">\";\n\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$data['id'].\"\\\">\";\n\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"add_iot\\\" value=\\\"2\\\"><input type=\\\"submit\\\" name=\\\"submit\\\"value=\\\"Send\\\"></form>\";\n\t\t\t\t}\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t\t}", "function snax_upload_form_render_form_internals() {\n?>\n\t<div id=\"media-items\">\n\t\t<div id=\"media-upload-error\"></div>\n\t</div>\n\n\t<input type=\"hidden\" class=\"snax-uploaded-media-id\" value=\"\" autocomplete=\"off\"/>\n<?php\n}", "function config_add_file_input($config_var, $label, $form_action, $width = 420)\n { \n return array('file_input', $config_var, $label, $form_action, $width);\n }", "function form_upload($data = '', $value = '', $extra = '')\n\t{\n\t\t$defaults = array('type' => 'file', 'name' => '');\n\t\tis_array($data) OR $data = array('name' => $data);\n\t\t$data['type'] = 'file';\n\n\t\treturn '<input '._parse_form_attributes($data, $defaults)._attributes_to_string($extra).\" />\\n\";\n\t}", "public function addFormFields($taxonomy)\n {\n echo $this->output();\n }", "function build_form($table,$required) {\n \tglobal $database;\n \t\n\t$inputs = \"\";\n\t$sql = \"SHOW FULL COLUMNS\n\t\t\t FROM `$table`;\";\t\t \n\t$ret = $database->query($sql);\n\tif (!$ret || !$ret->num_rows)\n\t{\n\t\treturn alertbuilder(\"Failed to retrieve column to build the UI.\",\"danger\");\n\t}\n\n\t\twhile ($row = $ret->fetch_array())\n\t\t{\n\t\t\t$input = \"\";\n\t\t\t$field = $row[0]; //Field -- 0\n\t\t\t$col_type = $row['Type'];\n\t\t\t\n \t\t$comment= $row['Comment'];\n \n\t\t\t$field_ = str_replace(\"_\", \" \", $field);\n\t\t\t$field_ = $comment ? $comment : ucfirst($field);\n\t\t\t$val = @ $_POST[$field];\n\t\t\t\n\t\t\t$star_required = in_array(strtolower($field), $required) ? \"<span style='color:red'>*</span>\" : \"\";\n\t\t\t\n\t\t\t// we ignore some fields\n\t\t\tswitch (strtolower($field)){\n\t\t\t\tcase 'entrydate':\n\t\t\t\tcase 'user_id':\n\t\t\t\tcase 'id':\n\t\t\t\tcase 'youth_id':\n\t\t\t\tcase 'locked_user_id':\n\t\t \t\tcase \"youthid\":\n\t\t \t\tcase \"table\":\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'file_type_id':\n\t\t\t\t\t$sql = \"SELECT * \n\t\t\t\t\t FROM `file_types`\n\t\t\t\t\t ;\";\n\t\t\t\t\t$select = build_selectbox($sql,$field,$val);\n\t\t\t\t\t\n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t\t$select\n\t\t \t\t\t\t\t\t </div>\n\t\t \t\t\t\t\t\t </div>\n\t\t\t\t\t\t <script>\n\t\t\t\t\t\t $(document).ready(function(){\n\t\t\t\t\t\t\t $('#$field').select2();\n\t\t\t\t\t\t });\n\t\t\t\t\t\t </script>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'date_started':\n\t\t\t\tcase 'date_ended':\n\t\t\t\tcase 'birth_date':\n\t\t\t\t\t$input = \"<input type='text' class='form-control' value='$val' \n\t\t\t\t\t\t\t\t\t\t\tid='$field' name='$field' \n\t\t\t\t\t\t\t\t\t\t\tplaceholder='YYYY-mm-dd'>\";\n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t\t\t\t\t\t<label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t\t\t\t\t\t<div class='col-sm-8'>$input</div>\n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t <script>\n\t\t\t\t\t\t $(document).ready(function(){\n\t\t\t\t\t\t \t // set field to calendar & resolve drop down bug\n\t\t\t\t\t\t\t $('#$field').datepicker({'format':'yyyy-mm-dd'});\n\t\t\t\t\t\t\t $('#$field').datepicker().on('changeDate',function(e) {\n\t\t\t\t\t\t\t $('#$field').datepicker('hide');\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t });\n\t\t\t\t\t\t </script>\";\t\n\t\t\t\t\tbreak;\t\t\t\t \t\t\t \t\t\n\t\t\t\t\t\n\t\t\t\tcase 'application_region_id':\t\n\t\t\t\tcase 'region_id':\n\t\t\t\t\t$sql = \"SELECT * \n\t\t\t\t\t FROM `list_regions`\n\t\t\t\t\t ;\";\n\t\t\t\t\t$select = build_selectbox($sql,$field,$val);\n\t\t\t\t\t\n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t\t$select\n\t\t \t\t\t\t\t\t </div>\n\t\t \t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t <script>\n\t\t\t\t\t\t\t\t\t $(document).ready(function(){\n\t\t\t\t\t\t\t\t\t\t $('#$field').select2();\n\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t </script>\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'sex_id':\n\t\t\t\t\t$sql = \"SELECT * \n\t\t\t\t\t FROM `list_sex`\n\t\t\t\t\t ;\";\n\t\t\t\t\t$select = build_selectbox($sql,$field,$val);\n\t\t\t\t\t\n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t\t$select\n\t\t \t\t\t\t\t\t </div>\n\t\t \t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t <script>\n\t\t\t\t\t\t\t\t\t $(document).ready(function(){\n\t\t\t\t\t\t\t\t\t\t $('#$field').select2();\n\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t </script>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'children':\n\t\t\t\t\t$input = \"<input type='number' class='form-control' name='$field' \n\t\t\t\t\t id='$field' value='$val'>\";\n\t\t\t\t\t \n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t\t$input\n\t\t \t\t\t\t\t\t </div>\n\t\t \t\t\t\t\t\t </div>\";\n\t\t\t\t\tbreak;\n\t\t\n\t\t\t\tcase 'cellphone':\n\t\t\t\t\t$input = \"<input type='number' placeholder='0812223333' class='form-control' name='$field' \n\t\t\t\t\t id='$field' value='$val'>\";\n\t\t\t\t\t \n\t\t\t\t $input = \"<div class='input-group'>\n\t\t\t\t\t\t\t <span class='input-group-addon'><span class='fa fa-mobile'></span></span>\n\t\t\t\t\t\t\t <input type='number' placeholder='0812223333' class='form-control' \n\t\t\t\t\t\t\t name='$field' id='$field' value='$val'>\n\t\t\t\t\t\t\t </div>\";\n \t\t\t\t\t \n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t\t$input\n\t\t \t\t\t\t\t\t </div>\n\t\t \t\t\t\t\t\t </div>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'fax':\n\t\t $input = \"<div class='input-group'>\n\t\t\t\t\t <span class='input-group-addon'><span class='fa fa-fax'></span></span>\n\t\t\t\t\t <input type='text' placeholder='' class='form-control' \n\t\t\t\t\t name='$field' id='$field' value='$val'>\n\t\t\t\t\t </div>\";\n\t\t \t\t\t\t\t \n\t\t\t\t$inputs .= \"<div class='form-group'>\n\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t$input\n\t \t\t\t\t\t\t </div>\n\t \t\t\t\t\t\t </div>\";\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'address':\n\t\t $input = \"<div class='input-group'>\n\t\t\t\t\t <span class='input-group-addon'><span class='fa fa-map-marker'></span></span>\n\t\t\t\t\t <input type='text' placeholder='' class='form-control' \n\t\t\t\t\t name='$field' id='$field' value='$val'>\n\t\t\t\t\t </div>\";\n\t\t \t\t\t\t\t \n\t\t\t\t$inputs .= \"<div class='form-group'>\n\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t$input\n\t \t\t\t\t\t\t </div>\n\t \t\t\t\t\t\t </div>\";\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'telephone':\n\t\t $input = \"<div class='input-group'>\n\t\t\t\t\t <span class='input-group-addon'><span class='fa fa-phone'></span></span>\n\t\t\t\t\t <input type='text' placeholder='' class='form-control' \n\t\t\t\t\t name='$field' id='$field' value='$val'>\n\t\t\t\t\t </div>\";\n\t\t \t\t\t\t\t \n\t\t\t\t$inputs .= \"<div class='form-group'>\n\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t$input\n\t \t\t\t\t\t\t </div>\n\t \t\t\t\t\t\t </div>\";\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'email':\n\t\t $input = \"<div class='input-group'>\n\t\t\t\t\t <span class='input-group-addon'><span class='fa fa-envelope-o'></span></span>\n\t\t\t\t\t <input type='email' placeholder='name@mail.com' class='form-control' \n\t\t\t\t\t name='$field' id='$field' value='$val'>\n\t\t\t\t\t </div>\";\n\t\t \t\t\t\t\t \n\t\t\t\t$inputs .= \"<div class='form-group'>\n\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t$input\n\t \t\t\t\t\t\t </div>\n\t \t\t\t\t\t\t </div>\";\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'filename':\n\t\t\t\tcase 'project_proposal':\t\t\t\t\n\t\t\t\t\t$input = \"<input type='file' class='form-control' name='$field' \n\t\t\t\t\t id='$field' value='$val'>\";\n\t\t\t\t\t \n\t\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t \t\t\t\t\t\t <label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t \t\t\t\t\t\t <div class='col-sm-8'>\n\t\t\t\t\t\t\t\t\t\t$input\n\t\t \t\t\t\t\t\t </div>\n\t\t \t\t\t\t\t\t </div>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\t\t\t\t\t\t\t\n\t\t\t\t$tagsinput = \"\";\n\t\t\t\t$type = 'text';\n\t\t\t\t\n\t\t\t\tswitch($col_type) {\n\t\t\t\t\tcase 'tinyint(1)':\n\t\t\t\t\t\t$type = 'checkbox';\n\t\t\t\t\t\t$input = \"<input type='$type' class='form-control' \n\t\t\t\t\t\t\t\t\t\t\t\t$tagsinput value='$val' \n\t\t\t\t\t\t id='$field' name='$field'>\";\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'longtext':\n\t\t\t\t\t\t$type = 'textarea';\n\t\t\t\t\t\t$input = \"<textarea id='$field' name='$field' class='form-control' \n\t\t\t\t\t\t\t\t\t\t\t\t$tagsinput>$val</textarea>\";\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$input = \"<input type='$type' class='form-control' \n\t\t\t\t\t\t\t\t\t\t\t\t$tagsinput value='$val' \n\t\t\t\t\t\t id='$field' name='$field'>\";\t\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$inputs .= \"<div class='form-group'>\n\t\t\t\t\t\t\t\t<label class='control-label col-sm-3' for='$field'>$field_ $star_required</label>\n\t\t\t\t\t\t\t\t<div class='col-sm-8'>$input</div>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\n\t\treturn $inputs;\t\n }", "function createOrganismEditForm(array $organismArray): string {\n\n return ' <form method=\"post\" enctype=\"multipart/form-data\"><label for=\"organism\">Organism</label><input type=\"text\" name=\"organism\" id=\"organism\" value = \"' .\n $organismArray['Organism'] . '\" required><label for=\"incubation-usual\">Incubation usual</label><input type=\"text\" name=\"incubation-usual\" id=\"incubation-usual\" value = \"' .\n $organismArray['Incubation_usual'] . '\" required><label for=\"incubation-range\">Incubation range</label><input type=\"text\" name=\"incubation-range\" id=\"incubation-range\" value = \"' .\n $organismArray['Incubation_range'] . '\" required><label for=\"symptoms\">Symptoms</label><input type=\"text\" name=\"symptoms\" id=\"symptoms\" value = \"' .\n $organismArray['Symptoms'] . '\" required><label for=\"severity\">Severity</label><input type=\"text\" name=\"severity\" id=\"severity\" value = \"' .\n $organismArray['Severity'] . '\" required><label for=\"avg-annual-incidence\">Average annual incidence</label><input type=\"number\" name=\"avg-annual-incidence\" id=\"avg-annual-incidence\" value = \"' .\n $organismArray['Avg_annual_incidence'] . '\" required><label for=\"disease-img\">Image (optional)</label><input type=\"file\" name=\"disease-img\" id=\"disease-img\"><input type=\"submit\" value=\"Edit disease\"></form>';\n}", "function formData()\n {\n\t$this->out->elementStart('fieldset', array('id' => 'settings_admin_access'));\n\t// TRANS: Form legend for registration form.\n $this->out->element('legend', null, _('Registration'));\n $this->out->elementStart('ul', 'form_data');\n $this->li();\n // TRANS: Checkbox instructions for admin setting \"Private\".\n $instructions = _('Prohibit anonymous users (not logged in) from viewing site?');\n // TRANS: Checkbox label for prohibiting anonymous users from viewing site.\n $this->out->checkbox('private', _m('LABEL', 'Private'),\n (bool) $this->value('private'),\n $instructions);\n $this->unli();\n\n $this->li();\n // TRANS: Checkbox instructions for admin setting \"Invite only\".\n $instructions = _('Make registration invitation only.');\n // TRANS: Checkbox label for configuring site as invite only.\n $this->out->checkbox('inviteonly', _('Invite only'),\n (bool) $this->value('inviteonly'),\n $instructions);\n $this->unli();\n\n $this->li();\n // TRANS: Checkbox instructions for admin setting \"Closed\" (no new registrations).\n $instructions = _('Disable new registrations.');\n // TRANS: Checkbox label for disabling new user registrations.\n $this->out->checkbox('closed', _('Closed'),\n (bool) $this->value('closed'),\n $instructions);\n $this->unli();\n $this->out->elementEnd('ul');\n $this->out->elementEnd('fieldset');\n }", "protected function printFormNew(){\n\n\t\t$str = parent::printFormNew();\n\t\t\n\t\t$csv_handler = new CsvFileHandler();\n\t\t$csv_file = $csv_handler->getTemporary();\n\n\t\t$str.= \"<div class=\\\"row\\\">\".\n\t\t\t\t\t\"<div class=\\\"col-md-12\\\">\".\n\t\t\t\t\t\"<h3>Step2: Configure import data</h3>\".\n\t\t\t\t\t\"<h5>Sample data from csv file:</h5>\";\n\t\ttry\n\t\t{\n\t\t\t$str.= $this->getCsvTableStr($csv_handler, $csv_file);\n\t\t}\n\t\tcatch(NoDataException $e)\n\t\t{\n\t\t}\n\n\t\t$str.= \"<h4>Fill the form below:</h4>\";\n\t\t$exchange_data = Session::get($this->exchange_key);\n\t\t$setSchema = $exchange_data[\"create_table\"];\n\t\t$str.= $this->getConfigForm($csv_handler, $csv_file, $setSchema);\n\n\t\t$str.=\t\"</div>\". // col-md-12\n\t\t\t\t\"</div>\"; // row\n\n\t\treturn $str;\n\t}", "function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {\n $field = '<input type=\"' . tep_output_string($type) . '\" name=\"' . tep_output_string($name) . '\"';\n\n if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) {\n $field .= ' value=\"' . tep_output_string(stripslashes($GLOBALS[$name])) . '\"';\n } elseif (tep_not_null($value)) {\n $field .= ' value=\"' . tep_output_string($value) . '\"';\n }\n\n if (tep_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= '>';\n\n if ($required == true) $field .= TEXT_FIELD_REQUIRED;\n\n return $field;\n }" ]
[ "0.6513232", "0.6086444", "0.60587925", "0.5846427", "0.5769719", "0.5765773", "0.5763175", "0.57364047", "0.57361305", "0.57298154", "0.5722111", "0.57049304", "0.56761825", "0.5671932", "0.5629226", "0.56243354", "0.56032735", "0.560233", "0.5553668", "0.5551105", "0.55502975", "0.5546878", "0.5543441", "0.5537054", "0.5532664", "0.55022603", "0.5464722", "0.54575187", "0.5440409", "0.54378724", "0.54351103", "0.54191864", "0.5413572", "0.54123497", "0.5388047", "0.53842926", "0.53815114", "0.5379824", "0.5366112", "0.5346727", "0.53441703", "0.5329663", "0.53283083", "0.53280085", "0.53221935", "0.53111607", "0.53056616", "0.5305027", "0.5296621", "0.5293906", "0.5289058", "0.5276676", "0.5275252", "0.527404", "0.52734417", "0.5267626", "0.52671885", "0.5260543", "0.52530825", "0.5251398", "0.52513736", "0.5250033", "0.5246904", "0.5242457", "0.52386934", "0.52376336", "0.52372515", "0.5235151", "0.5235137", "0.52229625", "0.5222469", "0.521957", "0.5213452", "0.5206127", "0.52050203", "0.5202545", "0.52018964", "0.52017844", "0.5201394", "0.51974976", "0.5188603", "0.51836765", "0.5183521", "0.51781386", "0.5177446", "0.5176513", "0.5166817", "0.51665384", "0.51650333", "0.51640075", "0.5160972", "0.5156474", "0.5154562", "0.51505", "0.5150278", "0.51474386", "0.5144834", "0.51397324", "0.5138889", "0.51376307" ]
0.83038354
0
Returns the new data model, with default values. Such model should be used for the insert scenario. Context foreign keys will be set to this model.
Возвращает новый модель данных с значениями по умолчанию. Такая модель должна использоваться для сценария вставки. Внешние ключи контекста будут установлены для этой модели.
public function newModel() { $model = parent::newModel(); $activeContexts = $this->getActiveContexts(); foreach ($activeContexts as $activeContext) { $foreignKeyName = $activeContext['foreignKeyName']; $model->$foreignKeyName = $activeContext['model']->getPrimaryKey(); } return $model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewModelWithDefaults()\n {\n $model = new $this->modelName;\n $databaseName = Yii::$app->params['defaultSchema'];\n $tableName = $model->tableName();\n $results = Yii::$app->db->createCommand(\"\n SELECT COLUMN_NAME, COLUMN_DEFAULT\n FROM information_schema.COLUMNS\n WHERE TABLE_SCHEMA = '$databaseName'\n AND DATA_TYPE != 'timestamp'\n AND TABLE_NAME = '$tableName'\")->queryAll();\n $safeAttributes = $model->safeAttributes();\n foreach ($results as $result) {\n $attribute = $result['COLUMN_NAME'];\n if (in_array($attribute, $safeAttributes)) {\n $model->$attribute = $result['COLUMN_DEFAULT'];\n }\n }\n\n\n return $model;\n }", "public static function newModel()\n {\n $model = static::$model;\n $relatedResource = static::relatedResource(); \n\n return $model::setFacilitate($relatedResource::$model);\n }", "public function newModel() {\n return $this->container->get('model');\n }", "public function newSearchModel() {\n\t\t$model = parent::newSearchModel();\n\t\t$activeContexts = $this->getActiveContexts();\n\t\tforeach ($activeContexts as $activeContext) {\n\t\t\t$foreignKeyName = $activeContext['foreignKeyName'];\n\t\t\t$model->$foreignKeyName = $activeContext['model']->getPrimaryKey();\n\t\t}\n\t\treturn $model;\n\t}", "protected function createAndHydrateCurrent()\n {\n $object = new $this->modelClassName();\n $object->hydrate( $this->resultSet );\n return $object;\n }", "protected function makeModel() {\n $this->model = $this->isSingle() ? (new SingleDynamicAttribute()) : (new OptionDynamicAttribute());\n $this->model->setConnection($this->parent->getConnectionName());\n $this->model->setTable($this->table);\n return $this->model;\n }", "public function create( $data = null ) {\n\t\treturn $this->create_model_instance( parent::create( $data ) );\n\t}", "public static function newModel(): self\n {\n return new self();\n }", "public function reconstructModel()\n {\n $model = new $this->draftable_type;\n foreach ($this->columns as $column) {\n $attribute = $column->column;\n $model->$attribute = $column->value;\n }\n\n return $model;\n }", "protected function getNewData()\n {\n $this->setCreateQueryObject();\n\n $row = $this->query->initialiseRow();\n $this->form_temp_data = $this->query->executeOnAfterReadEvent($row);\n $this->form_temp_model_registry = $this->query->getModelRegistry();\n\n $this->setParameterDefaults();\n\n return $this;\n }", "public function getEmptyModel()\n\t{\n\t\t$objModel = new GeneralModelDefault();\n\t\t$objModel->setProviderName($this->strSource);\n\t\treturn $objModel;\n\t}", "private function createFromData($data)\n {\n $model = $this->dispense()->hydrate($data);\n $model->isNew = false;\n return $model;\n }", "public function init_model() {\n return null;\n }", "private function create(){\n \n /*****\n * GET TABLE FIELDS\n ******/\n $table_fields = get_class_vars(get_class($this));\n \n /*****\n *GRAB PRIMARY TO BE RESET\n *****/\n $primaryId = $table_fields['field_options']['primary'];\n \n /****\n * UNSET SOME FIELDS\n ****/\n unset($table_fields['field_options']);\n \n /****\n * LOOP THROUGH THE TABLES AND CREATE DATA FOR QUERY CALL\n ****/\n foreach($table_fields as $field => $null){\n if(isset($this->{$field})){ \n $data[$field] = $this->{$field};\n }\n }\n \n /***\n * PUSH INTO DATABASE\n ****/\n $go = go::get_go();\n $res = $go->query->insert($data)->into(get_class($this))->go();\n\n /***\n *GET MOST RECENT\n ***/\n $res = $go->query->select('MAX(id) as id')->from(get_class($this))->go();\n\n /****\n *SET THE PRIMARY KEY BACK INTO THE INSTANTIATED MODEL\n ****/\n if( $res->result ){\n $this->get( $res->row['id'] ); \n }\n \n return $res->result;\n \n }", "public function &get_copy(): flcBaseModel {\n $class = get_class($this);\n $model = new $class();\n $model->set_values($this->get_fields());\n\n return $model;\n }", "public function baseCreate($data)\n {\n $modelClass= $this->convertRepositoryToModelName( );\n return $modelClass::create($data)->fresh();\n }", "public function createModel();", "public function model()\n {\n try {\n $new_class = new $this->draftable_model();\n $new_class->forceFill($this->draftable_data);\n $new_class->published_at = $this->published_at;\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage());\n }\n return $new_class;\n }", "protected function _initModel()\n {\n if (is_null($this->_model) && !empty($this->_modelName) && !empty($this->_idParam)) {\n // get requested id\n $id = $this->_getRequestedId();\n\n // load object by id\n $model = Mage::getModel($this->_modelName);\n\n if ($id) {\n try {\n $model->load($id);\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n\n // set entered data if was error when we do save\n $formData = $this->_getSession()->getFormData(true);\n\n if (!empty($formData)) {\n $model->setData($formData);\n }\n\n // register loaded object\n if (is_array($this->_modelRegistryNames) && count($this->_modelRegistryNames)) {\n foreach ($this->_modelRegistryNames as $key) {\n Mage::register($key, $model);\n }\n } else {\n $key = (string) $this->_modelRegistryNames;\n\n if (!empty($key)) {\n Mage::register($key, $model);\n }\n }\n\n $this->_model = $model;\n }\n\n return $this->_model;\n }", "public function getModel(array $data = array()) {\n return App::make(get_class($this->model))->fill($data);\n }", "function _fillModelDataFromInput() {\n $data = $this->params;\n $sModelName = $this->modelName;\n !empty($this->model->columnSettings) or $this->model->makeColumnConfigures();\n foreach ($this->model->columnSettings as $sColumn => $aSettings) {\n if ($sColumn == 'id')\n continue;\n if (!isset($aSettings['type']))\n continue;\n switch ($aSettings['type']) {\n case 'bool':\n case 'numeric':\n case 'integer':\n !empty($data[$sColumn]) or $data[$sColumn] = 0;\n break;\n case 'select':\n if (isset($data[$sColumn]) && is_array($data[$sColumn])) {\n sort($data[$sColumn]);\n $data[$sColumn] = implode(',', $data[$sColumn]);\n }\n }\n }\n // pr($data);\n // exit;\n // pr(get_class($this->model));\n // pr('---------');\n\n $this->model = $this->model->fill($data);\n // pr('---------');\n // pr($this->model->toArray());exit;\n if ($sModelName::$treeable) {\n $this->model->parent_id or $this->model->parent_id = null;\n if ($sModelName::$foreFatherColumn) {\n $this->model->{$sModelName::$foreFatherColumn} = $this->model->setForeFather();\n }\n }\n }", "public function createModel()\n {\n $class = $this->model;\n\n return new $class;\n }", "protected function createEmptyModelWithDefaults()\n {\n return $this->environment->getController()->createEmptyModelWithDefaults();\n }", "function _fillModelDataFromInput()\n {\n $data = $this->params;\n $sModelName = $this->modelName;\n !empty($this->model->columnSettings) or $this->model->makeColumnConfigures();\n foreach ($this->model->columnSettings as $sColumn => $aSettings) {\n if ($sColumn == 'id')\n continue;\n if (!isset($aSettings['type']))\n continue;\n switch ($aSettings['type']) {\n case 'bool':\n case 'numeric':\n case 'integer':\n !empty($data[$sColumn]) or $data[$sColumn] = 0;\n break;\n case 'select':\n if (isset($data[$sColumn]) && is_array($data[$sColumn])) {\n sort($data[$sColumn]);\n $data[$sColumn] = implode(',', $data[$sColumn]);\n }\n }\n }\n // pr($data);\n // exit;\n // pr(get_class($this->model));\n // pr('---------');\n\n $this->model = $this->model->fill($data);\n // pr('---------');\n // pr($this->model->toArray());exit;\n if ($sModelName::$treeable) {\n $this->model->parent_id or $this->model->parent_id = null;\n if ($sModelName::$foreFatherColumn) {\n $this->model->{$sModelName::$foreFatherColumn} = $this->model->setForeFather();\n }\n }\n }", "public function createNew($data)\n {\n // Get the fillable fields for the model from the request data\n $fillableFields = $this->getFillableFieldsArray($data);\n\n // Create a new instance of the model with the fillable fields and return it\n return $this->model->create($fillableFields);\n }", "public function create($data): Model\n {\n return $this->model->create($data);\n }", "public function getNew()\n {\n $class = $this->getDataObjectClass();\n $object = new $class();\n return $object;\n }", "public function createNewModel($data = null, $modelFqn = null)\n {\n $model = $this->createModel($data, $modelFqn);\n $sessionAccount = \\Auth::user();\n if (!empty($sessionAccount)) {\n $model->createdBy = $sessionAccount->uuid;\n }\n $model->createdAt = new DateTime();\n\n // Generate hew UUID\n $primaryKeyName = $this->primaryKeyName;\n if (empty($model->$primaryKeyName)) {\n $model->$primaryKeyName = $this->genUuid();\n }\n\n return $model;\n }", "protected function newModelInstance()\n {\n if (is_null($this->fullModelClassName)) {\n $this->fullModelClassName = $this->model();\n }\n\n return new $this->fullModelClassName;\n }", "public function hicNeverData()\n {\n $model = Mage::getModel('integration/data');\n \n if ($model->isConfirmation()) {\n $model->populateOrderData();\n }\n \n return $model;\n }", "protected static function newModelBuilder()\n {\n //\n }", "public function getDataModel()\n {\n $birthdayreminderData = $this->getData();\n \n $birthdayreminderDataObject = $this->birthdayreminderDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $birthdayreminderDataObject,\n $birthdayreminderData,\n BirthdayReminderInterface::class\n );\n \n return $birthdayreminderDataObject;\n }", "protected function getNewInstance()\n {\n $model = $this->modelName;\n return new $model;\n }", "private function getFullModel()\n {\n $model = new DefaultModel();\n\n foreach (array_keys($this->collections) as $key) {\n $collection = $this->collections[$key];\n if (isset($collection->model)) {\n $model->searchFilters = array_merge($model->searchFilters, $collection->model->searchFilters);\n $model->tables = array_merge($model->tables, $collection->model->tables);\n $model->stacMapping = array_merge($model->stacMapping, $collection->model->stacMapping);\n }\n }\n\n return $model;\n }", "public function fill($data)\n {\n $model = $this->model->fill($data);\n $model->save();\n\n return $model;\n }", "public function meta(): \\Domain\\Record\\Entities\\Record\\Model\n {\n $model = $this->model;\n\n return new $model($this->meta);\n }", "protected function getDefaultModelObject()\n {\n $model = \\XLite\\Core\\Database::getRepo('XLite\\Module\\XCExample\\Recommendations\\Model\\Recommendation')->find($this->getModelId());\n\n return $model ?: new \\XLite\\Module\\XCExample\\Recommendations\\Model\\Recommendation;\n }", "public function getNewModelWithDataTest() {\n\t\t$data = array('name' => 'Daniel Corn', '__identity' => 9);\n\t\t$path = 'MyExt-MyModel';\n//\t\t$model = $this->fixture->getModelWithDataForPath($data, $path);\n//\t\t$this->assertEquals('Daniel Corn', $model->getName());\n//\t\t$this->assertEquals(9, $model->getUid());\n\t}", "private function create()\n {\n $this->entity = $this->model();\n }", "private function getDefinedModel()\n {\n // Array key is the table name\n// $definedModel = array(\n// 'Subjects' => new DbTableDefinition('Subject', $this),\n// 'Videos' => new DbTableDefinition('Video', $this),\n// 'Images' => new DbTableDefinition('Image', $this),\n// 'SubjectVideos' => new DbRelatedTable('Subject', 'Video' ),\n// 'SubjectImages' => new DbRelatedTable('Subject', 'Image'),\n// 'Files' => new DbTableDefinition('File', $this),\n// 'VideoFiles' => new DbRelatedTable('Video', 'File'),\n// );\n// return $definedModel;\n// //TODO: Database map will be defined in Startup class.\n// //$this->modelDefinition = Startup::defineModel();\n }", "protected function newModel() {\n\t\t// Get model\n\t\t$model = parent::newModel();\n\n\t\t// Skip processing if no filter link models or links are available\n\t\tif ( ! isset( $this->hierarchy_links ) || count( $this->hierarchy_links ) == 0 ) {\n\t\t\treturn $model;\n\t\t}\n\n\t\t// Load models for the filter links\n\t\tforeach ( $this->hierarchy_links as $filter_variable => $filter_model ) {\n\t\t\tif (\n\t\t\t\tisset( $this->active_hierarchy_filters[ $filter_variable ] ) &&\n\t\t\t\t$model->isAttributeActive( $filter_variable )\n\t\t\t) {\n\t\t\t\t$model->$filter_variable = $this->active_hierarchy_filters[ $filter_variable ];\n\t\t\t}\n\t\t}\n\n\t\treturn $model;\n\t}", "public function create(array $data): ?Model\n {\n $model = parent::create($data);\n\n Cache::tags($this->cacheTags)->flush();\n $this->cacheModel($model);\n\n return $model;\n }", "public function store($data)\n {\n $this->model->fill($data);\n\n $this->model->save();\n\n return $this->model;\n }", "function createNew()\n\t{\n\t\tinclude_once( \"Bin/Module.DataModel/WorkflowModuleData.php\");\n\t\t$o = new ViewWorkflowModuleData();\n\t\treturn $o;\n\t}", "public function getDataModel()\n {\n $assigned_customer_managerData = $this->getData();\n\n $assigned_customer_managerDataObject = $this->assigned_customer_managerDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $assigned_customer_managerDataObject,\n $assigned_customer_managerData,\n AssignedCustomerManagerInterface::class\n );\n\n return $assigned_customer_managerDataObject;\n }", "public function prepareModel($data)\n {\n $modelClass = $this->model;\n\n /**\n * If the id is present in the data then select the model for updating,\n * else create new model.\n * @var array\n */\n $model = Arr::has($data, 'id') ? $modelClass->lockForUpdate()->find($data['id']) : new $modelClass;\n if (! $model) {\n \\Errors::notFound(class_basename($modelClass).' with id : '.$data['id']);\n }\n\n /**\n * Construct the model object with the given data,\n * and if there is a relation add it to relations array,\n * then save the model.\n */\n foreach ($data as $key => $value) {\n if (array_search($key, $model->getFillable(), true) !== false) {\n /**\n * If the attribute isn't a relation and prevent attributes not in the fillable.\n */\n $model->$key = $value;\n }\n }\n\n return $model;\n }", "public function getDataModel()\n {\n $post_codesData = $this->getData();\n \n $post_codesDataObject = $this->post_codesDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $post_codesDataObject,\n $post_codesData,\n PostCodesInterface::class\n );\n \n return $post_codesDataObject;\n }", "public function new()\n {\n $class = get_class($this->model());\n\n return new $class();\n }", "public function getModelFiller()\n {\n return $this->modelFiller ? $this->modelFiller : new EloquentFiller();\n }", "public function getDataModel()\n {\n $invoiceData = $this->getData();\n\n $invoiceDataObject = $this->invoiceDataFactory->create();\n $this->dataObjectHelper->populateWithArray($invoiceDataObject, $invoiceData, InvoiceInterface::class);\n\n return $invoiceDataObject;\n }", "public function insertModel($data)\n {\n $newmodel = null;\n try {\n DB::beginTransaction();\n if (Auth::check() && $this->createdBy) {\n $data['created_by'] = Auth::user()->id;\n }\n $newmodel = new $this->model();\n $newmodel->fill($data);\n $newmodel = $this->beforeSave($newmodel);\n $newmodel->save();\n $newmodel->refresh();\n $data = $this->afterSave($newmodel);\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollBack();\n\n return $this->responseError($e);\n }\n\n return $this->transResponse($newmodel, Response::HTTP_CREATED, 'Record successfully created');\n }", "public function getModel()\n\t{\n\t\treturn new DBModel($this);\n\t}", "public function factory(array $data = [])\n {\n $model = $this->newQuery()->getModel()->newInstance();\n\n $this->fill($model, $data);\n\n return $model;\n }", "public function getDataStorageModel()\n {\n if (! $this->_dataModel instanceof FieldDataModel) {\n $this->_dataModel = $this->tracker->createTrackClass('Model\\\\FieldDataModel');\n }\n\n return $this->_dataModel;\n }", "public function creating(Model $model, array $data)\n {\n\n\n return $data;\n }", "public function createModel()\n {\n $className = $this->modelClassName;\n return new $className();\n }", "public function createNew($data){\n return $this->create($data);\n }", "public function createModel(Collection $data): CrudableModel;", "public function createNewEntity()\n\t\t{\n\t\t\t$entityClass = $this->mapper->getEntityClass($this->getTable());\n\t\t\treturn $this->entityFactory->createEntity($entityClass);\n\t\t}", "protected function buildDefaultData()\n {\n $fields = $this->fields();\n $defaultRawObj = new \\stdClass();\n foreach ($fields as $f => $props) {\n if (array_key_exists('default', $props)) {\n $defaultRawObj->{$f} = $props['default'];\n }\n else {\n $defaultRawObj->{$f} = NULL;\n }\n }\n $this->attributes = $defaultRawObj;\n\n return $this->attributes;\n }", "protected function newData()\n {\n return $this->attachRelatedAttributes(\n $this->getLogAttributes($this->owner),\n self::IS_NEW_TRUE\n );\n }", "public function create(array $data): Model;", "public static function model()\r\n {\r\n return new self();\r\n }", "protected function postCreateOrUpdate($model)\n\t{\n\t\treturn $model;\n\t}", "public function getDataModel()\n {\n $messageData = $this->getData();\n $messageDataObject = $this->_messageInterfaceFactory->create();\n $this->_dataObjectHelper->populateWithArray(\n $messageDataObject,\n $messageData,\n '\\Cart2Quote\\Desk\\Api\\Data\\MessageInterface'\n );\n $messageDataObject->setId($this->getId());\n return $messageDataObject;\n }", "protected function initialiseModel()\n {\n $context = Context::currentRequest();\n $i = $context->get(\"i\");\n\n if ($i){\n $this->model->InviteID = $i;\n }\n\n parent::initialiseModel();\n }", "static public function create() {\r\n $model = new static::$modelName;\r\n return $model;\r\n }", "private function _getEntryModel()\n {\n $entry = new FormBuilder_EntryModel();\n\n return $entry;\n }", "public function getDataModel()\n {\n $messageData = $this->getData();\n $ticketDataObject = $this->_ticketInterfaceFactory->create();\n $this->_dataObjectHelper->populateWithArray(\n $ticketDataObject,\n $messageData,\n '\\Cart2Quote\\Desk\\Api\\Data\\TicketInterface'\n );\n $ticketDataObject->setId($this->getId());\n return $ticketDataObject;\n }", "public function save_indirectly() {\n $this->instantiate_model();\n //$this->model = $this->model->save();//actually call the model twice...\n return $this->model;\n }", "private function modelInstance(){\r\n //$class = $this->getModel();\r\n //return new $class();\r\n }", "public function getDataModel()\n {\n $interestData = $this->getData();\n \n $interestDataObject = $this->interestDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $interestDataObject,\n $interestData,\n InterestInterface::class\n );\n \n return $interestDataObject;\n }", "protected function setDefaultModel()\n {\n if (file_exists(MvcReg::$_modelFile)) {\n require_once (MvcReg::$_modelFile); \n $this->model = new MvcReg::$_modelClassName();\n $this->model->initialDB();\n }\n }", "public function saveData()\n {\n return $this;\n }", "public function beforeSave()\n {\n if ($this->request->getModuleName() == 'xtento_orderexport' && $this->request->getControllerName() == 'profile') {\n parent::beforeSave();\n } else {\n if (!$this->getId()) {\n $this->isObjectNew(true);\n }\n }\n return $this;\n }", "private function _getCommonModel() {\n if ($this->_commonModel == NULL) {\n $this->_commonModel = new CommonModel();\n }\n return $this->_commonModel;\n }", "public function store($data)\n {\n $model = $this->model->create($data);\n\n return $model;\n }", "protected function make()\n {\n return new $this->model;\n }", "function newDataObject() {\n\t\treturn new SignoffEntity();\n\t}", "function create($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t\t// set needed database model ...\r\n\t\t$this->Entry = ClassRegistry::init('Entry');\r\n\t\t$this->Type = ClassRegistry::init('Type');\r\n\t\t$this->Setting = ClassRegistry::init('Setting');\r\n\t\t$this->EntryMeta = ClassRegistry::init('EntryMeta');\r\n\t}", "protected function initModel() {\n \n }", "public function save() {\n $this->object_variables['id'] = CA_Security::clean_text($_REQUEST[$this->form_name . '_id']);\n $this->instantiate_model();\n //$this->model = $this->model->save();//actually call the model twice...\n return $this->model;\n }", "public static function newUserModel()\n {\n $model = static::userModel();\n\n return new $model;\n }", "public function newModelQuery()\n {\n return $this->newEloquentBuilder()->setModel($this->model);\n }", "protected function getNewEntity()\n {\n $entity = $this->table->getEntity();\n return new $entity();\n }", "public function generalModel() { return $this->generalModel; }", "public function create($data) {\n return $this->model->create($data);\n }", "public function create(array $data): ?Model\n {\n return $this->model::create($data);\n }", "static function Create() \n\t{\n if (NULL == self::$configModel) {\n self::$configModel = new ConfigModel();\n }\n return self::$configModel;\n }", "public function create(array $data): ?Model;", "function _createModel()\n\t{\n\t\t// since we don't know if the models have extra associations we need to\n\t\t// unbind all the models, and bind only the ones we're interested in\n\t\t// mainly for performance ( and security )\n\t\t\n\n\t\tif (ClassRegistry::isKeySet($this->user_model))\n\t\t{\n\t\t\t$UserModel =& ClassRegistry::getObject($this->user_model); \n\t\t} \n\t\telse \n\t\t{ \n\t\t\tloadModel($this->user_model);\n\t\t\t\n\t\t\t$UserModel =& new $this->user_model; \n\t\t\t\n\t\t}\n\t\t\n $forUser = array('belongsTo'=>array($this->group_model),\n 'hasOne'=>array(),\n 'hasMany'=>array(),\n 'hasAndBelongsToMany'=>array()\n );\n $forGroup = array('belongsTo'=>array(),\n 'hasOne'=>array(),\n 'hasMany'=>array(),\n 'hasAndBelongsToMany'=>array($this->permission_model)\n );\n $forPerm = array('belongsTo'=>array(),\n 'hasOne'=>array(),\n 'hasMany'=>array(),\n 'hasAndBelongsToMany'=>array()\n );\n\t\t\n\t\t\n\t\t$forUser = $this->_mergeModelsToKeep($forUser,$this->allowedAssocUserModels);\n\t\t$forGroup = $this->_mergeModelsToKeep($forGroup,$this->allowedAssocGroupModels);\n\t\t$forPerm = $this->_mergeModelsToKeep($forPerm,$this->allowedAssocPermissionModels);\n\n\t\t// TODO:\n\t\t// should save the old recursive for the three models\n\t\t// add default recursives for user 2, for group 1, for permission 1\n\t\t// so that extra models can be fetched if supplied\n\t\t$UserModel->recursive = 2;\n\t\t$UserModel->unbindAll($forUser);\n\t\t$UserModel->{$this->group_model}->unbindAll($forGroup);\n\t\t\n\t\t$UserModel->{$this->group_model}->{$this->permission_model}->unbindAll($forPerm);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\treturn $UserModel; \n\t}", "public function createNew($values)\n\t{\n\t\t// store referring user if present and possible\n\t\tif (!empty($values['referral'])) {\n\t\t\t$referrer = $this->getOneFiltered('*', array(\n\t\t\t\t'referral_code' => $values['referral'],\n\t\t\t));\n\t\t\tif ($referrer) {\n\t\t\t\t$values['inviter_account_id'] = $referrer->id;\n\t\t\t}\n\t\t}\n\t\tunset($values['referral']);\n\n\t\t$values['created'] = new \\DateTime();\n\t\t$values['country_code']\n\t\t\t= $this->geoIp->getCountryCodeForIp($_SERVER['REMOTE_ADDR']);\n\t\t$values['facebook_connected'] = isset($values['facebook_id'])\n\t\t\t? (bool)$values['facebook_id']\n\t\t\t: false;\n\t\t$model = parent::insert($values);\n\t\t$this->_generateReferralCode($model);\n\t\t// set password by dedicated method, so it's hashed before its first use\n\t\t$model->setPassword($values['password']);\n\n\t\treturn $model;\n\t}", "private function _dataToModel()\n {\n $LetterModel = new LetterModel();\n $LetterModel->recipients = Json::encode($this->recipients);\n $LetterModel->subject = $this->subject;\n $LetterModel->body = $this->body;\n $LetterModel->attachments = Json::encode($this->attachments);\n\n return $LetterModel;\n }", "public function _getModel() {\n return parent::_getModel();\n }", "protected function _getDBTCModel()\n {\n return $this->getModelFromCache ( 'DBTC_Model_DBTC' );\n }", "public function getNewProjectTypeModel() {\r\n return clone $this->getModel();\r\n }", "protected function createDefaultData()\n {\n // Ensure that tables are cleared\n $this->entityManager->transactional(function($entityManager) {\n $entityManager->getRepository('KnowledgeBase_Entity_Ticket')->truncateTable();\n\n\n $ticket1 = new KnowledgeBase_Entity_Ticket();\n $ticket2 = new KnowledgeBase_Entity_Ticket();\n $ticket3 = new KnowledgeBase_Entity_Ticket();\n $ticket4 = new KnowledgeBase_Entity_Ticket();\n $ticket5 = new KnowledgeBase_Entity_Ticket();\n\n $ticket1->setSubject('Ticket subject 1');\n $ticket1->setContent('Ticket content 1');\n $ticket1->setViews(1);\n $ticket1->setRatesUp(1);\n $ticket1->setRatesDown(1);\n $ticket2->setSubject('Ticket subject 2');\n $ticket2->setContent('Ticket content 2');\n $ticket2->setViews(2);\n $ticket2->setRatesUp(2);\n $ticket2->setRatesDown(2);\n $ticket3->setSubject('Ticket subject 3');\n $ticket3->setContent('Ticket content 3');\n $ticket3->setViews(3);\n $ticket3->setRatesUp(3);\n $ticket3->setRatesDown(3);\n $ticket4->setSubject('Ticket subject 4');\n $ticket4->setContent('Ticket content 4');\n $ticket4->setViews(4);\n $ticket4->setRatesUp(4);\n $ticket4->setRatesDown(4);\n $ticket5->setSubject('Ticket subject 5');\n $ticket5->setContent('Ticket content 5');\n $ticket5->setViews(5);\n $ticket5->setRatesUp(5);\n $ticket5->setRatesDown(5);\n\n $entityManager->persist($ticket1);\n $entityManager->persist($ticket2);\n $entityManager->persist($ticket3);\n $entityManager->persist($ticket4);\n $entityManager->persist($ticket5);\n });\n\n // Insertion successful\n return true;\n }", "public function create(array $data)\n {\n $model = new $this->model();\n $model->fill($data);\n $model->save();\n return $model;\n }", "protected function initmodel() {\r\n\t\t// $this->settable('some_table');\r\n\r\n\t}", "protected function getNewModel()\n {\n return $this->getRealPathModel() . \"/{$this->modelName}.php\";\n }" ]
[ "0.7019197", "0.7013983", "0.6612426", "0.641966", "0.63987213", "0.6344451", "0.6269191", "0.62379086", "0.6230774", "0.62034476", "0.61505", "0.6148412", "0.6140904", "0.6128075", "0.6107774", "0.6066405", "0.60247475", "0.601308", "0.5991877", "0.59527016", "0.594935", "0.59490544", "0.593571", "0.59298515", "0.59266895", "0.58969545", "0.5883353", "0.58829796", "0.58808726", "0.5879375", "0.58339936", "0.58224237", "0.5817803", "0.5809252", "0.5805159", "0.5803364", "0.5797924", "0.57969326", "0.5791147", "0.57826906", "0.5761316", "0.57492197", "0.5741316", "0.5723891", "0.57065946", "0.57042617", "0.5698139", "0.56833553", "0.56756437", "0.56692016", "0.5668782", "0.56659853", "0.56623554", "0.56480855", "0.56436574", "0.5628133", "0.5624337", "0.562296", "0.5605001", "0.5603504", "0.5597138", "0.55849826", "0.55844015", "0.5583624", "0.557908", "0.55761254", "0.5567247", "0.55367595", "0.55323005", "0.5531651", "0.5531477", "0.55276597", "0.5526797", "0.5525937", "0.55116177", "0.5509687", "0.5506551", "0.5505575", "0.55045027", "0.5502005", "0.5494026", "0.5481038", "0.5479029", "0.5479014", "0.5474929", "0.54743373", "0.5474256", "0.5471475", "0.54683995", "0.5464318", "0.54538786", "0.5452141", "0.5448773", "0.54343015", "0.5433824", "0.5433517", "0.5429324", "0.54251087", "0.54224706", "0.54203266" ]
0.76003623
0
Adds node to current relation. Relation's definition is extended by adding nodes. Added nodes must be declaring reference on preceding node. Relation is completed by adding nonpartial node not declaring reference on another succeeding node . Adding further nodes is rejected then.
Добавляет узел в текущую связь. Определение связи расширяется за счёт добавления узлов. Добавленные узлы должны объявлять ссылку на предыдущий узел. Связь завершается добавлением неполного узла, не объявляющего ссылку на другой последующий узел. Добавление дальнейших узлов отклоняется в таком случае.
public function add( model_relation_node $node, $isPartialNode = false ) { if ( $this->isComplete() ) throw new \LogicException( 'adding to completed relation rejected' ); if ( !$node->isValid() ) throw new \InvalidArgumentException( 'invalid relational node' ); if ( !$node->wantsPredecessor() ) throw new \InvalidArgumentException( 'node is not suitable for linking with preceding node' ); $predecessor = $this->nodeAtIndex( -1 ); if ( $predecessor->getSuccessorReferenceWidth() != $node->getPredecessorReferenceWidth() ) throw new \InvalidArgumentException( 'mismatching width of reference' ); $bindThere = $predecessor->canBindOnSuccessor(); $bindHere = $node->canBindOnPredecessor(); if ( !( ( $bindThere && !$bindHere ) ^ ( !$bindThere && $bindHere ) ) ) throw new \InvalidArgumentException( 'node is not compatible with predecessor in binding reference' ); $this->nodes[] = $node; if ( !$isPartialNode && !$node->wantsSuccessor() ) { // transfer set of nodes into set of references $this->references = array(); for ( $i = 1; $i < count( $this->nodes ); $i++ ) $this->references[] = new model_relation_reference( $this->nodes[$i-1], $this->nodes[$i], $this, count( $this->references ) ); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function add(Node $node): void;", "public function addRelation(string $relation, ?CriteriaContract $criteria = null): static;", "public function append( $node ){\n $this->nodes[] = $node;\n $this->numNodes++; \n }", "public function addChild(Node $node);", "function addRelation(IEntity $entity, $relName, $id);", "public function append(Node $node);", "public function addRelation($relation, $relationType = null);", "public function add(Node $n) {\n $this->nodes[]= $n;\n return $n;\n }", "public function addRelation($relation) {\n\n array_push($this->relations, $relation);\n }", "public function add_relation($parent, $child) {\r\n\t\t$this->push_relation( $parent, $child );\r\n\t}", "public function add() {\n\t\t$this->_add ();\n\t}", "public function addTournamentNode(TournamentInterface $node);", "public function addPartyRelation() {\r\n $this->addRelation('party');\r\n }", "protected function addRefAddMethod(Relation $refRelation)\n {\n $varName = lcfirst($this->getRefRelationPhpName($refRelation));\n $className = $this->getObjectClassName();\n $methodName = 'add' . ucfirst($varName);\n $colVarName = $this->getRefRelationCollVarName($refRelation);\n $relationClassName = $this->getClassNameFromEntity($refRelation->getEntity());\n// $relationClassName = '\\\\' . $refRelation->getEntity()->getFullClassName();\n\n $body = \"\nif (!\\$this->{$colVarName}->contains(\\${$varName})) {\n \\$this->{$colVarName}[] = \\${$varName};\n \\${$varName}->set\" . $this->getRelationPhpName($refRelation) . \"(\\$this);\n}\n\nreturn \\$this;\n\";\n $this->getDefinition()->declareUse('Propel\\Runtime\\Collection\\ObjectCollection');\n\n $this->addConstructorBody(\"\\$this->{$colVarName} = new ObjectCollection();\");\n\n $this->addMethod($methodName)\n ->addSimpleParameter($varName, $relationClassName)\n ->setType($className . '|$this')\n ->setDescription(\"Associate a $relationClassName to this object\")\n ->setBody($body);\n }", "public function add($rel, Resource $resource, $multi = true) {}", "public function add(Node $node){\n //because it's gonna remove its next element, but by cloning it\n //it'll keep the next element of the original node\n $newNode = clone $node;\n $newNode->setNext($this->head);\n $this->head = $newNode;\n }", "public function addRelation(Relation\\RelationInterface $relation)\n\t{\n\t\t$this->relationships->add($relation);\n\t}", "abstract public function add();", "public function _append( Node $n ): void {\n\t\t$this->_list[] = $n;\n\t}", "public function addRelation(EboekhoudenRelation $relation): EboekhoudenRelation\n {\n $result = $this->soapClient->__soapCall('AddRelatie', [\n 'AddRelatie' => [\n 'SessionID' => $this->sessionId,\n 'SecurityCode2' => $this->secCode2,\n 'oRel' => $this->getORel($relation),\n ],\n ]);\n\n $this->checkError('AddRelatie', $result);\n\n $relation->setId((int)$result->AddRelatieResult->Rel_ID);\n\n return $relation;\n }", "function addCurrent() {\n\t\t$this->cur = array( $this->oldRel, $this->newRel );\n\t}", "public function addInNode( ezcWorkflowNode $node )\n {\n // Check whether the node is already an incoming node of this node.\n if ( ezcWorkflowUtil::findObject( $this->inNodes, $node ) === false )\n {\n // Add this node as an outgoing node to the other node.\n if ( !self::$internalCall )\n {\n self::$internalCall = true;\n $node->addOutNode( $this );\n }\n else\n {\n self::$internalCall = false;\n }\n\n // Add the other node as an incoming node to this node.\n $this->inNodes[] = $node;\n $this->numInNodes++;\n }\n\n return $this;\n }", "public function add($item)\n\t{\n\t\t$items = $this->toModelArray($item);\n\n\t\tforeach ($items as $model)\n\t\t{\n\t\t\t$this->addToRelated($model);\n\n\t\t\t$inverse = $this->getInverse($model);\n\n\t\t\tif ($inverse instanceOf ToOne)\n\t\t\t{\n\t\t\t\t$inverse->markAsLoaded();\n\t\t\t}\n\t\t}\n\t}", "public function Append(Node $node)\n {\n if ($this->back === null) {\n $this->Prepend($node);\n return;\n }\n //set back next to node\n $this->back->setNext($node);\n //set node previous to current back\n $node->setPrevious($this->back);\n //set new back\n $this->back = &$node;\n // track linked list\n $this->nodes[] = $node;\n $this->counter ++;\n }", "public function addNode(Node $node)\n {\n if (is_null($node)) return false;\n $node->setNext(null);\n if ($this->length == 0) {\n $this->head = $node;\n $this->tail = $node;\n ++$this->length;\n\n return $this;\n }\n\n $this->tail->setNext($node);\n $this->tail = $node;\n ++$this->length;\n\n return $this;\n }", "public function addNode(Node $node = null) {\n\t\tif (is_null($node)){\n\t\t\tthrow new \\Exception(\"can't add a null node to a processdefinition\");\n\t\t}\n\t\t$this->log->debug(\">addNode([{$node->getName()}])\");\n\t\t$this->nodes->add($node);\n\t\t$this->nodesMap[$node->getName()] = $node;\n\t\t$node->processDefinition = $this;\n\t\t\n\t\tif ($node instanceof StartState){\n\t\t\t$this->startState = $node;\n\t\t}\n\t\treturn $node;\n\t}", "public function addRecommendationRelation() {\r\n $this->addRelation('recommendation');\r\n }", "public function addNode($expression);", "public function add ($item) {\n\t\t$x = new ListNode($item, null);\n\t\tif ($this->h === null) {\n\t\t\t$this->h = $x;\n\t\t} else {\n\t\t\t$this->q->next = $x;\n\t\t}\n\t\t$this->q = $x;\n\t\t$this->length++;\n\t}", "public function addDistrictRelation() {\r\n $this->addRelation('district');\r\n }", "public function addNode(\\DOMNode $node)\n {\n $this->domMerger->mergeNode($node);\n }", "public function append(XmlAttribute $node) { }", "public function append(Node $node) {\n\t\t$this->root->append($node);\n\t}", "public function createRelatedLinearRelation()\n {\n $linearRelated = TreeLinear::create(['user_id'=>$this->id]);\n }", "public function addNode(Node $node)\n {\n if ($node->getType() == Node::TYPE_INITIAL) {\n if ($this->initial_status) {\n throw new Exception('The workflow cant have more than one initial state');\n }\n $this->initial_status = $node->getId();\n }\n\n $this->nodes[$node->getId()] = $node;\n\n return $this;\n }", "public function addResourceRelation($relation) {\n\n array_push($this->resourceRelations, $relation);\n }", "public function addNewsRelation() {\r\n $this->addRelation('itemNews');\r\n }", "public function appendNode(XliffNode $node){\n\t\t\n\t\t//Automatically detect where to append this node\n\t\tif (!empty($this->supportedContainers[$node->getName().'s'])){\n\t\t\t$this->containers[$node->getName().'s'][] = $node;\n\t\t}elseif(!empty($this->supportedNodes[$node->getName()])){\n\t\t\t$this->nodes[$node->getName()] = $node;\n\t\t}else{\n\t\t\t$this->nodes[$node->getName()] = $node;\n\t\t}\n\t\treturn $this;\n\t}", "function addAtHead($val) {\n\t\t$new_node = new Node($val);\n\t\t$new_node->next = $this->link->next;\n\t\t$this->link->next = $new_node;\n\t\t$this->length++;\n\t}", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\t}", "public function attachChild(Zend_Server_Reflection_Node $node)\n {\n $this->_children[] = $node;\n\n if ($node->getParent() !== $this) {\n $node->setParent($this);\n }\n }", "public function addDefinition(FHIRReference $definition = null)\n {\n $this->definition[] = $definition;\n return $this;\n }", "function addNode($n){\r\n \t array_push($this->list_job_chain_nodes,$n);\r\n }", "public function addDirectReference($direct);", "public function add()\n\t{\n//\t\t$words->add\t\t= (object) $words->add;\n//\t\t$this->addData( 'words', $words );\n\t}", "public function append($node)\n {\n $this->list[] = $node;\n }", "function hook_prestataires_node_add($nid, $uid) {}", "public function addNNRelation($relation, $register_key): void\n {\n $this->nn_relations[$relation] = $register_key;\n }", "public function addReference($reference)\n {\n $this->_references[] = $reference;\n return $this;\n }", "public function attach(Tree_Composite_Interface $node)\n {\n $this->_children[$node->getId()] = $node;\n }", "public function append(Node $n) {\n $s= sizeof($this->nodes);\n\n // If last node is an empty nodelist, optimize it away, preventing \n // output such as <p></p>\n if ($s && $this->nodes[$s - 1] instanceof self && 0 === sizeof($this->nodes[$s - 1]->nodes)) {\n $this->nodes[$s - 1]= $n;\n } else {\n $this->nodes[]= $n;\n }\n return $n;\n }", "public function pushResolve(Node $node): void\n {\n if (!$node instanceof FullyQualified) {\n $this->nameResolver->enterNode($node);\n }\n }", "public function addNode($p) {\n\t\t$p['id'] = $this -> getFreeNodeId();\n\n\t\t// Add the node\n\t\ttry {\n\t\t\t$this -> nodes[$p['id']] = new Node($p, $p['id'], $this -> tenant, $this -> id);\n\t\t\treturn $this -> save();\n\t\t} catch (Exception $e) {\n\t\t\t// Failed to create the node\n\t\t\terror_log(date('M d H:i:s ').'ERROR: '.$this -> path .'/'.$this -> filename.'?node='.$p['id'].' '.$GLOBALS['messages'][20022]);\n\t\t\terror_log(date('M d H:i:s ').(string) $e);\n\t\t\treturn 20022;\n\t\t}\n\t}", "public function add() {\n }", "public function testAddingNodeToNonExistingParentNoRoot()\n {\n $this->assertNull($this->nestedSet->addNode(new Node('n1'), new Node('n2')));\n }", "public function add($child){\r\n\t\t\r\n\t\tif ( $child != null)\r\n\t\t{\r\n\t\t\tif ($this->child != null){\r\n\t\t\t\t$this->child->add($child);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\t$this->child = $child;\r\n\t\t}\r\n\t}", "public function addInRanking(Node $node): void;", "protected function addSelfReferencing($lhs, $rhs, $additionalFields = array())\n {\n //No-op on One2M.\n }", "protected function addRelationship($nodeStartObject, $nodeToObject, $type){\n\t\t\treturn $nodeStartObject->relateTo($nodeToObject, $type)->save();\n\t\t}", "public function addAction()\n {\n // Form\n $form = $this->getNodeService()->getNodeForm();\n $nodeType = $this->params()->fromQuery('node_type', 'mvc');\n $nodeType = '\\Node\\Entity\\\\' . ucfirst($nodeType) . 'Node'; \n \n $node = new $nodeType();\n $form->bind($node);\n \n // Processing\n $process = $this->getNodeService()->processNodeForm($form);\n if ($process instanceof \\Zend\\Http\\PhpEnvironment\\Response) {\n return $process;\n } elseif(true === $process) {\n $this->flashmessenger()->addSuccessMessage(sprintf($this->translate('The node %s has been saved.'), $node->getNodeName()));\n return $this->redirect()->toRoute('zfcadmin/node');\n }\n \n // View\n return [\n 'form' => $form,\n 'node' => $node,\n ];\n }", "public function actionAddRelationship() {\n\n //check if relationship already exits\n if (isset($_POST['ModelName']) && isset($_POST['ModelId']) &&\n isset($_POST['RelationshipModelName']) && isset($_POST['RelationshipModelId'])) {\n\n $modelName = $_POST['ModelName'];\n $modelId = $_POST['ModelId'];\n $relationshipModelName = $_POST['RelationshipModelName'];\n $relationshipModelId = $_POST['RelationshipModelId'];\n $model = $this->getModelFromTypeAndId ($modelName, $modelId);\n if (!Yii::app()->controller->checkPermissions ($model, 'edit')) {\n $this->denied ();\n }\n $relationshipModel = $this->getModelFromTypeAndId (\n $relationshipModelName, $relationshipModelId);\n if (!Yii::app()->controller->checkPermissions ($relationshipModel, 'view')) {\n $this->denied ();\n }\n\n if (isset($_POST['mutual']) && $_POST['mutual'] == 'true')\n $_POST['secondLabel'] = $_POST['firstLabel'];\n\n if ($model->hasRelationship($relationshipModel)) {\n echo 'duplicate';\n Yii::app()->end();\n }\n\n if ($model->createRelationship($relationshipModel, $_POST['firstLabel'], $_POST['secondLabel']) === true) {\n echo 'success';\n Yii::app()->end();\n } else {\n echo 'failure';\n Yii::app()->end();\n }\n } else {\n throw new CHttpException(400, Yii::t('app', 'Bad Request'));\n }\n }", "public function addChild(&$node)\n {\n $this->_childNodes[] =& $node;\n }", "public function add($operand)\n {\n // If the left side is not set, use the operand\n if (!isset($this->left)) {\n $this->left = $operand;\n\n // If the right side is not set, use the operand\n } elseif (!isset($this->right)) {\n $this->right = $operand;\n\n // If both sides are set, continue\n } else {\n $right_side_class = get_class($this->right);\n\n // If the right side has a higher priority, push the node down\n if ($right_side_class::$order > $operand::$order) {\n $operand->setValue($this->right);\n $this->right = $operand;\n\n // Otherwise, add the node into the next value\n } else {\n $this->right->add($operand);\n }\n }\n }", "public abstract function Add();", "private function addRootNode()\n\t{\n\t\t$this->rootNode = ['id' => 0];\n\t\tarray_unshift($this->tasks, $this->rootNode);\n\t}", "public function addNode($text)\n {\n //kijk of nextNode gelijk is aan null\n //indien ja: maak een nieuwe node aan en ken die toe aan nextNode\n if ($this->nextNode == null) {\n $this->nextNode = self::makeNode($text);\n } else {\n //indien nee: roep de methode addNode aan op nextNode\n $this->nextNode->addNode($text);\n }\n }", "public function add($obj)\n\t{\n\t\t$node = $this->_node;\n\t\twhile($this->_node->getNext() != null)\n\t\t{\n\t\t\t$node = $this->_node->getNext();\n\t\t}\n\t\t\n\t\t$node->setNext(new doubleNode($obj, null));\n\t\t$this->_node = $node;\n\t}", "function addRelationship( $original, $new ) {\n\t\t// Check if not the same element\n\t\tif ( !$original || !$new )\n\t\t\treturn false;\n\t\t\n\t\t// Add the post_meta between the original and the transalted element\n\t\t$this->addPostMeta( $original, '_translation_of', $new );\n\t\t$this->addPostMeta( $new, '_translation_of', $original );\n\t\n\t\t// check if there is more element to save or not\n\t\t$also_translation_of = get_post_meta( $original, '_translation_of' );\n\t\t\n\t\t// If this is an array, so add the link with all the other elements between them\n\t\tif ( is_array( $also_translation_of ) ) {\n\t\t\tforeach ( $also_translation_of as $a ) {\n\t\t\t\t// check not same elements\n\t\t\t\tif ( $a == $new )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t$this->addPostMeta( $new, '_translation_of', $a );\n\t\t\t\t$this->addPostMeta( $a, '_translation_of', $new );\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function _add_relations($state, $node){\n $relations = _get_relations($node->vid);\n //$node->relations = $relations;\n $form = array('rels'=>array(\n //'#title'=>$node->title,\n '#tree'=>TRUE,\n '#type'=>'fieldset',\n '#description'=>t('Links are connections between \n entries. There can be different types of links.\n Create a new type of link !here.',\n array('!here'=>l(t('here'),\n 'admin/content/kw/settings/kentry',\n array('query'=>drupal_get_destination())))).\n node_view($node, 1, 1)));\n\n $indexlangs = unserialize(db_result(db_query(\"SELECT `index`\n FROM {kdictionary}\n WHERE iso='%s'\", $node->iso))); \n drupal_set_title(t('Create links for !word', array('!word'=>$node->title)));\n $ksynsets = explode(\",\" ,variable_get('ksynsets', \"\"));\n $ksynsets = ($ksynsets[0]==\"\")?array():$ksynsets;\n\n if(is_array($node->chn)){\n $matches = array();\n $suggestions = array();\n foreach($node->chn as $kfid=>$child){\n list($linkdb, $linktype) = split('\\|', $child->link);\n if(in_array($linkdb, $indexlangs)){\n $possmatches = array_map('trim', split(\"[,;\\t/]\", $child->value));\n foreach($possmatches as $possmatch){\n\t\t if (trim($possmatch)) {\n\t\t\t$matches = array_merge($matches, kentry_page(trim($possmatch), '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $linkdb, 1));\n\t\t }\n }\n foreach($matches as $match){\n if(is_array($relations[$match->iso][$linktype])) {\n $existing_relations = $relations[$match->iso][$linktype];\n }else{\n $existing_relations = array();\n }\n if(!in_array($match->vid,\n array_keys($existing_relations))){\n $pos = module_exists('taxonomy')?\n taxonomy_get_term($match->partofspeech):'';\n $output ='<b>'.$match->title.'</b> ('.$pos->name.'), '.\n l(t('View'), \"node/$match->nid\",\n array('attributes' => array('target'=>'autosuggest'))).\"\\n\\t\".\n node_teaser($match->defn,FILTER_FORMAT_DEFAULT, 200);\t\t\n $suggestions[$match->iso][$linktype][$match->vid]= $output;\n }\n }\n } \n }\n }\n\n if(is_array($indexlangs)){\n foreach($indexlangs as $iso){\n $form['rels'][$iso] = array(\n '#type'=>'fieldset',\n '#title'=>t('Create confirmed links from !word to !db entries',\n array('!word'=>$node->title,\n '!db'=>_name($iso))),\n '#collapsible'=>TRUE,\n );\n foreach($ksynsets as $ksynset){\n $ksynset = trim($ksynset); \n $form['rels'][$iso][$ksynset.'wrap'] = array(\n '#type' => 'markup',\n // '#prefix'=>\"<fieldset class=' collapsible'><legend>\".t(variable_get('ksynset_'.$ksynset.'_name', '')).\"</legend>\",\n '#value'=>'<div><h3>'.t(variable_get('ksynset_'.$ksynset.'_name', $ksynset)).'</h3></div'\n );\n if(is_array($suggestions[$iso][$ksynset])){\n $form['rels'][$iso][$ksynset.\"_n#w\"] = array(\n '#title' => t(\"Add suggested links\", array('%rel'=>t(variable_get('ksynset_'.$ksynset.'_name', $ksynset)))),\n '#type'=>'checkboxes',\n '#options'=>$suggestions[$iso][$ksynset],\n '#default_value' => array(), //array_keys($suggestions[$iso][$ksynset]),\n '#description'=>t('Check to add these links'),\n// '#prefix'=>\"<fieldset class=' collapsible'><legend>\".t(variable_get('ksynset_'.$ksynset.'_name', '')).\"</legend>\",\n ); \n }\n \n //List existing connections as checkboxes so they can be deleted separately.\n $form['rels'][$iso][$ksynset.\"_o#d\"] = array(\n '#title' => t(\"Delete existing links\", array('%rel'=>t(variable_get('ksynset_'.$ksynset.'_name', '')))),\n '#type'=>'checkboxes',\n '#options'=>$relations[$iso][$ksynset],\n '#description'=>t('Check to delete'),\n// '#prefix'=>\"<fieldset class=' collapsible'><legend>\".t(variable_get('ksynset_'.$ksynset.'_name', '')).\"</legend>\",\n );\n $form['rels'][$iso][$ksynset] = array(\n '#type' => 'textfield',\n '#size' => 70,\n '#maxlength'=>255,\n '#title' => t(\"Add new links\", array('%rel'=>t(variable_get('ksynset_'.$ksynset.'_name', '')))),\n '#default_value' => '',\n '#description' => t(variable_get('ksynset_'.$ksynset.'_derivation', '')).\" \".t(\"Can't find entry to link to? !add\", array('!add'=>l(t('Add it and return'), \"node/add/kentry-$iso\", array('query'=>drupal_get_destination())))),\n '#autocomplete_path' => 'kentry/synonyms/'.$iso.'/'.$node->nid,\n '#suffix'=>'<hr/>'//\"</fieldset>\",\n ); \n }\n }\n }\n $form['links'] = array('#type'=>'fieldset', '#title'=>t('Clear all links'), '#collapsed'=>TRUE, '#collapsible'=>TRUE);\n $form['links']['delete'] = array('#type'=>'checkbox', '#title'=>t('Clear all links associated with %entry', array('%entry'=>$node->title)), '#description'=>t('Check this box and click the corresponding button below to delete all links for this entry. There will be no other confirmation step'));\n $form['nid'] = array('#type'=>'value', '#value'=>$node->nid);\n $form['vid'] = array('#type'=>'hidden', '#value'=>$node->vid);\n $form['iso'] = array('#type'=>'hidden', '#value'=>$node->iso);\n $form['save'] = array('#type'=>'submit', '#value'=>t('Save links'));\n $form['clear'] = array('#type'=>'submit', '#value'=>t('Clear all links'));\n return $form;\n}", "function add() {\n\t\t$this->CantineRegular->create();\n\t\t$this->CantineRegular->save(null, false);\n\t\t$this->setAction('edit', $this->CantineRegular->getID());\n\t}", "abstract public function addConstraints();", "abstract public function addConstraints();", "public function add($object) {\n\t\t$this->addedNodes->attach($object);\n\t\t$this->removedNodes->detach($object);\n\t\tparent::add($object);\n\t}", "function set_node($ref, $resource_type_field, $name, $parent, $order_by)\n {\n\n\tif (is_null($resource_type_field) || $resource_type_field=='' || is_null($name) || $name=='')\n\t\t{\n\t\treturn false;\n\t\t}\n\n if(is_null($ref) && ($order_by==\"\"))\n {\n $order_by = get_node_order_by($resource_type_field,!($parent==\"\"),$parent);\n }\n\n $query = 'INSERT INTO node (`resource_type_field`, `name`, `parent`, `order_by`)';\n $query .= ' SELECT \\'' . escape_check($resource_type_field) . '\\', \\'' . escape_check($name) . '\\'';\n\n if(trim($parent)=='')\n {\n $query .= ', NULL';\n }\n else\n {\n $query .= ', \\'' . escape_check($parent) . '\\'';\n }\n\n $query .= ', \\'' . escape_check($order_by) . '\\' FROM DUAL';\n $query .= ' WHERE NOT EXISTS (SELECT * FROM `node` WHERE `resource_type_field` = \\'' . escape_check($resource_type_field) . '\\' AND `name` = \\'' . escape_check($name) . '\\')';\n\n // Check if we only need to save the record\n $current_node = array();\n if(get_node($ref, $current_node))\n {\n // If nothing has changed, just return true, otherwise continue and update record\n if($resource_type_field === $current_node['resource_type_field'] &&\n $name === $current_node['name'] &&\n $parent === $current_node['parent'] &&\n $order_by === $current_node['order_by']\n )\n {\n return $ref;\n }\n\n // When changing parent we need to make sure order by is changed as well\n // to reflect the fact that the node has just been added (ie. at the end of the list)\n if($parent !== $current_node['parent'])\n {\n $order_by = get_node_order_by($resource_type_field, true, $parent);\n }\n\n // Order by can be changed asynchronously, so when we save a node we can pass null or an empty\n // order_by value and this will mean we can use the current order\n if(!is_null($ref) && ($order_by==\"\"))\n {\n $order_by = $current_node['order_by'];\n }\n\n $query = sprintf(\"\n UPDATE node\n SET resource_type_field = '%s',\n `name` = '%s',\n parent = %s,\n order_by = '%s'\n WHERE ref = '%s'\n \",\n escape_check($resource_type_field),\n escape_check($name),\n (trim($parent)==\"\" ? 'NULL' : '\\'' . escape_check($parent) . '\\''),\n escape_check($order_by),\n escape_check($ref)\n );\n\n }\n\n sql_query($query);\n\t$new_ref = sql_insert_id();\n\tif ($new_ref == 0 || $new_ref === false)\n\t\t{\n\t\tif ($ref == null)\n\t\t\t{\n\t\t\treturn sql_value(\"SELECT `ref` AS 'value' FROM `node` WHERE `resource_type_field`='\" . escape_check($resource_type_field) . \"' AND `name`='\" . escape_check($name) . \"'\",0);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\treturn $ref;\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\treturn $new_ref;\n\t\t}\n\n }", "public function add($node): void\n {\n if ($node instanceof Crawler) {\n foreach ($node as $childNode) {\n $this->addNode($childNode);\n }\n }\n else {\n parent::add($node);\n }\n }", "public function addRelationCount(string $relation, ?CriteriaContract $criteria = null): static;", "public function addExistingNode($node, $nodeUuid=null, array $children=null, $isReference=false)\n {\n if ($nodeUuid === null) {\n $nodeUuid = $node->remoteID();\n }\n $parentNode = $node->attribute('node_id') != 1 ? $node->fetchParent() : null;\n $parentUuid = $parentNode ? $parentNode->remoteID() : null;\n $contentObject = $node->object();\n $objectUuid = $contentObject->remoteID();\n $this->nodeIndex[$nodeUuid] = array(\n 'uuid' => $nodeUuid,\n 'status' => $isReference ? 'reference' : 'present',\n 'parent_uuid' => $parentUuid,\n 'object_uuid' => $contentObject ? $contentObject->attribute('remote_id') : null,\n 'node_id' => $node->attribute('node_id'),\n 'children' => $children ? $children : array(),\n 'url_alias' => $node->urlAlias(),\n );\n if (!isset($this->objectIndex[$objectUuid])) {\n $this->objectIndex[$objectUuid] = array(\n 'uuid' => $objectUuid,\n 'main_name' => $node->attribute('node_id') == 1 ? '<root>' : $contentObject->attribute('name'),\n 'status' => 'reference',\n 'object_status' => ContentObject::statusToIdentifier($contentObject->attribute('status')),\n 'class_identifier' => $contentObject->attribute('class_identifier'),\n 'original_uuid' => $objectUuid,\n 'original_id' => $contentObject->attribute('id'),\n 'original_section_identifier' => $contentObject->sectionIdentifier(),\n 'section_identifier' => $contentObject->sectionIdentifier(),\n 'is_always_available' => $contentObject->isAlwaysAvailable(),\n 'published_date' => null,\n 'translations' => array(),\n 'attributes' => array(),\n 'main_node_uuid' => null,\n 'relations' => array(),\n 'locations' => array(),\n );\n }\n if ($this->objectIndex[$objectUuid]['status'] === 'reference') {\n $this->objectIndex[$objectUuid]['locations'][$nodeUuid] = array(\n 'uuid' => $nodeUuid,\n 'parent_node_uuid' => $parentUuid,\n );\n }\n // Connect to existing parents, or place in index for missing parents\n if ($parentUuid && isset($this->nodeIndex[$parentUuid])) {\n $this->nodeIndex[$parentUuid]['children'][] = $nodeUuid;\n } else {\n // If parent is not found it means this node is a starting point for tree traversal\n // Mark the node in the index\n if (!isset($this->nodeStartIndex[$parentUuid])) {\n $this->nodeStartIndex[$parentUuid] = array();\n }\n $this->nodeStartIndex[$parentUuid][] = $nodeUuid;\n }\n if (isset($this->nodeStartIndex[$nodeUuid])) {\n unset($this->nodeStartIndex[$nodeUuid]);\n }\n // Remove missing entry if it exists\n unset($this->nodeMissingIndex[$nodeUuid]);\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function appendTo(Node &$newParent) {\n\t\t$newParent->children[] = $this;\n\t\t$this->_ = $newParent;\n\t}", "public function setMoreNode($node) {\n \t$this->moreNode = $node;\n }", "public function addOutNode( ezcWorkflowNode $node )\n {\n // Check whether the other node is already an outgoing node of this node.\n if ( ezcWorkflowUtil::findObject( $this->outNodes, $node ) === false )\n {\n // Add this node as an incoming node to the other node.\n if ( !self::$internalCall )\n {\n self::$internalCall = true;\n $node->addInNode( $this );\n }\n else\n {\n self::$internalCall = false;\n }\n\n // Add the other node as an outgoing node to this node.\n $this->outNodes[] = $node;\n $this->numOutNodes++;\n }\n\n return $this;\n }", "public function addRule(Rule $rule);", "public function add($value) {\n if ($this->parent->exists) {\n if (0 === key($this->parent->reference)) {\n return new TypeConflict('Object operation on array target');\n }\n\n $this->parent->reference[$this->name]= $value;\n return Applied::$CLEANLY;\n } else {\n return new PathDoesNotExist($this->path());\n }\n }", "public function addToManagement_Level_Reference(\\WorkdayWsdl\\\\StructType\\Management_LevelObjectType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Management_LevelObjectType) {\n throw new \\InvalidArgumentException(sprintf('The Management_Level_Reference property can only contain items of type \\WorkdayWsdl\\\\StructType\\Management_LevelObjectType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Management_Level_Reference[] = $item;\n return $this;\n }", "public function append()\n {\n $this->importNodes(func_get_args(), function ($node, $imported_node) {\n $node->appendChild($imported_node);\n });\n\n return $this;\n }", "public function addRule(ContextInterface $ctx, AddRuleRequest $request): AddRuleResponse;", "public function add( Field $field );", "private function addOrphanAtBack($node) {\n\n\t\t$this->graph->setParent($node, Graph::ORPHAN);\n\n\t\t$this->orphans->push($node);\n\t}", "public function testAddingNodeToNonExistingParentWithRoot()\n {\n $rootNode = new Node('root');\n $this->nestedSet->addRoot($rootNode);\n\n $this->assertNull($this->nestedSet->addNode(new Node('n1'), new Node('n2')));\n }", "public static function addWordHeader(){\r\n\t\t\r\n\t\twordBase::getXML();\r\n\t\t\r\n\t\t$childNode = wordBase::$xmlElement->addChild('Relationship');\r\n\t\t$nodeIndex = wordBase::getCount();\r\n\t\t$childNode->addAttribute('Id', 'rId' . $nodeIndex);\r\n\t\t$index = count(wordBase::$imageList);\r\n\t\t$childNode->addAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/header');\r\n\t\t$childNode->addAttribute('Target','header1.xml');\r\n\t}", "public function addNode($path) {\n\t\t$fullPath = \"$this->path/$path\";\n\t\t$lastSlash = strrpos($fullPath, '/');\n\t\t\n\t\t$name = trim(substr($fullPath, $lastSlash + 1));\n\n\t\tif (empty($name)) {\n\t\t\tthrow new RepositoryException(\"cannot add node with empty name\");\n\t\t}\n\t\t\t\t\n\t\t$parent = substr($fullPath, 0, $lastSlash);\n\t\t\n\t\tif ($parent != 'pcr:root') {\n\t\t\tif ($this->pm->getNode($parent) === null) {\n\t\t\t\tthrow new PathNotFoundException(\"$this->workspace=>$parent\");\n\t\t\t}\n\t\t} else if ($this->pm->getNode($fullPath) !== null) {\n\t\t\tthrow new ItemExistsException(\"$this->workspace=>$fullPath\");\n\t\t}\n\t\t\t\t\t\t\t\n\t\t$this->pm->addNode($fullPath);\n\t\t$this->pm->setProperty($fullPath, 'pcr:created', Utility::getTimeStamp());\n\t\t$this->pm->setProperty($fullPath, 'pcr:isLocked', false);\n\t\t\n\t\tLog4PCR::info(\"Added node: $this->workspace=>$fullPath\");\t\t\n\t\t\n\t\treturn new Node($this->pm, $fullPath);\n\t}", "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "public function addRelation(Relation $relation) {\n $relation->setPrimaryModel($this);\n\n $this->_relations[$relation->getAlias()] = $relation;\n $this->_aliases[$relation->getRelatedClass()] = $relation->getAlias();\n $this->reserved[] = $relation->getAlias();\n\n $this->on('relation', $relation);\n\n return $this;\n }", "public function addRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent)\n {\n throw new \\Exception('@todo: Implement.');\n }", "public function agregarReferencia(Referencia $oReferencia){\n\t\t\n\t\t//persistir referencia en la bbdd.\n\t\t$this->getReferenciaQuery()->insertReferencia( $oReferencia );\n\t\t\t\t \n\t}", "public function append(HTMLNode $node)\n\t\t{\n\t\t\t// my son\n\t\t\t$node->setParent($this);\n\t\t\t$this->children[] = $node;\n\t\t\t\n\t\t\treturn $node;\n\t\t}", "function addNode( $node )\n {\n if( sizeof($node) )\n foreach( $node as $aNode )\n {\n $newNode = array();\n foreach( $aNode as $name=>$value ) // this should always have data, if not the passed structure has an error\n {\n if( !is_array($value) ) // collect the data that need to go in the DB\n $newEntry[$name] = $value;\n else // collect the children\n $newNode[] = $value;\n }\n $insertedId = $this->add( $newEntry ); // add the element and get the id, that it got, to have the parentId for the children\n\n if( $insertedId!= false ) // if inserting suceeded, we have received the id under which we can insert the children\n {\n if( sizeof($newNode) ) // if there are children, set their parentId, so they kknow where they belong in the tree\n foreach( $newNode as $key=>$aNewNode )\n {\n $newNode[$key]['parentId'] = $insertedId;\n }\n $this->addNode( $newNode ); // call yourself recursively to insert the children, and its children and ...\n }\n }\n }" ]
[ "0.6454452", "0.5957304", "0.5815425", "0.57610077", "0.5759317", "0.5707609", "0.5684433", "0.5650642", "0.56220186", "0.5592923", "0.5512612", "0.5476472", "0.54147893", "0.5397357", "0.537481", "0.53610665", "0.5297141", "0.52888477", "0.52684397", "0.5252854", "0.5230378", "0.5230195", "0.5217212", "0.516191", "0.51491785", "0.5146091", "0.5145515", "0.5136176", "0.5116478", "0.5100314", "0.50993896", "0.5091695", "0.50883305", "0.5087487", "0.507226", "0.50642216", "0.50582135", "0.50478935", "0.5042739", "0.5019031", "0.50128824", "0.50044394", "0.5001585", "0.5000171", "0.49927694", "0.4985532", "0.49833262", "0.4973222", "0.49728337", "0.49622867", "0.4960166", "0.4958893", "0.49495625", "0.49443322", "0.49442676", "0.49354076", "0.49299482", "0.49249277", "0.491903", "0.49056312", "0.489335", "0.48885572", "0.48775205", "0.48694456", "0.48677927", "0.4857886", "0.4854308", "0.48542437", "0.48531586", "0.48520175", "0.48503637", "0.48432064", "0.48432064", "0.48382112", "0.48264545", "0.48254117", "0.48245913", "0.48058397", "0.48037818", "0.48037818", "0.48037818", "0.48031646", "0.47880456", "0.4782944", "0.4779512", "0.47741672", "0.47485375", "0.4745743", "0.47400102", "0.47361887", "0.47224966", "0.47205397", "0.47121665", "0.47069487", "0.46978232", "0.46954972", "0.46933734", "0.46928832", "0.46923345", "0.46861944" ]
0.73375094
0
Detects if relation is declared completely.
Определяет, объявлен ли соотношение полностью.
public function isComplete() { // relation is declared completely if set of references has been derived // from set of nodes on recently adding node not wanting another successor return !is_null( $this->references ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasRelation(): bool;", "public function hasRelations() {\n return !empty($this->_relations);\n }", "public function hasRelations()\n {\n return 0 < count($this->relations);\n }", "public function isCorrectlyDeclared(): bool\n {\n return ! ($this->hasType && $this->allowsNull && $this->isInitialized && $this->isRequired);\n }", "public function can_be_used_in_relationship();", "public function isDependent(): bool;", "protected function isRelation()\n {\n return in_array(\"relation\", explode(\".\", request()->route()->getName()));\n }", "public function externalRelationLoaded(string $relationName): bool;", "public function isDefined(): bool\n {\n return isset($this['$ref']) || isset($this['type']);\n }", "public function hasRelation($name) {\n return isset($this->getClassMeta()->relations[$name]);\n }", "public function hasRelation(string $name): bool\n\t{\n\t\treturn isset(static::$relationships[static::class][$name]);\n\t}", "protected function _has_relationships(){\n\t\treturn (count(self::$related['has_many']) > 0 || count(self::$related['has_one']) > 0) ;\n\t}", "public function mmRelationWithMatchFieldIsResolvedFromForeignSide() {}", "public function relation_exists($name) {\n\t\treturn isset($this->_rels[$name]);\n\t}", "public function hasRelations() {\n return $this->table->hasRelationFields();\n }", "public function testRelationIsAvailable()\n\t{\n\t\t$query = RelationQuery::make('relation:value');\n\n\t\t$this->assertSame('relation', $query->getRelated());\n\t}", "#[Pure]\n public function isQualified(): bool\n {\n return \\count($this->parts) < 1;\n }", "public function mmRelationWithoutMatchFieldIsResolved() {}", "public static function isRelational()\n {\n return in_array('Divergence\\\\Models\\\\Relations', class_uses(get_called_class()));\n }", "public function getResourceRelationsTablesDeclare(){\n return '';\n }", "public function hasScope() {\n return (sizeof(trim($this->scope)) > 0);\n }", "private function checkDef()\n {\n return $this->def->class !== null && $this->def->table !== null;\n }", "public function isThrough()\n {\n return in_array($this->type, static::THROUGH_RELATIONS, true);\n }", "#[Pure]\n public function isUnqualified(): bool\n {\n return \\count($this->parts) === 1;\n }", "protected function checkInitRelations()\n {\n if ($this->relations === null) {\n $this->initRelations();\n }\n }", "public function hasDependencies() {\n return !empty($this->dependencies);\n }", "public function hasForeign($column);", "public function has_or_relation()\n {\n }", "protected function isActualRelationships($relation)\n {\n return array_key_exists($relation, $this->relationships)\n && count($this->relationships[$relation]) > 0;\n }", "public function isDependent()\n {\n return $this->_dependent;\n }", "function isReference()\n {\n return $this->hasProperty('references');\n }", "public function isRelationWithSelf() {\n return $this->isRelationWithSelf;\n }", "public function requestsRelationships(): bool\n {\n return ($this->requestsAttributes() || $this->requestsMetaInformation()) || \\count($this->includes) > 0;\n }", "public function withRelationships() : bool\n {\n return $this->hasQuery('relationships');\n }", "public function inrelation()\n {\n\n global $em;\n $this->classmetadata = $em->getClassMetadata(\"\\\\\" . get_class($this));\n\n $objecarray = (array)$this;\n $association = array_keys($this->classmetadata->associationMappings);\n if (count($association))\n return true;\n\n return false;\n// foreach ($objecarray as $obkey => $value) {\n// // gere les attributs hérités en visibilité protected\n// if (is_object($value)) {\n// $classname = get_class($value);\n// if ($classname != 'DateTime' && $association[0] != $classname) {\n// return true;\n// }\n// }\n// }\n }", "private function _isForeignKey()\n\t{\n\t\tif ($this->_debug){\n\t\t\t$this->_log->write(__METHOD__ );\n\t\t}\n\n if (!$this->_isForeignKey)\n\t\t{\n\t\t\t$sql = \"SELECT REFERENCED_TABLE_SCHEMA, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME \";\n\t\t\t$sql .= \"FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE \";\n\t\t\t$sql .= \"WHERE REFERENCED_TABLE_NAME IS NOT NULL \";\n\t\t\t$sql .= \"AND REFERENCED_COLUMN_NAME IS NOT NULL \";\n\t\t\t$sql .= \"AND TABLE_SCHEMA = '\" . $this->_serverName . \"' \";\n\t\t\t$sql .= \"AND TABLE_NAME = '\" . $this->_tableName . \"' \";\n\t\t\t$sql .= \"AND COLUMN_NAME\t= '\" . $this->_name . \"'\";\n\n $rows = $this->_db->select($sql);\n if (!empty($rows))\n {\n $this->_parentSchema = $rows[0]['REFERENCED_TABLE_SCHEMA'];\n $this->_parentTable = $rows[0]['REFERENCED_TABLE_NAME'];\n $this->_parentField = $rows[0]['REFERENCED_COLUMN_NAME'];\n\n $this->_parentObject = new MysqlTable($this->_db, ['TABLE_SCHEMA'=>$this->_parentSchema, 'TABLE_NAME'=>$this->_parentTable]);\n\n $this->_isForeignKey = true;\n }\n\t\t}\n\t\treturn $this->_isForeignKey;\n\t}", "private function meetsDependencies() {\n\n $dependentColumns = $this->getApp()->settings('dependent columns');\n if (!empty($dependentColumns[$this->getName()])) {\n $parent = $dependentColumns[$this->getName()];\n $parameter = $this->getApp()->getParameter($this->getName());\n\n // If there are no facet dependencies, this will always be TRUE.\n if (empty($parent)) {\n return TRUE;\n }\n // If the facet actually has a selected item, this should also be TRUE.\n if (!empty($parameter)) {\n return TRUE;\n }\n // Finally check for the actual dependency.\n $active = $this->getApp()->getParameter($parent);\n if (empty($active)) {\n return FALSE;\n }\n }\n // Otherwise the dependency is met.\n return TRUE;\n }", "public function isCompulsory()\n {\n // Are all columns nullable?\n $localColumnNames = $this->foreignKey->getLocalColumns();\n\n foreach ($localColumnNames as $name) {\n $column = $this->table->getColumn($name);\n if ($column->getNotnull()) {\n return true;\n }\n }\n\n return false;\n }", "protected function getSchemaRequested()\n {\n $parts = $this->owner->getRequest()->getHeader(LeftAndMain::SCHEMA_HEADER);\n return !empty($parts);\n }", "public function isGlobal($relationalTypeResolver) : bool;", "static function isRelation($attribute)\n {\n if (self::$relationsCache == null) {\n self::$relationsCache = [];\n }\n\n $class = get_called_class();\n\n if (!array_key_exists($class, self::$relationsCache)) {\n try {\n $reflect = new \\ReflectionClass($class);\n\n self::$relationsCache[$class] = array_fill_keys(\n $reflect->getStaticProperties()['relations'], 1\n );\n } catch (\\ReflectionException $e) {\n // no-op\n }\n }\n\n return array_key_exists($attribute, self::$relationsCache[$class]);\n }", "protected function isRelation($field)\n {\n return strpos($field, ':') !== false;\n }", "public function isFollowingsLoaded()\n {\n return null !== $this->collFollowings;\n }", "public function hasScopes(){\n return $this->_has(2);\n }", "public function hasRelation($itemName, $type = null)\n\t{\n\t\t$types = array_keys($this->relations);\n\n\t\tif (in_array($type, $types))\n\t\t{\n\t\t\t$types = array($type);\n\t\t}\n\n\t\tforeach ($types as $type)\n\t\t{\n\t\t\tforeach ($this->relations[$type] as $relations)\n\t\t\t{\n\t\t\t\tif (array_key_exists($itemName, $relations))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isDefined(): bool\n {\n return true;\n }", "public function isRelationExists($name)\n {\n return isset($this->relations[$name]);\n }", "public function fitted() : bool\n {\n return isset($this->importances);\n }", "public function hasAnyAssignment(): bool\n {\n return $this->hasParticipations() || $this->hasParticipants() || $this->hasEmployees();\n }", "function is_valid_relation($tableName,$relationName) {\n return array_key_exists(\"relations\",$this->dataModel[$tableName]) &&\n array_key_exists($relationName,$this->dataModel[$tableName][\"relations\"]);\n\n }", "public function isAssociation()\n {\n return $this->has('targetEntity') && ($this->has('joinColumns') || $this->has('joinTable'));\n }", "public function hasReferences()\n {\n return !empty($this->_references);\n }", "function onCheckSchema() {\n $schema = Schema::get();\n $schema->ensureTable('ostatus_profile', Ostatus_profile::schemaDef());\n $schema->ensureTable('ostatus_source', Ostatus_source::schemaDef());\n $schema->ensureTable('feedsub', FeedSub::schemaDef());\n $schema->ensureTable('hubsub', HubSub::schemaDef());\n $schema->ensureTable('magicsig', Magicsig::schemaDef());\n return true;\n }", "public function isRelation($key);", "protected function isRelationTable($table)\n {\n \t$pk=$table->primaryKey;\n \treturn (count($pk) === 2 // we want 2 columns\n \t\t\t&& isset($table->foreignKeys[$pk[0]]) // pk column 1 is also a foreign key\n \t\t\t&& isset($table->foreignKeys[$pk[1]]) // pk column 2 is also a foriegn key\n \t\t\t&& $table->foreignKeys[$pk[0]][0] !== $table->foreignKeys[$pk[1]][0]); // and the foreign keys point different tables\n }", "public function areSpellsLoaded()\n {\n return isset($this->spells);\n }", "private function isRHSMany()\n {\n return ($this->selfReferencing &&\n (\n (isset($this->lhsLinkDef['side']) && isset($this->lhsLinkDef['link-type']) &&\n $this->lhsLinkDef['side'] == 'left' && $this->lhsLinkDef['link-type'] == 'one') ||\n (isset($this->rhsLinkDef['side']) && isset($this->rhsLinkDef['link-type']) &&\n $this->rhsLinkDef['side'] == 'right' && $this->rhsLinkDef['link-type'] == 'many')\n )\n );\n }", "public function is_related($entry)\n {\n if(isset($this->entries[$entry]['relation']) && !empty($this->entries[$entry]['relation']))\n return true;\n \n return false;\n }", "public function hasTables(){\n return $this->_has(2);\n }", "public function hasTableName(){\n return $this->_has(1);\n }", "public function hasTableName(){\n return $this->_has(1);\n }", "public function hasTableName(){\n return $this->_has(1);\n }", "public function hasTableName(){\n return $this->_has(1);\n }", "public function hasTableName(){\n return $this->_has(1);\n }", "public function hasTableName(){\n return $this->_has(1);\n }", "public function isAssociation(): bool\n {\n return isset($this->mapping['targetEntity']) || 0 < \\count($this->associations);\n }", "function CheckForDependents()\n\t{\n\t\tglobal $gCms;\n\t\t$db = $gCms->db;\n\n\t\t$result = false;\n\n\t\t$query = \"SELECT * FROM \".cms_db_prefix().\"module_deps WHERE parent_module = ?\";\n\t\t$dbresult = $db->Execute($query, array($this->GetName()));\n\n\t\tif ($dbresult && $dbresult->RecordCount() > 0)\n\t\t{ \n\t\t\t$result = true;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function isDefined();", "public function isAssociation();", "public function hasReferences() {}", "public function getRelationable(): ?bool\n {\n // Otherwise no member, but only subgroups are allowed.\n return $this->relationable;\n }", "public function getIsDeclaration()\n {\n return $this->is_declaration;\n }", "public function isFullyQualified(): bool\n {\n return $this->fullyQualified;\n }", "public function getDefinedRel() {}", "public function hasParticipations(): bool\n {\n if (!$this->frozen) {\n throw new \\RuntimeException('Collection of related items is not yet completed');\n }\n return count($this->participationIds) > 0;\n }", "public function hasRelation($alias) {\n return isset($this->_relations[$alias]);\n }", "public function hasRelation($key)\n {\n $this->checkInitRelations();\n\n return array_key_exists($key, $this->relations);\n }", "public function hasTableNamesOrPrefixes(){\n return $this->_has(2);\n }", "public static function hasDynamicRelation($name)\n {\n return array_key_exists($name, static::$dynamic_relations);\n }", "public function isNotNull($relation) {\n\t\treturn isset($this->relations[$relation]);\n\t}", "protected static function _relations() {\n\n\t}", "public function has($relation)\n {\n return $this->model->has($relation);\n }", "public function isLoaded()\n {\n return isset($this->schema['_options']['pk']);\n }", "public function hasFromFort()\n {\n return $this->from_fort !== null;\n }", "public function isConstraints()\n {\n if (Condition::find()->where([\n 'common_condition_template_id' => $this->id,\n ])->one()) return true;\n\n return false;\n }", "public function hasPr()\n {\n return isset($this->pr);\n }", "public function isFollowersLoaded()\n {\n return null !== $this->collFollowers;\n }", "public function isBound( $requireAll = false ) {\n\t\tif ( !$this->isComplete() )\n\t\t\treturn false;\n\n\t\tforeach ( $this->nodes as $node )\n\t\t\t/** @var model_relation_node $node */\n\t\t\tif ( $node->isBound() ) {\n\t\t\t\tif ( !$requireAll )\n\t\t\t\t\treturn true;\n\t\t\t} else if ( $requireAll )\n\t\t\t\treturn false;\n\n\t\treturn $requireAll ? true : false;\n\t}", "public function hasRelation($attribute)\n {\n $method = $this->getRelationMethod($attribute);\n\n return method_exists($this, $method);\n }", "public function isDerivedPropertyExist()\n {\n return count($this->propertyTypes['derivedProperty']) > 0;\n }", "static public function isExplicit($relName)\n\t{\n\t\treturn (preg_match(self::EXPLICIT_PATH, $relName) > 0);\n\t}", "public function hasTable()\n {\n return !empty($this->table);\n }", "public function isLoaded() {\n\t\tif (isset($this->columns['id'])) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function isEager($relationship)\n\t{\n\t\treturn in_array(explode('.', $relationship), $this->eagerLoads);\n\t}", "public function __isset($name)\n {\n return property_exists($this, $name)\n || isset(static::getSchema()->columns[$name])\n || 'schema' === $name\n || $this->getSchema()->getRelation($name)\n ;\n }", "public function has($relation, $with = array());", "public function getHasParentsAttribute()\n {\n return $this->parent()->exists();\n }", "public function getIncludeFlagForURLRelations(): bool\n {\n return $this->UrlRelations;\n }", "public function hasRelationWith($modelName, $type = null) {\n $relations = $this->table->getRelationFields($modelName);\n\n if ($type !== null) {\n return isset($relations[$type]) && !empty($relations[$type]);\n }\n\n return !(empty($relations[ModelTable::HAS_MANY]) && empty($relations[ModelTable::HAS_ONE]) && empty($relations[ModelTable::BELONGS_TO]));\n }", "public function hasReferences() {\n\t\treturn $this->pm->hasReferences($this->path);\n\t}" ]
[ "0.7089578", "0.64106625", "0.64020675", "0.63214326", "0.626768", "0.6230986", "0.62183917", "0.620362", "0.6076029", "0.6055621", "0.6037156", "0.59740317", "0.5970565", "0.59559786", "0.5922876", "0.5917959", "0.59178406", "0.587334", "0.5831841", "0.5767182", "0.57400507", "0.5731058", "0.5727144", "0.56965363", "0.56945735", "0.56229246", "0.5620727", "0.5620303", "0.56085044", "0.55910176", "0.5579239", "0.5578183", "0.5576472", "0.55326176", "0.5523714", "0.5515157", "0.54942375", "0.5489877", "0.5473522", "0.54552925", "0.54390484", "0.54258794", "0.5418636", "0.54151887", "0.54085046", "0.5408378", "0.5398168", "0.5393812", "0.5385677", "0.5381971", "0.5374074", "0.5358734", "0.53582716", "0.53567696", "0.53532946", "0.53387654", "0.5327252", "0.53169227", "0.531246", "0.5308606", "0.5308606", "0.5308606", "0.5308606", "0.5308606", "0.5308606", "0.5303327", "0.5302759", "0.5302323", "0.5302162", "0.5297476", "0.52970725", "0.5269932", "0.52640754", "0.52634674", "0.5255637", "0.5251855", "0.5250095", "0.52476037", "0.5234674", "0.52318674", "0.5225958", "0.5224513", "0.5220997", "0.5205088", "0.5191152", "0.518714", "0.5181374", "0.5172229", "0.5168987", "0.51676303", "0.5167263", "0.51649314", "0.5158812", "0.5146822", "0.51448834", "0.5137487", "0.51358753", "0.51356524", "0.51326495", "0.5128674" ]
0.7276576
0
Retrieves name of relation declared used model_relation::setName().
Получает имя отношения, объявленного в модели model_relation::setName().
public function getName() { return $this->relationName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRelationName(): Name\n {\n return new Name('conductor');\n }", "public static function getRelationName(): Name\n {\n return new Name('design/illustration');\n }", "public function getRelationTablename() {}", "public static function getRelationName(): Name\n {\n return new Name('booking');\n }", "public static function getRelationName(): Name\n {\n return new Name('vocal arranger');\n }", "public function getRelationFieldName() {}", "public static function getRelationName(): Name\n {\n return new Name('programming');\n }", "public static function getRelationName(): Name\n {\n return new Name('performer');\n }", "public static function getRelationName(): Name\n {\n return new Name('download for free');\n }", "public static function getRelationName(): Name\n {\n return new Name('written in');\n }", "public function getRelationshipName ()\n {\n return $this->relationshipName ?: ($this->relationshipName = camel_case(short_name($this->morphClass)));\n }", "public static function getRelationName(): Name\n {\n return new Name('social network');\n }", "public static function getRelationName(): Name\n {\n return new Name('mixed for');\n }", "public static function getRelationName(): Name\n {\n return new Name('image');\n }", "public static function getRelationName(): Name\n {\n return new Name('producer');\n }", "public static function getRelationName(): Name\n {\n return new Name('producer position');\n }", "public static function getRelationName(): Name\n {\n return new Name('samples material');\n }", "public static function getRelationName(): Name\n {\n return new Name('BookBrainz');\n }", "public static function getRelationName(): Name\n {\n return new Name('covers and versions');\n }", "public function getRelation()\n {\n $schemaRelations = $this->getSchema()->getRelations();\n foreach( $schemaRelations as $relation )\n {\n if( $relation->getName() == $this->relationName )\n {\n return $relation;\n }\n }\n }", "public static function getRelationName(): Name\n {\n return new Name('pressed');\n }", "public static function getRelationName(): Name\n {\n return new Name('written at');\n }", "function getRelationTablename() ;", "public static function getRelationName(): Name\n {\n return new Name('parts');\n }", "public static function getRelationName(): Name\n {\n return new Name('wikidata');\n }", "public static function getRelationName(): Name\n {\n return new Name('collaborator');\n }", "public static function getRelationName(): Name\n {\n return new Name('subtype');\n }", "public static function getRelationName(): Name\n {\n return new Name('held at');\n }", "public static function getRelationName(): Name\n {\n return new Name('licensed');\n }", "protected function getRelationName()\n {\n if ($this->relationName !== null) {\n return $this->relationName;\n }\n\n $relationName = $this->getConfig('relationName');\n\n if (!$relationName) {\n throw new ApplicationException('Please specify the relationName property');\n }\n\n return $this->relationName = $relationName;\n }", "function relation($name);", "abstract public function getOwnerRelationName(): string;", "public static function getRelationName(): Name\n {\n return new Name('bandsintown');\n }", "public static function getRelationName(): Name\n {\n return new Name('subgroup');\n }", "abstract public static function getCreatorRelationName();", "public static function getRelationName(): Name\n {\n return new Name('arranged at');\n }", "public function getRelatedModelName() {\n\t\treturn $this->relatedDefinition->getName();\n\t}", "public function relation($name);", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelation()\n\t\t{\n\t\t\treturn $this->relation;\n\t\t}", "public static function getRelationName(): Name\n {\n return new Name('available at');\n }", "public static function getRelationName(): Name\n {\n return new Name('recorded at');\n }", "public static function getRelationName(): Name\n {\n return new Name('remixed in');\n }", "public function getRelatedFieldname();", "public static function displayName(): string\n {\n return Craft::t('relations', 'Relations');\n }", "public static function getRelationName(): Name\n {\n return new Name('official homepage');\n }", "public function get_relation($name) {\n\t\treturn @$this->_rels[$name];\n\t}", "public function relation( $name ) {\n if( isset( $this->_relations[ $name ] ) ) return $this->_relations[ $name ];\n return null;\n }", "public function getName() {\n\t return $this->linkTable;\n\t}", "final public function GetName() {\n\n return $this->\n model;\n }", "private function getRelationName($collection)\n {\n\n return array_keys($collection[0])[0];\n }", "public function relationNames()\n {\n return [\n 'hasilkaryasiswas'\n ];\n }", "public function relation($name)\n\t{\n\t\tif (isset($this->params['relations'][$name])) {\n\t\t\treturn $this->params['relations'][$name];\n\t\t}\n\t\treturn null;\n\t}", "public static function getRelationName(): Name\n {\n return new Name('video channel');\n }", "public function getFullyQualifiedName()\n {\n $name = $this->getName();\n\n if (null !== ($belongsTo = $this->getBelongsTo())) {\n $name = $belongsTo . '[' . $name . ']';\n }\n\n if ($this->isArray()) {\n $name .= '[]';\n }\n\n return $name;\n }", "public function getRelation();", "protected function getRelationTable() {\n \n if ( empty( $this->tagRelationTable ) ) { \n $this->tagRelationTable = \n $this->owner->tableName()\n .'_'\n .$this->getTagModel()->tableName();\n }\n \n return $this->tagRelationTable;\n }", "public function relationNames() {\n return [\n 'adminbesichtigungkundes',\n 'immobilien',\n 'angelegtVon',\n 'aktualisiertVon'\n ];\n }", "public function rel(): string\r\n {\r\n return $this->rel;\r\n }", "public function relationNames()\n {\n return [\n 'jadwalpresensis'\n ];\n }", "public function relationNames()\r\n {\r\n return [\n 'especie',\n 'lance',\n 'replecion'\n ];\r\n }", "public function getRelationModel(DaoModel $model, DaoModel $relation) : string;", "public function getNameAttribute () {\n return $this->model;\n }", "public function relationNames()\n {\n return [\n 'jadwalpresensi',\n 'pegawai',\n 'presensis'\n ];\n }", "public function getForeignKeyName()\n {\n return $this->foreignKey;\n }", "public function relationNames()\n {\n return [\n 'user',\n 'planoEducadorLicencas',\n 'planoGrupos',\n 'grupos'\n ];\n }", "protected function getKeyName()\n {\n if (is_null($this->form)) {\n return;\n }\n\n return $this->form->model()->{$this->relationName}()->getRelated()->getKeyName();\n }", "protected function getKeyName()\n {\n if (is_null($this->form)) {\n return;\n }\n\n return $this->form->model()->{$this->relationName}()->getRelated()->getKeyName();\n }", "public function getTenantRelationTablename() {}", "public function relationNames()\n {\n return [\n 'siswa',\n 'jadwalpresensisiswa',\n 'izinsiswa'\n ];\n }", "public function relationNames() {\n return [\n 'besichtigungstermins',\n 'eDateianhangs',\n 'lArt',\n 'user',\n 'angelegtVon',\n 'aktualisiertVon',\n 'lHeizungsart',\n 'kundeimmobillies'\n ];\n }", "public function getRelation($relation)\n {\n return $this->relations[$relation];\n }", "public function relationNames() {\n return [\n 'academicYear',\n 'loanItem',\n 'createdBy'\n ];\n }", "public function relationNames()\n {\n return [\n 'evaluados',\n 'user'\n ];\n }", "public function getKeyName()\n {\n if (is_null($this->form)) {\n return;\n }\n\n return $this->relationKeyName;\n }", "public function getTableRelation()\n\t{\n\t\treturn $this->tableRelation;\n\t}", "public function getDbName() {\n\t\t// Special handler for \"NULL\" relations\n\t\tif($this->name == \"NULL\") {\n\t\t\treturn $this->name;\n\t\t}\n\t\t\n\t\t// This code finds the table where the field named $this->name lives\n\t\t// Todo: move to somewhere more appropriate, such as DataMapper, the\n\t\t// magical class-to-be?\n\t\t$candidateClass = $this->model;\n\n\t\twhile($candidateClass != 'DataObject') {\n\t\t\tif(DataObject::has_own_table($candidateClass) \n\t\t\t\t\t&& singleton($candidateClass)->hasOwnTableDatabaseField($this->name)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$candidateClass = get_parent_class($candidateClass);\n\t\t}\n\n\t\tif($candidateClass == 'DataObject') {\n\t\t\t// fallback to the provided name in the event of a joined column\n\t\t\t// name (as the candidate class doesn't check joined records)\n\t\t\t$parts = explode('.', $this->fullName);\n\t\t\treturn '\"' . implode('\".\"', $parts) . '\"';\n\t\t}\n\t\t\n\t\t//Cannot use ClassName.PropertyName in OrientDB queries\n\t\treturn \"$this->name\";\n\t}", "public function getRelationObject($name);", "public function relationNames()\n {\n return [\n 'nIK',\n 'tanggungans'\n ];\n }", "public function modelName() {\n return self::$_name;\n }", "public function modelName() {\n return self::$_name;\n }", "public function relationNames()\n {\n return [\n 'a',\n 'p'\n ];\n }", "public function relationNames()\n {\n return [\n 'instancias',\n 'partidos'\n ];\n }", "public function getModelName()\n {\n if ($this->model_type == 'product') {\n $name = $this->product->name;\n } else {\n $name = $this->category->name;\n }\n\n return $name;\n }", "public function relationNames()\r\n {\r\n return [\n 'cajones',\n 'capturas',\n 'infoDiversidads',\n 'submuestras',\n 'tallaSexoPlantillas'\n ];\r\n }", "public function relationNames()\n {\n return [\n 'c',\n 'p'\n ];\n }", "public function relationNames()\n {\n return [\n 'marketing',\n 'user',\n 'agency',\n 'agent',\n 'artist',\n 'coproPromoter',\n 'coproVenue',\n 'supportArtist1',\n 'supportArtist2',\n 'supportArtist3',\n 'ticketingCompany',\n 'venue',\n 'belongCompany'\n ];\n }", "public function getRelationLinkModelName($fieldName) {\n $relationMeta = $this->getRelationMeta($fieldName);\n\n return $relationMeta->getLinkModelName();\n }", "public function getAuthRelation()\n {\n return defined('static::AUTH_RELATION') ? static::AUTH_RELATION : 'auth';\n }", "public static function getModelName()\n {\n return (new ReflectionClass(get_called_class()))->getShortName();\n }", "public function getRel() {\n \treturn $this->_rel;\n }", "public function get_relation_object();", "public function getNameAttribute(){\n\t\treturn ( ($this->meta) ? ($this->meta->name) : null );\n\t}", "public function relationNames()\n {\n return [\n 'nIKKK'\n ];\n }", "public function relationNames()\r\n {\r\n return [\n ''\n ];\r\n }", "private function getClassShortName($relation): string\n {\n\n return (new \\ReflectionClass($this->{$relation}()))->getShortName();\n }", "public function relationNames()\n {\n return [\n 'jawabantracers'\n ];\n }", "public function getRel();" ]
[ "0.7548722", "0.7489568", "0.7484233", "0.74808407", "0.74722904", "0.74391425", "0.74330354", "0.7420148", "0.7317618", "0.72967166", "0.7291828", "0.7281971", "0.7276214", "0.72537374", "0.72374195", "0.723269", "0.7217918", "0.71818805", "0.71505845", "0.7140218", "0.7127916", "0.71183586", "0.70785004", "0.7058328", "0.7039795", "0.7035854", "0.7029866", "0.70184886", "0.70144635", "0.70039845", "0.69855714", "0.6966645", "0.6941252", "0.69402707", "0.6928157", "0.691455", "0.6913079", "0.6907065", "0.6890788", "0.6890788", "0.6890788", "0.6855871", "0.6844075", "0.68313795", "0.6831036", "0.6825551", "0.6755585", "0.6736683", "0.670591", "0.66979057", "0.6685483", "0.6672103", "0.66023666", "0.65469813", "0.6544421", "0.65264773", "0.6490837", "0.6474024", "0.6467213", "0.6462079", "0.6458299", "0.64507663", "0.6443118", "0.6433609", "0.6432974", "0.64219594", "0.6410892", "0.64061016", "0.639204", "0.639204", "0.6391824", "0.63828045", "0.63614064", "0.63609576", "0.63598734", "0.6359808", "0.6338173", "0.632718", "0.6315747", "0.6309039", "0.63067883", "0.6302071", "0.6302071", "0.6299418", "0.6293669", "0.6290444", "0.6288385", "0.62847584", "0.6271736", "0.6271577", "0.6266476", "0.6264913", "0.62617654", "0.62353945", "0.62303203", "0.62255985", "0.6225387", "0.622334", "0.6221194", "0.621633" ]
0.82039917
0
Retrieves all unbound references from current relation.
Получает все несвязанные ссылки из текущего отношения.
public function getUnboundReferences() { if ( !$this->isComplete() ) throw new \InvalidArgumentException( 'relation is not complete, yet' ); return array_filter( array_map( function( $reference ) { /** @var model_relation_reference $reference */ return $reference->isBound() ? null : $reference; }, $this->references ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getForeigns();", "public function getRelations() {\n\t\treturn array_values($this->_relations);\n\t}", "final public static function getForeignReferences() {\n\t\t$calledClass = get_called_class();\n\n\t\tif ( !isset( self::$foreignReferences[ $calledClass ] ) ) { // runs once per recordClass\n\t\t\tif (self::$useCache === NULL) {\n\t\t\t\tself::initCache();\n\t\t\t}\n\t\t\t\t\n\t\t\tself::fillForeignReferences( $calledClass );\n\t\t}\n\n\t\treturn self::$foreignReferences[ $calledClass ];\n\t}", "public function findAllNoRef() {\n\t\t$query = \"SELECT * FROM $this->table\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function getReferrals() {\n if (!$this->referrals) {\n $this->referrals = $this->findDependentRowset('Application_Model_DbTable_Referral');\n }\n\n return $this->referrals;\n }", "public function unlinkRelations() {\n\t\t$this->internal->relations = array();\n\t}", "public function emptyRelations() {\n $this->relations = array();\n }", "public function relations()\n {\n return $this->_relations;\n }", "public function get_relations() {\n\t\t\treturn $this->relations;\n\t\t}", "public function getRelationRefs()\n\t{\n\t\t$refs = [];\n\t\tforeach ($this->tableSchema->foreignKeys as $fk)\n\t\t{\n\t\t\t$tmp = array_keys($fk);\n\t\t\t$fkId = end($tmp);\n\n\t\t\t$refs[$fkId] = lcfirst(Inflector::id2camel($fk[0], '_'));\n\t\t}\n\n\t\treturn $refs;\n\t}", "public function getRelations() {}", "public function getRelations() {\n return $this->owner->relations();\n }", "protected function findRelationsToNonExistingRecords() : array {}", "public function getReferences()\n {\n return $this->_references;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "public function getReferences()\n {\n return array_merge($this->epbReferences, $this->resReferences);\n }", "public function referencesAction() {\n $break = 'halt';\n $referenceCollection = $this->referencesTable->getReference();\n\n return array(\n 'references' => $referenceCollection\n );\n }", "function getReferencedFields(){\n $ref = $this->getReferencedRecord();\n $exceptions = array('checked_out', 'checked', 'internal');\n $result = array();\n\n if($ref != null){\n if($ref->published){\n $properties = $this->_getClassAttributes();\n foreach($properties as $prop){\n if(!in_array($prop, $exceptions)){\n if(empty($this->$prop)){\n if(!empty($ref->$prop)){\n $result[$prop] = $ref->$prop;\n }\n }\n }\n }\n }\n }\n\n return $result;\n }", "public static function getReferences();", "public function clear_relations() {\n\t\t$this->_rels = [];\n\n\t\tforeach ($this->_tables as &$table)\n\t\t\t$table->clear_relations();\n\t}", "public function getRelations()\n {\n if (array_key_exists(\"relations\", $this->_propDict)) {\n return $this->_propDict[\"relations\"];\n } else {\n return null;\n }\n }", "public function getRelations()\n {\n if ($this->def->getTarget() === null) {\n return [];\n }\n\n $relations = [];\n foreach ($this->def->getTarget()->getRelations() as $relation) {\n $relations[$relation->getLocalProperty()] = $relation;\n }\n\n return $relations;\n }", "protected function getReferences() : array {}", "protected function relations()\r\n {\r\n return [];\r\n }", "public function fetchRelatedEagerReturnsEmptyArrayForEmptyRelationNotHasOne() {}", "public function emptyResourceRelations() {\n $this->resourceRelations = array();\n }", "public function getRefCollection()\n {\n $collection = $this->refCollection;\n if (empty($collection)) {\n $collection = null;\n }\n\n return $collection;\n }", "public function getReferencedFields(){ }", "protected function availableRelations(): array\n {\n return $this->normalizeRelations(array_merge($this->relations, $this->load));\n }", "public function getReferences()\n {\n return $this->_referencesList;\n }", "public function getRelations()\n\t{\n\t\tif (empty($this->relations)) {\n\t\t\t$this->relations = Vtiger_Relation_Model::getAllRelations($this);\n\t\t}\n\t\treturn $this->relations;\n\t}", "protected function getReferencedTables()\n {\n return DB::table('information_schema.KEY_COLUMN_USAGE')\n ->where('table_schema', env('DB_DATABASE'))\n ->where('referenced_table_name', $this->getTable())\n ->where('referenced_column_name', $this->getColumn())\n ->get(['table_name', 'constraint_name', 'column_name']);\n }", "public function without($relations);", "public function referencing_tables()\n\t{\n\t\tif ($this->_referencing_tables === NULL)\n\t\t{\n\t\t\t$this->_referencing_tables = DB::select(array('TABLE_NAME', 'table'), array('COLUMN_NAME', 'column'))\n\t\t\t\t->from('INFORMATION_SCHEMA.KEY_COLUMN_USAGE')\n\t\t\t\t->where('TABLE_SCHEMA', '=', $this->_table_schema)\n\t\t\t\t->where('REFERENCED_TABLE_NAME', '=', $this->_table)\n\t\t\t\t->execute()\n\t\t\t\t->as_array();\n\t\t}\n\t\treturn $this->_referencing_tables;\n\t}", "protected function relations()\n {\n // [relationName => [relationType, targetCollection, reference], ...]\n return array();\n }", "public function getReferencedSites();", "public function getRelations()\n {\n $this->checkInitRelations();\n\n return $this->relations;\n }", "public function getForeigns(): array\n {\n return $this->all(BaseRelationalConstraint::FOREIGN);\n }", "public function &allByRef()\n {\n return $this->_datas;\n }", "public function getRefunds ()\n {\n return $this->getShopRefunds();\n }", "public function getReferenceUris()\n {\n return $this->references;\n }", "public function references() {\n foreach ($this->table->referencing_fields as $referencing_field) {\n\n // if the reference is to a field that uniquely identifies a single row, the it is a one-to-one\n if ($referencing_field->is_unique()) {\n // one to one relationship on inbound references\n $this->one_to_one($referencing_field->referenced_field, $referencing_field);\n } else {\n\n if ($referencing_field->table->is_record()) {\n // one to many relationship (linking table implicating this one, tying it to another)\n $this->one_to_many(\n $referencing_field,\n $referencing_field->referenced_field\n );\n }\n\n // if the referencing field is part of a 2-key unique key, it's a many-to-many\n if ($referencing_field->is_link_index()) {\n // the many to many becomes one to many since this is a model and not a collection\n $this->many_to_many($referencing_field);\n }\n }\n }\n\n\n // one to one relationships on outbound references\n foreach ($this->table->foreign_keys as $foreign_key) {\n if ($foreign_key->referenced_field->table->is_record()) {\n $this->one_to_one($foreign_key, $foreign_key->referenced_field);\n }\n }\n }", "public function getImmediateDescendants()\n\t{\n\t\t$this->scopeImmediateDescendants();\n\n\t\treturn $this->get(true);\n\t}", "public function included(): Relations\n {\n if (!isset($this->rawObject->data)) {\n return null;\n }\n if (is_null($this->included)) {\n $this->includedInitCount++;\n $this->included = new Relations($this->rawObject->included);\n Included::set($this->rawObject->included, false);\n Included::setSorted($this->included->getSortedItem());\n }\n return $this->included;\n }", "protected function relations()\n\t{\n\t\treturn array();\n\t}", "public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }", "protected static function _relations() {\n\n\t}", "public function getAllies ()\n\t{\n\t\tif ($this->id == 0)\n\t\t{\n\t\t\twarning('Attempted to list allies for uninitialized entity of type '. get_class($this), 1);\n\t\t\treturn array();\n\t\t}\n\n\t\treturn $this->listRelations(CRFLAG_ALLY | CRFLAG_MUTUAL, CRFLAG_ALLY | CRFLAG_MUTUAL);\n\t}", "public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }", "public function clearReferences()\n {\n $this->getMethods()->clearReferences();\n $this->getProperties()->clearReferences();\n $this->getConstants()->clearReferences();\n }", "public function getDeferredRelationships()\n {\n return $this->deferredRelationships;\n }", "public static function &getAllReference() {\n\t\treturn self::$info;\n\t}", "public static function resetRelations(){\n\t\t$self = static::_object();\n\t\t$self->_relations = $self->_originalRelations['default'];\n\t\t$self->_alternateRelations = $self->_originalRelations['alternate'];\n\t}", "public function getDirtyRelationships()\n {\n $dirtyAggregates = [];\n\n foreach ($this->relationships as $relation) {\n foreach ($relation as $aggregate) {\n if (!$aggregate->exists() || $aggregate->isDirty() || count($aggregate->getDirtyRelationships()) > 0) {\n $dirtyAggregates[] = $aggregate;\n }\n }\n }\n\n return $dirtyAggregates;\n }", "public function relations()\n\t{\n\t\treturn $this->contacts()->where('relatable_type','not like','%\\Person')->get();\n\t}", "public function getRelations(): array;", "public function getRefIds()\n {\n return $this->refIds;\n }", "public function getMissingScopes();", "public function getReference()\n {\n return [];\n }", "public function foreignKeys()\n {\n return $this->out;\n }", "public function unbind() {\n\t\tif ( $this->isComplete() )\n\t\t\tforeach ( $this->nodes as $node ) {\n\t\t\t\t/** @var model_relation_node $node */\n\t\t\t\t$node->bindOnPredecessor( null );\n\t\t\t\t$node->bindOnSuccessor( null );\n\t\t\t}\n\n\t\treturn $this;\n\t}", "public function getRelations() : array\n {\n\n return $this->relations;\n }", "public function setUnbound()\n {\n $this->bound = false;\n return $this;\n }", "protected function cleanup()\n {\n $relations = [];\n foreach($this->relations as $relation) {\n if (\n isset($this->entities[$relation['source']]) &&\n isset($this->entities[$relation['target']])\n ) {\n $relations[] = $relation;\n }\n }\n\n $this->relations = $relations;\n }", "public function getRelations()\n {\n return array_keys($this->schema);\n }", "public function getRefBabs()\n {\n return $this->hasMany(RefBab::className(), ['id_kelas' => 'id_kelas']);\n }", "public function flushRelations()\n {\n return [\n 'tags',\n 'favorites',\n 'calendarUsers'\n ];\n }", "public function scopeRelation(): array\n {\n return [];\n }", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collRecuperationHints) {\n\t\t\t\tforeach ((array) $this->collRecuperationHints as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->singlesfGuardUserProfile) {\n\t\t\t\t$this->singlesfGuardUserProfile->clearAllReferences($deep);\n\t\t\t}\n\t\t\tif ($this->singlesfGuardUserSecurity) {\n\t\t\t\t$this->singlesfGuardUserSecurity->clearAllReferences($deep);\n\t\t\t}\n\t\t\tif ($this->collAccounts) {\n\t\t\t\tforeach ((array) $this->collAccounts as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collAppointments) {\n\t\t\t\tforeach ((array) $this->collAppointments as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collEnrolments) {\n\t\t\t\tforeach ((array) $this->collEnrolments as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUserTeams) {\n\t\t\t\tforeach ((array) $this->collUserTeams as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collWfevents) {\n\t\t\t\tforeach ((array) $this->collWfevents as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collWpmodules) {\n\t\t\t\tforeach ((array) $this->collWpmodules as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collStudentSituations) {\n\t\t\t\tforeach ((array) $this->collStudentSituations as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collStudentSuggestions) {\n\t\t\t\tforeach ((array) $this->collStudentSuggestions as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collStudentHints) {\n\t\t\t\tforeach ((array) $this->collStudentHints as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collStudentSyllabusItems) {\n\t\t\t\tforeach ((array) $this->collStudentSyllabusItems as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collSchoolprojects) {\n\t\t\t\tforeach ((array) $this->collSchoolprojects as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collProjDeadlines) {\n\t\t\t\tforeach ((array) $this->collProjDeadlines as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collProjResources) {\n\t\t\t\tforeach ((array) $this->collProjResources as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collProjActivitysRelatedByUserId) {\n\t\t\t\tforeach ((array) $this->collProjActivitysRelatedByUserId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collProjActivitysRelatedByAcknowledgerUserId) {\n\t\t\t\tforeach ((array) $this->collProjActivitysRelatedByAcknowledgerUserId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collConsents) {\n\t\t\t\tforeach ((array) $this->collConsents as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collDocrevisionsRelatedByUploaderId) {\n\t\t\t\tforeach ((array) $this->collDocrevisionsRelatedByUploaderId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collDocrevisionsRelatedByRevisionerId) {\n\t\t\t\tforeach ((array) $this->collDocrevisionsRelatedByRevisionerId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collDocrevisionsRelatedByApproverId) {\n\t\t\t\tforeach ((array) $this->collDocrevisionsRelatedByApproverId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collLanlogs) {\n\t\t\t\tforeach ((array) $this->collLanlogs as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collAttachmentFiles) {\n\t\t\t\tforeach ((array) $this->collAttachmentFiles as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collsfGuardUserPermissions) {\n\t\t\t\tforeach ((array) $this->collsfGuardUserPermissions as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collsfGuardUserGroups) {\n\t\t\t\tforeach ((array) $this->collsfGuardUserGroups as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collsfGuardRememberKeys) {\n\t\t\t\tforeach ((array) $this->collsfGuardRememberKeys as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTicketEventsRelatedByUserId) {\n\t\t\t\tforeach ((array) $this->collTicketEventsRelatedByUserId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTicketEventsRelatedByAssigneeId) {\n\t\t\t\tforeach ((array) $this->collTicketEventsRelatedByAssigneeId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collRecuperationHints = null;\n\t\t$this->singlesfGuardUserProfile = null;\n\t\t$this->singlesfGuardUserSecurity = null;\n\t\t$this->collAccounts = null;\n\t\t$this->collAppointments = null;\n\t\t$this->collEnrolments = null;\n\t\t$this->collUserTeams = null;\n\t\t$this->collWfevents = null;\n\t\t$this->collWpmodules = null;\n\t\t$this->collStudentSituations = null;\n\t\t$this->collStudentSuggestions = null;\n\t\t$this->collStudentHints = null;\n\t\t$this->collStudentSyllabusItems = null;\n\t\t$this->collSchoolprojects = null;\n\t\t$this->collProjDeadlines = null;\n\t\t$this->collProjResources = null;\n\t\t$this->collProjActivitysRelatedByUserId = null;\n\t\t$this->collProjActivitysRelatedByAcknowledgerUserId = null;\n\t\t$this->collConsents = null;\n\t\t$this->collDocrevisionsRelatedByUploaderId = null;\n\t\t$this->collDocrevisionsRelatedByRevisionerId = null;\n\t\t$this->collDocrevisionsRelatedByApproverId = null;\n\t\t$this->collLanlogs = null;\n\t\t$this->collAttachmentFiles = null;\n\t\t$this->collsfGuardUserPermissions = null;\n\t\t$this->collsfGuardUserGroups = null;\n\t\t$this->collsfGuardRememberKeys = null;\n\t\t$this->collTicketEventsRelatedByUserId = null;\n\t\t$this->collTicketEventsRelatedByAssigneeId = null;\n\t}", "public function mmRelationWithoutMatchFieldIsResolved() {}", "public static function getAllFreedl() {\n\t\treturn array(self::_getDao()->count(), self::_getDao()->getAll());\n\t}", "public function getValidReferrers()\n {\n // TODO: Implement getValidReferrers() method.\n }", "public function inbound_references($pk)\n\t{\n\t\t$references = array();\n\t\tforeach ($this->referencing_tables() as $referencing_table)\n\t\t{\n\t\t\t$table = $referencing_table['table'];\n\t\t\t$column = $referencing_table['column'];\n\t\t\t$table_detail = $this->_table_detail($table);\n\t\t\tif ( ! $table_detail['pivot'])\n\t\t\t{\n\t\t\t\t$primary_key = $this->primary_key($table);\n\t\t\t\t$refs = DB::select($primary_key)\n\t\t\t\t\t->from($table)\n\t\t\t\t\t->where($column, '=', $pk)\n\t\t\t\t\t->execute()\n\t\t\t\t\t->as_array(NULL, $primary_key);\n\t\t\t\tif (count($refs) > 0)\n\t\t\t\t{\n\t\t\t\t\t$references[\"$table.$column\"] = array(\n\t\t\t\t\t\t'table' => $table,\n\t\t\t\t\t\t'column' => $column,\n\t\t\t\t\t\t'references' => $refs,\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\tforeach ($table_detail['foreign_keys'] as $foreign_key => $reference)\n\t\t\t\t{\n\t\t\t\t\t$ref_table = $reference['table'];\n\t\t\t\t\t$ref_column = $reference['column'];\n\t\t\t\t\tif ($ref_table === $this->_table AND $ref_column === $this->primary_key())\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t$refs = DB::select($foreign_key)\n\t\t\t\t\t\t->from($table)\n\t\t\t\t\t\t->where($column, '=', $pk)\n\t\t\t\t\t\t->execute()\n\t\t\t\t\t\t->as_array(NULL, $foreign_key);\n\t\t\t\t\tif (count($refs) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$references[\"$ref_table.$ref_column ($table.$column)\"] = array(\n\t\t\t\t\t\t\t'table' => $ref_table,\n\t\t\t\t\t\t\t'column' => $ref_column,\n\t\t\t\t\t\t\t'references' => $refs,\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 $references;\n\t}", "public function relationNames()\n {\n return [\n ''\n ];\n }", "public static function getUnfulfilled() {\n $db = getDBConn();\n\n // Get all order items (and their orders) that aren't in a loading_order_item.\n $vals = [];\n $sql = <<<SQL\n SELECT `order`.*,\n `order_items`.`id` AS `order_item_id`,\n `order_items`.`order_id` AS `order_item_order_id`,\n `order_items`.`recipe_id` AS `order_item_recipe_id`\n FROM `order_items`\n JOIN `order`\n ON `order_items`.`order_id` = `order`.`id`\n LEFT OUTER JOIN `loading_order_items`\n ON `order_items`.`id` = `loading_order_items`.`order_item_id`\n WHERE `loading_order_items`.`id` IS NULL\n ORDER BY `order`.`delivery_date`, `order`.`id`\nSQL;\n\n $statement = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n $statement->execute($vals);\n\n $orderAndItemEntries = $statement->fetchAll(PDO::FETCH_OBJ);\n $unfulfilledOrders = static::coalesceEntries($orderAndItemEntries);\n\n return $unfulfilledOrders;\n }", "public function getRefunds () : array\n\t{ return $this->refunds; }", "public function removeAllRelatedAlbums() {\n\t\t$this->relatedAlbums = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collContractsRelatedByCreditorId) {\n\t\t\t\tforeach ((array) $this->collContractsRelatedByCreditorId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collContractsRelatedByDebtorId) {\n\t\t\t\tforeach ((array) $this->collContractsRelatedByDebtorId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collGifts) {\n\t\t\t\tforeach ((array) $this->collGifts as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collOutgoingPayments) {\n\t\t\t\tforeach ((array) $this->collOutgoingPayments as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collRegulations) {\n\t\t\t\tforeach ((array) $this->collRegulations as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collContractsRelatedByCreditorId = null;\n\t\t$this->collContractsRelatedByDebtorId = null;\n\t\t$this->collGifts = null;\n\t\t$this->collOutgoingPayments = null;\n\t\t$this->collRegulations = null;\n\t}", "public function getFreeNodes(){\r\n $class = Util::getNodeNameOfObject($this);\r\n \r\n return $class::findAll('collection_id = :id AND path =\"\"', array(':id' => $this->id));\r\n }", "public function getBackreferences()\n {\n // Iterate over all conditions and collect their backreferences\n $backreferences = array();\n foreach ($this->sortedConditions as $key => $sortedCondition) {\n // If we got an array we have to iterate over it separately, but be aware they are or-combined\n if (is_array($sortedCondition)) {\n // These are or-combined conditions but we have to resolve them too\n foreach ($sortedCondition as $orCombinedCondition) {\n // Get the backreferences of this condition\n $backreferences = array_merge($backreferences, $orCombinedCondition->getBackreferences());\n }\n } else {\n // Get the backreferences of this condition\n $backreferences = array_merge($backreferences, $sortedCondition->getBackreferences());\n }\n }\n\n return $backreferences;\n }", "public function relations()\n {\n return array();\n }", "public function relations()\n {\n return array();\n }", "public function getReferences(): array\n {\n if ($this->parent === null) {\n throw new ParserException('Unable to aggregate reference values, parent is missing');\n }\n\n if (empty($this->parent->references[$this->outerKey])) {\n return [];\n }\n\n return array_keys($this->parent->references[$this->outerKey]);\n }", "public function getDescendants()\n\t{\n\t\t$this->scopeDescendants();\n\n\t\treturn $this->get(true);\n\t}", "public function metadata_get_referenced_wrappers($field_name, $full = false) {\n return $this->get_referenced_wrappers($field_name, $full);\n }", "function expungeReferers() {\n\t\treturn( $this->mDb->query( \"DELETE FROM `\".BIT_DB_PREFIX.\"stats_referers`\" ));\n\t}", "public function getFullRelations() {\r\n $acoClass = Strategy::getClass(\"Aco\");\r\n $acoObjects = $acoClass::model()->findAll();\r\n\r\n $aroClass = Strategy::getClass(\"Aro\");\r\n $aroObjects = $aroClass::model()->findAll();\r\n\r\n return $this->getRelations($acoObjects,$aroObjects);\r\n }", "public function getMissingEntities($relation)\n {\n $cachedRelations = $this->getCachedAttribute($relation);\n\n if (!is_null($cachedRelations)) {\n $missing = [];\n\n foreach ($cachedRelations as $hash) {\n if (!$this->getRelatedAggregateFromHash($hash, $relation)) {\n $missing[] = $hash;\n }\n }\n\n return $missing;\n } else {\n return [];\n }\n }", "function clearReferences()\n\t{\n\t\tglobal $opt, $db;\n\t\tsqlf(\"DELETE FROM `sys_trans_ref`\");\n\t}", "public function referrals()\n {\n return $this->hasMany(User::class, 'referrer_id', 'id');\n }", "public function relationNames()\r\n {\r\n return [\n ''\n ];\r\n }", "public function getReferees()\n {\n return $this->referees;\n }", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collClientesRelatedByIdProv) {\n\t\t\t\tforeach ($this->collClientesRelatedByIdProv as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collClientesRelatedByIdCiudad) {\n\t\t\t\tforeach ($this->collClientesRelatedByIdCiudad as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collEmpleadosRelatedByIdCiudad) {\n\t\t\t\tforeach ($this->collEmpleadosRelatedByIdCiudad as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collEmpleadosRelatedByIdProv) {\n\t\t\t\tforeach ($this->collEmpleadosRelatedByIdProv as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\tif ($this->collClientesRelatedByIdProv instanceof PropelCollection) {\n\t\t\t$this->collClientesRelatedByIdProv->clearIterator();\n\t\t}\n\t\t$this->collClientesRelatedByIdProv = null;\n\t\tif ($this->collClientesRelatedByIdCiudad instanceof PropelCollection) {\n\t\t\t$this->collClientesRelatedByIdCiudad->clearIterator();\n\t\t}\n\t\t$this->collClientesRelatedByIdCiudad = null;\n\t\tif ($this->collEmpleadosRelatedByIdCiudad instanceof PropelCollection) {\n\t\t\t$this->collEmpleadosRelatedByIdCiudad->clearIterator();\n\t\t}\n\t\t$this->collEmpleadosRelatedByIdCiudad = null;\n\t\tif ($this->collEmpleadosRelatedByIdProv instanceof PropelCollection) {\n\t\t\t$this->collEmpleadosRelatedByIdProv->clearIterator();\n\t\t}\n\t\t$this->collEmpleadosRelatedByIdProv = null;\n\t\t$this->aProvincia = null;\n\t}", "public function rewind()\n {\n $this->getReference()->referrals_reset();\n }", "function removeAllRelations(IEntity $entity, $relName);", "public function getResourceRelations()\n {\n return $this->resourceRelations;\n }", "public function getRawBindings()\n {\n return $this->bindings;\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collArticles) {\n foreach ($this->collArticles as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collComments) {\n foreach ($this->collComments as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collRatings) {\n foreach ($this->collRatings as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUserReportsRelatedByIdUser) {\n foreach ($this->collUserReportsRelatedByIdUser as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUserReportsRelatedByIdUserReported) {\n foreach ($this->collUserReportsRelatedByIdUserReported as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBugReports) {\n foreach ($this->collBugReports as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collIdeasRelatedByIdUser) {\n foreach ($this->collIdeasRelatedByIdUser as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collIdeasRelatedByApprovedBy) {\n foreach ($this->collIdeasRelatedByApprovedBy as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMembershipApplications) {\n foreach ($this->collMembershipApplications as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collGalleries) {\n foreach ($this->collGalleries as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBansRelatedByIdUser) {\n foreach ($this->collBansRelatedByIdUser as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBansRelatedByBannedBy) {\n foreach ($this->collBansRelatedByBannedBy as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collArticles = null;\n $this->collComments = null;\n $this->collRatings = null;\n $this->collUserReportsRelatedByIdUser = null;\n $this->collUserReportsRelatedByIdUserReported = null;\n $this->collBugReports = null;\n $this->collIdeasRelatedByIdUser = null;\n $this->collIdeasRelatedByApprovedBy = null;\n $this->collMembershipApplications = null;\n $this->collGalleries = null;\n $this->collBansRelatedByIdUser = null;\n $this->collBansRelatedByBannedBy = null;\n $this->aImage = null;\n $this->aMember = null;\n }", "public function getReferencedCollection($field)\n {\n if(empty($this->_referencedCollections[$field]))\n {\n if( ! ($fieldModelName = $this->getResource()->getFieldModelName($field))) {\n throw new Exception(\"Could not get field model for $field\");\n }\n $this->_referencedCollections[$field] = Mage::getSingleton($fieldModelName)->getCollection();\n }\n return $this->_referencedCollections[$field];\n }" ]
[ "0.615608", "0.59857106", "0.5924543", "0.59124523", "0.58790576", "0.574855", "0.56951785", "0.56773037", "0.56472504", "0.5596987", "0.5586996", "0.55706406", "0.5567403", "0.5560945", "0.55316025", "0.55316025", "0.55146044", "0.5506828", "0.55065995", "0.5500212", "0.54965067", "0.5477791", "0.54564095", "0.54344654", "0.5412007", "0.54113257", "0.5396408", "0.5396203", "0.5377729", "0.53713393", "0.53274906", "0.5313824", "0.53057945", "0.5302727", "0.52952474", "0.5293087", "0.5280549", "0.5278159", "0.52690613", "0.5253123", "0.5246031", "0.5245014", "0.523578", "0.5234368", "0.52265143", "0.5220546", "0.52193445", "0.5213498", "0.5207079", "0.51955825", "0.5190258", "0.5188371", "0.51703405", "0.51665765", "0.51637", "0.51483697", "0.5135916", "0.5123058", "0.5120706", "0.5120454", "0.51202655", "0.5109093", "0.510615", "0.5101851", "0.5100109", "0.5099485", "0.5091644", "0.5080321", "0.5073271", "0.5072523", "0.50416684", "0.49995625", "0.49978524", "0.49899438", "0.49859294", "0.4985197", "0.49783173", "0.4970671", "0.4967299", "0.4956273", "0.49536207", "0.4951669", "0.4951669", "0.49319977", "0.4931767", "0.4930311", "0.49278864", "0.49266052", "0.491987", "0.4917882", "0.49139512", "0.49042237", "0.48969597", "0.48939848", "0.4888801", "0.48806652", "0.48770455", "0.48699135", "0.48695034", "0.486604" ]
0.77967775
0
Unbinds all nodes of relation.
Открепляет все узлы отношения.
public function unbind() { if ( $this->isComplete() ) foreach ( $this->nodes as $node ) { /** @var model_relation_node $node */ $node->bindOnPredecessor( null ); $node->bindOnSuccessor( null ); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unlinkRelations() {\n\t\t$this->internal->relations = array();\n\t}", "public function clear_relations() {\n\t\t$this->_rels = [];\n\n\t\tforeach ($this->_tables as &$table)\n\t\t\t$table->clear_relations();\n\t}", "public static function resetRelations(){\n\t\t$self = static::_object();\n\t\t$self->_relations = $self->_originalRelations['default'];\n\t\t$self->_alternateRelations = $self->_originalRelations['alternate'];\n\t}", "public function emptyRelations() {\n $this->relations = array();\n }", "public function without($relations);", "public function reset()\n {\n parent::reset();\n $this->fromTables = array();\n $this->rightJoins = array( null );\n }", "protected function cleanup()\n {\n $relations = [];\n foreach($this->relations as $relation) {\n if (\n isset($this->entities[$relation['source']]) &&\n isset($this->entities[$relation['target']])\n ) {\n $relations[] = $relation;\n }\n }\n\n $this->relations = $relations;\n }", "function removeAllRelations(IEntity $entity, $relName);", "public function unchangeAll () {}", "public function unsetRelation($relation);", "public function unbindModelAll($params=array()) {\n foreach(array(\n 'hasOne' => array_keys($this->hasOne),\n 'hasMany' => array_keys($this->hasMany),\n 'belongsTo' => array_keys($this->belongsTo),\n 'hasAndBelongsToMany' => array_keys($this->hasAndBelongsToMany)\n ) as $relation => $model) {\n \t\t$model=array_diff($model, $params);\n \t\t$this->unbindModel(array($relation => $model));\n }\n }", "public function emptyResourceRelations() {\n $this->resourceRelations = array();\n }", "protected function clearAll() {\r\n foreach($this->nodes as $k => &$n) {\r\n $n = null;\r\n unset($this->nodes[$k]);\r\n }\r\n $this->nodes = array();\r\n\r\n foreach($this->nodesByItem as $k => &$n) {\r\n $n = null;\r\n unset($this->nodesByItem[$k]);\r\n }\r\n $this->nodesByItem = array();\r\n $this->nodeCount = 0;\r\n $this->nodeIdByItem = array();\r\n $this->rectsByItem = array();\r\n }", "public function reset() {\n\t\t$this->nodes = array();\n\t}", "public function dissociate()\n {\n // The Mapper will retrieve this association within the object model, we won't be using\n // the foreign key attribute inside the parent Entity.\n //\n //$this->parent->setEntityAttribute($this->foreignKey, null);\n\n $this->parent->setEntityAttribute($this->relation, null);\n }", "protected function resetVisited()\n {\n foreach ($this->getEdgeSet() as $e) {\n unset($e->visited);\n }\n }", "public function purge()\n\t\t{\n\t\t\tfor($i = 0; $i < $this->numberOfVertices; ++$i) \n\t\t\t\t$this->vertex->offsetSet($i, NULL);\n\t\t\t$this->numberOfVertices = 0;\n\t\t\t$this->numberOfEdges = 0;\n\t\t}", "public function clearConsents()\n\t{\n\t\t$this->collConsents = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearJoins()\n {\n $this->_joins = array();\n }", "static public function resetBindings() {\n self::$_bindings = array();\n }", "public function clean()\n {\n $this->_related = array();\n\n $attributes = $this->attributeNames();\n foreach ($attributes as $name) {\n $this->{$name} = null;\n }\n }", "public function off(): self\n {\n $this->oDatabase->query('SET FOREIGN_KEY_CHECKS = 0');\n return $this;\n }", "public static function unsetRecursiveQueryConstraint(): void\n {\n static::$recursiveQueryConstraint = null;\n }", "public function unrel($name, $key = null)\n {\n if (is_null($key) && isset($this->internal[$name])) {\n unset($this->internal[$name]);\n } elseif (isset($this->internal[$name][$key])) {\n unset($this->internal[$name][$key]);\n }\n }", "public function removeAll()\n {\n $this->removeAllAssignments();\n $this->mongodb->getCollection($this->itemCollection)->remove([],['justOne'=>false]);\n $this->mongodb->getCollection($this->itemChildCollection)->remove([],['justOne'=>false]);\n $this->mongodb->getCollection($this->ruleCollection)->remove([],['justOne'=>false]);\n $this->invalidateCache();\n }", "public function remove_relation($name) {\n\t\tif ($rel =& $this->_rels[$name]) {\n\t\t\tunset($this->_rels[$name]);\n\n\t\t\tif ($ptable =& $this->_tables[$rel->ptable])\n\t\t\t\t$ptable->remove_relation($name);\n\n\t\t\tif ($ftable =& $this->_tables[$rel->ftable])\n\t\t\t\t$ftable->remove_relation($name);\n\t\t}\n\t}", "public function clearJoins() {\r\n\t\t$this->joins = array ();\r\n\t\t++$this->state_number;\r\n\t\treturn $this;\r\n\t}", "public function clear(){\n $this->nodes = null;\n $this->numNodes = 0; \n }", "public function removeAllAssignments()\n {\n $this->mongodb->getCollection($this->assignmentCollection)->remove([],['justOne'=>false]);\n }", "function clearReferences()\n\t{\n\t\tglobal $opt, $db;\n\t\tsqlf(\"DELETE FROM `sys_trans_ref`\");\n\t}", "public function reset()\n {\n foreach ($this->places as $place) {\n $place->reset();\n }\n }", "private function detach () {\n if (false !== ($k = array_search($this, self::$All))) {\n unset(self::$All[$k]);\n }\n }", "protected function removeAllItemRelations()\n {\n try {\n $this->beginTransaction();\n $itemRelations = $this->getAuthRelationEntityRepoistory()->findAll();\n foreach ($itemRelations as $itemRelation) {\n /* @var $itemRelation AuthRelationEntityInterface */\n $this->em->remove($itemRelation);\n }\n $this->commitTransaction();\n } catch (Exception $exc) {\n $this->rollbackTransactionAndThrow($exc);\n }\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collNegocios) {\n foreach ($this->collNegocios as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDireccionRequerimientos) {\n foreach ($this->collDireccionRequerimientos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n if ($this->collNegocios instanceof PropelCollection) {\n $this->collNegocios->clearIterator();\n }\n $this->collNegocios = null;\n if ($this->collDireccionRequerimientos instanceof PropelCollection) {\n $this->collDireccionRequerimientos->clearIterator();\n }\n $this->collDireccionRequerimientos = null;\n $this->aMoneda = null;\n $this->aUsuario = null;\n }", "public function purge()\n\t\t{\n\t\t\tfor($i = 0; $i < $this->numberOfVertices; ++$i) \n\t\t\t\tfor($j = 0; $j < $this->numberOfVertices; ++$j) \n\t\t\t\t\t$this->matrix->offsetSet(array($i, $j), NULL);\n\t\t\t\n\t\t\tparent::purge();\n\t\t}", "public function detach() {\n\t\t$this->_ = null;\n\t}", "public function resetWeights($eid);", "public function removeAll()\n {\n foreach ($this->findAll() AS $object) {\n $this->remove($object);\n }\n }", "public function reset()\n {\n $this->id = null;\n $this->attributes = array();\n }", "public function removeAll()\n {\n foreach ($this->getLookupElementRepository()->findAll() as $lookupElement) {\n $this->entityManager->remove($lookupElement);\n }\n\n foreach ($this->getLookupMetaRepository()->findAll() as $lookupMeta) {\n $this->entityManager->remove($lookupMeta);\n }\n\n $this->entityManager->flush();\n }", "public function reset() { \n\t$this->current_node = null;\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n } // if ($deep)\n\n $this->aFirstWeapon = null;\n $this->aSecondWeapon = null;\n $this->aThirdWeapon = null;\n }", "public function detachAll()\n {\n $this->entities = [];\n $this->idMap = [];\n $this->ids = [];\n $this->originalData = [];\n $this->states = [];\n $this->scheduledInsertions = [];\n $this->scheduledUpdates = [];\n $this->scheduledRemovals = [];\n }", "function reset() {\n $this->remove([]);\n M_Sequence::reset(\"\".$this);\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collMemberRequests) {\n foreach ($this->collMemberRequests as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMemberRespones) {\n foreach ($this->collMemberRespones as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMemberTrxes) {\n foreach ($this->collMemberTrxes as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProdukSuppliers) {\n foreach ($this->collProdukSuppliers as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collMemberRequests = null;\n $this->collMemberRespones = null;\n $this->collMemberTrxes = null;\n $this->collProdukSuppliers = null;\n $this->aNominal = null;\n $this->aJenisProduk = null;\n $this->aOperator = null;\n }", "public function unlinkRelation($relation) {\n\t\tif ($relation instanceof ModelRelation) $relation = $relation->name;\n\t\tunset($this->internal->relations[$relation]);\n\t}", "public function purge()\n\t\t{\n\t\t\tfor($i = 0; $i < $this->numberOfVertices; ++$i) \n\t\t\t\t$this->adjacencyList->offsetGet($i)->purge();\n\t\t\tparent::purge();\n\t\t}", "public function withoutRelationships(): self\n {\n return $this->withRelationships([]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset], $this->relations[$offset]);\n }", "public function resetActive()\n\t{\n\t\tforeach ( $this->nodes AS $key => $node )\n\t\t{\n\t\t\t$this->nodes[$key]['active'] = false;\n\t\t}\n\t}", "public function clearSkillReferences()\n {\n $this->collSkillReferences = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearReferences()\n {\n $this->getMethods()->clearReferences();\n $this->getProperties()->clearReferences();\n $this->getConstants()->clearReferences();\n }", "public function clearNegocios()\n {\n $this->collNegocios = null; // important to set this to null since that means it is uninitialized\n $this->collNegociosPartial = null;\n }", "public function clearRelations($type = null)\n\t{\n\t\t$types = array_keys($this->relations);\n\n\t\tif (in_array($type, $types))\n\t\t{\n\t\t\t$types = array($type);\n\t\t}\n\n\t\tforeach ($types as $type)\n\t\t{\n\t\t\t$this->relations[$type] = array();\n\t\t}\n\t}", "public function clearBansRelatedByBannedBy()\n {\n $this->collBansRelatedByBannedBy = null; // important to set this to NULL since that means it is uninitialized\n }", "public function removeAll() {\n\t\t$cmd = $this->entityManager->getClassMetadata($this->getEntityClassName());\n\t\t$connection = $this->entityManager->getConnection();\n\t\t$dbPlatform = $connection->getDatabasePlatform();\n\t\t$connection->query('SET FOREIGN_KEY_CHECKS=0');\n\t\t$q = $dbPlatform->getTruncateTableSql($cmd->getTableName());\n\t\t$connection->executeUpdate($q);\n\t\t$connection->query('SET FOREIGN_KEY_CHECKS=1');\n\t}", "public function reset() {\n if($this->orphan_error()) return;\n\n //Revert changes\n $this->new_data = array();\n\t\t$this->data\t\t= array();\n\n //Reset the live data \"view\"\n $this->data = $this->get_sync_values();\n \n\t\t//Reset ALL changed child classes\n\t\t$this->reset_changed_children();\n\n //We no longer have any unsaved changes\n $this->changed = false;\n\n //Unflag child-changes in parent\n $this->flag_changed();\n }", "public function clear()\n\t{\n\t\t$this->data = $this->changed = $this->related = array();\n\t\t$this->loaded = $this->saved = FALSE;\n\t}", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t} // if ($deep)\n\n\t\t$this->aRoommateType = null;\n\t\t$this->aRitCollege = null;\n\t\t$this->aDwellingChoice = null;\n\t}", "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; \n TRUNCATE table section; \n SET FOREIGN_KEY_CHECKS = 1;';\n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $count = $stmt->rowCount();\n }", "public function reset()\n\t{\n\t\t$this->_current = &$this->_root;\n\t}", "public function disconnectCells()\n {\n if ($this->cellCollection !== null) {\n $this->cellCollection->unsetWorksheetCells();\n $this->cellCollection = null;\n }\n // detach ourself from the workbook, so that it can then delete this worksheet successfully\n $this->parent = null;\n }", "public function removeAllRelatedAlbums() {\n\t\t$this->relatedAlbums = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "public function clear_attributes(){\n $this->attributes = array();\n }", "public function unbind($name);", "public function clear()\n {\n $this->attributes = [];\n }", "public function detachAllRoles(){\n\n $this->roles()->detach();\n\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n } // if ($deep)\n\n $this->aSalesOrder = null;\n $this->aSalesHistory = null;\n }", "public static function clearMappings() {\n self::$ormMappings = [];\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collViajeMensajess) {\n foreach ($this->collViajeMensajess as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMensajeRespuestasRelatedByIdmensaje) {\n foreach ($this->collMensajeRespuestasRelatedByIdmensaje as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMensajeRespuestasRelatedByIdrespuesta) {\n foreach ($this->collMensajeRespuestasRelatedByIdrespuesta as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collViajes) {\n foreach ($this->collViajes as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMensajesRelatedByIdrespuesta) {\n foreach ($this->collMensajesRelatedByIdrespuesta as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collMensajesRelatedByIdmensaje) {\n foreach ($this->collMensajesRelatedByIdmensaje as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collViajeMensajess = null;\n $this->collMensajeRespuestasRelatedByIdmensaje = null;\n $this->collMensajeRespuestasRelatedByIdrespuesta = null;\n $this->collViajes = null;\n $this->collMensajesRelatedByIdrespuesta = null;\n $this->collMensajesRelatedByIdmensaje = null;\n $this->aUsuario = null;\n }", "public function clearUserRelationssRelatedByFollowingId()\n {\n $this->collUserRelationssRelatedByFollowingId = null; // important to set this to NULL since that means it is uninitialized\n }", "public function detach ()\n {\n $this->parent = null;\n }", "public function restoreDescendants()\n {\n if (!$this->hasSoftDeletes()) {\n return;\n }\n\n if (is_null($this->getRight()) || is_null($this->getLeft())) {\n return;\n }\n\n $this->getConnection()->transaction(function () {\n $this->newQuery()\n ->withTrashed()\n ->where($this->getLeftColumnName(), '>', $this->getLeft())\n ->where($this->getRightColumnName(), '<', $this->getRight())\n ->update([\n $this->getDeletedAtColumn() => null,\n $this->getUpdatedAtColumn() => $this->{$this->getUpdatedAtColumn()}\n ]);\n });\n }", "public static function resetMappings();", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collafCrmOpportunitys) {\n\t\t\t\tforeach ($this->collafCrmOpportunitys as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collafCrmActivitys) {\n\t\t\t\tforeach ($this->collafCrmActivitys as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\tif ($this->collafCrmOpportunitys instanceof PropelCollection) {\n\t\t\t$this->collafCrmOpportunitys->clearIterator();\n\t\t}\n\t\t$this->collafCrmOpportunitys = null;\n\t\tif ($this->collafCrmActivitys instanceof PropelCollection) {\n\t\t\t$this->collafCrmActivitys->clearIterator();\n\t\t}\n\t\t$this->collafCrmActivitys = null;\n\t\t$this->aafCrmAccount = null;\n\t}", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collOffers) {\n foreach ($this->collOffers as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProducts) {\n foreach ($this->collProducts as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collVendingmachines) {\n foreach ($this->collVendingmachines as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collOffers = null;\n $this->collProducts = null;\n $this->collVendingmachines = null;\n $this->aLocation = null;\n }", "public function clear()\n {\n $this->objectsByPath = array('Node' => array());\n $this->objectsByUuid = array();\n $this->itemsAdd = array();\n $this->itemsRemove = array();\n $this->nodesMove = array();\n }", "function deleteRelations(){\r\n\t\t\t\r\n\t\tif( ! count($this->relation) ){ \t\treturn ; }\r\n\t\tif ($this->id < 0){ \t\t\t\t\t\treturn ; }\r\n\t\tforeach ($this->relation as $k=>$v ) {\r\n\t\t\tif (isset($v['readonly']) && $v['readonly']){}else{\t\t\t\t\t\r\n\t\t\t\tif ($v['type'] == RelationType::ManyToMany ||\r\n\t\t\t\t\t$v['type'] == RelationType::ManyToManySelect){\t\t\t\t\t\r\n\t\t\t\t\t\t$this->db->query('DELETE FROM `'. $v['by_tbl']. '` WHERE `' . $v['right_key']. '` = ' . $this->id );\r\n\t\t\t\t}\r\n\t\t\t\tif ($v['type'] == RelationType::ManyToOne){\r\n\t\t\t\t\t$this->db->query( 'UPDATE `'. $v['tbl']. '` SET `' . $v['left_key'] . '` = 0 WHERE `' . $v['left_key']. '` = ' . $this->id );\t\r\n\t\t\t\t}\r\n\t\t\t\tif ($v['type'] == RelationType::ManyToOneByKey){\t\r\n\t\t\t\t\t$this->db->query( 'UPDATE `'. $v['tbl']. '` SET `' . $v['left_key'] . '` = 0 WHERE `'. $v['tbl'] .'`.`'. $v['left_key'] .'` = ' . ($this->post_data[ $v['right_key'] ] ? $this->post_data[ $v['right_key'] ] : '0' ) ); \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collAnggotaAktPds) {\n foreach ($this->collAnggotaAktPds as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBimbingPds) {\n foreach ($this->collBimbingPds as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collVldAktPds) {\n foreach ($this->collVldAktPds as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aMou instanceof Persistent) {\n $this->aMou->clearAllReferences($deep);\n }\n if ($this->aJenisAktPd instanceof Persistent) {\n $this->aJenisAktPd->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collAnggotaAktPds instanceof PropelCollection) {\n $this->collAnggotaAktPds->clearIterator();\n }\n $this->collAnggotaAktPds = null;\n if ($this->collBimbingPds instanceof PropelCollection) {\n $this->collBimbingPds->clearIterator();\n }\n $this->collBimbingPds = null;\n if ($this->collVldAktPds instanceof PropelCollection) {\n $this->collVldAktPds->clearIterator();\n }\n $this->collVldAktPds = null;\n $this->aMou = null;\n $this->aJenisAktPd = null;\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collAmigossRelatedByIdusuario) {\n foreach ($this->collAmigossRelatedByIdusuario as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAmigossRelatedByRelacionusuario) {\n foreach ($this->collAmigossRelatedByRelacionusuario as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collViajess) {\n foreach ($this->collViajess as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUsuarioGruposs) {\n foreach ($this->collUsuarioGruposs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collInvitacions) {\n foreach ($this->collInvitacions as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAdministradors) {\n foreach ($this->collAdministradors as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collColaboradors) {\n foreach ($this->collColaboradors as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUsuariosRelatedByRelacionusuario) {\n foreach ($this->collUsuariosRelatedByRelacionusuario as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUsuariosRelatedByIdusuario) {\n foreach ($this->collUsuariosRelatedByIdusuario as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collViajes) {\n foreach ($this->collViajes as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collGrupos) {\n foreach ($this->collGrupos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collAmigossRelatedByIdusuario = null;\n $this->collAmigossRelatedByRelacionusuario = null;\n $this->collViajess = null;\n $this->collUsuarioGruposs = null;\n $this->collInvitacions = null;\n $this->collAdministradors = null;\n $this->collColaboradors = null;\n $this->collUsuariosRelatedByRelacionusuario = null;\n $this->collUsuariosRelatedByIdusuario = null;\n $this->collViajes = null;\n $this->collGrupos = null;\n $this->aPerfil = null;\n }", "public function prune(): void;", "public function resetTree();", "protected function _reset() {\r\n $this->length = 0;\r\n $this->models = array();\r\n $this->_byId = array();\r\n $this->_byCid = array();\r\n }", "public function reset()\n {\n $this->values[self::START] = null;\n $this->values[self::END] = null;\n $this->values[self::SELF_RANK] = null;\n $this->values[self::LEAGUES] = array();\n }", "public function untransmuteRoot($transmutable) { \n\t// Parse data into entity\n\t$transmutable->transmuteFrom($this);\n }", "public function allOff()\n {\n $this->source = 0;\n }", "public function __unset($name)\n\t{\n\t\tif (isset($this->reference_columns[$name]))\n\t\t{\n\t\t\t$this->__unset($this->reference_columns[$name]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->model->__unset($name);\n\t\t}\n\t}", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->singleCliente) {\n $this->singleCliente->clearAllReferences($deep);\n }\n if ($this->singleColaborador) {\n $this->singleColaborador->clearAllReferences($deep);\n }\n if ($this->collEmails) {\n foreach ($this->collEmails as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collEnderecos) {\n foreach ($this->collEnderecos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->singleRepresentada) {\n $this->singleRepresentada->clearAllReferences($deep);\n }\n if ($this->collTelefones) {\n foreach ($this->collTelefones as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUsuarios) {\n foreach ($this->collUsuarios as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aEmpresa instanceof Persistent) {\n $this->aEmpresa->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->singleCliente instanceof PropelCollection) {\n $this->singleCliente->clearIterator();\n }\n $this->singleCliente = null;\n if ($this->singleColaborador instanceof PropelCollection) {\n $this->singleColaborador->clearIterator();\n }\n $this->singleColaborador = null;\n if ($this->collEmails instanceof PropelCollection) {\n $this->collEmails->clearIterator();\n }\n $this->collEmails = null;\n if ($this->collEnderecos instanceof PropelCollection) {\n $this->collEnderecos->clearIterator();\n }\n $this->collEnderecos = null;\n if ($this->singleRepresentada instanceof PropelCollection) {\n $this->singleRepresentada->clearIterator();\n }\n $this->singleRepresentada = null;\n if ($this->collTelefones instanceof PropelCollection) {\n $this->collTelefones->clearIterator();\n }\n $this->collTelefones = null;\n if ($this->collUsuarios instanceof PropelCollection) {\n $this->collUsuarios->clearIterator();\n }\n $this->collUsuarios = null;\n $this->aEmpresa = null;\n }", "public function clearAllConnections(){\n\t\t$this->connections = new ArrayObject();\n\t}", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collCamps) {\n\t\t\t\tforeach ((array) $this->collCamps as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collFbos) {\n\t\t\t\tforeach ((array) $this->collFbos as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collMissionLegsRelatedByFromAirportId) {\n\t\t\t\tforeach ((array) $this->collMissionLegsRelatedByFromAirportId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collMissionLegsRelatedByToAirportId) {\n\t\t\t\tforeach ((array) $this->collMissionLegsRelatedByToAirportId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collPilots) {\n\t\t\t\tforeach ((array) $this->collPilots as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collCamps = null;\n\t\t$this->collFbos = null;\n\t\t$this->collMissionLegsRelatedByFromAirportId = null;\n\t\t$this->collMissionLegsRelatedByToAirportId = null;\n\t\t$this->collPilots = null;\n\t\t\t$this->aWing = null;\n\t}", "public function unsetGraphs(array $graphs): self;", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collVisits) {\n foreach ($this->collVisits as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collVisits = null;\n $this->aCurator = null;\n $this->aRecommendationHint = null;\n }", "public function clearOtherworkassigneds()\n {\n $this->collOtherworkassigneds = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n } // if ($deep)\n\n $this->aSoHeader = null;\n $this->aBoatMaster = null;\n }", "public function rewind()\n {\n $this->getReference()->referrals_reset();\n }", "protected function resetResources(): void\n {\n $conn = $this->getServiceLocator()->get('Omeka\\Connection');\n $sql = <<<'SQL'\nSET FOREIGN_KEY_CHECKS = 0;\nTRUNCATE TABLE item;\nTRUNCATE TABLE item_set;\nTRUNCATE TABLE item_item_set;\nTRUNCATE TABLE media;\nTRUNCATE TABLE resource;\nTRUNCATE TABLE value;\nTRUNCATE TABLE bulk_import;\nTRUNCATE TABLE bulk_importer;\nSET FOREIGN_KEY_CHECKS = 1;\nSQL;\n $conn->exec($sql);\n $this->entityManager->clear();\n }", "function resetNodes() {\n\n\t\t$dbh = \\Database::getConnection();\n\n\t\t$sql = \"delete from leaf where factory_id = {$this->getId()};\";\n\n\t\treturn $dbh->query($sql);\n\n\t}", "public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::NAME] = null;\n $this->values[self::HONOR] = null;\n $this->values[self::RANK] = null;\n $this->values[self::ICON] = null;\n }", "public function detachAllRoles()\n {\n $roles = $this->roles()->get();\n foreach($roles as $role) {\n $this->detachRole($role);\n }\n }", "public function unwrapSelf()\n {\n foreach (iterator_to_array($this->node->childNodes) as $childNode) {\n $this->before($childNode);\n }\n\n $this->remove();\n }" ]
[ "0.7296309", "0.71093535", "0.6994108", "0.66057324", "0.6292192", "0.62474555", "0.6131225", "0.610725", "0.6105767", "0.60607135", "0.60194224", "0.60054237", "0.5899923", "0.585835", "0.5757303", "0.57561684", "0.5695629", "0.56677943", "0.5644183", "0.5624411", "0.5614664", "0.5543528", "0.55173194", "0.5510448", "0.5509473", "0.5500607", "0.548194", "0.54808104", "0.5475443", "0.5431203", "0.54104096", "0.54040366", "0.5400588", "0.53918236", "0.53838557", "0.53792876", "0.5372593", "0.53647137", "0.5363874", "0.53635067", "0.53565055", "0.5354932", "0.53485084", "0.53459877", "0.53446484", "0.53281736", "0.53249454", "0.5317786", "0.5309523", "0.52993196", "0.52863866", "0.52803475", "0.527505", "0.52747494", "0.52710694", "0.5265548", "0.5258456", "0.5253956", "0.5253479", "0.5251829", "0.5251311", "0.52427524", "0.52418625", "0.5216763", "0.52147245", "0.52126336", "0.5208941", "0.52068996", "0.5186864", "0.51635677", "0.51594114", "0.5155371", "0.5148621", "0.51439244", "0.5128001", "0.5127231", "0.5122044", "0.5112202", "0.510348", "0.510166", "0.5098706", "0.5097049", "0.50917846", "0.5089274", "0.5083252", "0.5079455", "0.5077223", "0.50753134", "0.5074551", "0.50711906", "0.50679874", "0.50660294", "0.50560737", "0.5055736", "0.50521135", "0.505203", "0.5051034", "0.50448346", "0.50445324", "0.50367785" ]
0.72462815
1
Detects if any node or all nodes of relation is/are bound.
Определяет, связаны ли любой узел или все узлы отношения.
public function isBound( $requireAll = false ) { if ( !$this->isComplete() ) return false; foreach ( $this->nodes as $node ) /** @var model_relation_node $node */ if ( $node->isBound() ) { if ( !$requireAll ) return true; } else if ( $requireAll ) return false; return $requireAll ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBound();", "public function isBound()\n {\n return $this->bound;\n }", "public function isBound()\n\t\t{\n\t\t\treturn $this->isBound;\n\t\t}", "public function getConditionOnBoundNodes() {\n\t\tif ( !$this->isComplete() )\n\t\t\tthrow new \\RuntimeException( 'relation is not complete' );\n\n\t\t$conditions = array();\n\n\t\tforeach ( $this->nodes as $node ) {\n\t\t\t/** @var model_relation_node $node */\n\t\t\t$state = $node->isBound( null );\n\t\t\tif ( $state & model_relation_node::BINDING_PREDECESSOR )\n\t\t\t\t$conditions[] = array(\n\t\t\t\t\t'filter' => implode( ' AND ', array_map( function( $p ) { return \"$p=?\"; }, $node->getPredecessorNames( $this->datasource, true ) ) ),\n\t\t\t\t\t'values' => $node->getPredecessorValues(),\n\t\t\t\t);\n\n\t\t\tif ( $state & model_relation_node::BINDING_SUCCESSOR )\n\t\t\t\t$conditions[] = array(\n\t\t\t\t\t'filter' => implode( ' AND ', array_map( function( $p ) { return \"$p=?\"; }, $node->getSuccessorNames( $this->datasource, true ) ) ),\n\t\t\t\t\t'values' => $node->getSuccessorValues(),\n\t\t\t\t);\n\t\t}\n\n\t\treturn $conditions;\n\t}", "public function isBound(){ return $this->hasField('bound'); }", "public function isComplete()\n\t{\n\t\t// relation is declared completely if set of references has been derived\n\t\t// from set of nodes on recently adding node not wanting another successor\n\t\treturn !is_null( $this->references );\n\t}", "public function isBoundAtStart() {\n\t\treturn $this->nodeAtIndex( 0 )->isBound();\n\t}", "abstract public function isBoundToElementable(): bool;", "public function hasBoundingPoly(){\n return $this->_has(7);\n }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function bound();", "public function isBound($classOrInterface);", "public function binding(): bool;", "public function hasRelations() {\n return !empty($this->_relations);\n }", "public function hasAdditionalBindings()\n {\n return $this->additionalBindings->count() > 0;\n }", "public function isBound($classOrInterface)\n {\n return $this->bindingsResolver->isBound($classOrInterface);\n }", "public function hasRelations()\n {\n return 0 < count($this->relations);\n }", "public function hasFdBoundingPoly(){\n return $this->_has(2);\n }", "public function isBound($abstract)\n {\n return isset($this->bindings[$abstract]);\n }", "public function isBoundAtEnd() {\n\t\treturn $this->nodeAtIndex( -1 )->isBound();\n\t}", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function isBound($classOrInterface) {\n\t\treturn $this->offsetExists($classOrInterface);\n\t}", "public function isBound($className)\n {\n return isset($this->_bound[$className]);\n }", "public function hasRelation(): bool;", "public function hasNodes() {\n\t\treturn $this->pm->hasNodes($this->path);\n\t}", "public function existsNonFilledNodes() {\n foreach ($this->nodes as $cols) {\n foreach ($cols as $nbFreeNodes) {\n if (0 !== $nbFreeNodes) {\n return true;\n }\n }\n }\n\n return false;\n }", "public function isBoundAtModel( $model = null, $alias = null ) {\n\t\t$node = $this->findNode( $model, $alias, null, false );\n\t\tif ( $node )\n\t\t\treturn $node->isBound();\n\n\t\treturn false;\n\t}", "public function binds();", "public function hasBindVariables(){\n return $this->_has(2);\n }", "public function can_be_used_in_relationship();", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "public function valid() {\n\t\treturn $this->cursor < count($this->nodes);\n\t}", "protected function _has_relationships(){\n\t\treturn (count(self::$related['has_many']) > 0 || count(self::$related['has_one']) > 0) ;\n\t}", "public function isForAllResources()\n {\n return $this->ids == 'all';\n }", "public function hasRanges(){\n return $this->_has(2);\n }", "protected function hasNodeset()\n {\n return !is_null($this->getNodeset());\n }", "public function acceptsBinding($binding);", "public function isNotEmpty(){ return (bool)$this->numNodes; }", "public function IsReachable()\n {\n return $this->Top()->IsReachable();\n }", "protected function bound($arg)\n {\n return\n $this->getContainer()->isRegistered($arg) ||\n $this->getContainer()->isSingleton($arg) ||\n $this->getContainer()->resolveClassName($arg)\n ;\n }", "private function isRHSMany()\n {\n return ($this->selfReferencing &&\n (\n (isset($this->lhsLinkDef['side']) && isset($this->lhsLinkDef['link-type']) &&\n $this->lhsLinkDef['side'] == 'left' && $this->lhsLinkDef['link-type'] == 'one') ||\n (isset($this->rhsLinkDef['side']) && isset($this->rhsLinkDef['link-type']) &&\n $this->rhsLinkDef['side'] == 'right' && $this->rhsLinkDef['link-type'] == 'many')\n )\n );\n }", "public function hasBind($event);", "public function hasRelations() {\n return $this->table->hasRelationFields();\n }", "protected function checkInitRelations()\n {\n if ($this->relations === null) {\n $this->initRelations();\n }\n }", "public function isCandidate(Node $node): bool\n {\n $this->activeTransformation = null;\n\n if (! $node instanceof Isset_ && ! $node instanceof Unset_) {\n return false;\n }\n\n foreach ($node->vars as $var) {\n if (! $var instanceof ArrayDimFetch) {\n continue;\n }\n\n if ($this->matchArrayDimFetch($var)) {\n return true;\n }\n }\n\n return false;\n }", "function getMlNodes(&$node)\n {\n // we only have to check the 1:1 relations!!\n $hasrelationwithmlnode=Array();\n if(is_array($node->m_relations[\"atkonetoonerelation\"]))\n {\n foreach($node->m_relations[\"atkonetoonerelation\"] as $attribname=>$attribute)\n {\n $p_attrib = &$node->m_attribList[$attribname];\n if($p_attrib->createDestination() && $p_attrib->m_destInstance->hasFlag(NF_ML))\n {\n $hasrelationwithmlnode[$attribname]=&$node->m_attriblist[$attribname];\n }\n }\n }\n return $hasrelationwithmlnode;\n }", "public function query( $blnBind = true )\n\t{\n\t\tif ( !$this->isComplete() )\n\t\t\tthrow new \\LogicException( 'relation is not complete' );\n\n\t\tif ( !$this->datasource )\n\t\t\tthrow new \\RuntimeException( 'relation is not configured to use datasource, yet' );\n\n\n\t\t/** @var query $query */\n\t\t$source = $this->datasource;\n\t\t$query = null;\n\n\t\tforeach ( $this->references as $reference ) {\n\t\t\t/** @var model_relation_reference $reference */\n\n\t\t\t// cache access on nodes of reference\n\t\t\t$predecessor = $reference->getPredecessor();\n\t\t\t$successor = $reference->getSuccessor();\n\n\t\t\t// create query starting on on current node\n\t\t\tif ( !$query )\n\t\t\t\t$query = $source->createQuery( $predecessor->getFullName() );\n\n\t\t\t// convert reference into join\n\t\t\t$preSet = $source->qualifyDatasetName( $predecessor->getName() );\n\t\t\t$postSet = $source->qualifyDatasetName( $successor->getName() );\n\n\t\t\t$join = implode( ' AND ', array_map( function( $preProp, $postProp ) use ( $source, $preSet, $postSet ) {\n\t\t\t\treturn \"$preSet.$preProp=$postSet.$postProp\";\n\t\t\t}, $predecessor->getSuccessorNames( $source ), $successor->getPredecessorNames( $source ) ) );\n\n\t\t\t// add join to query\n\t\t\t$query->addDataset( $successor->getFullName( $source ), $join );\n\n\n\t\t\t// optionally convert binding of reference into filter on query\n\t\t\tif ( $blnBind && $reference->isBound() ) {\n\t\t\t\t// qualify and quote names of binding properties in reference\n\t\t\t\t$bindSet = $reference->getReferencingNode()->getName( false, $source );\n\t\t\t\t$properties = $source->qualifyPropertyNames( $bindSet, $reference->getReferencingPropertyNames() );\n\n\t\t\t\t// convert set of names into filtering term\n\t\t\t\t$filter = implode( ' AND ', array_map( function( $name ) { return \"$name=?\"; }, $properties ) );\n\n\t\t\t\t// add filter to query\n\t\t\t\t$query->addCondition( $filter, true, $reference->getBindingValues() );\n\t\t\t}\n\t\t}\n\n\n\t\treturn $query;\n\t}", "function isObstacle($node) {\n $obstacle = QuadTypeEnum::ROCK;//'X';\n\n return $node->value == $obstacle;\n}", "public function hasAnyAssignment(): bool\n {\n return $this->hasParticipations() || $this->hasParticipants() || $this->hasEmployees();\n }", "final public function hasAny()\n\t{\n\t\treturn $this->count() > 0;\n\t}", "public function has_ng( $id )\n\t{\n\t\t$ngs = $this->get_ancestors( $id , array(\n\t\t\t'data' => 'id',\n\t\t\t'type' => 'ng',\n\t\t\t'format' => 'array',\n\t\t\t'deep' => true\n\t\t));\n\t\tif ( empty( $ngs ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isBound($abstract)\n {\n return $this->hasConcrete($abstract);\n }", "public function isGlobal($relationalTypeResolver) : bool;", "public function has_or_relation()\n {\n }", "public function requestsRelationships(): bool\n {\n return ($this->requestsAttributes() || $this->requestsMetaInformation()) || \\count($this->includes) > 0;\n }", "protected function isRelation()\n {\n return in_array(\"relation\", explode(\".\", request()->route()->getName()));\n }", "public function testRelationIsAvailable()\n\t{\n\t\t$query = RelationQuery::make('relation:value');\n\n\t\t$this->assertSame('relation', $query->getRelated());\n\t}", "public function hasScope() {\n return (sizeof(trim($this->scope)) > 0);\n }", "public function bound($abstract)\n {\n return parent::bound($abstract) || $this->parentContainer->bound($abstract);\n }", "public function isValid()\n {\n if ($this->is_bound and !count($this->errors)) {\n return true;\n }\n return false;\n }", "public function bound($abstract) {\n $abstract = $this->normalize($abstract);\n\n if (isset($this->binds[$abstract]) || isset($this->instances[$abstract])) {\n return true;\n }\n\n return false;\n }", "public function isFull(): bool\n {\n return $this->drips() >= $this->max();\n }", "public function hasChildren();", "public function anyGradedComponents() {\n return count($this->graded_components) > 0;\n }", "protected function depthIsInRange()\n {\n return ($this->getRemainingDepth() > 0);\n }", "private function is_balanced() {\n\t$black = 0; // number of black links on path from root to min\n\t$x = $this->get_root();\n\twhile ($x != null) {\n\t\tif (!$this->is_red($x)){\n\t\t\t$black++;\n\t\t}\n\t\t$x = $x->get_left();\n\t}\n\treturn $this->p_is_balanced($root, black);\n\t}", "public function has_addresses() {\n\t\tif (!$this->skeleton->built('addresses')) $this->build_addresses();\n\t\treturn $this->skeleton->has('addresses');\n\t}", "public function constraints();", "public function hasScopes(){\n return $this->_has(2);\n }", "public function isGeoref(){\n\t\tif (($this->getLat()) && ($this->getLon())){\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isThrough()\n {\n return in_array($this->type, static::THROUGH_RELATIONS, true);\n }", "public function isRecursive()\n {\n return !empty($this->criteria);\n }", "public function hasAny(): bool;", "public function hasChildren()\n {\n return $this->children()->count() > 0;\n }", "public function isGruposLoaded()\n {\n return null !== $this->collGrupos;\n }", "protected function isCollectionXpath()\n {\n return in_array($this->rootNodeName, $this->collectionNodes);\n }", "private function injectsBounds(\\DOMElement $node, ResultInterface $bound) {\n $node->setAttribute('loc', $bound->getSum('loc'));\n $node->setAttribute('lloc', $bound->getSum('logicalLoc'));\n $node->setAttribute('cyclomaticComplexity', $bound->getAverage('cyclomaticComplexity'));\n $node->setAttribute('maintainabilityIndex', $bound->getAverage('maintainabilityIndex'));\n $node->setAttribute('volume', $bound->getAverage('volume'));\n $node->setAttribute('vocabulary', $bound->getAverage('vocabulary'));\n $node->setAttribute('difficulty', $bound->getAverage('difficulty'));\n $node->setAttribute('effort', $bound->getAverage('effort'));\n $node->setAttribute('bugs', $bound->getAverage('bugs'));\n $node->setAttribute('time', $bound->getAverage('time'));\n $node->setAttribute('intelligentContent', $bound->getAverage('intelligentContent'));\n $node->setAttribute('commentWeight', $bound->getAverage('commentWeight'));\n $node->setAttribute('length', $bound->getAverage('length'));\n\n $hasOOP = null !== $bound->getSum('instability');\n if($hasOOP) {\n $node->setAttribute('lcom', $bound->getAverage('lcom'));\n $node->setAttribute('instability', $bound->getAverage('instability'));\n $node->setAttribute('efferentCoupling', $bound->getAverage('efferentCoupling'));\n $node->setAttribute('afferentCoupling', $bound->getAverage('afferentCoupling'));\n $node->setAttribute('sysc', $bound->getAverage('sysc'));\n $node->setAttribute('rsysc', $bound->getAverage('rsysc'));\n $node->setAttribute('dc', $bound->getAverage('dc'));\n $node->setAttribute('rdc', $bound->getAverage('rdc'));\n $node->setAttribute('sc', $bound->getAverage('sc'));\n $node->setAttribute('rsc', $bound->getAverage('rsc'));\n $node->setAttribute('noc', $bound->getSum('noc'));\n $node->setAttribute('noca', $bound->getSum('noca'));\n $node->setAttribute('nocc', $bound->getSum('nocc'));\n $node->setAttribute('noi', $bound->getSum('noi'));\n $node->setAttribute('nom', $bound->getSum('nom'));\n }\n }", "public function hasChildren() {\n\t\tif (!$this->valid()) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($this->includeAllSubNodes === TRUE) {\n\t\t\t$current = $this->current();\n\t\t\treturn count($this->getSubnodeNamesForNode($current)) > 0;\n\t\t} else {\n\t\t\t$subNodeNames = $this->current()->getSubNodeNames();\n\t\t\treturn in_array('stmts', $subNodeNames) && count($this->current()->stmts) > 0;\n\t\t}\n\t}", "public function isNodeInsideRelationPolygon(Node $node2test, Relation $relation) {\n\n\t\t$poly1 = $this->getPolygon($relation);\n\n\t\t$poly2 = new \\OSM\\Tools\\Polygon();\n\t\t$poly2->addv($node2test->getLat(), $node2test->getLon());\n\n\t\treturn $poly1->isPolyInside($poly2);\n\t}", "public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }", "public function getRelationable(): ?bool\n {\n // Otherwise no member, but only subgroups are allowed.\n return $this->relationable;\n }", "abstract public function isOneOfSetInScope( $names );", "public static function isRelational()\n {\n return in_array('Divergence\\\\Models\\\\Relations', class_uses(get_called_class()));\n }", "public function isRange()\n {\n return empty( $this->discreteValue);\n }", "public function hasReferences()\n {\n return !empty($this->_references);\n }", "public function has_weight()\n {\n }", "public function has_weight()\n {\n }", "public function is_involved_in_relationship();", "public function hasMultipleScopes(): bool\n {\n return count($this->getScopes()) > 1;\n }", "public function wasBoundBy()\n {\n return $this->boundBy;\n }", "public function hasReferences() {}", "private function strictlyContainsOtherBound(?Boundary $boundary) : bool\n {\n if ($boundary === null) {\n return false;\n }\n\n $boundVersion = $boundary->getVersion();\n\n if ($this->lowerBoundary === null) {\n assert($this->upperBoundary !== null, 'We either have a lower or an upper boundary, or both');\n\n return $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }\n\n if ($this->upperBoundary === null) {\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion());\n }\n\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion())\n && $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }", "public function isConstraints()\n {\n if (Condition::find()->where([\n 'common_condition_template_id' => $this->id,\n ])->one()) return true;\n\n return false;\n }", "public function isOnOneNetwork() {\n $networks = array();\n foreach ($this->nodesNetwork as $cols) {\n foreach ($cols as $networkId) {\n $networks[$networkId] = true;\n }\n }\n return 1 === count($networks);\n }", "public function hasChildren() {\r\n\t\treturn $this->getChildCount() > 0;\r\n\t}", "public function hasChildren(): bool\n {\n $children = (($this->getRgt() - $this->getLft()) - 1) / 2;\n return (0 === $children) ? false : true;\n }" ]
[ "0.67757845", "0.6472873", "0.6361513", "0.61695206", "0.61686605", "0.600664", "0.5897521", "0.5797079", "0.57041574", "0.5700709", "0.5700709", "0.5650165", "0.5558339", "0.5511051", "0.55105555", "0.54925895", "0.5403799", "0.53748214", "0.53350466", "0.5296089", "0.525325", "0.52475506", "0.52475506", "0.52475506", "0.52475506", "0.52441674", "0.522118", "0.5177886", "0.50958943", "0.50581867", "0.5027992", "0.5021511", "0.5017934", "0.50093853", "0.5008279", "0.49888274", "0.49813825", "0.49552277", "0.49491194", "0.49473602", "0.49432027", "0.49403033", "0.49329025", "0.49041322", "0.4903808", "0.49012983", "0.48724625", "0.48615074", "0.48601997", "0.485558", "0.48396322", "0.483136", "0.4831235", "0.4807848", "0.477858", "0.47601712", "0.47434407", "0.47424513", "0.47413552", "0.47392872", "0.4699777", "0.46954957", "0.46842033", "0.467958", "0.46787736", "0.46726742", "0.46700335", "0.4668644", "0.4667101", "0.46659973", "0.46634442", "0.4662374", "0.46531153", "0.46506613", "0.46488193", "0.46455935", "0.46306634", "0.46104047", "0.45959744", "0.45954105", "0.4586011", "0.4579955", "0.4573184", "0.45725498", "0.4569085", "0.45649198", "0.45620117", "0.4558823", "0.45516497", "0.45504954", "0.4549196", "0.45462406", "0.4536692", "0.4536216", "0.45354998", "0.45340547", "0.4513407", "0.45129994", "0.45118693", "0.45104966" ]
0.7754493
0
Retrieves node at given index if matching model and/or alias.
Получает узел по заданному индексу, если он соответствует модели и/или псевдониму.
protected function _isNodeMatching( $index, $model = null, $alias = null ) { $node = $this->nodeAtIndex( $index ); $matching = ( $model === null || $node->isAssociatedWithModel( $model ) ); $matching |= ( $alias === null || $node->getName() == $alias ); return $matching ? $node : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNode(int|string $index)\n {\n }", "function &getNodeByAlias($alias) {\n\t\t$id = $this->alias_index[strtolower($alias)];\n\t\tif (isset($id))\n\t\t return $this->id_index[$id];\n\t\treturn null;\n\t}", "public function get($index)\n {\n $result = array_slice($this->nodes, $index, 1); // note: index can be negative\n if (count($result) > 0) {\n return $result[0];\n } else {\n return null; // return null if no result for key\n }\n }", "public function findNodeByIndex($index) {\n\n $current = $this->firstNode;\n\n for ($i = 0; $this->counter; $i++) {\n\n if ($i == $index) {\n return $current->info;\n }\n\n if ($current->next == null) {\n return;\n }\n\n $current = $current->next;\n }\n }", "public function find($index)\r\n\r\n {\r\n\r\n return $this->findOneBy(array($this->index => $index));\r\n\r\n }", "function offsetGet ($index)\n\t{\n\t\tif (isset($this->meta[$index]))\n\t\t{\n\t\t\treturn $this->meta[$index];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Offset by PK.\n\t\t\t$records = $this->records();\n\t\t\t\n\t\t\tif ($record =& $records[$index])\n\t\t\t{\n\t\t\t\treturn $record;\n\t\t\t}\n\t\t\t// Offset by Slug.\n\t\t\telse if ($model = $this->model())\n\t\t\t{\n\t\t\t\tif ($model->slug_pk)\n\t\t\t\t{\n\t\t\t\t\tforeach ((array)$records as $pk => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($val[$model->slug_pk] === $index)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$record =& $records[$pk];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $record;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function getElement($indexOrName);", "function &sureGetNodeByAlias($alias) {\n\t\t$node = &$this->getNodeById($alias);\n\t\tif (!isset($node)) { // not found !\n\t\t\t$this->openNodeWithAlias($alias); // try to load it\n\t\t\t$node=&$this->getNodeByAlias($alias); // and get it\n\t\t}\n\t\treturn $node;\n\t}", "public function get($index);", "public function get($index);", "public function get($index) {}", "public function offsetGet($index) : mixed\n {\n foreach ((array)$this as $i => $element) {\n $i = (string)$i;\n if (is_string($element)) {\n continue;\n }\n if ($element instanceof Label\n && ($element->getElement()->name() == $index\n || $i == $index\n )\n ) { \n return $element;\n }\n if ($element->name() == $index || $i == $index) {\n return $element;\n }\n if ($element instanceof Element\\Group\n and $found = $element[$index]\n ) {\n return $found;\n }\n }\n return null;\n }", "public function get(int $index);", "public function findNode( $model = null, $alias = null, $callback = null, $endPointsOnly = false ) {\n\t\tif ( !$this->isComplete() )\n\t\t\tthrow new \\LogicException( 'relation is not complete' );\n\n\t\t$node = $this->_isNodeMatching( 0, $model, $alias );\n\t\tif ( $node && ( !$callback || call_user_func( $callback, $node, 0 ) ) )\n\t\t\treturn $node;\n\n\t\t$node = $this->_isNodeMatching( -1, $model, $alias );\n\t\tif ( $node && ( !$callback || call_user_func( $callback, $node, -1 ) ) )\n\t\t\treturn $node;\n\n\t\tif ( !$endPointsOnly )\n\t\t\tfor ( $index = 1; $index < count( $this->nodes ) - 1; $index++ ) {\n\t\t\t\t$node = $this->_isNodeMatching( $index, $model, $alias );\n\t\t\t\tif ( $node && ( !$callback || call_user_func( $callback, $node, $index ) ) )\n\t\t\t\t\treturn $node;\n\t\t\t}\n\n\t\treturn null;\n\t}", "public function get($index, $flag = self::NOT_FOUND_GRACEFULLY, $default = null, $stack_name = 'global');", "public function findGet($index, $defaultValue = null)\n {\n return isset($this->get[$index]) ? $this->get[$index] : $defaultValue;\n }", "public function at($index) {\r\n return $this->models[$index];\r\n }", "public function get(int $index)\n {\n $node = $this->getNode($index);\n if (is_null($node)) return null;\n\n return $node->getData();\n }", "public function get(int $index): ?Token {\n\t\treturn parent::get($index);\n\t}", "public static function get($key, $index = null)\r\n\t{\r\n\t\tif(isset(self::$keys[$key])) {\r\n\t\t\t\r\n\t\t\t$val = self::$keys[$key];\r\n\t\t\t\r\n\t\t\tif($index === null) {\r\n\t\t\t\treturn $val;\r\n\t\t\t}\r\n\r\n\t\t\tif(is_array($val)) {\r\n\t\t\t\treturn $val[$index];\r\n\t\t\t}\r\n\r\n\t\t\tif(is_object($val)) {\r\n\t\t\t\treturn $val->{$index};\r\n\t\t\t}\r\n\t\r\n\t\t\treturn $val;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function getAttributeNode($index) {}", "public function find($key): ?Model;", "function fetchByIndex ($index) {\r\n if ( isset ($this->pathVars[$index]) )\r\n return $this->pathVars[$index];\r\n else\r\n return false;\r\n }", "protected function retriveItem($index) {}", "public function get($index){\r\n\t\tif(isset($this->lista[ $index ])){\r\n\t\t\treturn $this->lista[ $index ];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function get($index) {\r\n return ($this->valid($index) ? $this->items[$index] : null);\r\n }", "public function getChild(int $index): TreeNodeInterface;", "public function getObjectByAddress($address) {\n\n if (empty($address) || !is_numeric($address)) {\n throw new InvalidArgumentException('Invalid Node Id');\n }\n\n $result = $this->getMapper()->fetchObjectByAddress($address);\n\n if (empty($result)) {\n throw new NotFoundException('Node Address: ' . $address . ' not found', 404);\n }\n\n// if ($result->type == HomeNet_Model_Node::INTERNET) {\n// $internet = $this->getInternetMapper()->fetchObjectById($id);\n// $result->fromArray($internet->toArray());\n// }\n\n return $this->_getPlugin($result);\n }", "public function getNode(int $index)\n {\n if ($index > $this->length - 1 || $index < 0) return null;\n $cursor = $this->head;\n for ($i = 0; $i < $index; ++$i) {\n if (is_null($cursor)) return null;\n $cursor = $cursor->getNext();\n }\n\n return $cursor;\n }", "public function __get($index) {\r\n return $this->get($index);\r\n }", "public function query($index){\n return $this->symfony->query->get($index);\n }", "public function find($selector, $index = null)\n {\n /* TODO: Next major version: Return the response object instead of the docs.\n find() call can returns warnings or bookmarks.\n */\n $asArray = $this->resultAsArray;\n $result = $this->_find('_find', $selector, $index);\n\n if ($asArray) {\n return $result['docs'];\n } else {\n return $result->docs;\n }\n }", "public function getObject($index = 0)\n {\n $results = $this->getFields();\n if (isset($results[ $index ])) {\n $qualifiedName = $this->qualifiedName;\n $object = $qualifiedName::create($results[ $index ]);\n } else {\n $object = null;\n }\n\n return $object;\n }", "function getObjectByIndex($inIndex) {\n\t\treturn $this->_getItem($inIndex);\n\t}", "function getObjectByIndex($inIndex) {\n\t\treturn $this->_getItem($inIndex);\n\t}", "function getObjectByIndex($inIndex) {\n\t\treturn $this->_getItem($inIndex);\n\t}", "public function fetchField($index = 0);", "public function getItem($index)\n\t{\n\t\treturn parent::offsetGet($index);\n\t}", "function rawGet($index) {\r\n\t\treturn array_key_exists($index, $this->uriArray) ? $this->uriArray[$index] : null;\r\n\t}", "public function get(int $index)\n {\n }", "public function find(SearchIndex $index): Settings;", "function searchElementByIndex($index, string $tableName)\n {\n $tempTable = $this->determineTable($tableName);\n for ($i = 0; $i < sizeof($tempTable); $i++) {\n if ($index == $i) {\n return $tempTable[$i];\n }\n }\n }", "function getOne($query, $index = 0)\n {\n if(!$query)\n return false;\n $res = $this->res ($query);\n $arr_res = array();\n if($res && mysql_num_rows($res))\n $arr_res = mysql_fetch_array($res);\n if(count($arr_res))\n return $arr_res[$index];\n else\n return false;\n }", "public function offsetGet($index) {\n if (!parent::offsetExists($index)) {\n return;\n }\n \n return parent::offsetGet($index);\n }", "function getItem($index);", "function getItem($index);", "public function find(string $selector, $idx = null);", "public function get($index){\r\n\t\tif(isset($this->map[ $index ])){\r\n\t\t\treturn $this->map[ $index ];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "static function model($alias, $node = null) {\n if (isset(static::$models[$alias]))\n return static::$models[$alias];\n if ($node === null || !is_object($node))\n return false;\n return static::$models[$alias] = $node;\n }", "public function getChildNode($index) {}", "public function get( $index )\n {\n \n if( isset( $this->content[$index] ) ) {\n return $this->content[$index];\n } elseif( $index === '*' ) {\n return $this->content;\n } else {\n return NULL;\n }\n }", "public function findOne($searchCrit = NULL, $sort = NULL, $pDomain = FALSE)\n\t{\n\t\t$table = $this->table();\n\t\t$id_field = $table->idField();\n\t\t$node_field = $this->node_field();\n\n\t\t$select = $this->_select($searchCrit, $sort, $pDomain);\n\n\t\tif ($pDomain):\n\t\t\t$row = $table->fetchRow($select);\n\t\t\treturn $this->get($row);\n\t\telse:\n\t\t\tif ($this->_is_versioned):\n\n\t\t\t\t$node_stub = Zupal_Nodes::getInstance();\n\n\t\t\t\t$cond = sprintf('( `%s`.%s = `%s`.node_id )', $table->tableName(), $this->node_field(), $node_stub->table()->tableName());\n\t\t\t\t$cond .= sprintf(' AND (`%s`.%s = `%s`.version)', $table->tableName(), $id_field, $node_stub->table()->tableName());\n\t\t\t\t//@TODO: cache this expression?\n\t\t\t\t$select->join($node_stub->table()->tableName(), $cond, array());\n\t\t\t\t$row = $table->getAdapter()->fetchRow($select);\n\t\t\t\t$id = $row[$id_field];\n\t\t\t\t// transfer data into domain objects.\n\t\t\t\treturn is_null($id) ? NULL : $this->get($id);\n\t\t\telse:\n\t\t\t\t$row = $this->table()->fetchRow($select);\n\t\t\t\treturn $this->get($row);\n\t\t\tendif;\n\t\tendif;\n\n\t}", "public function item($index) {\n\t\t$count = 0;\n\t\tforeach($this as $element) {\n\t\t\tif($index === $count) {\n\t\t\t\treturn $element;\n\t\t\t}\n\n\t\t\t$count++;\n\t\t}\n\n\t\treturn null;\n\t}", "public function getEntry($index)\n {\n $retval = null;\n\n if ($index > -1 && $index < count($this->stack))\n {\n $retval = $this->stack[$index];\n }\n\n return $retval;\n }", "private static function find($jsonPathQuery,$data,$idx=null){\n $jsonPathData = new JSONPath($data);\n $result = $jsonPathData->find($jsonPathQuery);\n if($idx===null){\n return $result;\n }\n return $result[$idx];\n }", "public function nodeExists()\n {\n if (!isset($this->args[0]) || !isset($this->args[1])) {\n return false;\n }\n $dataVars = $this->_dataVars($this->args[0]);\n extract($dataVars);\n $key = is_numeric($this->args[1]) ? $dataVars['secondary_id'] : 'alias';\n $conditions = [$class . '.' . $key => $this->args[1]];\n $possibility = $this->Acl->{$class}->find('all', compact('conditions'));\n if (empty($possibility)) {\n $this->abort(__d('cake_acl', '{0} not found', [$this->args[1]]), __d('cake_acl', 'No tree returned.'));\n }\n\n return $possibility;\n }", "public function getForNode(array $nodeKey);", "function get_node(&$json_obj, $key) {\n $keys = explode('.', $key);\n\n $last_key = array_pop($keys);\n\n while ($arr_key = array_shift($keys)) {\n if (!array_key_exists($arr_key, $json_obj)) {\n return null;\n }\n $json_obj = &$json_obj[$arr_key];\n }\n\n return $json_obj[$last_key];\n }", "function &getNodeById($id) {\n\t\treturn $this->id_index[intval($id)];\n\t}", "public function request($index,$default=null){\n return $this->symfony->request->get($index,$default);\n }", "public function offsetGet($idx)\t\t\t//\teg. var_dump($obj['two']);\r\n\t{\r\n\t\treturn $this->members[$idx];\r\n\t}", "public function offsetGet($idx)\t\t\t//\teg. var_dump($obj['two']);\r\n\t{\r\n\t\treturn $this->members[$idx];\r\n\t}", "public function readMetaDataIndex($model, $index);", "public function getEntry ($index)\n {\n $retval = null;\n\n if ($index > -1 && $index < count($this->stack))\n {\n $retval = $this->stack[$index];\n }\n\n return $retval;\n }", "public function fetchField($index=-1) {\n\t\tif(isset($this->currentRecord[$index])){\n\t\t\treturn $this->currentRecord[$index];\n\t\t}\n\t\telseif($index==-1)\t{\n\t\t\treturn $this->currentRecord;\n\t\t}\n\t\telse{\n\t\t\treturn(null);\n\t\t}\n\t}", "function get($index) {\n\t\tif ($index < 0 || $index > $this->length - 1) {\n\t\t\treturn -1;\n\t\t}\n\t\t$i = 0;\n\t\t$p = $this->link->next;\n\t\twhile ($p && $i++ < $index) {\n\t\t\t$p = $p->next;\n\t\t}\n\t\tif (!$p) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn $p->data;\n\t}", "public function __get($index)\n {\n return $this->get($index);\n }", "public function findOneByZindexNummer($key, $con = null)\n {\n return $this->findPk($key, $con);\n }", "public function getActor(int|string $index)\n {\n }", "public function get($index = NULL, $xss_clean = FALSE) {\n\t\t$value = parent::get($index, $xss_clean);\n\n\t\tif (! $value && $this->_expath && isset($this->_expath[$index])) {\n\t\t\t$value = $this->_expath[$index];\n\t\t}\n\n\t\treturn $value;\n\t}", "private function getNode($id)\r\n { \r\n foreach ($this->nodes as $customID => $node) {\r\n if ($node->getCustomID() === $id) {\r\n return $node;\r\n }\r\n }\r\n }", "public function offsetGet($index)\n {\n if (is_object($index)) {\n if (method_exists($index, \"__toString\")) {\n $index = $index->__toString();\n } else {\n $index = spl_object_hash($index);\n }\n }\n\n if ($this->offsetExists($index) !== false) {\n return $this->array[$index];\n }\n\n return null;\n }", "public function getObjectById($id) {\n if (empty($id) || !is_numeric($id)) {\n throw new InvalidArgumentException('Invalid Node');\n }\n\n $result = $this->getMapper()->fetchObjectById($id);\n\n if (empty($result)) {\n throw new NotFoundException('Node: ' . $id . ' Not Found', 404);\n }\n\n// if ($result->type == HomeNet_Model_Node::INTERNET) {\n// $internet = $this->getInternetMapper()->fetchObjectById($id);\n//\n// $result->fromArray($internet->toArray());\n// }\n\n return $this->_getPlugin($result);\n }", "function item ( $index = -1 )\n\t{\n\t\tif ( $index < 0 )\n\t\t{\n\t\t\treturn $this->_unqSel ;\n\t\t}\n\n\t\treturn $this->_multiSel->get( $index ) ;\n\t}", "public function getDocumentFromIndex()\n {\n $query = $this->client->createSelect();\n $query->setQuery(static::IDENTIFIER_KEY . ':' . $this->documentTranslation->getId());\n $query->createFilterQuery('type')->setQuery(static::TYPE_DISCRIMINATOR . ':' . static::DOCUMENT_TYPE);\n\n // this executes the query and returns the result\n $resultset = $this->client->select($query);\n\n if (0 === $resultset->getNumFound()) {\n return false;\n } else {\n foreach ($resultset as $document) {\n $this->document = $document;\n return true;\n }\n }\n return false;\n }", "public function taskGet( $index, $name );", "public function taskGet($index, $name);", "public function get( $iIndex );", "public function getObjectById($id) {\n if (empty($id) || !is_numeric($id)) {\n throw new InvalidArgumentException('Invalid Id');\n }\n \n $result = $this->getMapper()->fetchObjectById($id);\n\n if (empty($result)) {\n throw new NotFoundException('NodeModel: '.$id.' Not Found', 404);\n }\n return $result;\n }", "public function getModelForId(string $key): ?Model;", "public function element_at(int $index)\n {\n if ($this->is_array) {\n return $this->inner[$index];\n }\n foreach ($this as $item) {\n if ($this->index === $index) {\n return $item;\n }\n }\n\n return null;\n }", "public function getOne()\n\t{\t\n\t\t$args = func_get_args();\n\t\tif(count($args) == 1 && is_object($args[0])) {\n\t\t\t$clause = array_shift($args);\n\t\t} else {\n\t\t\t$clause = self::composeWhere($args);\n\t\t}\n\t\t\n\t\t$result = $this->getWhere($clause);\n\t\treturn $result->count() ? $result->current() : false;\n\t}", "function getIndex();", "public function get($index)\r\n {\r\n if(isset($this->items[$index])) {\r\n return $this->items[$index];\r\n }\r\n }", "public function get($index)\n {\n return $this->result->fetchRow($index);\n }", "public function actionGetByNid() {\n\t\tif(Yii::app()->user->checkAccess(\"isAdmin\")) {\n\t\t\t$request = Yii::app()->getRequest();\n\t\t\t$nid = $request->getParam(\"nid\");\n\t\t\t$node = NodeAR::model()->findByPk($nid);\n\t\t\t$data = $node->attributes;\n\t\t\t$data['user'] = UserAR::model()->findByPk($node->uid);\n\t\t\t$data['country'] = CountryAR::model()->findByPk($node->country_id);\n\t\t\t$this->responseJSON($data, \"success\");\n\t\t}\n\t}", "public function getDocumentFromIndex(): bool\n {\n $query = $this->getSolr()->createSelect();\n $query->setQuery(static::IDENTIFIER_KEY . ':' . $this->getDocumentId());\n $query->createFilterQuery('type')->setQuery(static::TYPE_DISCRIMINATOR . ':' . static::DOCUMENT_TYPE);\n\n // this executes the query and returns the result\n $resultset = $this->getSolr()->select($query);\n\n if (0 === $resultset->getNumFound()) {\n return false;\n } else {\n foreach ($resultset as $document) {\n $this->document = $document;\n return true;\n }\n }\n return false;\n }", "public function getNode();", "public function getEntry($index) {\n if (isset($this->entries[$index])) {\n return $this->entries[$index];\n }\n return false;\n }", "public static function _get_path_alias_from_node_id($path_alias){\n $source_url = db_select('url_alias', 'ua')\n ->fields('ua', array('alias'))\n ->condition('source', $path_alias)\n ->execute()\n ->fetchField();\n if(!empty($source_url)){\n return $source_url;\n }\n}", "public function getAt($index_int)\r\n\t{\r\n\t return isset($this->objects[$index_int])? $this->objects[$index_int] : false ;\r\n\t}", "public function getByIndex($index)\n {\n if (isset($this->elements[$index])) {\n return $this->elements[$index];\n }\n\n return null;\n }", "public function offsetGet( $index )\n\t{\n\t\tif( ! $this->offsetExists( $index ) )\n\t\t{\n\t\t\tif( isset( $this->extrafields[$index] ) )\n\t\t\t{\n\t\t\t\treturn $this->extrafields[$index];\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->row[$index];\n\t}", "public function findOne(string $selector);", "public function get($index)\n {\n $node = $this->head;\n\n if($index < 0){\n throw new \\LogicException(\"Index out of range: $index\");\n }\n\n for($i = 0; $i < $index && $node !== null; $i++){\n $node = $node->getNext();\n }\n\n if($node === null){\n throw new \\LogicException(\"Index out of range: $index\");\n }\n\n return $node->getValue();\n }", "public function getAuthor($index = 0) {\r\n\t\t$authors = $this->getAuthors ();\r\n\t\t\r\n\t\tif (isset ( $authors [$index] )) {\r\n\t\t\treturn $authors [$index];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "function getIndex() ;", "public function getFirstMatchedIndex()\n {\n foreach ($this->getIndexes() as $index) {\n if ($index->getCountResults()) {\n return $index;\n }\n }\n\n return Mage::helper('searchindex/index')->getIndex('catalog');\n }", "public function offsetGet($index)\n {\n // Does the $read function exist?\n $callables = @parent::offsetGet($index);\n\n // Does read function exist?\n if (is_callable($callables[0])) {\n\n // Return $read function\n return call_user_func($callables[0]);\n }\n\n // Undefined field\n return null;\n }", "public function get($branch, $trieNode = NULL);" ]
[ "0.6373351", "0.6308967", "0.6210797", "0.62088865", "0.58915865", "0.588434", "0.57912385", "0.57455564", "0.56986904", "0.56986904", "0.5679224", "0.5609347", "0.5534779", "0.5527657", "0.54684615", "0.5436418", "0.5424644", "0.53924966", "0.53846055", "0.5365795", "0.53518635", "0.53468937", "0.5296732", "0.52919567", "0.5289727", "0.52344424", "0.5219599", "0.520738", "0.51950204", "0.51808107", "0.5177624", "0.51740825", "0.51716596", "0.51665014", "0.51665014", "0.51665014", "0.5165852", "0.51443267", "0.51291883", "0.51086646", "0.5101744", "0.5084027", "0.5082221", "0.5072032", "0.50685704", "0.50685704", "0.5062872", "0.5058857", "0.50357175", "0.5035477", "0.5027661", "0.50207967", "0.501864", "0.5012123", "0.5005041", "0.50022227", "0.500009", "0.4996883", "0.49772713", "0.4968295", "0.49660283", "0.49660283", "0.49492553", "0.4948571", "0.4946058", "0.49443704", "0.49394426", "0.49335843", "0.49277636", "0.49043375", "0.48869374", "0.48855153", "0.48845187", "0.4882485", "0.48788488", "0.48636314", "0.4861522", "0.48613915", "0.48575336", "0.48559096", "0.4852174", "0.4851175", "0.48501372", "0.4844847", "0.48445782", "0.48442635", "0.48425907", "0.48365372", "0.4832683", "0.4831026", "0.48306024", "0.4827552", "0.4807383", "0.48050743", "0.48031086", "0.47978652", "0.47956356", "0.47937495", "0.47915855", "0.4785999" ]
0.7387855
0
Tries binding values on node at given index if matching model and/or alias.
Пытается привязать значения к узлу по заданному индексу, если соответствует модель и/или псевдоним.
protected function _tryBindMatchingNode( $index, $model = null, $alias = null, $tryOnSucceeding = true, $values ) { $node = $this->_isNodeMatching( $index, $model, $alias ); if ( !$node ) // node isn't matching, so don't try to bind actually return null; // check if node is capable of binding in desired direction itself if ( $tryOnSucceeding ) $okay = $node->canBindOnSuccessor(); else $okay = $node->canBindOnPredecessor(); if ( $okay ) // node can bind itself ... so bind $tryOnSucceeding ? $node->bindOnSuccessor( $values ) : $node->bindOnPredecessor( $values ); else // node can't bind itself ... bind on neighbour of either reference $tryOnSucceeding ? $this->nodeAtIndex( $index + 1 )->bindOnPredecessor( $values ) : $this->nodeAtIndex( $index - 1 )->bindOnSuccessor( $values ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _isNodeMatching( $index, $model = null, $alias = null ) {\n\t\t$node = $this->nodeAtIndex( $index );\n\n\t\t$matching = ( $model === null || $node->isAssociatedWithModel( $model ) );\n\t\t$matching |= ( $alias === null || $node->getName() == $alias );\n\n\t\treturn $matching ? $node : null;\n\t}", "public function bindNodeOnItem( $intNodeIndex, model $item )\n\t{\n\t\t$node = $this->nodeAtIndex( $intNodeIndex );\n\t\tif ( !$node->getModel()->isCompatibleModel( $item ) )\n\t\t\tthrow new \\InvalidArgumentException( 'item is not matching model of selected node' );\n\n\t\tif ( !$this->datasource )\n\t\t\t$this->setDatasource( $item->source() );\n\n\t\tif ( $node->wantsPredecessor() ) {\n\t\t\t$values = array();\n\t\t\tforeach ( $node->getPredecessorNames() as $name )\n\t\t\t\t$values[$name] = $item->__get( $name );\n\n\t\t\tif ( $node->canBindOnPredecessor() )\n\t\t\t\t$node->bindOnPredecessor( $values );\n\t\t\telse\n\t\t\t\t$this->nodeAtIndex( $intNodeIndex - 1 )->bindOnSuccessor( $values );\n\t\t}\n\n\t\tif ( $node->wantsSuccessor() ) {\n\t\t\t$values = array();\n\t\t\tforeach ( $node->getSuccessorNames() as $name )\n\t\t\t\t$values[$name] = $item->__get( $name );\n\n\t\t\tif ( $node->canBindOnSuccessor() )\n\t\t\t\t$node->bindOnSuccessor( $values );\n\t\t\telse\n\t\t\t\t$this->nodeAtIndex( $intNodeIndex + 1 )->bindOnPredecessor( $values );\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function _bindOnModel( $model = null, $alias = null, $endpointsOnly = true, $values ) {\n\t\tif ( !$this->isComplete() )\n\t\t\tthrow new \\RuntimeException( 'binding incomplete relation rejected' );\n\n\t\t// try matching first node in relation\n\t\tif ( $this->_tryBindMatchingNode( 0, $model, $alias, true, $values ) )\n\t\t\treturn $this;\n\n\t\t// try matching last node in relation\n\t\tif ( $this->_tryBindMatchingNode( -1, $model, $alias, false, $values ) )\n\t\t\treturn $this;\n\n\t\t// try nodes in between?\n\t\tif ( !$endpointsOnly )\n\t\t\tfor ( $index = 1; $index < count( $this->nodes ) - 1; $index++ ) {\n\t\t\t\t$node = $this->_isNodeMatching( $index, $model, $alias );\n\t\t\t\tif ( $node ) {\n\t\t\t\t\tswitch ( $node->getBindMode() ) {\n\t\t\t\t\t\tcase model_relation_node::BINDING_BOTH :\n\t\t\t\t\t\t\tthrow new \\LogicException( 'ambigious binding' );\n\n\t\t\t\t\t\tcase model_relation_node::BINDING_PREDECESSOR :\n\t\t\t\t\t\t\t$node->bindOnPredecessor( $values );\n\t\t\t\t\t\t\treturn $this;\n\n\t\t\t\t\t\tcase model_relation_node::BINDING_SUCCESSOR :\n\t\t\t\t\t\t\t$node->bindOnSuccessor( $values );\n\t\t\t\t\t\t\treturn $this;\n\n\t\t\t\t\t\tcase model_relation_node::BINDING_NEITHER :\n\t\t\t\t\t\t\tthrow new \\LogicException( 'ambigious binding, matching node is ' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tthrow new \\RuntimeException( 'model is not associated with any selected node of relation' );\n\t}", "public function bindOnMatching( $model = null, $nameOrAlias = null, $endpointsOnly = true, $value ) {\n\t\tif ( !$model && !$nameOrAlias )\n\t\t\tthrow new \\InvalidArgumentException( 'select either associated model or its name/alias to search for matching node in relation' );\n\n\t\treturn $this->_bindOnModel( $model, $nameOrAlias, !!$endpointsOnly, data::normalizeVariadicArguments( func_get_args(), 3 ) );\n\t}", "public function testResolveWithIndex()\n {\n // One level structure test.\n $testObject = SourceDataHelper::getDataIndexedL1();\n $pathVariants = ['getAllObjects/#3/getName', 'allObjects/#3/name', 'objects/#3/myName'];\n foreach ($pathVariants as $pathVariant) {\n $resolverItems = new ItemCollection([\n new Item($testObject),\n new Item($testObject)\n ], FALSE);\n $resolverItems->resolve($pathVariant);\n $this->assertEquals([\n 'test 3',\n 'test 3'\n ], $resolverItems->getValue());\n }\n\n }", "public function bind_param($index, $value, $type=NULL) {\n $index = intval($index);\n if ($index > 0 && $index < count($this->bindings)) {\n $this->bindings[$index] = $value;\n } else {\n /* no error is raised, but perhaps should be */\n }\n }", "public function testResolveWithIndexOn2Levels()\n {\n\n // Two level structure test.\n $testObject = SourceDataHelper::getDataIndexedL2();\n $pathVariants = ['getAllObjects/#3/getAllObjects/#2/getName', 'allObjects/#3/allObjects/#2/name', 'objects/#3/objects/#2/myName'];\n foreach ($pathVariants as $pathVariant) {\n $resolverItems = new ItemCollection([\n new Item($testObject),\n new Item($testObject),\n ], FALSE);\n $resolverItems->resolve($pathVariant);\n $this->assertEquals([\n 'test 3.2',\n 'test 3.2'\n ], $resolverItems->getValue());\n }\n }", "private function getValueRecursive($index, $attributes, $count)\n {\n if (array_key_exists($count, $index)) {\n $search = $index[$count];\n\n if (is_array($attributes)) {\n $attributes = array_reduce(array_keys($attributes), function ($carry, $key) use ($attributes, $search) {\n if ($search === $key) {\n return $attributes[$key];\n }\n\n if ($attributes[$key] instanceof AttributeInterface && $attributes[$key]->getId() === $search) {\n return $attributes[$key];\n }\n\n return $carry;\n });\n } elseif ($attributes instanceof AttributeInterface) {\n $attributes = $attributes->getValue([$search]);\n } else {\n Log::warning(\"Couldn't recognize attribute type in AbstractCompositeAttribute.\");\n }\n\n return $this->getValueRecursive($index, $attributes, $count + 1);\n }\n\n if (is_null($attributes)) {\n Log::warning(sprintf(\n 'Unable to extract requested index from attribute - %s - %s',\n get_class($this),\n json_encode($index)\n ));\n }\n\n return $attributes;\n }", "protected function resolve(string $index, ?string $path = null)\n\t{\n\t\t// Attempt to load the data if it's not found.\n\t\tif( empty($this->items[$index]) ){\n\t\t\t$this->load($index);\n\t\t}\n\n\t\t// Set the pointer at the specified key.\n\t\t$pointer = &$this->items[$index] ?? null;\n\n\t\tif( empty($pointer) ){\n\t\t\tthrow new KeyNotFoundException(\"Key not found.\");\n\t\t}\n\n\t\t// Break apart path dotted notation to traverse item store.\n\t\tforeach( \\explode(\".\", $path ?? \"\") as $part ){\n\n\t\t\tif( empty($part) ){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( \\array_key_exists($part, $pointer) === false ){\n\t\t\t\tthrow new KeyNotFoundException(\"Key not found.\");\n\t\t\t}\n\n\t\t\t$pointer = &$pointer[$part];\n\t\t}\n\n\t\treturn $pointer;\n\t}", "public function testResolveWithValidButNonMatchingPath1()\n {\n\n $testObject = SourceDataHelper::getDataIndexedL2();\n\n // Must return provided default value when passing it using a modifier.\n $defaultValueSet = [\n ['in' => NULL, 'out' => NULL],\n ['in' => new NullDefaultValue(), 'out' => NULL],\n ['in' => 'Default String', 'out' => 'Default String'],\n ['in' => 192, 'out' => 192],\n ['in' => ['test' => 'A', 'my' => 2, 'array' => [1, 2, 3]], 'out' => ['test' => 'A', 'my' => 2, 'array' => [1, 2, 3]]],\n ['in' => new VoidDefaultValue(), 'out' => NULL],\n ['in' => new VoidDefaultValue('Default String'), 'out' => 'Default String']\n ];\n\n foreach ($defaultValueSet as $defaultValue) {\n $resolverItems = new ItemCollection($testObject);\n $resolverItems->resolve([\n 'badpath',\n '?default-value' => $defaultValue['in']\n ]);\n\n $this->assertEquals(\n $defaultValue['out'], $resolverItems->getValue()\n );\n }\n\n foreach ($defaultValueSet as $defaultValue) {\n $resolverItems = new ItemCollection($testObject);\n $resolverItems->resolve([\n '~myId:badpath',\n '?default-value@~myId' => $defaultValue['in']\n ]);\n\n $this->assertEquals(\n $defaultValue['out'], $resolverItems->getValue()\n );\n }\n }", "public function getNode(int|string $index)\n {\n }", "public function testResolveWithIndexOn2Levels2()\n {\n\n // Two level structure test.\n $testObject = SourceDataHelper::getDataIndexedL2();\n\n $pathVariants = [\n\n // Using full named getter\n ['getAllObjects/#3' => ['getAllObjects' => ['#2/getName']]],\n ['getAllObjects' => ['#3' => ['getAllObjects' => ['#2' => 'getName']]]],\n\n\n // Using short named getter\n// ['AllObjects / 3' => ['AllObjects' => ['2 / getName']]],\n\n // Using direct object access\n// ['objects / 3' => ['objects' => ['2 / getName']]],\n ];\n foreach ($pathVariants as $pathVariant) {\n $resolverItems = new ItemCollection([\n new Item($testObject),\n ], FALSE);\n $resolverItems->resolve($pathVariant);\n $this->assertEquals('test 3.2', $resolverItems->getValue());\n }\n }", "public function getAttributeValue($index) {}", "public function testExistsAliasWithIndex()\n {\n $alias = 'alias1';\n $index = 'index1';\n $params = ['name' => $alias, 'index' => $index];\n $this->indicesMock->expects($this->once())\n ->method('existsAlias')\n ->with($params)\n ->willReturn(true);\n $this->assertTrue($this->model->existsAlias($alias, $index));\n }", "public static function getBindDataValue($index, $localData = null) {\n if(strpos($index, \":\") > -1) {\n $signature = explode(\":\", $index);\n \n //check for custom hashes\n if(self::$customHashes) {\n if(isset(self::$customHashes[$signature[0]])) {\n if(isset(self::$customHashes[$signature[0]][$signature[1]])) {\n return self::$customHashes[$signature[0]][$signature[1]];\n }\n }\n }\n \n //check for config\n if($signature[0] == \"config\") {\n return self::$config->get($signature[1]);\n }\n \n //check for engine args\n if($signature[0] == \"engine\") {\n if(isset(self::$engineArgs[$signature[1]])) {\n return self::$engineArgs[$signature[1]];\n }\n }\n \n //check for input\n if($signature[0] == \"input\") {\n return self::$request->input($signature[1]);\n }\n \n //check for get\n if($signature[0] == \"get\") {\n return self::$request->queryString($signature[1]);\n }\n \n //check for post\n if($signature[0] == \"post\") {\n return self::$request->form($signature[1]);\n }\n \n //check for sessions\n if($signature[0] == \"session\") {\n if(!is_null(self::$request->session($signature[1]))) {\n return self::$request->session($signature[1]);\n }\n }\n \n //check for cookies\n if($signature[0] == \"cookies\") {\n if(!is_null(self::$request->cookies($signature[1]))) {\n return self::$request->cookies($signature[1]);\n }\n }\n \n //check for cookies\n if($signature[0] == \"server\") {\n if(!is_null(self::$request->serverVariables(strtoupper($signature[1])))) {\n return self::$request->serverVariables(strtoupper($signature[1]));\n }\n }\n \n //check for sql\n if($signature[0] == \"sql\") {\n self::$db->loadCommand($signature[1], self::$engineArgs);\n return self::$db->getDataString();\n }\n }\n \n if(isset($localData[$index])) {\n return $localData[$index];\n }\n \n //not caught\n return null;\n }", "public function getAttributeNode($index) {}", "public function at($index) {\r\n return $this->models[$index];\r\n }", "protected function objectvalueindexAction($tag, $fname, $node)\n {\n $name = $tag->attributes->name;\n $field = $tag->attributes->field;\n $index = $tag->attributes->index;\n $use = $tag->attributes->use;\n $xpath = $tag->attributes->xpath;\n if (isset($tag->attributes->require)) {\n $require = $tag->attributes->require;\n } else {\n $require = false;\n }\n\n $object = &$this->getObject($name);\n\n $value = null;\n if (isset($this->indexes->$index)) {\n $id = $this->files->getXPathValue($fname, $use, $node);\n if (isset($this->indexes->$index->indexes->$id)) {\n $indexFile = $this->indexes->$index->fname;\n $indexNode = $this->indexes->$index->indexes->$id;\n $value = $this->files->getXPathValue($indexFile, $xpath, $indexNode);\n\n if (isset($tag->attributes->rule)) {\n $rule = $tag->attributes->rule;\n $value = $this->rules->$rule->$value;\n }\n }\n }\n\n if ($require == \"true\" && is_null($value)) {\n echo 'Require value not found for '.$name.'->'.$field.chr(10);\n exit(1);\n }\n\n $object->$field = $value;\n }", "function fetchByIndex ($index) {\r\n if ( isset ($this->pathVars[$index]) )\r\n return $this->pathVars[$index];\r\n else\r\n return false;\r\n }", "public function getIndexForBinding(ColumnBinding $binding);", "public function query($index, $placeholders=null) {}", "abstract protected function bindAlias(AliasOption $alias);", "public function readMetaDataIndex($model, $index);", "public function readColumnMapIndex($model, $index);", "function dbplus_setindexbynumber($relation, $idx_number)\n{\n}", "public function bindToObject(DatabaseModel $model, array $bindings, array $memberBind = []): Driver;", "public function bindModel( $model )\n\t{\n\t\t$value = $this->requestValue();\t// bad name\n\t\tif( is_null( $value ) ) $value = 0; // if == NULL, set to 0, because NULL won't be picked up by $model->__modified\n\t\t$attributeName = $this->_name;\n\t\t$model->$attributeName = $value;\n\t}", "final function pullBindings()\n {\n $skipReadWriteBindings = (count($this->errors) > 0);\n foreach ($this->bindings as $prop => $binding) {\n if ($prop != $binding->bindingSetup()->boundProperty())\n {\n $func = WFFunction::create('return \"pullBindings() -- skipping meta-binding \\'$prop\\'.\";')\n ->withArguments('prop')\n ->curry ($prop);\n WFLog::log($func, WFLog::TRACE_LOG);\n continue;\n }\n\n $func = WFFunction::create('return \"pullBindings() -- processing binding for widget \\'{$id}\\', local property \\'$prop\\', to keyPath \" . $binding->bindToKeyPath();')\n ->withArguments('id', 'prop', 'binding')\n ->curry ($this->id, $prop, $binding);\n WFLog::log($func, WFLog::TRACE_LOG);\n\n // DO NOT RE-BIND IF THE BOUND VALUE WAS AN ERROR! WANT TO SHOW THE BAD VALUE!\n // Of course, R/O bindings cannot have errors, so we will still bind them...\n if ($skipReadWriteBindings and !$binding->bindingSetup()->readOnly())\n {\n $func = WFFunction::create('return \"skipping pullBindings for {$id} / $prop because the value is an error.\";')\n ->withArguments('id', 'prop')\n ->curry ($this->id, $prop);\n WFLog::log($func, WFLog::TRACE_LOG);\n continue;\n }\n // process readwrite mode option\n if (!$binding->canReadBoundValue())\n {\n $func = WFFunction::create('return \"skipping pullBindings for {$id} / $prop because the binding option for ReadWriteMode is set to writeonly.\";')\n ->withArguments('id', 'prop')\n ->curry ($this->id, $prop);\n WFLog::log($func, WFLog::TRACE_LOG);\n continue;\n }\n\n try {\n $bindingSetup = $binding->bindingSetup();\n switch ($bindingSetup->bindingType()) {\n case WFBindingSetup::WFBINDINGTYPE_SINGLE:\n $boundValue = $this->valueForBinding($prop, $binding);\n break;\n case WFBindingSetup::WFBINDINGTYPE_MULTIPLE_BOOLEAN:\n // find all bindings in the pattern of <prop>, <prop2>, <propN>\n $boundValueParts = array($this->valueForBinding($prop, $binding));\n $partIndex = 2;\n while (true) {\n $partName = $prop . $partIndex;\n if (!isset($this->bindings[$partName])) break;\n\n $boundValueParts[] = $this->valueForBinding($partName, $this->bindings[$partName]);\n $partIndex++;\n }\n // determine combo of all values; seed value with value of first one.\n $boundValue = $boundValueParts[0];\n for ($i = 1; $i < count($boundValueParts); $i++) {\n switch ($binding->bindingSetup()->booleanMode()) {\n case WFBindingSetup::WFBINDINGTYPE_MULTIPLE_BOOLEAN_OR:\n $boundValue = ($boundValue or $boundValueParts[$i]);\n break;\n case WFBindingSetup::WFBINDINGTYPE_MULTIPLE_BOOLEAN_AND:\n $boundValue = ($boundValue and $boundValueParts[$i]);\n break;\n default:\n throw( new Exception(\"Illegal booleanMode for '$prop'.\") );\n }\n }\n break;\n case WFBindingSetup::WFBINDINGTYPE_MULTIPLE_PATTERN:\n // find all bindings in the pattern of <prop>, <prop2>, <propN> and assemble in format of prop's FormatString binding option.\n $boundValueParts = array(WFBindingSetup::WFBINDINGSETUP_PATTERN_OPTION_VALUE => $this->valueForBinding($prop, $binding));\n $partIndex = 2;\n while (true) {\n $partName = $prop . $partIndex;\n if (!isset($this->bindings[$partName])) break;\n\n $partPattern = \"%{$partIndex}%\";\n $boundValueParts[$partPattern] = $this->valueForBinding($partName, $this->bindings[$partName]);\n $partIndex++;\n }\n $defaultPropertyOptions = $binding->bindingSetup()->options();\n $valuePattern = $defaultPropertyOptions[WFBindingSetup::WFBINDINGSETUP_PATTERN_OPTION_NAME];\n\n $basePropertyOptions = $binding->options();\n if (isset($basePropertyOptions[WFBindingSetup::WFBINDINGSETUP_PATTERN_OPTION_NAME]))\n {\n $valuePattern = $basePropertyOptions[WFBindingSetup::WFBINDINGSETUP_PATTERN_OPTION_NAME];\n }\n // need to support mutli-value bindings for \"magic\" array mode bindings too\n if (is_array($boundValueParts['%1%']))\n {\n $boundValues = array();\n // special handling for InsertsNullPlaceholder - this way we can set up a single null placeholder like \"Select...\" and it won't look goofy when we process '%1%, %2%' ValuePatterns\n if (isset($basePropertyOptions[WFBindingSetup::WFBINDINGSETUP_INSERTS_NULL_PLACEHOLDER]))\n {\n // use NullPlaceholder as the entire value, then remove it from the array so all parts are same array length\n $boundValues[] = array_shift($boundValueParts['%1%']);\n }\n $itemCount = count($boundValueParts['%1%']);\n for ($i = 0; $i < $itemCount; $i++) {\n $boundValueArrayParts = array();\n foreach (array_keys($boundValueParts) as $partPattern) {\n $boundValueArrayParts[] = $boundValueParts[$partPattern][$i];\n }\n $boundValues[] = str_replace(array_keys($boundValueParts), $boundValueArrayParts, $valuePattern);\n }\n $boundValue = $boundValues;\n }\n else\n {\n // special-case handling for NULL_PLACEHOLDER and multi-value bindings\n // if *any* boundValueParts.values is NULL then boundValue should be NULL entirely\n // otherwise do normal str substitution\n $anyNulls = false;\n if (isset($basePropertyOptions[WFBindingSetup::WFBINDINGSETUP_NULL_PLACEHOLDER]))\n {\n foreach (array_values($boundValueParts) as $checkForNull) {\n if ($checkForNull === NULL)\n {\n $anyNulls = true;\n break;\n }\n }\n }\n\n if ($anyNulls)\n {\n $boundValue = NULL;\n }\n else\n {\n $boundValue = str_replace(array_keys($boundValueParts), array_values($boundValueParts), $valuePattern);\n }\n }\n break;\n default:\n throw( new Exception(\"Support for bindingType \" . $bindingSetup->bindingType() . \" used by '$prop' is not yet implemented.\") );\n }\n // adjust for NullPlaceholder\n if ( ($boundValue === NULL or $boundValue === '') and $binding->coalescedOption(WFBindingSetup::WFBINDINGSETUP_NULL_PLACEHOLDER) )\n {\n $boundValue = $binding->coalescedOption(WFBindingSetup::WFBINDINGSETUP_NULL_PLACEHOLDER);\n }\n\n $func = WFFunction::create('return \"FINAL value \" . WFPrettyPrint($boundValue) . \" for binding {$id} / $prop...\";')\n ->withArguments('boundValue', 'id', 'prop')\n ->curry ($boundValue, $this->id, $prop);\n WFLog::log($func, WFLog::TRACE_LOG);\n\n $this->setValueForKey($boundValue, $prop); // must do this to allow accessors to be called!\n } catch (Exception $e) {\n $func = WFFunction::create('return \"Skipping pullBindings for {$id} / {$prop} due to exception: {$e->getMessage()}\";')\n ->withArguments('id', 'prop', 'e')\n ->curry ($this->id, $prop, $e);\n WFLog::log($func, WFLog::WARN_LOG);\n continue;\n }\n }\n }", "public function fetchField($index = 0);", "private function _bindThroughAttribute(Model $Model,$keyType) {\n if (isset($this->settings[$this->entityModel->name]['virtualKeys'][$keyType])) {\n foreach ($this->settings[$this->entityModel->name]['virtualKeys'][$keyType] as $virtualModel) {\n if (is_array($virtualModel)) {\n $model = array_keys($virtualModel);\n $class = array_values($virtualModel);\n $virtualModel = $model[0];\n $virtualClass = $class[0];\n\n } else {\n $virtualClass = $virtualModel;\n\n }\n $Model->$virtualModel = ClassRegistry::init($virtualClass);\n $attributeModel = 'Attributes' . ucfirst($keyType) . 'Value';\n if ($this->virtualFieldType == 'cake') {\n //Binds the Parent Model to Associated Models with a UUID foreignKey using a HABTM relationship\n $hasAndBelongsToMany[$virtualModel] = array(\n 'className' => $virtualModel,\n 'foreignKey' => 'entity_id',\n 'associationForeignKey' => 'value',\n 'with' => 'Attributes' . ucfirst($keyType) . 'Value',\n 'joinTable' => 'attributes_' . $keyType . '_values'\n );\n //Passing $reset as false. Seems to fix some binding issues. \n //may work well on the other binds as well.\n $Model->bindModel(array('hasAndBelongsToMany' => Set::merge($Model->hasAndBelongsToMany, $hasAndBelongsToMany)),false);\n } else {\n //Binds the Parent Model to Associated Models using a hasMany and belongsTo relationship. This adds just the Associated Model record\n //to the AttributesUuidValue model.\n $belongsTo = array(\n $virtualModel => array(\n 'className' => $virtualModel,\n 'foreignKey' => 'value'\n )\n );\n $Model->$attributeModel->$virtualModel = ClassRegistry::init($virtualClass);\n $Model->$attributeModel->bindModel(array(\n 'belongsTo' => Set::merge($Model->$attributeModel->belongsTo, $belongsTo)\n ));\n }\n }\n }\n }", "public function getDataCellValue($model, $key, $index)\n {\n if ($this->value !== null) {\n if (is_string($this->value)) {\n return ArrayHelper::getValue($model, $this->value);\n } else {\n return call_user_func($this->value, $model, $key, $index, $this);\n }\n } elseif ($this->attribute !== null) {\n return ArrayHelper::getValue($model, $this->attribute);\n }\n return null;\n }", "public function getWeight( $index );", "abstract public function bindByReference(array &$binding);", "function parse_bgp_peer_index(&$peer, $index, $mib = 'BGP4V2-MIB')\n{\n $address_types = $GLOBALS['config']['mibs']['INET-ADDRESS-MIB']['rewrite']['InetAddressType'];\n $index_parts = explode('.', $index);\n switch ($mib)\n {\n case 'BGP4-MIB':\n // bgpPeerRemoteAddr\n if (get_ip_version($index))\n {\n $peer['bgpPeerRemoteAddr'] = $index;\n }\n break;\n\n case 'ARISTA-BGP4V2-MIB':\n // 1. aristaBgp4V2PeerInstance\n $peer['aristaBgp4V2PeerInstance'] = array_shift($index_parts);\n // 2. aristaBgp4V2PeerRemoteAddrType\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['aristaBgp4V2PeerRemoteAddrType']) == 0)\n {\n $peer['aristaBgp4V2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['aristaBgp4V2PeerRemoteAddrType']]))\n {\n $peer['aristaBgp4V2PeerRemoteAddrType'] = $address_types[$peer['aristaBgp4V2PeerRemoteAddrType']];\n }\n // 3. length of the IP address\n $ip_len = array_shift($index_parts);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. aristaBgp4V2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if ($peer_addr_type = get_ip_version($peer_ip))\n {\n $peer['aristaBgp4V2PeerRemoteAddr'] = $peer_ip;\n $peer['aristaBgp4V2PeerRemoteAddrType'] = 'ipv' . $peer_addr_type; // FIXME. not sure, but seems as Arista use only ipv4/ipv6 for afi\n }\n break;\n\n case 'BGP4V2-MIB':\n case 'FOUNDRY-BGP4V2-MIB': // BGP4V2-MIB draft\n // 1. bgp4V2PeerInstance\n $peer['bgp4V2PeerInstance'] = array_shift($index_parts);\n // 2. bgp4V2PeerLocalAddrType\n $local_addr_type = array_shift($index_parts);\n if (strlen($peer['bgp4V2PeerLocalAddrType']) == 0)\n {\n $peer['bgp4V2PeerLocalAddrType'] = $local_addr_type;\n }\n if (isset($address_types[$peer['bgp4V2PeerLocalAddrType']]))\n {\n $peer['bgp4V2PeerLocalAddrType'] = $address_types[$peer['bgp4V2PeerLocalAddrType']];\n }\n // 3. length of the local IP address\n $ip_len = array_shift($index_parts);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. bgp4V2PeerLocalAddr\n $local_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $local_ip = snmp2ipv6($local_ip);\n }\n if (get_ip_version($local_ip))\n {\n $peer['bgp4V2PeerLocalAddr'] = $local_ip;\n }\n\n // Get second part of index\n $index_parts = array_slice($index_parts, $ip_len);\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['bgp4V2PeerRemoteAddrType']) == 0)\n {\n $peer['bgp4V2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['bgp4V2PeerRemoteAddrType']]))\n {\n $peer['bgp4V2PeerRemoteAddrType'] = $address_types[$peer['bgp4V2PeerRemoteAddrType']];\n }\n // 6. length of the IP address\n $ip_len = array_shift($index_parts);\n // 7. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 8. bgp4V2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if ($peer_addr_type = get_ip_version($peer_ip))\n {\n $peer['bgp4V2PeerRemoteAddr'] = $peer_ip;\n $peer['bgp4V2PeerRemoteAddrType'] = 'ipv' . $peer_addr_type;\n }\n break;\n\n case 'BGP4-V2-MIB-JUNIPER':\n // 1. jnxBgpM2PeerRoutingInstance\n $peer['jnxBgpM2PeerRoutingInstance'] = array_shift($index_parts);\n // 2. jnxBgpM2PeerLocalAddrType\n $local_addr_type = array_shift($index_parts);\n if (strlen($peer['jnxBgpM2PeerLocalAddrType']) == 0)\n {\n $peer['jnxBgpM2PeerLocalAddrType'] = $local_addr_type;\n }\n if (isset($address_types[$peer['jnxBgpM2PeerLocalAddrType']]))\n {\n $peer['jnxBgpM2PeerLocalAddrType'] = $address_types[$peer['jnxBgpM2PeerLocalAddrType']];\n }\n // 3. length of the local IP address\n $ip_len = (strstr($peer['jnxBgpM2PeerLocalAddrType'], 'ipv6') ? 16 : 4);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. jnxBgpM2PeerLocalAddr\n $local_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $local_ip = snmp2ipv6($local_ip);\n }\n if (get_ip_version($local_ip))\n {\n $peer['jnxBgpM2PeerLocalAddr'] = $local_ip;\n }\n\n // Get second part of index\n $index_parts = array_slice($index_parts, $ip_len);\n // 6. jnxBgpM2PeerRemoteAddrType\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['jnxBgpM2PeerRemoteAddrType']) == 0)\n {\n $peer['jnxBgpM2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['jnxBgpM2PeerRemoteAddrType']]))\n {\n $peer['jnxBgpM2PeerRemoteAddrType'] = $address_types[$peer['jnxBgpM2PeerRemoteAddrType']];\n }\n // 7. length of the remote IP address\n $ip_len = (strstr($peer['jnxBgpM2PeerRemoteAddrType'], 'ipv6') ? 16 : 4);\n // 8. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 9. jnxBgpM2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if (get_ip_version($peer_ip))\n {\n $peer['jnxBgpM2PeerRemoteAddr'] = $peer_ip;\n }\n break;\n\n case 'FORCE10-BGP4-V2-MIB':\n // 1. f10BgpM2PeerInstance\n $peer['f10BgpM2PeerInstance'] = array_shift($index_parts);\n // 2. f10BgpM2PeerLocalAddrType\n $local_addr_type = array_shift($index_parts);\n if (strlen($peer['f10BgpM2PeerLocalAddrType']) == 0)\n {\n $peer['f10BgpM2PeerLocalAddrType'] = $local_addr_type;\n }\n if (isset($address_types[$peer['f10BgpM2PeerLocalAddrType']]))\n {\n $peer['f10BgpM2PeerLocalAddrType'] = $address_types[$peer['f10BgpM2PeerLocalAddrType']];\n }\n // 3. length of the local IP address\n $ip_len = (strstr($peer['f10BgpM2PeerLocalAddrType'], 'ipv6') ? 16 : 4);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. f10BgpM2PeerLocalAddr\n $local_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $local_ip = snmp2ipv6($local_ip);\n }\n if (get_ip_version($local_ip))\n {\n $peer['f10BgpM2PeerLocalAddr'] = $local_ip;\n }\n\n // Get second part of index\n $index_parts = array_slice($index_parts, $ip_len);\n // 6. f10BgpM2PeerRemoteAddrType\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['f10BgpM2PeerRemoteAddrType']) == 0)\n {\n $peer['f10BgpM2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['f10BgpM2PeerRemoteAddrType']]))\n {\n $peer['f10BgpM2PeerRemoteAddrType'] = $address_types[$peer['f10BgpM2PeerRemoteAddrType']];\n }\n // 7. length of the remote IP address\n $ip_len = (strstr($peer['f10BgpM2PeerRemoteAddrType'], 'ipv6') ? 16 : 4);\n // 8. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 9. f10BgpM2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if (get_ip_version($peer_ip))\n {\n $peer['f10BgpM2PeerRemoteAddr'] = $peer_ip;\n }\n break;\n\n }\n\n}", "protected function retriveItem($index) {}", "abstract public function item( $idx );", "public function testResolveWithKey()\n {\n $testObject = SourceDataHelper::getDataNamedL1();\n\n $pathVariants = ['getAllObjects/my_value_2/getName', 'allObjects/my_value_2/name', 'objects/my_value_2/myName'];\n foreach ($pathVariants as $pathVariant) {\n $resolverItems = new ItemCollection([\n new Item($testObject),\n new Item($testObject)\n ], FALSE);\n $resolverItems->resolve($pathVariant);\n $this->assertEquals([\n 'test my_value_2',\n 'test my_value_2'\n ], $resolverItems->getValue());\n }\n }", "public function testResolveWithGetMethodWithIntParameter()\n {\n\n // With Numeric parameter\n $testObject = SourceDataHelper::getDataIndexedL1();\n $resolverItems = new ItemCollection([\n new Item($testObject),\n new Item($testObject)\n ], FALSE);\n\n $pathVariants = [\n ['path' => 'getOneObject(1)/getName', 'expected_value' => 'test 1'],\n ['path' => 'getOneObject(10)/getName', 'expected_value' => NULL]\n ];\n foreach ($pathVariants as $pathVariant) {\n $resolverItems->resolve($pathVariant['path']);\n $this->assertEquals([\n $pathVariant['expected_value'],\n $pathVariant['expected_value']\n ], $resolverItems->getValue());\n }\n }", "public function apply($index);", "public function offsetGet($index) : mixed\n {\n foreach ((array)$this as $i => $element) {\n $i = (string)$i;\n if (is_string($element)) {\n continue;\n }\n if ($element instanceof Label\n && ($element->getElement()->name() == $index\n || $i == $index\n )\n ) { \n return $element;\n }\n if ($element->name() == $index || $i == $index) {\n return $element;\n }\n if ($element instanceof Element\\Group\n and $found = $element[$index]\n ) {\n return $found;\n }\n }\n return null;\n }", "public function bindings(): void\n {\n $this->bind(static::TAG_WILDCARD, function ($uuid) {\n return Blog::makeModel('tag')\n ->newQuery()\n ->where('uuid', '=', $uuid)\n ->firstOrFail();\n });\n }", "public function switchIndexAlias() {}", "public function itemAt($index) {}", "function sessionModelValue($model_name, $index)\n {\n $model = $this->sessionModel($model_name);\n if ($model->values) {\n $value = $model->values[$index];\n return $value;\n }\n }", "private function doBinding(&$field, $binds) {\n foreach($field as $key => &$value) {\n if (strpos($value, self::SPECIAL_PREFIX) === 0) {\n $matches = [];\n if (preg_match('/^!bind\\( *(\\w+) *\\)$/', $value, $matches)) {\n if (array_key_exists($matches[1], $binds)) {\n $value = $binds[$matches[1]];\n } else {\n throw new MyRadioException(\n 'Tried to !bind to unbound form variable: ' . $matches[1] . '.'\n );\n }\n }\n // Recursively bind\n if (is_array($value)) {\n $this->doBinding($value, $binds);\n }\n }\n }\n }", "public final function readMetaDataIndex(ModelInterface $model, $index) {}", "public function get(int $index);", "public final function readColumnMapIndex(ModelInterface $model, $index) {}", "public function getParamValue($index);", "public function isBoundAtModel( $model = null, $alias = null ) {\n\t\t$node = $this->findNode( $model, $alias, null, false );\n\t\tif ( $node )\n\t\t\treturn $node->isBound();\n\n\t\treturn false;\n\t}", "function offsetGet ($index)\n\t{\n\t\tif (isset($this->meta[$index]))\n\t\t{\n\t\t\treturn $this->meta[$index];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Offset by PK.\n\t\t\t$records = $this->records();\n\t\t\t\n\t\t\tif ($record =& $records[$index])\n\t\t\t{\n\t\t\t\treturn $record;\n\t\t\t}\n\t\t\t// Offset by Slug.\n\t\t\telse if ($model = $this->model())\n\t\t\t{\n\t\t\t\tif ($model->slug_pk)\n\t\t\t\t{\n\t\t\t\t\tforeach ((array)$records as $pk => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($val[$model->slug_pk] === $index)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$record =& $records[$pk];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $record;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function objectValueForRepeaterAtRowIndex(Repeater $repeater, $rowIndex);", "public function addBinding($value, Model $model)\n {\n //\n }", "abstract public function bind(array $binding);", "function rawGet($index) {\r\n\t\treturn array_key_exists($index, $this->uriArray) ? $this->uriArray[$index] : null;\r\n\t}", "public function bindingToLocalId( $binding )\n\t{\n\t\t$binding = array_values( $binding );\n\n\t\t$index = 1;\n\t\tforeach ( $this->_getAvailables() as $info )\n\t\t\tif ( $binding == array_values( $info['data'] ) )\n\t\t\t\treturn $index;\n\t\t\telse\n\t\t\t\t$index++;\n\n\t\tthrow new \\InvalidArgumentException( 'invalid item ID' );\n\t}", "function bind($bindLocalProperty, $bindToObject, $bindToKeyPath, $options = NULL)\n {\n // determine if $bindLocalProperty is a multi-value binding and, if so, figure out the \"base\" property\n $baseLocalProperty = $bindLocalProperty;\n $matches = array();\n if (preg_match('/(.*)[0-9]+$/', $bindLocalProperty, $matches) == 1)\n {\n $baseLocalProperty = $matches[1];\n }\n // does this property exist? Easy to test as valueForKey will THROW if DNE...\n $exposedBindings = $this->exposedBindings();\n if (!isset($exposedBindings[$baseLocalProperty])) throw( new WFException(\"Cannot bind property '{$bindLocalProperty}' because it is not a property of object '\" . get_class($this) . \"' (instanceId: \" . $this->id() . \").\"));\n\n // is the bindToObject an object? ideally we'd check to be sure it's KVC compliant, but for now just make sure it's an object.\n if (!is_object($bindToObject)) throw( new WFException(\"The bindToObject (for '\" . get_class($this) . \"::{$bindLocalProperty}') must be a Key-Value Coding Compliant object.\") );\n\n // is the property already bound?\n if (isset($this->bindings[$bindLocalProperty])) throw( new WFException(\"Cannot bind property '$bindLocalProperty' because it is already bound to \" . get_class($this->bindings[$bindLocalProperty]->bindToObject()) . \" with keyPath '\" . $this->bindings[$bindLocalProperty]->bindToKeyPath() . \"'.\") );\n\n $binding = new WFBinding();\n $binding->setBindToObject($bindToObject);\n $binding->setBindToKeyPath($bindToKeyPath);\n $binding->setBindLocalProperty($bindLocalProperty);\n\n $binding->setBindingSetup($exposedBindings[$baseLocalProperty]);\n\n // Save options\n if (is_null($options))\n {\n $options = array();\n }\n $binding->setOptions($options);\n\n // add to bindings list for this object\n $this->bindings[$bindLocalProperty] = $binding;\n }", "function getItemElbyIndex($index)\r\n { \r\n $root= $this->mStoreHouseDOM->documentElement->getElementsByTagName(\"item\");\r\n $newItem=$root->item($index);\r\n $this->setItem($newItem);\r\n }", "abstract public function getObjectDataForIndex($index);", "final protected static function resolveRef($key, array &$result, $nodeName) {\r\n // reference doesn't exist in result; nothing to do here.\r\n if (!array_key_exists($key, $result)\r\n // only continue if value exists\r\n || empty($result[$key])) return;\r\n\r\n $refValue = $result[$key];\r\n // only get reference if not already gotten\r\n if (!array_key_exists($key, self::$resolvedRefs)\r\n || !array_key_exists($refValue, self::$resolvedRefs[$key])) {\r\n global $NodeToClass, $DEFAULT_PROCESSOR;\r\n // get app node class\r\n $NodeClass = $NodeToClass(self::getNamespace(), $nodeName);\r\n // use default processor if app node class doesn't exist\r\n if (!class_exists($NodeClass)) $NodeClass = $DEFAULT_PROCESSOR;\r\n // store current class refs\r\n $refs = self::$resolvedRefs;\r\n // empty refs\r\n self::$resolvedRefs = [];\r\n // set the node name\r\n $NodeClass::setNode($nodeName);\r\n // resolve ref\r\n $resolved = $NodeClass::selectNode()->find([\r\n '_id' => [\r\n '$in' => array_map(function($id) {\r\n return self::createGUID($id);\r\n }, (array) $refValue),\r\n ]\r\n ]);\r\n // restore current class refs\r\n self::$resolvedRefs = $refs;\r\n // add resolved ref\r\n if (is_string($refValue))\r\n self::$resolvedRefs[$key][$refValue] = $resolved->toArray();\r\n else {\r\n if (!array_key_exists($key, self::$resolvedRefs))\r\n self::$resolvedRefs[$key] = $resolved->toArray();\r\n else\r\n self::$resolvedRefs = array_merge(self::$resolvedRefs, $resolved->toArray());\r\n }\r\n }\r\n // add the reference to the result\r\n $result[config('global.mongo.dataRefKey')][$key] = is_string($refValue) ?\r\n // requires only one document\r\n self::$resolvedRefs[$key][$refValue][0] :\r\n // requires multiple documents\r\n self::$resolvedRefs[$key];\r\n }", "private function extractProperty($data,$index,$name) {\t\t\t\t\t\t\n\t\t\tif (isset($data['Attribute'][$index]['@attributes']) && $data['Attribute'][$index]['@attributes']['name'] == $name) {\n\t\t\t\treturn $data['Attribute'][$index]['@attributes']['value'];\n\t\t\t}\n\t\t}", "public function testIndexItemWithWrongSearchableValues()\n {\n $itemUUID = ItemUUID::createByComposedUUID('6~product');\n $item = Item::create(\n $itemUUID,\n [],\n [],\n [\n 'engonga' => [\n '0',\n '',\n 'engonga',\n ],\n ],\n [\n '0',\n '',\n 'engonga',\n ]\n );\n $item = Item::createFromArray($item->toArray());\n $this->indexItems([$item]);\n\n $item = $this->query(\n Query::createByUUID($itemUUID)\n )->getFirstItem();\n\n $this->assertEquals(\n ['engonga'],\n $item->getSearchableMetadata()['engonga']\n );\n\n $this->assertEquals(\n ['engonga'],\n $item->getExactMatchingMetadata()\n );\n\n $this->resetScenario();\n }", "function isIndex($node)\n{\n foreach ($node->attributes() as $name => $value) {\n if ($name === 'index' && strval($value[0]) === 'true') {\n return true;\n }\n }\n\n return false;\n}", "public function find(SearchIndex $index): Settings;", "public function findNodeByIndex($index) {\n\n $current = $this->firstNode;\n\n for ($i = 0; $this->counter; $i++) {\n\n if ($i == $index) {\n return $current->info;\n }\n\n if ($current->next == null) {\n return;\n }\n\n $current = $current->next;\n }\n }", "public function testResolverQueryWithAny2levelB()\n {\n $resolverItems = new ItemCollection(SourceDataHelper::getDataNamedL2());\n\n $expectedValue = [\n 'my_value_1_1',\n 'my_value_1_2',\n 'my_value_1_3',\n 'my_value_1_4',\n 'my_value_1_5',\n 'my_value_2_1',\n 'my_value_2_2',\n 'my_value_2_3',\n 'my_value_2_4',\n 'my_value_2_5',\n 'my_value_3_1',\n 'my_value_3_2',\n 'my_value_3_3',\n 'my_value_3_4',\n 'my_value_3_5',\n ];\n\n $resolverItems->resolve('getAllObjects/%any/getAllObjects/%any/%key');\n\n\n $this->assertEquals(\n $expectedValue, $resolverItems->getValue()\n );\n\n }", "public function find($index)\r\n\r\n {\r\n\r\n return $this->findOneBy(array($this->index => $index));\r\n\r\n }", "protected function changeIndexDatasource() {\n /** @var $index \\Drupal\\search_api\\Index\\IndexInterface */\n $index = entity_load('search_api_index', $this->indexId, TRUE);\n $index->reindex();\n\n $tracked_items = $this->countTrackedItems();\n $user_count = \\Drupal::entityQuery('user')->count()->execute();\n $node_count = \\Drupal::entityQuery('node')->count()->execute();\n\n // Go to the index edit path\n $settings_path = 'admin/config/search/search-api/index/' . $this->indexId . '/edit';\n $this->drupalGet($settings_path);\n // enable indexing of users\n $edit = array(\n 'status' => TRUE,\n 'datasource_configs[entity:node][default]' => 0,\n 'datasource_configs[entity:node][bundles][article]' => TRUE,\n 'datasource_configs[entity:node][bundles][page]' => TRUE,\n 'datasources[]' => array('entity:user', 'entity:node'),\n );\n $this->drupalPostForm(NULL, $edit, t('Save'));\n\n $tracked_items = $this->countTrackedItems();\n $t_args = array(\n '!usercount' => $user_count,\n '!nodecount' => $node_count,\n );\n $this->assertEqual($tracked_items, $user_count+$node_count, t('After enabling user and nodes with respectively !usercount users and !nodecount nodes we should have the sum of those to index', $t_args));\n\n $this->drupalGet($settings_path);\n // Disable indexing of users\n $edit = array(\n 'datasources[]' => array('entity:node'),\n );\n $this->drupalPostForm(NULL, $edit, t('Save'));\n\n $tracked_items = $this->countTrackedItems();\n $t_args = array(\n '!nodecount' => $node_count,\n );\n $this->assertEqual($tracked_items, $node_count, t('After disabling user indexing we should only have !nodecount nodes to index', $t_args));\n }", "function searchElementByIndex($index, string $tableName)\n {\n $tempTable = $this->determineTable($tableName);\n for ($i = 0; $i < sizeof($tempTable); $i++) {\n if ($index == $i) {\n return $tempTable[$i];\n }\n }\n }", "public function __get($index) {\n\t\t\n\t\tif ($this->_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn $this->_callAdapter(get_class(), __FUNCTION__, $index);\n\t\t\n\t\t$index = $this->_applyFilter(get_class(), __FUNCTION__, $index, array('event' => 'args'));\n\t\t\n\t\tif ($this -> _collection === null) {\n\t\t\t$this -> _collection = new PVCollection();\n\t\t}\n\t\t\n\t\t$value = $this -> _collection -> get($index);\n\t\t\n\t\t$this->_notify(get_class() . '::' . __FUNCTION__, $value, $index);\n\t\t$value = $this->_applyFilter(get_class(), __FUNCTION__, $value, array('event' => 'return'));\n\t\t\n\t\treturn $value;\n\t}", "function hook_search_api_solr_field_mapping_alter(\\Drupal\\search_api\\IndexInterface $index, array &$fields) {\n if (in_array('entity:node', $index->getDatasourceIds()) && isset($fields['entity:node|body'])) {\n $fields['entity:node|body'] = 'tm_entity$node|body_value';\n }\n}", "static function model($alias, $node = null) {\n if (isset(static::$models[$alias]))\n return static::$models[$alias];\n if ($node === null || !is_object($node))\n return false;\n return static::$models[$alias] = $node;\n }", "public function get(int $index)\n {\n }", "function getItem($index);", "function getItem($index);", "public function get($index) {}", "public function filter_by_at(Node $item, $index, $value)\n\t{\n\t\treturn $index == $value;\n\t}", "public function get($index = NULL, $xss_clean = FALSE) {\n\t\t$value = parent::get($index, $xss_clean);\n\n\t\tif (! $value && $this->_expath && isset($this->_expath[$index])) {\n\t\t\t$value = $this->_expath[$index];\n\t\t}\n\n\t\treturn $value;\n\t}", "public function bind($key, $value) {\n if (!array_key_exists($key, $this->values)) {\n throw new XPathQueryException(\"'$key' not found in query'\", XPathQueryException::KeyNotFound );\n }\n $this->values[$key] = $value;\n }", "static function bind ( &$a, $val, $type )\n{\n$key = ':binding_'.count( $a );\n$a[] = array(\n'key' => $key,\n'val' => $val,\n'type' => $type\n);\nreturn $key;\n}", "public function getElement($indexOrName);", "public function resolve($key)\n{\n if(isset($this->bindings[$key])){\n //call_user_func is used to call the funcytion during runtime\n return call_user_func($this->bindings[$key]);\n }\n}", "protected function getRawIndexedVar($name, $index) {\n\t\tif (!isset($this->props[$name]) || !is_array($this->props[$name])) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ($index >= count($this->props[$name])) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->props[$name][$index];\n\t}", "public function testResolverQueryConsiderModifier3()\n {\n\n $testObject = SourceDataHelper::getDataIndexedL2();\n\n $expected = [\n [\n 'value' => 'ID#1',\n 'id' => '~myId'\n ],\n [\n 'value' => 'ID#2',\n 'id' => '~myId2'\n ],\n [\n 'value' => 'ID#3',\n 'id' => '~myId3'\n ],\n [\n 'value' => 'ID#4',\n 'id' => NULL\n ],\n\n ];\n\n $collect = [];\n\n $resolverItems = new ItemCollection($testObject);\n $resolverItems->resolve([\n 'getAllObjects/#0' => [\n '~myId:getAllObjects/#0/myId',\n '~myId2:getAllObjects/#1/myId',\n '~myId3:getAllObjects/#2/myId',\n\n // Case of a path without path-id.\n 'getAllObjects/#3/myId',\n\n // Case of a multi-valued function\n '~myId5:getAllObjects/%any/myId',\n\n '?call' => function ($value, $id, $itemAccessor, $allItems) use (&$collect) {\n $collect[] = [\n 'value' => $value,\n 'id' => $id,\n 'itemAccessor' => $itemAccessor,\n 'allItems' => $allItems,\n ];\n },\n ],\n\n ]);\n\n $this->assertEquals(4, count($collect));\n foreach ($collect as $index => $collectedItem) {\n $this->assertEquals($expected[$index]['value'], $collectedItem['value']);\n $this->assertEquals($expected[$index]['id'], $collectedItem['id']);\n $this->assertTrue($collectedItem['itemAccessor'] instanceof ItemAccessor);\n $this->assertEquals(5, count($collectedItem['allItems']));\n $this->assertTrue($collectedItem['allItems']['~myId'] instanceof ItemAccessor);\n $this->assertTrue($collectedItem['allItems']['~myId2'] instanceof ItemAccessor);\n $this->assertTrue($collectedItem['allItems']['~myId3'] instanceof ItemAccessor);\n $this->assertTrue($collectedItem['allItems'][0] instanceof ItemAccessor);\n $this->assertTrue($collectedItem['allItems']['~myId5'] === NULL);\n }\n\n }", "public function &getByReference($index = null)\n {\n return $this->do(function &(&$element) {\n return $element;\n }, $index);\n }", "public function all($model=\"\", $query = \"\", $key=\"\", $index=\"\", $type=\"\");", "public function addBinding($value, Model $model)\n {\n if (empty($value)) {\n return;\n }\n\n $model->whereIn($this->getColumnName(), $value);\n }", "function pixelgarage_proximity_ajax_render_item_alter($container_index, $param, &$render_item) {\n // return the render array for the specific node, if available\n if ($node= node_load($param)) {\n $view_mode = 'full';\n if (property_exists($node, 'ds_switch')) {\n // take an alternate view mode set by the ds switch\n $view_mode = $node->ds_switch;\n }\n $render_item = node_view($node, $view_mode);\n }\n}", "protected function addDynamic($segment, $connector, $parameters, $index)\n {\n // Once we have parsed out the columns and formatted the boolean operators we\n // are ready to add it to this query as a where clause just like any other\n // clause on the query. Then we'll increment the parameter index values.\n $bool = strtolower($connector);\n\n $this->where(Str::snake($segment), '=', $parameters[$index], $bool);\n }", "public function offsetSet($index, $item) \n\t{\n\t\t$this->beforeAttach($item);\n\t\t\n\t\tparent::offsetSet($index, $item);\n\t}", "public function bindModel( $model )\n\t{\n\t\tif( $this->getContent() )\n\t\t{\n\t\t\tforeach( $this->getContent() as $c )\n\t\t\t{\n\t\t\t\t$c->bindModel( $model );\n\t\t\t}\n\t\t}\n\t}", "public function testUpdateAlias()\n {\n $alias = 'alias1';\n $index = 'index1';\n\n $params['body']['actions'][] = ['add' => ['alias' => $alias, 'index' => $index]];\n\n $this->indicesMock->expects($this->once())\n ->method('updateAliases')\n ->with($params);\n $this->model->updateAlias($alias, $index);\n }", "public function binding(array $bindings): Driver;", "public function getChildNode($index) {}", "public function get($index)\n {\n $result = array_slice($this->nodes, $index, 1); // note: index can be negative\n if (count($result) > 0) {\n return $result[0];\n } else {\n return null; // return null if no result for key\n }\n }", "public function ajax_save_optional_labels(){\n\t\t$alias = $_REQUEST['alias'];\n\t\t$source = $_REQUEST['source'];\n\t\t$index = $_REQUEST['index'];\n\n\t\tforeach( $this->layouts_manager_options['layouts'][$alias]['body_structure'] as $key_row => $value_row) {\n\t\t\tforeach( $value_row as $key_col => $value_col) {\n\t\t\t\tforeach( $value_col['content_elements'] as $key_el => $value_el) {\n\t\t\t\t\tif($alias.'_'.$key_row.'_'.$key_col.'_'.$key_el == $index) {\n\t\t\t\t\t\t$this->layouts_manager_options['layouts'][$alias]['body_structure'][$key_row][$key_col]['content_elements'][$key_el]['content_source'] = $source;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tupdate_option($this->option_key, $this->layouts_manager_options);\n\t\tdie();\n\t}", "public function testAfterFindIntegerValue() {\n\t\t\n\t\t$results = array(\n\t\t\tarray(\n\t\t\t\t$this->TestModel->alias => array(\n\t\t\t\t\t'test_numeric' => 100\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->TestModel\n\t\t\t->expects($this->at(0))\n\t\t\t->method('getColumnType')\n\t\t\t->with('test_numeric')\n\t\t\t->will($this->returnValue('integer'));\n\t\t\t\n\t\t$this->assertEquals(\n\t\t\t$results,\n\t\t\t$this->DataTypeJuggling->afterFind($this->TestModel, $results, true)\n\t\t);\n\t\t\n\t}", "public function getDataCellValue($model, $key, $index){\n\t\tif ($this->value !== null) {\n if (is_string($this->value)) {\n\t\t\t\treturn ArrayHelper::getValue($model, $this->attribute);\n }\n\n\t\t\treturn call_user_func($this->value, $model, $key, $index, $this);\n\n\t\t} elseif ($this->attribute !== null) {\n\t\t\t\n\t\t\t$val=ArrayHelper::getValue($model, $this->attribute);\n\t\t\t\n\t\t\tif($this->editable){\n\t\t\t\t$this->format='raw';\n\t\t\t\t$uniqId=uniqid();\n\t\t\t\tif(isset($val) && $val!=''){\n\t\t\t\t\t$clickMe='';\n\t\t\t\t} else {\n\t\t\t\t\t$clickMe='<span id=\"jzdc_empty_id_'.$uniqId.'\" class=\"'.$this->emptyCssClass.'\" onclick=\"jzDataColumnTextEdit(\\''.$uniqId.'\\',\\''.$this->attribute.'\\',\\''.$key.'\\',\\''.$this->editUrl.'\\',\\''.$this->loaderPath.'\\');\" onmouseover=\"$(this).css(\\'text-decoration\\',\\'underline\\');\" onmouseout=\"$(this).css(\\'text-decoration\\',\\'none\\');\" style=\"cursor:pointer;\">'.$this->emptyLabel.'</span>';\n\t\t\t\t}\t\t\t\t\n return '<span id=\"jzdc_title_id_'.$uniqId.'\" onclick=\"jzDataColumnTextEdit(\\''.$uniqId.'\\',\\''.$this->attribute.'\\',\\''.$key.'\\',\\''.$this->editUrl.'\\',\\''.$this->loaderPath.'\\');\" onmouseover=\"$(this).css(\\'text-decoration\\',\\'underline\\');\" onmouseout=\"$(this).css(\\'text-decoration\\',\\'none\\');\" style=\"cursor:pointer;\">'.$val.'</span>'.$clickMe.' <span id=\"jzdc_info_id_'.$uniqId.'\" class=\"'.$this->infoCssClass.'\"></span>'.Html::input('text','jzdc_input_'.$uniqId,$val,['id'=>'jzdc_input_id_'.$uniqId,'maxlength'=>$this->editMaxLen, 'class'=>$this->editCssClass, 'style'=>'display:none;']).'&nbsp;&nbsp;&nbsp;&nbsp;<span id=\"jzdc_save_id_'.$uniqId.'\" class=\"'.$this->saveCssClass.'\" style=\"display:none;\" onclick=\"jzDataColumnTextSave(\\''.$uniqId.'\\',\\''.$this->attribute.'\\',\\''.$key.'\\',\\''.$this->editUrl.'\\',\\''.$this->loaderPath.'\\');\">'.$this->saveLabel.'</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id=\"jzdc_deny_id_'.$uniqId.'\" class=\"'.$this->denyCssClass.'\" style=\"display:none;\" onclick=\"jzDataColumnTextDeny(\\''.$uniqId.'\\');\">'.$this->denyLabel.'</span>';\n\t\t\t} else {\n\t\t\t\treturn $val;\n\t\t\t}\n }\n\n return null;\n }", "public function get($index, $flag = self::NOT_FOUND_GRACEFULLY, $default = null, $stack_name = 'global');", "public public function bindModel($models, $reset = true) {\r\nforeach ($models as $type => $data) {\r\nforeach ($data as $key => $properties) {\r\nlist($alias, $properties) = $this->map($key, $properties);\r\nif (property_exists($this, $alias)) {\r\nunset($this->{$alias});\r\n}\r\n}\r\n}\r\nreturn parent::bindModel($models, $reset);\r\n}" ]
[ "0.5991248", "0.5772905", "0.5383499", "0.5370075", "0.5164318", "0.51349336", "0.4807412", "0.47985926", "0.47975782", "0.4785949", "0.47227764", "0.4688625", "0.46561506", "0.46538115", "0.46390283", "0.4614539", "0.45880938", "0.45851913", "0.45681897", "0.45555758", "0.45017892", "0.44996616", "0.44929054", "0.44739562", "0.44639242", "0.44583976", "0.44428575", "0.44301364", "0.4417914", "0.44161448", "0.44158983", "0.43894935", "0.4388714", "0.43779072", "0.43653286", "0.43619737", "0.43496826", "0.43461448", "0.43457267", "0.4333118", "0.4312092", "0.429305", "0.42877755", "0.42755437", "0.42736712", "0.42708582", "0.42706418", "0.42704874", "0.4267692", "0.42462605", "0.42335373", "0.42329943", "0.4225519", "0.42197022", "0.41986537", "0.4197815", "0.41977337", "0.41829085", "0.4173176", "0.4166278", "0.41632408", "0.41604522", "0.4151237", "0.4136798", "0.4120623", "0.41157526", "0.41121978", "0.41113263", "0.41100505", "0.41066542", "0.4106369", "0.4100994", "0.40974218", "0.40964422", "0.40964422", "0.40939295", "0.4093254", "0.40891156", "0.40881956", "0.40871134", "0.40753442", "0.40705547", "0.40252993", "0.4023291", "0.4013548", "0.40083435", "0.4004251", "0.4003414", "0.39995846", "0.3998603", "0.39636254", "0.39623538", "0.39602715", "0.3943095", "0.39405102", "0.3936864", "0.39319313", "0.39306325", "0.39299834", "0.39263037" ]
0.7157841
0
Retrieves conditions describing all currently bound nodes. The resulting array includes element for each binding of nodes in current relation (containing up to two elements per node). Every element consist of element 'filter' giving SQLlike condition with parameter markers and element 'values' containing values to bind as parameters accordingly.
Возвращает условия, описывающие все текущие привязанные узлы. Результирующий массив включает элемент для каждой привязки узлов в текущем отношении (до двух элементов на узел). Каждый элемент состоит из элемента 'filter', предоставляющего SQL-подобное условие с маркерами параметров, и элемента 'values', содержащего значения для привязки в качестве параметров соответственно.
public function getConditionOnBoundNodes() { if ( !$this->isComplete() ) throw new \RuntimeException( 'relation is not complete' ); $conditions = array(); foreach ( $this->nodes as $node ) { /** @var model_relation_node $node */ $state = $node->isBound( null ); if ( $state & model_relation_node::BINDING_PREDECESSOR ) $conditions[] = array( 'filter' => implode( ' AND ', array_map( function( $p ) { return "$p=?"; }, $node->getPredecessorNames( $this->datasource, true ) ) ), 'values' => $node->getPredecessorValues(), ); if ( $state & model_relation_node::BINDING_SUCCESSOR ) $conditions[] = array( 'filter' => implode( ' AND ', array_map( function( $p ) { return "$p=?"; }, $node->getSuccessorNames( $this->datasource, true ) ) ), 'values' => $node->getSuccessorValues(), ); } return $conditions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConditions()\n {\n $inputs = $this->inputs();\n\n if (empty($inputs)) {\n return [];\n }\n\n if ($this->conditions !== null) {\n return $this->conditions;\n }\n\n $params = [];\n\n foreach ($inputs as $key => $value) {\n Arr::set($params, $key, $value);\n }\n\n $conditions = [];\n\n foreach ($this->filters() as $filter) {\n $conditions[] = $filter->condition($params);\n }\n\n return tap(array_filter($conditions), function ($conditions) {\n if (! empty($conditions)) {\n if ($this->expand === null || $this->mode !== static::MODE_RIGHT_SIDE) {\n $this->expand();\n }\n\n $this->grid()->fireOnce(new ApplyFilter([$conditions]));\n\n $this->grid()->model()->disableBindTreeQuery();\n }\n\n $this->conditions = $conditions;\n });\n }", "public function getConditions() {\n\t\t$sql='';\n\t\tforeach($this->conditions as $table=>$fields) {\n\t\t\t\n\t\t\t$tbl = $this->getTablePh($table);\n\t\t\tif(empty($tbl)) $tbl = $table;\n\t\t\tif(!empty($tbl)) $tbl .= \".\";\n\t\t\t\n\t\t\tforeach($fields as $field=>$conditions) {\n\t\t\t\tforeach($conditions as $condition) {\n\t\t\t\t\tif(!empty($sql)) $sql.=\" AND \";\n\t\t\t\t\tif($condition[0] == 'IN') $cond = $condition[1]; else $cond = sdb::quote($condition[1]);\n\t\t\t\t\t$sql.=\"{$tbl}{$field} {$condition[0]} {$cond}\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($this->conditionSql as $statement) {\n\t\t\tif(!empty($sql)) $sql .= \" AND \";\n\t\t\t$sql .= \" $statement \";\n\t\t}\n\t\t\n\t\tif($sql) return \" WHERE ($sql) \";\t\t\n\t}", "public function getConditions(): array {\n return $this->conditions;\n }", "public function getConditions()\n\t{\n\t\t$conditions = clone $this->conditions;\n\t\tforeach ($this->fields as $field) {\n\t\t\t$conditions->merge($field->getConditions());\n\t\t}\n\t\t\n\t\treturn $conditions;\n\t}", "public function statementConditions()\n {\n // If there are no conditions, return back\n if (count($this->_whereConditions) == 0) { return; }\n\n $sqlStatement = '';\n foreach ($this->_whereConditions as $condition) {\n // Build where clause based on operator\n switch ($condition['operator']) {\n case 'IN':\n $sqlWhere = $condition['column'] . ' IN(' . join(', ', array_fill(0, count($condition['values']), '?')) . ')';\n break;\n case 'BETWEEN':\n $sqlWhere = $condition['column'] . ' BETWEEN ' . join(' AND ', array_fill(0, count($condition['values']), '?'));\n break;\n case 'IS NULL':\n $sqlWhere = $condition['column'] . ' IS NULL';\n break;\n case 'IS NOT NULL':\n $sqlWhere = $condition['column'] . ' IS NOT NULL';\n break;\n default:\n $sqlWhere = $condition['column'] . ' ' . $condition['operator'] . ' ?';\n }\n\n // If statement has already been started, precede next where with its type separator\n if ($sqlStatement != '') { $sqlStatement .= ' ' . $condition['type'] . ' '; }\n $sqlStatement .= $sqlWhere;\n\n // If values is not an array, just push to boundParams\n if (!is_array($condition['values'])) {\n $this->_boundParams[] = $condition['values'];\n } else {\n // Loop through each value and push to boundParams\n foreach ($condition['values'] as $value) {\n if ($condition['operator'] != 'IS NULL' && $condition['operator'] != 'IS NOT NULL') {\n $this->_boundParams[] = $value;\n }\n }\n }\n }\n\n return ($sqlStatement != '') ? ' WHERE ' . $sqlStatement : '';\n }", "public function getConditions()\n {\n return array_merge(\n array_values($this->baseConditions),\n array_values($this->conditions)\n );\n }", "public function getConditions(): Collection\n {\n return collect($this->conditions);\n }", "public function getConditions()\n {\n return $this->_conditions;\n }", "public function getConditions()\n {\n return $this->conditions;\n }", "public function getConditions()\n {\n return $this->conditions;\n }", "public function getConditions() {\n return $this->conditions;\n }", "public function filteredWhereConditions() {\n $filter = [];\n return $filter;\n }", "protected function getConditions() {\n\t\t$reportFields = $this->getReportableFields();\n\t\t$fields = $this->ConditionFields->getValues();\n\t\tif (!$fields || !count($fields)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$ops = $this->ConditionOps->getValues();\n\t\t$vals = $this->ConditionValues->getValues();\n\n\t\t$filter = array();\n\t\tfor ($i = 0, $c = count($fields); $i < $c; $i++) {\n\t\t\t$field = $fields[$i];\n\t\t\tif (!$ops[$i] || !$vals[$i]) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$op = $ops[$i];\n\t\t\tif (!isset(self::$allowed_conditions[$op])) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$val = $vals[$i];\n\n\t\t\tif ($op == 'IN') {\n\t\t\t\t$val = explode(',', $val);\n\t\t\t}\n\n\t\t\t$filter[$field . ' ' . $op] = $val;\n\t\t}\n\n\t\treturn singleton('FRUtils')->dbQuote($filter);\n\t}", "public function compileConditionsProvider(): array\n {\n return [\n [[], []],\n [\n [\n ['Name', 'Test Value', '=='],\n ],\n ['where' => 'Name==\"Test Value\"'],\n ],\n [\n [\n ['Name', 'Test Value', '=='],\n ['Code', '2', 'StartsWith'],\n ],\n ['where' => 'Name==\"Test Value\" Code.StartsWith(\"2\")'],\n ]\n ];\n }", "private function getFilteredQueryConditions($params)\n{\n\t$conditions = array();\n\t$lease_range_OR = array();\n\tif ($params['fall'] == \"true\")\n\t\tarray_push($lease_range_OR, 'fall');\n\tif ($params['spring'] == \"true\")\n\t\tarray_push($lease_range_OR, 'spring');\n\tif ($params['other'] == \"true\")\n\t\tarray_push($lease_range_OR, 'other');\n\n\t$unit_type_OR = array();\n\tif ($params['house'] == \"true\")\n\t\tarray_push($unit_type_OR, 'house');\n\tif ($params['apt'] == \"true\")\n\t\tarray_push($unit_type_OR, 'apt');\n\tif ($params['duplex'] == \"true\")\n\t\tarray_push($unit_type_OR, 'duplex');\n\tarray_push($unit_type_OR, 'greek');\n\tarray_push($unit_type_OR, 'dorm');\n\n\n\tif (count($lease_range_OR) > 0)\n\t{\n\t\tarray_push($conditions, array('OR' => array(\n\t\t\t'Listing.lease_range' => $lease_range_OR)));\n\t}\t\n\telse\n\t\tarray_push($conditions, array('OR' => array(\n\t\t\t'Listing.lease_range' => 'NONE')));\n\t\t\t// Without this, all lease ranges would be returned when all check boxes are unchecked\n\n\tarray_push($conditions, array('OR' => array(\n\t\t'Listing.unit_type' => $unit_type_OR)));\n\n\tarray_push($conditions, array(\n\t\t'Listing.rent >=' => $params['minRent'],\n\t\t'Listing.rent <=' => $params['maxRent'],\n\t\t'Listing.beds >=' => $params['minBeds'],\n\t\t'Listing.beds <=' => $params['maxBeds']));\n\n\treturn $conditions;\n}", "public static function getConditionsHook()\n\t{\n\t\t$conditions = array();\t\n\n\t\t$conditions['select'] = '*';\n\n\t\t$conditions['where'] = array();\n\n\t\treturn $conditions;\t\n\t}", "public function getWhereGroups(): array\n {\n return $this->where;\n }", "public function getAllConditions(){\n\t\t//http://developer.ebay.com/DevZone/XML/docs/reference/ebay/GetCategoryFeatures.html\n\t\t$requestXML = \"<?xml version='1.0' encoding='utf-8'?>\";\n\t\t$requestXML .= \"<GetCategoryFeaturesRequest xmlns='urn:ebay:apis:eBLBaseComponents'>\";\n\t\t $requestXML .= \"<RequesterCredentials>\";\n\t\t\t$requestXML .= \"<eBayAuthToken>\".$this->getToken().\"</eBayAuthToken>\";\n\t\t $requestXML .= \"</RequesterCredentials>\";\n\t\t $requestXML .= \"<WarningLevel>High</WarningLevel>\";\n\t\t $requestXML .= \"<ViewAllNodes>True</ViewAllNodes>\";\n\t\t $requestXML .= \"<DetailLevel>ReturnAll</DetailLevel>\";\n\t\t $requestXML .= \"<FeatureID>ConditionValues</FeatureID>\";\n\t\t$requestXML .= \"</GetCategoryFeaturesRequest>\";\n\t\treturn $requestXML;\n\t}", "public static function internalAndWhere()\n {\n $query = [];\n\n foreach (static::fieldStateDescriber() as $field => $value) {\n $query[static::tableName().'.'.$field] = is_array($value) ? $value[1] : !$value;\n }\n\n return $query;\n }", "public function getConditions();", "public function getConditions();", "public function getConditions();", "public function compileConditions(Builder $query)\n {\n if (empty($query->wheres)) {\n return [];\n }\n\n $key = $query->getWhereAs();\n\n return [\n $key => preg_replace('/^where\\s/', '', $this->compileWheres($query))\n ];\n }", "public function buildQueryWhere()\r\n\t{\r\n\t\t$filters = array();\r\n\t\t$listModels = $this->getlistModels();\r\n\r\n\t\tforeach ($listModels as $listModel)\r\n\t\t{\r\n\t\t\t$filters[$listModel->getId()] = $listModel->buildQueryWhere();\r\n\t\t}\r\n\r\n\t\treturn $filters;\r\n\t}", "public function get_where ()\n {\n $where = '';\n foreach ($this->where as $w)\n {\n if (is_string($w))\n {\n $where .= $w;\n }\n elseif (is_object($w) && is_callable([$w, 'get_where']))\n {\n $subwhere = $w->get_where();\n $where .= '(' . $subwhere[0] . ')';\n foreach ($subwhere[1] as $k => $v)\n {\n $this->wdata[$k] = $v;\n }\n }\n }\n $wdata = $this->wdata;\n return [$where, $wdata];\n }", "protected function criteria() {\n\t\t$where = array();\n\t\tforeach ($this->getIdentity() as $col => $val) {\n\t\t\tif (isset($val)) {\n\t\t\t\t$where[\"$col=\"] = $val;\n\t\t\t} else {\n\t\t\t\t$where[\"$col IS\"] = new QueryExpr(\"NULL\");\n\t\t\t}\n\t\t}\n\t\treturn $where;\n\t}", "private function _getFilteredQueryConditions($params)\n\t{\n\t\t$conditions = array();\n\t\t/* Get a separate piece of the conditions array for each field */\n\t\tforeach ($this->FILTER_FIELDS as $field => $filterOptions){\n\n\t\t\tif (array_key_exists($field, $params)){\n\t\t\t\t$next_conditions = null;\n\t\t\t\tforeach ($filterOptions as $filterType => $filterParams){\n\t\t\t\t\tif ($filterType === 'Range'){\n\t\t\t\t\t\t$decoded = json_decode($params[$field]);\n\t\t\t\t\t\t$min = $decoded->min;\n\t\t\t\t\t\t$max = $decoded->max;\n\t\t\t\t\t\t$next_conditions = $this->_getRangeConditions($filterParams[0], $min, $max, $filterParams[1], $filterParams[2]);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($filterType === 'Date'){\n\t\t\t\t\t\t$decoded = json_decode($params[$field]);\n\t\t\t\t\t\t$months = $decoded->months;\n\t\t\t\t\t\t$year = $decoded->year;\n\t\t\t\t\t\t$next_conditions = $this->_getDateConditions($months, $year);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($filterType === 'MultipleOption'){\n\t\t\t\t\t\t$next_conditions = $this->_getMultipleOptionFilterConditions($params, $filterParams[0], $filterParams[1], $filterParams[2]);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($filterType === 'Boolean'){\n\t\t\t\t\t\tif (intval($params[$field]) === 1)\n\t\t\t\t\t\t\t$next_conditions = $this->_getBooleanFilterConditions($filterParams[0], $filterParams[1], $filterParams[2]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($next_conditions !== null)\n\t\t\t\t\t\tarray_push($conditions, $next_conditions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Handle parking separately...there are a couple checks that are factored into it */\n\t\tif (array_key_exists('ParkingAvailable', $params) && $params['ParkingAvailable'] == 1)\n\t\t\tarray_push($conditions, $this->_getParkingConditions($params));\n\n\t\treturn $conditions;\n\t}", "protected function getCondition()\n {\n $condition = explode(\"|\", request($this->filterName()));\n return [$condition[0], $condition[1]];\n }", "public function getConditionArray()\n\t{\n\t\treturn $this->conditionArray;\n\t}", "public function getWhereValues()\n {\n return $this->whereValues;\n }", "public function &conditions();", "protected function getFilterConditionSchema() {\n\t\t$conditionTypes = [\n\t\t\tCONDITION_TYPE_HOST_GROUP, CONDITION_TYPE_HOST, CONDITION_TYPE_TRIGGER, CONDITION_TYPE_TRIGGER_NAME,\n\t\t\tCONDITION_TYPE_TRIGGER_SEVERITY, CONDITION_TYPE_TIME_PERIOD,\n\t\t\tCONDITION_TYPE_DHOST_IP, CONDITION_TYPE_DSERVICE_TYPE, CONDITION_TYPE_DSERVICE_PORT,\n\t\t\tCONDITION_TYPE_DSTATUS, CONDITION_TYPE_DUPTIME, CONDITION_TYPE_DVALUE, CONDITION_TYPE_TEMPLATE,\n\t\t\tCONDITION_TYPE_EVENT_ACKNOWLEDGED, CONDITION_TYPE_APPLICATION, CONDITION_TYPE_MAINTENANCE,\n\t\t\tCONDITION_TYPE_DRULE, CONDITION_TYPE_DCHECK, CONDITION_TYPE_PROXY, CONDITION_TYPE_DOBJECT,\n\t\t\tCONDITION_TYPE_HOST_NAME, CONDITION_TYPE_EVENT_TYPE, CONDITION_TYPE_HOST_METADATA, CONDITION_TYPE_EVENT_TAG,\n\t\t\tCONDITION_TYPE_EVENT_TAG_VALUE\n\t\t];\n\n\t\t$operators = [\n\t\t\tCONDITION_OPERATOR_EQUAL, CONDITION_OPERATOR_NOT_EQUAL, CONDITION_OPERATOR_LIKE,\n\t\t\tCONDITION_OPERATOR_NOT_LIKE, CONDITION_OPERATOR_IN, CONDITION_OPERATOR_MORE_EQUAL,\n\t\t\tCONDITION_OPERATOR_LESS_EQUAL, CONDITION_OPERATOR_NOT_IN\n\t\t];\n\n\t\treturn [\n\t\t\t'validators' => [\n\t\t\t\t'conditiontype' => new CLimitedSetValidator([\n\t\t\t\t\t'values' => $conditionTypes,\n\t\t\t\t\t'messageInvalid' => _('Incorrect filter condition type for action \"%1$s\".')\n\t\t\t\t]) ,\n\t\t\t\t'value' => new CStringValidator([\n\t\t\t\t\t'empty' => true\n\t\t\t\t]),\n\t\t\t\t'value2' => new CStringValidator([\n\t\t\t\t\t'empty' => true\n\t\t\t\t]),\n\t\t\t\t'formulaid' => new CStringValidator([\n\t\t\t\t\t'regex' => '/[A-Z]+/',\n\t\t\t\t\t'messageEmpty' => _('Empty filter condition formula ID for action \"%1$s\".'),\n\t\t\t\t\t'messageRegex' => _('Incorrect filter condition formula ID for action \"%1$s\".')\n\t\t\t\t]),\n\t\t\t\t'operator' => new CLimitedSetValidator([\n\t\t\t\t\t'values' => $operators,\n\t\t\t\t\t'messageInvalid' => _('Incorrect filter condition operator for action \"%1$s\".')\n\t\t\t\t])\n\t\t\t],\n\t\t\t'required' => ['conditiontype', 'value'],\n\t\t\t'postValidators' => [\n\t\t\t\tnew CActionCondValidator()\n\t\t\t],\n\t\t\t'messageRequired' => _('No \"%2$s\" given for a filter condition of action \"%1$s\".'),\n\t\t\t'messageUnsupported' => _('Unsupported parameter \"%2$s\" for a filter condition of action \"%1$s\".')\n\t\t];\n\t}", "protected function _getWhereCondition()\n {\n $condition = [];\n\n if ($this->_customerSession->isLoggedIn()) {\n $condition['customer_id'] = $this->_customerSession->getCustomerId();\n } elseif ($this->_customerId) {\n $condition['customer_id'] = $this->_customerId;\n } else {\n $condition['visitor_id'] = $this->_customerVisitor->getId();\n }\n\n return $condition;\n }", "abstract public function getConditions() ;", "public function getWhereClauses()\n {\n return $this->where;\n }", "public function getMatchingCriterias() {\n $aMatchingCriterias = [];\n\n # Init Criterias Table\n if(!array_key_exists('book-request-criteria',CoreController::$aCoreTables)) {\n CoreController::$aCoreTables['book-request-criteria'] = new TableGateway('bookrequest_criteria',CoreController::$oDbAdapter);\n }\n\n $oCriteriasFromDB = CoreController::$aCoreTables['book-request-criteria']->select();\n foreach($oCriteriasFromDB as $oCrit) {\n $aMatchingCriterias[$oCrit->criteria_entity_key] = (array)$oCrit;\n }\n\n return $aMatchingCriterias;\n }", "private static function _getWhereStatements() {\n $statements = [];\n foreach (self::$dateFields as $fieldName => $attributes) {\n\n // Attributes number and interval must be set\n $number = (int) $attributes['number'];\n $interval = (string) $attributes['interval'];\n if (!$number || !self::isValidInterval($interval)) {\n continue;\n }\n\n // yForm field must be exist and type of datestamp\n $yFormField = self::$yFormTable->getValueField($fieldName);\n if (!$yFormField || $yFormField->getTypeName() !== 'datestamp') {\n continue;\n }\n\n // yForm format must be a valid dateTime format\n $format = self::getDateFormat($yFormField);\n if (!$format || !self::isValidDateFormat($format)) {\n continue;\n }\n\n // Add the delete statement for this field\n $statements[] = '`' . $fieldName . '` < NOW() - INTERVAL ' . $number . ' ' . $interval;\n }\n return $statements;\n }", "public function getConditionsHook()\n\t{\n\t\t$conditions = array();\n\t\t\n\t\t$conditions['select'] = '`cid` AS id, `name`, `contact`, `email`, `extrainfo`, `checked_out`, `checked_out_time`';\n\t\t\n\t\t$conditions['where'] = array();\n\t\t\n\t\treturn $conditions;\n\t}", "function getConditionMapping() : array ;", "public function getCurrentCategoryConditions()\n {\n $conditions = new ConditionsCollection();\n $conditions->add(new Eq('category', $this->getCurrentCategoryId()));\n\n return $conditions;\n }", "public function getConditions(array $params = []): array;", "public function generate()\n {\n if (count($this->group) > 0) {\n $this->conditions[] = $this->group;\n }\n\n return $this->conditions;\n }", "public function getFilterGroups()\n {\n $aggregator = $this->getAggregator();\n\n if ($aggregator == 'all') {\n return $this->conditionHelper->logicalAndConditions($this->getConditions());\n } else {\n return $this->conditionHelper->logicalOrConditions($this->getConditions());\n }\n }", "function getWhereComponents()\n\t{\n\t\tif($this->_cachedWhereComponents)\n\t\t\treturn $this->_cachedWhereComponents;\n\t\t\t\n\t\t$this->_cachedWhereComponents = RunnerPage::sGetWhereComponents( $this->gQuery, $this->pSet, $this->searchClauseObj, $this->controls\n\t\t\t, $this->getMasterTableSQLClause(), $this->SecuritySQL(\"Search\", $this->tName) );\n\t\treturn $this->_cachedWhereComponents;\n\t}", "public function getWhere() {\r\n\t\t$where = $this->table->getWhere();\r\n\t\tforeach($this->form->getValues() as $name=>$val) {\r\n\t\t\t$field = strpos($name, '.') === false ? $this->table->getName().'.'.$name : $name;\r\n\t\t\tif (!is_null($val) && ($val || $val === '0')) {\r\n\t\t\t\tif (is_array($val)) {\r\n\t\t\t\t\tif (array_key_exists('min', $val) || array_key_exists('max', $val)) {\r\n\t\t\t\t\t\t$min = array_key_exists('min', $val) && !empty($val['min'])?$val['min'] : null;\r\n\t\t\t\t\t\t$max = array_key_exists('max', $val) && !empty($val['max'])?$val['max'] : null;\r\n\t\t\t\t\t\tif ($min)\r\n\t\t\t\t\t\t\t$where->add(array(\r\n\t\t\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t\t\t'val'=>$min,\r\n\t\t\t\t\t\t\t\t'op'=>'>='\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\tif ($max)\r\n\t\t\t\t\t\t\t$where->add(array(\r\n\t\t\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t\t\t'val'=>$max,\r\n\t\t\t\t\t\t\t\t'op'=>'<='\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$fieldRel = $this->table->getRelated($name);\r\n\t\t\t\t\t\t$where->add(array(\r\n\t\t\t\t\t\t\t'field'=>$fieldRel ? $fieldRel['tableLink'].'.'.$fieldRel['fk2']['name'] : $field,\r\n\t\t\t\t\t\t\t'val'=>array_map(array($this->table->getDb(), 'quoteValue'), $val),\r\n\t\t\t\t\t\t\t'op'=>'IN'\r\n\t\t\t\t\t\t));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(strpos($name, '_file')) {\r\n\t\t\t\t\t$where->add(array(\r\n\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t'val'=>'',\r\n\t\t\t\t\t\t'op'=>'<>'\r\n\t\t\t\t\t));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$f = $this->table->getField($name);\r\n\t\t\t\t\tif (is_array($f) && (!array_key_exists('text', $f) || $f['text'])) {\r\n\t\t\t\t\t\t$tmp = explode(' ', $val);\r\n\t\t\t\t\t\tarray_walk($tmp, create_function('&$v', '$v = trim($v);'));\r\n\t\t\t\t\t\t$tmp = array_filter($tmp);\r\n\t\t\t\t\t\tforeach($tmp as $t) {\r\n\t\t\t\t\t\t\t$where->add(array(\r\n\t\t\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t\t\t'val'=>'%'.$t.'%',\r\n\t\t\t\t\t\t\t\t'op'=>'LIKE'\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ($this->table->hasI18n() && db::isI18nName($name) && ($f = $this->table->getI18nTable()->getField(db::unI18nName($name)))) {\r\n\t\t\t\t\t\t$tblName = $this->table->getI18nTable()->getName();\r\n\t\t\t\t\t\t$prim = $this->table->getI18nTable()->getPrimary();\r\n\t\t\t\t\t\t$field = $tblName.'.'.db::unI18nName($name);\r\n\t\t\t\t\t\t$clause = '('.$this->table->getName().'.'.$this->table->getIdent().' IN (SELECT '.$tblName.'.'.$prim[0].' FROM '.$tblName.' WHERE ';\r\n\r\n\t\t\t\t\t\t$tmpWhere = $this->table->getI18nTable()->getWhere(array('op'=>'OR'));\r\n\r\n\t\t\t\t\t\tif (!array_key_exists('text', $f) || $f['text']) {\r\n\t\t\t\t\t\t\t$tmp = explode(' ', $val);\r\n\t\t\t\t\t\t\tarray_walk($tmp, create_function('&$v', '$v = trim($v);'));\r\n\t\t\t\t\t\t\t$tmp = array_filter($tmp);\r\n\t\t\t\t\t\t\tforeach($tmp as $t) {\r\n\t\t\t\t\t\t\t\t$tmpWhere->add(array(\r\n\t\t\t\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t\t\t\t'val'=>'%'.$t.'%',\r\n\t\t\t\t\t\t\t\t\t'op'=>'LIKE'\r\n\t\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$tmpWhere->add(array(\r\n\t\t\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t\t\t'val'=>$val\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$clause.= $tmpWhere.'))';\r\n\t\t\t\t\t\t$where->add($clause);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$where->add(array(\r\n\t\t\t\t\t\t\t'field'=>$field,\r\n\t\t\t\t\t\t\t'val'=>$val\r\n\t\t\t\t\t\t));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$this->session->set(array(\r\n\t\t\t\t\t'name'=>$name,\r\n\t\t\t\t\t'val'=>$val\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (count($where))\r\n\t\t\treturn $where;\r\n\t\treturn null;\r\n\t}", "protected function compileWheres()\n\t{\n\t\tif (!$this->wheres) return array();\n\n\t\t// The new list of compiled wheres\n\t\t$wheres = array();\n\n\t\tforeach ($this->wheres as $i => &$where)\n\t\t{\n\t\t\t// Convert id's\n\t\t\tif (isset($where['column']) && $where['column'] == '_id')\n\t\t\t{\n\t\t\t\t// Multiple values\n\t\t\t\tif (isset($where['values']))\n\t\t\t\t{\n\t\t\t\t\tforeach ($where['values'] as &$value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = $this->convertKey($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Single value\n\t\t\t\telseif (isset($where['value']))\n\t\t\t\t{\n\t\t\t\t\t$where['value'] = $this->convertKey($where['value']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert dates\n\t\t\tif (isset($where['value']) && $where['value'] instanceof DateTime)\n\t\t\t{\n\t\t\t\t$where['value'] = $where['value']->format(DateTime::ISO8601);\n\t\t\t}\n\n\t\t\t// First item of chain\n\t\t\tif ($i == 0 && count($this->wheres) > 1 && $where['boolean'] == 'and')\n\t\t\t{\n\t\t\t\t// Copy over boolean value of next item in chain\n\t\t\t\t$where['boolean'] = $this->wheres[$i+1]['boolean'];\n\t\t\t}\n\n\t\t\t// Delegate\n\t\t\t$method = \"compileWhere{$where['type']}\";\n\t\t\t$compiled = $this->{$method}($where);\n\n\t\t\t// Check for or\n\t\t\tif ($where['boolean'] == 'or')\n\t\t\t{\n\t\t\t\t$compiled = array('$or' => array($compiled));\n\t\t\t}\n\n\t\t\t// Merge compiled where\n\t\t\t$wheres = array_merge_recursive($wheres, $compiled);\n\t\t}\n\n\t\treturn $wheres;\n\t}", "public function getWhere(): array\n {\n return parent::getWhere();\n }", "public function getFilterQueries(): array {}", "public function getFilterQueries(): array {}", "public function getObjectConditions()\n {\n return $this->object_conditions;\n }", "public function getTermsAndConditions()\n {\n return new TermConditionCollection(TermCondition::all());\n }", "protected function _getAssignmentFilters( connection $source, $selector, $allBindings ) {\n\t\treturn array_map( function( $binding ) use ( $source, $selector ) {\n\t\t\t// join names and values of binding/referencing properties\n\t\t\t$reference = array_combine( $selector['properties'], $binding );\n\n\t\t\tassert( 'count( $selector[\"properties\"] ) === count( $binding )' );\n\t\t\tassert( 'count( $reference ) === count( $binding )' );\n\n\t\t\t// collect binding/referencing properties to actually use on updating\n\t\t\t$properties = $values = array();\n\n\t\t\tforeach ( $reference as $name => $value )\n\t\t\t\tif ( array_key_exists( $name, $properties ) )\n\t\t\t\t{\n\t\t\t\t\tif ( $value != $properties[$name] )\n\t\t\t\t\t\tthrow new \\RuntimeException( 'double use of identifying/referencing property with mismatching value' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$properties[] = $name;\n\t\t\t\t\t$values[] = $value;\n\t\t\t\t}\n\n\n\t\t\treturn array(\n\t\t\t\t'term' => implode( ' AND ', array_map( function( $name ) { return \"$name=?\"; }, $source->qualifyPropertyNames( null, $properties ) ) ),\n\t\t\t\t'values' => $values,\n\t\t\t);\n\t\t}, $allBindings );\n\t}", "public static function getConditionalFields()\n {\n $conditionalFields = [];\n\n foreach (static::$groupsConditions as $constraint => $conditions) {\n $splittedConstraint = explode('.', $constraint);\n $targetFieldName = $splittedConstraint[0];\n\n foreach ($conditions as $fieldExpr => $condition) {\n $field = str_replace([' in', ' notin'], '', $fieldExpr);\n\n foreach ($conditions as $key => $cond) {\n $fieldCond = str_replace([' in', ' notin'], '', $key);\n if ($fieldCond === $field) {\n $conditionalFields[$field][$targetFieldName][$constraint][] = [$key => $cond];\n }\n }\n }\n }\n\n return $conditionalFields;\n }", "protected function getCurrentBindings()\n {\n $cloneQuery = clone $this->query;\n $cloneQuery = $this->loadElements($cloneQuery);\n if (!empty($this->set)) {\n $cloneQuery->setUpdates($this->set);\n }\n if (!empty($this->insert_records)) {\n foreach ($this->insert_records as $record) {\n $cloneQuery->addInsertRecord($record);\n }\n }\n return $cloneQuery->getBindings();\n }", "public function getExpressionArray()\n\t{\n\t\treturn $this->getConditionArray();\n\t}", "private function builtWhere(){\n\n\t\tif ( !empty($this->_where)){\n\n\t\t\t/*\n\t\t\t\t$this->_where contains array of two valued array -> [0] => ['sql' => \"foo == ?\", 'values' => [0] => bar]\n\t\t\t*/\n\t\t\tif ( is_array($this->_where[0]) ){\n\n\t\t\t\tforeach ($this->_where as $keys ) {\n\t\t\t\t\tforeach ($keys as $key => $value) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $key == 'sql' ){\n\t\t\t\t\t\t\t// concatenate to the whole sql string query\n\t\t\t\t\t\t\t$this->_sql .= $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $key == 'value' ){\n\t\t\t\t\t\t\t// add values to the array of all values of parameters of the query\n\t\t\t\t\t\t\tarray_push($this->_bindValues, $value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$this->_sql .= $this->_where['sql'];\n\t\t\t\tarray_push($this->_bindValues, $this->_where['value']);\n\t\t\t} \n\t\t}\n\t}", "function get_where_array() {\r\n $returnArray = array();\r\n\r\n $modStrings = return_module_language('en_us', 'KReports');\r\n\r\n foreach ($this->whereArray as $thisWhereCondition) {\r\n // 2011-06-05 do not pass over conditions with Operator ignore\r\n if ($thisWhereCondition['exportpdf'] == 'yes' && $thisWhereCondition['operator'] != 'ignore') {\r\n //build the string we shoot\r\n $valueString = '';\r\n //determine value string\r\n if ($thisWhereCondition['value'] != '' && $thisWhereCondition['value'] != '---') {\r\n if ($thisWhereCondition['valueto'] != '' && $thisWhereCondition['valueto'] != '---')\r\n $valueString = $thisWhereCondition['value'] . ' - ' . $thisWhereCondition['valueto'];\r\n else\r\n $valueString = $thisWhereCondition['value'];\r\n }\r\n\r\n // add to the array\r\n $returnArray[] = array(\r\n 'name' => $thisWhereCondition['name'],\r\n 'operator' => $modStrings['LBL_OP_' . strtoupper($thisWhereCondition['operator'])],\r\n 'value' => $valueString\r\n );\r\n }\r\n }\r\n\r\n return $returnArray;\r\n }", "abstract protected function getConditionCriteria($params);", "function condition_values() {\r\n return array();\r\n }", "function getConditions($from, $keys, $validKeys, $bindArr, $joinArr) {\n \t\t//Check if array\n \t\tif (!(is_array($keys) && is_array($validKeys) && is_array($bindArr))) {\n return false;\n }\n \t\t$queryStr = '';\n\n \t\t//Check where condition items\n \t\tforeach ($keys as $idx => $val) {\n \t\tif ($idx <> 0) {\n \t\t\tif (isset($val['operator'])) {\n \t\t\t\tif (array_key_exists($val['operator'],$validKeys['operator'])) {\n \t\t\t\t\t//echo ' '.$validKeys['operator'][$val['operator']][0].' ';\n \t\t\t\t\t$queryStr .= ' '.$validKeys['operator'][$val['operator']][0].' ';\n \t\t\t\t} else {\n \t\t\t\t\treturn false; //Invalid Operator: Operator is not in valid operators list\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\treturn false;\t//Operator Required: Non-first item has no operator set\n \t\t\t}\n \t\t} elseif (isset($val['operator'])) {\n \t\t\treturn false; //Bad Format: First item incorrectly has an operator set\n \t\t}\n \t\tif (count($val['item']) == 1) {\n \t\t\t//echo 'This is a condition!', PHP_EOL;\n \t\t\t//var_dump($key['item'][0]);\n \t\t\t$condition = $val['item'][0];\n \t\t\t//if (isset($condition['field']) && isset($condition['predicate']) && isset($condition['value'])) {\n \t\t\t\t//echo $condition['field'].' '.$condition['predicate'].' '.$condition['value'];\n \t\t\t\tif (isset($condition['field']) && array_key_exists($condition['field'],$validKeys['where'])) {\n \t\t\t\t if (isset($condition['predicate']) && isset($condition['value']) && array_key_exists($condition['predicate'],$validKeys['predicate'])) {\n \t\t\t\t\t//echo $validKeys['where'][$condition['field']][0].' '.$validKeys['predicate'][$condition['predicate']][0].' '.$condition['value'];\n \t\t\t\t\t$bindVar = $validKeys['where'][$condition['field']];\n \t\t\t\t\t$joinArr = getJoinArr($joinArr, $bindVar[0], $from, $validKeys, true); //Check table, save join string to join array\n \t\t\t\t\t//Set bind variable\n \t\t\t\t\t$bindVar[2] .= count($bindArr);\n \t\t\t\t\tif (isset($bindVar[1])) {\n \t\t\t\t\t\t$whereExpr = preg_replace(\"/#where/\",$bindVar[2],$bindVar[1]).PHP_EOL;\n \t\t\t\t\t} else {\n \t\t\t\t\t\t$whereExpr = $bindVar[2];\n \t\t\t\t\t}\n \t\t\t\t\t$bindVar[3] = $condition['value']; //Set value to bindVar array\n \t\t\t\t\t$bindArr[] = $bindVar; //Add bindVar array to bindArr array\n \t\t\t\t\t//$queryStr .= $bindVar[0].' '.$validKeys['predicate'][$condition['predicate']][0].' '.$whereExpr; //Add to query string\n\t\t\t\t\t\t\t\t$queryStr .= $bindVar[0].' '.$validKeys['predicate'][$condition['predicate']][0].' '.'?'; //Add to query string\n \t\t\t\t\t} elseif ($condition['field'] == 'BUDGET_ERRORS') { //Handle special budget_errors request\n \t\t\t\t\t\t//echo 'this is Bdgt_Errs!';\n \t\t\t\t\t\t$bindVar = $validKeys['where'][$condition['field']];\n \t\t\t\t\t\t//$joinArr = getJoinArr($joinArr, /**$bindVar[0]**/ 'RAB', $from, $validKeys, true); //Check table, save join string to join array\n \t\t\t\t\t\t//Handle bind variables, bind variable values, and add to bindArr array\n \t\t\t\t\t\t$queryStr .= $bindVar[1];\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\t//echo 'Invalid Condition: Not all condition variables are valid'\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t//} else {\n \t\t\t\t//echo 'Condition Variables Required: Not all condition variables are set'\n \t\t\t//\treturn false;\n \t\t\t//}\n \t\t} elseif (count($val['item']) > 1) {\n \t\t\t//echo 'This is a group!', PHP_EOL;\n \t\t\t//var_dump($key['item']);\n \t\t\t$queryVars = getConditions($from, $val['item'], $validKeys, $bindArr, $joinArr);\n \t\t\tif ($queryVars === false) return false;\n \t\t\t$queryStr .= '('.$queryVars[0].')';\n \t\t\t$bindArr = $queryVars[1];\n \t\t\t$joinArr = $queryVars[2];\n \t\t}\n \t}\n \treturn array($queryStr,$bindArr,$joinArr);\n }", "public function getConditionsList() {\n\t\t$query = \"SELECT * FROM conditions\";\n\t\t$results = $this->link->query($query) or die($this->link->error.__LINE__);\n\t\tif($results->num_rows > 0) {\n \t\treturn $results;\n\t\t} else {\n\t\t\techo \"No result found\";\n\t\t\treturn false;\n\t\t}\n\t}", "public function getFilterQueries(): array;", "protected function & makeSearchConditions()\n {\n $aConditions = [];\n $iCount = count($this->params);\n foreach ($this->paramSettings as $sColumn => $aParam) {\n if (!isset($this->params[$sColumn])) {\n if ($aParam['limit_when_null'] && $iCount <= 1) {\n $aFieldInfo[1] = null;\n } else {\n continue;\n }\n }\n $mValue = isset($this->params[$sColumn]) ? $this->params[$sColumn] : null;\n if (!mb_strlen($mValue) && !$aParam['limit_when_null'])\n continue;\n if (!isset($this->searchItems[$sColumn])) {\n $aConditions[$sColumn] = ['=', $mValue];\n continue;\n }\n $aPattSearch = array('!\\$model!', '!\\$\\$field!', '!\\$field!');\n $aItemConfig = &$this->searchItems[$sColumn];\n $aPattReplace = array($aItemConfig['model'], $mValue, $aItemConfig['field']);\n $sMatchRule = preg_replace($aPattSearch, $aPattReplace, $aItemConfig['match_rule']);\n $aMatchRule = explode(\"\\n\", $sMatchRule);\n if (count($aMatchRule) > 1) { // OR\n // todo : or\n } else {\n// pr($aMatchRule);\n $aFieldInfo = array_map('trim', explode(' = ', $aMatchRule[0]));\n// pr($aFieldInfo);\n// pr($mValue);\n $aTmp = explode(' ', $aFieldInfo[0]);\n// pr($aTmp);\n// pr(count($aTmp));\n// exit;\n $iOperator = (count($aTmp) > 1) ? $aTmp[1] : '=';\n if (!mb_strlen($mValue) && $aParam['limit_when_null']) {\n $aFieldInfo[1] = null;\n }\n list($tmp, $sField) = explode('.', $aTmp[0]);\n $sField{0} == '$' or $sColumn = $sField;\n if (isset($aConditions[$sColumn])) {\n // TODO 原来的方式from/to的值和search_items表中的记录的顺序强关联, 考虑修改为自动从小到大排序的[from, to]数组\n $arr = [$aConditions[$sColumn][1], $aFieldInfo[1]];\n sort($arr);\n // $sFrom = $aConditions[$sColumn][1];\n // $sTo = $aFieldInfo[1];\n $aConditions[$sColumn] = ['between', $arr];\n } else {\n $aConditions[$sColumn] = [$iOperator, $aFieldInfo[1]];\n }\n }\n// if ($sColumn == 'parent_id'){\n// die('test');\n// }\n }\n // pr($this->paramSettings);\n // pr($this->params);\n // pr($aConditions);exit;\n // if (count($this->params) > 1 && isset($aConditions['parent_id'])){\n // unset($aConditions['parent_id']);\n // }\n return $aConditions;\n }\n\n /**\n * 资源列表页面\n * GET\n * @return Response\n */\n public function index()\n {\n $oQuery = $this->indexQuery();\n $sModelName = $this->modelName;\n $iPageSize = isset($this->params['pagesize']) && is_numeric($this->params['pagesize']) ? $this->params['pagesize'] : static::$pagesize;\n // DB::enableQueryLog();\n $datas = $oQuery->paginate($iPageSize);\n // $queries = DB::getQueryLog();\n // $last_query = end($queries);\n // pr($last_query);exit;\n // pr(($datas->toArray()));exit;\n $this->setVars(compact('datas'));\n if ($sMainParamName = $sModelName::$mainParamColumn) {\n if (isset($aConditions[$sMainParamName])) {\n $$sMainParamName = is_array($aConditions[$sMainParamName][1]) ? $aConditions[$sMainParamName][1][0] : $aConditions[$sMainParamName][1];\n } else {\n $$sMainParamName = null;\n }\n $this->setVars(compact($sMainParamName));\n }\n return $this->render();\n }\n\n public function view($id)\n {\n $this->model = $this->model->find($id);\n if (!is_object($this->model)) {\n return $this->goBackToIndex('error', __('_basic.missing', $this->langVars));\n }\n $data = $this->model;\n $sModelName = $this->modelName;\n if ($sModelName::$treeable) {\n if ($this->model->parent_id) {\n if (!array_key_exists('parent', $this->model->getAttributes())) {\n $sParentTitle = $sModelName::find($this->model->parent_id)->{$sModelName::$titleColumn};\n } else {\n $sParentTitle = $this->model->parent;\n }\n } else {\n $sParentTitle = '(' . __('_basic.top_level', [], 3) . ')';\n }\n }\n $this->setVars(compact('data', 'sParentTitle'));\n return $this->render();\n }\n\n public function indexQuery()\n {\n $aConditions = &$this->makeSearchConditions();\n $oQuery = $aConditions ? $this->model->doWhere($aConditions) : $this->model;\n // TODO 查询软删除的记录, 以后需要调整到Model层\n $bWithTrashed = trim(Input::get('_withTrashed', 0));\n // pr($bWithTrashed);exit;\n if ($bWithTrashed)\n $oQuery = $oQuery->withTrashed();\n if ($sGroupByColumn = Input::get('group_by')) {\n $oQuery = $this->model->doGroupBy($oQuery, [$sGroupByColumn]);\n }\n // 获取排序条件\n $aOrderSet = [];\n if ($sOorderColumn = Input::get('sort_up', Input::get('sort_down'))) {\n $sDirection = Input::get('sort_up') ? 'asc' : 'desc';\n $aOrderSet[$sOorderColumn] = $sDirection;\n }\n $oQuery = $this->model->doOrderBy($oQuery, $aOrderSet);\n return $oQuery;\n }\n\n /**\n * set view vars\n * @param String|array $sKey\n * @param mixed $mValue\n */\n function setVars($sKey, $mValue = null)\n {\n if (is_array($sKey)) {\n foreach ($sKey as $key => $value) {\n $this->setVars($key, $value);\n }\n } else {\n $this->viewVars[$sKey] = $mValue;\n }\n }\n\n /**\n * save data to database\n * auto redirect\n * @return bool\n */\n protected function saveData()\n {\n // 用表单数据填充模型实例\n $this->_fillModelDataFromInput();\n // 创建验证规则\n $aRules = &$this->_makeVadilateRules($this->model);\n // pr($aRules);\n // pr('------------');\n // pr($this->model->toArray());exit;\n // save\n return $this->model->save($aRules);\n }\n\n /**\n * 用表单数据填充模型实例\n */\n protected function _fillModelDataFromInput()\n {\n// $this->model = $id ? $this->model->find($id) : $this->model;\n $data = $this->params;\n $sModelName = $this->modelName;\n !empty($this->model->columnSettings) or $this->model->makeColumnConfigures();\n foreach ($this->model->columnSettings as $sColumn => $aSettings) {\n if ($sColumn == 'id')\n continue;\n if (!isset($aSettings['type']))\n continue;\n switch ($aSettings['type']) {\n case 'bool':\n case 'numeric':\n case 'integer':\n !empty($data[$sColumn]) or $data[$sColumn] = 0;\n break;\n case 'select':\n if (isset($data[$sColumn]) && is_array($data[$sColumn])) {\n sort($data[$sColumn]);\n $data[$sColumn] = implode(',', $data[$sColumn]);\n }\n }\n }\n // pr($data);\n // exit;\n // pr(get_class($this->model));\n // pr('---------');\n\n $this->model = $this->model->fill($data);\n // pr('---------');\n // pr($this->model->toArray());exit;\n if ($sModelName::$treeable) {\n $this->model->parent_id or $this->model->parent_id = null;\n if ($sModelName::$foreFatherColumn) {\n $this->model->{$sModelName::$foreFatherColumn} = $this->model->setForeFather();\n }\n }\n }\n\n /**\n * 根据实际情况修改验证规则\n * @param model $oModel\n * @return array\n */\n protected function & _makeVadilateRules($oModel)\n {\n $sClassName = get_class($oModel);\n return $sClassName::$rules;\n }\n\n /**\n * 构造 unique 验证规则\n * @param String $column 字段名称\n * @param int $id 排除指定 ID\n * @return String\n */\n protected function unique($column = null, $id = null, $extraParam = null)\n {\n $rule = 'unique:' . $this->resourceTable;\n if (!is_null($column))\n $rule .= ',' . $column;\n if (!is_null($id))\n $rule .= ',' . $id . ',id';\n else\n $rule .= ',NULL,id';\n if (!is_null($extraParam) && is_array($extraParam)) {\n foreach ($extraParam as $key => $value) {\n $rule .= ',' . $key . ',' . $value;\n }\n }\n return $rule;\n }\n\n protected function getResourceName()\n {\n $sControllerName = str_replace('Controller', '', $this->controller);\n $aParts = explode('_', $sControllerName);\n $sName = $aParts[count($aParts) - 1];\n $sName = String::snake($sName);\n return String::plural(String::slug($sName, '-'));\n }\n\n\n /**\n * get search config\n */\n protected function getSearchConfig()\n {\n $iFunctionalityId = $this->functionality->id;\n if ($this->searchConfig = SearchConfig::getForm($iFunctionalityId, $this->admin)) {\n $this->searchItems = &$this->searchConfig->getItems();\n }\n }\n\n /**\n * add widget name\n * @param String $sWidget\n */\n protected function addWidget($sWidget)\n {\n $this->widgets[] = $sWidget;\n }\n\n /**\n * redict to index page\n * @param String $sMsgType in list: success, error, warning, info\n * @param String $sMessage\n * @return RedirectResponse\n */\n protected function goBackToIndex($sMsgType, $sMessage)\n {\n// pr($this->redictKey);\n// pr(Session::get($this->redictKey));\n// exit;\n $sToUrl = Session::get($this->redictKey) or $sToUrl = route('games.index');\n return Redirect::to($sToUrl)->with($sMsgType, $sMessage);\n }\n\n /**\n * go back\n * @param String $sMsgType in list: success, error, warning, info\n * @param String $sMessage\n * @return RedirectResponse\n */\n protected function goBack($sMsgType, $sMessage, $bWithModelErrors = false)\n {\n// $oRedirectResponse = Session::get($this->redictKey) ? Redirect::back() : Redirect::route('home');\n $oRedirectResponse = Redirect::back();\n $oRedirectResponse->withInput()->with($sMsgType, $sMessage);\n !$bWithModelErrors or $oRedirectResponse = $oRedirectResponse->withErrors($this->model->validationErrors);\n return $oRedirectResponse;\n }\n\n protected function setFunctionality()\n {\n $this->functionality = Functionality::getByCA($this->controller, $this->action, $this->admin);\n }\n\n public function setOrder()\n {\n// pr($this->params);\n// exit;\n if (Request::method() != 'POST') {\n return $this->goBack('error', __('_basic.method-error'));\n }\n if (!isset($this->params['sequence']) || !is_array($this->params['sequence'])) {\n return $this->goBack('error', __('_basic.data-error'));\n }\n $sModelName = $this->modelName;\n DB::connection()->beginTransaction();\n $bSucc = true;\n foreach ($this->params['sequence'] as $id => $sequence) {\n $oModel = $sModelName::find($id);\n if ($oModel->sequence == $sequence) {\n continue;\n }\n $oModel->sequence = $sequence;\n if (!$bSucc = $oModel->save(['sequence' => 'numeric'])) {\n break;\n }\n }\n if ($bSucc) {\n DB::connection()->commit();\n\n $sInfoType = 'success';\n $sLangKey = '_basic.ordered';\n } else {\n DB::connection()->rollback();\n $sInfoType = 'error';\n $sLangKey = '_basic.order-fail';\n }\n return $this->goBack($sInfoType, __($sLangKey));\n }\n\n /**\n * 输出信息并终止运行\n * @param String $msg\n */\n protected function halt($bSuccess, $sType, $iErrno, & $aSuccessedBets = null, & $aFailedBets = null, & $aData = null, $sLinkUrl = null)\n {\n is_object($this->Message) or $this->Message = new Message($this->errorFiles);\n $this->Message->output($bSuccess, $sType, $iErrno, $aData, $aSuccessedBets, $aFailedBets, $sLinkUrl);\n exit;\n }\n\n /**\n * 输出Json数据\n * @param array $msg\n */\n protected function jsonEcho($msg)\n {\n header('Content-Type: application/json');\n echo json_encode($msg);\n exit();\n }\n\n protected function writeLog($msg)\n {\n !is_array($msg) or $msg = var_export($msg, true);\n file_put_contents('/tmp/bet', $msg . \"\\n\", FILE_APPEND);\n }\n\n /**\n * [createUserManageLog 生成管理员对用户进行操作的日志]\n * @param [Integer] $iUserId [用户id]\n * @return [Boolean] [成功/失败状态]\n */\n protected function createUserManageLog($iUserId, $sComment = null)\n {\n $iFunctionalityId = $this->functionality->id;\n $sFunctionality = $this->functionality->title;\n return UserManageLog::createLog($iUserId, $iFunctionalityId, $sFunctionality, $sComment);\n }\n\n public function __destruct()\n {\n if (SysConfig::check('sys_use_sql_log', true)) {\n $sLogPath = Config::get('log.root') . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . date('Ymd');\n\n// pr($sLogPath);\n// exit;\n if (!file_exists($sLogPath)) {\n @mkdir($sLogPath, 0777, true);\n @chmod($sLogPath, 0777);\n }\n $sLogFile = $sLogPath . DIRECTORY_SEPARATOR . date('H') . '.sql';\n if (!$queries = DB::getQueryLog()) {\n return;\n }\n// $me = DB::connection();\n\n foreach ($queries as $aQueryInfo) {\n// $sql = $aQueryInfo['query'];\n $sql = '';\n $aSqlParts = explode('?', $aQueryInfo['query']);\n foreach ($aSqlParts as $i => $sPart) {\n $sql .= $aSqlParts[$i];\n if (isset($aQueryInfo['bindings'][$i])) {\n $bindings = $aQueryInfo['bindings'][$i];\n !(is_string($bindings) && strlen($bindings) > 0 && $bindings{0} != \"'\") or $bindings = \"'\" . $bindings . \"'\";\n $sql .= $bindings;\n }\n }\n $aLogs[] = $sql;\n $aLogs[] = number_format($aQueryInfo['time'], 3) . 'ms';\n// pr($sql);\n }\n\n @file_put_contents($sLogFile, date('Y-m-d H:i:s') . \"\\n\", FILE_APPEND);\n @file_put_contents($sLogFile, 'controller: ' . $this->controller . ' action: ' . $this->action . \"\\n\", FILE_APPEND);\n @file_put_contents($sLogFile, implode(\"\\n\", $aLogs) . \"\\n\\n\", FILE_APPEND);\n }\n }\n\n public function destroy($id = null)\n {\n if (!$this->filterRights($id))\n App::abort(404);\n return parent::destroy($id);\n }\n\n /**\n * [filterRights 过滤访问权限,只有属于该用户或总代的记录可以被访问]\n * @param [Integer] $id [数据记录的id]\n * @return [Integer] [是否有权限, 0:否, 1:是]\n */\n private function filterRights($id)\n {\n $bSucc = true;\n // 只需过滤view, edit, destroy三种视图\n if (in_array($this->action, ['view', 'edit', 'destroy'])) {\n $sModelName = $this->modelName;\n $sTable = $this->model->getTable();\n $originalColumns = Schema::getColumnListing($sTable);\n if (in_array('user_id', $originalColumns)) {\n $iUserId = Session::get('user_id');\n $rUserId = $sModelName::find($id)->user_id;\n $sForefatherIds = User::find($rUserId)->forefather_ids;\n $aForefatherIds = explode(',', $sForefatherIds);\n $bSucc = ($iUserId == $rUserId or in_array($iUserId, $aForefatherIds));\n }\n }\n // pr((int)$bSucc);exit;\n return $bSucc;\n }\n\n /**\n * [getSumData 获取统计值]\n * @param [Array] $aSumColumns [待统计的列]\n * @param [boolean] $bPerPage [是否按页统计,该功能采用视图中操作每页数据的方式实现,以前的逻辑暂时注释掉]\n * @return [Array] [统计数据]\n */\n public function getSumData($aSumColumns, $bPerPage = false)\n {\n // TODO 和BaseController中的查询有所重复,后续改进\n $aConditions = &$this->makeSearchConditions();\n $oQuery = $this->model->doWhere($aConditions);\n $aRawColumns = [];\n foreach ($aSumColumns as $key => $value) {\n $aRawColumns[] = DB::raw('SUM(' . $value . ') as ' . $value . '_sum');\n }\n $aSum = [];\n $aSum = $oQuery->get($aRawColumns)->toArray();\n if (count($aSum))\n $aSum = $aSum[0];\n return $aSum;\n }\n\n /**\n * 将需要缓存的url信息保存到session中\n */\n protected function saveUrlToSession()\n {\n Session::forget('request_full_url');\n Session::push('request_full_url', request()->url());\n }\n\n /**\n * 返回先前请求的url信息\n * @param String $sRoute 路由信息\n * @return String\n */\n protected function getUrlFromSession($sDefaultUrl = 'home')\n {\n if (Session::has('request_full_url')) {\n $sUrl = Session::get('request_full_url')[0];\n } else {\n $sUrl = Route($sDefaultUrl);\n }\n return $sUrl;\n }\n\n /**\n * 资源创建页面\n * @return Response\n */\n public function create($id = null)\n {\n if ($this->request->method() == 'POST') {\n DB::connection()->beginTransaction();\n if ($bSucc = $this->saveData($id)) {\n DB::connection()->commit();\n return $this->goBackToIndex('success', __('_basic.created', $this->langVars));\n } else {\n // pr($this->model->toArray());\n // pr('---------');\n // pr($this->model->validationErrors);exit;\n DB::connection()->rollback();\n $this->langVars['reason'] = &$this->model->getValidationErrorString();\n// pr($this->langVars);\n// exit;\n return $this->goBack('error', __('_basic.create-fail', $this->langVars));\n }\n } else {\n $data = $this->model;\n $isEdit = false;\n $this->setVars(compact('data', 'isEdit'));\n $sModelName = $this->modelName;\n // if ($sModelName::$treeable){\n// $sFirstParamName = 'parent_id';\n// }\n// else{\n//foreach($this->paramSettings as $sFirstParamName => $tmp){\n// break;\n// }\n list($sFirstParamName, $tmp) = each($this->paramSettings);\n // }\n // pr($sModelName);\n // exit;\n !isset($sFirstParamName) or $this->setVars($sFirstParamName, $id);\n $aInitAttributes = isset($sFirstParamName) ? [$sFirstParamName => $id] : [];\n $this->setVars(compact('aInitAttributes'));\n\n return $this->render();\n }\n }\n\n\n}", "private function construct_where_recursive($where) {\n $return = array();\n\n foreach ($where as $index => $value) {\n if (is_array($value)) {\n if ($index === \"&\") {\n return \"(\". implode(\" AND \", $this->construct_where_recursive($value)) .\")\";\n }\n elseif ($index === \"|\") {\n return \"(\". implode(\" OR \", $this->construct_where_recursive($value)) .\")\";\n }\n else {\n $index = key($value);\n if ($index !== \"&\" and $index !== \"|\") {\n $value = array(\"&\" => $value);\n }\n\n $return[] = $this->construct_where_recursive($value);\n }\n }\n else {\n $is_keyword = preg_match(\"/^IS/\", $value);\n\n preg_match(\"/^<=|>=|!=|<|=|>|LIKE /\", $value, $matches);\n if (count($matches) > 0) {\n $value = str_replace($matches[0], \"\", $value);\n $sign = rtrim($matches[0]);\n }\n else {\n $sign = \"=\";\n }\n\n $return[] = $index .\" \". ($is_keyword ? $value : ($sign .\" '\". (is_string($value) ? mysql_real_escape_string($value) : $value) .\"'\"));\n }\n }\n\n return $return;\n }", "protected function compileWheres()\n {\n // The wheres to compile.\n $wheres = $this->wheres ?: [];\n // We will add all compiled wheres to this array.\n foreach ($wheres as $i => &$where) {\n // Make sure the operator is in lowercase.\n if (isset($where['operator'])) {\n $where['operator'] = strtolower($where['operator']);\n // Operator conversions\n $convert = [\n ''\n ];\n if (array_key_exists($where['operator'], $convert)) {\n $where['operator'] = $convert[$where['operator']];\n }\n }\n\n if($where['column'] == 'id'){\n if(isset($where['value'])){\n //filter on the value of an entity's key\n $this->_id = $where['value'];\n $where['column'] = '__key__';\n $where['value'] = sprintf('KEY(%s, %s)',$this->from,$where['value']);\n }\n //$this->dataStoreQuery->filter('__key__', $where['operator'], $this->dataStoreClient->key($this->from, $where['column']));\n }\n\n // Merge the compiled where with the others.\n //$compiled = array_merge_recursive($compiled, $result);\n //$this->dataStoreQuery->filter($where['column'],$where['operator'],$where['value']);\n }\n return $wheres;\n }", "public function getConditionals()\n\t{\n\t\tcraft()->neo->requirePlugin('reasons');\n\n\t\t// TODO Reduce database impact\n\n\t\t$blockTypeConditionals = [];\n\t\t$sources = [];\n\n\t\t$neoBlockTypeRecords = Neo_BlockTypeRecord::model()->findAll();\n\t\tif($neoBlockTypeRecords)\n\t\t{\n\t\t\tforeach($neoBlockTypeRecords as $neoBlockTypeRecord)\n\t\t\t{\n\t\t\t\t$neoBlockType = Neo_BlockTypeModel::populateModel($neoBlockTypeRecord);\n\t\t\t\t$sources[$neoBlockType->id] = $neoBlockType->fieldLayoutId;\n\t\t\t}\n\t\t}\n\n\t\t$conditionals = [];\n\t\t$conditionalsRecords = Reasons_ConditionalsRecord::model()->findAll();\n\t\tif($conditionalsRecords)\n\t\t{\n\t\t\tforeach($conditionalsRecords as $conditionalsRecord)\n\t\t\t{\n\t\t\t\t$conditionalsModel = Reasons_ConditionalsModel::populateModel($conditionalsRecord);\n\t\t\t\tif($conditionalsModel->conditionals && $conditionalsModel->conditionals != '')\n\t\t\t\t{\n\t\t\t\t\t$conditionals[$conditionalsModel->fieldLayoutId] = $conditionalsModel->conditionals;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach($sources as $blockTypeId => $fieldLayoutId)\n\t\t{\n\t\t\tif(isset($conditionals[$fieldLayoutId]))\n\t\t\t{\n\t\t\t\t$blockTypeConditionals[$blockTypeId] = $conditionals[$fieldLayoutId];\n\t\t\t}\n\t\t}\n\n\t\treturn $blockTypeConditionals;\n\t}", "protected function _buildCondition(){\n \t$aryCondition = array();\n\n\t\t$aryCondition['and'][] = array(\"mt.parent_id\"=>0);\n \t\n \tif(!empty($this->postData)){\n \t\t //search\n\t\t\t \t\t\t\n\t\t\tif($this->postData['cate_id']!=''){\n\n\t\t\t\t$aryCateId = array($this->postData['cate_id']);\n\t\t\t\tgetAllChildCategory($this->postData['cate_id'],array('table'=>'question_category','parent'=>'parent_id','id'=>'cate_id'),$aryCateId);\n\n\t\t\t\t$aryCondition['IN'] = array(\"mt.cate_id\"=>$aryCateId);\n \t\t }\t\t\t\n\t\t\tif($this->postData['title']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.title\"=>$this->postData['title']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['status']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.status\"=>$this->postData['status']);\n \t\t }\t\t\t\n\n\t\t\tif($this->postData['question_type']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.question_type\"=>$this->postData['question_type']);\n \t\t }\t\t\t\n\n \t}\n \treturn $aryCondition;\n }", "public function getFilter()\n {\n if (!is_array($this->data)) {\n return null;\n }\n $allowed = array_keys(DataObject::getSchema()->databaseFields($this->className));\n $fields = array_flip(array_intersect($allowed, $this->required));\n $singleton = singleton($this->className);\n\n $new = [];\n foreach ($fields as $field => $value) {\n $field = Convert::raw2sql($field);\n if (in_array($field, $allowed)) {\n if (isset($this->data[$field])) {\n // allow wildcard in filter\n if ($this->data[$field] === '*') {\n continue;\n }\n\n $dbfield = $singleton->dbObject($field);\n $value = $dbfield->prepValueForDB($this->data[$field]);\n\n $new[] = \"\\\"$field\\\" = '$value'\";\n } else {\n $new[] = \"\\\"$field\\\" IS NULL\";\n }\n } else {\n if (isset($this->data[$field])) {\n $value = Convert::raw2sql($this->data[$field]);\n $new[] = \"\\\"$field\\\" = '$value'\";\n } else {\n $new[] = \"\\\"$field\\\" IS NULL\";\n }\n }\n }\n return $new;\n }", "function getFiltersWhere() \n\t{\n\t\t$whereClause = \"\";\n\t\t$whereComponents = $this->getWhereComponents();\n\t\tforeach($whereComponents[\"filterWhere\"] as $fWhere)\n\t\t{\n\t\t\t$whereClause = whereAdd($whereClause, $fWhere);\n\t\t}\n\t\t\n\t\treturn $whereClause;\n\t}", "protected abstract function relationsToFilter(): array;", "public function __toString() {\n\t\t$sql = join(' AND ', $this->whereRules);\n\t\tself::debug('Filter SQL: %s', $sql);\n\t\treturn $sql;\n\t}", "public function toArray()\n {\n $leftData = null;\n if (is_object($this->getLeftCondition())) {\n $leftData = $this->getLeftCondition()->toArray();\n }\n\n $rightData = null;\n if (is_object($this->getRightCondition())) {\n $rightData = $this->getRightCondition()->toArray();\n }\n\n return array(\n 'op' => $this->getOp(),\n 'is_not' => $this->getIsNot(),\n 'left' => $leftData,\n 'right' => $rightData,\n 'conditions' => $this->getConditionsAsArray(),\n );\n }", "public function getConditions()\n {\n return [\n 'AppNotification.title IS NOT NULL',\n 'AppNotification.title !=' => '',\n $this->_getAclRules()\n ];\n }", "public function conditions()\n {\n if (App::$App->is_loggedin()) {\n return [\n \"`Status` IN ('Draft','Published')\",\n ];\n } else {\n return [\n \"`Status` IN ('Published')\",\n ];\n }\n }", "public function conditions(Request $request) {\n return Condition::all();\n }", "public function params(): array\n {\n return $this->parameters ?? $this->conditions->params();\n }", "public function getConditionNameMap() {\n return array(\n self::CONDITION_CONTAINS => pht('contains'),\n self::CONDITION_NOT_CONTAINS => pht('does not contain'),\n self::CONDITION_IS => pht('is'),\n self::CONDITION_IS_NOT => pht('is not'),\n self::CONDITION_IS_ANY => pht('is any of'),\n self::CONDITION_IS_TRUE => pht('is true'),\n self::CONDITION_IS_FALSE => pht('is false'),\n self::CONDITION_IS_NOT_ANY => pht('is not any of'),\n self::CONDITION_INCLUDE_ALL => pht('include all of'),\n self::CONDITION_INCLUDE_ANY => pht('include any of'),\n self::CONDITION_INCLUDE_NONE => pht('do not include'),\n self::CONDITION_IS_ME => pht('is myself'),\n self::CONDITION_IS_NOT_ME => pht('is not myself'),\n self::CONDITION_REGEXP => pht('matches regexp'),\n self::CONDITION_RULE => pht('matches:'),\n self::CONDITION_NOT_RULE => pht('does not match:'),\n self::CONDITION_EXISTS => pht('exists'),\n self::CONDITION_NOT_EXISTS => pht('does not exist'),\n self::CONDITION_UNCONDITIONALLY => '', // don't show anything!\n self::CONDITION_REGEXP_PAIR => pht('matches regexp pair'),\n self::CONDITION_HAS_BIT => pht('has bit'),\n self::CONDITION_NOT_BIT => pht('lacks bit'),\n );\n }", "public function getBaseFilterQueries(): array;", "public function addConditionProvider(): array\n {\n $guid = $this->createGuid();\n return [\n ['Name', 'Test Value', '==', ['Name==\"Test Value\"']],\n ['Name', 'Test Value', '!=', ['Name!=\"Test Value\"']],\n ['IsSupplier', false, '==', ['IsSupplier==\"false\"']],\n ['ContactID', $guid, 'guid', ['ContactID= Guid(\"' . $guid . '\")']],\n ['Name', 'Test Value', 'StartsWith', ['Name.StartsWith(\"Test Value\")']],\n ['Name', 'Test Value', 'EndsWith', ['Name.EndsWith(\"Test Value\")']],\n ];\n }", "public function prepareConditionSql()\n {\n $wheres = array();\n foreach ($this->getConditions() as $condition) {\n /** @var $condition Mage_Rule_Model_Condition_Abstract */\n $wheres[] = $condition->prepareConditionSql();\n }\n\n if (empty($wheres)) {\n return '';\n }\n $delimiter = $this->getAggregator() == \"all\" ? ' AND ' : ' OR ';\n return ' (' . implode($delimiter, $wheres) . ') ';\n }", "public function getClauses()\n {\n return array(\n $this->getSelect(),\n $this->getFrom(),\n $this->getJoins(),\n $this->getWhere(),\n $this->getGroup(),\n $this->getOrder(),\n $this->getLimit(),\n );\n }", "function active_constraints() {\n $constraints = array();\n foreach ($this->get_items('constraint') as $constraint) {\n $constraints[] = $constraint;\n }\n return $constraints;\n }", "public function criterions()\n {\n $main = $this->criteria();\n $eye = $this->eyes;\n $hair = $this->hairs;\n $ethnicity = $this->ethnicities;\n return compact('main', 'eye', 'hair', 'ethnicity');\n }", "protected function getFilterSchema() {\n\t\treturn [\n\t\t\t'validators' => [\n\t\t\t\t'evaltype' => new CLimitedSetValidator([\n\t\t\t\t\t'values' => [\n\t\t\t\t\t\tCONDITION_EVAL_TYPE_OR,\n\t\t\t\t\t\tCONDITION_EVAL_TYPE_AND,\n\t\t\t\t\t\tCONDITION_EVAL_TYPE_AND_OR,\n\t\t\t\t\t\tCONDITION_EVAL_TYPE_EXPRESSION\n\t\t\t\t\t],\n\t\t\t\t\t'messageInvalid' => _('Incorrect type of calculation for action \"%1$s\".')\n\t\t\t\t]),\n\t\t\t\t'formula' => new CStringValidator([\n\t\t\t\t\t'empty' => true\n\t\t\t\t]),\n\t\t\t\t'conditions' => new CCollectionValidator([\n\t\t\t\t\t'empty' => true,\n\t\t\t\t\t'messageInvalid' => _('Incorrect conditions for action \"%1$s\".')\n\t\t\t\t])\n\t\t\t],\n\t\t\t'postValidators' => [\n\t\t\t\tnew CConditionValidator([\n\t\t\t\t\t'messageInvalidFormula' => _('Incorrect custom expression \"%2$s\" for action \"%1$s\": %3$s.'),\n\t\t\t\t\t'messageMissingCondition' => _('Condition \"%2$s\" used in formula \"%3$s\" for action \"%1$s\" is not defined.'),\n\t\t\t\t\t'messageUnusedCondition' => _('Condition \"%2$s\" is not used in formula \"%3$s\" for action \"%1$s\".'),\n\t\t\t\t\t'messageAndWithSeveralTriggers' => _('Comparing several triggers with \"and\" is not allowed.')\n\t\t\t\t])\n\t\t\t],\n\t\t\t'required' => ['evaltype', 'conditions'],\n\t\t\t'messageRequired' => _('No \"%2$s\" given for the filter of action \"%1$s\".'),\n\t\t\t'messageUnsupported' => _('Unsupported parameter \"%2$s\" for the filter of action \"%1$s\".')\n\t\t];\n\t}", "public function getCriteriaStack();", "function handle_where_conditions() {\r\n $referencedFields = array();\r\n $referencingFields = array();\r\n\r\n // handle parent bean assignments and see if we need to handle references\r\n reset($this->whereArray);\r\n foreach ($this->whereArray as $originalKey => $originalData) {\r\n\r\n // 2011-10-17 build reference arrays\r\n if (array_key_exists('reference', $originalData) && $originalData['reference'] != '') {\r\n $referencedFields[$originalData['reference']] = $originalKey;\r\n }\r\n if ($originalData['operator'] == 'reference') {\r\n $referencingFields[$originalKey] = $originalData['value'];\r\n }\r\n\r\n if ($originalData['operator'] == 'parent_assign') {\r\n if (!isset($this->addParams['parentbean']) || (isset($this->addParams['parentbean']) && $originalData['valuekey'] == '')) {\r\n // if we do not have a parentbean we do not evaluate this condition\r\n unset($this->whereArray[$originalKey]);\r\n } else {\r\n // get the value from the parentbean\r\n $fieldName = $originalData['valuekey'];\r\n $thisNewValue = $this->addParams['parentbean']->$fieldName;\r\n\r\n //set the value\r\n $this->whereArray[$originalKey]['operator'] = 'equals';\r\n $this->whereArray[$originalKey]['value'] = $thisNewValue;\r\n $this->whereArray[$originalKey]['valuekey'] = $thisNewValue;\r\n }\r\n }\r\n }\r\n\r\n // handle whereoverride\r\n if (is_array($this->whereOverrideArray)) {\r\n foreach ($this->whereOverrideArray as $overrideKey => $overrideData) {\r\n reset($this->whereArray);\r\n foreach ($this->whereArray as $originalKey => $originalData) {\r\n if ($originalData['fieldid'] == $overrideData['fieldid']) {\r\n // bug 2011-03-12 move corresponding fields\r\n $transferFields = array('operator', 'value', 'valuekey', 'valueto', 'valuetokey', 'usereditable');\r\n foreach ($transferFields as $thisFieldName) {\r\n $this->whereArray[$originalKey][$thisFieldName] = $overrideData[$thisFieldName];\r\n }\r\n // need to exit the while loop\r\n }\r\n }\r\n }\r\n }\r\n\r\n // handle context and other things\r\n foreach ($this->whereArray as $whereId => $whereArrayEntry) {\r\n\r\n // 2012-09-19 set valuto and valuekey if not set \r\n if (!isset($whereArrayEntry['valueto']))\r\n $this->whereArray[$whereId]['valueto'] = '';\r\n if (!isset($whereArrayEntry['valuetokey']))\r\n $this->whereArray[$whereId]['valuetokey'] = '';\r\n\r\n // check context\r\n if (array_key_exists('context', $whereArrayEntry) && $whereArrayEntry['context'] != '') { // && trim($whereArrayEntry['context']) != $this->queryContext)\r\n // by default we delte unless we find a matching context\r\n $keepCondition = false;\r\n\r\n // build an array with entries\r\n $thisWhereConditionContextArray = $this->context_to_array($whereArrayEntry['context']);\r\n\r\n foreach ($thisWhereConditionContextArray as $thisContextEntry) {\r\n if (in_array($thisContextEntry, $this->queryContext))\r\n $keepCondition = true;\r\n }\r\n\r\n // if we did not find a match remove the condition\r\n if (!$keepCondition)\r\n unset($this->whereArray[$whereId]);\r\n }\r\n\r\n // see if we need to evaluate based on usereditable setting\r\n if ($whereArrayEntry['usereditable'] == 'yo2')\r\n unset($this->whereArray[$whereId]); //['operator'] = 'ignore';\r\n\r\n // 2011-03-25 added function to be evaluated\r\n if ($whereArrayEntry['operator'] == 'function') {\r\n include('modules/KReports/kreportsConfig.php');\r\n if ($customFunctionInclude != '') {\r\n include($customFunctionInclude);\r\n if (function_exists($whereArrayEntry['valuekey'])) {\r\n $this->whereArray[$whereId]['operator'] = '';\r\n $this->whereArray[$whereId]['value'] = '';\r\n $this->whereArray[$whereId]['valuekey'] = '';\r\n\r\n eval(\"\\$opReturn=\" . $whereArrayEntry['valuekey'] . \"(\\$whereArrayEntry);\");\r\n if (is_array($opReturn) && count($opReturn) > 0) {\r\n foreach ($opReturn as $thisOpField => $thisOpValue)\r\n $this->whereArray[$whereId][$thisOpField] = $thisOpValue;\r\n }\r\n else\r\n unset($this->whereArray[$whereId]);\r\n }\r\n else {\r\n // delete the condition if we do not find the function\r\n unset($this->whereArray[$whereId]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n //2011-10-17 manage references\r\n foreach ($referencingFields as $originalKey => $referenceValue) {\r\n if (isset($referencedFields[$referenceValue]) && isset($this->whereArray[$referencedFields[$referenceValue]])) {\r\n $this->whereArray[$originalKey]['operator'] = $this->whereArray[$referencedFields[$referenceValue]]['operator'];\r\n $this->whereArray[$originalKey]['value'] = $this->whereArray[$referencedFields[$referenceValue]]['value'];\r\n $this->whereArray[$originalKey]['valuekey'] = $this->whereArray[$referencedFields[$referenceValue]]['valuekey'];\r\n $this->whereArray[$originalKey]['valueto'] = $this->whereArray[$referencedFields[$referenceValue]]['valueto'];\r\n $this->whereArray[$originalKey]['valuetokey'] = $this->whereArray[$referencedFields[$referenceValue]]['valuetokey'];\r\n }\r\n // 2012-08-01 use request Parameter\r\n elseif (isset($_REQUEST[$referenceValue])) {\r\n $this->whereArray[$originalKey]['operator'] = 'equals';\r\n $this->whereArray[$originalKey]['value'] = $_REQUEST[$referenceValue];\r\n $this->whereArray[$originalKey]['valuekey'] = $_REQUEST[$referenceValue];\r\n $this->whereArray[$originalKey]['valueto'] = '';\r\n $this->whereArray[$originalKey]['valuetokey'] = '';\r\n }\r\n else\r\n unset($this->whereArray[$originalKey]);\r\n }\r\n\r\n // bugfix 2012-02-24\r\n // handle the ignore settings ... messes upo joins\r\n foreach ($this->whereArray as $whereId => $whereArrayEntry) {\r\n // bugfix 2012-08-07 .. refertence to wrong array entry\r\n if ($whereArrayEntry['operator'] == 'ignore') {\r\n unset($this->whereArray[$whereId]);\r\n }\r\n }\r\n\r\n // bugifx 2011-04-01\r\n // renumber the array so we make sure we start at 0 again\r\n $this->whereArray = array_values($this->whereArray);\r\n }", "public function makeQueryCondition($conditions = ['query' => '*'])\n {\n return [\n 'query_string' => [\n 'query' => $conditions['query']\n ]\n ];\n }", "public function generateWhere();", "public function getSearchCondition()\n {\n\n $condition = [];\n\n $httpRequest = $this->getRequest();\n $db = $this->getDb();\n $orm = $db->getOrm();\n\n if ($free = $httpRequest->param('free_search', Validator::TEXT))\n $condition['free'] = $free;\n\n return $condition;\n\n }", "public static function findBy($cond)\n {\n $keys = array_keys($cond);\n $ands = array_map(function ($key) {\n return $key.' = :'.$key;\n }, $keys);\n\n $query = 'SELECT * FROM `'.self::getTable().'`'.\n ' WHERE '.implode(' AND ', $ands);\n /** @var \\PDOStatement $result */\n if ($result = self::execute($query, $cond)) {\n $result = $result->fetchAll(\\PDO::FETCH_CLASS, static::class);\n\n /** @var ActiveRecord $row */\n foreach ($result as $row) {\n $row->fetchRelations();\n }\n\n return $result;\n }\n\n return [];\n }", "public function getBindings()\n {\n return $this->aqb->binds;\n }", "protected function getFilters()\n {\n $filters = array_diff(get_class_methods($this), [\n '__construct', '__call', 'apply', 'getFilters', 'getFindables', 'getSearchables', 'getSortables', 'buildSearch', 'buildSql',\n 'eq', 'ne', 'lt', 'lte', 'gt', 'gte', 'between', 'in', 'not_in', 'null', 'not_null', 'begins_with', 'contains', 'ends_with'\n ]);\n $filters = array_merge($filters, array_map(function ($findable, $key) {\n return is_array($findable) ? $key : $findable;\n }, $this->findables, array_keys($this->findables)));\n $filters = array_merge($filters, array_map(function ($searchable, $key) {\n return is_array($searchable) ? $key : $searchable;\n }, $this->searchables, array_keys($this->searchables)));\n $filters = array_merge($filters, array_filter($this->request->keys(), function ($key) {\n return Str::contains($key, '__') || is_array($this->request->get($key));\n }));\n\n return Arr::only($this->request->query(), array_unique($filters));\n }", "public function getQuery()\n {\n $filter = new BoolQuery;\n\n foreach ($this->points as $point) {\n $args = [];\n\n $args['gte'] = $point[0];\n\n // If we have a single array, just do LTE\n if (isset($point[1])) {\n $args['lte'] = $point[1];\n }\n\n $range = new Range('min_price', $args);\n\n $filter->addShould($range);\n }\n\n return $filter;\n }", "function prepareFilter() {\r\n\t\tif (isset($_GET['show_filter_' . $this->listName])) {\r\n\t\t\t$this->filterVisible = true;\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($_GET[$this->listName])) {\r\n\t\t\tforeach($this->columns as $colname => $colDetails) {\r\n\t\t\t\t$value = trim(KT_getRealValue(\"GET\", $this->listName.'_'.$colname));\r\n\t\t\t\tif ($value!='') {\r\n\t\t\t\t\t$this->filter[$colname] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$condition = '';\r\n\t\tif (count($this->filter) > 0) {\r\n\t\t\tforeach ($this->filter as $colname => $value) {\r\n\t\t\t\tif ($condition != '') {\r\n\t\t\t\t\t$condition .= \" AND \";\r\n\t\t\t\t}\r\n\t\t\t\t$compareType = $this->columns[$colname]['compare_type'];\r\n\t\t\t\t$type = $this->columns[$colname]['type'];\r\n\t\t\t\tswitch ($type) {\r\n\t\t\t\t\tcase 'NUMERIC_TYPE':\r\n\t\t\t\t\tcase 'DOUBLE_TYPE':\r\n\t\t\t\t\t\t// if decimal separator is , => .\r\n\t\t\t\t\t\t$value = str_replace(',', '.', $value);\r\n\t\t\t\t\t\tif (preg_match('/^(<|>|=|<=|>=|=<|=>|<>|!=)\\s?-?\\d*\\.?\\d+$/', $value, $matches)) {\r\n\t\t\t\t\t\t\t$modifier = trim($matches[1]);\r\n\t\t\t\t\t\t\tif ($modifier == '!=') {\r\n\t\t\t\t\t\t\t\t$modifier = '<>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$value = trim(substr($value, strlen($modifier)));\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . ' ' . $modifier . ' ' . $value;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . ' ' . $compareType . ' ' . KT_escapeForSql($value, $type);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'CHECKBOX_1_0_TYPE':\r\n\t\t\t\t\tcase 'CHECKBOX_-1_0_TYPE':\r\n\t\t\t\t\t\tif (preg_match('/^[<>]{1}\\s?-?\\d*\\.?\\d+$/', $value)) {\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . $value;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . \" = \" . KT_escapeForSql($value, $type);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'DATE_TYPE':\r\n\t\t\t\t\tcase 'DATE_ACCESS_TYPE':\r\n\t\t\t\t\t\t$localCond = $this->prepareDateCondition($colname, $this->columns[$colname], $value);\r\n\t\t\t\t\t\tif ($localCond != '') {\r\n\t\t\t\t\t\t\t$condition .= $localCond;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tswitch ($compareType) {\r\n\t\t\t\t\t\t\tcase '=':\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'A%':\r\n\t\t\t\t\t\t\t\t$value = $value . '%';\r\n\t\t\t\t\t\t\t\t$compareType = 'LIKE';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase '%A':\r\n\t\t\t\t\t\t\t\t$value = '%' . $value;\r\n\t\t\t\t\t\t\t\t$compareType = 'LIKE';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t\t$value = '%' . $value . '%';\r\n\t\t\t\t\t\t\t\t$compareType = 'LIKE';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$value = KT_escapeForSql($value, $type);\r\n\t\t\t\t\t\t$condition .= KT_escapeFieldName($colname) . ' ' . $compareType . ' ' . $value;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} // end foreach\r\n\t\t\tif ($condition != '') {\r\n\t\t\t\t$this->filterCalculated = $condition;\r\n\t\t\t}\r\n $this->filterCalculated = str_replace(\"%\",\"%%\", $this->filterCalculated);\r\n\t\t} \t\t\r\n\t}", "protected function buildCondition(...$params)\n {\n if ($this->ignore) {\n return;\n }\n\n $column = explode('.', $this->column);\n\n if (count($column) == 1) {\n return [$this->query => &$params];\n }\n\n return $this->buildRelationQuery(...$params);\n }", "public function getAll()\n {\n return $this->startConditions()->all();\n }", "public function getAppliedFilterQueries(): array;", "public function getFilters ()\r\n {\r\n $q = '1=1';\r\n if ($this->_where)\r\n $q = $this->_where;\r\n if (!empty ($this->_order))\r\n $q .= ' ORDER BY '.implode (', ', $this->_order);\r\n if ($this->_limit)\r\n $q .= 'LIMIT '.$this->_limit;\r\n return $q;\r\n }", "public function getHttpQuery(): array\n {\n if (0 === count($this->parts)) {\n return [];\n }\n\n return [\n 'filter' => implode('|', $this->parts),\n 'filtertype' => $this->type,\n ];\n }", "public static function get_filter_data()\n {\n $operators = array(\n 'equal',\n 'not_equal',\n 'is_empty',\n 'is_not_empty'\n );\n return array(\n 'input' => 'select',\n 'operators' => $operators,\n 'special_vars' => array(),\n );\n }" ]
[ "0.7151067", "0.62416357", "0.6051868", "0.59927833", "0.59837884", "0.5964911", "0.58749753", "0.5863591", "0.58356607", "0.58356607", "0.5825054", "0.580935", "0.57657206", "0.574246", "0.57252264", "0.5717352", "0.5606988", "0.5590183", "0.5589054", "0.55830276", "0.55830276", "0.55830276", "0.5534937", "0.5532007", "0.5530086", "0.5523719", "0.55199826", "0.54925287", "0.54814154", "0.5469179", "0.54499614", "0.5442211", "0.54387087", "0.5437465", "0.54289824", "0.5426439", "0.54227245", "0.54064995", "0.5365547", "0.53620535", "0.5303079", "0.5293846", "0.529175", "0.5284572", "0.52713513", "0.5265768", "0.5249425", "0.52438253", "0.52438253", "0.52304703", "0.5224783", "0.5223068", "0.5222078", "0.5205271", "0.51968795", "0.51916564", "0.519019", "0.51758635", "0.51690453", "0.51679265", "0.5163583", "0.5163059", "0.5156798", "0.51529145", "0.51503533", "0.5148945", "0.5139048", "0.5137588", "0.51311433", "0.51201606", "0.5115361", "0.5111559", "0.50959724", "0.5084955", "0.50839317", "0.5077301", "0.507407", "0.5073784", "0.50573254", "0.5055843", "0.50523025", "0.5047672", "0.50423706", "0.5031285", "0.5010385", "0.49947968", "0.4981965", "0.49718544", "0.49703464", "0.496911", "0.49683914", "0.4964038", "0.49623743", "0.49619034", "0.49603868", "0.4959335", "0.49566746", "0.49551386", "0.49546504", "0.49546018" ]
0.8020509
0
Detects if first node of relation is bound.
Обнаруживает, является ли первый узел отношения связанным.
public function isBoundAtStart() { return $this->nodeAtIndex( 0 )->isBound(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBound()\n {\n return $this->bound;\n }", "public function isBound();", "public function isBound( $requireAll = false ) {\n\t\tif ( !$this->isComplete() )\n\t\t\treturn false;\n\n\t\tforeach ( $this->nodes as $node )\n\t\t\t/** @var model_relation_node $node */\n\t\t\tif ( $node->isBound() ) {\n\t\t\t\tif ( !$requireAll )\n\t\t\t\t\treturn true;\n\t\t\t} else if ( $requireAll )\n\t\t\t\treturn false;\n\n\t\treturn $requireAll ? true : false;\n\t}", "public function isBound()\n\t\t{\n\t\t\treturn $this->isBound;\n\t\t}", "public function isBound(){ return $this->hasField('bound'); }", "public function isComplete()\n\t{\n\t\t// relation is declared completely if set of references has been derived\n\t\t// from set of nodes on recently adding node not wanting another successor\n\t\treturn !is_null( $this->references );\n\t}", "public function isBoundAtEnd() {\n\t\treturn $this->nodeAtIndex( -1 )->isBound();\n\t}", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function binding(): bool;", "public function bound();", "public function hasRelation(): bool;", "abstract public function isBoundToElementable(): bool;", "public function isFirst()\n {\n if ($this->isRoot()) {\n return false;\n }\n\n return $this->getParent()->getFirstChild() === $this;\n }", "public function hasBoundingPoly(){\n return $this->_has(7);\n }", "public function isFirst()\n {\n return ($this->pointer === 0);\n }", "public function IsReachable()\n {\n return $this->Top()->IsReachable();\n }", "public function isRelationWithSelf() {\n return $this->isRelationWithSelf;\n }", "public function isFirst()\n\t{\n\t\treturn $this->getAttribute($this->positionColumn) === $this->topOfList;\n\t}", "public function hasFdBoundingPoly(){\n return $this->_has(2);\n }", "public function isBoundAtModel( $model = null, $alias = null ) {\n\t\t$node = $this->findNode( $model, $alias, null, false );\n\t\tif ( $node )\n\t\t\treturn $node->isBound();\n\n\t\treturn false;\n\t}", "public function valid() {\n\t\treturn $this->cursor < count($this->nodes);\n\t}", "private function isRHSMany()\n {\n return ($this->selfReferencing &&\n (\n (isset($this->lhsLinkDef['side']) && isset($this->lhsLinkDef['link-type']) &&\n $this->lhsLinkDef['side'] == 'left' && $this->lhsLinkDef['link-type'] == 'one') ||\n (isset($this->rhsLinkDef['side']) && isset($this->rhsLinkDef['link-type']) &&\n $this->rhsLinkDef['side'] == 'right' && $this->rhsLinkDef['link-type'] == 'many')\n )\n );\n }", "public function getConditionOnBoundNodes() {\n\t\tif ( !$this->isComplete() )\n\t\t\tthrow new \\RuntimeException( 'relation is not complete' );\n\n\t\t$conditions = array();\n\n\t\tforeach ( $this->nodes as $node ) {\n\t\t\t/** @var model_relation_node $node */\n\t\t\t$state = $node->isBound( null );\n\t\t\tif ( $state & model_relation_node::BINDING_PREDECESSOR )\n\t\t\t\t$conditions[] = array(\n\t\t\t\t\t'filter' => implode( ' AND ', array_map( function( $p ) { return \"$p=?\"; }, $node->getPredecessorNames( $this->datasource, true ) ) ),\n\t\t\t\t\t'values' => $node->getPredecessorValues(),\n\t\t\t\t);\n\n\t\t\tif ( $state & model_relation_node::BINDING_SUCCESSOR )\n\t\t\t\t$conditions[] = array(\n\t\t\t\t\t'filter' => implode( ' AND ', array_map( function( $p ) { return \"$p=?\"; }, $node->getSuccessorNames( $this->datasource, true ) ) ),\n\t\t\t\t\t'values' => $node->getSuccessorValues(),\n\t\t\t\t);\n\t\t}\n\n\t\treturn $conditions;\n\t}", "public function hasParent()\n {\n return $this->origin !== null && $this->origin !== 0;\n }", "public function wasBoundBy()\n {\n return $this->boundBy;\n }", "public function isBnode()\n {\n if (substr($this->_uri, 0, 2) == '_:') {\n return true;\n } else {\n return false;\n }\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function isLinked()\n {\n return $this->root !== null;\n }", "public function isNotEmpty(){ return (bool)$this->numNodes; }", "public function isBound($abstract)\n {\n return isset($this->bindings[$abstract]);\n }", "public function hasMinLatLng(){\n return $this->_has(1);\n }", "function isObstacle($node) {\n $obstacle = QuadTypeEnum::ROCK;//'X';\n\n return $node->value == $obstacle;\n}", "public function hasAdditionalBindings()\n {\n return $this->additionalBindings->count() > 0;\n }", "public function isBound($className)\n {\n return isset($this->_bound[$className]);\n }", "public function isBound($classOrInterface);", "protected function bound($arg)\n {\n return\n $this->getContainer()->isRegistered($arg) ||\n $this->getContainer()->isSingleton($arg) ||\n $this->getContainer()->resolveClassName($arg)\n ;\n }", "public function isBound($classOrInterface)\n {\n return $this->bindingsResolver->isBound($classOrInterface);\n }", "public function hasRelations() {\n return !empty($this->_relations);\n }", "public function isBound($classOrInterface) {\n\t\treturn $this->offsetExists($classOrInterface);\n\t}", "public function isEmpty()\n {\n return $this->bottom === null;\n\n }", "public function isRoot()\n {\n /** @var ActiveRecord $owner */\n $owner = $this->owner;\n return $owner->getAttribute($this->leftAttribute) == 1;\n }", "public function hasStart(){\n return $this->_has(1);\n }", "function isEmpty() {\n return $this->head == NULL;\n }", "public function isEmpty()\n {\n return $this->head === null;\n }", "public function hasRelations()\n {\n return 0 < count($this->relations);\n }", "public function firstPath(): bool {\n\t\treturn $this->first_path;\n\t}", "public function first() {\n\t\tif ($this->documentElement->hasChildNodes()) {\n\t\t\t$this->_node = $this->documentElement->firstChild;\n\t\t\treturn $this->_node;\n\t\t} else {\n\t\t\t$this->_node = null;\n\t\t\treturn false;\n\t\t}\n\t}", "public function tree_has_next_sibling()\n\t{\n\t\treturn ! is_null($this->tree_get_next_sibling($this));\n\t}", "public function isFirst()\n {\n return !$this->isEmpty()\n ? $this->position === 0\n : null\n ;\n }", "public function hasMinLikelihood(){\n return $this->_has(2);\n }", "public function hasPosition(){\n return $this->_has(1);\n }", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "public function isOfLevelOne()\n\t{\n\t\treturn $this->parent\t==\t1 ? true : false;\n\t}", "public function isFull(): bool\n {\n return $this->drips() >= $this->max();\n }", "public function isGeoref(){\n\t\tif (($this->getLat()) && ($this->getLon())){\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function __getMin($model, $scope, $left) {\n\t\tlist($edge) = array_values($model->find($scope, \"MIN({$left}) AS {$left}\", null, -1));\n\t\treturn ife(empty ($edge[$left]), 0, $edge[$left]); // Is the tree empty?\n}", "public function isFirst(): bool;", "public function isFirst(): bool;", "public function isEmpty() {\n return $this->node === NULL;\n }", "public function isFirst()\n {\n return $this->getNumber() == 1;\n }", "public function hasBindVariables(){\n return $this->_has(2);\n }", "public function hasBind($event);", "protected function parseSingleRelationship($relation)\n {\n if (!$value = $this->parseForCommonValues($relation)) {\n return true;\n }\n\n if ($value instanceof Collection || is_array($value) || $value instanceof CollectionProxy) {\n throw new MappingException(\"Entity's attribute $relation should not be array, or collection\");\n }\n\n if ($value instanceof EntityProxy && !$value->isLoaded()) {\n $this->relationships[$relation] = [];\n\n return true;\n }\n\n // If the attribute is a loaded proxy, swap it for its\n // loaded entity.\n if ($value instanceof EntityProxy && $value->isLoaded()) {\n $value = $value->getUnderlyingObject();\n }\n\n if ($this->isParentOrRoot($value)) {\n $this->relationships[$relation] = [];\n\n return true;\n }\n\n // At this point, we can assume the attribute is an Entity instance\n // so we'll treat it as such.\n $subAggregate = $this->createSubAggregate($value, $relation);\n\n // Even if it's a single entity, we'll store it as an array\n // just for consistency with other relationships\n $this->relationships[$relation] = [$subAggregate];\n\n // We always need to check a loaded relation is in sync\n // with its local key\n $this->needSync[] = $relation;\n\n return true;\n }", "protected function hasNodeset()\n {\n return !is_null($this->getNodeset());\n }", "public function hasNormalizedHitPosition()\n {\n return $this->normalized_hit_position !== null;\n }", "function isGoal($node, $goal) {\n //return ($node->row == $goal->row && $node->col == $goal->col);\n\n return isSameNode($node, $goal);\n\n}", "public function isNotNull($relation) {\n\t\treturn isset($this->relations[$relation]);\n\t}", "public function getRelationable(): ?bool\n {\n // Otherwise no member, but only subgroups are allowed.\n return $this->relationable;\n }", "public function isCurrentAncestor()\n {\n if (null === $this->isCurrentAnchestor)\n {\n $this->isCurrentAnchestor = false;\n\n foreach ($this->getChildren() as $child)\n {\n if ($child->isOnCurrentPath())\n {\n $this->isCurrentAnchestor = true;\n\n break;\n }\n }\n }\n\n return $this->isCurrentAnchestor;\n }", "public function externalRelationLoaded(string $relationName): bool;", "public function isPartial() : bool\n {\n return $this->firstEventNumber() > 0;\n }", "public function hasChild() {\n global $CFG, $DB;\n\n if ($this->id == 0) {\n return FALSE;\n }\n\n if ($data = $DB->get_records('buildings_room', array('floorid' => $this->id))) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function tree_is_root()\n\t{\n\t\treturn $this->tree_is_valid($this) and $this->{$this->configuration['left_field']} == 1;\n\t}", "public function isLeaf()\n {\n /** @var ActiveRecord $owner */\n $owner = $this->owner;\n return $owner->getAttribute($this->rightAttribute)\n - $owner->getAttribute($this->leftAttribute) === 1;\n }", "public function has_or_relation()\n {\n }", "public function getHasOneVars()\n {\n $v = parent::getHasOneVars();\n $has_one = $v ? $v->getConfiguration() : array ();\n foreach (SilverSmithProject::get_all_nodes() as $node) {\n if ($components = $node->getComponents()) {\n if ($me = $components->get($this->key)) {\n if ($me->getType() == \"many\") {\n $has_one[$node->key] = $node->key;\n }\n }\n }\n }\n \n return empty($has_one) ? false : new BedrockNode(\"Root\",$has_one,\"Root\");\n }", "public function isTreeRoot()\n {\n return $this->owner->getAttribute($this->leftAttribute) == 1;\n }", "public function isFirst()\n {\n return $this->species->id === $this->firstId();\n }", "public function isRelation($key);", "protected function isRelation()\n {\n return in_array(\"relation\", explode(\".\", request()->route()->getName()));\n }", "function sumo_verify_node_local($node='')\n{\n\tGLOBAL $SUMO;\n\n\t$node = !$node ? $SUMO['server']['ip'] : $node;\n\t$local = array('127.0.0.1',\n\t\t 'localhost',\n\t\t $SUMO['server']['name'],\n\t\t $SUMO['server']['ip']);\n\n\treturn in_array($node, $local) ? true : false;\n}", "public function relation_exists($name) {\n\t\treturn isset($this->_rels[$name]);\n\t}", "public function hasScope() {\n return (sizeof(trim($this->scope)) > 0);\n }", "public function hasBase()\n {\n return $this->get(self::BASE) !== null;\n }", "public function isOnOneNetwork() {\n $networks = array();\n foreach ($this->nodesNetwork as $cols) {\n foreach ($cols as $networkId) {\n $networks[$networkId] = true;\n }\n }\n return 1 === count($networks);\n }", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === null;\n }", "public function valid() {\n return $this->nodeList->item($this->offset) !== NULL;\n }", "public function testRelationIsAvailable()\n\t{\n\t\t$query = RelationQuery::make('relation:value');\n\n\t\t$this->assertSame('relation', $query->getRelated());\n\t}", "public function tree_has_previous_sibling()\n\t{\n\t\treturn ! is_null($this->tree_get_previous_sibling($this));\n\t}", "public function has_ng( $id )\n\t{\n\t\t$ngs = $this->get_ancestors( $id , array(\n\t\t\t'data' => 'id',\n\t\t\t'type' => 'ng',\n\t\t\t'format' => 'array',\n\t\t\t'deep' => true\n\t\t));\n\t\tif ( empty( $ngs ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isOnCurrentPath()\n {\n return $this->isCurrent() || $this->isCurrentAncestor();\n }", "public function query( $blnBind = true )\n\t{\n\t\tif ( !$this->isComplete() )\n\t\t\tthrow new \\LogicException( 'relation is not complete' );\n\n\t\tif ( !$this->datasource )\n\t\t\tthrow new \\RuntimeException( 'relation is not configured to use datasource, yet' );\n\n\n\t\t/** @var query $query */\n\t\t$source = $this->datasource;\n\t\t$query = null;\n\n\t\tforeach ( $this->references as $reference ) {\n\t\t\t/** @var model_relation_reference $reference */\n\n\t\t\t// cache access on nodes of reference\n\t\t\t$predecessor = $reference->getPredecessor();\n\t\t\t$successor = $reference->getSuccessor();\n\n\t\t\t// create query starting on on current node\n\t\t\tif ( !$query )\n\t\t\t\t$query = $source->createQuery( $predecessor->getFullName() );\n\n\t\t\t// convert reference into join\n\t\t\t$preSet = $source->qualifyDatasetName( $predecessor->getName() );\n\t\t\t$postSet = $source->qualifyDatasetName( $successor->getName() );\n\n\t\t\t$join = implode( ' AND ', array_map( function( $preProp, $postProp ) use ( $source, $preSet, $postSet ) {\n\t\t\t\treturn \"$preSet.$preProp=$postSet.$postProp\";\n\t\t\t}, $predecessor->getSuccessorNames( $source ), $successor->getPredecessorNames( $source ) ) );\n\n\t\t\t// add join to query\n\t\t\t$query->addDataset( $successor->getFullName( $source ), $join );\n\n\n\t\t\t// optionally convert binding of reference into filter on query\n\t\t\tif ( $blnBind && $reference->isBound() ) {\n\t\t\t\t// qualify and quote names of binding properties in reference\n\t\t\t\t$bindSet = $reference->getReferencingNode()->getName( false, $source );\n\t\t\t\t$properties = $source->qualifyPropertyNames( $bindSet, $reference->getReferencingPropertyNames() );\n\n\t\t\t\t// convert set of names into filtering term\n\t\t\t\t$filter = implode( ' AND ', array_map( function( $name ) { return \"$name=?\"; }, $properties ) );\n\n\t\t\t\t// add filter to query\n\t\t\t\t$query->addCondition( $filter, true, $reference->getBindingValues() );\n\t\t\t}\n\t\t}\n\n\n\t\treturn $query;\n\t}", "public function isLocal()\n {\n // assure that the transformer is prepared\n if (!$this->_prepared) {\n $this->_prepare();\n }\n\n return (!is_null($this->_getSubscriber()));\n }", "public function isDescendantOf(Geo $item)\r\n {\r\n return ($this->left > $item->left) && ($this->right < $item->right);\r\n }", "public function isRoot();", "public function isRoot();" ]
[ "0.6636115", "0.6575287", "0.6516969", "0.64499766", "0.6419238", "0.6048363", "0.58759403", "0.5751794", "0.5751794", "0.57171214", "0.5653152", "0.5468622", "0.54252577", "0.5389575", "0.5368437", "0.5353251", "0.5324166", "0.53046125", "0.5289143", "0.5271768", "0.52309203", "0.52092016", "0.5205587", "0.51581115", "0.51094365", "0.5101081", "0.50869894", "0.5082473", "0.5082473", "0.5082473", "0.5082473", "0.50590795", "0.5046742", "0.50457394", "0.5034232", "0.5027317", "0.50230026", "0.5021337", "0.50042576", "0.49776503", "0.49719658", "0.49700594", "0.4952889", "0.49498725", "0.49269614", "0.49098638", "0.48954937", "0.48892036", "0.4887534", "0.48732838", "0.48572582", "0.48538405", "0.4835576", "0.48211706", "0.48197824", "0.48087853", "0.4799426", "0.4796665", "0.47811973", "0.47727242", "0.476783", "0.476783", "0.47676578", "0.47582072", "0.47518605", "0.47516915", "0.47515738", "0.47510698", "0.47483099", "0.47466913", "0.47429416", "0.47382125", "0.4732452", "0.47293895", "0.47271845", "0.47259185", "0.4725379", "0.47150642", "0.4711962", "0.47019294", "0.4692541", "0.4692395", "0.46898937", "0.46877283", "0.46799976", "0.46762544", "0.46757492", "0.4659923", "0.46567827", "0.4655867", "0.4647712", "0.4646717", "0.4646249", "0.4634953", "0.46337363", "0.46257967", "0.46238694", "0.46223918", "0.46220243", "0.46220243" ]
0.7302503
0
Detects if last node of relation is bound.
Обнаруживает, является ли последний узел отношения связанным.
public function isBoundAtEnd() { return $this->nodeAtIndex( -1 )->isBound(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBound()\n {\n return $this->bound;\n }", "public function isBound()\n\t\t{\n\t\t\treturn $this->isBound;\n\t\t}", "public function isLast()\n {\n if ($this->isRoot()) {\n return false;\n }\n\n return $this->getParent()->getLastChild() === $this;\n }", "public function isBound();", "public function isComplete()\n\t{\n\t\t// relation is declared completely if set of references has been derived\n\t\t// from set of nodes on recently adding node not wanting another successor\n\t\treturn !is_null( $this->references );\n\t}", "public function isLast()\n\t{\n\t\tif ($position = $this->getAttribute($this->positionColumn)) {\n\t\t\tif (!$this->where($this->positionColumn, '>', $position)->first()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "public function isBound(){ return $this->hasField('bound'); }", "public function isBound( $requireAll = false ) {\n\t\tif ( !$this->isComplete() )\n\t\t\treturn false;\n\n\t\tforeach ( $this->nodes as $node )\n\t\t\t/** @var model_relation_node $node */\n\t\t\tif ( $node->isBound() ) {\n\t\t\t\tif ( !$requireAll )\n\t\t\t\t\treturn true;\n\t\t\t} else if ( $requireAll )\n\t\t\t\treturn false;\n\n\t\treturn $requireAll ? true : false;\n\t}", "public function isLast()\n {\n $collection = $this->parent()->collection('content', false);\n return $collection->isLast($this->path());\n }", "public function isLast(): bool\n {\n return $this->_last;\n }", "protected function isLastLevel()\n {\n return ($this->level == $this->aggregator->groupingCount());\n }", "public function isBoundAtStart() {\n\t\treturn $this->nodeAtIndex( 0 )->isBound();\n\t}", "public function last() {\n\t\tif ($this->documentElement->hasChildNodes()) {\n\t\t\t$this->_node = $this->documentElement->lastChild;\n\t\t\treturn $this->_node;\n\t\t} else {\n\t\t\t$this->_node = null;\n\t\t\treturn false;\n\t\t}\n\t}", "public function isLast()\n {\n return !$this->isEmpty()\n ? $this->position === $this->count() - 1\n : null\n ;\n }", "public function isLast() {\n\t\treturn (bool) $this->last;\n\t}", "public function isLast(): bool;", "public function isLast()\n {\n return $this->getNumber() == $this->count();\n }", "public function isLast()\r\n {\r\n \treturn $this->isLast;\r\n }", "public function isLast() {\n return FALSE;\n }", "public function isLastIfd()\n {\n return $this->next === null;\n }", "public function isLast()\n {\n return ($this->pointer + 1 === count($this->iterativeKeys));\n }", "public function isLast() {\n return $this->index == count($this->array) - 1;\n }", "public function isLast(): bool\n {\n return ($this->index === ($this->count - 1));\n }", "public function isLeaf()\n {\n /** @var ActiveRecord $owner */\n $owner = $this->owner;\n return $owner->getAttribute($this->rightAttribute)\n - $owner->getAttribute($this->leftAttribute) === 1;\n }", "public function hasEnd(){\n return $this->_has(2);\n }", "public function isLast()\n {\n return $this->species->id === $this->lastId();\n }", "public function atEnd() {\n\t\treturn $this->size == $this->endPointer;\n\t}", "public function isLast()\n\t{\n\t\treturn !$this->cacheValid;\n\t}", "public function isLast()\n {\n foreach ($this->getAllItems() as $item) {\n if (!$item->isLast()) {\n return false;\n }\n }\n return true;\n }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function last() {\n $s= sizeof($this->nodes);\n return $s ? $this->nodes[$s - 1] : null;\n }", "public function hasEnd()\n {\n return isset($this->end);\n }", "public function isLastStep() {\n return $this->getStepNb() == $this->circuit->getNbSteps();\n }", "public function isLast()\n\t{\n\t\tif (null === $this->isLast) {\n\t\t\t$this->isLast = ($this->totalProducts <= ($this->requestParams->getCount() + $this->requestParams->getOffset()));\n\t\t}\n\n\t\treturn $this->isLast;\n\t}", "public function hasBoundingPoly(){\n return $this->_has(7);\n }", "public function valid() {\n\t\treturn $this->cursor < count($this->nodes);\n\t}", "public function is_last_chunk()\n\t{\n\t\treturn ($this->_chunks == 0 OR ($this->_chunk == ($this->_chunks - 1)));\n\t}", "public function getLast() {\n return end($this->Nodes);\n }", "public function binding(): bool;", "static function last() {\n if( self::$_ != 0 && self::test( self::$cycle ) == 0 ) return TRUE;\n return FALSE;\n }", "public function isAfterLast();", "public function hasAdditionalBindings()\n {\n return $this->additionalBindings->count() > 0;\n }", "public function isLast(): bool\n {\n return $this->header->chunkNumber === $this->header->chunkTotalNumber;\n }", "public function isLast($element): bool;", "function atLastPage()\n {\n if ($this->currentPage == $this->lastPage())\n {\n return true;\n }\n return false;\n }", "public function isLinked()\n {\n return $this->root !== null;\n }", "public function hasRelation(): bool;", "function isLastValue(){\n \t\tif($this->currentRow == $this->rows){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "public function isFull(): bool\n {\n return $this->drips() >= $this->max();\n }", "public function isIsLend() {\n\t\treturn $this->getIsLend();\n\t}", "public function wasBoundBy()\n {\n return $this->boundBy;\n }", "public function isLeafNode()\n {\n $fieldNameOfLeftValue = static::getFieldNameOfLeftValue();\n $fieldNameOfRightValue = static::getFieldNameOfRightValue();\n return (int)$this->$fieldNameOfRightValue - (int)$this->$fieldNameOfLeftValue === 1;\n }", "public function hasMaxLatLng(){\n return $this->_has(2);\n }", "public function end ()\n {\n return $this->cursor >= $this->length;\n }", "public function isNotEmpty(){ return (bool)$this->numNodes; }", "public function tree_has_next_sibling()\n\t{\n\t\treturn ! is_null($this->tree_get_next_sibling($this));\n\t}", "public function isRelationWithSelf() {\n return $this->isRelationWithSelf;\n }", "public function isBnode()\n {\n if (substr($this->_uri, 0, 2) == '_:') {\n return true;\n } else {\n return false;\n }\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function actsLikeLast(): bool;", "public function isBoundAtModel( $model = null, $alias = null ) {\n\t\t$node = $this->findNode( $model, $alias, null, false );\n\t\tif ( $node )\n\t\t\treturn $node->isBound();\n\n\t\treturn false;\n\t}", "function has_children()\n\t{\n\t\treturn $this->rgt > ($this->lft + 1);\n\t}", "public function isMaxNumberReach();", "public function hasFdBoundingPoly(){\n return $this->_has(2);\n }", "public function isLastPage(): bool\n {\n return $this->page() === $this->lastPage();\n }", "public function isLastPage()\n {\n return $this->page == $this->lastPage;\n }", "public function bound();", "public function isLastEntry() {\n\t\treturn true;\n\t}", "public function hasRelations() {\n return !empty($this->_relations);\n }", "public function hasRelations()\n {\n return 0 < count($this->relations);\n }", "public function isLeaf()\n\t{\n // Sanity checks on current node position\n if($this->lft >= $this->rgt)\n {\n\t throw new TreeInvalidLftRgtCurrent;\n }\n\n\t\treturn ($this->rgt - 1) == $this->lft;\n\t}", "public function IsReachable()\n {\n return $this->Top()->IsReachable();\n }", "public function hasVEnd(){\n return $this->_has(17);\n }", "public function hasChildren(): bool\n {\n $children = (($this->getRgt() - $this->getLft()) - 1) / 2;\n return (0 === $children) ? false : true;\n }", "protected function isAfterLastPage() : bool {}", "public function hasMaxlayer(){\n return $this->_has(5);\n }", "public function isBound($abstract)\n {\n return isset($this->bindings[$abstract]);\n }", "protected function depthIsInRange()\n {\n return ($this->getRemainingDepth() > 0);\n }", "public function hasEndClosed(){\n return $this->_has(3);\n }", "public function isLastPage() {}", "public function has_linked_children()\n\t{\n\t\treturn isset($this->data[ 'linked_children' ]);\n\t}", "public function isBound($classOrInterface)\n {\n return $this->bindingsResolver->isBound($classOrInterface);\n }", "public function isDescendantOf(Geo $item)\r\n {\r\n return ($this->left > $item->left) && ($this->right < $item->right);\r\n }", "public function isRoot()\n {\n /** @var ActiveRecord $owner */\n $owner = $this->owner;\n return $owner->getAttribute($this->leftAttribute) == 1;\n }", "public function isEmpty()\n {\n return $this->bottom === null;\n\n }", "public function is_last_question() {\n\t\t$last_question = end($this->questions);\n\t\t$value = $last_question==$this->current_question ? \"true\" : \"false\" ;\n\t\treturn $last_question==$this->current_question;\n\t}", "public function isLeaf() {\n return !( $this->isEmpty() && $this->left->isEmpty() && $this->right->isEmpty() );\n }", "abstract public function isBoundToElementable(): bool;", "public function isLeaf() {\n return !$this->getNumberChildren();\n }", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "public function chainLastBlock(){\n return $this->fetch_nis('/chain/last-block');\n }", "function isClosed(): bool { return ($this->coords[0] == $this->coords[count($this->coords)-1]); }", "public function hasLongitude()\n {\n return $this->longitude !== null;\n }", "public function getEndNode()\n\t{\n\t\treturn $this->end;\n\t}", "public function getNumDescendants()\n {\n return max($this->{$this->_right_side} - $this->{$this->_left_side} - 1, 0);\n }", "public function isBound($className)\n {\n return isset($this->_bound[$className]);\n }" ]
[ "0.66687745", "0.6557291", "0.6417121", "0.6412177", "0.62942976", "0.62600213", "0.6210819", "0.61188114", "0.60537827", "0.60416687", "0.6023539", "0.60193104", "0.60101765", "0.59667015", "0.5925113", "0.59000874", "0.58987606", "0.58750546", "0.5861016", "0.5838672", "0.5805911", "0.57723373", "0.5693018", "0.5683394", "0.56564003", "0.5640487", "0.5618739", "0.5595544", "0.55944055", "0.5574804", "0.5574804", "0.55313927", "0.55207044", "0.5520583", "0.54556376", "0.544768", "0.5430936", "0.54069734", "0.54048437", "0.5403956", "0.5400605", "0.5400549", "0.53550607", "0.53391147", "0.5334897", "0.533475", "0.53304666", "0.53191346", "0.53098994", "0.5266493", "0.52641773", "0.5255164", "0.52532053", "0.52479637", "0.5246478", "0.52381116", "0.5234913", "0.52274233", "0.5225248", "0.5224206", "0.5224206", "0.5224206", "0.5224206", "0.52227706", "0.5219772", "0.5219285", "0.52183664", "0.5213827", "0.5201438", "0.5200733", "0.51990587", "0.5188002", "0.51631504", "0.51296455", "0.5128998", "0.5120092", "0.51137763", "0.51100653", "0.5100951", "0.50867236", "0.506654", "0.50456935", "0.5037033", "0.5009356", "0.49929124", "0.49828872", "0.4978538", "0.49727872", "0.49716535", "0.49662215", "0.4961655", "0.49597517", "0.49488318", "0.49427646", "0.49415365", "0.49377614", "0.49219897", "0.4921678", "0.4896185", "0.48807895" ]
0.7515569
0
Detects if relation is of type "manytomany". A manytomanyrelation consists of at least one manytomanynode. This is a node actively referencing either of its neighbouring nodes.
Определяет, является ли отношение типом "многокко многим". Отношение "многокко многим" состоит как минимум из одного узла "многокко многим". Это узел, активно ссылающийся на один из соседних узлов.
public function isManyToMany() { if ( !$this->isComplete() ) return false; if ( $this->size() <= 2 ) return false; return !!$this->findNode( null, null, function( $node ) { /** @var model_relation_node $node */ return $node->isManyToMany(); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHasManyAndBelongsToMany() {\n return $this->isHasManyAndBelongsToMany;\n }", "public function isManyMutation($mutation)\n {\n return isset($this->mutations[$mutation]) && $this->mutations[$mutation]['type'] === 'many';\n }", "protected function parseManyRelationship($relation)\n {\n if (!$value = $this->parseForCommonValues($relation)) {\n return true;\n }\n\n if (is_array($value) || $value instanceof Collection) {\n $this->needSync[] = $relation;\n }\n\n // If the relation is a proxy, we test is the relation\n // has been lazy loaded, otherwise we'll just treat\n // the subset of newly added items.\n if ($value instanceof CollectionProxy && $value->isLoaded()) {\n $this->needSync[] = $relation;\n $value = $value->getUnderlyingCollection();\n }\n\n if ($value instanceof CollectionProxy && !$value->isLoaded()) {\n $value = $value->getAddedItems();\n }\n\n // At this point $value should be either an array or an instance\n // of a collection class.\n if (!is_array($value) && !$value instanceof Collection) {\n throw new MappingException(\"'$relation' attribute should be array() or Collection\");\n }\n\n $this->relationships[$relation] = $this->createSubAggregates($value, $relation);\n\n return true;\n }", "public function isOneToMany()\n {\n return false;\n }", "public function isManyToMany($deep = true)\n {\n if (null === $this->isM2M) {\n $fkeys = [];\n switch (true) {\n // user hinted that this is a m2m table or not\n case in_array($m2m = $this->parseComment('m2m'), ['true', 'false']):\n $this->isM2M = 'true' === $m2m ? true : false;\n $this->getDocument()->addLog(sprintf(' * %s: M2M from comment \"%s\"', $this->getRawTableName(), var_export($this->isM2M, true)));\n break;\n // contains 2 foreign keys\n case (2 !== count($fkeys = $this->getForeignKeys())):\n $this->isM2M = false;\n $this->getDocument()->addLog(sprintf(' * %s: M2M set to false, foreign keys not equal to 2', $this->getRawTableName()));\n break;\n // different foreign tables\n case ($fkeys[0]->getReferencedTable()->getId() === $fkeys[1]->getReferencedTable()->getId()):\n $this->isM2M = false;\n $this->getDocument()->addLog(sprintf(' * %s: M2M set to false, foreign table is same', $this->getRawTableName()));\n break;\n // foreign tables is not many to many\n case $deep && $fkeys[0]->getReferencedTable()->isManyToMany(false):\n case $deep && $fkeys[1]->getReferencedTable()->isManyToMany(false):\n $this->isM2M = false;\n $this->getDocument()->addLog(sprintf(' * %s: M2M set to false, foreign table is M2M', $this->getRawTableName()));\n break;\n // has more columns than id + 2 x key columnns, is not many to many\n case (count($this->getColumns()) >= 3):\n $this->isM2M = false;\n $this->getDocument()->addLog(sprintf(' * %s: M2M set to false, columns are 3 or more', $this->getRawTableName()));\n break;\n default:\n $this->isM2M = true;\n $this->getDocument()->addLog(sprintf(' * %s: is M2M', $this->getRawTableName()));\n break;\n }\n }\n\n return $this->isM2M;\n }", "public function supportsMultiple()\n\t{\n\t\treturn $this->mutable->getReferencingNode()->isManyToMany();\n\t}", "private function fieldIsManyToMany($column) {\r\n foreach ($this->table_instance->getManyToManyRelationships() as $column_name => $joining_reference) {\r\n if($column_name == $column) return true;\r\n }\r\n return false;\r\n }", "public function can_be_used_in_relationship();", "public static function isRelational()\n {\n return in_array('Divergence\\\\Models\\\\Relations', class_uses(get_called_class()));\n }", "public function isManyToMany(): bool\n {\n return isset($this->mapping['joinTable']);\n }", "public function hasRelation(): bool;", "protected function _has_relationships(){\n\t\treturn (count(self::$related['has_many']) > 0 || count(self::$related['has_one']) > 0) ;\n\t}", "public function hasRelations() {\n return !empty($this->_relations);\n }", "public function guessIfFieldHasMultipleFromRelationType($relation_type)\n {\n switch ($relation_type) {\n case 'BelongsToMany':\n case 'HasMany':\n case 'HasManyThrough':\n case 'HasOneOrMany':\n case 'MorphMany':\n case 'MorphOneOrMany':\n case 'MorphToMany':\n return true;\n\n default:\n return false;\n }\n }", "public static function HasMany() {return new RelationshipType(1);}", "public function hasRelations()\n {\n return 0 < count($this->relations);\n }", "public function GetToManyRelation();", "public function isManyToMany()\n {\n return false;\n }", "public function is_involved_in_relationship();", "protected function isRelation()\n {\n return in_array(\"relation\", explode(\".\", request()->route()->getName()));\n }", "public function inrelation()\n {\n\n global $em;\n $this->classmetadata = $em->getClassMetadata(\"\\\\\" . get_class($this));\n\n $objecarray = (array)$this;\n $association = array_keys($this->classmetadata->associationMappings);\n if (count($association))\n return true;\n\n return false;\n// foreach ($objecarray as $obkey => $value) {\n// // gere les attributs hérités en visibilité protected\n// if (is_object($value)) {\n// $classname = get_class($value);\n// if ($classname != 'DateTime' && $association[0] != $classname) {\n// return true;\n// }\n// }\n// }\n }", "public function isHasManyAndBelongsToMany($fieldName) {\n $relation = $this->getRelationMeta($fieldName);\n\n return $relation->isHasManyAndBelongsToMany();\n }", "public function has_or_relation()\n {\n }", "public function relationshipMotphMany(): MorphMany\n {\n // One (me) to many Polymorphic models\n return $this->morphMany(PolymorphicModel::class, 'xxx');\n }", "public function isMultipleMode() {\n\t\tif (isset($this->propertySchema['inline']['multipleMode'])) {\n\t\t\treturn $this->propertySchema['inline']['multipleMode'];\n\t\t}\n\n\t\tif (isset($this->propertySchema['annotations']['Doctrine\\ORM\\Mapping\\ManyToMany']) || isset($this->propertySchema['annotations']['Doctrine\\ORM\\Mapping\\OneToMany'])) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "protected function isActualRelationships($relation)\n {\n return array_key_exists($relation, $this->relationships)\n && count($this->relationships[$relation]) > 0;\n }", "function related_to($related_to) {\n global $db;\n if ($this->set(\"related_to\", $related_to)) {\n $this->set_relationship(MARRIED);\n \n return true;\n } else {\n return false;\n }\n }", "public function is_related($entry)\n {\n if(isset($this->entries[$entry]['relation']) && !empty($this->entries[$entry]['relation']))\n return true;\n \n return false;\n }", "public function isChildMorph()\n {\n return in_array($this->type, static::CHILD_MORPHS, true);\n }", "public function hasRelations() {\n return $this->table->hasRelationFields();\n }", "protected function isNotManyToMany(\\ReflectionProperty $property): bool\n {\n return [] === $property->getAttributes(ORM\\Mapping\\ManyToMany::class, \\ReflectionAttribute::IS_INSTANCEOF);\n }", "public function mmRelationWithMatchFieldIsResolvedFromForeignSide() {}", "public function isCollection()\n {\n $sourceCollectionTypes = [\n ClassMetadataInfo::ONE_TO_MANY,\n ClassMetadataInfo::MANY_TO_MANY,\n ];\n\n $inverseCollectionTypes = [\n ClassMetadataInfo::MANY_TO_ONE,\n ClassMetadataInfo::MANY_TO_MANY,\n ];\n\n return ($this->isTypeIn($sourceCollectionTypes) && $this->isMappedBySourceEntity()) ||\n ($this->isTypeIn($inverseCollectionTypes) && !$this->isMappedBySourceEntity());\n }", "function testHasManyRelationships() {\n\t\t$team = $this->objFromFixture('DataObjectTest_Team', 'team1');\n\t\t\n\t\t// Test getComponents() gets the ComponentSet of the other side of the relation\n\t\t$this->assertTrue($team->getComponents('Comments')->Count() == 2);\n\t\t\n\t\t// Test the IDs on the DataObjects are set correctly\n\t\tforeach($team->getComponents('Comments') as $comment) {\n\t\t\t$this->assertTrue($comment->TeamID == $team->ID);\n\t\t}\n\t}", "public static function HasManyAndBelongsTo() {return new RelationshipType(4);}", "public function isThrough()\n {\n return in_array($this->type, static::THROUGH_RELATIONS, true);\n }", "public function getRelationable(): ?bool\n {\n // Otherwise no member, but only subgroups are allowed.\n return $this->relationable;\n }", "protected function isRelationTable($table)\n {\n \t$pk=$table->primaryKey;\n \treturn (count($pk) === 2 // we want 2 columns\n \t\t\t&& isset($table->foreignKeys[$pk[0]]) // pk column 1 is also a foreign key\n \t\t\t&& isset($table->foreignKeys[$pk[1]]) // pk column 2 is also a foriegn key\n \t\t\t&& $table->foreignKeys[$pk[0]][0] !== $table->foreignKeys[$pk[1]][0]); // and the foreign keys point different tables\n }", "public function isMorphMutation($mutation)\n {\n if (!is_array($mutation) && isset($this->mutations[$mutation])) {\n $mutation = $this->getMutation($mutation);\n }\n\n return $mutation['type'] === 'morph' || $mutation['type'] === 'morphEager';\n }", "public function relationships();", "public function writeManyManyTables() {\n\t\tYii::trace ( 'writing MANY_MANY data for ' . get_class ( $this->owner ), 'system.db.ar.CActiveRecord' );\n\t\t\n\t\tforeach ( $this->owner->relations () as $key => $relation ) {\n\t\t\tif ($relation ['0'] == CActiveRecord::MANY_MANY) \t\t\t// ['0'] equals relationType\n\t\t\t{\n\t\t\t\tif (! isset ( $this->relations ) || in_array ( $key, $this->relations )) {\n\t\t\t\t\tif (isset ( $this->owner->$key )) { // MANY_MANY is set\n\t\t\t\t\t\tif (is_object ( $this->owner->$key ) || is_numeric ( $this->owner->$key )) {\n\t\t\t\t\t\t\tif (is_numeric ( $this->owner->$key ) || $this->findOwner ( $this->owner->$key ) == FALSE) {\n\t\t\t\t\t\t\t\t$this->executeManyManyEntry ( $this->makeManyManyDeleteCommand ( $relation [2], $this->owner->{$this->owner->tableSchema->primaryKey} ) );\n\t\t\t\t\t\t\t\t$this->executeManyManyEntry ( $this->owner->makeManyManyInsertCommand ( $relation [2], (is_object ( $this->owner->$key )) ? $this->owner->$key->{$this->owner->$key->tableSchema->primaryKey} : $this->owner->{$key} ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (is_array ( $this->owner->$key )) {\n\t\t\t\t\t\t\tlist ( $toBeRemovedArray, $toBeRemovedHash ) = $this->loadOldRelationsFromDB ( $relation [2] );\n\t\t\t\t\t\t\t$diff = array_diff ( $toBeRemovedArray, $this->convertObjsToPrimaryKeyArray ( $this->owner->{$key} ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (sizeof ( $diff ) > 0) {\n\t\t\t\t\t\t\t\t$this->executeManyManyEntry ( $this->makeManyManyDeleteCommand ( $relation [2], $this->owner->primaryKey, $diff ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sql = null;\n\t\t\t\t\t\t\tforeach ( $this->owner->$key as $foreignobject ) {\n\t\t\t\t\t\t\t\tif (empty ( $toBeRemovedHash [$foreignobject->primaryKey] )) { // new relation\n\t\t\t\t\t\t\t\t\t$sql = $this->makeManyManyInsertCommand ( $relation [2], (is_object ( $foreignobject )) ? $foreignobject->{$foreignobject->tableSchema->primaryKey} : $foreignobject, $sql );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset ( $sql ))\n\t\t\t\t\t\t\t\t$this->executeManyManyEntry ( $sql );\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}", "public function testCanBeJoined() {\n\t\t$assoc = new BelongsToMany('Test');\n\t\t$this->assertFalse($assoc->canBeJoined());\n\t}", "function getMlNodes(&$node)\n {\n // we only have to check the 1:1 relations!!\n $hasrelationwithmlnode=Array();\n if(is_array($node->m_relations[\"atkonetoonerelation\"]))\n {\n foreach($node->m_relations[\"atkonetoonerelation\"] as $attribname=>$attribute)\n {\n $p_attrib = &$node->m_attribList[$attribname];\n if($p_attrib->createDestination() && $p_attrib->m_destInstance->hasFlag(NF_ML))\n {\n $hasrelationwithmlnode[$attribname]=&$node->m_attriblist[$attribname];\n }\n }\n }\n return $hasrelationwithmlnode;\n }", "public function isParentMorph()\n {\n return in_array($this->type, static::PARENT_MORPHS, true);\n }", "protected static function _relations() {\n\n\t}", "public function isMensajesRelatedByIdmensajeLoaded()\n {\n return null !== $this->collMensajesRelatedByIdmensaje;\n }", "private function isRHSMany()\n {\n return ($this->selfReferencing &&\n (\n (isset($this->lhsLinkDef['side']) && isset($this->lhsLinkDef['link-type']) &&\n $this->lhsLinkDef['side'] == 'left' && $this->lhsLinkDef['link-type'] == 'one') ||\n (isset($this->rhsLinkDef['side']) && isset($this->rhsLinkDef['link-type']) &&\n $this->rhsLinkDef['side'] == 'right' && $this->rhsLinkDef['link-type'] == 'many')\n )\n );\n }", "public function setRelations() {}", "public function manyToMany(string $related, string $pivot, string $ownerKey, string $foreignKey);", "public function has_linked_children()\n\t{\n\t\treturn isset($this->data[ 'linked_children' ]);\n\t}", "public function hasRelation($itemName, $type = null)\n\t{\n\t\t$types = array_keys($this->relations);\n\n\t\tif (in_array($type, $types))\n\t\t{\n\t\t\t$types = array($type);\n\t\t}\n\n\t\tforeach ($types as $type)\n\t\t{\n\t\t\tforeach ($this->relations[$type] as $relations)\n\t\t\t{\n\t\t\t\tif (array_key_exists($itemName, $relations))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function isAssociation()\n {\n return $this->has('targetEntity') && ($this->has('joinColumns') || $this->has('joinTable'));\n }", "public function guessIfFieldHasPivotFromRelationType($relation_type)\n {\n switch ($relation_type) {\n case 'BelongsToMany':\n case 'HasManyThrough':\n case 'MorphMany':\n case 'MorphOneOrMany':\n case 'MorphToMany':\n return true;\n default:\n return false;\n }\n }", "public function isMensajesRelatedByIdrespuestaLoaded()\n {\n return null !== $this->collMensajesRelatedByIdrespuesta;\n }", "function canUnrecurs() {\n global $DB;\n\n $ID = $this->fields['id'];\n if (($ID < 0)\n || !$this->fields['is_recursive']) {\n return true;\n }\n if (!parent::canUnrecurs()) {\n return false;\n }\n $entities = getAncestorsOf(\"glpi_entities\", $this->fields['entities_id']);\n $entities[] = $this->fields['entities_id'];\n\n // RELATION : device -> item_device -> item\n $linktype = static::getItem_DeviceType();\n $linktable = getTableForItemType($linktype);\n\n $result = $DB->request(\n [\n 'SELECT' => [\n 'itemtype',\n new QueryExpression('GROUP_CONCAT(DISTINCT ' . DBmysql::quoteName('items_id') . ') AS ids'),\n ],\n 'FROM' => $linktable,\n 'WHERE' => [\n $this->getForeignKeyField() => $ID,\n ],\n 'GROUPBY' => [\n 'itemtype',\n ]\n ]\n );\n\n foreach ($result as $data) {\n if (!empty($data[\"itemtype\"])) {\n $itemtable = getTableForItemType($data[\"itemtype\"]);\n if ($item = getItemForItemtype($data[\"itemtype\"])) {\n // For each itemtype which are entity dependant\n if ($item->isEntityAssign()) {\n if (countElementsInTable($itemtable, ['id' => $data[\"ids\"],\n 'NOT' => ['entities_id' => $entities ]]) > 0) {\n return false;\n }\n }\n }\n }\n }\n return true;\n }", "protected function attachRelations(&$element, &$relations)\n\t{\n\t\t// create the relations element\n\t\t$relations_element = $this->dom->createElement('relations');\n\t\t$element->appendChild($relations_element);\n\t\t\n\t\tforeach ($relations as $relation)\n\t\t{\n\t\t\t// create the relation element\n\t\t\t$relation_element = $this->dom->createElement('relation');\n\t\t\t$relations_element->appendChild($relation_element);\n\t\t\t\n\t\t\t// set the relation type id\n\t\t\t$relation_element->setAttribute('relation_type_id', $relation['relation_type_id']);\n\t\t\t\n\t\t\t// set the item side\n\t\t\t$relation_element->setAttribute('item_side', $relation['item_side']);\n\t\t\t\n\t\t\t// set the item type id\n\t\t\tif (!empty($relation['item_type_id']))\n\t\t\t{\n\t\t\t\t$relation_element->setAttribute('item_type_id', $relation['item_type_id']);\n\t\t\t}\n\t\t} // end foreach - loop through the relations\n\t\t\n\t\treturn true;\n\t}", "public function isRelation($key);", "public function isAssociation(): bool\n {\n return isset($this->mapping['targetEntity']) || 0 < \\count($this->associations);\n }", "public function isRelationWithSelf() {\n return $this->isRelationWithSelf;\n }", "public function isAssociation();", "public function hasRelationWith($modelName, $type = null) {\n $relations = $this->table->getRelationFields($modelName);\n\n if ($type !== null) {\n return isset($relations[$type]) && !empty($relations[$type]);\n }\n\n return !(empty($relations[ModelTable::HAS_MANY]) && empty($relations[ModelTable::HAS_ONE]) && empty($relations[ModelTable::BELONGS_TO]));\n }", "public function isJoinTable() {\n if($this->_isJoin !== null)\n {\n return $this->_isJoin;\n }\n if(count($this->_fields) > 1 && count($this->_primaryKeys) > 1 && count($this->_foreignKeys))\n {\n foreach(array_keys($this->_foreignKeys) as $foreignKey)\n {\n if(!in_array($foreignKey, $this->_primaryKeys))\n {\n return false;\n }\n }\n }\n else {\n return false;\n }\n \n $this->_keyOfManyToMany = array();\n $keys = array_keys($this->_foreignKeys);\n $values = array_values($this->_foreignKeys);\n $this->_getCapital($values[1]);\n \n list($refTableClassModule, $refTableClassModel) = $this->separate($values[1]);\n list($interTableClassModule, $interTableClassModel) = $this->separate($this->_name);\n $this->_keyOfManyToMany[$values[0]] = array('ref' => substr(strstr($values[1], '_'), 1) . 's',\n 'data' => array(\n 'refTableClass' => ucfirst($refTableClassModule) . '_Model_DbTable_' . $this->_getCapital($refTableClassModel),\n 'intersectionTable' => ucfirst($interTableClassModule) . '_Model_DbTable_' . $this->_getCapital($interTableClassModel),\n 'columns' => array('local' => $keys[0], 'foreign' => $keys[1])));\n \n list($refTableClassModule, $refTableClassModel) = $this->separate($values[0]);\n $this->_keyOfManyToMany[$values[1]] = array('ref' => substr(strstr( $values[0], '_'), 1) . 's',\n 'data' => array(\n 'refTableClass' => $refTableClassModule . '_Model_DbTable_' . $this->_getCapital($refTableClassModel),\n 'intersectionTable' => ucfirst($interTableClassModule) . '_Model_DbTable_' . $this->_getCapital($interTableClassModel),\n 'columns' => array('local' => $keys[1], 'foreign' => $keys[0])));\n\t\treturn true;\n\t}", "public function get_relation_object();", "public function contains(\n\t\tContainer $container,\n\t\tModel $model,\n\t\tModel $relation)\n\t{\n\t\t$accessor = new ObjectAccessor;\n\t\t\n\t\t$object = $accessor->get($model);\n\t\t$relations = $object->{$this->name()};\n\n\t\tif ( ! is_array($relations))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn in_array($accessor->get($relation)->_id, $relations);\n\t}", "public function setIsHasManyAndBelongsToMany($isHasManyAndBelongsToMany) {\n $this->isHasManyAndBelongsToMany = $isHasManyAndBelongsToMany;\n }", "private function find_relationship($table){\n if(preg_match('/\\b' . $table . '\\b/', $this->has_many)) return 'has_many';\n if(preg_match('/\\b' . $table . ':/', $this->has_many_through)) return 'has_many_through';\n if(preg_match('/\\b' . $table . '\\b/', $this->belongs_to)) return 'belongs_to';\n $class = Inflector::classify($table);\n if(in_array($this->link_table(new $class()), $this->tables())) return 'has_and_belongs_to_many';\n return false;\n }", "public function isComplete()\n\t{\n\t\t// relation is declared completely if set of references has been derived\n\t\t// from set of nodes on recently adding node not wanting another successor\n\t\treturn !is_null( $this->references );\n\t}", "public function getManyToMany()\n\t{\n\t\tif (!$this->associationsLoaded)\n\t\t\t$this->loadAssociations();\n\n\t\treturn $this->manyToMany;\n\t}", "public function hasChildren();", "public function isGlobal($relationalTypeResolver) : bool;", "function can_add_relationship($entity_type, $entity_id, $relationship_type, $reverse, &$messages = [])\r\n{\r\n\t$can = 1;\r\n\t$hook_name = '_can_add_relationship';\r\n\tforeach (module_implements('can_add_relationship') as $module) {\r\n\r\n\t\t$function = $module . $hook_name;\r\n\t\t// will call all modules implementing hook_hook_name\r\n\t\t// and can pass each argument as reference determined\r\n\t\t// by the function declaration\r\n\t\t$can = $can && $function($entity_type, $entity_id, $relationship_type, $reverse, $messages);\r\n\t}\r\n\treturn $can;\r\n}", "public static function BelongsTo() {return new RelationshipType(2);}", "public function canHaveChildren() {}", "protected function parseSingleRelationship($relation)\n {\n if (!$value = $this->parseForCommonValues($relation)) {\n return true;\n }\n\n if ($value instanceof Collection || is_array($value) || $value instanceof CollectionProxy) {\n throw new MappingException(\"Entity's attribute $relation should not be array, or collection\");\n }\n\n if ($value instanceof EntityProxy && !$value->isLoaded()) {\n $this->relationships[$relation] = [];\n\n return true;\n }\n\n // If the attribute is a loaded proxy, swap it for its\n // loaded entity.\n if ($value instanceof EntityProxy && $value->isLoaded()) {\n $value = $value->getUnderlyingObject();\n }\n\n if ($this->isParentOrRoot($value)) {\n $this->relationships[$relation] = [];\n\n return true;\n }\n\n // At this point, we can assume the attribute is an Entity instance\n // so we'll treat it as such.\n $subAggregate = $this->createSubAggregate($value, $relation);\n\n // Even if it's a single entity, we'll store it as an array\n // just for consistency with other relationships\n $this->relationships[$relation] = [$subAggregate];\n\n // We always need to check a loaded relation is in sync\n // with its local key\n $this->needSync[] = $relation;\n\n return true;\n }", "function islandora_object_has_people($object) {\n // the actual parent CModel.\n $cmodel_id = islandora_object_parent_model($object->id);\n\n // NOTE: This function will check all of $object's CModel's supertypes as well.\n $relationships = islandora_cmodel_relationships($cmodel_id);\n\n foreach($relationships as $rel){\n if($rel['object']['value'] == 'islandora:person_cmodel'\n or $rel['subject']['value'] == 'islandora:person_cmodel'){\n return true;\n }\n }\n return false;\n}", "abstract protected function acceptRelation($relation);", "public function isRelationship(array $columns)\n {\n $matched = array_filter($columns, function ($column) {\n // As soon as we find that a property does not\n // have a dot '.' in it we assume it is a relationship,\n // unless it is the id of a node which is where we look\n // at a pattern that matches id(any character here).\n if (preg_match('/^([a-zA-Z0-9-_]+\\.[a-zA-Z0-9-_]+)|(id\\(.*\\))$/', $column)) {\n return false;\n }\n\n return true;\n });\n\n return count($matched) > 1 ? true : false;\n }", "public function isDirectlyRelated()\n\t{\n\t\t$isDirectlyRelated = $this->get('directly_related_to_role');\n\t\tif (1 == $isDirectlyRelated) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isCandidate(Node $node): bool\n {\n $this->activeTransformation = null;\n\n if (! $node instanceof Isset_ && ! $node instanceof Unset_) {\n return false;\n }\n\n foreach ($node->vars as $var) {\n if (! $var instanceof ArrayDimFetch) {\n continue;\n }\n\n if ($this->matchArrayDimFetch($var)) {\n return true;\n }\n }\n\n return false;\n }", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "public function permissions(): BelongsToMany\n {\n $relation = $this->morphToMany(\n config('acl.models.permission'),\n 'model',\n config('acl.tables.model_has_permissions'),\n config('acl.column_names.model_morph_key'),\n AclRegistrar::$pivotPermission\n );\n\n if (AclRegistrar::$teams) {\n return $relation->wherePivot(AclRegistrar::$teamsKey, getPermissionsTeamId());\n }\n\n return $relation;\n }", "public function has($relation)\n {\n return $this->model->has($relation);\n }", "public function isPolymorphicChildOfWithoutPivot(string $relationKey)\n {\n return $this->relationKey === $relationKey\n && $this->is('morphedByMany')\n && $this->shouldUseAutomaticPivot();\n }", "public function owns($relation){\n return $relation->user_id == $this->id;\n }", "public function getType()\n {\n return 'related_content';\n }", "public function withRelationships() : bool\n {\n return $this->hasQuery('relationships');\n }", "public function hasChildren(): bool;", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasRelation($name) {\n return isset($this->getClassMeta()->relations[$name]);\n }", "public function isRelatedToNewsletter()\n {\n if ($this->node->getNodeType()->isNewsletterType()) {\n return true;\n }\n\n $parents = $this->getParents();\n foreach ($parents as $parent) {\n if ($parent->getNodeType()->isNewsletterType()) {\n return true;\n }\n }\n return false;\n }" ]
[ "0.62402403", "0.6199517", "0.61840636", "0.61788774", "0.6167064", "0.61128783", "0.6065845", "0.6037395", "0.6013633", "0.5980187", "0.5937306", "0.59258235", "0.5902261", "0.58672655", "0.5850653", "0.57857347", "0.57260394", "0.5721652", "0.5663917", "0.56634974", "0.56570256", "0.56409276", "0.5636182", "0.55783033", "0.55232483", "0.54960144", "0.5440207", "0.54023194", "0.5386033", "0.5373427", "0.5352227", "0.53489184", "0.5338043", "0.5319743", "0.5294297", "0.5231841", "0.5210402", "0.5183376", "0.5182446", "0.51636165", "0.51439357", "0.5141648", "0.51409733", "0.5125585", "0.51184976", "0.51117444", "0.50927854", "0.50922424", "0.50819886", "0.5074773", "0.5070197", "0.506312", "0.5057044", "0.50373834", "0.5031193", "0.50203556", "0.5010836", "0.50039935", "0.49861696", "0.49837515", "0.49498922", "0.49476236", "0.4938943", "0.49060193", "0.4890716", "0.4875917", "0.48749954", "0.48722544", "0.48682684", "0.48557493", "0.48285574", "0.48278543", "0.48276165", "0.48166278", "0.48041594", "0.4799197", "0.47769266", "0.47758582", "0.4761705", "0.47569808", "0.47569808", "0.47569808", "0.47569808", "0.47569808", "0.47569808", "0.47525665", "0.47524494", "0.47519773", "0.47515866", "0.47406903", "0.47387213", "0.47250795", "0.47241753", "0.47238252", "0.47238252", "0.47238252", "0.47238252", "0.47238252", "0.4722063", "0.47198668" ]
0.705818
0
Retrieves editor instance for managing current relation.
Получает экземпляр редактора для управления текущей связью.
public function editor() { return new model_editor_related( $this ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEditor()\n {\n return $this->editor;\n }", "public function getEditor()\n {\n return $this->editor;\n }", "function GetEditor()\r\n\t{\r\n\t\treturn $this->m_editor;\r\n\t}", "protected function getEditor()\n\t{\n\t\t// Only create the editor if it is not already created.\n\t\tif (empty($this->editor))\n\t\t{\n\t\t\t// Initialize variables.\n\t\t\t$editor = null;\n\n\t\t\t// Get the editor type attribute. Can be in the form of: editor=\"desired|alternative\".\n\t\t\t$type = trim((string) $this->element['editor']);\n\n\t\t\tif ($type)\n\t\t\t{\n\t\t\t\t// Get the list of editor types.\n\t\t\t\t$types = explode('|', $type);\n\n\t\t\t\t// Get the database object.\n\t\t\t\t$db = App::get('db');\n\n\t\t\t\t// Iterate over teh types looking for an existing editor.\n\t\t\t\tforeach ($types as $element)\n\t\t\t\t{\n\t\t\t\t\t// Build the query.\n\t\t\t\t\t$query = $db->getQuery()\n\t\t\t\t\t\t->select('element')\n\t\t\t\t\t\t->from('#__extensions')\n\t\t\t\t\t\t->whereEquals('element', $element)\n\t\t\t\t\t\t->whereEquals('folder', 'editors')\n\t\t\t\t\t\t->whereEquals('enabled', '1')\n\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t->start(0);\n\n\t\t\t\t\t// Check of the editor exists.\n\t\t\t\t\t$db->setQuery($query->toString());\n\t\t\t\t\t$editor = $db->loadResult();\n\n\t\t\t\t\t// If an editor was found stop looking.\n\t\t\t\t\tif ($editor)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create the Editor instance based on the given editor.\n\t\t\t$this->editor = $editor ? Wysiwyg::getInstance($editor) : App::get('editor');\n\t\t}\n\n\t\treturn $this->editor;\n\t}", "public function getEditor() {\n\t\t$this->checkDisposed();\n\t\t\t\n\t\tif ($this->_editor === null) {\n\t\t\tif (!$this->_editorID)\n\t\t\t\t$this->load();\n\t\t\t$this->_editor = User::getByID($this->_editorID);\n\t\t}\n\t\treturn $this->_editor;\t\n\t}", "public function editor(){return $this->editor;}", "function getEditor()\n {\n $createFragment = new CreateFragment($this->page['id'], count($this->fragments));\n\n return $createFragment->getEditor();\n }", "public function getManagingEditor()\n {\n return $this->managingEditor;\n }", "function GetManagingEditor() {\n\t\treturn $this->managingEditor;\n\t}", "public function instance()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$editor = App::get('editor');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$editor = \\Hubzero\\Html\\Editor::getInstance('none');\n\t\t}\n\n\t\treturn $editor;\n\t}", "public function getEditora()\n {\n return $this->editora;\n }", "public function setEditor(): self\n {\n $this->edited_by_user_id = auth()->user() ? auth()->user()->id : User::SYSUID;\n return $this;\n }", "public function setEditor(): self\n {\n $this->edited_by_user_id = auth()->user() ? auth()->user()->id : User::SYSUID;\n return $this;\n }", "public function editor()\n {\n return TrixEditor::create();\n }", "public function edit()\n {\n if (empty($this->imageEditor)) {\n $callback = function ($img){\n if (is_resource($img)) {\n $this->resource = $img;\n }\n };\n\n $this->imageEditor = new ImageEditor($this, $callback);\n }\n\n return $this->imageEditor;\n }", "public function editor(): belongsTo\n {\n return $this->belongsTo(User::class, 'edited_by_user_id');\n }", "function getEditorial() {\n return getEditorialFromBackend();\n }", "public function last_editor()\n {\n return $this->belongsTo('App\\User', 'last_editor_id');\n }", "public function editor()\n {\n return $this->belongsTo(\n config('userstamps.users_model'),\n config('userstamps.updated_by_column'),\n config('userstamps.users_table_column_id_name')\n );\n }", "public function editor()\r\n\t\t{\r\n\t\t\t$id = Uri::$array[3];\r\n\t\t\t$returnURL = Address::decode(Uri::$array[4]);\r\n\r\n\t\t\t$db = new DB;\r\n\t\t\t\r\n\t\t\t$db->where(\"`{$db->prefix}primrix_site_meta`.`id` = '{$id}'\");\r\n\t\t\t$db->join(['primrix_meta_blueprint','primrix_site_meta'], ['id','meta_id']);\r\n\r\n\t\t\tif($db->numRows() == 1){\r\n\t\t\t\t$row = $db->fetch();\r\n\t\t\t\t$db->close();\r\n\r\n\t\t\t\tDoc::Bind('from', Text::variable_to_string('primrix_site_meta'));\r\n\r\n//check if and why we use $dbp (null was passed as $dbp is never used)\r\n$primrixClass = new Primrix(null);\r\n\t\t\t\t$primrixClass->{$row['editor']}('primrix_site_meta', $id, $row['name'], $row['notes'], $row['value'], $row['options'], $row['validation'], $returnURL, false);\r\n\r\n\t\t\t}\r\n\t\t\telse Address::go($returnURL);\r\n\r\n\t\t}", "public function getEditor(): ?array\n {\n return $this->editor;\n }", "public function getEditorial()\n {\n return $this->editorial;\n }", "public function admin(){\r\n\r\n\t\treturn WP_Job_Manager_Field_Editor_Admin::get_instance();\r\n\r\n\t}", "protected function _getInventoryEditor()\n {\n return $this->_getSubEditor('customgrid/grid_editor_product_inventory');\n }", "public function getEditorHelper()\n {\n return Mage::helper('customgrid/editor');\n }", "public function managingEditor(): ?string\n {\n return $this->managingEditor;\n }", "public function get(){\n\n return $this->_editArea;\n }", "public function getApplicationTransactionEditor() {\n return new PonderAnswerEditor();\n }", "public function setEditor($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->editor !== $v) {\n $this->editor = $v;\n $this->modifiedColumns[ReferenceTableMap::COL_EDITOR] = true;\n }\n\n return $this;\n }", "public function edit()\n\t{\n\t\treturn $this;\n\t}", "public function editor(): BelongsTo \n {\n return $this->belongsTo(User::class)->withDefault(['name' => 'Unknown']);\n }", "public function lastEditor()\n {\n return $this->belongsTo(User::class, 'last_edited_by');\n }", "function &getCopyeditor() {\n\t\t$copyEditor = &$this->getData('copyeditor');\n\t\treturn $copyEditor;\n\t}", "function editor_get()\n{\n\tif (!jabCanUser(\"edit\"))\n\t\treturn;\n\n\tglobal $editor;\n\t$model['editor']=$editor;\n\t$model['referrer']=jabRequestParam(\"referrer\");\n\t$model['file']=jabRequestParam(\"file\");\n\t\n\t// Handle no file specified\n\tif (strlen($model['file'])==0)\n\t\treturn;\n\t\t\n\t// Handle attempt to escape the document root\n\tif (strstr($model['file'], \"..\"))\n\t\treturn;\n\n\t// Work out full path of file to edit and load it\n\t$fullpath=jabPathAppend($_SERVER['DOCUMENT_ROOT'], $model['file']);\n\ttry\n\t{\n\t\t// Make sure folder exists\n\t\tjabMkDir(dirname($fullpath));\n\t\t\n\t\t$fh = @fopen($fullpath, 'r');\n\t\t$model['content']= fread($fh, filesize($fullpath));\n\t\tfclose($fh);\n\t}\n\tcatch (Exception $ex)\n\t{\n\t\t$model['content']=\"title=New File\\nkeywords=\\n---\\n## New File ##\\n\\n\";\n\t}\n\n\t// Render editor\n\treturn jabRenderView(\"editor_view.php\", $model);\n}", "function _getRichTextEditor()\n\t{\n\t\tinclude_once \"./Services/Administration/classes/class.ilSetting.php\";\n\t\t$setting = new ilSetting(\"advanced_editing\");\n\t\t$js = $setting->get(\"advanced_editing_javascript_editor\");\n\t\treturn $js;\n\t}", "public function getActiveSiteForEditing()\n {\n return $this->resolverFactory->createResolver($this)->getActiveSiteForEditing();\n }", "public function getCMSEditOwner()\n {\n $ownerType = $this->owner->config()->get('cms_edit_owner');\n if (is_subclass_of($ownerType, LeftAndMain::class)) {\n return $ownerType::singleton();\n }\n return $this->owner->getComponent($ownerType);\n }", "protected function _getEditorId()\n {\n return $this->post_id;\n }", "public function edition()\n {\n return $this->belongsTo('App\\Edition');\n }", "public function edition()\n {\n return $this->belongsTo('App\\Masterdata\\Edition');\n }", "public function get_content_editor( $editor, $post_id ) {\n\n\t\t$content_helper = new Content_Helper();\n\t\treturn $content_helper->get_content_editor( $post_id );\n\n\t}", "public function editor(){\n return $this->belongsTo(User::class,'updated_by');\n }", "public function findEditorById($id)\r\n\t{\r\n\t\t$this->set(array('id' => (int) $id));\r\n\t\treturn $this->find(\"editor\");\r\n\t}", "public static function get_instance() {\n\t\tif ( ! self::$_instance instanceof Edit ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "protected function getEm()\n {\n if( !$this->em ) $this->em = $this->get('doctrine')->getManager( $this->em_name );\n return $this;\n }", "public function getObj()\n {\n return $this->obj instanceof OrderEditBuilder ? $this->obj->build() : $this->obj;\n }", "public function editor($value)\n {\n $this->attributes['editor'] = $value;\n\n return $this;\n }", "public function getOrmManager() {\n return $this->orm;\n }", "public function getManager()\n {\n return $this->getFirstAttribute($this->schema->manager());\n }", "public function getOrganizer()\n {\n $organizer = Organizers::find()\n ->one();\n\n // If an organizer exists, use that\n if ($organizer) {\n return $organizer;\n }\n\n // If no organizer exists, create a new one and return that\n $newOrganizer = new OrganizerModel();\n $this->saveOrganizer($newOrganizer);\n $organizer = Organizers::find()\n ->one();\n\n return $organizer;\n }", "public function owner()\n {\n return $this->morphTo();\n }", "public function owner()\n {\n return $this->morphTo();\n }", "public function getEntityRepository()\n {\n if (null === $this->er) {\n $this->er = $this->em->getRepository('PlaygroundCore\\Entity\\Formgen');\n }\n\n return $this->er;\n }", "public function getIdeModal()\n {\n return $this->ide_modal;\n }", "public function getEditObject()\n {\n $soxId = $this->getEditObjectId();\n if ($this->_oEditObject === null && isset($soxId) && $soxId != '-1') {\n $this->_oEditObject = oxNew(Order::class);\n $this->_oEditObject->load($soxId);\n }\n\n return $this->_oEditObject;\n }", "public function getEditor_name () {\n\t$preValue = $this->preGetValue(\"editor_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->editor_name;\n\treturn $data;\n}", "public function requested_editor()\n\t\t{\n\t\t\tif( empty( $this->request_editor_type ) )\n\t\t\t{\n\t\t\t\t$this->request_editor_type = isset( $_REQUEST['classic-editor'] ) ? 'classic' : 'gutenberg';\n\t\t\t}\n\n\t\t\treturn $this->request_editor_type;\n\t\t}", "public function getApplicationTransactionEditor() {\n return new HarbormasterBuildStepEditor();\n }", "public function owner() {\n return $this;\n }", "function current() {\n return $this->_model;\n }", "public function model()\n {\n return $this->model;\n }", "public function model()\n {\n return $this->model;\n }", "public function model()\n {\n return $this->model;\n }", "public function getApplicationTransactionEditor() {\n return new NuanceRequestorEditor();\n }", "public function parentOptionHandler(): BoardEditorOptionHandler\n {\n return $this->parentOptionHandler;\n }", "public function owner(){\n return $this->morphTo();\n }", "public function get_edit_url() {\n\t\treturn tcb_get_editor_url( $this->ID );\n\t}", "function getModo()\n {\n if (!isset($this->imodo) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->imodo;\n }", "protected function getEditMenuItem()\n {\n return $this->findMenuItem($this->request->getControllerName(), 'edit');\n }", "public function commentator()\n {\n return $this->hasOne(Commentator::class,'model_id',config(BlogServiceProvider::NAMESPACE_PROYECT.'.commentatorPost.columnOfRelation'));\n }", "public function getModel() {\n\t\tif ($this->parent instanceof QuerySet) {\n\t\t\treturn $this->parent->getModel();\n\t\t}\n\t\treturn $this->parent;\n\t}", "function editor(){\n\t\tswitch($this->EditPageNr){\n\t\t\tcase we_base_constants::WE_EDITPAGE_PREVIEW:\n\t\t\t\treturn 'we_editors/we_editor_other_preview.inc.php';\n\t\t\tdefault:\n\t\t\t\treturn parent::editor();\n\t\t}\n\t}", "public function owner()\n {\n\t return $this->morphTo('property', 'model_type', 'model_id');\n }", "public function get_view_manager() {\n return mod_dataform_view_manager::instance($this->_dataformid);\n }", "public function getModel() {\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// can be Moderator or Project\n\t\t$modelClassName = $this->getModelClass();\n\t\t$model = $modelClassName::model()->findByPk(new MongoID($this->getId()));\n\t\treturn $model;\n\t}", "public function model()\n {\n return $this->relationsQuery( $this->owner, $this->owned )\n\n ->limit(1)\n\n ->first();\n }", "public function model()\n\t{\n\t\treturn $this->_model;\n\t}", "public function model()\n\t{\n\t\treturn $this->_model;\n\t}", "public function getEditorList() {\n if ($this->editorList === null) {\n return $this->getAliases();\n }\n\n return $this->editorList;\n }", "public function getCurrentCommand()\n {\n return $this->hasOne(TgCommands::className(), ['id' => 'current_command_id']);\n }", "protected static function getRepo() \n {\n $model = get_called_class();\n\n return self::getEntityManager()->getRepository($model);\n }", "protected function getRelatedDocumentsGridField()\n {\n $gridField = GridField::create(\n 'RelatedDocuments',\n _t('DMSDocument.RELATEDDOCUMENTS', 'Related Documents'),\n $this->RelatedDocuments(),\n new GridFieldConfig_RelationEditor\n );\n\n $gridFieldConfig = $gridField->getConfig();\n\n $gridField->getConfig()->removeComponentsByType(GridFieldAddNewButton::class);\n // Move the autocompleter to the left\n $gridField->getConfig()->removeComponentsByType(GridFieldAddExistingAutocompleter::class);\n $gridField->getConfig()->addComponent(\n $addExisting = new GridFieldAddExistingAutocompleter('buttons-before-left')\n );\n\n // Ensure that current document doesn't get returned in the autocompleter\n $addExisting->setSearchList($this->getRelatedDocumentsForAutocompleter());\n\n // Restrict search fields to specific fields only\n $addExisting->setSearchFields(array('Title:PartialMatch', 'Filename:PartialMatch'));\n $addExisting->setResultsFormat('$Filename');\n\n $this->extend('updateRelatedDocumentsGridField', $gridField);\n return $gridField;\n }", "public function getApplicationTransactionEditor() {\n return new PhabricatorAuthMessageEditor();\n }", "public function getApplicationTransactionEditor() {\n return new AlmanacServiceEditor();\n }", "public function getManager() {\n return $this->_manager;\n }", "protected function getEm() {\n return $this->em;\n }", "public function optionHandler(): BoardEditorOptionHandler\n {\n return $this->optionHandler;\n }", "public function model()\n {\n return $this->resource( 'model' );\n }", "public function getManager()\n {\n return $this->_manager;\n }", "public function getModel ()\n {\n return $this->model;\n }", "protected function lazy_get_form()\r\n\t{\r\n\t\t$form = parent::lazy_get_form();\r\n\r\n\t\tif ($form)\r\n\t\t{\r\n\t\t\treturn $form;\r\n\t\t}\r\n\r\n\t\t$block = $this->module->getBlock('edit', $this->key);\r\n\r\n\t\treturn $block->element;\r\n\t}", "protected function _getModel()\n {\n return $this->_model;\n }", "public function get_materia()\n {\n // loads the associated object\n if (empty($this->materia))\n $this->materia = new materia($this->materia_id);\n \n // returns the associated object\n return $this->materia;\n }", "public function getManager()\r\n\t{\r\n\t\treturn $this->em;\r\n\t}", "public function get()\n\t{\n\t\tif ( ! $this->isLoaded())\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\n\t\treturn $this->related;\n\t}", "function getModel() {\r\n return $this->model;\r\n }", "function getEm() {\n return $this->em;\n }", "function getEm() {\n return $this->em;\n }", "public function getOwner();", "public function getOwner();" ]
[ "0.7322033", "0.7322033", "0.7246556", "0.71665394", "0.69569415", "0.68060106", "0.67886555", "0.6671576", "0.6644708", "0.645444", "0.63003963", "0.6282981", "0.6282981", "0.623999", "0.61138016", "0.60525393", "0.6042014", "0.6013174", "0.59529227", "0.59243876", "0.5902772", "0.58572847", "0.58527976", "0.5836374", "0.58265406", "0.5817305", "0.5768476", "0.57314783", "0.5675626", "0.5666432", "0.5659817", "0.56582946", "0.5569949", "0.555531", "0.5530045", "0.5522196", "0.5486179", "0.5425912", "0.541993", "0.5397415", "0.53787833", "0.5376882", "0.5341813", "0.53399956", "0.53339994", "0.5331753", "0.53298444", "0.5320156", "0.5320087", "0.5311782", "0.5307672", "0.5307672", "0.52922654", "0.5266077", "0.5261457", "0.5254516", "0.52470875", "0.5237816", "0.52307343", "0.5223947", "0.5218643", "0.5218643", "0.5218643", "0.5217379", "0.5210389", "0.51861346", "0.5174849", "0.51697", "0.5167528", "0.5165032", "0.5153178", "0.51458126", "0.5143337", "0.51406765", "0.51397634", "0.51304597", "0.51225954", "0.51225954", "0.51114565", "0.5107379", "0.50986755", "0.50965756", "0.5095957", "0.50956696", "0.5094425", "0.5086921", "0.508332", "0.5083054", "0.5082889", "0.50826216", "0.50740325", "0.50541466", "0.50537515", "0.50476587", "0.5044925", "0.5042406", "0.5039116", "0.5039116", "0.5038618", "0.5038618" ]
0.8136741
0
Create the timezone select box.
Создайте выпадающий список часовых поясов.
public function makeElement() { $selected = $this->splitTz($this->value); $tzlist = array(); $out = "<select name='timezone[]' id='tz_region' class='selectbox' tabindex='{$this->attributes['tabindex']}'>\n"; $out .= "\t<option></option>\n"; if ($selected[0] == 'UTC') { $out .= "\t<option value='UTC' selected='selected'>UTC</option>\n"; } else { $out .= "\t<option value='UTC'>UTC</option>\n"; } foreach (self::$regions as $name => $mask) { $tzlist[$name] = DateTimeZone::listIdentifiers($mask); if ($selected[0] == $name) { $out .= "\t<option value='$name' selected='selected'>$name</option>\n"; } else { $out .= "\t<option value='$name'>$name</option>\n"; } foreach ($tzlist[$name] as &$tz) { $tz = substr($tz, strpos($tz, '/') + 1); } unset($tz); } $out .= "</select>\n"; $jslist = json_encode($tzlist); $js = <<<EOHD <select name="timezone[]" id="tz_city" disabled="disabled" class="selectbox"></select> <script type="text/javascript"> var tzmatrix = $jslist; var currcity = "{$selected[1]}"; $(document).ready(function() { var selectedregion = $("#tz_region").val(); if (selectedregion != 'UTC' || selectedregion != '') { var citydd = $("#tz_city"); var citylist = tzmatrix[selectedregion]; jQuery.each(citylist, function(key, val) { if (val == currcity) { citydd.append("<option value=\"" + val + "\" selected=\"selected\">" + val + "</option>"); } else { citydd.append("<option value=\"" + val + "\">" + val + "</option>"); } }); citydd.removeAttr("disabled"); } }); $("#tz_region").change(function() { var selectedregion = $("#tz_region").val(); var citydd = $("#tz_city"); if (selectedregion == 'UTC' || selectedregion == '') { citydd.html(''); citydd.Attr("disabled", "disabled"); } else { var citylist = tzmatrix[selectedregion]; citydd.html(''); jQuery.each(citylist, function(key, val) { citydd.append("<option value=\"" + val + "\">" + val + "</option>"); }); citydd.removeAttr("disabled"); } }); </script> EOHD; return $out . $js; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_time_zone_tag($name, $selected = null, $choices = null, $html_options = null)\n{\n return CForm::select_time_zone($name, $selected, $choices, $html_options);\n}", "function generate_timezones($current = '') {\n\n $output = '';\n \n $timezone_identifiers = DateTimeZone::listIdentifiers();\n \n foreach ($timezone_identifiers as $timezone) {\n \n $class = ($current == $timezone) ? 'selected' : '';\n \n $output .= '<option value=\"'.$timezone.'\"'.$class.'>'.$timezone.'</option>';\n \n }\n \n return $output;\n \n}", "public static function timezoneSelect($selectName) {\n\t\t$timezones = array(\n\t\t\t'America/New_York' => 'EDT (Eastern/New York)',\n\t\t\t'America/Chicago' => 'CDT (Central/Chicago)',\n\t\t\t'America/Boise' => 'MDT (Mountain/Boise)',\n\t\t\t'America/Phoenix' => 'MST (Arizona/Pheonix)',\n\t\t\t'America/Los_Angeles' => 'PDT (Pacific/Los Angeles)',\n\t\t\t'America/Juneau' => 'AKDT (Alaska/Juneau)',\n\t\t\t'Pacific/Honolulu' => 'HST (Hawaii/Honolulu)',\n\t\t\t'America/Puerto_Rico' => 'AST (Atlantic/Puerto Rico)',\n\t\t\t'Pacific/Guam' => 'ChST (Chamorro/Guam)',\n\t\t\t'Pacific/Samoa' => 'SST (Swedish Summer/Samoa)',\n\t\t\t'Pacific/Wake' => 'WAKT (Wake Time/Wake)',\n\t\t);\n\n\t\t$html = \"<select name='$selectName' id='$selectName'>\";\n\t\tforeach ($timezones as $key => $row) {\n\t\t\t$html .= \"<option value='$key'>$row</option>\";\n\t\t}\n\t\t$html .= '</select>';\n\n\t\treturn $html;\n\t}", "function wppb_timezone_select_options( $form_location ) {\r\n\t$timezone_array = apply_filters( 'wppb_'.$form_location.'_timezone_select_array', array ( '(GMT -12:00) Eniwetok, Kwajalein', '(GMT -11:00) Midway Island, Samoa', '(GMT -10:00) Hawaii', '(GMT -9:00) Alaska', '(GMT -8:00) Pacific Time (US & Canada)', '(GMT -7:00) Mountain Time (US & Canada)', '(GMT -6:00) Central Time (US & Canada), Mexico City', '(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima', '(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz', '(GMT -3:30) Newfoundland', '(GMT -3:00) Brazil, Buenos Aires, Georgetown', '(GMT -2:00) Mid-Atlantic', '(GMT -1:00) Azores, Cape Verde Islands', '(GMT) Western Europe Time, London, Lisbon, Casablanca', '(GMT +1:00) Brussels, Copenhagen, Madrid, Paris', '(GMT +2:00) Kaliningrad, South Africa', '(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg', '(GMT +3:30) Tehran', '(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi', '(GMT +4:30) Kabul', '(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent', '(GMT +5:30) Bombay, Calcutta, Madras, New Delhi', '(GMT +5:45) Kathmandu', '(GMT +6:00) Almaty, Dhaka, Colombo', '(GMT +7:00) Bangkok, Hanoi, Jakarta', '(GMT +8:00) Beijing, Perth, Singapore, Hong Kong', '(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk', '(GMT +9:30) Adelaide, Darwin', '(GMT +10:00) Eastern Australia, Guam, Vladivostok', '(GMT +11:00) Magadan, Solomon Islands, New Caledonia', '(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka' ) );\r\n\r\n\treturn $timezone_array;\r\n}", "function timezone_pulldown($fieldname = '', $selected = '', $showtime = true, $showabbr = true)\r\n\t{\r\n\t\t$list = DateTimeZone::listAbbreviations();\r\n\t\t$data = $offset = $added = array();\r\n\t\tforeach ($list AS $abbr => $info)\r\n\t\t{\r\n\t\t\tforeach ($info AS $zone)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($zone['timezone_id']) AND !in_array($zone['timezone_id'], $added))\r\n\t\t\t\t{\r\n\t\t\t\t\ttry \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$z = new DateTimeZone($zone['timezone_id']);\r\n\t\t\t\t\t\t$c = new DateTime(null, $z);\r\n\t\t\t\t\t\tif ($showtime)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$zone['time'] = $c->format('h:i A') . ' - ';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$zone['time'] = '';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($showabbr)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$zone['abbr'] = ' (' . $c->format('T') . ')';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$zone['abbr'] = '';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$zone['offset'] = $z->getOffset($c);\r\n\t\t\t\t\t\t$data[] = $zone;\r\n\t\t\t\t\t\t$offset[] = $zone['offset'];\r\n\t\t\t\t\t\t$added[] = $zone['timezone_id'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception $e) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//echo $e->getMessage() . '<br />';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tarray_multisort($offset, SORT_ASC, $data);\r\n\t\t$options = array();\r\n\t\tforeach ($data AS $key => $row)\r\n\t\t{\r\n\t\t\t$options[$row['timezone_id']] = $row['time'] . $this->timezone_offset($row['offset']) . $row['abbr'] . ' - ' . $row['timezone_id'];\r\n\t\t}\r\n\t\t$html = '<select name=\"' . $fieldname . '\" id=\"' . $fieldname . '\" class=\"select-250\">';\r\n\t\tforeach ($options AS $timezone_id => $output)\r\n\t\t{\r\n\t\t\tif (!empty($selected) AND $selected == $timezone_id)\r\n\t\t\t{\r\n\t\t\t\t$html .= '<option value=\"' . $timezone_id . '\" selected=\"selected\">' . $output . '</option>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$html .= '<option value=\"' . $timezone_id . '\">' . $output . '</option>';\r\n\t\t\t}\r\n\t\t}\r\n $html .= '</select>';\r\n return $html;\r\n\t}", "function wp_timezone_choice($selected_zone, $locale = \\null)\n{\n}", "function yourls_tzp_tz_dropdown( $user_time_zone ) {\n // Continent list\n $continent = array(\n 'Africa' => DateTimeZone::AFRICA,\n 'America' => DateTimeZone::AMERICA,\n 'Antarctica' => DateTimeZone::ANTARCTICA,\n 'Asia' => DateTimeZone::ASIA,\n 'Atlantic' => DateTimeZone::ATLANTIC,\n 'Australia' => DateTimeZone::AUSTRALIA,\n 'Europe' => DateTimeZone::EUROPE,\n 'Indian' => DateTimeZone::INDIAN,\n 'Pacific' => DateTimeZone::PACIFIC,\n );\n\n // Timezones per continents\n $timezones = array();\n foreach ($continent as $name => $mask) {\n $zones = DateTimeZone::listIdentifiers($mask);\n foreach($zones as $timezone) {\n // Remove region name\n $timezones[$name][$timezone] = substr($timezone, strlen($name) +1);\n }\n }\n\n // Manual UTC offset\n $offset_range = array(\n -12, -11.5, -11, -10.5, -10, -9.5, -9,\n -8.5, -8, -7.5, -7, -6.5, -6, -5.5,\n -5, -4.5, -4, -3.5, -3, -2.5, -2,\n -1.5, -1, -0.5, 0, 0.5, 1, 1.5,\n 2, 2.5, 3, 3.5, 4, 4.5, 5,\n 5.5, 5.75, 6, 6.5, 7, 7.5, 8,\n 8.5, 8.75, 9, 9.5, 10, 10.5, 11,\n 11.5, 12, 12.75, 13, 13.75, 14\n );\n\n foreach( $offset_range as $offset ) {\n if ( 0 <= $offset ) {\n $offset_name = '+' . $offset;\n } else {\n $offset_name = (string) $offset;\n }\n\n $offset_value = $offset_name;\n $offset_name = str_replace( array( '.25', '.5', '.75' ), array( ':15', ':30', ':45' ), $offset_name );\n $offset_name = 'UTC' . $offset_name;\n $offset_value = 'UTC' . $offset_value;\n $timezones['UTC'][$offset_value] = $offset_name;\n }\n\n print '<select name=\"time_zone\" id=\"time_zone\">';\n print '<option value=\"\" dzisabled=\"dzisabled\">Choose a time zone</option>';\n foreach($timezones as $region => $list) {\n print '<optgroup label=\"' . $region . '\">' . \"\\n\";\n foreach($list as $timezone => $name) {\n print '<option value=\"' . $timezone . '\" ' . (($timezone == $user_time_zone) ? \"selected='selected'\":\"\") . '>' . \"$region/$name\" . '</option>' . \"\\n\";\n }\n print '<optgroup>' . \"\\n\";\n }\n print '</select>';\n}", "public function Timezone( $args, $selected_value = '' ) {\n \n $label = $this -> get_attribute_value('label', $args);\n $classes = $this -> get_attribute_value('classes', $args);\n $id = $this -> get_attribute_value('id', $args);\n $name = $this -> get_attribute_value('name', $args);\n $multiple = $this -> get_attribute_value('multiple', $args);\n $attributes = $this -> get_attribute_value('attributes', $args);\n \n // Only title withou description for price calculation etc.\n $title = $args['title'];\n \n \n // Options\n $options = $this -> get_attribute_value('options', $args);\n\n\n if ( ! $options ) return;\n\n $input_wrapper_class = $this->get_default_setting_value('global', 'input_wrapper_class', $id);\n $input_wrapper_class = apply_filters('ppom_input_wrapper_class', $input_wrapper_class, $args);\n $html = '<div class=\"'.$input_wrapper_class.'\">';\n \n if( $label ){\n $html .= '<label class=\"'.$this->get_default_setting_value('global', 'label_class', $id).'\" for=\"'.$id.'\">';\n $html .= sprintf(__(\"%s\", \"ppom\"), $label) .'</label>';\n }\n \n $html .= '<select ';\n $html .= 'id=\"'.esc_attr($id).'\" ';\n $html .= 'name=\"'.esc_attr($name).'\" ';\n $html .= 'class=\"'.esc_attr($classes).'\" ';\n $html .= ($multiple) ? 'multiple' : '';\n \n // Attributes\n foreach($attributes as $attr => $value) {\n \n $html .= esc_attr($attr) . '=\"'.esc_attr($value).'\" ';\n }\n \n $html .= '>'; // Closing select\n \n // ppom_pa($options);\n foreach($options as $key => $option_label) {\n \n \n if( is_array($selected_value) ){\n \n foreach($selected_value as $s){\n $html .= '<option '.selected( $s, $key, false ).' value=\"'.esc_attr($key).'\" ';\n $html .= 'data-price=\"'.esc_attr($option_price).'\" ';\n $html .= 'data-label=\"'.esc_attr($option_label).'\"';\n $html .= 'data-onetime=\"'.esc_attr($onetime).'\"';\n $html .= '>'.$option_label.'</option>';\n }\n } else {\n $html .= '<option '.selected( $selected_value, $key, false ).' ';\n $html .= 'value=\"'.esc_attr($key).'\" ';\n $html .= 'data-title=\"'.esc_attr($title).'\"'; // Input main label/title\n $html .= '>'.$option_label.'</option>';\n }\n }\n \n $html .= '</select>';\n $html .= '</div>'; //form-group\n \n \n // filter: nmforms_input_htmls\n return apply_filters(\"nmforms_input_html\", $html, $args, $selected_value);\n }", "function agenda_tz_affiche_selecteur($timezone, $name, $id=null) {\n\tif (!$timezone) {\n\t\t$timezone = agenda_tz_defaut();\n\t}\n\tif (!$id) {\n\t\t$id=$name;\n\t}\n\n\t$prefered = sql_allfetsel(\"DISTINCT timezone_affiche\", \"spip_evenements\");\n\tif (count($prefered) > 15) {\n\t\t$prefered = sql_allfetsel(\"timezone_affiche, count(id_evenement) AS N\", \"spip_evenements\",'', \"timezone_affiche\", 'N DESC', '0,15');\n\t}\n\t$prefered = array_column($prefered, 'timezone_affiche');\n\t$prefered[] = agenda_tz_defaut();\n\n\t$out = \"<select name=\\\"$name\\\" id=\\\"$id\\\">\";\n\t$first = $all = \"\";\n\tforeach(timezone_identifiers_list() as $k => $tz) {\n\t\t$selected = (($tz === $timezone) ? ' selected=\"selected\"' : '');\n\t\t$option = \"<option val=\\\"$tz\\\"$selected>$tz</option>\";\n\t\tif (in_array($tz, $prefered)) {\n\t\t\t$first .= $option;\n\t\t\t$option = str_replace($selected,\"\", $option);\n\t\t}\n\n\t\t$all .= $option;\n\t}\n\t$out .=\n\t\t\"<optgroup label=\\\"\". attribut_html(_T('agenda:evenement_timezone_most_used')).\"\\\">$first</optgroup>\\n\"\n\t\t. \"<optgroup label=\\\"\". attribut_html(_T('agenda:evenement_timezone_all')).\"\\\">$all</optgroup>\\n\";\n\t$out .= \"</select>\";\n\treturn $out;\n}", "function avc_select($default, $select_name = 'check_time')\n{\n\tglobal $sys_timezone, $lang;\n\n\tif ( !isset($default) )\n\t{\n\t\t$default == $sys_timezone;\n\t}\n\t$avc_select = '<select name=\"' . $select_name . '\">';\n\n\twhile( list($offset, $zone) = @each($lang['avc_check_int']) )\n\t{\n\t\t$selected = ( $offset == $default ) ? ' selected=\"selected\"' : '';\n\t\t$avc_select .= '<option value=\"' . $offset . '\"' . $selected . '>' . $zone . '</option>';\n\t}\n\t$avc_select .= '</select>';\n\n\treturn $avc_select;\n}", "private function getTimeZoneChoices(): array\n {\n // Initialize output\n $choices = [];\n\n $iterator = static function (array $timezone) use (&$choices): void {\n $choices[$timezone['value'] . ' (' . $timezone['offset'] . ')'] = $timezone['identifier'];\n };\n\n array_map($iterator, $this->localization->getFormattedTimezones());\n\n return $choices;\n }", "public static function timezoneMenu($default = '')\n {\n $r = \"<div class='default'>\";\n $r .= \"<select name='site_timezone' class='select'>\";\n\n foreach (timezone_abbreviations_list() as $key => $val)\n {\n foreach($val as $val2) {\n if (isset($val2['timezone_id'])) {\n $selected = ($default == $val2['timezone_id']) ? \" selected='selected'\" : '';\n $r .= \"<option value='{$val2['timezone_id']}'{$selected}>\".$val2['timezone_id'].\"</option>\\n\";\n }\n }\n }\n\n $r .= \"</select>\";\n $r .= \"</div>\";\n\n return $r;\n }", "function yourls_tzp_js_css() {\n $plugin_url = yourls_plugin_url( __DIR__ );\n print <<<JSCSS\n <link href='$plugin_url/assets/select2.min.css' rel='stylesheet' />\n <script src='$plugin_url/assets/select2.min.js'></script>\n <script src='$plugin_url/assets/php-date-formatter.min.js'></script>\n <script>\n jQuery( document ).ready(function() {\n // auto select radio when custom input field is focused\n $('.custom :input').focusin(function() {\n $(this).prev().click();\n });\n\n // easy selector on timezones\n $('#time_zone').select2({\n templateResult: format_region,\n placeholder:'Choose a time zone'\n });\n\n // Real time date format preview\n $(\".custom_format\").on(\"keyup\", function() {\n format_preview($(this).attr('id'), $(this).val());\n });\n\n // Click a radio to change custom format accordingly\n $('.radio_format').change(\n function(){\n if (this.checked) {\n name = $(this).attr('name');\n value = $(this).attr('value');\n $('#'+name+'_custom_value').val(value).trigger($.Event(\"keyup\"));\n }\n }\n );\n })\n\n // Real time preview of date/time format\n function format_preview(id, value) {\n if($('#local_time')) {\n time = $('#local_time').text();\n } else {\n time = $('#utc_time').text();\n }\n id = id.replace('_custom_value', '');\n fmt = new DateFormatter();\n parse = fmt.parseDate(time, 'Y-m-d H:i:s');\n format = fmt.formatDate(parse, value );\n $('#tz_test_' + id).text(format);\n }\n\n // modify dropdown list\n function format_region(item) {\n if (!item.id) {\n return item.text;\n }\n var text = item.text.split('/');\n var region=text[0];\n var city=text[1];\n return $('<span class=\"region\">'+region+'</span> '+city+'</span>');\n }\n </script>\n <style>\n body {\n text-align:left;\n }\n h3 {\n border-bottom:1px solid #ccc;\n }\n div.settings {\n padding-bottom:1em;\n }\n .region{\n color:#aaa;\n font-style:italic;\n }\n </style>\nJSCSS;\n\n}", "public static function dropDownListTimezone()\n {\n $result=Timezone::find()->orderBy('timezone ASC')->all();\n return ArrayHelper::map($result, 'id', 'timezone');\n\n }", "function getTimeDropDown($timeFieldId = \"time\", $name = \"time\", $selectedTime = \"09:00:00\", $show_24_7_Time = false){\n\n $timeDropDown = '';\n\n for($hour = 0; $hour < 24; $hour++)\n {\n for($min = 0; $min < 60; $min = $min+30)\n {\n $currentHour = sprintf(\"%02d\", $hour);\n $currentMin = sprintf(\"%02d\", $min);\n\n $currentTime = $currentHour.':'.$currentMin.':00';\n $selected = ($currentTime == $selectedTime ? ' selected=\"selected\"' : '');\n\n $UTCUnixTime = strtotime(date(\"Y-m-d\").\" \".$currentTime);\n $printCurrentTime = date_i18n(get_option('time_format'), $UTCUnixTime, TRUE);\n\n $timeDropDown .= '<option value=\"'.$printCurrentTime.'\">'.$printCurrentTime.'</option>';\n }\n }\n\n // Special 23:59:59\n if($show_24_7_Time){\n $selected = ($selectedTime == \"23:59:59\" ? ' selected=\"selected\"' : '');\n\n $UTCUnixTime = strtotime(date(\"Y-m-d\").\" 23:59:59\");\n $printCurrentTime = date_i18n(get_option('time_format'), $UTCUnixTime, TRUE);\n\n $timeDropDown .= '<option value=\"23:59:59\"'.$selected.'>'.$printCurrentTime.'</option>';\n }\n\n $timeDropDown .= '';\n\n echo $timeDropDown;\n\n}", "public function eventTimeSelect() {\n\t\t// build options\n\t\t$options = array(\"all_day\" => $this->lh->translationFor(\"all_day\"));\n\t\tfor ($i = 0; $i < 24; $i++) {\n\t\t\tfor ($j = 0; $j < 60; $j += 15) {\n\t\t\t\t$hour = sprintf(\"%02d\", $i);\n\t\t\t\t$minute = sprintf(\"%02d\", $j);\n\t\t\t\t$options[\"$hour:$minute\"] = \"$hour:$minute\";\n\t\t\t}\n\t\t}\n\n\t\t// return select.\n\t\treturn $this->singleFormGroupWithSelect(\n\t\t null, \t\t\t\t\t\t\t\t\t// label\n\t\t \"time\", \t\t\t\t\t\t\t\t// id\n\t\t \"time\", \t\t\t\t\t\t\t\t// name\n\t\t $options, \t\t\t\t\t\t\t\t// options\n\t\t \"all_day\",\t\t\t\t\t\t\t\t// selected option\n\t\t false);\t\t\t\t\t\t\t\t\t// needs translation\n\t}", "private function _setTimezone(){\n //ALSO We need to modify the wizard to populate the dynamic_clients timzone value \n $where = $this->base_search;\n $q_r = $this->UserStats->find()->select(['UserStats.nasidentifier'])->where($where)->order(['UserStats.timestamp DESC'])->first();\n if($q_r){\n $nasidentifier = $q_r->nasidentifier;\n $e_dc = $this->{'DynamicClients'}->find()\n ->where(['DynamicClients.nasidentifier' => $nasidentifier])\n ->first();\n if($e_dc){\n if($e_dc !== ''){\n $tz_id = $e_dc->timezone;\n $ent = $this->{'Timezones'}->find()->where(['Timezones.id' => $tz_id])->first();\n if($ent){\n $time_zone = $ent->name;\n }\n } \n }\n }\n }", "private function _setTimezone(){\n //ALSO We need to modify the wizard to populate the dynamic_clients timzone value\n \n if($this->request->getQuery('timezone_id')){\n $tz_id = $this->request->getQuery('timezone_id');\n $ent_tz = $this->{'Timezones'}->find()->where(['Timezones.id' => $tz_id])->first();\n if($ent_tz){\n $this->time_zone = $ent_tz->name;\n return; //No need to go further\n } \n }\n \n \n $where = $this->base_search;\n $q_r = $this->UserStats->find()->select(['UserStats.nasidentifier'])->where($where)->order(['UserStats.timestamp DESC'])->first();\n if($q_r){\n $nasidentifier = $q_r->nasidentifier;\n $e_dc = $this->{'DynamicClients'}->find()\n ->where(['DynamicClients.nasidentifier' => $nasidentifier])\n ->first();\n if($e_dc){\n if($e_dc !== ''){\n $tz_id = $e_dc->timezone;\n if($tz_id != ''){\n $ent_tz = $this->{'Timezones'}->find()->where(['Timezones.id' => $tz_id])->first();\n if($ent_tz){\n $this->time_zone = $ent_tz->name;\n }\n }\n } \n }\n }\n }", "function lc_js_zone_list($country, $form, $field) {\n global $lC_Database, $lC_Language;\n\n $num_country = 1;\n $output_string = '';\n\n $Qcountries = $lC_Database->query('select distinct zone_country_id from :table_zones order by zone_country_id');\n $Qcountries->bindTable(':table_zones', TABLE_ZONES);\n $Qcountries->execute();\n\n while ($Qcountries->next()) {\n if ($num_country == 1) {\n $output_string .= ' if (' . $country . ' == \"' . $Qcountries->valueInt('zone_country_id') . '\") {' . \"\\n\";\n } else {\n $output_string .= ' } else if (' . $country . ' == \"' . $Qcountries->valueInt('zone_country_id') . '\") {' . \"\\n\";\n }\n\n $num_state = 1;\n\n $Qzones = $lC_Database->query('select zone_name, zone_id from :table_zones where zone_country_id = :zone_country_id order by zone_name');\n $Qzones->bindTable(':table_zones', TABLE_ZONES);\n $Qzones->bindInt(':zone_country_id', $Qcountries->valueInt('zone_country_id'));\n $Qzones->execute();\n\n while ($Qzones->next()) {\n if ($num_state == '1') {\n $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option(\"' . $lC_Language->get('all_zones') . '\", \"\");' . \"\\n\";\n }\n\n $output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option(\"' . $Qzones->value('zone_name') . '\", \"' . $Qzones->valueInt('zone_id') . '\");' . \"\\n\";\n\n $num_state++;\n }\n\n $num_country++;\n }\n\n $output_string .= ' } else {' . \"\\n\" .\n ' ' . $form . '.' . $field . '.options[0] = new Option(\"' . $lC_Language->get('all_zones') . '\", \"\");' . \"\\n\" .\n ' }' . \"\\n\";\n\n return $output_string;\n }", "public function getTimeSelectBox($times = null)\n {\n\n if (is_null($times)) {\n $times = $this->defaultTimes;\n }\n\n $ret = \"\";\n $ret .= \"<form method='get' action='{$this->requestURI}' \";\n $ret .= \"style='margin-top: 15px'class='pull-right'>\";\n $ret .= \"<select name='from' onchange='this.form.submit()'>\" . PHP_EOL;\n foreach ($times as $timefrom) {\n $current = $this->from ?: \"-{$this->defaultTime}\";\n $selected = ($current == \"-${timefrom}\") ? \" selected\" : \"\";\n $ret .= \"<option \";\n $ret .= \"value='-{$timefrom}'{$selected}>\";\n $ret .= \"{$timefrom}</option>\";\n $ret .= PHP_EOL;\n }\n\n $ret .= \"</select> </form>\";\n\n return $ret;\n\n }", "public function timezoneAction()\n {\n $uid = $this->_getParam('user_id');\n $tForm = new Core_Form_User_SetTimeZone($uid);\n $form = $tForm->getForm();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n $this->_model->setId($uid)->edit($form->getValues());\n $message = 'User\\'s timezone has been changed successfully';\n $this->_helper->FlashMessenger($message);\n $this->_helper->Redirector(\n 'edit', \n 'user', \n 'default', \n array('user_id' => $uid)\n );\n } else {\n $form->populate($_POST);\n $this->view->form = $form;\n }\n\n } else {\n\n $this->view->form = $form;\n }\n \n }", "function getZones()\r\n\t{\r\n\t\tTienda::load( 'TiendaSelect', 'library.select' );\r\n\t\t$html = '';\r\n\t\t$text = '';\r\n\t\t\t\r\n\t\t$country_id = $this->input->getInt('country_id');\r\n\t\t$prefix = $this->input->getCmd('prefix');\r\n\t\t\r\n\t\tif (empty($country_id))\r\n\t\t{\r\n\t\t $html = JText::_('COM_TIENDA_SELECT_COUNTRY');\r\n\t\t}\r\n \t\telse\r\n\t\t{\r\n\t\t $html = TiendaSelect::zone( '', $prefix.'zone_id', $country_id );\r\n\t\t}\r\n\t\t\t\r\n\t\t$response = array();\r\n\t\t$response['msg'] = $html . \" *\";\r\n\t\t$response['error'] = '';\r\n\r\n\t\t// encode and echo (need to echo to send back to browser)\r\n\t\techo ( json_encode($response) );\r\n\r\n\t\treturn;\r\n\t}", "public function testOptionTimezone()\n {\n $this->validator->setLocale('Europe/Berlin');\n $this->assertEquals('Europe/Berlin', $this->validator->getLocale());\n }", "function tep_js_zone_list($country, $form, $field) {\n $countries_query = tep_db_query(\"select distinct zone_country_id from \" . TABLE_ZONES . \" order by zone_country_id\");\n $num_country = 1;\n $output_string = '';\n while ($countries = tep_db_fetch_array($countries_query)) {\n if ($num_country == 1) {\n $output_string .= ' if (' . $country . ' == \"' . $countries['zone_country_id'] . '\") {' . \"\\n\";\n } else {\n $output_string .= ' } else if (' . $country . ' == \"' . $countries['zone_country_id'] . '\") {' . \"\\n\";\n }\n\n $states_query = tep_db_query(\"select zone_name, zone_id from \" . TABLE_ZONES . \" where zone_country_id = '\" . $countries['zone_country_id'] . \"' order by zone_name\");\n\n $num_state = 1;\n while ($states = tep_db_fetch_array($states_query)) {\n if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option(\"' . PLEASE_SELECT . '\", \"\");' . \"\\n\";\n $output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option(\"' . $states['zone_name'] . '\", \"' . $states['zone_id'] . '\");' . \"\\n\";\n $num_state++;\n }\n $num_country++;\n }\n $output_string .= ' } else {' . \"\\n\" .\n ' ' . $form . '.' . $field . '.options[0] = new Option(\"' . TYPE_BELOW . '\", \"\");' . \"\\n\" .\n ' }' . \"\\n\";\n\n return $output_string;\n }", "function get_zone_menu()\n\t{\n\t\t$id\t= $this->input->post('id');\n\t\t$zones\t= $this->Location_model->get_zones_menu($id);\n\t\t\n\t\tforeach($zones as $id=>$z):?>\n\t\t\n\t\t<option value=\"<?php echo $id;?>\"><?php echo $z;?></option>\n\t\t\n\t\t<?php endforeach;\n\t}", "function get_zone_menu()\n\t{\n\t\t$id\t= $this->input->post('id');\n\t\t$zones\t= $this->Location_model->get_zones_menu($id);\n\t\t\n\t\tforeach($zones as $id=>$z):?>\n\t\t\n\t\t<option value=\"<?php echo $id;?>\"><?php echo $z;?></option>\n\t\t\n\t\t<?php endforeach;\n\t}", "public function timezone_menu($default = NULL, $name = 'default_site_timezone')\n\t{\n\t\t// For the installer\n\t\tee()->load->helper('language');\n\n\t\t// We only want timezones with these prefixes\n\t\t$continents = array('Africa', 'America', 'Antarctica', 'Arctic',\n\t\t\t'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific');\n\n\t\t$zones_by_country = $this->_get_timezones_by_country();\n\t\t$countries = $this->_get_countries();\n\n\t\t$timezones = array();\n\n\t\tforeach ($countries as $code => $country)\n\t\t{\n\t\t\t// If country code does not match any timezones, skip the loop\n\t\t\tif ( ! isset($zones_by_country[$code]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We'll store timezones for the current country here\n\t\t\t$local_zones = array();\n\n\t\t\tforeach ($zones_by_country[$code] as $zone)\n\t\t\t{\n\t\t\t\t// Explode ID by slashes while replacing underscores with spaces\n\t\t\t\t$zone_array = str_replace('_', ' ', explode('/', $zone));\n\n\t\t\t\t// Exclude deprecated PHP timezones\n\t\t\t\tif ( ! in_array($zone_array[0], $continents))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Construct the localized zone name\n\t\t\t\tif (isset($zone_array[1]))\n\t\t\t\t{\n\t\t\t\t\t$zone_name = lang($zone_array[1]);\n\n\t\t\t\t\tif (isset($zone_array[2]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$zone_name .= ' - ' . lang($zone_array[2]);\n\t\t\t\t\t}\n\n\t\t\t\t\t$local_zones[$zone] = $zone_name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Sort timezones by their new names\n\t\t\tasort($local_zones);\n\n\t\t\t$timezones[$code] = $local_zones;\n\t\t}\n\n\t\t// Convert to JSON for fast switching of timezone dropdown\n\t\t$timezone_json = json_encode($timezones);\n\n\t\t$no_timezones_lang = lang('no_timezones');\n\n\t\t// Start the output with some javascript to handle the timezone\n\t\t// dropdown population based on the country dropdown\n\t\t$output = <<<EOF\n\n\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\tvar timezones = $timezone_json\n\n\t\t\t\tfunction ee_tz_change(countryselect)\n\t\t\t\t{\n\t\t\t\t\tvar timezoneselect = document.getElementById('timezone_select');\n\t\t\t\t\tvar countrycode = countryselect.options[countryselect.selectedIndex].value;\n\n\t\t\t\t\ttimezoneselect.options.length = 0;\n\n\t\t\t\t\tif (timezones[countrycode] == '' || timezones[countrycode] == undefined)\n\t\t\t\t\t{\n\t\t\t\t\t\ttimezoneselect.add(new Option('$no_timezones_lang', ''));\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (var key in timezones[countrycode])\n\t\t\t\t\t{\n\t\t\t\t\t\tif (timezones[countrycode].hasOwnProperty(key))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttimezoneselect.add(new Option(timezones[countrycode][key], key));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t</script>\nEOF;\n\n\t\t// Prepend to the top of countries dropdown with common country selections\n\t\t$countries = array_merge(\n\t\t\tarray(\n\t\t\t\tlang('select_timezone'),\n\t\t\t\t'-------------',\n\t\t\t\t'us' => $countries['us'], // United States\n\t\t\t\t'gb' => $countries['gb'], // United Kingdom\n\t\t\t\t'au' => $countries['au'], // Australia\n\t\t\t\t'ca' => $countries['ca'], // Canada\n\t\t\t\t'fr' => $countries['fr'], // France\n\t\t\t\t'ie' => $countries['ie'], // Ireland\n\t\t\t\t'nz' => $countries['nz'], // New Zealand\n\t\t\t\t'-------------'\n\t\t\t),\n\t\t\t$countries\n\t\t);\n\n\t\t// Get ready to load preselected values into the dropdowns if one exists\n\t\t$selected_country = NULL;\n\t\t$timezone_prepopulated = array('' => lang('no_timezones'));\n\n\t\tif ( ! empty($default))\n\t\t{\n\t\t\t$timezone_ids = DateTimeZone::listIdentifiers();\n\n\t\t\t// If default selection isn't valid, it may be our legacy timezone format\n\t\t\tif ( ! in_array($default, $timezone_ids))\n\t\t\t{\n\t\t\t\t$default = $this->get_php_timezone($default);\n\t\t\t}\n\n\t\t\t$selected_country = $this->_get_country_for_php_timezone($default);\n\n\t\t\t// Preselect timezone if we got a valid country back\n\t\t\tif ($selected_country)\n\t\t\t{\n\t\t\t\t$timezone_prepopulated = $timezones[$selected_country];\n\t\t\t}\n\t\t}\n\n\t\t// Construct the form\n\t\tee()->load->helper('form');\n\t\t$output .= form_dropdown('tz_country', $countries, $selected_country, 'onchange=\"ee_tz_change(this)\"');\n\t\t$output .= '&nbsp;&nbsp;'; // NBS constant doesn't work in installer\n\t\t$output .= form_dropdown($name, $timezone_prepopulated, $default, 'id=\"timezone_select\"');\n\n\t\treturn $output;\n\t}", "function choose_zone($title)\n\t{\n\t\t$fields=new ocp_tempcode();\n\t\trequire_code('form_templates');\n\t\trequire_lang('zones');\n\n\t\trequire_code('zones3');\n\t\t$zones=nice_get_zones();\n\t\t$fields->attach(form_input_list(do_lang_tempcode('ZONE'),'','zone',$zones,NULL,true));\n\n\t\t$post_url=get_self_url(false,false,NULL,false,true);\n\n\t\tbreadcrumb_set_self(do_lang_tempcode('CHOOSE'));\n\n\t\treturn do_template('FORM_SCREEN',array('_GUID'=>'457a5b8200991996b383bf75515382ab','GET'=>true,'SKIP_VALIDATION'=>true,'HIDDEN'=>'','SUBMIT_NAME'=>do_lang_tempcode('CHOOSE'),'TITLE'=>$title,'FIELDS'=>$fields,'URL'=>$post_url,'TEXT'=>''));\n\t}", "function theme_date_timezone($element) {\r\n return '<div class=\"date-clear\">'. theme('form_element', $element, $element['#children']) .'</div>';\r\n}", "function generate_timezone_list()\n{\n static $regions = array(\n DateTimeZone::AFRICA,\n DateTimeZone::AMERICA,\n DateTimeZone::ANTARCTICA,\n DateTimeZone::ASIA,\n DateTimeZone::ATLANTIC,\n DateTimeZone::AUSTRALIA,\n DateTimeZone::EUROPE,\n DateTimeZone::INDIAN,\n DateTimeZone::PACIFIC,\n );\n\n $timezones = array();\n foreach( $regions as $region )\n {\n $timezones = array_merge( $timezones, DateTimeZone::listIdentifiers( $region ) );\n }\n\n $timezone_offsets = array();\n foreach( $timezones as $timezone )\n {\n $tz = new DateTimeZone($timezone);\n $timezone_offsets[$timezone] = $tz->getOffset(new DateTime);\n }\n\n // sort timezone by offset\n asort($timezone_offsets);\n\n $timezone_list = array();\n foreach( $timezone_offsets as $timezone => $offset )\n {\n $offset_prefix = $offset < 0 ? '-' : '+';\n $offset_formatted = gmdate( 'H:i', abs($offset) );\n\n $pretty_offset = \"UTC${offset_prefix}${offset_formatted}\";\n\n $timezone_list[$timezone] = \"(${pretty_offset}) $timezone\";\n }\n\n return $timezone_list;\n}", "public function getTimezoneOptions()\n {\n $timezones = collect(timezone_identifiers_list())->mapWithKeys(function ($value) {\n return [$value => $value];\n });\n unset($timezones['UTC']);\n return $timezones->toArray();\n }", "function yourls_tzp_admin_page() {\n\n // Check if a form was submitted\n if( isset( $_POST['time_zone'] ) ) {\n // Check nonce and process form\n yourls_verify_nonce( 'time_zone_config' );\n $options = yourls_tzp_config_update_settings();\n echo yourls_notice_box('Timezone settings updated');\n } else {\n $options = (array)yourls_get_option( 'timezone' );\n }\n\n $user_time_zone = yourls_tzp_get_value($options, 'time_zone', 'UTC');\n $user_date_format = yourls_tzp_get_value($options, 'date_format', 'Y/m/d');\n $user_date_format_custom = yourls_tzp_get_value($options, 'date_format_custom', 'Y/m/d');\n $user_time_format = yourls_tzp_get_value($options, 'time_format', 'H:i');\n $user_time_format_custom = yourls_tzp_get_value($options, 'time_format_custom', 'H:i');\n\n // Draw page\n yourls_tzp_js_css();\n print '<h2>Time Zone Configuration</h2>\n <p>This plugin allows to specify a time zone and to format time/date display</p>';\n\n if( defined('YOURLS_HOURS_OFFSET') ) {\n print '<p><strong>Note:</strong> you have <code>YOURLS_HOURS_OFFSET</code> defined in your config.php. This plugin will override this setting.</p>';\n }\n\n print '<form method=\"post\">\n <input type=\"hidden\" name=\"nonce\" value=\"' . yourls_create_nonce( 'time_zone_config' ) . '\" />';\n\n // Time zones drop down\n print '<h3>Time zone: </h3>\n <div class=\"settings\">\n <p>Choose a city near your location, in the same timezone as you, or a UTC time offset.</p>';\n yourls_tzp_tz_dropdown( $user_time_zone );\n print '<p>Universal time (<code>UTC</code>) time is: <tt id=\"utc_time\">' . date( 'Y-m-d H:i:s', yourls_tzp_timezoned_timestamp( time(), 'UTC' ) ). '</tt></p>';\n if($user_time_zone) {\n print \"<p>Time in $user_time_zone is: <tt id='local_time'>\" . date( 'Y-m-d H:i:s', yourls_tzp_timezoned_timestamp( time(), $user_time_zone) ) . '</tt></p>';\n }\n print '</div>';\n\n // Display radio button for date format\n $choices = array(\n 'j F Y', // 13 April 2020\n 'F j, Y', // May 10, 2020\n 'd/m/Y', // 20/10/2020\n 'm/d/Y', // 10/20/2020\n 'Y/m/d', // 2020/10/20\n );\n yourls_tzp_format_radio( 'Date Format', 'date_format', $choices, $user_time_zone, $user_date_format, $user_date_format_custom );\n\n // Display radio button for date format\n $choices = array(\n 'H:i', // 21:23\n 'g:i a', // 9:23 pm\n 'g:i A', // 9:23 PM\n );\n yourls_tzp_format_radio( 'Time Format', 'time_format', $choices, $user_time_zone, $user_time_format, $user_time_format_custom );\n\n print '<p><input type=\"submit\" class=\"button primary\" value=\"Update configuration\" /></p>\n </form>\n <p><strong>Note:</strong> custom formats need a PHP <code><a href=\"https://php.net/date\">date()</a></code> string.';\n\n}", "function get_timezone_selector() {\n\t// http://www.php.net/manual/en/datetimezone.listidentifiers.php\n\t\n\t$timezones = array();\n\t$timezone_identifiers = DateTimeZone::listIdentifiers();\n\n\tforeach($timezone_identifiers as $value )\n\t{\n\t\tif ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\\//', $value ) )\n\t\t{\n\t\t\t$ex\t\t= explode('/',$value); //obtain continent,city\n\t\t\t$city\t= isset($ex[2])? $ex[1].' - '.$ex[2]:$ex[1]; //in case a timezone has more than one\n\t\t\t$timezones[$ex[0]][$value] = str_replace('_', ' ', $city);\n\t\t}\n\t}\n\treturn $timezones; \n}", "function timepicker($fieldName, $ind,$suffix=\"date\") {\n $output =\"<select name='data[Registration][$ind][{$fieldName}_$suffix]'>\";\n switch($suffix) {\n\t case \"date\":\n \t$range = range(25,30);\n \tbreak;\n \tcase \"time\":\n \t$range = range(1,12);\n \tbreak;\n \tcase \"ampm\":\n \t$range = array(\"AM\",\"PM\");\n \tbreak;\n \t}\n foreach($range as $day) {\n \t if ($fieldName ==\"departure\") {\n \t \t$output .= \"<option value='$day'>Sep $day</option>\";\n \t }else{\n\t \t$output .= \"<option value='$day'>$day</option>\";\n \t }\n }\n if ($fieldName ==\"departure\") {\n \t\t$output .= \"<option value='Oct 1'>Oct 1</option>\";\n }\n $output .= \"</select>\";\n// $output .= \"<select name='data[Registration][$ind][{$fieldName}_ampm]'>\";\n// $l = array(\"AM\",\"PM\");\n// foreach($l as $ampm) {\n// \t$output .= \"<option value='$ampm'>$ampm</option>\";\n// }\n// $output .= \"</select>\";\n return $output;\n }", "function TimeCombo($strLabel, $strField, $strTime)\n\t{\n\t\t$nHr = strtok($strTime, \":\");\n\t\t$nMn = strtok(\":\");\n\n\t\t$arrHr = array();\n\t\tfor($i = 0; $i <= 23; $i++)\n\t\t\tarray_push($arrHr, $i);\n\n\t\t$strHr = $strField . \"Hr\";\n\n\t\t$arrMn = array();\n\t\tfor($i = 0; $i <= 59; $i += 5)\n\t\t\tarray_push($arrMn, $i);\n\t\t\n\t\techo \"<tr>\";\n\t\techo \"\t<td valign=top>\";\n\t\techo\t\t$strLabel;\n\t\techo \"\t</td>\";\n\t\techo \"\t<td>\";\n\t\techo \"<select name=$strHr>\";\n\t\tComboBox(-1, $arrHr, true);\n\t\techo \"</select>\";\n\t\techo \"<select name=$strMn>\";\n\t\tComboBox(-1, $arrMn, true);\n\t\techo \"</select>\";\n\t\techo \"\t</td>\";\n\t\techo \"</tr>\";\n\t}", "function generate_timezone_list($country='') {\n\t\t$timezone_list = array();\n\t\tif($country!= ''){\n\t\t\tif($country == 1){\n\t\t\t\t$region = DateTimeZone::AFRICA;\n\t\t\t}\n\t\t\telse if($country == 2){\n\t\t\t\t$region = DateTimeZone::AMERICA;\n\t\t\t}\n\t\t\telse if($country == 3){\n\t\t\t\t$region = DateTimeZone::ANTARCTICA;\n\t\t\t}\n\t\t\telse if($country == 4){\n\t\t\t\t$region = DateTimeZone::ARCTIC;\n\t\t\t}\n\t\t\telse if($country == 5){\n\t\t\t\t$region = DateTimeZone::ASIA;\n\t\t\t}\n\t\t\telse if($country == 6){\n\t\t\t\t$region = DateTimeZone::ATLANTIC;\n\t\t\t}\n\t\t\telse if($country == 7){\n\t\t\t\t$region = DateTimeZone::AUSTRALIA;\n\t\t\t}\n\t\t\telse if($country == 8){\n\t\t\t\t$region = DateTimeZone::EUROPE;\n\t\t\t}\n\t\t\telse if($country == 9){\n\t\t\t\t$region = DateTimeZone::INDIAN;\n\t\t\t}\n\t\t\telse if($country == 10){\n\t\t\t\t$region = DateTimeZone::PACIFIC;\n\t\t\t}\n\t\t\t$timezones = array();\n\t\t\t/*foreach( $regions as $region ) {\n\t\t\t\t$timezones = array_merge( $timezones, DateTimeZone::listIdentifiers( $region ) );\n\t\t\t}*/\n\t\t\t$timezones = array_merge( $timezones, DateTimeZone::listIdentifiers( $region ) );\n\t\t\t$timezone_offsets = array();\n\t\t\tforeach( $timezones as $timezone ){\n\t\t\t\t$tz = new DateTimeZone($timezone);\n\t\t\t\t$timezone_offsets[$timezone] = $tz->getOffset(new DateTime);\n\t\t\t}\n\t\t\t// sort timezone by offset\n\t\t\t//asort($timezone_offsets);\n\t\t\t$timezone_list = array();\n\t\t\tforeach( $timezone_offsets as $timezone => $offset ) {\n\t\t\t\t$offset_prefix = $offset < 0 ? '-' : '+';\n\t\t\t\t$offset_formatted = gmdate( 'H:i', abs($offset) );\n\t\t\t\t//$pretty_offset = \"UTC${offset_prefix}${offset_formatted}\";\n\t\t\t\t$pretty_offset = \"${offset_prefix}${offset_formatted}\";\n\t\t\t\t$timezone_list[$timezone] = \"$timezone (${pretty_offset})\";\n\t\t\t}\n\t\t}\n\t\treturn $timezone_list;\n\t}", "protected function generateListOfTimeZones( Director $aContext )\n\t{\n\t\t// TODO Figure out how to generate a list of time zone labels and values\n\t\treturn $this ;\n\t}", "protected function _selectHour()\n {\n $name = $this->_name . '[H]';\n $value = $this->_getValue('H');\n $options = array(\n ''=>'-',\n '00'=>'00', '01'=>'01', '02'=>'02', '03'=>'03', '04'=>'04',\n '05'=>'05', '06'=>'06', '07'=>'07', '08'=>'08', '09'=>'09',\n '10'=>'10', '11'=>'11', '12'=>'12', '13'=>'13', '14'=>'14',\n '15'=>'15', '16'=>'16', '17'=>'17', '18'=>'18', '19'=>'19',\n '20'=>'20', '21'=>'21', '22'=>'22', '23'=>'23',\n );\n \n return $this->_view->formSelect(array(\n 'name' => $name,\n 'value' => $value,\n 'options' => $options,\n )) . \"\\n\";\n }", "function countries()\n\t{\n\t\t// Set the parameters\n\t\t$name = $this->EE->TMPL->fetch_param('name');\n\t\t$id = $this->EE->TMPL->fetch_param('id');\n\t\t$class = $this->EE->TMPL->fetch_param('class');\n\t\t$value = $this->EE->TMPL->fetch_param('value');\n\t\t$default = $this->EE->TMPL->fetch_param('default');\n\n\t\t$countries = $this->EE->product_model->get_countries();\n\t\t$output = '<select name=\"'.$name.'\" id=\"'.$id.'\" class=\"'.$class.'\">';\n\n\t\tforeach($countries as $key => $val)\n\t\t{\n\t\t\t$selected = '';\n\t\t\tif($key == $default) $selected = ' selected=\"selected\"';\n\n\t\t\t$sel = ($key == $value) ? 'selected=\"selected\"' : '' ;\n\t\t\t$output .=\t'<option value=\"'.$key.'\" class=\"{zone_id:'.$val[\"zone_id\"].'}\" '.$sel.$selected.'>'.$val[\"title\"].'</option>';\n\t\t} \t\t\t\n\t\t$output .= '</select>';\n\t\treturn $output;\n\t}", "public function bizohours_time_zone_callback()\r\n\t{\r\n\t\t$bizohours_options = get_option( \"bizohours_options\" );\r\n\t\t$timezone = $bizohours_options[\"timezone\"];\r\n\t\t$alltimezone = array ('Pacific/Midway' => '(UTC-11:00) Midway Island', 'Pacific/Samoa' => '(UTC-11:00) Samoa', 'Pacific/Honolulu' => '(UTC-10:00) Hawaii', 'US/Alaska' => '(UTC-09:00) Alaska', 'America/Los_Angeles' => '(UTC-08:00) Pacific Time (US &amp; Canada)', 'America/Tijuana' => '(UTC-08:00) Tijuana', 'US/Arizona' => '(UTC-07:00) Arizona', 'America/Chihuahua' => '(UTC-07:00) Chihuahua', 'America/Chihuahua' => '(UTC-07:00) La Paz', 'America/Mazatlan' => '(UTC-07:00) Mazatlan', 'US/Mountain' => '(UTC-07:00) Mountain Time (US &amp; Canada)', 'America/Managua' => '(UTC-06:00) Central America', 'US/Central' => '(UTC-06:00) Central Time (US &amp; Canada)', 'America/Mexico_City' => '(UTC-06:00) Guadalajara', 'America/Mexico_City' => '(UTC-06:00) Mexico City', 'America/Monterrey' => '(UTC-06:00) Monterrey', 'Canada/Saskatchewan' => '(UTC-06:00) Saskatchewan', 'America/Bogota' => '(UTC-05:00) Bogota', 'US/Eastern' => '(UTC-05:00) Eastern Time (US &amp; Canada)', 'US/East-Indiana' => '(UTC-05:00) Indiana (East)', 'America/Lima' => '(UTC-05:00) Lima', 'America/Bogota' => '(UTC-05:00) Quito', 'Canada/Atlantic' => '(UTC-04:00) Atlantic Time (Canada)', 'America/Caracas' => '(UTC-04:30) Caracas', 'America/La_Paz' => '(UTC-04:00) La Paz', 'America/Santiago' => '(UTC-04:00) Santiago', 'Canada/Newfoundland' => '(UTC-03:30) Newfoundland', 'America/Sao_Paulo' => '(UTC-03:00) Brasilia', 'America/Argentina/Buenos_Aires' => '(UTC-03:00) Buenos Aires', 'America/Argentina/Buenos_Aires' => '(UTC-03:00) Georgetown', 'America/Godthab' => '(UTC-03:00) Greenland', 'America/Noronha' => '(UTC-02:00) Mid-Atlantic', 'Atlantic/Azores' => '(UTC-01:00) Azores', 'Atlantic/Cape_Verde' => '(UTC-01:00) Cape Verde Is.', 'Africa/Casablanca' => '(UTC+00:00) Casablanca', 'Europe/London' => '(UTC+00:00) Edinburgh', 'Etc/Greenwich' => '(UTC+00:00) Greenwich Mean Time : Dublin', 'Europe/Lisbon' => '(UTC+00:00) Lisbon', 'Europe/London' => '(UTC+00:00) London', 'Africa/Monrovia' => '(UTC+00:00) Monrovia', 'UTC' => '(UTC+00:00)','Europe/Amsterdam' => '(UTC+01:00) Amsterdam', 'Europe/Belgrade' => '(UTC+01:00) Belgrade', 'Europe/Berlin' => '(UTC+01:00) Berlin', 'Europe/Berlin' => '(UTC+01:00) Bern', 'Europe/Bratislava' => '(UTC+01:00) Bratislava', 'Europe/Brussels' => '(UTC+01:00) Brussels', 'Europe/Budapest' => '(UTC+01:00) Budapest', 'Europe/Copenhagen' => '(UTC+01:00) Copenhagen', 'Europe/Ljubljana' => '(UTC+01:00) Ljubljana', 'Europe/Madrid' => '(UTC+01:00) Madrid', 'Europe/Paris' => '(UTC+01:00) Paris', 'Europe/Prague' => '(UTC+01:00) Prague', 'Europe/Rome' => '(UTC+01:00) Rome', 'Europe/Sarajevo' => '(UTC+01:00) Sarajevo', 'Europe/Skopje' => '(UTC+01:00) Skopje', 'Europe/Stockholm' => '(UTC+01:00) Stockholm', 'Europe/Vienna' => '(UTC+01:00) Vienna', 'Europe/Warsaw' => '(UTC+01:00) Warsaw', 'Africa/Lagos' => '(UTC+01:00) West Central Africa', 'Europe/Zagreb' => '(UTC+01:00) Zagreb', 'Europe/Athens' => '(UTC+02:00) Athens', 'Europe/Bucharest' => '(UTC+02:00) Bucharest', 'Africa/Cairo' => '(UTC+02:00) Cairo', 'Africa/Harare' => '(UTC+02:00) Harare', 'Europe/Helsinki' => '(UTC+02:00) Helsinki', 'Europe/Istanbul' => '(UTC+02:00) Istanbul', 'Asia/Jerusalem' => '(UTC+02:00) Jerusalem', 'Europe/Helsinki' => '(UTC+02:00) Kyiv', 'Africa/Johannesburg' => '(UTC+02:00) Pretoria', 'Europe/Riga' => '(UTC+02:00) Riga', 'Europe/Sofia' => '(UTC+02:00) Sofia', 'Europe/Tallinn' => '(UTC+02:00) Tallinn', 'Europe/Vilnius' => '(UTC+02:00) Vilnius', 'Asia/Baghdad' => '(UTC+03:00) Baghdad', 'Asia/Kuwait' => '(UTC+03:00) Kuwait', 'Europe/Minsk' => '(UTC+03:00) Minsk', 'Africa/Nairobi' => '(UTC+03:00) Nairobi', 'Asia/Riyadh' => '(UTC+03:00) Riyadh', 'Europe/Volgograd' => '(UTC+03:00) Volgograd', 'Asia/Tehran' => '(UTC+03:30) Tehran', 'Asia/Muscat' => '(UTC+04:00) Abu Dhabi', 'Asia/Baku' => '(UTC+04:00) Baku', 'Europe/Moscow' => '(UTC+04:00) Moscow', 'Asia/Muscat' => '(UTC+04:00) Muscat', 'Europe/Moscow' => '(UTC+04:00) St. Petersburg', 'Asia/Tbilisi' => '(UTC+04:00) Tbilisi', 'Asia/Yerevan' => '(UTC+04:00) Yerevan', 'Asia/Kabul' => '(UTC+04:30) Kabul', 'Asia/Karachi' => '(UTC+05:00) Islamabad', 'Asia/Karachi' => '(UTC+05:00) Karachi', 'Asia/Tashkent' => '(UTC+05:00) Tashkent', 'Asia/Calcutta' => '(UTC+05:30) Chennai', 'Asia/Kolkata' => '(UTC+05:30) Kolkata', 'Asia/Calcutta' => '(UTC+05:30) Mumbai', 'Asia/Calcutta' => '(UTC+05:30) New Delhi', 'Asia/Calcutta' => '(UTC+05:30) Sri Jayawardenepura', 'Asia/Katmandu' => '(UTC+05:45) Kathmandu', 'Asia/Almaty' => '(UTC+06:00) Almaty', 'Asia/Dhaka' => '(UTC+06:00) Astana', 'Asia/Dhaka' => '(UTC+06:00) Dhaka', 'Asia/Yekaterinburg' => '(UTC+06:00) Ekaterinburg', 'Asia/Rangoon' => '(UTC+06:30) Rangoon', 'Asia/Bangkok' => '(UTC+07:00) Bangkok', 'Asia/Bangkok' => '(UTC+07:00) Hanoi', 'Asia/Jakarta' => '(UTC+07:00) Jakarta', 'Asia/Novosibirsk' => '(UTC+07:00) Novosibirsk', 'Asia/Hong_Kong' => '(UTC+08:00) Beijing', 'Asia/Chongqing' => '(UTC+08:00) Chongqing', 'Asia/Hong_Kong' => '(UTC+08:00) Hong Kong', 'Asia/Krasnoyarsk' => '(UTC+08:00) Krasnoyarsk', 'Asia/Kuala_Lumpur' => '(UTC+08:00) Kuala Lumpur', 'Australia/Perth' => '(UTC+08:00) Perth', 'Asia/Singapore' => '(UTC+08:00) Singapore', 'Asia/Taipei' => '(UTC+08:00) Taipei', 'Asia/Ulan_Bator' => '(UTC+08:00) Ulaan Bataar', 'Asia/Urumqi' => '(UTC+08:00) Urumqi', 'Asia/Irkutsk' => '(UTC+09:00) Irkutsk', 'Asia/Tokyo' => '(UTC+09:00) Osaka', 'Asia/Tokyo' => '(UTC+09:00) Sapporo', 'Asia/Seoul' => '(UTC+09:00) Seoul', 'Asia/Tokyo' => '(UTC+09:00) Tokyo', 'Australia/Adelaide' => '(UTC+09:30) Adelaide', 'Australia/Darwin' => '(UTC+09:30) Darwin', 'Australia/Brisbane' => '(UTC+10:00) Brisbane', 'Australia/Canberra' => '(UTC+10:00) Canberra', 'Pacific/Guam' => '(UTC+10:00) Guam', 'Australia/Hobart' => '(UTC+10:00) Hobart', 'Australia/Melbourne' => '(UTC+10:00) Melbourne', 'Pacific/Port_Moresby' => '(UTC+10:00) Port Moresby', 'Australia/Sydney' => '(UTC+10:00) Sydney', 'Asia/Yakutsk' => '(UTC+10:00) Yakutsk', 'Asia/Vladivostok' => '(UTC+11:00) Vladivostok', 'Pacific/Auckland' => '(UTC+12:00) Auckland', 'Pacific/Fiji' => '(UTC+12:00) Fiji', 'Pacific/Kwajalein' => '(UTC+12:00) International Date Line West', 'Asia/Kamchatka' => '(UTC+12:00) Kamchatka', 'Asia/Magadan' => '(UTC+12:00) Magadan', 'Pacific/Fiji' => '(UTC+12:00) Marshall Is.', 'Asia/Magadan' => '(UTC+12:00) New Caledonia', 'Asia/Magadan' => '(UTC+12:00) Solomon Is.', 'Pacific/Auckland' => '(UTC+12:00) Wellington', 'Pacific/Tongatapu' => '(UTC+13:00) Nuku\\'alofa');\r\n\t\tif(empty($timezone) || stristr($timezone, 'UTC+') || stristr($timezone, 'UTC-') ) {\r\n\t\t\t$timezone = 'UTC';\r\n\t\t}\r\n\t\t$date = new DateTime('now', new DateTimeZone($timezone));\t\r\n\t\t\r\n\t\t$localtime = $date->format('h:i:s a');\r\n\t\techo '<select id=\"timezone\" name=\"bizohours_options[timezone]\">';\r\n\t\tforeach ($alltimezone as $key => $value) {\r\n\t\t\techo '<option value=\"'.$key.'\"';\r\n\t\t\tif($timezone == $key) { echo 'selected'; }\r\n\t\t\techo '>'.$value.'</option>';\r\n\t\t}\r\n\t\techo \"</select><br>Local time is $localtime.\";\r\n\r\n\t}", "function sed_selectbox_date($utime, $mode, $ext = '')\n\t{\n\tglobal $L;\n\tlist($s_year, $s_month, $s_day, $s_hour, $s_minute) = explode('-', @date('Y-m-d-H-i', $utime));\n\t$p_monthes = array();\n\t$p_monthes[] = array(1, $L['January']);\n\t$p_monthes[] = array(2, $L['February']);\n\t$p_monthes[] = array(3, $L['March']);\n\t$p_monthes[] = array(4, $L['April']);\n\t$p_monthes[] = array(5, $L['May']);\n\t$p_monthes[] = array(6, $L['June']);\n\t$p_monthes[] = array(7, $L['July']);\n\t$p_monthes[] = array(8, $L['August']);\n\t$p_monthes[] = array(9, $L['September']);\n\t$p_monthes[] = array(10, $L['October']);\n\t$p_monthes[] = array(11, $L['November']);\n\t$p_monthes[] = array(12, $L['December']);\n\n\t$result = \"<select name=\\\"ryear\".$ext.\"\\\">\";\n\tfor ($i = 1902; $i<2030; $i++)\n\t\t{\n\t\t$selected = ($i==$s_year) ? \"selected=\\\"selected\\\"\" : '';\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>$i</option>\";\n\t\t}\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\n\n\t$result .= \"</select><select name=\\\"rmonth\".$ext.\"\\\">\";\n\treset($p_monthes);\n\tforeach ($p_monthes as $k => $line)\n\t\t{\n\t\t$selected = ($line[0]==$s_month) ? \"selected=\\\"selected\\\"\" : '';\n\t\t$result .= \"<option value=\\\"\".$line[0].\"\\\" $selected>\".$line[1].\"</option>\";\n\t\t}\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\n\n\t$result .= \"</select><select name=\\\"rday\".$ext.\"\\\">\";\n\tfor ($i = 1; $i<32; $i++)\n\t\t{\n\t\t$selected = ($i==$s_day) ? \"selected=\\\"selected\\\"\" : '';\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>$i</option>\";\n\t\t}\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\n\t$result .= \"</select> \";\n\n\tif ($mode=='short')\n\t\t{ return ($result); }\n\n\t$result .= \" <select name=\\\"rhour\".$ext.\"\\\">\";\n\tfor ($i = 0; $i<24; $i++)\n\t\t{\n\t\t$selected = ($i==$s_hour) ? \"selected=\\\"selected\\\"\" : '';\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>\".sprintf(\"%02d\",$i).\"</option>\";\n\t\t}\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\n\n\t$result .= \"</select>:<select name=\\\"rminute\".$ext.\"\\\">\";\n\tfor ($i = 0; $i<60; $i=$i+1)\n\t\t{\n\t\t$selected = ($i==$s_minute) ? \"selected=\\\"selected\\\"\" : '';\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>\".sprintf(\"%02d\",$i).\"</option>\";\n\t\t}\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\n\t$result .= \"</select>\";\n\n\treturn ($result);\n\t}", "function time_select($name, $time = null, $html_options = null)\n{\n return CForm::time_select($name, $time, $html_options);\n}", "function scheduler_time() {\n\n $scheduler_time = '<select class=\"midrub-calendar-time-hour\">';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"01\">01</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"02\">02</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"03\">03</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"04\">04</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"05\">05</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"06\">06</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"07\">07</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"08\" selected>08</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"09\">09</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"10\">10</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"11\">11</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"12\">12</option>';\n $scheduler_time .= \"\\n\";\n if ( get_user_option('24_hour_format') ) {\n $scheduler_time .= '<option value=\"13\">13</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"14\">14</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"15\">15</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"16\">16</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"17\">17</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"18\">18</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"19\">19</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"20\">20</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"21\">21</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"22\">22</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"23\">23</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"00\">00</option>';\n $scheduler_time .= \"\\n\";\n }\n $scheduler_time .= '</select>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<select class = \"midrub-calendar-time-minutes\">';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"00\">00</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"10\">10</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"20\">20</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"30\">30</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"40\">40</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"50\">50</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '</select>';\n $scheduler_time .= \"\\n\";\n\n if ( !get_user_option('24_hour_format') ) {\n $scheduler_time .= '<select class = \"midrub-calendar-time-period\">';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"AM\">AM</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '<option value=\"PM\">PM</option>';\n $scheduler_time .= \"\\n\";\n $scheduler_time .= '</select>';\n $scheduler_time .= \"\\n\";\n }\n\n return $scheduler_time;\n \n }", "function hours_dropdown($dayofweek, $openingtime, $closingtime){\n\t\n\techo \"<select name='$dayofweek-openingtime'>\";\n\t\thours_dropdown_options($openingtime);\n\techo \"</select>\";\n\techo \"&nbsp;&nbsp;-&nbsp;&nbsp;\";\n\techo \"<select name='$dayofweek-closingtime'>\";\n\t\thours_dropdown_options($closingtime);\n\techo \"</select>\";\n\n}", "public function create_select_options() {\r\n\t\t// Fetch post types.\r\n\t\t$post_types = tf_get_post_types( $this->settings['public'], $this->settings['value'] );\r\n\r\n\t\t$this->settings['options'] = array(\r\n\t\t\t'' => '— ' . __( 'Select', TF_I18NDOMAIN ) . ' —'\r\n\t\t);\r\n\r\n\t\t// Print all the other pages\r\n\t\tforeach ( $post_types as $post_type ) {\r\n\r\n\t\t\tif ( ! empty( $post_type->labels->singular_name ) ) {\r\n\t\t\t\t$slugname = true == $this->settings['slug'] ? ' (' . $post_type->name . ')' : '';\r\n\t\t\t\t$name = $post_type->labels->singular_name . $slugname;\r\n\t\t\t} else {\r\n\t\t\t\t$name = $post_type->name;\r\n\t\t\t}\r\n\r\n\t\t\t$this->settings['options'][ $post_type->name ] = $name;\r\n\t\t}\r\n\t}", "public function newVtimezone() {\n return $this->newComponent( util::$LCVTIMEZONE );\n }", "function timezones(){\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"1\";\n\t$timezone->gmtAdjustment=\"GMT-12:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-12\";\n\t$timezone->description=\"(GMT-12:00) International Date Line West\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"2\";\n\t$timezone->gmtAdjustment=\"GMT-11:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-11\";\n\t$timezone->description=\"(GMT-11:00) Midway Island, Samoa\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"3\";\n\t$timezone->gmtAdjustment=\"GMT-10:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-10\";\n\t$timezone->description=\"(GMT-10:00) Hawaii\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"4\";\n\t$timezone->gmtAdjustment=\"GMT-09:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-9\";\n\t$timezone->description=\"(GMT-09:00) Alaska\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"5\";\n\t$timezone->gmtAdjustment=\"GMT-08:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-8\";\n\t$timezone->description=\"(GMT-08:00) Pacific Time (US & Canada)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"6\";\n\t$timezone->gmtAdjustment=\"GMT-08:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-8\";\n\t$timezone->description=\"(GMT-08:00) Tijuana, Baja California\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"7\";\n\t$timezone->gmtAdjustment=\"GMT-07:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-7\";\n\t$timezone->description=\"(GMT-07:00) Arizona\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"8\";\n\t$timezone->gmtAdjustment=\"GMT-07:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-7\";\n\t$timezone->description=\"(GMT-07:00) Chihuahua, La Paz, Mazatlan\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"9\";\n\t$timezone->gmtAdjustment=\"GMT-07:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-7\";\n\t$timezone->description=\"(GMT-07:00) Mountain Time (US & Canada)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"10\";\n\t$timezone->gmtAdjustment=\"GMT-06:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-6\";\n\t$timezone->description=\"(GMT-06:00) Central America\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"11\";\n\t$timezone->gmtAdjustment=\"GMT-06:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-6\";\n\t$timezone->description=\"(GMT-06:00) Central Time (US & Canada)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"12\";\n\t$timezone->gmtAdjustment=\"GMT-06:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-6\";\n\t$timezone->description=\"(GMT-06:00) Guadalajara, Mexico City, Monterrey\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"13\";\n\t$timezone->gmtAdjustment=\"GMT-06:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-6\";\n\t$timezone->description=\"(GMT-06:00) Saskatchewan\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"14\";\n\t$timezone->gmtAdjustment=\"GMT-05:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-5\";\n\t$timezone->description=\"(GMT-05:00) Bogota, Lima, Quito, Rio Branco\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"15\";\n\t$timezone->gmtAdjustment=\"GMT-05:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-5\";\n\t$timezone->description=\"(GMT-05:00) Eastern Time (US & Canada)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"16\";\n\t$timezone->gmtAdjustment=\"GMT-05:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-5\";\n\t$timezone->description=\"(GMT-05:00) Indiana (East)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"17\";\n\t$timezone->gmtAdjustment=\"GMT-04:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-4\";\n\t$timezone->description=\"(GMT-04:00) Atlantic Time (Canada)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"18\";\n\t$timezone->gmtAdjustment=\"GMT-04:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-4\";\n\t$timezone->description=\"(GMT-04:00) Caracas, La Paz\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"19\";\n\t$timezone->gmtAdjustment=\"GMT-04:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-4\";\n\t$timezone->description=\"(GMT-04:00) Manaus\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"20\";\n\t$timezone->gmtAdjustment=\"GMT-04:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-4\";\n\t$timezone->description=\"(GMT-04:00) Santiago\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"21\";\n\t$timezone->gmtAdjustment=\"GMT-03:30\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-3.5\";\n\t$timezone->description=\"(GMT-03:30) Newfoundland\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"22\";\n\t$timezone->gmtAdjustment=\"GMT-03:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-3\";\n\t$timezone->description=\"(GMT-03:00) Brasilia\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"23\";\n\t$timezone->gmtAdjustment=\"GMT-03:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-3\";\n\t$timezone->description=\"(GMT-03:00) Buenos Aires, Georgetown\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"24\";\n\t$timezone->gmtAdjustment=\"GMT-03:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-3\";\n\t$timezone->description=\"(GMT-03:00) Greenland\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"25\";\n\t$timezone->gmtAdjustment=\"GMT-03:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-3\";\n\t$timezone->description=\"(GMT-03:00) Montevideo\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"26\";\n\t$timezone->gmtAdjustment=\"GMT-02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-2\";\n\t$timezone->description=\"(GMT-02:00) Mid-Atlantic\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"27\";\n\t$timezone->gmtAdjustment=\"GMT-01:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"-1\";\n\t$timezone->description=\"(GMT-01:00) Cape Verde Is.\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"28\";\n\t$timezone->gmtAdjustment=\"GMT-01:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"-1\";\n\t$timezone->description=\"(GMT-01:00) Azores\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"29\";\n\t$timezone->gmtAdjustment=\"GMT+00:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"0\";\n\t$timezone->description=\"(GMT+00:00) Casablanca, Monrovia, Reykjavik\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"30\";\n\t$timezone->gmtAdjustment=\"GMT+00:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"0\";\n\t$timezone->description=\"(GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"31\";\n\t$timezone->gmtAdjustment=\"GMT+01:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"1\";\n\t$timezone->description=\"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"32\";\n\t$timezone->gmtAdjustment=\"GMT+01:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"1\";\n\t$timezone->description=\"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"33\";\n\t$timezone->gmtAdjustment=\"GMT+01:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"1\";\n\t$timezone->description=\"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"34\";\n\t$timezone->gmtAdjustment=\"GMT+01:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"1\";\n\t$timezone->description=\"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"35\";\n\t$timezone->gmtAdjustment=\"GMT+01:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"1\";\n\t$timezone->description=\"(GMT+01:00) West Central Africa\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"36\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Amman\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"37\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Athens, Bucharest, Istanbul\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"38\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Beirut\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"39\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Cairo\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"40\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Harare, Pretoria\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"41\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"42\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Jerusalem\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"43\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Minsk\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"44\";\n\t$timezone->gmtAdjustment=\"GMT+02:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"2\";\n\t$timezone->description=\"(GMT+02:00) Windhoek\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"45\";\n\t$timezone->gmtAdjustment=\"GMT+03:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"3\";\n\t$timezone->description=\"(GMT+03:00) Kuwait, Riyadh, Baghdad\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"46\";\n\t$timezone->gmtAdjustment=\"GMT+03:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"3\";\n\t$timezone->description=\"(GMT+03:00) Moscow, St. Petersburg, Volgograd\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"47\";\n\t$timezone->gmtAdjustment=\"GMT+03:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"3\";\n\t$timezone->description=\"(GMT+03:00) Nairobi\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"48\";\n\t$timezone->gmtAdjustment=\"GMT+03:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"3\";\n\t$timezone->description=\"(GMT+03:00) Tbilisi\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"49\";\n\t$timezone->gmtAdjustment=\"GMT+03:30\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"3.5\";\n\t$timezone->description=\"(GMT+03:30) Tehran\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"50\";\n\t$timezone->gmtAdjustment=\"GMT+04:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"4\";\n\t$timezone->description=\"(GMT+04:00) Abu Dhabi, Muscat\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"51\";\n\t$timezone->gmtAdjustment=\"GMT+04:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"4\";\n\t$timezone->description=\"(GMT+04:00) Baku\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"52\";\n\t$timezone->gmtAdjustment=\"GMT+04:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"4\";\n\t$timezone->description=\"(GMT+04:00) Yerevan\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"53\";\n\t$timezone->gmtAdjustment=\"GMT+04:30\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"4.5\";\n\t$timezone->description=\"(GMT+04:30) Kabul\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"54\";\n\t$timezone->gmtAdjustment=\"GMT+05:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"5\";\n\t$timezone->description=\"(GMT+05:00) Yekaterinburg\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"55\";\n\t$timezone->gmtAdjustment=\"GMT+05:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"5\";\n\t$timezone->description=\"(GMT+05:00) Islamabad, Karachi, Tashkent\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"56\";\n\t$timezone->gmtAdjustment=\"GMT+05:30\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"5.5\";\n\t$timezone->description=\"(GMT+05:30) Sri Jayawardenapura\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"57\";\n\t$timezone->gmtAdjustment=\"GMT+05:30\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"5.5\";\n\t$timezone->description=\"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"58\";\n\t$timezone->gmtAdjustment=\"GMT+05:45\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"5.75\";\n\t$timezone->description=\"(GMT+05:45) Kathmandu\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"59\";\n\t$timezone->gmtAdjustment=\"GMT+06:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"6\";\n\t$timezone->description=\"(GMT+06:00) Almaty, Novosibirsk\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"60\";\n\t$timezone->gmtAdjustment=\"GMT+06:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"6\";\n\t$timezone->description=\"(GMT+06:00) Astana, Dhaka\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"61\";\n\t$timezone->gmtAdjustment=\"GMT+06:30\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"6.5\";\n\t$timezone->description=\"(GMT+06:30) Yangon (Rangoon)\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"62\";\n\t$timezone->gmtAdjustment=\"GMT+07:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"7\";\n\t$timezone->description=\"(GMT+07:00) Bangkok, Hanoi, Jakarta\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"63\";\n\t$timezone->gmtAdjustment=\"GMT+07:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"7\";\n\t$timezone->description=\"(GMT+07:00) Krasnoyarsk\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"64\";\n\t$timezone->gmtAdjustment=\"GMT+08:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"8\";\n\t$timezone->description=\"(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"65\";\n\t$timezone->gmtAdjustment=\"GMT+08:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"8\";\n\t$timezone->description=\"(GMT+08:00) Kuala Lumpur, Singapore\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"66\";\n\t$timezone->gmtAdjustment=\"GMT+08:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"8\";\n\t$timezone->description=\"(GMT+08:00) Irkutsk, Ulaan Bataar\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"67\";\n\t$timezone->gmtAdjustment=\"GMT+08:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"8\";\n\t$timezone->description=\"(GMT+08:00) Perth\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"68\";\n\t$timezone->gmtAdjustment=\"GMT+08:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"8\";\n\t$timezone->description=\"(GMT+08:00) Taipei\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"69\";\n\t$timezone->gmtAdjustment=\"GMT+09:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"9\";\n\t$timezone->description=\"(GMT+09:00) Osaka, Sapporo, Tokyo\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"70\";\n\t$timezone->gmtAdjustment=\"GMT+09:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"9\";\n\t$timezone->description=\"(GMT+09:00) Seoul\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"71\";\n\t$timezone->gmtAdjustment=\"GMT+09:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"9\";\n\t$timezone->description=\"(GMT+09:00) Yakutsk\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"72\";\n\t$timezone->gmtAdjustment=\"GMT+09:30\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"9.5\";\n\t$timezone->description=\"(GMT+09:30) Adelaide\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"73\";\n\t$timezone->gmtAdjustment=\"GMT+09:30\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"9.5\";\n\t$timezone->description=\"(GMT+09:30) Darwin\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"74\";\n\t$timezone->gmtAdjustment=\"GMT+10:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"10\";\n\t$timezone->description=\"(GMT+10:00) Brisbane\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"75\";\n\t$timezone->gmtAdjustment=\"GMT+10:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"10\";\n\t$timezone->description=\"(GMT+10:00) Canberra, Melbourne, Sydney\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"76\";\n\t$timezone->gmtAdjustment=\"GMT+10:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"10\";\n\t$timezone->description=\"(GMT+10:00) Hobart\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"77\";\n\t$timezone->gmtAdjustment=\"GMT+10:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"10\";\n\t$timezone->description=\"(GMT+10:00) Guam, Port Moresby\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"78\";\n\t$timezone->gmtAdjustment=\"GMT+10:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"10\";\n\t$timezone->description=\"(GMT+10:00) Vladivostok\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"79\";\n\t$timezone->gmtAdjustment=\"GMT+11:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"11\";\n\t$timezone->description=\"(GMT+11:00) Magadan, Solomon Is., New Caledonia\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"80\";\n\t$timezone->gmtAdjustment=\"GMT+12:00\";\n\t$timezone->useDaylightTime=\"1\";\n\t$timezone->value=\"12\";\n\t$timezone->description=\"(GMT+12:00) Auckland, Wellington\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"81\";\n\t$timezone->gmtAdjustment=\"GMT+12:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"12\";\n\t$timezone->description=\"(GMT+12:00) Fiji, Kamchatka, Marshall Is.\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\t$timezone->timeZoneId=\"82\";\n\t$timezone->gmtAdjustment=\"GMT+13:00\";\n\t$timezone->useDaylightTime=\"0\";\n\t$timezone->value=\"13\";\n\t$timezone->description=\"(GMT+13:00) Nuku'alof\";\n\t$timezonelist[] = $timezone;\n\t$timezone = new stdClass();\n\n\treturn $timezonelist;\n}", "public function timezones()\n\t{\n\t\treturn array('Africa/Abidjan' => 'Africa/Abidjan', 'Africa/Accra' => 'Africa/Accra', 'Africa/Addis_Ababa' => 'Africa/Addis_Ababa', 'Africa/Algiers' => 'Africa/Algiers', 'Africa/Asmera' => 'Africa/Asmera', 'Africa/Bamako' => 'Africa/Bamako', 'Africa/Bangui' => 'Africa/Bangui', 'Africa/Banjul' => 'Africa/Banjul', 'Africa/Bissau' => 'Africa/Bissau', 'Africa/Blantyre' => 'Africa/Blantyre', 'Africa/Brazzaville' => 'Africa/Brazzaville', 'Africa/Bujumbura' => 'Africa/Bujumbura', 'Africa/Cairo' => 'Africa/Cairo', 'Africa/Casablanca' => 'Africa/Casablanca', 'Africa/Ceuta' => 'Africa/Ceuta', 'Africa/Conakry' => 'Africa/Conakry', 'Africa/Dakar' => 'Africa/Dakar', 'Africa/Dar_es_Salaam' => 'Africa/Dar_es_Salaam', 'Africa/Djibouti' => 'Africa/Djibouti', 'Africa/Douala' => 'Africa/Douala', 'Africa/El_Aaiun' => 'Africa/El_Aaiun', 'Africa/Freetown' => 'Africa/Freetown', 'Africa/Gaborone' => 'Africa/Gaborone', 'Africa/Harare' => 'Africa/Harare', 'Africa/Johannesburg' => 'Africa/Johannesburg', 'Africa/Kampala' => 'Africa/Kampala', 'Africa/Khartoum' => 'Africa/Khartoum', 'Africa/Kigali' => 'Africa/Kigali', 'Africa/Kinshasa' => 'Africa/Kinshasa', 'Africa/Lagos' => 'Africa/Lagos', 'Africa/Libreville' => 'Africa/Libreville', 'Africa/Lome' => 'Africa/Lome', 'Africa/Luanda' => 'Africa/Luanda', 'Africa/Lubumbashi' => 'Africa/Lubumbashi', 'Africa/Lusaka' => 'Africa/Lusaka', 'Africa/Malabo' => 'Africa/Malabo', 'Africa/Maputo' => 'Africa/Maputo', 'Africa/Maseru' => 'Africa/Maseru', 'Africa/Mbabane' => 'Africa/Mbabane', 'Africa/Mogadishu' => 'Africa/Mogadishu', 'Africa/Monrovia' => 'Africa/Monrovia', 'Africa/Nairobi' => 'Africa/Nairobi', 'Africa/Ndjamena' => 'Africa/Ndjamena', 'Africa/Niamey' => 'Africa/Niamey', 'Africa/Nouakchott' => 'Africa/Nouakchott', 'Africa/Ouagadougou' => 'Africa/Ouagadougou', 'Africa/Porto-Novo' => 'Africa/Porto-Novo', 'Africa/Sao_Tome' => 'Africa/Sao_Tome', 'Africa/Timbuktu' => 'Africa/Timbuktu', 'Africa/Tripoli' => 'Africa/Tripoli', 'Africa/Tunis' => 'Africa/Tunis', 'Africa/Windhoek' => 'Africa/Windhoek', 'America/Adak' => 'America/Adak', 'America/Anchorage' => 'America/Anchorage', 'America/Anguilla' => 'America/Anguilla', 'America/Antigua' => 'America/Antigua', 'America/Araguaina' => 'America/Araguaina', 'America/Argentina/Buenos_Aires' => 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca' => 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia' => 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba' => 'America/Argentina/Cordoba', 'America/Argentina/Jujuy' => 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja' => 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza' => 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos' => 'America/Argentina/Rio_Gallegos', 'America/Argentina/San_Juan' => 'America/Argentina/San_Juan', 'America/Argentina/Tucuman' => 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia' => 'America/Argentina/Ushuaia', 'America/Aruba' => 'America/Aruba', 'America/Asuncion' => 'America/Asuncion', 'America/Atikokan' => 'America/Atikokan', 'America/Atka' => 'America/Atka', 'America/Bahia' => 'America/Bahia', 'America/Barbados' => 'America/Barbados', 'America/Belem' => 'America/Belem', 'America/Belize' => 'America/Belize', 'America/Blanc-Sablon' => 'America/Blanc-Sablon', 'America/Boa_Vista' => 'America/Boa_Vista', 'America/Bogota' => 'America/Bogota', 'America/Boise' => 'America/Boise', 'America/Buenos_Aires' => 'America/Buenos_Aires', 'America/Cambridge_Bay' => 'America/Cambridge_Bay', 'America/Campo_Grande' => 'America/Campo_Grande', 'America/Cancun' => 'America/Cancun', 'America/Caracas' => 'America/Caracas', 'America/Catamarca' => 'America/Catamarca', 'America/Cayenne' => 'America/Cayenne', 'America/Cayman' => 'America/Cayman', 'America/Chicago' => 'America/Chicago', 'America/Chihuahua' => 'America/Chihuahua', 'America/Coral_Harbour' => 'America/Coral_Harbour', 'America/Cordoba' => 'America/Cordoba', 'America/Costa_Rica' => 'America/Costa_Rica', 'America/Cuiaba' => 'America/Cuiaba', 'America/Curacao' => 'America/Curacao', 'America/Danmarkshavn' => 'America/Danmarkshavn', 'America/Dawson' => 'America/Dawson', 'America/Dawson_Creek' => 'America/Dawson_Creek', 'America/Denver' => 'America/Denver', 'America/Detroit' => 'America/Detroit', 'America/Dominica' => 'America/Dominica', 'America/Edmonton' => 'America/Edmonton', 'America/Eirunepe' => 'America/Eirunepe', 'America/El_Salvador' => 'America/El_Salvador', 'America/Ensenada' => 'America/Ensenada', 'America/Fort_Wayne' => 'America/Fort_Wayne', 'America/Fortaleza' => 'America/Fortaleza', 'America/Glace_Bay' => 'America/Glace_Bay', 'America/Godthab' => 'America/Godthab', 'America/Goose_Bay' => 'America/Goose_Bay', 'America/Grand_Turk' => 'America/Grand_Turk', 'America/Grenada' => 'America/Grenada', 'America/Guadeloupe' => 'America/Guadeloupe', 'America/Guatemala' => 'America/Guatemala', 'America/Guayaquil' => 'America/Guayaquil', 'America/Guyana' => 'America/Guyana', 'America/Halifax' => 'America/Halifax', 'America/Havana' => 'America/Havana', 'America/Hermosillo' => 'America/Hermosillo', 'America/Indiana/Indianapolis' => 'America/Indiana/Indianapolis', 'America/Indiana/Knox' => 'America/Indiana/Knox', 'America/Indiana/Marengo' => 'America/Indiana/Marengo', 'America/Indiana/Petersburg' => 'America/Indiana/Petersburg', 'America/Indiana/Vevay' => 'America/Indiana/Vevay', 'America/Indiana/Vincennes' => 'America/Indiana/Vincennes', 'America/Indianapolis' => 'America/Indianapolis', 'America/Inuvik' => 'America/Inuvik', 'America/Iqaluit' => 'America/Iqaluit', 'America/Jamaica' => 'America/Jamaica', 'America/Jujuy' => 'America/Jujuy', 'America/Juneau' => 'America/Juneau', 'America/Kentucky/Louisville' => 'America/Kentucky/Louisville', 'America/Kentucky/Monticello' => 'America/Kentucky/Monticello', 'America/Knox_IN' => 'America/Knox_IN', 'America/La_Paz' => 'America/La_Paz', 'America/Lima' => 'America/Lima', 'America/Los_Angeles' => 'America/Los_Angeles', 'America/Louisville' => 'America/Louisville', 'America/Maceio' => 'America/Maceio', 'America/Managua' => 'America/Managua', 'America/Manaus' => 'America/Manaus', 'America/Martinique' => 'America/Martinique', 'America/Mazatlan' => 'America/Mazatlan', 'America/Mendoza' => 'America/Mendoza', 'America/Menominee' => 'America/Menominee', 'America/Merida' => 'America/Merida', 'America/Mexico_City' => 'America/Mexico_City', 'America/Miquelon' => 'America/Miquelon', 'America/Moncton' => 'America/Moncton', 'America/Monterrey' => 'America/Monterrey', 'America/Montevideo' => 'America/Montevideo', 'America/Montreal' => 'America/Montreal', 'America/Montserrat' => 'America/Montserrat', 'America/Nassau' => 'America/Nassau', 'America/New_York' => 'America/New_York', 'America/Nipigon' => 'America/Nipigon', 'America/Nome' => 'America/Nome', 'America/Noronha' => 'America/Noronha', 'America/North_Dakota/Center' => 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem' => 'America/North_Dakota/New_Salem', 'America/Panama' => 'America/Panama', 'America/Pangnirtung' => 'America/Pangnirtung', 'America/Paramaribo' => 'America/Paramaribo', 'America/Phoenix' => 'America/Phoenix', 'America/Port-au-Prince' => 'America/Port-au-Prince', 'America/Port_of_Spain' => 'America/Port_of_Spain', 'America/Porto_Acre' => 'America/Porto_Acre', 'America/Porto_Velho' => 'America/Porto_Velho', 'America/Puerto_Rico' => 'America/Puerto_Rico', 'America/Rainy_River' => 'America/Rainy_River', 'America/Rankin_Inlet' => 'America/Rankin_Inlet', 'America/Recife' => 'America/Recife', 'America/Regina' => 'America/Regina', 'America/Rio_Branco' => 'America/Rio_Branco', 'America/Rosario' => 'America/Rosario', 'America/Santiago' => 'America/Santiago', 'America/Santo_Domingo' => 'America/Santo_Domingo', 'America/Sao_Paulo' => 'America/Sao_Paulo', 'America/Scoresbysund' => 'America/Scoresbysund', 'America/Shiprock' => 'America/Shiprock', 'America/St_Johns' => 'America/St_Johns', 'America/St_Kitts' => 'America/St_Kitts', 'America/St_Lucia' => 'America/St_Lucia', 'America/St_Thomas' => 'America/St_Thomas', 'America/St_Vincent' => 'America/St_Vincent', 'America/Swift_Current' => 'America/Swift_Current', 'America/Tegucigalpa' => 'America/Tegucigalpa', 'America/Thule' => 'America/Thule', 'America/Thunder_Bay' => 'America/Thunder_Bay', 'America/Tijuana' => 'America/Tijuana', 'America/Toronto' => 'America/Toronto', 'America/Tortola' => 'America/Tortola', 'America/Vancouver' => 'America/Vancouver', 'America/Virgin' => 'America/Virgin', 'America/Whitehorse' => 'America/Whitehorse', 'America/Winnipeg' => 'America/Winnipeg', 'America/Yakutat' => 'America/Yakutat', 'America/Yellowknife' => 'America/Yellowknife', 'Antarctica/Casey' => 'Antarctica/Casey', 'Antarctica/Davis' => 'Antarctica/Davis', 'Antarctica/DumontDUrville' => 'Antarctica/DumontDUrville', 'Antarctica/Mawson' => 'Antarctica/Mawson', 'Antarctica/McMurdo' => 'Antarctica/McMurdo', 'Antarctica/Palmer' => 'Antarctica/Palmer', 'Antarctica/Rothera' => 'Antarctica/Rothera', 'Antarctica/South_Pole' => 'Antarctica/South_Pole', 'Antarctica/Syowa' => 'Antarctica/Syowa', 'Antarctica/Vostok' => 'Antarctica/Vostok', 'Arctic/Longyearbyen' => 'Arctic/Longyearbyen', 'Asia/Aden' => 'Asia/Aden', 'Asia/Almaty' => 'Asia/Almaty', 'Asia/Amman' => 'Asia/Amman', 'Asia/Anadyr' => 'Asia/Anadyr', 'Asia/Aqtau' => 'Asia/Aqtau', 'Asia/Aqtobe' => 'Asia/Aqtobe', 'Asia/Ashgabat' => 'Asia/Ashgabat', 'Asia/Ashkhabad' => 'Asia/Ashkhabad', 'Asia/Baghdad' => 'Asia/Baghdad', 'Asia/Bahrain' => 'Asia/Bahrain', 'Asia/Baku' => 'Asia/Baku', 'Asia/Bangkok' => 'Asia/Bangkok', 'Asia/Beirut' => 'Asia/Beirut', 'Asia/Bishkek' => 'Asia/Bishkek', 'Asia/Brunei' => 'Asia/Brunei', 'Asia/Calcutta' => 'Asia/Calcutta', 'Asia/Choibalsan' => 'Asia/Choibalsan', 'Asia/Chongqing' => 'Asia/Chongqing', 'Asia/Chungking' => 'Asia/Chungking', 'Asia/Colombo' => 'Asia/Colombo', 'Asia/Dacca' => 'Asia/Dacca', 'Asia/Damascus' => 'Asia/Damascus', 'Asia/Dhaka' => 'Asia/Dhaka', 'Asia/Dili' => 'Asia/Dili', 'Asia/Dubai' => 'Asia/Dubai', 'Asia/Dushanbe' => 'Asia/Dushanbe', 'Asia/Gaza' => 'Asia/Gaza', 'Asia/Harbin' => 'Asia/Harbin', 'Asia/Hong_Kong' => 'Asia/Hong_Kong', 'Asia/Hovd' => 'Asia/Hovd', 'Asia/Irkutsk' => 'Asia/Irkutsk', 'Asia/Istanbul' => 'Asia/Istanbul', 'Asia/Jakarta' => 'Asia/Jakarta', 'Asia/Jayapura' => 'Asia/Jayapura', 'Asia/Jerusalem' => 'Asia/Jerusalem', 'Asia/Kabul' => 'Asia/Kabul', 'Asia/Kamchatka' => 'Asia/Kamchatka', 'Asia/Karachi' => 'Asia/Karachi', 'Asia/Kashgar' => 'Asia/Kashgar', 'Asia/Katmandu' => 'Asia/Katmandu', 'Asia/Krasnoyarsk' => 'Asia/Krasnoyarsk', 'Asia/Kuching' => 'Asia/Kuching', 'Asia/Kuwait' => 'Asia/Kuwait', 'Asia/Macao' => 'Asia/Macao', 'Asia/Macau' => 'Asia/Macau', 'Asia/Magadan' => 'Asia/Magadan', 'Asia/Makassar' => 'Asia/Makassar', 'Asia/Manila' => 'Asia/Manila', 'Asia/Muscat' => 'Asia/Muscat', 'Asia/Nicosia' => 'Asia/Nicosia', 'Asia/Novosibirsk' => 'Asia/Novosibirsk', 'Asia/Omsk' => 'Asia/Omsk', 'Asia/Oral' => 'Asia/Oral', 'Asia/Phnom_Penh' => 'Asia/Phnom_Penh', 'Asia/Pontianak' => 'Asia/Pontianak', 'Asia/Pyongyang' => 'Asia/Pyongyang', 'Asia/Qatar' => 'Asia/Qatar', 'Asia/Qyzylorda' => 'Asia/Qyzylorda', 'Asia/Rangoon' => 'Asia/Rangoon', 'Asia/Riyadh' => 'Asia/Riyadh', 'Asia/Saigon' => 'Asia/Saigon', 'Asia/Sakhalin' => 'Asia/Sakhalin', 'Asia/Samarkand' => 'Asia/Samarkand', 'Asia/Seoul' => 'Asia/Seoul', 'Asia/Shanghai' => 'Asia/Shanghai', 'Asia/Singapore' => 'Asia/Singapore', 'Asia/Taipei' => 'Asia/Taipei', 'Asia/Tashkent' => 'Asia/Tashkent', 'Asia/Tbilisi' => 'Asia/Tbilisi', 'Asia/Tehran' => 'Asia/Tehran', 'Asia/Tel_Aviv' => 'Asia/Tel_Aviv', 'Asia/Thimbu' => 'Asia/Thimbu', 'Asia/Thimphu' => 'Asia/Thimphu', 'Asia/Tokyo' => 'Asia/Tokyo', 'Asia/Ujung_Pandang' => 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar' => 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator' => 'Asia/Ulan_Bator', 'Asia/Urumqi' => 'Asia/Urumqi', 'Asia/Vientiane' => 'Asia/Vientiane', 'Asia/Vladivostok' => 'Asia/Vladivostok', 'Asia/Yakutsk' => 'Asia/Yakutsk', 'Asia/Yekaterinburg' => 'Asia/Yekaterinburg', 'Asia/Yerevan' => 'Asia/Yerevan', 'Atlantic/Azores' => 'Atlantic/Azores', 'Atlantic/Bermuda' => 'Atlantic/Bermuda', 'Atlantic/Canary' => 'Atlantic/Canary', 'Atlantic/Cape_Verde' => 'Atlantic/Cape_Verde', 'Atlantic/Faeroe' => 'Atlantic/Faeroe', 'Atlantic/Jan_Mayen' => 'Atlantic/Jan_Mayen', 'Atlantic/Madeira' => 'Atlantic/Madeira', 'Atlantic/Reykjavik' => 'Atlantic/Reykjavik', 'Atlantic/South_Georgia' => 'Atlantic/South_Georgia', ' Atlantic/St_Helena ' => ' Atlantic/St_Helena ', 'Atlantic/Stanley' => 'Atlantic/Stanley', 'Australia/ACT' => 'Australia/ACT', 'Australia/Adelaide' => 'Australia/Adelaide', 'Australia/Brisbane' => 'Australia/Brisbane', 'Australia/Broken_Hill' => 'Australia/Broken_Hill', 'Australia/Canberra' => 'Australia/Canberra', 'Australia/Currie' => 'Australia/Currie', 'Australia/Darwin' => 'Australia/Darwin', 'Australia/Hobart' => 'Australia/Hobart', 'Australia/LHI' => 'Australia/LHI', 'Australia/Lindeman' => 'Australia/Lindeman', 'Australia/Lord_Howe' => 'Australia/Lord_Howe', 'Australia/Melbourne' => 'Australia/Melbourne', 'Australia/North' => 'Australia/North', 'Australia/NSW' => 'Australia/NSW', 'Australia/Perth' => 'Australia/Perth', 'Australia/Queensland' => 'Australia/Queensland', 'Australia/South' => 'Australia/South', 'Australia/Sydney' => 'Australia/Sydney', 'Australia/Tasmania' => 'Australia/Tasmania', 'Australia/Victoria' => 'Australia/Victoria', 'Australia/West' => 'Australia/West', 'Australia/Yancowinna' => 'Australia/Yancowinna', 'Europe/Amsterdam' => 'Europe/Amsterdam', 'Europe/Andorra' => 'Europe/Andorra', 'Europe/Athens' => 'Europe/Athens', 'Europe/Belfast' => 'Europe/Belfast', 'Europe/Belgrade' => 'Europe/Belgrade', 'Europe/Berlin' => 'Europe/Berlin', 'Europe/Bratislava' => 'Europe/Bratislava', 'Europe/Brussels' => 'Europe/Brussels', 'Europe/Bucharest' => 'Europe/Bucharest', 'Europe/Budapest' => 'Europe/Budapest', 'Europe/Chisinau' => 'Europe/Chisinau', 'Europe/Copenhagen' => 'Europe/Copenhagen', 'Europe/Dublin' => 'Europe/Dublin', 'Europe/Gibraltar' => 'Europe/Gibraltar', 'Europe/Guernsey' => 'Europe/Guernsey', 'Europe/Helsinki' => 'Europe/Helsinki', 'Europe/Isle_of_Man' => 'Europe/Isle_of_Man', 'Europe/Istanbul' => 'Europe/Istanbul', 'Europe/Jersey' => 'Europe/Jersey', 'Europe/Kaliningrad' => 'Europe/Kaliningrad', 'Europe/Kiev' => 'Europe/Kiev', 'Europe/Lisbon' => 'Europe/Lisbon', 'Europe/Ljubljana' => 'Europe/Ljubljana', 'Europe/London' => 'Europe/London', 'Europe/Luxembourg' => 'Europe/Luxembourg', 'Europe/Madrid' => 'Europe/Madrid', 'Europe/Malta' => 'Europe/Malta', 'Europe/Mariehamn' => 'Europe/Mariehamn', 'Europe/Minsk' => 'Europe/Minsk', 'Europe/Monaco' => 'Europe/Monaco', 'Europe/Moscow' => 'Europe/Moscow', 'Europe/Nicosia' => 'Europe/Nicosia', 'Europe/Oslo' => 'Europe/Oslo', 'Europe/Paris' => 'Europe/Paris', 'Europe/Prague' => 'Europe/Prague', 'Europe/Riga' => 'Europe/Riga', 'Europe/Rome' => 'Europe/Rome', 'Europe/Samara' => 'Europe/Samara', 'Europe/San_Marino' => 'Europe/San_Marino', 'Europe/Sarajevo' => 'Europe/Sarajevo', 'Europe/Simferopol' => 'Europe/Simferopol', 'Europe/Skopje' => 'Europe/Skopje', 'Europe/Sofia' => 'Europe/Sofia', 'Europe/Stockholm' => 'Europe/Stockholm', 'Europe/Tallinn' => 'Europe/Tallinn', 'Europe/Tirane' => 'Europe/Tirane', 'Europe/Tiraspol' => 'Europe/Tiraspol', 'Europe/Uzhgorod' => 'Europe/Uzhgorod', 'Europe/Vaduz' => 'Europe/Vaduz', 'Europe/Vatican' => 'Europe/Vatican', 'Europe/Vienna' => 'Europe/Vienna', 'Europe/Vilnius' => 'Europe/Vilnius', 'Europe/Volgograd' => 'Europe/Volgograd', 'Europe/Warsaw' => 'Europe/Warsaw', 'Europe/Zagreb' => 'Europe/Zagreb', 'Europe/Zaporozhye' => 'Europe/Zaporozhye', 'Europe/Zurich' => 'Europe/Zurich', 'Indian/Antananarivo' => 'Indian/Antananarivo', 'Indian/Chagos' => 'Indian/Chagos', 'Indian/Christmas' => 'Indian/Christmas', 'Indian/Cocos' => 'Indian/Cocos', 'Indian/Comoro' => 'Indian/Comoro', 'Indian/Kerguelen' => 'Indian/Kerguelen', 'Indian/Mahe' => 'Indian/Mahe', 'Indian/Maldives' => 'Indian/Maldives', 'Indian/Mauritius' => 'Indian/Mauritius', 'Indian/Mayotte' => 'Indian/Mayotte', 'Indian/Reunion' => 'Indian/Reunion', 'Pacific/Apia' => 'Pacific/Apia', 'Pacific/Auckland' => 'Pacific/Auckland', 'Pacific/Chatham' => 'Pacific/Chatham', 'Pacific/Easter' => 'Pacific/Easter', 'Pacific/Efate' => 'Pacific/Efate', 'Pacific/Enderbury' => 'Pacific/Enderbury', 'Pacific/Fakaofo' => 'Pacific/Fakaofo', 'Pacific/Fiji' => 'Pacific/Fiji', 'Pacific/Funafuti' => 'Pacific/Funafuti', 'Pacific/Galapagos' => 'Pacific/Galapagos', 'Pacific/Gambier' => 'Pacific/Gambier', 'Pacific/Guadalcanal' => 'Pacific/Guadalcanal', 'Pacific/Guam' => 'Pacific/Guam', 'Pacific/Honolulu' => 'Pacific/Honolulu', 'Pacific/Johnston' => 'Pacific/Johnston', 'Pacific/Kiritimati' => 'Pacific/Kiritimati', 'Pacific/Kosrae' => 'Pacific/Kosrae', 'Pacific/Kwajalein' => 'Pacific/Kwajalein', 'Pacific/Majuro' => 'Pacific/Majuro', 'Pacific/Marquesas' => 'Pacific/Marquesas', 'Pacific/Midway' => 'Pacific/Midway', 'Pacific/Nauru' => 'Pacific/Nauru', 'Pacific/Niue' => 'Pacific/Niue', 'Pacific/Norfolk' => 'Pacific/Norfolk', 'Pacific/Noumea' => 'Pacific/Noumea', 'Pacific/Pago_Pago' => 'Pacific/Pago_Pago', 'Pacific/Palau' => 'Pacific/Palau', 'Pacific/Pitcairn' => 'Pacific/Pitcairn', 'Pacific/Ponape' => 'Pacific/Ponape', 'Pacific/Port_Moresby' => 'Pacific/Port_Moresby', 'Pacific/Rarotonga' => 'Pacific/Rarotonga', 'Pacific/Saipan' => 'Pacific/Saipan', 'Pacific/Samoa' => 'Pacific/Samoa', 'Pacific/Tahiti' => 'Pacific/Tahiti', 'Pacific/Tarawa' => 'Pacific/Tarawa', 'Pacific/Tongatapu' => 'Pacific/Tongatapu', 'Pacific/Truk' => 'Pacific/Truk', 'Pacific/Wake' => 'Pacific/Wake', 'Pacific/Wallis' => 'Pacific/Wallis', 'Pacific/Yap' => 'Pacific/Yap');\n\t}", "function populateTimeFilter($selected=null) {\n echo('<select id=\"timelistbox\" name=\"timefilter\">');\n echo('<option value=\"today\" ' . ($selected=='today' ? \"SELECTED\" : null) . '>Today</option>');\n echo('<option value=\"week\" ' . ($selected=='week' ? \"SELECTED\" : null) . '>This Week</option>');\n echo('<option value=\"weekend\" ' . ($selected=='weekend' ? \"SELECTED\" : null) . '>This WeekEnd</option>');\n echo('<option value=\"month\" ' . ($selected=='month' ? \"SELECTED\" : null) . '>This Month</option>');\n echo('<option value=\"all\" ' . ($selected=='all' ? \"SELECTED\" : null) . '>All</option>');\n echo('</select>');\n}", "function zen_prepare_country_zones_pull_down($country_id = '') {\n// preset the width of the drop-down for Netscape\n $pre = '';\n if ( (!zen_browser_detect('MSIE')) && (zen_browser_detect('Mozilla/4')) ) {\n for ($i=0; $i<45; $i++) $pre .= '&nbsp;';\n }\n\n $zones = zen_get_country_zones($country_id);\n\n if (sizeof($zones) > 0) {\n $zones_select = array(array('id' => '', 'text' => PLEASE_SELECT));\n $zones = array_merge($zones_select, $zones);\n } else {\n $zones = array(array('id' => '', 'text' => TYPE_BELOW));\n// create dummy options for Netscape to preset the height of the drop-down\n if ( (!zen_browser_detect('MSIE')) && (zen_browser_detect('Mozilla/4')) ) {\n for ($i=0; $i<9; $i++) {\n $zones[] = array('id' => '', 'text' => $pre);\n }\n }\n }\n\n return $zones;\n }", "public function timezone() {\n $date=($this->conn['settings']['date'])?$this->conn['settings']['date']:'today';\n return $this->execByPosition('timezone',[\n 'date'=>date('Y-m-d',strtotime($date)),\n ]);\n }", "function sed_build_timezone($tz)\r\n{\r\n\tglobal $L;\r\n\r\n\t$result = 'GMT';\r\n\r\n\t$result .= sed_declension($tz, $L['Hours']);\r\n\r\n\treturn $result;\r\n}", "function set_timezone(&$errors){\n\t\tglobal $config, $auth;\n\t\n\t\tswitch($this->container_type){\n\t\tcase 'sql':\n\t\t\t$q=\"select timezone from \".$config->data_sql->table_subscriber.\n\t\t\t\t\" where domain='\".$config->realm.\"' and username='\".$auth->auth[\"uname\"].\"'\";\n\t\t\t$res=$this->db->query($q);\n\t\t\tif (DB::isError($res)) {log_errors($res, $errors); return;}\n\t\t\t$row = $res->fetchRow(DB_FETCHMODE_OBJECT);\n\t\t\t$res->free();\n\t\t\n\t\t\tputenv(\"TZ=\".$row->timezone); //set timezone\t\n\t\t\treturn;\n\n\t\tcase 'ldap':\n\t\t\tdie('NOT IMPLEMENTED: '.__FILE__.\":\".__LINE__);\n\t\t}\n\t}", "function sed_build_timezone($tz)\n\t{\n\tglobal $L;\n\n\t$result = 'GMT';\n\n\tif ($tz == -1 OR $tz == 1)\n\t\t{ $result .= $tz.' '.$L['Hour']; }\n\telseif ($tz!=0)\n\t\t{ $result .= $tz.' '.$L['Hours']; }\n\treturn($result);\n\t}", "function date_time_select($name, $datetime = null, $html_options = null)\n{\n return CForm::date_time_select($name, $datetime, $html_options);\n}", "protected function _selectDay()\n {\n $name = $this->_name . '[d]';\n $value = $this->_getValue('d');\n $options = array(\n ''=>'-',\n '01'=>'01', '02'=>'02', '03'=>'03', '04'=>'04', '05'=>'05',\n '06'=>'06', '07'=>'07', '08'=>'08', '09'=>'09', '10'=>'10',\n '11'=>'11', '12'=>'12', '13'=>'13', '14'=>'14', '15'=>'15',\n '16'=>'16', '17'=>'17', '18'=>'18', '19'=>'19', '20'=>'20',\n '21'=>'21', '22'=>'22', '23'=>'23', '24'=>'24', '25'=>'25',\n '26'=>'26', '27'=>'27', '28'=>'28', '29'=>'29', '30'=>'30',\n '31'=>'31',\n );\n \n return $this->_view->formSelect(array(\n 'name' => $name,\n 'value' => $value,\n 'options' => $options,\n )) . \"\\n\";\n }", "protected function _addTimezones()\n\t{\n\t\t//-----------------------------------------\n\t\t// Init\n\t\t//-----------------------------------------\n\t\t\n\t\t$output\t= '';\n\n\t\t//-----------------------------------------\n\t\t// Get the needed data\n\t\t//-----------------------------------------\n\t\t\n\t\t$events\t= $this->getEvents();\n\t\t$years\t= array();\n\t\t\n\t\tif( count($events) )\n\t\t{\n\t\t\tforeach( $events as $event )\n\t\t\t{\n\t\t\t\t$_startTime\t= @strtotime( $event['event']['event_start_date'] );\n\t\t\t\t$_endTime\t= @strtotime( $event['event']['event_end_date'] );\n\t\t\t\t\n\t\t\t\t$_year\t\t\t\t= gmdate( 'Y', $_startTime );\n\t\t\t\t$years[ $_year ]\t= $_year;\n\t\t\t\t\n\t\t\t\tif( $_endTime )\n\t\t\t\t{\n\t\t\t\t\twhile( $_startTime < $_endTime )\n\t\t\t\t\t{\n\t\t\t\t\t\t$_year\t\t\t\t= gmdate( 'Y', $_startTime );\n\t\t\t\t\t\t$years[ $_year ]\t= $_year;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$_year\t\t\t\t= gmdate( 'Y', $_endTime );\n\t\t\t\t\t\t$years[ $_year ]\t= $_year;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$_startTime\t+= 2592000;\t// add one month\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add the timezones to the object\n\t\t//-----------------------------------------\n\t\t\n\t\tforeach( $years as $year )\n\t\t{\n\t\t\t$_daylight_start\t= strtotime( 'last Sunday of March ' . $year );\n\t\t\t$_standard_start\t= strtotime( 'last Sunday of October ' . $year );\n\t\t\t$_daylight\t\t\t= gmmktime( 2, 0, 0, 3 , gmdate( 'j', $_daylight_start ), $year );\n\t\t\t$_standard\t\t\t= gmmktime( 2, 0, 0, 10, gmdate( 'j', $_standard_start ), $year );\n\t\t\t\n\t\t\t$output\t.= \"BEGIN:VTIMEZONE\\r\\n\";\n\t\t\t$output\t.= \"TZID:Europe/London\\r\\n\";\n\t\t\t$output\t.= \"TZURL:http://tzurl.org/zoneinfo/Europe/London\\r\\n\";\n\t\t\t$output\t.= \"X-LIC-LOCATION:Europe/London\\r\\n\";\n\n\t\t\t$output\t.= \"BEGIN:DAYLIGHT\\r\\n\";\n\t\t\t$output\t.= \"TZOFFSETFROM:+0000\\r\\n\";\n\t\t\t$output\t.= \"TZOFFSETTO:+0100\\r\\n\";\n\t\t\t$output\t.= \"TZNAME:BST\\r\\n\";\n\t\t\t$output\t.= \"DTSTART:\" . $this->_buildIcalDate( $_daylight ) . \"\\r\\n\"; \n\t\t\t$output\t.= \"RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\\r\\n\";\n\t\t\t$output\t.= \"END:DAYLIGHT\\r\\n\";\n\n\t\t\t$output\t.= \"BEGIN:STANDARD\\r\\n\";\n\t\t\t$output\t.= \"TZOFFSETFROM:+0100\\r\\n\";\n\t\t\t$output\t.= \"TZOFFSETTO:+0000\\r\\n\";\n\t\t\t$output\t.= \"TZNAME:GMT\\r\\n\";\n\t\t\t$output\t.= \"DTSTART:\" . $this->_buildIcalDate( $_standard ) . \"\\r\\n\"; \n\t\t\t$output\t.= \"RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\\r\\n\";\n\t\t\t$output\t.= \"END:STANDARD\\r\\n\";\n\n\t\t\t$output\t.= \"END:VTIMEZONE\\r\\n\";\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Return the output\n\t\t//-----------------------------------------\n\t\t\n\t\treturn $output;\n\t}", "function _select_box($title,$name,$options,$width='99%')\n\t{\n\t\t$select = \" <select style=\\\"width: $width;\\\" name=\\\"\".$name.'\" id=\"calendar_'.$name.'\" title=\"'.\n\t\t\tlang('Select a %1',lang($title)).'\">'.\n\t\t\t$options.\"</select>\\n\";\n\n\t\treturn array(\n\t\t\t'text' => $select,\n\t\t\t'no_lang' => True,\n\t\t\t'link' => False,\n\t\t\t'icon' => false,\n\t\t);\n\t}", "function zen_js_zone_list($country, $form, $field) {\n global $db;\n $countries = $db->Execute(\"select distinct zone_country_id\n from \" . TABLE_ZONES . \"\n order by zone_country_id\");\n $num_country = 1;\n $output_string = '';\n while (!$countries->EOF) {\n if ($num_country == 1) {\n $output_string .= ' if (' . $country . ' == \"' . $countries->fields['zone_country_id'] . '\") {' . \"\\n\";\n } else {\n $output_string .= ' } else if (' . $country . ' == \"' . $countries->fields['zone_country_id'] . '\") {' . \"\\n\";\n }\n\n $states = $db->Execute(\"select zone_name, zone_id\n from \" . TABLE_ZONES . \"\n where zone_country_id = '\" . $countries->fields['zone_country_id'] . \"'\n order by zone_name\");\n $num_state = 1;\n while (!$states->EOF) {\n if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option(\"' . PLEASE_SELECT . '\", \"\");' . \"\\n\";\n $output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option(\"' . $states->fields['zone_name'] . '\", \"' . $states->fields['zone_id'] . '\");' . \"\\n\";\n $num_state++;\n $states->MoveNext();\n }\n $num_country++;\n $countries->MoveNext();\n $output_string .= ' hideStateField(' . $form . ');' . \"\\n\" ;\n }\n $output_string .= ' } else {' . \"\\n\" .\n ' ' . $form . '.' . $field . '.options[0] = new Option(\"' . TYPE_BELOW . '\", \"\");' . \"\\n\" .\n ' showStateField(' . $form . ');' . \"\\n\" .\n ' }' . \"\\n\";\n return $output_string;\n }", "public static function getTimeZones()\n {\n return array(\n 'Pacific/Apia'=>'[GMT-11:00] West Samoa Time (MIT)',\n 'Pacific/Marquesas'=>'[GMT-09:30] Marquesas Time (Pacific / Marquesas)',\n 'America/Anchorage'=>'[GMT-09:00] Alaska Standard Time (AST)',\n 'America/Los_Angeles'=>'[GMT-08:00] Pacific Standard Time (US & Canada)',\n 'America/Phoenix'=>'[GMT-07:00] Mountain Standard Time (US / Arizona)',\n 'America/Chicago'=>'[GMT-06:00] Central Standard Time (US & Canada)',\n 'Pacific/Easter'=>'[GMT-06:00] Easter Is. Time (Pacific / Easter)',\n 'America/Havana'=>'[GMT-05:00] Central Standard Time (America / Havana)',\n 'America/Bogota'=>'[GMT-05:00] Colombia Time (America / Bogota)',\n 'America/Caracas'=>'[GMT-04:00] Venezuela Time (America / Caracas)',\n 'America/Asuncion'=>'[GMT-04:00] Paraguay Time (America / Asuncion)',\n 'America/Santiago'=>'[GMT-04:00] Chile Time (America / Santiago)',\n 'America/Cuiaba'=>'[GMT-04:00] Amazon Standard Time (America / Cuiaba)',\n 'America/La_Paz'=>'[GMT-04:00] Bolivia Time (America / La Paz)',\n 'Atlantic/Stanley'=>'[GMT-04:00] Falkland Is. Time (Atlantic / Stanley)',\n 'America/St_Johns'=>'[GMT-03:30] Newfoundland Standard Time (America / St Johns)',\n 'America/Argentina/Buenos_Aires'=>'[GMT-03:00] Argentine Time (AGT)',\n 'America/Godthab'=>'[GMT-03:00] Western Greenland Time (America / Godthab)',\n 'America/Montevideo'=>'[GMT-03:00] Uruguay Time (America / Montevideo)',\n 'America/Sao_Paulo'=>'[GMT-03:00] Brazil Time (BET)',\n 'America/Miquelon'=>'[GMT-03:00] Pierre & Miquelon Standard Time (America / Miquelon)',\n 'America/Noronha'=>'[GMT-02:00] Fernando de Noronha Time (America / Noronha)',\n 'Atlantic/Cape_Verde'=>'[GMT-01:00] Cape Verde Time (Atlantic / Cape Verde)',\n 'Atlantic/Azores'=>'[GMT-01:00] Azores Time (Atlantic / Azores)',\n 'Africa/Casablanca'=>'[GMT+00:00] Western European Time (Africa / Casablanca)',\n 'Africa/Algiers'=>'[GMT+01:00] Central European Time (Africa / Algiers)',\n 'Africa/Windhoek'=>'[GMT+01:00] Western African Time (Africa / Windhoek)',\n 'Africa/Johannesburg'=>'[GMT+02:00] South Africa Standard Time (Africa / Johannesburg)',\n 'Asia/Jerusalem'=>'[GMT+02:00] Israel Standard Time (Asia / Jerusalem)',\n 'Asia/Tehran'=>'[GMT+03:30] Iran Standard Time (Asia / Tehran)',\n 'Europe/Moscow'=>'[GMT+03:00] Moscow Standard Time (Europe / Moscow)',\n 'Asia/Dubai'=>'[GMT+04:00] Gulf Standard Time (Asia / Dubai)',\n 'Asia/Yerevan'=>'[GMT+04:00] Armenia Time (NET)',\n 'Asia/Baku'=>'[GMT+04:00] Azerbaijan Time (Asia / Baku)',\n 'Indian/Mauritius'=>'[GMT+04:00] Mauritius Time (Indian / Mauritius)',\n 'Asia/Kabul'=>'[GMT+04:30] Afghanistan Time (Asia / Kabul)',\n 'Asia/Tashkent'=>'[GMT+05:00] Uzbekistan Time (Asia / Tashkent)',\n 'Asia/Yekaterinburg'=>'[GMT+05:00] Yekaterinburg Time (Asia / Yekaterinburg)',\n 'Asia/Almaty'=>'[GMT+06:00] Alma-Ata Time (Asia / Almaty)',\n 'Asia/Rangoon'=>'[GMT+06:30] Myanmar Time (Asia / Rangoon)',\n 'Asia/Novosibirsk'=>'[GMT+06:00] Novosibirsk Time (Asia / Novosibirsk)',\n 'Asia/Hong_Kong'=>'[GMT+08:00] Hong Kong Time (Asia / Hong Kong)',\n 'Asia/Krasnoyarsk'=>'[GMT+07:00] Krasnoyarsk Time (Asia / Krasnoyarsk)',\n 'Asia/Singapore'=>'[GMT+08:00] Singapore Time (Asia / Singapore)',\n 'Australia/Perth'=>'[GMT+08:00] Western Standard Time (Australia) (Australia / Perth)',\n 'Asia/Irkutsk'=>'[GMT+08:00] Irkutsk Time (Asia / Irkutsk)',\n 'Asia/Tokyo'=>'[GMT+09:00] Japan Standard Time (JST)',\n 'Asia/Seoul'=>'[GMT+09:00] Korea Standard Time (Asia / Seoul)',\n 'Australia/Adelaide'=>'[GMT+09:30] Central Standard Time (South Australia) (Australia / Adelaide)',\n 'Australia/Darwin'=>'[GMT+09:30] Central Standard Time (Northern Territory) (ACT)',\n 'Australia/Brisbane'=>'[GMT+10:00] Eastern Standard Time (Queensland) (Australia / Brisbane)',\n 'Australia/Sydney'=>'[GMT+10:00] Eastern Standard Time (New South Wales) (Australia / Sydney)',\n 'Asia/Yakutsk'=>'[GMT+09:00] Yakutsk Time (Asia / Yakutsk)',\n 'Pacific/Noumea'=>'[GMT+11:00] New Caledonia Time (Pacific / Noumea)',\n 'Asia/Vladivostok'=>'[GMT+10:00] Vladivostok Time (Asia / Vladivostok)',\n 'Pacific/Norfolk'=>'[GMT+11:30] Norfolk Time (Pacific / Norfolk)',\n 'Asia/Anadyr'=>'[GMT+12:00] Anadyr Time (Asia / Anadyr)',\n 'Pacific/Auckland'=>'[GMT+12:00] New Zealand Standard Time (Pacific / Auckland)',\n 'Pacific/Fiji'=>'[GMT+12:00] Fiji Time (Pacific / Fiji)',\n 'Asia/Magadan'=>'[GMT+11:00] Magadan Time (Asia / Magadan)',\n 'Pacific/Chatham'=>'[GMT+12:45] Chatham Standard Time (Pacific / Chatham)',\n 'Pacific/Tongatapu'=>'[GMT+13:00] Tonga Time (Pacific / Tongatapu)',\n 'Pacific/Kiritimati'=>'[GMT+14:00] Line Is. Time (Pacific / Kiritimati)'\n );\n }", "public static function getTimezones()\n {\n $timezones = array(\n 'Pacific/Midway' => \"(GMT-11:00) Midway Island\",\n 'US/Samoa' => \"(GMT-11:00) Samoa\",\n 'US/Hawaii' => \"(GMT-10:00) Hawaii\",\n 'US/Alaska' => \"(GMT-09:00) Alaska\",\n 'US/Pacific' => \"(GMT-08:00) Pacific Time (US &amp; Canada)\",\n 'America/Tijuana' => \"(GMT-08:00) Tijuana\",\n 'US/Arizona' => \"(GMT-07:00) Arizona\",\n 'US/Mountain' => \"(GMT-07:00) Mountain Time (US &amp; Canada)\",\n 'America/Chihuahua' => \"(GMT-07:00) Chihuahua\",\n 'America/Mazatlan' => \"(GMT-07:00) Mazatlan\",\n 'America/Mexico_City' => \"(GMT-06:00) Mexico City\",\n 'America/Monterrey' => \"(GMT-06:00) Monterrey\",\n 'Canada/Saskatchewan' => \"(GMT-06:00) Saskatchewan\",\n 'US/Central' => \"(GMT-06:00) Central Time (US &amp; Canada)\",\n 'US/Eastern' => \"(GMT-05:00) Eastern Time (US &amp; Canada)\",\n 'US/East-Indiana' => \"(GMT-05:00) Indiana (East)\",\n 'America/Bogota' => \"(GMT-05:00) Bogota\",\n 'America/Lima' => \"(GMT-05:00) Lima\",\n 'America/Caracas' => \"(GMT-04:30) Caracas\",\n 'Canada/Atlantic' => \"(GMT-04:00) Atlantic Time (Canada)\",\n 'America/La_Paz' => \"(GMT-04:00) La Paz\",\n 'America/Santiago' => \"(GMT-04:00) Santiago\",\n 'Canada/Newfoundland' => \"(GMT-03:30) Newfoundland\",\n 'America/Buenos_Aires' => \"(GMT-03:00) Buenos Aires\",\n 'Greenland' => \"(GMT-03:00) Greenland\",\n 'Atlantic/Stanley' => \"(GMT-02:00) Stanley\",\n 'Atlantic/Azores' => \"(GMT-01:00) Azores\",\n 'Atlantic/Cape_Verde' => \"(GMT-01:00) Cape Verde Is.\",\n 'Africa/Casablanca' => \"(GMT) Casablanca\",\n 'Europe/Dublin' => \"(GMT) Dublin\",\n 'Europe/Lisbon' => \"(GMT) Lisbon\",\n 'Europe/London' => \"(GMT) London\",\n 'Africa/Monrovia' => \"(GMT) Monrovia\",\n 'Europe/Amsterdam' => \"(GMT+01:00) Amsterdam\",\n 'Europe/Belgrade' => \"(GMT+01:00) Belgrade\",\n 'Europe/Berlin' => \"(GMT+01:00) Berlin\",\n 'Europe/Bratislava' => \"(GMT+01:00) Bratislava\",\n 'Europe/Brussels' => \"(GMT+01:00) Brussels\",\n 'Europe/Budapest' => \"(GMT+01:00) Budapest\",\n 'Europe/Copenhagen' => \"(GMT+01:00) Copenhagen\",\n 'Europe/Ljubljana' => \"(GMT+01:00) Ljubljana\",\n 'Europe/Madrid' => \"(GMT+01:00) Madrid\",\n 'Europe/Paris' => \"(GMT+01:00) Paris\",\n 'Europe/Prague' => \"(GMT+01:00) Prague\",\n 'Europe/Rome' => \"(GMT+01:00) Rome\",\n 'Europe/Sarajevo' => \"(GMT+01:00) Sarajevo\",\n 'Europe/Skopje' => \"(GMT+01:00) Skopje\",\n 'Europe/Stockholm' => \"(GMT+01:00) Stockholm\",\n 'Europe/Vienna' => \"(GMT+01:00) Vienna\",\n 'Europe/Warsaw' => \"(GMT+01:00) Warsaw\",\n 'Europe/Zagreb' => \"(GMT+01:00) Zagreb\",\n 'Europe/Athens' => \"(GMT+02:00) Athens\",\n 'Europe/Bucharest' => \"(GMT+02:00) Bucharest\",\n 'Africa/Cairo' => \"(GMT+02:00) Cairo\",\n 'Africa/Harare' => \"(GMT+02:00) Harare\",\n 'Europe/Helsinki' => \"(GMT+02:00) Helsinki\",\n 'Europe/Istanbul' => \"(GMT+02:00) Istanbul\",\n 'Asia/Jerusalem' => \"(GMT+02:00) Jerusalem\",\n 'Europe/Kiev' => \"(GMT+02:00) Kyiv\",\n 'Europe/Minsk' => \"(GMT+02:00) Minsk\",\n 'Europe/Riga' => \"(GMT+02:00) Riga\",\n 'Europe/Sofia' => \"(GMT+02:00) Sofia\",\n 'Europe/Tallinn' => \"(GMT+02:00) Tallinn\",\n 'Europe/Vilnius' => \"(GMT+02:00) Vilnius\",\n 'Asia/Baghdad' => \"(GMT+03:00) Baghdad\",\n 'Asia/Kuwait' => \"(GMT+03:00) Kuwait\",\n 'Africa/Nairobi' => \"(GMT+03:00) Nairobi\",\n 'Asia/Riyadh' => \"(GMT+03:00) Riyadh\",\n 'Asia/Tehran' => \"(GMT+03:30) Tehran\",\n 'Europe/Moscow' => \"(GMT+04:00) Moscow\",\n 'Asia/Baku' => \"(GMT+04:00) Baku\",\n 'Europe/Volgograd' => \"(GMT+04:00) Volgograd\",\n 'Asia/Muscat' => \"(GMT+04:00) Muscat\",\n 'Asia/Tbilisi' => \"(GMT+04:00) Tbilisi\",\n 'Asia/Yerevan' => \"(GMT+04:00) Yerevan\",\n 'Asia/Kabul' => \"(GMT+04:30) Kabul\",\n 'Asia/Karachi' => \"(GMT+05:00) Karachi\",\n 'Asia/Tashkent' => \"(GMT+05:00) Tashkent\",\n 'Asia/Kolkata' => \"(GMT+05:30) Kolkata\",\n 'Asia/Kathmandu' => \"(GMT+05:45) Kathmandu\",\n 'Asia/Yekaterinburg' => \"(GMT+06:00) Ekaterinburg\",\n 'Asia/Almaty' => \"(GMT+06:00) Almaty\",\n 'Asia/Dhaka' => \"(GMT+06:00) Dhaka\",\n 'Asia/Novosibirsk' => \"(GMT+07:00) Novosibirsk\",\n 'Asia/Bangkok' => \"(GMT+07:00) Bangkok\",\n 'Asia/Jakarta' => \"(GMT+07:00) Jakarta\",\n 'Asia/Krasnoyarsk' => \"(GMT+08:00) Krasnoyarsk\",\n 'Asia/Chongqing' => \"(GMT+08:00) Chongqing\",\n 'Asia/Hong_Kong' => \"(GMT+08:00) Hong Kong\",\n 'Asia/Kuala_Lumpur' => \"(GMT+08:00) Kuala Lumpur\",\n 'Australia/Perth' => \"(GMT+08:00) Perth\",\n 'Asia/Singapore' => \"(GMT+08:00) Singapore\",\n 'Asia/Taipei' => \"(GMT+08:00) Taipei\",\n 'Asia/Ulaanbaatar' => \"(GMT+08:00) Ulaan Bataar\",\n 'Asia/Urumqi' => \"(GMT+08:00) Urumqi\",\n 'Asia/Irkutsk' => \"(GMT+09:00) Irkutsk\",\n 'Asia/Seoul' => \"(GMT+09:00) Seoul\",\n 'Asia/Tokyo' => \"(GMT+09:00) Tokyo\",\n 'Australia/Adelaide' => \"(GMT+09:30) Adelaide\",\n 'Australia/Darwin' => \"(GMT+09:30) Darwin\",\n 'Asia/Yakutsk' => \"(GMT+10:00) Yakutsk\",\n 'Australia/Brisbane' => \"(GMT+10:00) Brisbane\",\n 'Australia/Canberra' => \"(GMT+10:00) Canberra\",\n 'Pacific/Guam' => \"(GMT+10:00) Guam\",\n 'Australia/Hobart' => \"(GMT+10:00) Hobart\",\n 'Australia/Melbourne' => \"(GMT+10:00) Melbourne\",\n 'Pacific/Port_Moresby' => \"(GMT+10:00) Port Moresby\",\n 'Australia/Sydney' => \"(GMT+10:00) Sydney\",\n 'Asia/Vladivostok' => \"(GMT+11:00) Vladivostok\",\n 'Asia/Magadan' => \"(GMT+12:00) Magadan\",\n 'Pacific/Auckland' => \"(GMT+12:00) Auckland\",\n 'Pacific/Fiji' => \"(GMT+12:00) Fiji\",\n );\n\n return $timezones;\n }", "function generaSelect2($IdEstablecimiento,$IdModalidad) {//creacioon de combo para las Regiones\n conexion::conectar();\n $consulta = pg_query(\"select msse.IdSubServicioxEstablecimiento,NombreServicio,NombreSubServicio \n\t\t\t\tfrom mnt_subservicio mss\n\t\t\t\tinner join mnt_subservicioxestablecimiento msse\n\t\t\t\ton msse.IdSubServicio=mss.IdSubServicio\n inner join mnt_servicioxestablecimiento mse\n on mse.IdServicioxEstablecimiento=msse.IdServicioxEstablecimiento\n\t\t\t\tinner join mnt_servicio ms\n\t\t\t\ton ms.IdServicio=mse.IdServicio\n\t\t\t\twhere msse.IdEstablecimiento = $IdEstablecimiento\n and msse.IdModalidad=$IdModalidad\n and mse.IdEstablecimiento=$IdEstablecimiento\n and mse.IdModalidad=$IdModalidad\n\t\t\t\tand msse.CodigoFarmacia is not null\n\t\t\t\torder by mse.IdServicio,NombreSubServicio\");\n conexion::desconectar();\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='IdSubServicio' id='IdSubServicio'>\";\n echo \"<option value='0'>[General ...]</option>\";\n while ($registro = pg_fetch_row($consulta)) {\n\n echo \"<option value='\" . $registro[0] . \"'>[\" . $registro[1] . '] ' . $registro[2] . \"</option>\";\n }\n echo \"</select>\";\n }", "function makeOptionTimetable($s_id)\n {\n try\n {\n $s_option = '';\n for($i=1;$i<=24;$i++)\n {\n if($i<12)\n {\n $str1 = ' AM ';\n }\n\t\t\t\telse if($i>23)\n\t\t\t\t{\n\t\t\t\t\t$str1 = ' AM ';\n\t\t\t\t}\n else\n {\n $str1 = ' PM '; \n }\n $str = '';\n $str = str_pad(($i%12==0)?\"12\":$i%12, 2, \"0\", STR_PAD_LEFT);\n $str .= '.00'.$str1; \n\t\t\t\t\n\t\t\t\t$s_select = '';\n\t\t\t\tif($i == $s_id)\n\t\t\t\t\t$s_select = \" selected \";\n \n $s_option .= '<option '.$s_select.' value=\"'.$i.'\">'.$str.'</option>';\n }\n //echo '<select><option>Select</option>'.$s_option.'</select>';\n return $s_option;\n }\n catch(Exception $err_obj)\n {\n show_error($err_obj->getMessage());\n }\n }", "function sed_selectbox_date($utime, $mode, $ext='', $max_year = 2030, $min_year = 1902)\r\n{\r\n\tglobal $L;\r\n\tlist($s_year, $s_month, $s_day, $s_hour, $s_minute) = explode('-', @date('Y-m-d-H-i', $utime));\r\n\t$p_monthes = array();\r\n\t$p_monthes[] = array(1, $L['January']);\r\n\t$p_monthes[] = array(2, $L['February']);\r\n\t$p_monthes[] = array(3, $L['March']);\r\n\t$p_monthes[] = array(4, $L['April']);\r\n\t$p_monthes[] = array(5, $L['May']);\r\n\t$p_monthes[] = array(6, $L['June']);\r\n\t$p_monthes[] = array(7, $L['July']);\r\n\t$p_monthes[] = array(8, $L['August']);\r\n\t$p_monthes[] = array(9, $L['September']);\r\n\t$p_monthes[] = array(10, $L['October']);\r\n\t$p_monthes[] = array(11, $L['November']);\r\n\t$p_monthes[] = array(12, $L['December']);\r\n\r\n\t$result = \"<select name=\\\"ryear\".$ext.\"\\\">\";\r\n\tfor ($i = $min_year; $i < $max_year; $i++)\r\n\t{\r\n\t\t$selected = ($i==$s_year) ? \"selected=\\\"selected\\\"\" : '';\r\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>$i</option>\";\r\n\t}\r\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\r\n\r\n\t$result .= \"</select><select name=\\\"rmonth\".$ext.\"\\\">\";\r\n\treset($p_monthes);\r\n\tforeach ($p_monthes as $k => $line)\r\n\t{\r\n\t\t$selected = ($line[0]==$s_month) ? \"selected=\\\"selected\\\"\" : '';\r\n\t\t$result .= \"<option value=\\\"\".$line[0].\"\\\" $selected>\".$line[1].\"</option>\";\r\n\t}\r\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\r\n\r\n\t$result .= \"</select><select name=\\\"rday\".$ext.\"\\\">\";\r\n\tfor ($i = 1; $i<32; $i++)\r\n\t{\r\n\t\t$selected = ($i==$s_day) ? \"selected=\\\"selected\\\"\" : '';\r\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>$i</option>\";\r\n\t}\r\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\r\n\t$result .= \"</select> \";\r\n\r\n\tif ($mode=='short')\r\n\t{ return ($result); }\r\n\r\n\t$result .= \" <select name=\\\"rhour\".$ext.\"\\\">\";\r\n\tfor ($i = 0; $i<24; $i++)\r\n\t{\r\n\t\t$selected = ($i==$s_hour) ? \"selected=\\\"selected\\\"\" : '';\r\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>\".sprintf(\"%02d\",$i).\"</option>\";\r\n\t}\r\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\r\n\r\n\t$result .= \"</select>:<select name=\\\"rminute\".$ext.\"\\\">\";\r\n\tfor ($i = 0; $i<60; $i=$i+1)\r\n\t{\r\n\t\t$selected = ($i==$s_minute) ? \"selected=\\\"selected\\\"\" : '';\r\n\t\t$result .= \"<option value=\\\"$i\\\" $selected>\".sprintf(\"%02d\",$i).\"</option>\";\r\n\t}\r\n\t$result .= ($utime==0) ? \"<option value=\\\"0\\\" selected=\\\"selected\\\">---</option>\" : \"<option value=\\\"0\\\">---</option>\";\r\n\t$result .= \"</select>\";\r\n\r\n\treturn ($result);\r\n}", "static function get_timezone(){\n\t\treturn get_option('gc_timezone');\t\t\t\t\n\t\t\n\t}", "static function get_timezone(){\n\t\treturn get_option('gc_timezone');\t\t\t\t\n\t\t\n\t}", "public function __construct()\n {\n setTimeZone();\n }", "public function changeTimezone(){\n\t\t$timezone \t= $this->input->post('timezone');\n\t\t$time \t\t= $this->timezones->getTime($timezone);\n\t\techo $time;\n\t}", "protected function generate_zone_name()\n {\n }", "function makeOptionsAirport($code, $city)\n{\n return \"<option value='\" . $code . \"'>\" . $city . \"</option>\";\n}", "public function getTimeZoneLabel();", "function countries_menu($default = 'DZ', $class = '', $name = 'countries', $attributes = '')\n\t{\n\t\t$CI =& get_instance();\n\t\t\n\t\t$default or $default = 'DZ';\n\n\t\t$menu = '<select name=\"'.$name.'\"';\n\t\tif ($class !== '')\n\t\t{\n\t\t\t$menu .= ' class=\"'.$class.'\"';\n\t\t}\n\n\t\t$menu .= _stringify_attributes($attributes).\">\\n\";\n\t\t\n\t\t//foreach (timezones() as $key => $val)\n\t\tforeach (countries() as $key => $val)\n\t\t{\n\t\t\t$selected = ($default === $key) ? ' selected=\"selected\"' : '';\n\t\t\t$menu .= '<option value=\"'.$key.'\"'.$selected.'>'.$val['name'].\"</option>\\n\";\n\t\t}\n\n\t\treturn $menu.'</select>';\n\t}", "public function getTimeZone();", "public function getTimeZone();", "public function getTimeZone();", "public function horarios_disponibles() {\n $date = $this->input->post('day');\n $date = explode(\" \", $date);\n $inicio = gmdate(\"Y-m-d H:i:s\", strtotime($date[2] . \" \" . $date[1] . \" \" . $date[3] . \" 02:00:01\"));\n $final = gmdate(\"Y-m-d H:i:s\", strtotime($date[2] . \" \" . $date[1] . \" \" . $date[3] . \" 24:59:59\"));\n\n $appointment_datetime = $this->appointment->get_by_date($inicio, $final);\n $inicio_str = strtotime($date[2] . \" \" . $date[1] . \" \" . $date[3] . \" 09:00:00\");\n $select = \"\";\n $select .= \"<select name='day' required>\";\n if (!empty($appointment_datetime)) {\n for ($index = 0; $index < 15; $index++) {\n $a = true;\n foreach ($appointment_datetime as $app) {\n $dt_app = strtotime($app->day);\n if ($dt_app == $inicio_str) {\n $a = false;\n }\n }\n if ($a) {\n $select.= \"<option value='\" . gmdate(\"Y-m-d H:i:s\", $inicio_str) . \"'>\" . gmdate(\"H:i:s\", $inicio_str) . \"</option>\";\n $a = true;\n }\n $inicio_str = strtotime('+1 hours', $inicio_str);\n }\n } else {\n for ($index = 0; $index < 15; $index++) {\n $select.= \"<option value='\" . gmdate(\"Y-m-d H:i:s\", $inicio_str) . \"'>\" . gmdate(\"H:i:s\", $inicio_str) . \"</option>\";\n $inicio_str = strtotime('+1 hours', $inicio_str);\n }\n }\n $select .= \"</select>\";\n echo $select;\n }", "function generateDay($start = 1, $end = 31, $selected = 0) {\r\n $option = \"\";\r\n for ($i = $start; $i <= $end; $i++) {\r\n if ($selected > 0 && $selected == $i) {\r\n $option .= \"<option value='\" . $i . \"' selected>\" . $i . \"</option>\";\r\n } else {\r\n $option .= \"<option value='\" . $i . \"'>\" . $i . \"</option>\";\r\n }\r\n }\r\n return $option;\r\n}", "static public function getTimeZoneList(){\n $cacheKey = \"timezonelist\";\n\n if(!$response = Vipip::getCache($cacheKey)){\n $response = Vipip::get(\"settings/timezone\");\n\n Vipip::setCache($response, $cacheKey, 86400);\n }\n\n return $response->getAttributes();\n }", "public function getTimezone(){ return $this->getField('timezone','UTC'); }", "function get_timezones()\n{\n return Time::GetTimeZonesList();\n}", "function wppb_country_select_options( $form_location ) {\r\n\t$country_array = apply_filters( 'wppb_'.$form_location.'_country_select_array',\r\n\t\tarray(\r\n\t\t\t''\t => '',\r\n\t\t\t'AF' => __( 'Afghanistan', 'profile-builder' ),\r\n\t\t\t'AX' => __( 'Aland Islands', 'profile-builder' ),\r\n\t\t\t'AL' => __( 'Albania', 'profile-builder' ),\r\n\t\t\t'DZ' => __( 'Algeria', 'profile-builder' ),\r\n\t\t\t'AS' => __( 'American Samoa', 'profile-builder' ),\r\n\t\t\t'AD' => __( 'Andorra', 'profile-builder' ),\r\n\t\t\t'AO' => __( 'Angola', 'profile-builder' ),\r\n\t\t\t'AI' => __( 'Anguilla', 'profile-builder' ),\r\n\t\t\t'AQ' => __( 'Antarctica', 'profile-builder' ),\r\n\t\t\t'AG' => __( 'Antigua and Barbuda', 'profile-builder' ),\r\n\t\t\t'AR' => __( 'Argentina', 'profile-builder' ),\r\n\t\t\t'AM' => __( 'Armenia', 'profile-builder' ),\r\n\t\t\t'AW' => __( 'Aruba', 'profile-builder' ),\r\n\t\t\t'AU' => __( 'Australia', 'profile-builder' ),\r\n\t\t\t'AT' => __( 'Austria', 'profile-builder' ),\r\n\t\t\t'AZ' => __( 'Azerbaijan', 'profile-builder' ),\r\n\t\t\t'BS' => __( 'Bahamas', 'profile-builder' ),\r\n\t\t\t'BH' => __( 'Bahrain', 'profile-builder' ),\r\n\t\t\t'BD' => __( 'Bangladesh', 'profile-builder' ),\r\n\t\t\t'BB' => __( 'Barbados', 'profile-builder' ),\r\n\t\t\t'BY' => __( 'Belarus', 'profile-builder' ),\r\n\t\t\t'BE' => __( 'Belgium', 'profile-builder' ),\r\n\t\t\t'BZ' => __( 'Belize', 'profile-builder' ),\r\n\t\t\t'BJ' => __( 'Benin', 'profile-builder' ),\r\n\t\t\t'BM' => __( 'Bermuda', 'profile-builder' ),\r\n\t\t\t'BT' => __( 'Bhutan', 'profile-builder' ),\r\n\t\t\t'BO' => __( 'Bolivia', 'profile-builder' ),\r\n\t\t\t'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'profile-builder' ),\r\n\t\t\t'BA' => __( 'Bosnia and Herzegovina', 'profile-builder' ),\r\n\t\t\t'BW' => __( 'Botswana', 'profile-builder' ),\r\n\t\t\t'BV' => __( 'Bouvet Island', 'profile-builder' ),\r\n\t\t\t'BR' => __( 'Brazil', 'profile-builder' ),\r\n\t\t\t'IO' => __( 'British Indian Ocean Territory', 'profile-builder' ),\r\n\t\t\t'VG' => __( 'British Virgin Islands', 'profile-builder' ),\r\n\t\t\t'BN' => __( 'Brunei', 'profile-builder' ),\r\n\t\t\t'BG' => __( 'Bulgaria', 'profile-builder' ),\r\n\t\t\t'BF' => __( 'Burkina Faso', 'profile-builder' ),\r\n\t\t\t'BI' => __( 'Burundi', 'profile-builder' ),\r\n\t\t\t'KH' => __( 'Cambodia', 'profile-builder' ),\r\n\t\t\t'CM' => __( 'Cameroon', 'profile-builder' ),\r\n\t\t\t'CA' => __( 'Canada', 'profile-builder' ),\r\n\t\t\t'CV' => __( 'Cape Verde', 'profile-builder' ),\r\n\t\t\t'KY' => __( 'Cayman Islands', 'profile-builder' ),\r\n\t\t\t'CF' => __( 'Central African Republic', 'profile-builder' ),\r\n\t\t\t'TD' => __( 'Chad', 'profile-builder' ),\r\n\t\t\t'CL' => __( 'Chile', 'profile-builder' ),\r\n\t\t\t'CN' => __( 'China', 'profile-builder' ),\r\n\t\t\t'CX' => __( 'Christmas Island', 'profile-builder' ),\r\n\t\t\t'CC' => __( 'Cocos Islands', 'profile-builder' ),\r\n\t\t\t'CO' => __( 'Colombia', 'profile-builder' ),\r\n\t\t\t'KM' => __( 'Comoros', 'profile-builder' ),\r\n\t\t\t'CK' => __( 'Cook Islands', 'profile-builder' ),\r\n\t\t\t'CR' => __( 'Costa Rica', 'profile-builder' ),\r\n\t\t\t'HR' => __( 'Croatia', 'profile-builder' ),\r\n\t\t\t'CU' => __( 'Cuba', 'profile-builder' ),\r\n\t\t\t'CW' => __( 'Curacao', 'profile-builder' ),\r\n\t\t\t'CY' => __( 'Cyprus', 'profile-builder' ),\r\n\t\t\t'CZ' => __( 'Czech Republic', 'profile-builder' ),\r\n\t\t\t'CD' => __( 'Democratic Republic of the Congo', 'profile-builder' ),\r\n\t\t\t'DK' => __( 'Denmark', 'profile-builder' ),\r\n\t\t\t'DJ' => __( 'Djibouti', 'profile-builder' ),\r\n\t\t\t'DM' => __( 'Dominica', 'profile-builder' ),\r\n\t\t\t'DO' => __( 'Dominican Republic', 'profile-builder' ),\r\n\t\t\t'TL' => __( 'East Timor', 'profile-builder' ),\r\n\t\t\t'EC' => __( 'Ecuador', 'profile-builder' ),\r\n\t\t\t'EG' => __( 'Egypt', 'profile-builder' ),\r\n\t\t\t'SV' => __( 'El Salvador', 'profile-builder' ),\r\n\t\t\t'GQ' => __( 'Equatorial Guinea', 'profile-builder' ),\r\n\t\t\t'ER' => __( 'Eritrea', 'profile-builder' ),\r\n\t\t\t'EE' => __( 'Estonia', 'profile-builder' ),\r\n\t\t\t'ET' => __( 'Ethiopia', 'profile-builder' ),\r\n\t\t\t'FK' => __( 'Falkland Islands', 'profile-builder' ),\r\n\t\t\t'FO' => __( 'Faroe Islands', 'profile-builder' ),\r\n\t\t\t'FJ' => __( 'Fiji', 'profile-builder' ),\r\n\t\t\t'FI' => __( 'Finland', 'profile-builder' ),\r\n\t\t\t'FR' => __( 'France', 'profile-builder' ),\r\n\t\t\t'GF' => __( 'French Guiana', 'profile-builder' ),\r\n\t\t\t'PF' => __( 'French Polynesia', 'profile-builder' ),\r\n\t\t\t'TF' => __( 'French Southern Territories', 'profile-builder' ),\r\n\t\t\t'GA' => __( 'Gabon', 'profile-builder' ),\r\n\t\t\t'GM' => __( 'Gambia', 'profile-builder' ),\r\n\t\t\t'GE' => __( 'Georgia', 'profile-builder' ),\r\n\t\t\t'DE' => __( 'Germany', 'profile-builder' ),\r\n\t\t\t'GH' => __( 'Ghana', 'profile-builder' ),\r\n\t\t\t'GI' => __( 'Gibraltar', 'profile-builder' ),\r\n\t\t\t'GR' => __( 'Greece', 'profile-builder' ),\r\n\t\t\t'GL' => __( 'Greenland', 'profile-builder' ),\r\n\t\t\t'GD' => __( 'Grenada', 'profile-builder' ),\r\n\t\t\t'GP' => __( 'Guadeloupe', 'profile-builder' ),\r\n\t\t\t'GU' => __( 'Guam', 'profile-builder' ),\r\n\t\t\t'GT' => __( 'Guatemala', 'profile-builder' ),\r\n\t\t\t'GG' => __( 'Guernsey', 'profile-builder' ),\r\n\t\t\t'GN' => __( 'Guinea', 'profile-builder' ),\r\n\t\t\t'GW' => __( 'Guinea-Bissau', 'profile-builder' ),\r\n\t\t\t'GY' => __( 'Guyana', 'profile-builder' ),\r\n\t\t\t'HT' => __( 'Haiti', 'profile-builder' ),\r\n\t\t\t'HM' => __( 'Heard Island and McDonald Islands', 'profile-builder' ),\r\n\t\t\t'HN' => __( 'Honduras', 'profile-builder' ),\r\n\t\t\t'HK' => __( 'Hong Kong', 'profile-builder' ),\r\n\t\t\t'HU' => __( 'Hungary', 'profile-builder' ),\r\n\t\t\t'IS' => __( 'Iceland', 'profile-builder' ),\r\n\t\t\t'IN' => __( 'India', 'profile-builder' ),\r\n\t\t\t'ID' => __( 'Indonesia', 'profile-builder' ),\r\n\t\t\t'IR' => __( 'Iran', 'profile-builder' ),\r\n\t\t\t'IQ' => __( 'Iraq', 'profile-builder' ),\r\n\t\t\t'IE' => __( 'Ireland', 'profile-builder' ),\r\n\t\t\t'IM' => __( 'Isle of Man', 'profile-builder' ),\r\n\t\t\t'IL' => __( 'Israel', 'profile-builder' ),\r\n\t\t\t'IT' => __( 'Italy', 'profile-builder' ),\r\n\t\t\t'CI' => __( 'Ivory Coast', 'profile-builder' ),\r\n\t\t\t'JM' => __( 'Jamaica', 'profile-builder' ),\r\n\t\t\t'JP' => __( 'Japan', 'profile-builder' ),\r\n\t\t\t'JE' => __( 'Jersey', 'profile-builder' ),\r\n\t\t\t'JO' => __( 'Jordan', 'profile-builder' ),\r\n\t\t\t'KZ' => __( 'Kazakhstan', 'profile-builder' ),\r\n\t\t\t'KE' => __( 'Kenya', 'profile-builder' ),\r\n\t\t\t'KI' => __( 'Kiribati', 'profile-builder' ),\r\n\t\t\t'XK' => __( 'Kosovo', 'profile-builder' ),\r\n\t\t\t'KW' => __( 'Kuwait', 'profile-builder' ),\r\n\t\t\t'KG' => __( 'Kyrgyzstan', 'profile-builder' ),\r\n\t\t\t'LA' => __( 'Laos', 'profile-builder' ),\r\n\t\t\t'LV' => __( 'Latvia', 'profile-builder' ),\r\n\t\t\t'LB' => __( 'Lebanon', 'profile-builder' ),\r\n\t\t\t'LS' => __( 'Lesotho', 'profile-builder' ),\r\n\t\t\t'LR' => __( 'Liberia', 'profile-builder' ),\r\n\t\t\t'LY' => __( 'Libya', 'profile-builder' ),\r\n\t\t\t'LI' => __( 'Liechtenstein', 'profile-builder' ),\r\n\t\t\t'LT' => __( 'Lithuania', 'profile-builder' ),\r\n\t\t\t'LU' => __( 'Luxembourg', 'profile-builder' ),\r\n\t\t\t'MO' => __( 'Macao', 'profile-builder' ),\r\n\t\t\t'MK' => __( 'Macedonia', 'profile-builder' ),\r\n\t\t\t'MG' => __( 'Madagascar', 'profile-builder' ),\r\n\t\t\t'MW' => __( 'Malawi', 'profile-builder' ),\r\n\t\t\t'MY' => __( 'Malaysia', 'profile-builder' ),\r\n\t\t\t'MV' => __( 'Maldives', 'profile-builder' ),\r\n\t\t\t'ML' => __( 'Mali', 'profile-builder' ),\r\n\t\t\t'MT' => __( 'Malta', 'profile-builder' ),\r\n\t\t\t'MH' => __( 'Marshall Islands', 'profile-builder' ),\r\n\t\t\t'MQ' => __( 'Martinique', 'profile-builder' ),\r\n\t\t\t'MR' => __( 'Mauritania', 'profile-builder' ),\r\n\t\t\t'MU' => __( 'Mauritius', 'profile-builder' ),\r\n\t\t\t'YT' => __( 'Mayotte', 'profile-builder' ),\r\n\t\t\t'MX' => __( 'Mexico', 'profile-builder' ),\r\n\t\t\t'FM' => __( 'Micronesia', 'profile-builder' ),\r\n\t\t\t'MD' => __( 'Moldova', 'profile-builder' ),\r\n\t\t\t'MC' => __( 'Monaco', 'profile-builder' ),\r\n\t\t\t'MN' => __( 'Mongolia', 'profile-builder' ),\r\n\t\t\t'ME' => __( 'Montenegro', 'profile-builder' ),\r\n\t\t\t'MS' => __( 'Montserrat', 'profile-builder' ),\r\n\t\t\t'MA' => __( 'Morocco', 'profile-builder' ),\r\n\t\t\t'MZ' => __( 'Mozambique', 'profile-builder' ),\r\n\t\t\t'MM' => __( 'Myanmar', 'profile-builder' ),\r\n\t\t\t'NA' => __( 'Namibia', 'profile-builder' ),\r\n\t\t\t'NR' => __( 'Nauru', 'profile-builder' ),\r\n\t\t\t'NP' => __( 'Nepal', 'profile-builder' ),\r\n\t\t\t'NL' => __( 'Netherlands', 'profile-builder' ),\r\n\t\t\t'NC' => __( 'New Caledonia', 'profile-builder' ),\r\n\t\t\t'NZ' => __( 'New Zealand', 'profile-builder' ),\r\n\t\t\t'NI' => __( 'Nicaragua', 'profile-builder' ),\r\n\t\t\t'NE' => __( 'Niger', 'profile-builder' ),\r\n\t\t\t'NG' => __( 'Nigeria', 'profile-builder' ),\r\n\t\t\t'NU' => __( 'Niue', 'profile-builder' ),\r\n\t\t\t'NF' => __( 'Norfolk Island', 'profile-builder' ),\r\n\t\t\t'KP' => __( 'North Korea', 'profile-builder' ),\r\n\t\t\t'MP' => __( 'Northern Mariana Islands', 'profile-builder' ),\r\n\t\t\t'NO' => __( 'Norway', 'profile-builder' ),\r\n\t\t\t'OM' => __( 'Oman', 'profile-builder' ),\r\n\t\t\t'PK' => __( 'Pakistan', 'profile-builder' ),\r\n\t\t\t'PW' => __( 'Palau', 'profile-builder' ),\r\n\t\t\t'PS' => __( 'Palestinian Territory', 'profile-builder' ),\r\n\t\t\t'PA' => __( 'Panama', 'profile-builder' ),\r\n\t\t\t'PG' => __( 'Papua New Guinea', 'profile-builder' ),\r\n\t\t\t'PY' => __( 'Paraguay', 'profile-builder' ),\r\n\t\t\t'PE' => __( 'Peru', 'profile-builder' ),\r\n\t\t\t'PH' => __( 'Philippines', 'profile-builder' ),\r\n\t\t\t'PN' => __( 'Pitcairn', 'profile-builder' ),\r\n\t\t\t'PL' => __( 'Poland', 'profile-builder' ),\r\n\t\t\t'PT' => __( 'Portugal', 'profile-builder' ),\r\n\t\t\t'PR' => __( 'Puerto Rico', 'profile-builder' ),\r\n\t\t\t'QA' => __( 'Qatar', 'profile-builder' ),\r\n\t\t\t'CG' => __( 'Republic of the Congo', 'profile-builder' ),\r\n\t\t\t'RE' => __( 'Reunion', 'profile-builder' ),\r\n\t\t\t'RO' => __( 'Romania', 'profile-builder' ),\r\n\t\t\t'RU' => __( 'Russia', 'profile-builder' ),\r\n\t\t\t'RW' => __( 'Rwanda', 'profile-builder' ),\r\n\t\t\t'BL' => __( 'Saint Barthelemy', 'profile-builder' ),\r\n\t\t\t'SH' => __( 'Saint Helena', 'profile-builder' ),\r\n\t\t\t'KN' => __( 'Saint Kitts and Nevis', 'profile-builder' ),\r\n\t\t\t'LC' => __( 'Saint Lucia', 'profile-builder' ),\r\n\t\t\t'MF' => __( 'Saint Martin', 'profile-builder' ),\r\n\t\t\t'PM' => __( 'Saint Pierre and Miquelon', 'profile-builder' ),\r\n\t\t\t'VC' => __( 'Saint Vincent and the Grenadines', 'profile-builder' ),\r\n\t\t\t'WS' => __( 'Samoa', 'profile-builder' ),\r\n\t\t\t'SM' => __( 'San Marino', 'profile-builder' ),\r\n\t\t\t'ST' => __( 'Sao Tome and Principe', 'profile-builder' ),\r\n\t\t\t'SA' => __( 'Saudi Arabia', 'profile-builder' ),\r\n\t\t\t'SN' => __( 'Senegal', 'profile-builder' ),\r\n\t\t\t'RS' => __( 'Serbia', 'profile-builder' ),\r\n\t\t\t'SC' => __( 'Seychelles', 'profile-builder' ),\r\n\t\t\t'SL' => __( 'Sierra Leone', 'profile-builder' ),\r\n\t\t\t'SG' => __( 'Singapore', 'profile-builder' ),\r\n\t\t\t'SX' => __( 'Sint Maarten', 'profile-builder' ),\r\n\t\t\t'SK' => __( 'Slovakia', 'profile-builder' ),\r\n\t\t\t'SI' => __( 'Slovenia', 'profile-builder' ),\r\n\t\t\t'SB' => __( 'Solomon Islands', 'profile-builder' ),\r\n\t\t\t'SO' => __( 'Somalia', 'profile-builder' ),\r\n\t\t\t'ZA' => __( 'South Africa', 'profile-builder' ),\r\n\t\t\t'GS' => __( 'South Georgia and the South Sandwich Islands', 'profile-builder' ),\r\n\t\t\t'KR' => __( 'South Korea', 'profile-builder' ),\r\n\t\t\t'SS' => __( 'South Sudan', 'profile-builder' ),\r\n\t\t\t'ES' => __( 'Spain', 'profile-builder' ),\r\n\t\t\t'LK' => __( 'Sri Lanka', 'profile-builder' ),\r\n\t\t\t'SD' => __( 'Sudan', 'profile-builder' ),\r\n\t\t\t'SR' => __( 'Suriname', 'profile-builder' ),\r\n\t\t\t'SJ' => __( 'Svalbard and Jan Mayen', 'profile-builder' ),\r\n\t\t\t'SZ' => __( 'Swaziland', 'profile-builder' ),\r\n\t\t\t'SE' => __( 'Sweden', 'profile-builder' ),\r\n\t\t\t'CH' => __( 'Switzerland', 'profile-builder' ),\r\n\t\t\t'SY' => __( 'Syria', 'profile-builder' ),\r\n\t\t\t'TW' => __( 'Taiwan', 'profile-builder' ),\r\n\t\t\t'TJ' => __( 'Tajikistan', 'profile-builder' ),\r\n\t\t\t'TZ' => __( 'Tanzania', 'profile-builder' ),\r\n\t\t\t'TH' => __( 'Thailand', 'profile-builder' ),\r\n\t\t\t'TG' => __( 'Togo', 'profile-builder' ),\r\n\t\t\t'TK' => __( 'Tokelau', 'profile-builder' ),\r\n\t\t\t'TO' => __( 'Tonga', 'profile-builder' ),\r\n\t\t\t'TT' => __( 'Trinidad and Tobago', 'profile-builder' ),\r\n\t\t\t'TN' => __( 'Tunisia', 'profile-builder' ),\r\n\t\t\t'TR' => __( 'Turkey', 'profile-builder' ),\r\n\t\t\t'TM' => __( 'Turkmenistan', 'profile-builder' ),\r\n\t\t\t'TC' => __( 'Turks and Caicos Islands', 'profile-builder' ),\r\n\t\t\t'TV' => __( 'Tuvalu', 'profile-builder' ),\r\n\t\t\t'VI' => __( 'U.S. Virgin Islands', 'profile-builder' ),\r\n\t\t\t'UG' => __( 'Uganda', 'profile-builder' ),\r\n\t\t\t'UA' => __( 'Ukraine', 'profile-builder' ),\r\n\t\t\t'AE' => __( 'United Arab Emirates', 'profile-builder' ),\r\n\t\t\t'GB' => __( 'United Kingdom', 'profile-builder' ),\r\n\t\t\t'US' => __( 'United States', 'profile-builder' ),\r\n\t\t\t'UM' => __( 'United States Minor Outlying Islands', 'profile-builder' ),\r\n\t\t\t'UY' => __( 'Uruguay', 'profile-builder' ),\r\n\t\t\t'UZ' => __( 'Uzbekistan', 'profile-builder' ),\r\n\t\t\t'VU' => __( 'Vanuatu', 'profile-builder' ),\r\n\t\t\t'VA' => __( 'Vatican', 'profile-builder' ),\r\n\t\t\t'VE' => __( 'Venezuela', 'profile-builder' ),\r\n\t\t\t'VN' => __( 'Vietnam', 'profile-builder' ),\r\n\t\t\t'WF' => __( 'Wallis and Futuna', 'profile-builder' ),\r\n\t\t\t'EH' => __( 'Western Sahara', 'profile-builder' ),\r\n\t\t\t'YE' => __( 'Yemen', 'profile-builder' ),\r\n\t\t\t'ZM' => __( 'Zambia', 'profile-builder' ),\r\n\t\t\t'ZW' => __( 'Zimbabwe', 'profile-builder' ),\r\n\t\t)\r\n\t);\r\n\r\n\treturn $country_array;\r\n}", "public function userTimeZone($value = null)\n {\n return $this->withMeta([__FUNCTION__ => $value]);\n }", "public function timepicker() {\r\n $this->defaultOption();\r\n $textbox = '';\r\n// $textbox = '<div class=\"col-xs-3\">';\r\n $textbox .= '<input type=\"text\" \r\n placeholder=\"' . $this->formOption['PLACEHOLDER'] . '\" \r\n name=\"' . $this->formOption['NAME'] . '\" \r\n id=\"' . $this->formOption['ID'] . '\" \r\n ' . $this->formOption['REQUIRED'] . ' \r\n ' . $this->formOption['MANUAL_ATTRIBUT'] . ' \r\n value=\"' . $this->formOption['VALUE'] . '\"\r\n data-date-format=\"' . DATE_FORMAT . '\"\r\n class=\"form-control datepicker\">';\r\n $textbox .= '<script>$(function(){$(\\'#' . $this->formOption['ID'] . '\\').timepicker({showMeridian: false})});</script>';\r\n $rs = $this->formGroup($textbox);\r\n $this->ResetObject();\r\n return $rs;\r\n }", "public function __construct($options = array(), $attributes = array())\n {\n $this->addOption('timezone', sfContext::getInstance()->getUser()->getGuardUser()->getTimezone()->getName());\n\n parent::__construct($options, $attributes);\n }", "function hours()\n{\n $option_list='<option value=\"\">Select Hour</option>';\n for($i=1;$i<=12;$i++)\n {\n if($i<=9)\n {\n $i=\"0\".$i;\n }\n $option_list.=\"<option value=$i>$i</option>\";\n }\n return $option_list;\n}", "function printSelectTimeList($time_config,$today,$classes,$id,$current,$vacancy_array){\n\t/* -- function explained\n\t * This function reads parameters and outputs a suitable <select> list of time-slotsin HTML\n\t* $time_config : an array which stores the event information such as start time, time interval\n\t* $today : the date which the time-slots are requested\n\t* $classes : class attritbute of output list\n\t* $id : id attribute of output list\n\t* $current : an array storing this customer's current booking;\n\t* $vacancy_array : an array whose key is time_slot, value is no of bookings of the slot\n\t*/\n\t\n\t//run-time configuration, parse excluded dates\n\t$specific_time_array = explode(\";\", $time_config['specific_time_str']);\n\t$specific_time = array();\n\tforeach ($specific_time_array as $specific_time_info){\n\t\t$temp = explode(\",\",$specific_time_info);\n\t\t$specific_time[$temp[0]] = $temp;\n\t}\n\t/*\n\techo \"<pre>\";\n\tvar_dump($specific_time);\n\techo \"</pre>\";\n\t*/\n\tif (array_key_exists($today,$specific_time)){\n\t\t$today_start_time = $specific_time[$today][1];\n\t\t$today_end_time = $specific_time[$today][2];\n\t} else {\n\t\t$today_start_time = $time_config['event_start_time'];\n\t\t$today_end_time = $time_config['event_end_time'];\n\t}\n\t$starttime = DateTime::createFromFormat('d/m/Y H:i',$today.\" \".$today_start_time);\n\t$endtime = DateTime::createFromFormat('d/m/Y H:i',$today.\" \".$today_end_time);\n\t$currenttime = $starttime;\n\t//$currenttime = clone($starttime);\n\t//echo \"<br />\".$currenttime->format('d M Y \\(D\\) H:i:s ').\"<br />\";\n\t//echo $endtime->format('d M Y \\(D\\) H:i:s ').\"<br />\";\n\techo '<select name=\"'.$id.'\" id=\"'.$id.'\" class=\"'.$classes.'\">';\n\techo '<option value=\"\">Select</option>';\n\twhile ($currenttime < $endtime){\n\t\tif (strcmp($current['time'],$currenttime->format('H:i')) == 0 && strcmp($current['date'],$today) == 0){ //is the time specific by existing record\n\t\t\techo '<option value=\"'.$currenttime->format('H:i').'\" selected=\"selected\">';\n\t\t} else { //time slot not specified by existing record\n\t\t\tif ($vacancy_array[$currenttime->format('H:i')] < $time_config[\"event_slots\"]){\n\t\t\t\techo '<option value=\"'.$currenttime->format('H:i').'\">';\n\t\t\t} else {\n\t\t\t\techo '<option value=\"'.$currenttime->format('H:i').'\" disabled>(Full) ';\n\t\t\t}\n\t\t}\n\t\techo $currenttime->format('H:i').'-';\n\t\t$currenttime->add(new DateInterval('PT'.$time_config['event_time_interval'].'M')); // compute next interval now\n\t\techo $currenttime->format('H:i');\n\t\techo '</option>';\n\t}\n\techo \"</select>\";\n}", "static function TZ()\n {\n return new self('TZ');\n }", "function timezones_list(){\n\n\t\treturn array(\n\t\t\tarray('(GMT-11:00) Midway Island, Samoa',\t\t\t\t'Pacific/Midway',\t\ttrue,\t'Samoa Standard Time'),\n\t\t\tarray('(GMT-10:00) Hawaii',\t\t\t\t\t\t'Pacific/Honolulu',\t\tfalse,\t'Hawaiian Standard Time'),\n\t\t\tarray('(GMT-09:00) Alaska',\t\t\t\t\t\t'America/Anchorage',\t\tfalse,\t'Alaskan Standard Time'),\n\t\t\tarray('(GMT-08:00) Baja California',\t\t\t\t\t'America/Tijuana',\t\tfalse,\t''),\n\t\t\tarray('(GMT-08:00) Pacific Time (US and Canada)',\t\t\t'America/Los_Angeles',\t\ttrue,\t'Pacific Standard Time'),\n\t\t\tarray('(GMT-07:00) Arizona',\t\t\t\t\t\t'America/Phoenix',\t\tfalse,\t'US Mountain Standard Time'),\n\t\t\tarray('(GMT-07:00) Chihuahua, La Paz, Mazatlan',\t\t\t'America/Chihuahua',\t\tfalse,\t'Mountain Standard Time (Mexico)'),\n\t\t\tarray('(GMT-07:00) Mountain Time (US and Canada)',\t\t\t'America/Denver',\t\ttrue,\t'Mountain Standard Time'),\n\t\t\tarray('(GMT-06:00) Central America',\t\t\t\t\t'America/Belize',\t\tfalse,\t'Central America Standard Time'),\n\t\t\tarray('(GMT-06:00) Central Time (US and Canada)\t',\t\t\t'America/Chicago',\t\ttrue,\t'Central Standard Time'),\n\t\t\tarray('(GMT-06:00) Guadalajara, Mexico City, Monterrey',\t\t'America/Mexico_City',\t\tfalse,\t'Central Standard Time (Mexico)'),\n\t\t\tarray('(GMT-06:00) Saskatchewan',\t\t\t\t\t'America/Regina',\t\ttrue,\t'Canada Central Standard Time'),\n\t\t\tarray('(GMT-05:00) Bogota, Lima, Quito',\t\t\t\t'America/Bogota',\t\tfalse,\t'SA Pacific Standard Time'),\n\t\t\tarray('(GMT-05:00) Eastern Time (US and Canada)',\t\t\t'America/New_York',\t\tfalse,\t'Eastern Standard Time'),\n\t\t\tarray('(GMT-05:00) Indiana (East)',\t\t\t\t\t'America/Indiana/Indianapolis',\ttrue,\t'US Eastern Standard Time'),\n\t\t\tarray('(GMT-04:30) Caracas',\t\t\t\t\t\t'America/Caracas',\t\tfalse,\t''),\n\t\t\tarray('(GMT-04:00) Asuncion',\t\t\t\t\t\t'America/Asuncion',\t\tfalse,\t''),\n\t\t\tarray('(GMT-04:00) Atlantic Time (Canada)',\t\t\t\t'America/Halifax',\t\tfalse,\t'Atlantic Standard Time'),\n\t\t\tarray('(GMT-04:00) Cuiaba',\t\t\t\t\t\t'America/Cuiaba',\t\tfalse,\t''),\n\t\t\tarray('(GMT-04:00) Georgetown, La Paz, Manaus, San Juan',\t\t'America/Manaus',\t\ttrue,\t'SA Western Standard Time / Central Brazilian Standard Time'),\n\t\t\tarray('(GMT-04:00) Santiago',\t\t\t\t\t\t'America/Santiago',\t\ttrue,\t'Pacific SA Standard Time'),\n\t\t\tarray('(GMT-03:30) Newfoundland and Labrador',\t\t\t\t'America/St_Johns',\t\tfalse,\t'Newfoundland Standard Time'),\n\t\t\tarray('(GMT-03:00) Brasilia',\t\t\t\t\t\t'America/Sao_Paulo',\t\ttrue,\t'E. South America Standard Time'),\n\t\t\tarray('(GMT-03:00) Buenos Aires\t',\t\t\t\t\t'America/Buenos_Aires',\t\ttrue,\t'SA Eastern Standard Time'),\n\t\t\tarray('(GMT-03:00) Cayenne, Fortaleza',\t\t\t\t\t'America/Cayenne',\t\tfalse,\t''),\n\t\t\tarray('(GMT-03:00) Greenland',\t\t\t\t\t\t'America/Godthab',\t\tfalse,\t'Greenland Standard Time'),\n\t\t\tarray('(GMT-03:00) Montevideo',\t\t\t\t\t\t'America/Montevideo',\t\tfalse,\t''),\n\t\t\tarray('(GMT-03:00) Salvador',\t\t\t\t\t\t'America/Bahia',\t\tfalse,\t''),\n\t\t\tarray('(GMT-02:00) Mid-Atlantic',\t\t\t\t\t'America/Noronha',\t\tfalse,\t'Mid-Atlantic Standard Time'),\n\t\t\tarray('(GMT-01:00) Azores',\t\t\t\t\t\t'Atlantic/Azores',\t\tfalse,\t'Azores Standard Time'),\n\t\t\tarray('(GMT-01:00) Cape Verde Islands',\t\t\t\t\t'Atlantic/Cape_Verde',\t\tfalse,\t'Cape Verde Standard Time'),\n\t\t\tarray('(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London',\t'Europe/London',\t\tfalse,\t'GMT Standard Time'),\n\t\t\tarray('(GMT) Casablanca, Monrovia',\t\t\t\t\t'Africa/Casablanca',\t\tfalse,\t'Greenwich Standard Time'),\n\t\t\tarray('(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',\t'Europe/Amsterdam',\t\ttrue,\t'W. Europe Standard Time'),\n\t\t\tarray('(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague',\t'Europe/Belgrade',\t\tfalse,\t'Central Europe Standard Time'),\n\t\t\tarray('(GMT+01:00) Brussels, Copenhagen, Madrid, Paris',\t\t'Europe/Brussels',\t\tfalse,\t'Romance Standard Time'),\n\t\t\tarray('(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb',\t\t\t'Europe/Warsaw',\t\tfalse,\t'Central European Standard Time'),\n\t\t\tarray('(GMT+01:00) West Central Africa',\t\t\t\t'Africa/Algiers',\t\tfalse,\t'W. Central Africa Standard Time'),\n\t\t\tarray('(GMT+01:00) Windhoek',\t\t\t\t\t\t'Africa/Windhoek',\t\tfalse,\t'Namibia Standard Time'),\n\t\t\tarray('(GMT+02:00) Athens, Bucharest',\t\t\t\t\t'Europe/Athens',\t\tfalse,\t'GTB Standard Time'),\n\t\t\tarray('(GMT+02:00) Beirut',\t\t\t\t\t\t'Asia/Beirut',\t\t\tfalse,\t''),\n\t\t\tarray('(GMT+02:00) Cairo',\t\t\t\t\t\t'Africa/Cairo',\t\t\tfalse,\t'Egypt Standard Time'),\n\t\t\tarray('(GMT+02:00) Damascus',\t\t\t\t\t\t'Asia/Damascus',\t\tfalse,\t''),\n\t\t\tarray('(GMT+02:00) Eastern Europe',\t\t\t\t\t'EET',\t\t\t\ttrue,\t'E. Europe Standard Time'),\n\t\t\tarray('(GMT+02:00) Harare, Pretoria',\t\t\t\t\t'Africa/Harare',\t\tfalse,\t'South Africa Standard Time'),\n\t\t\tarray('(GMT+02:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius',\t'Europe/Helsinki',\t\tfalse,\t'FLE Standard Time'),\n\t\t\tarray('(GMT+02:00) Istanbul',\t\t\t\t\t\t'Asia/Istanbul',\t\tfalse,\t''),\n\t\t\tarray('(GMT+02:00) Jerusalem',\t\t\t\t\t\t'Asia/Jerusalem',\t\tfalse,\t'Israel Standard Time'),\n\t\t\tarray('(GMT+03:00) Amman',\t\t\t\t\t\t'Asia/Amman',\t\t\tfalse,\t''),\n\t\t\tarray('(GMT+03:00) Baghdad',\t\t\t\t\t\t'Asia/Baghdad',\t\t\tfalse,\t'Arabic Standard Time'),\n\t\t\tarray('(GMT+03:00) Kalinigrad, Minsk',\t\t\t\t\t'Europe/Kaliningrad',\t\tfalse,\t''),\n\t\t\tarray('(GMT+03:00) Kuwait, Riyadh',\t\t\t\t\t'Asia/Kuwait',\t\t\ttrue,\t'Arab Standard Time'),\n\t\t\tarray('(GMT+03:00) Nairobi',\t\t\t\t\t\t'Africa/Nairobi',\t\tfalse,\t'E. Africa Standard Time'),\n\t\t\tarray('(GMT+03:30) Tehran',\t\t\t\t\t\t'Asia/Tehran',\t\t\tfalse,\t'Iran Standard Time'),\n\t\t\tarray('(GMT+04:00) Abu Dhabi, Muscat',\t\t\t\t\t'Asia/Muscat',\t\t\ttrue,\t'Arabian Standard Time'),\n\t\t\tarray('(GMT+04:00) Baku',\t\t\t\t\t\t'Asia/Baku',\t\t\ttrue,\t'Azerbaijan Standard Time'),\n\t\t\tarray('(GMT+04:00) Moscow, St. Petersburg, Volgograd',\t\t\t'Europe/Moscow',\t\ttrue,\t'Russian Standard Time'),\n\t\t\tarray('(GMT+04:00) Port Louis',\t\t\t\t\t\t'Indian/Mauritius',\t\tfalse,\t''),\n\t\t\tarray('(GMT+04:00) Tblisi',\t\t\t\t\t\t'Asia/Tbilisi',\t\t\tfalse,\t'Georgian Standard Time'),\n\t\t\tarray('(GMT+04:00) Yerevan',\t\t\t\t\t\t'Asia/Yerevan',\t\t\tfalse,\t'Caucasus Standard Time'),\n\t\t\tarray('(GMT+04:30) Kabul',\t\t\t\t\t\t'Asia/Kabul',\t\t\tfalse,\t'Afghanistan Standard Time'),\n\t\t\tarray('(GMT+05:00) Islamabad, Karachi',\t\t\t\t\t'Asia/Karachi',\t\t\ttrue,\t'West Asia Standard Time'),\n\t\t\tarray('(GMT+05:00) Tashkent',\t\t\t\t\t\t'Asia/Tashkent',\t\tfalse,\t''),\n\t\t\tarray('(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi',\t\t'Asia/Kolkata',\t\t\tfalse,\t'India Standard Time'),\n\t\t\tarray('(GMT+05:30) Sri Jayawardenepura',\t\t\t\t'Asia/Colombo',\t\t\tfalse,\t'Sri Lanka Standard Time'),\n\t\t\tarray('(GMT+05:45) Kathmandu',\t\t\t\t\t\t'Asia/Katmandu',\t\tfalse,\t'Nepal Standard Time'),\n\t\t\tarray('(GMT+06:00) Astana',\t\t\t\t\t\t'Asia/Almaty',\t\t\tfalse,\t'Central Asia Standard Time'),\n\t\t\tarray('(GMT+06:00) Dhaka',\t\t\t\t\t\t'Asia/Dhaka',\t\t\ttrue,\t''),\n\t\t\tarray('(GMT+06:00) Ekaterinburg',\t\t\t\t\t'Asia/Yekaterinburg',\t\tfalse,\t'Ekaterinburg Standard Time'),\n\t\t\tarray('(GMT+06:30) Yangon (Rangoon)',\t\t\t\t\t'Asia/Rangoon',\t\t\tfalse,\t'Myanmar Standard Time'),\n\t\t\tarray('(GMT+07:00) Bangkok, Hanoi, Jakarta',\t\t\t\t'Asia/Bangkok',\t\t\tfalse,\t'SE Asia Standard Time'),\n\t\t\tarray('(GMT+07:00) Novosibirsk',\t\t\t\t\t'Asia/Novosibirsk',\t\tfalse,\t'Omsk Time'),\n\t\t\tarray('(GMT+08:00) Beijing, Chongqing, Hong Kong SAR, Urumqi',\t\t'Asia/Chongqing',\t\ttrue,\t'China Standard Time'),\n\t\t\tarray('(GMT+08:00) Krasnoyarsk',\t\t\t\t\t'Asia/Krasnoyarsk',\t\tfalse,\t'North Asia Standard Time'),\n\t\t\tarray('(GMT+08:00) Kuala Lumpur, Singapore',\t\t\t\t'Asia/Kuala_Lumpur',\t\tfalse,\t'Singapore Standard Time'),\n\t\t\tarray('(GMT+08:00) Perth',\t\t\t\t\t\t'Australia/Perth',\t\tfalse,\t'W. Australia Standard Time'),\n\t\t\tarray('(GMT+08:00) Taipei',\t\t\t\t\t\t'Asia/Taipei',\t\t\tfalse,\t'Taipei Standard Time'),\n\t\t\tarray('(GMT+08:00) Ulaanbaatar',\t\t\t\t\t'Asia/Ulaanbaatar',\t\ttrue,\t'North Asia East Standard Time'),\n\t\t\tarray('(GMT+09:00) Irkutsk',\t\t\t\t\t\t'Asia/Irkutsk',\t\t\tfalse,\t''),\n\t\t\tarray('(GMT+09:00) Osaka, Sapporo, Tokyo',\t\t\t\t'Asia/Tokyo',\t\t\ttrue,\t'Tokyo Standard Time'),\n\t\t\tarray('(GMT+09:00) Seoul',\t\t\t\t\t\t'Asia/Seoul',\t\t\tfalse,\t'Korea Standard Time'),\n\t\t\tarray('(GMT+09:30) Adelaide',\t\t\t\t\t\t'Australia/Adelaide',\t\tfalse,\t'Cen. Australia Standard Time'),\n\t\t\tarray('(GMT+09:30) Darwin',\t\t\t\t\t\t'Australia/Darwin',\t\tfalse,\t'AUS Central Standard Time'),\n\t\t\tarray('(GMT+10:00) Brisbane',\t\t\t\t\t\t'Australia/Brisbane',\t\ttrue,\t'E. Australia Standard Time'),\n\t\t\tarray('(GMT+10:00) Canberra, Melbourne, Sydney',\t\t\t'Australia/Canberra',\t\ttrue,\t'AUS Eastern Standard Time'),\n\t\t\tarray('(GMT+10:00) Guam, Port Moresby',\t\t\t\t\t'Pacific/Guam',\t\t\tfalse,\t'West Pacific Standard Time'),\n\t\t\tarray('(GMT+10:00) Hobart',\t\t\t\t\t\t'Australia/Hobart',\t\tfalse,\t'Tasmania Standard Time'),\n\t\t\tarray('(GMT+10:00) Yakutsk',\t\t\t\t\t\t'Asia/Yakutsk',\t\t\tfalse,\t'Yakutsk Standard Time'),\n\t\t\tarray('(GMT+11:00) Solomon Islands, New Caledonia',\t\t\t'Pacific/Guadalcanal',\t\tfalse,\t'Central Pacific Standard Time'),\n\t\t\tarray('(GMT+11:00) Vladivostok',\t\t\t\t\t'Asia/Vladivostok',\t\tfalse,\t'Vladivostok Standard Time'),\n\t\t\tarray('(GMT+12:00) Auckland, Wellington',\t\t\t\t'Pacific/Auckland',\t\tfalse,\t'New Zealand Standard Time'),\n\t\t\tarray('(GMT+12:00) Fiji Islands, Kamchatka, Marshall Islands',\t\t'Pacific/Fiji',\t\t\tfalse,\t'Fiji Standard Time'),\n\t\t\tarray('(GMT+12:00) Magadan',\t\t\t\t\t\t'Asia/Magadan',\t\t\tfalse,\t''),\n\t\t\tarray('(GMT+13:00) Nuku\\'alofa',\t\t\t\t\t'Pacific/Tongatapu',\t\tfalse,\t'Tonga Standard Time'),\n\t\t\tarray('(GMT+13:00) Samoa',\t\t\t\t\t\t'Pacific/Apia',\t\t\tfalse,\t''),\n\t\t);\n\t}", "public function getTimezone();", "public function getTimezone();", "private function setTimezone() {\n\t\t$now = new DateTime();\n\t\t$mins = $now->getOffset() / 60;\n\t\t$sgn = ($mins < 0 ? -1 : 1);\n\t\t$mins = abs($mins);\n\t\t$hrs = floor($mins / 60);\n\t\t$mins -= $hrs * 60;\n\t\t$offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);\n\t\tself::executeQuery(\"SET time_zone = '$offset';\");\n\t}", "public function create_select_options() {\r\n\t\t\t$args = array(\r\n\t\t\t\t'orderby' => $this->settings['orderby'],\r\n\t\t\t\t'order' => $this->settings['order'],\r\n\t\t\t\t'taxonomy' => $this->settings['taxonomy'],\r\n\t\t\t\t'hide_empty' => $this->settings['hide_empty'] ? '1' : '0',\r\n\t\t\t);\r\n\r\n\t\t\t$categories = get_terms( $args );\r\n\r\n\t\t\t$this->settings['options'] = array(\r\n\t\t\t\t'' => '— ' . __( 'Select', TF_I18NDOMAIN ) . ' —'\r\n\t\t\t);\r\n\r\n\t\t\tforeach ( $categories as $category ) {\r\n\t\t\t\t$category_id = esc_attr( $category->term_id );\r\n\t\t\t\t$category->name .= $this->settings['show_count'] ? ' (' . $category->count . ')' : '';\r\n\t\t\t\t$this->settings['options'][ $category_id ] = esc_html( $category->name );\r\n\t\t\t}\r\n\t}", "function yourls_tzp_config_update_settings() {\n\n $settings = array(\n 'time_zone' => yourls_tzp_get_value($_POST, 'time_zone', 'UTC'),\n 'date_format' => yourls_tzp_get_value($_POST, 'date_format', 'Y/m/d'),\n 'date_format_custom' => yourls_tzp_get_value($_POST, 'date_format_custom_value', 'Y/m/d'),\n 'time_format' => yourls_tzp_get_value($_POST, 'time_format', 'H:i'),\n 'time_format_custom' => yourls_tzp_get_value($_POST, 'time_format_custom_value', 'H:i'),\n );\n\n yourls_update_option( 'timezone', $settings );\n\n return $settings;\n}", "public function show_template_options() {\n \n global $wpsl_settings;\n \n\t\t\t$dropdown = '<select id=\"wpsl-store-template\" name=\"wpsl_ux[template_id]\" autocomplete=\"off\">';\n\n foreach ( wpsl_get_templates() as $template ) {\n $template_id = ( isset( $template['id'] ) ) ? $template['id'] : '';\n \n\t\t\t\t$selected = ( $wpsl_settings['template_id'] == $template_id ) ? ' selected=\"selected\"' : '';\n\t\t\t\t$dropdown .= \"<option value='\" . esc_attr( $template_id ) . \"' $selected>\" . esc_html( $template['name'] ) . \"</option>\";\n }\n\t\t\t\n\t\t\t$dropdown .= '</select>';\n\t\t\t\n\t\t\treturn $dropdown; \n }", "function wc_timezone_string()\n {\n }", "public function __construct() {\n date_default_timezone_set(get_option('timezone', 'Asia/Dhaka'));\n }", "public function __construct() {\n date_default_timezone_set(get_option('timezone', 'Asia/Dhaka'));\n }", "public function __construct()\n {\n\t\tdate_default_timezone_set(get_option('timezone','Asia/Dhaka'));\n }", "function SetTimeZone($tz)\n\t//set time zone +/- GMT ($tz)\n\t\n\tfunction __toString() {\n\t}", "function toOption()\n {\n return \"<option value=\\\"{$this->id}\\\">{$this->name} {$this->offset}</option>\";\n }" ]
[ "0.7435289", "0.71415484", "0.6968801", "0.69533217", "0.68857265", "0.6753543", "0.67169553", "0.6692547", "0.6529656", "0.6373163", "0.6255544", "0.62177193", "0.6192919", "0.60697395", "0.60328025", "0.59785753", "0.5951112", "0.5942533", "0.59422743", "0.5939907", "0.5934069", "0.5914318", "0.5865553", "0.58297825", "0.5796638", "0.5796638", "0.5782322", "0.5755582", "0.5749221", "0.574196", "0.57247514", "0.57178307", "0.5704047", "0.56736535", "0.56691235", "0.5667382", "0.5665121", "0.56618345", "0.5651467", "0.5638723", "0.560283", "0.55957234", "0.55885786", "0.5579036", "0.55716866", "0.5567918", "0.55618864", "0.5558801", "0.55390114", "0.5531355", "0.5524526", "0.5504953", "0.54878086", "0.54836065", "0.5462415", "0.5456714", "0.54551744", "0.5447231", "0.5442783", "0.54330117", "0.5410435", "0.5400834", "0.539642", "0.53928155", "0.5381743", "0.5381743", "0.53750634", "0.53735846", "0.5371768", "0.5363684", "0.53624076", "0.5361394", "0.53533524", "0.53533524", "0.53533524", "0.5323794", "0.5318564", "0.5305456", "0.53048545", "0.5294719", "0.5291279", "0.5285769", "0.5281583", "0.52813023", "0.52750343", "0.5274425", "0.5265953", "0.52654964", "0.5264366", "0.5264366", "0.52633244", "0.52542096", "0.5253411", "0.5243787", "0.52325505", "0.52237445", "0.52237445", "0.521335", "0.51942444", "0.51875097" ]
0.747877
0
Check a user submitted timezone is valid.
Проверьте, является ли часовой пояс, отправленный пользователем, допустимым.
public function isValid($submitted) { $this->error_message = t('timezone_validation_failure'); if (empty($submitted)) { if ($this->required) { $this->valid = false; } else { $this->valid = true; } return $this->valid; } $submitted = implode('/', $submitted); try { $tz = new DateTimeZone($submitted); $this->valid = true; } catch (Exception $e) { $this->valid = false; } return $this->valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvalidTZ() {\n $stmt = PDODAO::$PDO->query('SELECT o.* FROM '. $this->user_database .\n '.tu_owners o WHERE o.email = \"me@example.com\"');\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->assertEqual($row['timezone'], 'UTC');\n $this->assertEqual($row['email_notification_frequency'], 'daily');\n\n $this->simulateLogin('me@example.com', false, true);\n\n // Set $_POST vars\n $_POST['Done'] = 'Done';\n $_POST['timezone'] = 'Not a valid timezone';\n $_POST['csrf_token'] = parent::CSRF_TOKEN;\n $controller = new SettingsController(true);\n $results = $controller->go();\n\n // Assert that timezone is NOT new value\n $stmt = PDODAO::$PDO->query('SELECT o.* FROM '. $this->user_database .\n '.tu_owners o WHERE o.email = \"me@example.com\"');\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->assertEqual($row['timezone'], 'UTC');\n $this->assertEqual($row['email_notification_frequency'], 'daily');\n\n $this->debug($results);\n $this->assertPattern(\"/Settings/\", $results);\n $this->assertNoPattern(\"/Saved your changes/\", $results);\n }", "private function valid_timezone($timezone) {\n \n return in_array($timezone, timezone_identifiers_list());\n }", "public function validateTimezone($attribute, $params) {\n if(!Yii::app()->user->timezone)\n $this->addError($attribute, $params['errorMessage']);\n }", "public static function validateTimeZone()\n {\n return [\n new LengthValidator(null, 50),\n ];\n }", "public function filterTimeZonePass()\n {\n $timezone = new \\DateTimeZone('America/New_York');\n $this->assertSame($timezone, DateTimeZone::filter($timezone));\n }", "protected function validateTimezone($attribute, $value)\n {\n try {\n new \\DateTimeZone($value);\n } catch (\\Exception $e) {\n return false;\n }\n\n return true;\n }", "public static function isTimezone($value): void\n {\n assert(\n Validate::isTimezone($value),\n static::error('isTimezone', ['value' => $value])\n );\n }", "public function testOptionTimezone()\n {\n $this->validator->setLocale('Europe/Berlin');\n $this->assertEquals('Europe/Berlin', $this->validator->getLocale());\n }", "protected function _timezone(Result $result): bool\n {\n return in_array($result->getValue(), timezone_identifiers_list());\n }", "function validateDatabaseTimezoneSupport($conn)\n {\n $query = $conn->query(\"SELECT CONVERT_TZ('2007-03-11 2:00:00','US/Eastern','US/Central') AS time1\");\n $result = $query->fetchColumn();\n\n if (!$result) {\n return false;\n }\n\n return true;\n }", "public static function isValidTimezone($timezone) {\n\t\tstatic $cache;\n\t\tif (!is_array($cache)) {\n\t\t\t$cache = array();\n\t\t}\n\n\t\tif (isset($cache[$timezone])) {\n\t\t\treturn $cache[$timezone];\n\t\t}\n\n\t\t$cache[$timezone] = in_array($timezone, DateTimeZone::listIdentifiers());\n\t\treturn $cache[$timezone];\n\t}", "public function timezone(?string $str = null): bool\n {\n return in_array($str ?? '', timezone_identifiers_list(), true);\n }", "public function areTimezonesAvailable(string &$msg = '') {\n $mysql_db_res = $this->request('SHOW DATABASES LIKE ' . $this->quoteValue('mysql'));\n if ($mysql_db_res->count() === 0) {\n $msg = __('Access to timezone database (mysql) is not allowed.');\n return false;\n }\n\n $tz_table_res = $this->request(\n 'SHOW TABLES FROM '\n . $this->quoteName('mysql')\n . ' LIKE '\n . $this->quoteValue('time_zone_name')\n );\n if ($tz_table_res->count() === 0) {\n $msg = __('Access to timezone table (mysql.time_zone_name) is not allowed.');\n return false;\n }\n\n $criteria = [\n 'COUNT' => 'cpt',\n 'FROM' => 'mysql.time_zone_name',\n ];\n $iterator = $this->request($criteria);\n $result = $iterator->next();\n if ($result['cpt'] == 0) {\n $msg = __('Timezones seems not loaded, see https://glpi-install.readthedocs.io/en/latest/timezones.html.');\n return false;\n }\n\n return true;\n }", "abstract public function supportsTimezoneOverride();", "public function checkTimezone()\n {\n $deadline_jpt = '2018-06-19 23:59:59';\n $expected = strtotime($deadline_jpt); // JPT\n\n date_default_timezone_set('UTC');\n\n $deadline_utc = '2018-06-19 14:59:59';\n $actual = strtotime($deadline_utc); // UTC\n\n $this->assertEquals($expected, $actual);\n }", "public static function isValidZone( $zone ) {\n\t\tif ( empty( $zone ) ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( !is_numeric( $zone ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function isValidDateTimeString($str_dt, $str_dateformat, $str_timezone) {\r\n $date = DateTime::createFromFormat($str_dateformat, $str_dt, new DateTimeZone($str_timezone));\r\n return $date && DateTime::getLastErrors()[\"warning_count\"] == 0 && DateTime::getLastErrors()[\"error_count\"] == 0;\r\n }", "public function timezoneAction()\n {\n $uid = $this->_getParam('user_id');\n $tForm = new Core_Form_User_SetTimeZone($uid);\n $form = $tForm->getForm();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n $this->_model->setId($uid)->edit($form->getValues());\n $message = 'User\\'s timezone has been changed successfully';\n $this->_helper->FlashMessenger($message);\n $this->_helper->Redirector(\n 'edit', \n 'user', \n 'default', \n array('user_id' => $uid)\n );\n } else {\n $form->populate($_POST);\n $this->view->form = $form;\n }\n\n } else {\n\n $this->view->form = $form;\n }\n \n }", "public function isTimezone($value)\n {\n try {\n new DateTimeZone($value);\n } catch (Exception $e) {\n return false;\n } catch (Throwable $e) {\n return false;\n }\n\n return true;\n }", "public static function isValidTimezone($timezone)\n {\n try {\n new DateTimeZone($timezone);\n } catch (\\Exception $e) {\n return false;\n }\n\n return true;\n }", "public static function validateAutoTimeZone()\n {\n return [\n new LengthValidator(null, 1),\n ];\n }", "public function TimeZoneUpdate()\n\t{\n\t\tif($this->session->user_id==\"\" || !isset($this->session->user_id)){redirect('index.php');}\n\t\t$TimeZone=$this->input->post('TimeZone'); \n\t\tif(isset($TimeZone) && $TimeZone!='')\n\t\t{\n\t\t\t$this->session->set_userdata(array('timezone'=>$TimeZone));\n\t\t\t$this->Assessment_model->UpdateUserZone($this->session->user_id,$TimeZone);\n\t\t\techo 1;exit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 0;exit;\n\t\t}\n\t}", "function validateDates($startDate,$endDate,$tz = \"Asia/Kolkata\"){\n date_default_timezone_set($tz);\n if(empty($startDate) || empty($endDate)){\n echo(\"Start Date and End Date need to be filled\");\n return false;\n }\n $startDate = new DateTime($startDate,new DateTimeZone($tz));\n $endDate = new DateTime($endDate,new DateTimeZone($tz));\n $todaysDate = new DateTime();\n if($startDate > $endDate){\n echo(\"Start Date should be less than end date\");\n return false;\n }else if($startDate > $todaysDate || $endDate>$todaysDate ){\n echo(\"Start Date and End Date should not exceed today's date\");\n return false;\n }\n return true;\n}", "private function checkTime()\n {\n $morning_start = new \\DateTime($this->date->format('Y-m-d') . '07:00', $this->date->getTimezone());\n $morning_end = new \\DateTime($this->date->format('Y-m-d') . '09:30', $this->date->getTimezone());\n\n if ($this->date >= $morning_start && $this->date < $morning_end) {\n return false;\n }\n\n $afternoon_start = new \\DateTime($this->date->format('Y-m-d') . ' 16:00', $this->date->getTimezone());\n $afternoon_end = new \\DateTime($this->date->format('Y-m-d') . '19:30', $this->date->getTimezone());\n \n if ($this->date >= $afternoon_start && $this->date < $afternoon_end) {\n return false;\n }\n\n return true;\n }", "function _is_valid_time($time){\n\t\t\n\t\t$times['am'] = strtotime('00:00');\n\t\t$times['pm'] = strtotime('23:59');\n\t\t$times['data'] = strtotime($time);\n\t\tif( ($times['data'] >= $times['am'] && $times['data'] <= $times['pm']) || !isset($times['data']) ){\n\t\t\t$ret = true;\n\t\t} else {\n\t\t\t$this->form_validation->set_message('_is_valid_time', 'You entered an invalid time. It must be between 00:00 and 23:59.');\n\t\t\t$ret = false;\n\t\t}\n\t\treturn $ret;\n\t\t\n\t}", "function time_validate($val)\n{\n if (!preg_match(\"/^-?([0-7]?[0-9]{1,2}|8([0-2][0-9]|3[0-8]))(:[0-5][0-9]){1,2}$/D\", $val)) {\n return false;\n } else {\n return true;\n }\n}", "public function filter()\n {\n $value = 'Pacific/Honolulu';\n $timezone = DateTimeZone::filter($value);\n $this->assertSame($value, $timezone->getName());\n $this->assertSame(-36000, $timezone->getOffset(new \\DateTime('now', $timezone)));\n }", "public function filterInvalidName()\n {\n $this->expectException(\\TraderInteractive\\Exceptions\\FilterException::class);\n $this->expectExceptionMessage('Unknown or bad timezone (INVALID)');\n DateTimeZone::filter('INVALID');\n }", "function isValidDate($date, $format = DateTimeInterface::ISO8601)\n{\n $d = DateTime::createFromFormat($format, $date);\n\n # JavaScript provides a different format of timezone than does PHP\n # so only pay attention to the first 19 characters (up to but not including the timezone)\n return $d && substr($d->format($format), 0, 19) == substr($date, 0, 19);\n}", "function isValid()\n\t{\n\t\tif ($this->required == true && $value == null) return false;\n\t\t\n\t\t$dateFormat = DateFormatFactory::getDateFormat();\n\t\t$date = $dateFormat->parseDatetime($this->value);\n\t\t\n\t\tif ($date == null) return false;\n\t\t\n\t\treturn true;\n\t}", "private function checkDateTimesPresent(){\n return $this->start_time != \"\" && $this->end_time != \"\";\n }", "function validateReservationDate($reservationDate){\n global $config;\n if(is_string($reservationDate)){\n $sunday = DateTime::createFromFormat('Y-m-d H:i:s', $reservationDate);\n if($sunday && DateTime::getLastErrors()['warning_count'] == 0 && DateTime::getLastErrors()['error_count'] == 0){\n if($sunday->format('w') == $config['service']['dayOfWeek']){\n $today = new DateTime();\n $today->sub(new DateInterval('PT2H')); //time zone correction (-2H)\n $dayDifference = $today->diff($sunday);\n if($dayDifference->d <= ($config['service']['reserveWeeksBefore']*7) && $dayDifference->d >= $config['service']['reserveDaysAfter']){\n $valid = false;\n foreach($config['service']['serviceTime'] as $serviceTime){\n if($sunday->format('H:i') == $serviceTime){\n $valid = true;\n break;\n }\n }\n if($valid) return $sunday;\n else return false;\n\n //old code, new code needs testing\n // if($sunday->format('H:i') == '09:30') return $sunday;\n // else if($sunday->format('H:i') == '11:00') return $sunday;\n // else if($sunday->format('H:i') == '13:30') return $sunday;\n // else return false;\n } else return false;\n } else return false;\n } else return false;\n } else return false;\n}", "public function validateDateUtc()\n {\n try {\n $date_utc = Program::parseDateUtc($this->date_utc);\n } catch (Exception $e) {\n $this->addError('date_utc', Yii::t('app', 'Could not parse date'));\n }\n if (!($date_utc instanceof DateTime)) {\n $this->addError('date_utc', Yii::t('app', 'Parsed date not valid')); // TODO: Change to a more descriptive error message\n }\n }", "public function validateTimeLogic( $start_hour, $end_hour, $instructor, $classroom, $weekday, $timezone )\n\t{\n\t $errors = array();\n\n\t /* Convert hour strings to timestamps */\n\t $start_hour = strtotime( $start_hour . ' ' . $timezone, 0 );\n\t $end_hour = strtotime( $end_hour . ' ' . $timezone, 0 );\n\n\t /* Make sure a class doesn't end before it starts */\n\t if ( $start_hour >= $end_hour ) {\n\t $errors[] = __( 'A class cannot end before it starts', 'weekly-class-schedule' );\n\t return $errors;\n\t }\n\n\t /* Make sure instructor is available at this time if instructor collisions detection enabled */\n\t if ( get_option( 'timetable_detect_instructor_collisions', 'yes' ) == 'yes' ) {\n \t $instructor_collisions = TimetableSchedule::model()->checkItemCollision( 'instructor', $instructor, $start_hour, $end_hour, $weekday );\n \t if ( $instructor_collisions != NULL && is_array( $instructor_collisions ) )\n \t $errors = array_merge( $errors, $instructor_collisions);\n\t }\n\n\t /* If we already have errors, lets return to save a few CPU cycles */\n\t if ( ! empty( $errors ) )\n\t return $errors;\n\n\t /* Make sure classroom is available at this time if classroom collisions detection enabled */\n\t if ( get_option( 'timetable_detect_classroom_collisions', 'yes' ) == 'yes' ) {\n\t $classroom_collisions = TimetableSchedule::model()->checkItemCollision( 'classroom', $classroom, $start_hour, $end_hour, $weekday );\n\t if ( $classroom_collisions != NULL && is_array( $classroom_collisions ) )\n\t $errors = array_merge( $errors, $classroom_collisions);\n\t }\n\n\t /* Return */\n\t if ( ! empty( $errors ) )\n\t return $errors;\n\t else\n\t return TRUE;\n\t}", "public static function validateZones( $zones ) {\n\t\tforeach ( $zones as $zone ) {\n\t\t\tself::validateZone( $zone );\n\t\t}\n\t\treturn true;\n\t}", "#[Pure(true)]\nfunction timezone_open(string $timezone): DateTimeZone|false {}", "public function issetTimeZoneDetails($index)\n {\n return isset($this->timeZoneDetails[$index]);\n }", "public function isValidOTPTime() {\n $timenow = Carbon::now();\n return $timenow->diffInMinutes($this->created_at) < 10;\n }", "function check_valid_time($time)\n{\n\t$delimiters = '/^(0?\\d|1[0-2]):[0-5]\\d\\s(am|pm)$/i';\n\tif(preg_match($delimiters, $time)) return true;\n\telse return false;\n}", "public function testConfiguredTimezone() {\n\t\tConfigure::write('Config.timezone', 'Europe/Brussels');\n\t\t$date = new DateTime('2010-10-10 10:10:10', new DateTimeZone('UTC'));\n\t\t$result = $this->TimeMachine->fromString($date);\n\t\t$expected = 'Europe/Brussels';\n\t\t$this->assertEqual($expected, $result->getTimeZone()->getName());\n\t\t$expected = '2010-10-10 12:10:10';\n\t\t$this->assertEqual($expected, $result->format('Y-m-d H:i:s'));\n\t}", "function check_valid_time($time) {\n if (preg_match(\"/(2[0-3]|[01][0-9]):[0-5][0-9]/\", $time)) {\n return true;\n } else {\n return false;\n }\n}", "public function hasZone(){\n return $this->_has(9);\n }", "public static function validateTime(string $time): bool\n\t{\n\t\tif(preg_match(\"/(1[012]|0[1-9]):([0-5][0-9])/\", $time)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function validate(string $format, string $timeString): bool\n\t{\n\t\t$time = DateTime::createFromFormat($format, $timeString);\n\n\t\treturn ($time !== false) && ($timeString === $time->format($format));\n\t}", "private function validateHour($input)\n {\n $format = 'H:i:s';\n $date = DateTime::createFromFormat('!' . $format, $input);\n return $date && $date->format($format) === $input;\n }", "public function validate_time($str) {\n $time = explode(':', $str);\n if(isset($time[0]) && isset($time[1]) && (count($time)==2)) {\n if (!is_numeric($time[0]) || !is_numeric($time[1])) {\n return FALSE;\n } else if ((int) $time[0] > 23 || (int) $time[1] > 59) {\n return FALSE;\n } else if ((int) $time[0] < 0 || (int) $time[1] < 0) {\n return false;\n } else if (mktime((int) $time[0], (int) $time[1]) === FALSE) {\n return FALSE;\n } else {\n return TRUE;\n }\n } else {\n return FALSE;\n }\n }", "public function checkInput()\n\t{\n\t\tglobal $lng,$ilUser;\n\t\t\n\t\tif($this->getDisabled())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t$ok = true;\n\n\t\t// Start\n\t\t$_POST[$this->getPostVar()]['start'][\"date\"][\"y\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['start'][\"date\"][\"y\"]);\n\t\t$_POST[$this->getPostVar()]['start'][\"date\"][\"m\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['start'][\"date\"][\"m\"]);\n\t\t$_POST[$this->getPostVar()]['start'][\"date\"][\"d\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['start'][\"date\"][\"d\"]);\n\t\t$_POST[$this->getPostVar()]['start'][\"time\"][\"h\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['start'][\"time\"][\"h\"]);\n\t\t$_POST[$this->getPostVar()]['start'][\"time\"][\"m\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['start'][\"time\"][\"m\"]);\n\t\t$_POST[$this->getPostVar()]['start'][\"time\"][\"s\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['start'][\"time\"][\"s\"]);\n\n\t\t// verify date\n\t\t$dt['year'] = (int) $_POST[$this->getPostVar()]['start']['date']['y'];\n\t\t$dt['mon'] = (int) $_POST[$this->getPostVar()]['start']['date']['m'];\n\t\t$dt['mday'] = (int) $_POST[$this->getPostVar()]['start']['date']['d'];\n\t\t$dt['hours'] = (int) $_POST[$this->getPostVar()]['start']['time']['h'];\n\t\t$dt['minutes'] = (int) $_POST[$this->getPostVar()]['start']['time']['m'];\n\t\t$dt['seconds'] = (int) $_POST[$this->getPostVar()]['start']['time']['s'];\n\n\n\t\tif($this->getShowTime())\n\t\t{\n\t\t\t$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date = new ilDate($dt,IL_CAL_FKT_GETDATE);\n\t\t}\n\t\tif ($_POST[$this->getPostVar()]['start'][\"date\"][\"d\"] != $date->get(IL_CAL_FKT_DATE,'d',$ilUser->getTimeZone()) ||\n\t\t\t$_POST[$this->getPostVar()]['start'][\"date\"][\"m\"] != $date->get(IL_CAL_FKT_DATE,'m',$ilUser->getTimeZone()) ||\n\t\t\t$_POST[$this->getPostVar()]['start'][\"date\"][\"y\"] != $date->get(IL_CAL_FKT_DATE,'Y',$ilUser->getTimeZone()))\n\t\t{\n\t\t\t// #11847\n\t\t\t$this->invalid_input['start'] = $_POST[$this->getPostVar()]['start'][\"date\"];\n\t\t\t$this->setAlert($lng->txt(\"exc_date_not_valid\"));\n\t\t\t$ok = false;\n\t\t}\n\n\t\t#$_POST[$this->getPostVar()]['start']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());\n\t\t#$_POST[$this->getPostVar()]['start']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());\n\n\t\t$this->setStart($date);\n\n\t\t// End\n\t\t$_POST[$this->getPostVar()]['end'][\"date\"][\"y\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['end'][\"date\"][\"y\"]);\n\t\t$_POST[$this->getPostVar()]['end'][\"date\"][\"m\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['end'][\"date\"][\"m\"]);\n\t\t$_POST[$this->getPostVar()]['end'][\"date\"][\"d\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['end'][\"date\"][\"d\"]);\n\t\t$_POST[$this->getPostVar()]['end'][\"time\"][\"h\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['end'][\"time\"][\"h\"]);\n\t\t$_POST[$this->getPostVar()]['end'][\"time\"][\"m\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['end'][\"time\"][\"m\"]);\n\t\t$_POST[$this->getPostVar()]['end'][\"time\"][\"s\"] =\n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()]['end'][\"time\"][\"s\"]);\n\n\t\t// verify date\n\t\t$dt['year'] = (int) $_POST[$this->getPostVar()]['end']['date']['y'];\n\t\t$dt['mon'] = (int) $_POST[$this->getPostVar()]['end']['date']['m'];\n\t\t$dt['mday'] = (int) $_POST[$this->getPostVar()]['end']['date']['d'];\n\t\t$dt['hours'] = (int) $_POST[$this->getPostVar()]['end']['time']['h'];\n\t\t$dt['minutes'] = (int) $_POST[$this->getPostVar()]['end']['time']['m'];\n\t\t$dt['seconds'] = (int) $_POST[$this->getPostVar()]['end']['time']['s'];\n\n\t\tif($this->getShowTime())\n\t\t{\n\t\t\t$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date = new ilDate($dt,IL_CAL_FKT_GETDATE);\n\t\t}\n\t\tif ($_POST[$this->getPostVar()]['end'][\"date\"][\"d\"] != $date->get(IL_CAL_FKT_DATE,'d',$ilUser->getTimeZone()) ||\n\t\t\t$_POST[$this->getPostVar()]['end'][\"date\"][\"m\"] != $date->get(IL_CAL_FKT_DATE,'m',$ilUser->getTimeZone()) ||\n\t\t\t$_POST[$this->getPostVar()]['end'][\"date\"][\"y\"] != $date->get(IL_CAL_FKT_DATE,'Y',$ilUser->getTimeZone()))\n\t\t{\n\t\t\t$this->invalid_input['end'] = $_POST[$this->getPostVar()]['end'][\"date\"];\n\t\t\t$this->setAlert($lng->txt(\"exc_date_not_valid\"));\n\t\t\t$ok = false;\n\t\t}\n\n\t\t#$_POST[$this->getPostVar()]['end']['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());\n\t\t#$_POST[$this->getPostVar()]['end']['time'] = $date->get(IL_CAL_FKT_DATE,'H:i:s',$ilUser->getTimeZone());\n\n\t\t$this->setEnd($date);\n\n\t\treturn $ok;\n\t}", "public function is_utc_timezone( $event = 0 ) {\n\t\t$timezone = Timezones::wp_timezone_string();\n\t\tif ( $event ) {\n\t\t\t$timezone = Event_Timezones::get_event_timezone_string( $event );\n\t\t}\n\n\t\t// If the site is using UTC or UTC manual offset\n\t\treturn strpos( $timezone, 'UTC' ) !== false;\n\t}", "public static function search_timezone($search)\n {\n //Get List\n $get_list = self::get_timezone_list();\n\n //Search\n if (in_array($search, $get_list)) {\n return true;\n }\n\n return false;\n }", "public static function search_timezone( $search ) {\n\n\t\t//Get List\n\t\t$get_list = self::get_timezone_list();\n\n\t\t//Search\n\t\tif ( in_array( $search, $get_list ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isValid() {\n $sessionDateTime = DateTime::createFromFormat('Y-m-d H:i:s', $this->{Model_Fields_SessionDB::DB_COLUMN_CREATION_DATE});\n $now = new DateTime();\n\n $diff = $sessionDateTime->diff($now);\n $hoursSinceSessionCreated = $diff->h + ($diff->days*24);\n // print 'Hours since session created: ' . $hoursSinceSessionCreated . '<br>';\n\n return $hoursSinceSessionCreated <= (24 * 7);\n }", "function isDateValid($date)\n{\n if ($date === \"Aucune\")\n return (false);\n else if ($date === \"1970-01-01\")\n return (false);\n else if ($date === \"0000-00-00\")\n return (false);\n return (true);\n}", "public static function isTimeZoneEnabled()\n\t{\n\t\treturn \\CTimeZone::enabled();\n\t}", "public function test_date_returns_true_when_not_optional_and_input_strtotime() {\n\t\t$optional = false;\n\n\t\t$result = self::$validator->validate( 'now', $optional );\n\t\t$this->assertTrue( $result );\n\t}", "function wp_timezone_supported()\n{\n}", "function checkExpiryDay($user_id){\n \n \t$res = $this->db->query(\"select timezone,display_day from itms_users where user_id = '$user_id'\");\n\t\n\t\tforeach ($res->result() as $row){\n\t\t $display_day = $row->display_day;\n\t $timezone= $row->timezone;\n\t\t\t\t\n\t\t}\n \n $day = strtolower(date('l'));\n\t\t$days = array();\n\t $days = explode(\",\",$display_day);\n\n\t \t\n\t\tif((in_array($day, $days) || in_array(\"all\", $days))){\n\t\t\treturn true; \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n }", "public function test_date_returns_true_when_optional_and_input_strtotime() {\n\t\t$optional = true;\n\n\t\t$result = self::$validator->validate( 'now', $optional );\n\t\t$this->assertTrue( $result );\n\t}", "public static function isValidTime($time) {\n\t\tif (preg_match('#^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$#', $time)) {\n\t\t\treturn true;\n\t\t} \n\t\treturn false;\n\t}", "private function timestampIsValid($timestamp)\n {\n if (!preg_match('/^[\\d]{4}-[\\d]{2}-[\\d]{2}T[\\d]{2}:[\\d]{2}:[\\d]{2}(?:\\.\\d+)?Z$/', $timestamp)) {\n return false;\n }\n\n return true;\n }", "private function validateCookie()\n {\n if(isset($_COOKIE[GTShipping::COOKIE_NAME]))\n {\n //grab the value\n $zone_id = $_COOKIE[GTShipping::COOKIE_NAME];\n\n //try to get the zone and see if its null\n $zone = $this->getZone($zone_id);\n\n if(! is_null($zone))\n {\n $this->zone_cookie_set = true;\n $this->zone_id = $zone_id;\n $this->zone = $zone;\n\n //get the zone data and set it\n $data = $this->getZoneData($zone_id);\n\n $this->region_id = isset($data['region']) ? $data['region'] : '';\n $this->town_id = isset($data['town']) ? $data['town'] : '';\n $this->quarter_id = isset($data['quarter']) ? $data['quarter'] : '';\n $this->price = isset($data['price']) ? $data['price'] : '';\n }\n }\n }", "function checkInput()\n\t{\n\t\tglobal $lng,$ilUser;\n\t\t\n\t\t$ok = true;\n\t\t\n\t\t$_POST[$this->getPostVar()][\"date\"][\"y\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"date\"][\"y\"]);\n\t\t$_POST[$this->getPostVar()][\"date\"][\"m\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"date\"][\"m\"]);\n\t\t$_POST[$this->getPostVar()][\"date\"][\"d\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"date\"][\"d\"]);\n\t\t$_POST[$this->getPostVar()][\"time\"][\"h\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"time\"][\"h\"]);\n\t\t$_POST[$this->getPostVar()][\"time\"][\"m\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"time\"][\"m\"]);\n\t\t$_POST[$this->getPostVar()][\"time\"][\"s\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"time\"][\"s\"]);\n\n\t\t// verify date\n\t\t\n\t\t$dt['year'] = (int) $_POST[$this->getPostVar()]['date']['y'];\n\t\t$dt['mon'] = (int) $_POST[$this->getPostVar()]['date']['m'];\n\t\t$dt['mday'] = (int) $_POST[$this->getPostVar()]['date']['d'];\n\t\t$dt['hours'] = (int) $_POST[$this->getPostVar()]['time']['h'];\n\t\t$dt['minutes'] = (int) $_POST[$this->getPostVar()]['time']['m'];\n\t\t$dt['seconds'] = (int) $_POST[$this->getPostVar()]['time']['s'];\n\t\tif ($dt['year'] == 0 && $dt['mon'] == 0 && $dt['mday'] == 0 && $this->getRequired())\n\t\t{\n\t\t\t$this->date = null;\n\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\treturn false;\n\t\t}\n\t\telse if ($dt['year'] == 0 && $dt['mon'] == 0 && $dt['mday'] == 0)\n\t\t{\n\t\t\t$this->date = null;\n\t\t\t$_POST[$this->getPostVar()]['date'] = \"\"; // #10413\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!checkdate((int)$dt['mon'], (int)$dt['mday'], (int)$dt['year']))\n\t\t\t{\n\t\t\t\t$this->date = null;\n\t\t\t\t$this->setAlert($lng->txt(\"exc_date_not_valid\"));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());\n\t\t\t$_POST[$this->getPostVar()]['date'] = $date->get(IL_CAL_FKT_DATE,'Y-m-d',$ilUser->getTimeZone());\n\t\t\t$this->setDate($date);\n\t\t}\n\t\treturn true;\n\t}", "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "public static function updateTimezone() {\r\n\t\t// get auth\r\n\t\t$auth = Zend_Auth::getInstance();\r\n\r\n\t\t// not logged in, cookie not set?\r\n\t\tif(!($auth->hasIdentity() && isset($_COOKIE['user_timezone']) && strlen($_COOKIE['user_timezone']) > 0))\r\n\t\t\treturn false;\r\n\r\n\t\t// timezone the same as saved?\r\n\t\tif(!($auth->getIdentity()->timezone != $_COOKIE['user_timezone']))\r\n\t\t\treturn false;\r\n\r\n\t\t// update user in db\r\n\t\t$user = new Petolio_Model_PoUsers();\r\n\t\t$user->find($auth->getIdentity()->id);\r\n\t\t$user->setTimezone($_COOKIE['user_timezone'])->save();\r\n\r\n\t\t// update user in session\r\n\t\t$auth->getStorage()->write((object)$user->toArray());\r\n\t}", "function validateTime($time, $format = 'H:i'){\n\t\t\t\t\t$d = DateTime::createFromFormat($format, $time);\n\t\t\t\t\treturn $d && $d->format($format) === $time;\n\t\t\t\t\t}", "function wp_timezone_choice($selected_zone, $locale = \\null)\n{\n}", "public static function update_user_timezone($user_id,$timezone_value){\n $model \t\t= User_model::find($user_id);\n $model->timezone \t= $timezone_value;\n $saved \t\t= $model->save();\n if(!$saved){\n return false;\n }\n return true;\n}", "public function validateIsoTime($value)\n {\n // look for His keys?\n if (is_array($value)) {\n $value = $this->_arrayToTime($value);\n }\n \n $expr = '/^(([0-1][0-9])|(2[0-3])):[0-5][0-9]:[0-5][0-9]$/D';\n \n return $this->_filter->validatePregMatch($value, $expr) ||\n ($value == '24:00:00');\n }", "function tzintellitime_sync_admin_settings_validate($form, &$form_state) {\n if(!is_numeric($form_state['values']['tzintellitime_sync_interval_minutes'])) {\n form_set_error('tzintellitime_sync_interval_minutes', t('Invalid synchronization interval, enter number of minutes.'));\n } elseif($form_state['values']['tzintellitime_sync_interval_minutes'] < 0) {\n form_set_error('tzintellitime_sync_interval_minutes', t('Synchronization interval must be greater than 0'));\n }\n\n if(!ctype_digit($form_state['values']['tzintellitime_sync_weeks_forward'])) {\n form_set_error('tzintellitime_sync_weeks_forward', t('Enter number of weeks as a positive integer.'));\n }\n\n if(!ctype_digit($form_state['values']['tzintellitime_sync_weeks_backward'])) {\n form_set_error('tzintellitime_sync_weeks_backward', t('Enter number of weeks as a positive integer.'));\n }\n\n if(1 !== preg_match('/^\\d{2}:\\d{2}-\\d{2}:\\d{2}$/', $form_state['values']['tzintellitime_sync_availability_day'])) {\n form_set_error('tzintellitime_sync_availability_day', 'Enter time span as HH:MM-HH:MM');\n }\n if(1 !== preg_match('/^\\d{2}:\\d{2}-\\d{2}:\\d{2}$/', $form_state['values']['tzintellitime_sync_availability_evening'])) {\n form_set_error('tzintellitime_sync_availability_evening', 'Enter time span as HH:MM-HH:MM');\n }\n if(1 !== preg_match('/^\\d{2}:\\d{2}-\\d{2}:\\d{2}$/', $form_state['values']['tzintellitime_sync_availability_night'])) {\n form_set_error('tzintellitime_sync_availability_night', 'Enter time span as HH:MM-HH:MM');\n }\n}", "function rausbar_validate_time_field( $result, $value, $form, $field ) {\n\tglobal $chosenDay;\n\tglobal $chosenDate;\n\tglobal $min_time;\n\t$time = strtotime( implode( ':', $value ) );\n\t$max_time = '23:00';\n\t\n\tif ( $time == false ) {\n\t\t$result['is_valid'] = false;\n\t\t$result['message'] = 'Vennligst fyll inn begge feltene.';\n\t} elseif ( $time < strtotime( $min_time ) || $time > strtotime( $max_time ) ) {\n\t\t$result['is_valid'] = false;\n\t\t$result['message'] = \"Velg et tidspunkt mellom {$min_time} og {$max_time}.\";\n\t}\n\n\treturn $result;\n}", "static function validateTime($time)\n\t\t{\n\t\t\tpreg_match(\"/^(\\*[0-9\\*]|0[0-9\\*]|1[0-9\\*]|2[0-3\\*]):[0-5\\*][0-9\\*]$/\",$time,$matched_time);\n\t\t\t$result = isset($matched_time[0]);\n\t\t\treturn $result;\n\t\t}", "public function validateTime($inTime) {\n $isItEmpty = self::cannotBeEmpty($inTime);\n if ($isItEmpty) {\n return false;\n } else {\n if (self::isValidTime($inTime)) {\n return true;\n } else {\n return false;\n }\n }\n }", "private function isValidTimeDate(\n $value,\n $format\n )\n {\n global $timedate;\n \n $dateparts = array();\n $reg = $timedate->get_regular_expression($format);\n preg_match('@'.$reg['format'].'@', $value, $dateparts);\n \n if ( isset($reg['positions']['a']) \n && !in_array($dateparts[$reg['positions']['a']], array('am','pm')) )\n return false;\n if ( isset($reg['positions']['A']) \n && !in_array($dateparts[$reg['positions']['A']], array('AM','PM')) )\n return false;\n if ( isset($reg['positions']['h']) && (\n !is_numeric($dateparts[$reg['positions']['h']]) \n || $dateparts[$reg['positions']['h']] < 1\n || $dateparts[$reg['positions']['h']] > 12 ) )\n return false;\n if ( isset($reg['positions']['H']) && (\n !is_numeric($dateparts[$reg['positions']['H']]) \n || $dateparts[$reg['positions']['H']] < 0\n || $dateparts[$reg['positions']['H']] > 23 ) )\n return false;\n if ( isset($reg['positions']['i']) && (\n !is_numeric($dateparts[$reg['positions']['i']]) \n || $dateparts[$reg['positions']['i']] < 0\n || $dateparts[$reg['positions']['i']] > 59 ) )\n return false;\n if ( isset($reg['positions']['s']) && (\n !is_numeric($dateparts[$reg['positions']['s']]) \n || $dateparts[$reg['positions']['s']] < 0\n || $dateparts[$reg['positions']['s']] > 59 ) )\n return false;\n if ( isset($reg['positions']['d']) && (\n !is_numeric($dateparts[$reg['positions']['d']]) \n || $dateparts[$reg['positions']['d']] < 1\n || $dateparts[$reg['positions']['d']] > 31 ) )\n return false;\n if ( isset($reg['positions']['m']) && (\n !is_numeric($dateparts[$reg['positions']['m']]) \n || $dateparts[$reg['positions']['m']] < 1\n || $dateparts[$reg['positions']['m']] > 12 ) )\n return false;\n if ( isset($reg['positions']['Y']) &&\n !is_numeric($dateparts[$reg['positions']['Y']]) )\n return false;\n \n return true;\n }", "public function hasZone(){\n return $this->_has(2);\n }", "public function testHourValidation()\n {\n $this->object->setSession(new Session());\n $this->object->setHours(55);\n $this->object->setDueDate(new DateTime());\n $this->object->setHours(1.33);\n $this->validate(0);\n }", "function isEndDateValid($input, $f){\n\n $isValid = false;\n\n // Converting string to Unix Timestamp\n $tomorrow = strtotime(\"tomorrow\");\n $endDate = strtotime($input);\n\n if($endDate >= $tomorrow && $input != \"\"){\n $isValid = true;\n }else{\n setError(\"The end date must be greater than today's date\", $f);\n }\n return $isValid; \n}", "public function hasValidAfterTime(){\n return $this->_has(4);\n }", "protected function cityIsValid()\n {\n return preg_match(\"/^[A-Za-zÀ-ÿ -]{1,}$/\", $this->city);\n }", "public function isTimestampValid()\n {\n return $this->hasTimestamp() && intval($this->timestamp) > time();\n }", "public function testGetTimezone(): void\n {\n $model = Time::load([\n \"timezone\" => \"timezone\",\n ], $this->container);\n\n $this->assertSame(\"timezone\", $model->getTimezone());\n }", "function validate(&$_FormValidation) {\r\n $value = $this->get_value();\r\n\r\n// we make sure that the date is valid\r\n if ($value['hour'] < 0 || $value['hour'] > 23 ||$value['minute'] < 0 || $value['minute'] > 59) {\r\n $this->set_error_message('Invalid date');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "protected function isTimeFrameValid() {\n\t\treturn ($GLOBALS['EXEC_TIME'] <= $this->arguments['time'] + self::VALUE_TimeFrame);\n\t}", "public function validate($subject): bool\n {\n $pattern = '/^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(\\.\\d{2})?(Z|([+-](\\d{2}):(\\d{2})))$/';\n if (!\\preg_match($pattern, $subject, $matches)) {\n return false;\n }\n\n $dateYear = \\intval($matches[1]);\n $dateMonth = \\intval($matches[2]);\n $dateDay = \\intval($matches[3]);\n $timeHour = \\intval($matches[4]);\n $timeMinutes = \\intval($matches[5]);\n $timeSeconds = \\intval($matches[6]);\n $tzTime = null;\n $tzTimeHours = 0;\n $tzTimeMinutes = 0;\n\n if (isset($matches[9])) {\n $tzTime = $matches[9];\n }\n if (isset($matches[10])) {\n $tzTimeHours = \\intval($matches[10]);\n }\n if (isset($matches[11])) {\n $tzTimeMinutes = \\intval($matches[11]);\n }\n\n if (!$this->validateDate($dateYear, $dateMonth, $dateDay)) {\n return false;\n }\n if (!$this->validateTime($timeHour, $timeMinutes, $timeSeconds)) {\n return false;\n }\n if ($tzTime !== null && !$this->validateTimezoneTime($tzTimeHours, $tzTimeMinutes)) {\n return false;\n }\n return true;\n }", "function validate($userId, $authCode, $hours = 168)\r\n {\r\n $validCode = $this->isValidCode($userId, $authCode);\r\n $validTime = $this->isUnexpiredTime($userId, $hours);\r\n return $validCode && $validTime;\r\n }", "public function testIsValid()\n {\n // Arrange\n $input = '15.05.2005';\n\n // Act\n $actual = \\Bobel\\Helpers\\DateTime::isValid($input);\n\n // Assert\n $this->assertTrue($actual);\n }", "function checkIfCorrectTime() {\r\n return (date(\"H:i\") == \"02:59\");\r\n }", "public function validateTime($time)\n {\n $time = Carbon::createFromFormat('H:i', $time);\n $min = Carbon::createFromFormat('H:i', '08:00');\n $max = Carbon::createFromFormat('H:i', '17:00');\n if ($time->lt($min) || $time->gt($max)) {\n throw new \\Exception('Sorry, the meeting room is available between 8am and 5pm.');\n }\n }", "function CheckIfZoneIsComplete($data)\n{\n if ($data[0][3] !== 'SOA')\n return false;\n if (end($data)[3] !== 'SOA')\n return false;\n return true;\n}", "function validate_date_time_picker_field($field)\n {\n }", "function alexa_validate_timestamp ($timestamp) {\n\n\t// Ensure that the timestamp from within the HTTP request JSON is within the past minute\n\tif (time() - strtotime($timestamp) > 60) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "public static function validate($time)\n {\n if ($time instanceof \\DateTime)\n return true;\n $regex = '%^((0?[1-9]|1[012])(:[0-5]\\d){0,2} ?([AP]M|[ap]m))$|^([01]\\d|2[0-3])(:[0-5]\\d){0,2}$%';\n return parent::check($time, $regex);\n }", "public static function validate_time_format( $time ) {\n\t\tif ( false === $time || '' === $time ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( preg_match( '/(2[0-3]|[01][0-9]):([0-5][0-9])/', $time ) == false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function hasInputtime(){\n return $this->_has(3);\n }", "function set_timezone(&$errors){\n\t\tglobal $config, $auth;\n\t\n\t\tswitch($this->container_type){\n\t\tcase 'sql':\n\t\t\t$q=\"select timezone from \".$config->data_sql->table_subscriber.\n\t\t\t\t\" where domain='\".$config->realm.\"' and username='\".$auth->auth[\"uname\"].\"'\";\n\t\t\t$res=$this->db->query($q);\n\t\t\tif (DB::isError($res)) {log_errors($res, $errors); return;}\n\t\t\t$row = $res->fetchRow(DB_FETCHMODE_OBJECT);\n\t\t\t$res->free();\n\t\t\n\t\t\tputenv(\"TZ=\".$row->timezone); //set timezone\t\n\t\t\treturn;\n\n\t\tcase 'ldap':\n\t\t\tdie('NOT IMPLEMENTED: '.__FILE__.\":\".__LINE__);\n\t\t}\n\t}", "function validExpiryDate($value)\n{\n notEmpty($value, \"Expiry Date\");\n $date_arr = explode('-', $value);\n if (checkdate($date_arr[0], $date_arr[1], $date_arr[2])) {\n $exp_date = date(\"t-m-y\", strtotime($value));\n date_default_timezone_set('Australia/Sydney');\n //For some reason my date time on wamp server is incorrect so use UTC\n $nowDate = date(\"t-m-y\");\n if ($exp_date > $nowDate) {\n return true;\n } else {\n throw new Exception(\"Credit card expiration date must be valid\");\n }\n } else {\n throw new Exception(\"Invalid Exp Date format\");\n }\n}", "public static function valid_timestamp($timestamp)\n\t{\n\t\t$timestamp_cutoff = \\Config::get('engine.timestamp_cutoff', 15);\n\t\t\n\t\t// Is the timestamp from 60 seconds ago up to the current time?\n\t\tif ((int)$timestamp >= (static::$gm_time - (int)$timestamp_cutoff) && (int)$timestamp <= static::$gm_time) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Timestamp out of scope\n\t\treturn false;\n\t}", "function is_date_valid($str)\r\n\t{\r\n\t\t$this->load->helper('date');\r\n\r\n\t\tif (mysql_to_unix(date('Y-m-d')) <= mysql_to_unix($str))\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('is_date_valid', 'The {field} must not be in the past');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "public function getTimeZone();", "public function getTimeZone();", "public function getTimeZone();", "public function testOneCharLocation()\n {\n $this->assertFalse(Location::validate([\n 'lat' => '19.048251',\n 'lng' => '-98.190543',\n 'name' => 'a',\n 'address' => 'asdfg',\n 'user_id' => '1'\n ])->fails());\n }" ]
[ "0.7259342", "0.70405626", "0.69588184", "0.6424814", "0.6354656", "0.6348423", "0.6303417", "0.6297723", "0.6295146", "0.6201768", "0.61843616", "0.61801636", "0.61664385", "0.61269885", "0.60903186", "0.6070538", "0.6023578", "0.59919876", "0.5965113", "0.5955574", "0.593074", "0.59114486", "0.5906986", "0.5895313", "0.58391994", "0.5811648", "0.57963604", "0.571634", "0.5628766", "0.5600811", "0.5593019", "0.55723125", "0.55635643", "0.5561207", "0.553169", "0.5516873", "0.5512946", "0.55027926", "0.5502242", "0.54913384", "0.5488223", "0.5448108", "0.54480284", "0.5441905", "0.54380006", "0.5419849", "0.5419359", "0.5411764", "0.5410611", "0.5389442", "0.538135", "0.53638744", "0.5354854", "0.53329283", "0.53270304", "0.532178", "0.53159064", "0.53130746", "0.5311926", "0.529818", "0.5294561", "0.52881455", "0.5284383", "0.52808934", "0.52794516", "0.527827", "0.52603745", "0.52490497", "0.5248934", "0.5242726", "0.52307", "0.5221964", "0.52196485", "0.5219526", "0.5209871", "0.5203749", "0.5200761", "0.5198353", "0.5194116", "0.51928073", "0.5192763", "0.5181694", "0.5178634", "0.5175582", "0.51747376", "0.51719034", "0.51684105", "0.5167697", "0.51648223", "0.5159612", "0.5158806", "0.51537186", "0.51481974", "0.51478624", "0.514705", "0.51319784", "0.5130801", "0.5130801", "0.5130801", "0.51294506" ]
0.7243336
1
Test loading of hooks
Тестирование загрузки хуков
public function testLoadHooks() { $hooks = $this->discuss->loadHooks(); $this->assertInstanceOf('disHooks',$hooks); $this->assertInstanceOf('disHooks',$this->discuss->hooks); $this->discuss->hooks = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoadHooks() {\n $hooks = $this->quip->loadHooks('unit');\n $this->assertInstanceOf('quipHooks',$hooks);\n $this->assertInstanceOf('quipHooks',$this->quip->unitHooks);\n $this->quip->unitHooks = null;\n }", "private function hooks()\n {\n }", "abstract protected function setupHooks();", "public function test_hooks() {\n\n\t\t$this->assertEquals( 20, has_filter( 'lifterlms_settings_tabs_array', array( $this->page, 'add_settings_page' ) ) );\n\t\t$this->assertEquals( 10, has_action( 'lifterlms_sections_rest-api', array( $this->page, 'output_sections_nav' ) ) );\n\t\t$this->assertEquals( 10, has_action( 'lifterlms_settings_rest-api', array( $this->page, 'output' ) ) );\n\n\t\t$this->assertEquals( 10, has_action( 'lifterlms_settings_save_rest-api', array( 'LLMS_Rest_Admin_Settings_API_Keys', 'save' ) ) );\n\n\t\t$this->assertEquals( 10, has_filter( 'llms_settings_rest-api_has_save_button', '__return_false' ) );\n\t\t$this->assertEquals( 10, has_filter( 'llms_table_get_table_classes', array( $this->page, 'get_table_classes' ) ) );\n\n\t\t$this->assertEquals( 10, has_action( 'lifterlms_admin_field_title-with-html', array( $this->page, 'output_title_field' ) ) );\n\n\t}", "private function init_hooks()\n {\n }", "public function register_hooks();", "public function load_hooks()\n {\n $this->filters = new Filters( $this->client );\n $this->actions = new Actions( $this->client );\n }", "public function hooks(): array;", "public function preLoad() {\n $preHooks = $this->getProperty('preHooks','');\n }", "public function load_pluggable_hooks() {\n\t\tinclude_once( EVENTS_MAKER_PATH . 'includes/template-hooks.php' );\n\t}", "public function hooks() {\n\t\t$this->loader->add_action( 'init', $this, 'load_content_forms' );\n\t\t$this->loader->add_action( 'init', $this, 'load_widgets_modules' );\n\t}", "protected function register_hooks() {\n\t\t}", "public function add_hooks()\n {\n }", "public function add_hooks()\n {\n }", "public function get_hooks()\n {\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function loadPreHooks() {\n $passed = true;\n $this->loadHooks('preHooks');\n $preHooks = $this->getProperty('preHooks','');\n if (!empty($preHooks)) {\n $this->preHooks->loadMultiple($preHooks,$this->dictionary->toArray(),array(\n 'user' => &$this->modx->user,\n 'submitVar' => $this->getProperty('submitVar'),\n 'reloadOnSuccess' => $this->getProperty('reloadOnSuccess'),\n 'fieldOldPassword' => $this->getProperty('fieldOldPassword'),\n 'fieldNewPassword' => $this->getProperty('fieldNewPassword'),\n 'fieldConfirmNewPassword' => $this->getProperty('fieldConfirmNewPassword'),\n ));\n $values = $this->preHooks->getValues();\n if (!empty($values)) {\n $this->dictionary->fromArray($values);\n }\n }\n /* process preHooks */\n if ($this->preHooks->hasErrors()) {\n $placeholderPrefix = rtrim($this->getProperty('placeholderPrefix', 'logcp.'), '.');\n $errorPrefix = ($placeholderPrefix) ? $placeholderPrefix . '.error' : 'error';\n $this->modx->toPlaceholders($this->preHooks->getErrors(), $errorPrefix);\n $this->modx->toPlaceholder('error_message', $this->preHooks->getErrorMessage(), $placeholderPrefix);\n $passed = false;\n }\n return $passed;\n }", "public function add_hooks()\n\t{\n\n\t}", "function load_hook($hook, $flags=0)\n{\n\t// search for hook files\n\t$pattern = sprintf('/(^|\\/)%s(|-\\d+)\\.(%s)$/i', preg_quote($hook), strtr(HTML_EXTENSIONS, ',', '|'));\n\t$files = array_merge(\n\t\tcall_memoized('list_dir', 'framework/hooks', $pattern, ListDirPathType::FROM_SITE_ROOT, ListDirFlags::REGULAR_EXPRESSION),\n\t\tcall_memoized('list_dir', join_path(PAGE_FROM_SITE_ROOT, 'include/hooks'), $pattern, ListDirPathType::FROM_SITE_ROOT, ListDirFlags::REGULAR_EXPRESSION));\n\n\t// sort files by priority\n\t$files_by_priority = array();\n\tforeach ($files as $i => $file)\n\t{\n\t\t$matches = array();\n\t\t$priority = preg_match('/\\d+/', $file, $matches) ?\n\t\t\tmin(intval($matches[0]), 100) : 50;\n\n\t\t// make sure framework always wins priority battles\n\t\tif (starts_with($file, 'framework/'))\n\t\t{\n\t\t\tswitch ($priority)\n\t\t\t{\n\t\t\t\tcase 0: $priority = -1;\n\t\t\t\tcase 100: $priority = 101;\n\t\t\t}\n\t\t}\n\n\t\t$files_by_priority[$priority] = $file;\n\t}\n\tkrsort($files_by_priority);\n\t$files = array_values($files_by_priority);\n\n\t// if exclusive, drop all but the highest-priority file\n\tif ($flags & HookFlags::EXCLUSIVE)\n\t\tarray_splice($files, 1);\n\n\t// include files\n\tforeach ($files as $file)\n\t\tinclude SITE_ROOT_DIR . '/' . $file;\n}", "private function requireHook( $name ) {\n\t\tglobal $wgParser;\n\t\tif( isset( $wgParser->mTagHooks[$name] ) ) {\n\t\t\t$this->hooks[$name] = $wgParser->mTagHooks[$name];\n\t\t} else {\n\t\t\twfDie( \"This test suite requires the '$name' hook extension.\\n\" );\n\t\t}\n\t}", "public function initHooks() {\n\t\t\tif (AppLoader::includeHooks('CommonHooks')) {\n\t\t\t\t$objCommonHooks = new CommonHooks();\n\t\t\t\t$this->registerPreRunHook(array($objCommonHooks, 'verifyToken'));\n\t\t\t\t\n\t\t\t\tif (!AppConfig::get('Overlay') && !AppConfig::get('Insert')) {\n\t\t\t\t\t$this->registerPostRunHook(array($objCommonHooks, 'trackHistory'), array(5, array('css', 'js', 'xml', 'json', 'jsonp', 'html')));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (AppLoader::includeHooks('CacheHooks')) {\n\t\t\t\t$objCacheHooks = new CacheHooks();\n\t\t\t\t$this->registerPreRunHook(array($objCacheHooks, 'serveCache'));\n\t\t\t\t$this->registerPostRunHook(array($objCacheHooks, 'saveCache'));\n\t\t\t}\n\t\t\t\n\t\t\tif (AppLoader::includeHooks('AccessHooks')) {\n\t\t\t\t$objAccessHooks = new AccessHooks();\n\t\t\t\t$this->registerPreRunHook(array($objAccessHooks, 'handleAccess'), array(AppConfig::get('BaseUrl') . '/account/login/'));\n\t\t\t}\n\t\t}", "public static function init(){\n\t\tself::get_instance()->hooks();\n\t}", "public function hooks() {\n\t\t$this->loader->add_action( 'rest_api_init', $this, 'register_endpoints' );\n\t\t$this->loader->add_action( 'current_screen', $this, 'maybe_save_obfx_token' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $this, 'enqueue_analytics_scripts' );\n\t\t$this->loader->add_action( 'wp_head', $this, 'output_analytics_code', 0 );\n\t}", "protected function setUp(): void\n {\n $this->hooks = \\Hooks_instance();\n }", "private function load_webhooks()\n {\n }", "public function loadHooks() {\n\t\t\n\t\t// Check all required dependencies for this add-on\n\t\tadd_action( 'init', array( $this, 'checkDependencies' ), -1 );\n\t\t\n\t\t// Load late\n\t\tadd_action( 'init', array( Register_Helper::getInstance(), 'loadFieldsFromRH'), 9999 );\n\t\t\n\t\t// Handle validation and saving of TML fields from profile page\n\t\tadd_action( 'profile_update', array( Register_Profile_Fields::getInstance(), 'saveForTML' ), 999 );\n\t\tadd_filter( 'user_profile_update_errors', array( Register_Profile_Fields::getInstance(), 'validateRHFields' ), 999 );\n\t}", "public function loadHooks() {\n\t\t\n\t\t$utils = Utilities::get_instance();\n\t\t$utils->log(\"Loading admin_* hooks\");\n\t\tadd_action( 'admin_init', array( $this, 'register' ), 10 );\n\t\tadd_action( 'admin_menu', array( $this, 'addToAdminMenu' ), 10 );\n\t\t\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'loadInputJS' ) );\n\t\t\n\t\t$utils->log(\"Loading settings-options filter hooks\");\n\t\tadd_filter( 'e20r-settings-option-name', array( $this, 'getOptionName' ), 10, 2 );\n\t\t\n\t\t$utils->log(\"Loading View specific JS path filter\");\n\t\tadd_filter( 'e20r-settings-enqueue-js-path', 'E20R\\PMPro\\Addon\\Email_Confirmation\\Views\\Inputs\\Select::jsPath', 10, 1 );\n\t\t\n\t}", "public static function specialBeforeHook()\n {\n }", "public function getHooks();", "public static function setupHooks()\n {\n if (! class_exists('FLBuilder')) {\n return;\n }\n \n // Load custom modules.\n add_action('init', __CLASS__ . '::loadModules');\n }", "public function setUp() {\n $this->hooks_backup = Docgen_Hooks::getAllHooks();\n Docgen_Hooks::reset();\n }", "public function testReadExternalAdmissionHookConfiguration()\n {\n }", "public static function load_hooks() {\n add_action( 'inbound_track_link', array(__CLASS__, 'track_link'));\n\n /* Stores custom click event */\n add_action( 'template_redirect' , array( __CLASS__ , 'add_click_event_listener' ) , 11); // Click Tracking init\n }", "function init_hooks() {\n\t\trequire_once um_mycred_path . 'includes/core/hooks/class-init.php';\n\t\tif ( empty( UM()->classes['um_mycred_hooks_init'] ) ) {\n\t\t\tUM()->classes['um_mycred_hooks_init'] = new um_ext\\um_mycred\\core\\hooks\\Init();\n\t\t}\n\t\treturn UM()->classes['um_mycred_hooks_init'];\n\t}", "public static function init () {\r\n self::$hook = hook::getInstance();\r\n }", "public function should_load()\n {\n }", "abstract public function add_extra_hooks(): void;", "public function testLoad()\n\t{\n\t}", "public abstract function hook_in($hook_name);", "public function load_hooks( $category ) {\n\n // Load and run hooks based on category\n switch ( $category ) {\n\n case 'admin_init':\n\n // Load the admin app's language files\n $this->CI->lang->load('storage_admin', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_USER_APPS_STORAGE);\n\n // Verify which component is\n if ( ( md_the_component_variable('component') === 'user' ) && ( $this->CI->input->get('app', TRUE) === 'storage' ) ) {\n\n // Require the Admin Inc\n md_include_component_file(MIDRUB_BASE_USER_APPS_STORAGE . 'inc/admin.php');\n\n } else if ( ( md_the_component_variable('component') === 'user' ) && ( md_the_component_variable('component_display') === 'plans' ) ) {\n\n // Require the Plans Inc\n md_include_component_file(MIDRUB_BASE_USER_APPS_STORAGE . 'inc/plans.php');\n\n }\n\n break;\n\n case 'user_init':\n\n // Verify which component is\n if ( md_the_component_variable('component') === 'team' ) {\n\n if ( get_option('app_storage_enable') && plan_feature('app_storage') ) {\n\n // Load the app's language files\n $this->CI->lang->load('storage_member', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_USER_APPS_STORAGE);\n\n // Require the Permissions Inc\n md_include_component_file(MIDRUB_BASE_USER_APPS_STORAGE . 'inc/members.php');\n\n }\n\n }\n\n break;\n\n }\n\n }", "public static function preLoad () { return True; }", "public function declareHooks();", "public function testReplaceExternalAdmissionHookConfiguration()\n {\n }", "private function requireFunctionHook( $name ) {\n\t\tglobal $wgParser;\n\t\tif( isset( $wgParser->mFunctionHooks[$name] ) ) {\n\t\t\t$this->functionHooks[$name] = $wgParser->mFunctionHooks[$name];\n\t\t} else {\n\t\t\twfDie( \"This test suite requires the '$name' function hook extension.\\n\" );\n\t\t}\n\t}", "public function init_hooks() {\n\n\t\t/*\n\t\t * Activation Plugin Hook\n\t\t */\n\t\tregister_activation_hook( __FILE__, array( '\\WP_PLUGIN\\config\\install', 'run_install' ) );\n\n\t\t/*\n\t\t * Uninstall Plugin Hook\n\t\t */\n\t\tregister_deactivation_hook( __FILE__, array( '\\WP_PLUGIN\\config\\uninstall', 'run_uninstall' ) );\n\n\t\t/*\n\t\t * Load i18n\n\t\t */\n\t\tif ( self::$use_i18n === true ) {\n\t\t\tnew \\WP_PLUGIN\\config\\i18n( 'wp-plugin' );\n\t\t}\n\n\t\t//Check $ENVIRONMENT Mode\n\t\tif ( self::$ENVIRONMENT == \"development\" ) {\n\t\t\tinclude_once dirname( __FILE__ ) . '/inc/core/debug.php';\n\t\t\tnew \\WP_PLUGIN\\core\\debug();\n\t\t}\n\n\t}", "public function maybe_load_hooks() {\n\t\tif ( ! class_exists( 'Jetpack_AMP_Support' ) || ! Jetpack_AMP_Support::is_amp_request() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! class_exists( 'WooCommerce' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! Jetpack_Google_Analytics_Options::has_tracking_code() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! Jetpack_Google_Analytics_Options::track_add_to_cart_is_enabled() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'woocommerce_add_to_cart', array( $this, 'amp_add_to_cart' ), 10, 6 );\n\t\tadd_action( 'woocommerce_thankyou', array( $this, 'amp_after_purchase' ), 10, 1 );\n\t\tadd_action( 'wp_footer', array( $this, 'amp_send_ga_events' ) );\n\t}", "public function register_hook_callbacks() {\n \n }", "public function testLoad()\n {\n // load should raise GameCoreLoad event\n $listener = $this->getMock('\\GeorgetteParty\\GMFBundle\\Event\\Listener', array('onGameCoreLoad'));\n $listener->expects($this->once())->method('onGameCoreLoad');\n\n $core = $this->getFakeCore();\n $core->addListener(Event::GAMECORE_LOAD, $listener, 'onGameCoreLoad');\n $core->init(); // to delete, replace with a core already initiated\n $core->load();\n }", "public function hooks() {\n\t\t$this->loader->add_action( 'wp_dashboard_setup', $this, 'add_dashboard_widgets' );\n\t}", "private function hook() {\n\n\t\tadd_filter\t(\t'pre_set_site_transient_update_plugins',\tarray(\t$this,\t'api_check'\t\t\t)\t\t\t);\n\t\tadd_filter\t(\t'plugins_api',\t\t\t\t\t\t\t\tarray(\t$this,\t'api_data'\t\t\t),\t10,\t3\t);\n\t\tadd_filter\t(\t'upgrader_post_install',\t\t\t\t\tarray(\t$this,\t'run_remote_count'\t),\t10,\t3\t);\n\t\tadd_filter\t(\t'http_request_args',\t\t\t\t\t\tarray(\t$this,\t'disable_wporg'\t\t),\t5,\t2\t);\n\n\t\tregister_activation_hook\t( __FILE__,\t\t\t\t\t\tarray(\t$this,\t'clear_transient'\t)\t\t\t);\n\n\t}", "static public function initHookManager()\n {\n //include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';\n Globals::$hookManager = new HookManager();\n }", "function cyberchimps_load_hooks() {\n\t$hooks_path = get_template_directory() . '/cyberchimps/hooks/';\n\n\trequire_once $hooks_path . 'wp-head-hooks.php';\n\trequire_once $hooks_path . 'header-hooks.php';\n\trequire_once $hooks_path . 'blog-hooks.php';\n\trequire_once $hooks_path . 'page-hooks.php';\n\trequire_once $hooks_path . 'footer-hooks.php';\n}", "public function load_hooks( $category ) {\n\n // Load and run hooks based on category\n switch ( $category ) {\n\n case 'admin_init':\n\n // Load the admin app's language files\n $this->CI->lang->load('chatbot_admin', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_USER_APPS_CHATBOT);\n\n // Verify which component is\n if ( ( md_the_component_variable('component') === 'user' ) && ( $this->CI->input->get('app', TRUE) === 'chatbot' ) ) {\n\n // Require the Admin Inc\n md_include_component_file(MIDRUB_BASE_USER_APPS_CHATBOT . 'inc/admin.php');\n\n } else if ( ( md_the_component_variable('component') === 'user' ) && ( md_the_component_variable('component_display') === 'plans' ) ) {\n\n // Require the Plans Inc\n md_include_component_file(MIDRUB_BASE_USER_APPS_CHATBOT . 'inc/plans.php');\n\n }\n\n break;\n\n case 'user_init':\n\n // Verify which component is\n if ( md_the_component_variable('component') === 'team' ) {\n\n if ( get_option('app_chatbot_enable') && plan_feature('app_chatbot') ) {\n\n // Load the app's language files\n $this->CI->lang->load('chatbot_member', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_USER_APPS_CHATBOT);\n\n // Require the Permissions Inc\n md_include_component_file(MIDRUB_BASE_USER_APPS_CHATBOT . 'inc/members.php');\n\n }\n\n }\n\n break;\n\n }\n\n // Require the General Inc\n get_the_file(MIDRUB_BASE_USER_APPS_CHATBOT . 'inc/general.php');\n\n }", "public function hooks($args) {\n \n }", "private function _init_hook()\n {\n // Instance du Hook.\n $this->_services->set_instance(\"hook\", new Hook());\n\n // Récupération de tous les modules.\n $dir = dirname($this->_dir) . \"/\" . $this->_services->get(\"config\")->path->module.\"*/*/module.php\";\n $module_files = glob($dir); \n foreach ($module_files as $file)\n {\n require($file);\n $class = preg_replace(\"#[^[a-zA-Z0-9]]*#\", \"\", basename(dirname($file)));\n $class = $this->_services->get(\"config\")->system->prefix_module_class . $class . $this->_services->get(\"config\")->system->suffix_module_class;\n $this->_services->get(\"hook\")->add(new $class($this->_services));\n }\n\n // Le Hook observe le ServiceContainer pour configurer les services.\n $this->_services->attach($this->_services->get(\"hook\"));\n\n // Configuration des instances de services déjà appelées. \n foreach ($this->_services->list_instances() as $service)\n {\n $this->_services->get(\"hook\")->notify(new Event(\"Service::config_\" . $service));\n }\n }", "public function testCheckSystemHooks()\n {\n $cmd = new Doodad();\n $this->assertNotEmpty($cmd);\n $this->assertAttributeContains('exec', 'system_hook', $cmd);\n $cmd->execute('ls');\n $this->assertAttributeNotEmpty('cmd', $cmd);\n $this->assertEquals('ls', $cmd->lastCommand());\n\n $cmd = (new \\ReflectionMethod('Subfission\\Doodad\\Doodad', 'checkSystemFunctionality'));\n $cmd->setAccessible(true);\n $exec = $cmd->invoke(new Doodad);\n $this->assertEquals('exec', $exec);\n }", "public static function hook(Hook $hook) {\n $hook_name = 'hook' . ltrim(strrchr(get_class($hook), '\\\\'), '\\\\');\n\n // execute hook on atomar\n $state = self::hookAtomar($hook);\n\n // execute hooks on extensions\n try {\n $extensions = \\R::find('extension', 'is_enabled=1 and slug<>?', array(self::application_namespace()));\n foreach ($extensions as $ext) {\n if (vercmp($ext->atomar_version, self::version()) < 0) {\n $message = $ext->slug . ' does not support this version of atomar';\n if (Auth::has_authentication('administer_site') || self::debug()) {\n set_error($message);\n } else {\n Logger::log_error($message);\n }\n continue;\n } // skip un-supported modules\n try {\n $state = self::hookModule($hook, $ext->slug, self::extension_dir() . $ext->slug . DIRECTORY_SEPARATOR, $state, $ext->box(), false);\n } catch (\\Exception $e) {\n $notice = 'Could not run hook \"' . $hook_name . '\" for \"' . $ext->slug . '\" module';\n Logger::log_error($notice, $e->getMessage());\n if (self::debug() || Auth::has_authentication('administer_site')) set_error($notice);\n continue;\n }\n }\n\n // execute hook on application\n // TRICKY: we re-load the application during hooks in case its settings were changed\n self::$app = self::loadModule(self::application_dir(), self::application_namespace());\n if (self::$app != null && self::$app->is_enabled && vercmp(self::$app->atomar_version, self::version()) >= 0) {\n $state = self::hookModule($hook, self::application_namespace(), self::application_dir(), $state, self::$app->box(), false);\n }\n } catch (PDOException $e) {\n // TRICKY: don't die if the database is missing\n if(\\R::testConnection()) throw $e;\n }\n return $hook->postProcess($state);\n }", "public function load_hooks() {\n\n\t\t/* Add button */\n\t\tadd_action( 'media_buttons_context' , array( __class__ , 'token_button' ) , 99 );\n\n\t\t/* Load supportive libraries */\n\t\tadd_action( 'admin_enqueue_scripts' , array( __CLASS__ , 'enqueue_js' ));\n\n\t\t/* Add shortcode generation dialog */\n\t\tadd_action( 'admin_footer' , array( __CLASS__ , 'token_generation_popup' ) );\n\n\t\t/* Add supportive js */\n\t\tadd_action( 'admin_footer' , array( __CLASS__ , 'token_generation_js' ) );\n\n\t\t/* Add supportive css */\n\t\tadd_action( 'admin_footer' , array( __CLASS__ , 'token_generation_css' ) );\n\n\t\t/* Add shortcode handler */\n\t\tadd_shortcode( 'lead-field', array( __CLASS__, 'process_lead_field_shortcode' ) );\n\n\t\t/* Add shortcode handler */\n\t\tadd_shortcode( 'unsubscribe-link', array( __CLASS__, 'process_unsubscribe_link' ) );\n\n\t}", "public function possibly_add_load_sample_return_notice_script($hook)\n {\n }", "function hooks()\n {\n return o2system()->getService('hooks');\n }", "protected function initHookObjects() {}", "protected function initHookObjects() {}", "public static function init() {\n\t\tself::instance()->hook();\n\t}", "function hook_drush_load() {\n\n}", "public function testPatchExternalAdmissionHookConfiguration()\n {\n }", "public static function hooks() {\n add_filter( 'wpak_addons', array( __CLASS__, 'wpak_addons' ) );\n add_filter( 'wpak_default_phonegap_build_plugins', array( __CLASS__, 'wpak_default_phonegap_build_plugins' ), 10, 3 );\n add_filter( 'wpak_app_platform_attributes', array( __CLASS__, 'wpak_app_platform_attributes' ), 10, 2 );\n add_filter( 'wpak_app_phonegap_version', array( __CLASS__, 'wpak_app_phonegap_version' ), 10, 2 );\n add_filter( 'wpak_export_custom_files', array( __CLASS__, 'wpak_export_custom_files' ), 10, 3 );\n add_action( 'plugins_loaded', array( __CLASS__, 'plugins_loaded' ) );\n add_filter( 'wpak_licenses', array( __CLASS__, 'add_license' ) );\n }", "public function testListExternalAdmissionHookConfiguration()\n {\n }", "function call_hook($hook,$data=array()) {\n global $SC; \n \n $qual_hook = '$SC->hooks';\n \n $hook = (array) $hook;\n \n foreach ($hook as $level) {\n $qual_hook .= \"['$level']\";\n } \n \n if (eval(\"return isset($qual_hook);\")) { \n eval(\"\n if (count($qual_hook)) {\n foreach ($qual_hook as \\$hook) {\n call_user_func_array(\\$hook,\\$data);\n } \n }\n \");\n } \n }", "private function init_hooks() {\n\t\t\tadd_action( 'plugins_loaded', array( $this, 'init' ), 0 );\n\t\t\t//add_action( 'init', array( $this, 'wd_spec_seek_enqueue_scripts') );\n\t\t}", "protected function LoadBackendCode()\n {\n require_once Path::Combine(__DIR__, 'Globals/AddHooks.php');\n }", "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'cache-enabler/cache-enabler.php' );\n\t}", "private function init_hooks() {\n\t\t\tregister_activation_hook( BDPP_FILE, array( 'BDPP_Install', 'install' ) );\n\t\t\tadd_action( 'after_setup_theme', array( $this, 'bdpp_setup_environment' ) );\n\t\t\tadd_action( 'init', array( $this, 'bdpp_init_processes' ) );\n\t\t}", "function initHooks()\n {\n $temp = new GootenWCHookScriptInclusion($this);\n $temp->initHooks();\n $temp = new GootenWCHookSettingsPageWP($this);\n $temp->initHooks();\n $temp = new GootenWCHookWC($this);\n $temp->initHooks();\n }", "public function hooks() {\n\t\t\tlog_workload_event('Event hooks configuration successfull');\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'EVENT_MENU_MAIN' => 'menu_main_callback',\n\t\t\t);\n\t\t}", "public function testLoadInvalid()\n {\n $this->loader->load('hai');\n }", "function init(){\n $this->registerHooks();\n }", "function is_hook_valid($hook)\n{\n global $g16_hooks_array;\n\n $valid = false;\n\n // If the hook is registered, it's valid\n for($i = 0; $i < count($g16_hooks_array); $i++)\n {\n if($g16_hooks_array[$i][\"hook_id\"] == $hook)\n $valid = true;\n }\n\n return $valid;\n}", "public function testGetLoader()\n {\n // Remove the following lines when you implement this test.\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\t}", "public function init_hooks() {\n add_action( 'plugins_loaded', array( $this, 'load_translation' ) );\n }", "private function attach_hooks_and_filters() {}", "public function testOnLoad()\n {\n\t \t// set configuration to a custom source class defined below\n\t \t$this->setConfig('plugin.php.source', 'test');\n \t\n $this->plugin->onLoad(); \n }", "public function testCreateExternalAdmissionHookConfiguration()\n {\n }", "protected function assertFileContainsHook( $hook ) {\n\n\t\t$this->assertEntityContains( $this->export_data, 'hooks', $hook );\n\t}", "protected function hooks() {\r\n\t\tregister_activation_hook( __FILE__, array( $this, 'register_activation' ) );\r\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'register_deactivation' ) );\r\n\t}", "function before() {}", "public function init()\n\t{\n\t\tif ( ! $this->config() )\n\t\t{\n\t\t\tdo_action( 'go_slog', 'go-marketo', 'Trying to register hooks without a valid config file.', array( 'user' => get_current_user_id() ) );\n\t\t}\n\n\t\tif ( is_admin() )\n\t\t{\n\t\t\t$this->admin();\n\t\t}\n\t}", "public function hooks() {\n\t\tadd_action( 'init', array( $this, 'load_classes' ) );\n\t\tadd_filter( 'woocommerce_payment_gateways', array( $this, 'add_square_checkout_gateway' ) );\n\t\tadd_action( 'template_redirect', array( $this, 'redirect_woo_to_square' ) );\n\t\tadd_action( 'template_redirect', array( $this, 'verify_transaction_from_square' ) );\n\t}", "function hooks( ) {\r\n\t\t$t_hooks = array(\r\n\t\t//\t'EVENT_MENU_MAIN' => 'print_menu_trace',\r\n\t\t\t'EVENT_MENU_MAIN' => 'print_menu_lel',\r\n\t\t\t'EVENT_LAYOUT_RESOURCES' => 'include_js',\r\n\t\t);\r\n\t\treturn array_merge( parent::hooks(), $t_hooks );\r\n\t}", "public function testInstalled() {\n $this->assertTrue(\\Drupal::state()->get('cache_flush_test'));\n }", "public function testPluginLoad()\n {\n $container = $this->getMockBuilder('mako\\syringe\\Container')->disableOriginalConstructor()->getMock();\n $smarty = $this->getMockBuilder('Smarty')->disableOriginalConstructor()->getMock();\n $smarty->expects($this->exactly(5))\n ->method('registerPlugin')\n ->with(\n $this->anything(),\n $this->anything(),\n $this->callback('is_callable')\n );\n\n $instance = new PluginLoader(new ParameterResolver($container));\n $dirs = [dirname(__DIR__).'/resources/plugins'];\n $instance->loadPlugins($dirs, $smarty);\n }", "public function loadInit() {}", "function testCompiler() {\n\t//echo \"Compiler hook!\";\n}", "function testCompiler() {\n\t//echo \"Compiler hook!\";\n}", "private function hooks() {\n\t\t\t// Register settings\n\t\t\tadd_filter( 'edd_settings_extensions', array( $this, 'settings' ), 1 );\n\n\t\t\t// Handle licensing\n\t\t\tif( class_exists( 'EDD_License' ) ) {\n\t\t\t\t$license = new EDD_License( __FILE__, 'Send Cart', EDD_SEND_CART_VER, 'Chris Klosowski' );\n\t\t\t}\n\t\t}", "protected function runHooks($hook, array $params = array()) {\r\n foreach ($this->loader->getHooks(@$this->state->variables->className, $hook, $this) as $handler => $library) {\r\n call_user_func_array(array($library, $handler), $params);\r\n }\r\n }", "public static function hooks(): void {\n\t\tadd_filter( 'should_load_separate_core_block_assets', '__return_true' );\n\n\t\t// Public.\n\t\tadd_action( 'wp_enqueue_scripts', [ static::class, 'register_public' ], static::$register_priority );\n\t\tadd_action( 'admin_init', [ static::class, 'register_public' ], static::$register_priority );\n\t\tadd_action( 'wp_enqueue_scripts', [ static::class, 'enqueue_public' ], static::$enqueue_priority );\n\n\t\t// Admin.\n\t\tadd_action( 'admin_enqueue_scripts', [ static::class, 'register_admin' ], static::$register_priority );\n\t\tadd_action( 'admin_enqueue_scripts', [ static::class, 'enqueue_admin' ], static::$enqueue_priority );\n\n\t\t// Block editor.\n\t\tadd_action( 'enqueue_block_editor_assets', [ static::class, 'load_block_editor_assets' ], static::$block_editor_priority );\n\t}", "public function testLoad() {\n\n $obj = new WBWSyntaxHighlighterExtension();\n\n $this->assertNull($obj->load($this->configs, $this->containerBuilder));\n\n // Providers\n $this->assertInstanceOf(SyntaxHighlighterStringsProvider::class, $this->containerBuilder->get(SyntaxHighlighterStringsProvider::SERVICE_NAME));\n\n // Twig extensions\n $this->assertInstanceOf(SyntaxHighlighterTwigExtension::class, $this->containerBuilder->get(SyntaxHighlighterTwigExtension::SERVICE_NAME));\n }", "public function HookEvents() {\n //Begin adding your own custom hook and functions here.\n }", "public function hookInitialize()\n {\n // NeatlineFeatures_Functions::flog('/tmp/nlfeatures.log', \"(hook) initialize\");\n add_translation_source(dirname(__FILE__) . '/languages');\n }" ]
[ "0.78468126", "0.703312", "0.70121795", "0.6950879", "0.69443756", "0.6885499", "0.6883459", "0.67772675", "0.67158884", "0.66980726", "0.6658196", "0.66338634", "0.6621981", "0.66215897", "0.6619392", "0.6612279", "0.65391403", "0.6534878", "0.6496819", "0.6474822", "0.6461436", "0.64546824", "0.64539355", "0.6402353", "0.6364474", "0.63596565", "0.6339642", "0.62813425", "0.62699306", "0.62479466", "0.62476474", "0.62402004", "0.62090474", "0.6200686", "0.61953026", "0.61890095", "0.6179456", "0.616661", "0.6161039", "0.61597955", "0.6159748", "0.6159629", "0.6155257", "0.6153342", "0.6142632", "0.6139819", "0.61084014", "0.61046684", "0.60896343", "0.6053917", "0.6039782", "0.6030994", "0.60302156", "0.6027653", "0.6012154", "0.59995496", "0.59974676", "0.5967509", "0.5965605", "0.5962577", "0.59516746", "0.59501743", "0.5945956", "0.5943626", "0.59430104", "0.5940481", "0.5932344", "0.5930444", "0.5924764", "0.5922815", "0.58943135", "0.58886653", "0.58876026", "0.5887408", "0.5885637", "0.5881348", "0.58758545", "0.58661157", "0.58617204", "0.5858163", "0.5850212", "0.5830066", "0.5816218", "0.5812115", "0.5802866", "0.5792389", "0.57893395", "0.5786394", "0.57750607", "0.57736886", "0.5771606", "0.5763148", "0.5763135", "0.5763135", "0.5754627", "0.575006", "0.57461935", "0.5745488", "0.5736503", "0.5731255" ]
0.71710646
1
Test loading of tree parser
Тест загрузки парсера дерева
public function testLoadTreeParser() { $treeParser = $this->discuss->loadTreeParser(); $this->assertInstanceOf('disTreeParser',$treeParser); $this->assertInstanceOf('disTreeParser',$this->discuss->treeParser); $this->discuss->treeParser = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadTreeData() {}", "public function testParseNested()\n {\n $this->assertNotNull(\n self::$compiler->parse(file_get_contents('tests/input/netscape_nested.htm'))\n );\n }", "public function testLoad()\n {\n $validPath = sprintf('%sfiles/valid.xml', $this->path);\n $this->assertInstanceOf('Melindrea\\Exalted\\Character', Loader::load(new XMLLoader($validPath)));\n }", "public function testParseExample1()\n {\n $this->parseFile(__DIR__ . '/../Fixtures/cnd/example1.cnd');\n }", "public function testLoad()\n {\n $result = $this->testDump();\n $suite = $this->loader->load($result);\n $this->assertEquals(\n $this->getSuite(),\n $suite\n );\n }", "public function testLoad() {\n\t\t\t//but PHP's reflection API returns $... for one of the parameter names of fscanf and it jacks\n\t\t\t//up PHPUnit's mock object generator\n\t\t\t//@see http://www.phpunit.de/ticket/1046\n\t\t\t$file = $this->getMock('SplTempFileObject', array('fgets'));\n\t\t\t$trackParser = $this->getMock('Tmont\\Midi\\Parsing\\TrackParser', array('setFile'), array(), '', false);\n\t\t\t\n\t\t\t//called by afterLoad()\n\t\t\t$trackParser->expects($this->once())\n\t\t\t ->method('setFile')\n\t\t\t ->with($file);\n\t\t\t\n\t\t\t$this->obj = new FileParser($trackParser);\n\t\t\t$this->obj->load($file);\n\t\t}", "protected function _parseTree() {\n\t\tforeach($this->tree as $module=>$controllers) {\n\t\t\tforeach($controllers as $controller=>$entries) {\n\t\t\t\tforeach($entries as $entrie_name=>$entrie) {\t\t\t\t\t\n\t\t\t\t\tif(is_array($entrie)) {\n\t\t\t\t\t\t$this->_parseEntrie(APPLICATION_PATH.'/modules/'.$module.'/views/scripts/'.$controller.'/'.$entrie_name);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_parseFile(APPLICATION_PATH.'/modules/'.$module.'/views/scripts/'.$controller.'/'.$entrie,$module,$controller);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function testparse(){\n $this->pwd->setFile($this->exp_file);\n $r = $this->pwd->load();\n\n $this->assertTrue($r);\n $this->assertEquals($GLOBALS['user'], $this->pwd->_users);\n }", "function testparse(){\n $this->pwd->setFile($this->exp_file);\n $r = $this->pwd->load();\n\n $this->assertTrue($r);\n $this->assertEquals($GLOBALS['user'], $this->pwd->_users);\n }", "public function testCreateANewParser(UnitTester $I)\n {\n $I->wantTo('create Parser');\n\n $I->canCreate('Extensions\\Parser');\n }", "function run_parse_tests($dir){\n\t#echo \"parse\\n\";\n\t#echo $GLOBALS['recursive_test'].\"\\n\";\n\t#echo $dir.\"\\n\";\n\tif (substr($dir,-1)!=\"/\") {\n\t\t$dir.=\"/\";\n\t}\n\tif ($GLOBALS['recursive_test']){\n\t\t#echo \"rec\";\n\n\t\t$files=recursion_function($dir.\"*.src\");\n\t\t#var_dump($files);\n\t\tforeach ($files as $src_file) {\n\t\t\t#echo \"som tu\\n\";\n\t\t\t\n\t\t\ttest_parse_in_globe($src_file);\n\t\t\t\n\t\t}\n\t}else{\n\t\t#echo \"non\\n\";\n\t\tforeach (glob($dir.\"*.src\") as $src_file) {\n\t\t\t#echo \"som tu\\n\";\n\t\t\ttest_parse_in_globe($src_file);\n\t\t\t\n\t\t}\n\t}\n}", "public function initializeTreeData() {}", "public function initializeTreeData() {}", "public function testLoad()\n\t{\n\t}", "public function testGetNodesTree(): void\n {\n $structures = $this->prepareGetTreeTestData();\n $structure = $structures[0];\n\n $result = $this->nodeRepository->getNodesTree($structure->getUuid(), 'sulu_io', 'en', false, false);\n $this->assertEquals(2, \\count($result['_embedded']['pages']));\n $this->assertEquals('Testtitle', $result['_embedded']['pages'][0]['title']);\n $this->assertEquals('/testtitle', $result['_embedded']['pages'][0]['path']);\n $this->assertTrue($result['_embedded']['pages'][0]['hasSub']);\n }", "public function loadparser($data){\n\t\t$this->hakakses = $this->gethakakses();\n\t\tif ($this->hakakses=='admin') {\n\t\t\t$this->parser->parse('admin/v-index-admin', $data);\n\t\t}else{\n\t\t\techo \"forbidden access\"; \t\t\n\t\t}\n\t}", "public function loadparser($data){\n\t\t$this->hakakses = $this->gethakakses();\n\t\tif ($this->hakakses=='admin') {\n\t\t\t$this->parser->parse('admin/v-index-admin', $data);\n\t\t}else{\n\t\t\techo \"forbidden access\"; \t\t\n\t\t}\n\t}", "public function testGetNodesInPath()\n {\n\n }", "public function testLoading(): void\n {\n $menuConfiguration = self::loadConfiguration();\n\n $this->assertEquals('Second Item Label', $menuConfiguration['main']['tree']['second_item']['label']);\n $this->assertEquals('First Item Label', $menuConfiguration['main']['tree']['first_item']['label']);\n $this->assertCount(1, $menuConfiguration['main']['tree']['second_item']['children']);\n }", "public function testDefaultFolderTreesRead()\n {\n }", "public function testParse_parsesPretext()\n\t{\n\t\t$tokens = [\n\t\t\tnew Token\\Text('foo'),\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Group\\Close()\t\n\t\t];\n\t\n\t\t$parser = new Parser();\n\t\t$root = $parser->parse($tokens);\n\t\t\n\t\t$this->assertEquals(new Element\\Group(), $root);\n\t\t\n\t\treturn;\n\t}", "public function testParseBasic()\n {\n $this->assertNotNull(\n self::$compiler->parse(file_get_contents('tests/input/netscape_basic.htm'))\n );\n }", "public abstract function run(array $parseTree);", "public function testReadNode()\n {\n }", "public function testLoadInvalid()\n {\n $this->loader->load('hai');\n }", "protected function setUp()\n {\n parent::setUp();\n\n $data = [\n 'test.test1' => 'bingo',\n 'test.test2.test3' => 'wow'\n ];\n\n $this->tree = new Tree($data);\n }", "public function testGetLoader()\n {\n // Remove the following lines when you implement this test.\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "function setUpTree() {\n\n $this->tree = new Mock\\Collection('root', [\n 'file1' => 'foo',\n new Mock\\Collection('dir', []),\n new Mock\\StreamingFile('streaming', 'stream')\n ]);\n\n }", "public function testLoadXMLFromString ()\n {\n $xml = $this->_cbXMLHandler->loadXMLFromString(\n '<?xml version=\"1.0\" encoding=\"utf-8\"?><codebrowser></codebrowser>'\n );\n $this->assertEquals($xml, simplexml_load_file(PHPCB_TEST_DIR . '/basic.xml'));\n }", "public function testParse()\n {\n $methods = ['checkFormat', 'parsePalmDb', 'parsePalmDoc', 'parseMobiHeader', 'parseExth'];\n $reader = $this->getMockReader($methods);\n foreach ($methods as $method) {\n $reader->expects($this->once())\n ->method($method);\n }\n $this->runProtectedMethod($reader, 'parse');\n }", "public function Load($tree)\n\t{\n\t\tif (!$tree)\n\t\t\treturn;\n\n\t\t$contents = array();\n\n\t\t$treePath = $tree->GetPath();\n\n\t\t$args = array();\n\t\t$args[] = '--full-name';\n\t\tif ($this->exe->CanShowSizeInTree())\n\t\t\t$args[] = '-l';\n\t\t$args[] = '-t';\n\t\t$args[] = escapeshellarg($tree->GetHash());\n\t\t\n\t\t$lines = explode(\"\\n\", $this->exe->Execute($tree->GetProject()->GetPath(), GIT_LS_TREE, $args));\n\n\t\tforeach ($lines as $line) {\n\t\t\tif (preg_match(\"/^([0-9]+) (.+) ([0-9a-fA-F]{40})(\\s+[0-9]+|\\s+-)?\\t(.+)$/\", $line, $regs)) {\n\t\t\t\tswitch($regs[2]) {\n\t\t\t\t\tcase 'tree':\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['type'] = 'tree';\n\t\t\t\t\t\t$data['hash'] = $regs[3];\n\t\t\t\t\t\t$data['mode'] = $regs[1];\n\n\t\t\t\t\t\t$path = $regs[5];\n\t\t\t\t\t\tif (!empty($treePath))\n\t\t\t\t\t\t\t$path = $treePath . '/' . $path;\n\t\t\t\t\t\t$data['path'] = $path;\n\n\t\t\t\t\t\t$contents[] = $data;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blob':\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['type'] = 'blob';\n\t\t\t\t\t\t$data['hash'] = $regs[3];\n\t\t\t\t\t\t$data['mode'] = $regs[1];\n\n\t\t\t\t\t\t$path = $regs[5];\n\t\t\t\t\t\tif (!empty($treePath))\n\t\t\t\t\t\t\t$path = $treePath . '/' . $path;\n\t\t\t\t\t\t$data['path'] = $path;\n\n\t\t\t\t\t\t$size = trim($regs[4]);\n\t\t\t\t\t\tif (!empty($size))\n\t\t\t\t\t\t\t$data['size'] = $size;\n\n\t\t\t\t\t\t$contents[] = $data;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $contents;\n\t}", "abstract public function parse($parser);", "function setUpTree() {\n\n $this->tree = new Mock\\Collection('root', [\n 'file1' => 'content1',\n 'file2' => 'content2',\n ]);\n\n }", "public function testLoad(){\n\n $this->_layout->load();\n $xml = $this->_layout->getXmlString();\n $this->assertXmlStringEqualsXmlString('<layouts/>', $xml);\n }", "abstract public static function getParser();", "public function testLoadFileSuccess()\n {\n $this->expectOutputString('123');\n $this->createInstance()->loadFile($this->addRootDir('example/8-my-other-module/1-file.php'));\n }", "public function testLoad() {\n if (!class_exists('Titon\\Io\\Reader\\PhpReader')) {\n $this->markTestSkipped('Test skipped; Please install titon/io via Composer');\n }\n\n $reader = new PhpReader(TEMP_DIR . '/config.php');\n\n Config::load('Php', $reader);\n $this->assertArrayHasKey('Php', Config::all());\n\n $data = Config::get('Php');\n $this->assertEquals($data, $this->test);\n }", "abstract public function getParser();", "function onLoad() {\n\t\t\tparent::onLoad();\n\n\t\t\t$this->rootNode = $this->_getNode( $this->path );\n\t\t}", "public function testConstruct()\n {\n $this->assertEquals(\n $this->testDir,\n $this->parser->dir,\n 'Newly created parser\\'s ::$dir must include trailing dir separator.'\n );\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testHierarchy()\n {\n $classInfo = $this->teleflector->getClassInfo(__DIR__ . '/teleflector/Class3.php');\n $this->assertCount(4, $classInfo);\n $this->assertCount(3, $classInfo['methods']);\n $this->assertEquals('\\PhpBench\\Tests\\Unit\\Benchmark\\teleflector\\Class3', $classInfo['class']);\n $this->assertContains('foobar', $classInfo['methods']['two']['comment']);\n }", "public function testUltimateFetchTrees() {\r\n\t\t$hd3 = new HD3();\r\n\t\t$hd3->setUseLocal(true);\r\n\t\t$hd3->setUseProxy(false);\r\n\t\t$hd3->setTimeout(120);\r\n\t\t$dir = \"/tmp\";\r\n\t\t$hd3->setFilesDir($dir);\r\n\t\t\r\n\t\t$reply = $hd3->siteFetchTrees();\r\n\t\t$this->assertEquals($reply, true);\r\n\t\t$this->assertFileExists($dir . DS . 'hd3trees.json');\r\n\t\t$this->assertFileExists($dir . DS . 'hd34cache'. DS . 'user-agent0.json');\r\n\t\t$this->assertFileExists($dir . DS . 'hd34cache'. DS . 'user-agent1.json');\r\n\t\t$this->assertFileExists($dir . DS . 'hd34cache'. DS . 'user-agentplatform.json');\r\n\t\t$this->assertFileExists($dir . DS . 'hd34cache'. DS . 'user-agentbrowser.json');\r\n\t\t$this->assertFileExists($dir . DS . 'hd34cache'. DS . 'profile0.json');\r\n\t\t$this->_rmDirFiles($dir . DS . 'hd34cache');\r\n\t\tunlink($dir . DS . 'hd3trees.json');\r\n\t}", "public function testParse_parsesText()\n\t{\n\t\t$tokens = [\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Text('foo'),\n\t\t\tnew Token\\Group\\Close()\n\t\t];\n\t\t\n\t\t// parse the tokens\n\t\t$parser = new Parser();\n\t\t$root = $parser->parse($tokens);\n\t\t\n\t\t// create group and text elements\n\t\t$group = new Element\\Group();\n\t\t$text = new ELement\\Text('foo');\n\t\t\n\t\t// set parent-child and child-parent relationships\n\t\t$text->setParent($group);\n\t\t$group->appendChild($text);\n\t\t\n\t\t$this->assertEquals($group, $root);\n\t\t\n\t\treturn;\n\t}", "public function testParser()\n {\n putenv('RELEASE_STABILITY=any');\n\n $parser = Parser::getInstance('jetpack');\n $generator = Generator::getInstance('atom', $parser);\n\n $this->assertInstanceOf('\\WordPressPluginFeed\\Parsers\\Parser', $generator->getParser());\n }", "public function testParse_parsesDocumentSmall()\n\t{\n\t\t$tokens = [\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Control\\Word('rtf', 1),\n\t\t\tnew Token\\Control\\Word('ansi'),\n\t\t\tnew Token\\Control\\Word('deff', 0),\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Control\\Word('fonttbl'),\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Control\\Word('f', 0),\n\t\t\tnew Token\\Control\\Word('fnil'),\n\t\t\tnew Token\\Control\\Word('fcharset', 0),\n\t\t\tnew Token\\Text('Courier New;'),\n\t\t\tnew Token\\Group\\Close(),\n\t\t\tnew Token\\Group\\Close(),\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Control\\Symbol('*'),\n\t\t\tnew Token\\Control\\Word('generator'),\n\t\t\tnew Token\\Text('Msftedit 5.41.15.1516;'),\n\t\t\tnew Token\\Group\\Close(),\n\t\t\tnew Token\\Control\\Word('viewkind', 4),\n\t\t\tnew Token\\Control\\Word('uc', 1),\n\t\t\tnew Token\\Control\\Word('pard'),\n\t\t\tnew Token\\Control\\Word('lang', 1033),\n\t\t\tnew Token\\Control\\Word('f', 0),\n\t\t\tnew Token\\Control\\Word('fs', 20),\n\t\t\tnew Token\\Text('My dog is not like other dogs.'),\n\t\t\tnew Token\\Control\\Word('par'),\n\t\t\tnew Token\\Text('He doesn\\'t care to walk, '),\n\t\t\tnew Token\\Control\\Word('par'),\n\t\t\tnew Token\\Text('He doesn\\'t bark, he doesn\\'t howl.'),\n\t\t\tnew Token\\Control\\Word('par'),\n\t\t\tnew Token\\Text('He goes \"Tick, tock. Tick, tock.\"'),\n\t\t\tnew Token\\Control\\Word('par'),\n\t\t\tnew Token\\Group\\Close()\n\t\t];\n\t\t\n\t\t$parser = new Parser();\n\t\t$root = $parser->parse($tokens);\n\t\t\n\t\t// create the expected elements in order...\n\t\t\n\t\t$groupA = new Element\\Group();\n\t\t\n\t\t$a_1 = new Element\\Control\\Word\\Word();\n\t\t$a_1->setWord('rtf');\n\t\t$a_1->setParameter(1); \n\t\t$a_1->setParent($groupA);\n\t\t\n\t\t$a_2 = new Element\\Control\\Word\\Word();\n\t\t$a_2->setWord('ansi');\n\t\t$a_2->setParent($groupA);\n\t\t\n\t\t$a_3 = new Element\\Control\\Word\\Word();\n\t\t$a_3->setWord('deff');\n\t\t$a_3->setParameter(0); \n\t\t$a_3->setParent($groupA);\n\t\t\n\t\t$groupB = new Element\\Group();\n\t\t$groupB->setParent($groupA);\n\t\t\n\t\t$b_1 = new Element\\Control\\Word\\Word();\n\t\t$b_1->setWord('fonttbl');\n\t\t$b_1->setParent($groupB);\n\t\t\n\t\t$groupC = new Element\\Group();\n\t\t$groupC->setParent($groupB);\n\t\t\n\t\t$c_1 = new Element\\Control\\Word\\Word();\n\t\t$c_1->setWord('f');\n\t\t$c_1->setParameter(0);\n\t\t$c_1->setParent($groupC);\n\t\t\n\t\t$c_2 = new Element\\Control\\Word\\Word();\n\t\t$c_2->setWord('fnil');\n\t\t$c_2->setParent($groupC);\n\t\t\n\t\t$c_3 = new Element\\Control\\Word\\Word();\n\t\t$c_3->setWord('fcharset');\n\t\t$c_3->setParameter(0);\n\t\t$c_3->setParent($groupC);\n\t\t\n\t\t$c_4 = new Element\\Text('Courier New;');\n\t\t$c_4->setParent($groupC);\n\t\t\n\t\t$groupD = new Element\\Group();\n\t\t$groupD->setParent($groupA);\n\t\t\n\t\t$d_1 = new Element\\Control\\Symbol\\Asterisk();\n\t\t$d_1->setParent($groupD);\n\t\t\n\t\t$d_2 = new Element\\Control\\Word\\Word();\n\t\t$d_2->setWord('generator');\n\t\t$d_2->setParent($groupD);\n\t\t\n\t\t$d_3 = new Element\\Text('Msftedit 5.41.15.1516;');\n\t\t$d_3->setParent($groupD);\n\t\t\n\t\t// back to a\n\t\t\n\t\t$a_4 = new Element\\Control\\Word\\Word();\n\t\t$a_4->setWord('viewkind');\n\t\t$a_4->setParameter(4);\n\t\t$a_4->setParent($groupA);\n\t\t\n\t\t$a_5 = new Element\\Control\\Word\\Word();\n\t\t$a_5->setWord('uc');\n\t\t$a_5->setParameter(1);\n\t\t$a_5->setParent($groupA);\n\t\t\n\t\t$a_6 = new Element\\Control\\Word\\Pard();\n\t\t$a_6->setParent($groupA);\n\t\t\n\t\t$a_7 = new Element\\Control\\Word\\Word();\n\t\t$a_7->setWord('lang');\n\t\t$a_7->setParameter(1033);\n\t\t$a_7->setParent($groupA);\n\t\t\n\t\t$a_8 = new Element\\Control\\Word\\Word();\n\t\t$a_8->setWord('f');\n\t\t$a_8->setParameter(0);\n\t\t$a_8->setParent($groupA);\n\t\t\n\t\t$a_9 = new Element\\Control\\Word\\Word();\n\t\t$a_9->setWord('fs');\n\t\t$a_9->setParameter(20);\n\t\t$a_9->setParent($groupA);\n\t\t\n\t\t$a_10 = new Element\\Text('My dog is not like other dogs.');\n\t\t$a_10->setParent($groupA);\n\t\t\n\t\t$a_11 = new Element\\Control\\Word\\Par();\n\t\t$a_11->setParent($groupA);\n\t\t\n\t\t$a_12 = new Element\\Text('He doesn\\'t care to walk, ');\n\t\t$a_12->setParent($groupA);\n\t\t\n\t\t$a_13 = new Element\\Control\\Word\\Par();\n\t\t$a_13->setParent($groupA);\n\t\t\n\t\t$a_14 = new Element\\Text('He doesn\\'t bark, he doesn\\'t howl.');\n\t\t$a_14->setParent($groupA);\n\t\t\n\t\t$a_15 = new Element\\Control\\Word\\Par();\n\t\t$a_15->setParent($groupA);\n\t\t\n\t\t$a_16 = new Element\\Text('He goes \"Tick, tock. Tick, tock.\"');\n\t\t$a_16->setParent($groupA);\n\t\t\n\t\t$a_17 = new Element\\Control\\Word\\Par();\n\t\t$a_17->setParent($groupA);\n\t\t\n\t\t// now, set the relationships...\n\t\t\n\t\t$groupD\n\t\t\t->appendChild($d_1)\n\t\t\t->appendChild($d_2)\n\t\t\t->appendChild($d_3);\n\t\t\n\t\t$groupC\n\t\t\t->appendChild($c_1)\n\t\t\t->appendChild($c_2)\n\t\t\t->appendChild($c_3)\n\t\t\t->appendChild($c_4);\n\t\t\t\n\t\t$groupB\n\t\t\t->appendChild($b_1)\n\t\t\t->appendChild($groupC);\n\t\t\n\t\t$groupA\n\t\t\t->appendChild($a_1)\n\t\t\t->appendChild($a_2)\n\t\t\t->appendChild($a_3)\n\t\t\t->appendChild($groupB)\n\t\t\t->appendChild($groupD)\n\t\t\t->appendChild($a_4)\n\t\t\t->appendChild($a_5)\n\t\t\t->appendChild($a_6)\n\t\t\t->appendChild($a_7)\n\t\t\t->appendChild($a_8)\n\t\t\t->appendChild($a_9)\n\t\t\t->appendChild($a_10)\n\t\t\t->appendChild($a_11)\n\t\t\t->appendChild($a_12)\n\t\t\t->appendChild($a_13)\n\t\t\t->appendChild($a_14)\n\t\t\t->appendChild($a_15)\n\t\t\t->appendChild($a_16)\n\t\t\t->appendChild($a_17);\n\t\t\n\t\t// phew! \n\t\t$this->assertEquals($groupA, $root);\n\t\t\n\t\treturn;\n\t}", "public function setUp() : void\n {\n $this->parser = $this->getParsedown();\n }", "public function testDefaultFolderTreesSearch()\n {\n }", "public function testParse()\n {\n $source = array();\n $source[] = 'foo';\n $source[] = \"\";\n $source[] = \"* foo\";\n $source[] = \"* bar\";\n $source[] = \"* baz\";\n $source[] = \"\";\n $source[] = \"bar\";\n $source[] = \"\";\n $source[] = \"1. dib\";\n $source[] = \"2. zim\";\n $source[] = \"3. gir\";\n $source[] = \"\";\n $source[] = \"baz\";\n $source = implode(\"\\n\", $source). \"\\n\\n\";\n \n $expect = array();\n $expect[] = 'foo';\n $expect[] = \"\";\n $expect[] = $this->_token;\n $expect[] = \"\";\n $expect[] = 'bar';\n $expect[] = \"\";\n $expect[] = $this->_token;\n $expect[] = \"\";\n $expect[] = 'baz';\n $expect = implode(\"\\n\", $expect);\n \n $actual = $this->_plugin->parse($source);\n $this->assertRegex($actual, \"@$expect@\");\n }", "public function testLoadDir()\n {\n $dir = __DIR__ . '/resources/definition';\n\n $sut = new DirStrategy();\n $this->assertTrue($sut->supports($dir));\n\n $this->assertEquals(\n [\n file_get_contents($dir.'/test1.json'),\n file_get_contents($dir.'/test2.json'),\n ],\n $sut->load($dir)\n );\n }", "public function testParse()\n {\n $actual = $this->_plugin->parse($this->_source);\n $expect = \"foo bar\\n\\n$this->_token\\n\\nbaz dib\";\n $this->assertRegex($actual, \"@$expect@\");\n }", "public function initTagSelfParse(){\n\t\t$tagPath = dirname(__FILE__) . '/tags/';\n\t\t$tagDir = @opendir($tagPath);\n\t\t$suffix = '.php';\n\t\twhile(($fileName = readdir($tagDir))){\n\t\t\tif(String::endWith($fileName, $suffix)){\n\t\t\t\tinclude_once($tagPath . $fileName);\n\t\t\t}\n\t\t}\n\t\t//load the tag map\n\t\t$this->tagSelfParses = include(dirname(__FILE__) . '/tagmap.php');\n\t}", "public static function init() {\n\t\tself::testNode();\n\t\tself::testStructure();\n\t}", "public function testLoad() {\n\n $obj = new WBWSyntaxHighlighterExtension();\n\n $this->assertNull($obj->load($this->configs, $this->containerBuilder));\n\n // Providers\n $this->assertInstanceOf(SyntaxHighlighterStringsProvider::class, $this->containerBuilder->get(SyntaxHighlighterStringsProvider::SERVICE_NAME));\n\n // Twig extensions\n $this->assertInstanceOf(SyntaxHighlighterTwigExtension::class, $this->containerBuilder->get(SyntaxHighlighterTwigExtension::SERVICE_NAME));\n }", "public function data_tree();", "public function testParserSupport()\n {\n $result = [$this->createMock(ObjectMetadataInterface::class)];\n\n $parser = $this->createMock(MetadataFormatParserInterface::class);\n $parser->expects($this->once())\n ->method('support')\n ->willReturn(true);\n $parser->expects($this->once())\n ->method('parse')\n ->with($this->equalTo('test'))\n ->willReturn($result);\n\n\n $instance = new MetadataLoader([$parser]);\n\n $instance->load('test');\n\n $reflex = new \\ReflectionProperty(\n AbstractMetadataLoader::class,\n 'metadata'\n );\n $reflex->setAccessible(true);\n\n $this->assertEquals($result, $reflex->getValue($instance));\n $this->assertEquals($result, $instance->getMetadata());\n }", "public function testParserConstructionAndProperties()\n {\n\n $parser = new Parser($this->media);\n\n $this->assertEquals(1, $parser->id);\n $this->assertEquals('testGroup', $parser->group);\n $this->assertEquals('testPosition', $parser->position);\n $this->assertEquals('Test Description', $parser->description);\n }", "public function testMultiLanguageInheritance()\n\t{\n\t\t$input = '<html lang=\"en\"> <div class=\"h-entry\">This test is in English.</div> <div class=\"h-entry\" lang=\"es\">Esta prueba está en español.</div> </html>';\n\t\t$parser = new Parser($input);\n\t\t$parser->lang = true;\n\t\t$result = $parser->parse();\n\n\t\t$this->assertArrayHasKey('lang', $result['items'][0]);\n\t\t$this->assertArrayHasKey('lang', $result['items'][1]);\n\t\t$this->assertEquals('en', $result['items'][0]['lang']);\n\t\t$this->assertEquals('es', $result['items'][1]['lang']);\n\t}", "public function testGetNode()\n {\n\n }", "function _parseTree()\n {\n /* could replace \\d* -> 0 */\n foreach ($this->_GedcomTree as $element) {\n if (@preg_match('/0 @I\\d*@ INDI/US', $element[0])) {\n $this->_GedcomIndividualsTree[] = $element;\n }\n if (@preg_match('/0 @F\\d*@ FAM/US', $element[0])) {\n $this->_GedcomFamiliesTree[] = $element;\n }\n if (@preg_match('/0 @O\\d*@ OBJE/US', $element[0])) {\n $this->_GedcomObjectsTree[] = $element;\n }\n }\n }", "public function testAddGetPathsToLoad()\n {\n $paths = $this->getPathsToLoad();\n $loader = $this->createInstance($paths);\n \n $this->assertEquals($paths, $loader->getPathsToLoad(), 'Loader did not register given paths');\n }", "function checkTree()\n\t{\n\t\t$this->content_object->checkTree();\n\t}", "public function testReturnsUrlForLoadingTree()\n {\n $block = $this->getBlockMock('news/adminhtml_post_edit_tab_category', ['getUrl']);\n\n $block->expects($this->once())\n ->method('getUrl')\n ->with($this->equalTo('*/*/categoriesJson'), $this->equalTo(['_current' => true]))\n ->will($this->returnValue('foo/bar/categoriesJson'));\n\n $this->assertEquals('foo/bar/categoriesJson', $block->getLoadTreeUrl());\n }", "public function testNoParserSupport()\n {\n $this->expectException(UnsupportedMetadataException::class);\n $this->expectExceptionMessage('No parser found for metadata');\n\n $parser = $this->createMock(MetadataFormatParserInterface::class);\n $parser->expects($this->once())\n ->method('support')\n ->willReturn(false);\n\n\n $instance = new MetadataLoader([$parser]);\n\n $instance->load('test');\n }", "public function getParser();", "public function getParser();", "public function testParseString(){\n\t }", "function load($text,array $syms=NULL) {\n\t\tif ($syms)\n\t\t\t$this->syms=$syms;\n\t\t// Remove PHP code and alternative exclude-tokens\n\t\t$text=preg_replace(\n\t\t\t'/<\\?(?:php)?.+?\\?>|{{\\*.+?\\*}}/is','',$text);\n\t\t// Define root node\n\t\t$node=&$this->tree;\n\t\t// Define stack and depth variables\n\t\t$stack=array();\n\t\t$depth=0;\n\t\t// Define string parser variables\n\t\t$len=strlen($text);\n\t\t$ptr=0;\n\t\t$temp='';\n\t\twhile ($ptr<$len)\n\t\t\tif (preg_match('/^<(\\/?)'.\n\t\t\t\t'(?:F3:)?(include|exclude|loop|repeat|check|true|false)\\b'.\n\t\t\t\t'((?:\\s+\\w+s*=\\s*(?:\"(?:.+?)\"|\\'(?:.+?)\\'))*)\\s*(\\/?)>/is',\n\t\t\t\tsubstr($text,$ptr),$match)) {\n\t\t\t\tif (strlen($temp))\n\t\t\t\t\t$node[]=$temp;\n\t\t\t\t// Element node\n\t\t\t\tif ($match[1]) {\n\t\t\t\t\t// Find matching start tag\n\t\t\t\t\t$save=$depth;\n\t\t\t\t\t$found=FALSE;\n\t\t\t\t\twhile ($depth>0) {\n\t\t\t\t\t\t$depth--;\n\t\t\t\t\t\tforeach ($stack[$depth] as $item)\n\t\t\t\t\t\t\tif (is_array($item) && isset($item[$match[2]])) {\n\t\t\t\t\t\t\t\t// Start tag found\n\t\t\t\t\t\t\t\t$found=TRUE;\n\t\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!$found)\n\t\t\t\t\t\t// Unbalanced tag\n\t\t\t\t\t\t$depth=$save;\n\t\t\t\t\t$node=&$stack[$depth];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Start tag\n\t\t\t\t\t$stack[$depth]=&$node;\n\t\t\t\t\t$node=&$node[][$match[2]];\n\t\t\t\t\tif ($match[3]) {\n\t\t\t\t\t\t// Process attributes\n\t\t\t\t\t\tpreg_match_all('/\\s+(\\w+)\\s*=\\s*'.\n\t\t\t\t\t\t\t'(?:\"(.+?)\"|\\'(.+?)\\')/s',$match[3],$attr,\n\t\t\t\t\t\t\tPREG_SET_ORDER);\n\t\t\t\t\t\tforeach ($attr as $kv)\n\t\t\t\t\t\t\t$node['@attrib'][$kv[1]]=$kv[2]?:$kv[3];\n\t\t\t\t\t}\n\t\t\t\t\tif ($match[4] || $match[1]=='include')\n\t\t\t\t\t\t// Empty tag\n\t\t\t\t\t\t$node=&$stack[$depth];\n\t\t\t\t\telse\n\t\t\t\t\t\t$depth++;\n\t\t\t\t}\n\t\t\t\t$temp='';\n\t\t\t\t$ptr+=strlen($match[0]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Text node\n\t\t\t\t$temp.=$text[$ptr];\n\t\t\t\t$ptr++;\n\t\t\t}\n\t\tif (strlen($temp))\n\t\t\t$node[]=$temp;\n\t\tunset($node);\n\t\tunset($stack);\n\t\treturn $this->build($this->tree);\n\t}", "public function testGetParseContext() {\n\n\t\t$className = self::FIXTURE_NS . '\\ClassWithMultipleUseStatements';\n\t\t$class = new ReflectionClass($className);\n\n\t\t$this->assertEquals($className, $class->getParseContext());\n\t}", "abstract public function parse($path);", "protected function initializeExternalParsers() {}", "function __construct($tree) {\n\t\t$this->tree = $tree;\n\t}", "public function testParse()\n {\n $source = \"\\\\.\\\\{\\\\}\";\n $actual = $this->_plugin->parse($source);\n $expect = $this->_encode . $this->_encode . $this->_encode;\n $this->assertRegex($actual, \"@$expect@\");\n }", "public function testLoader()\n {\n LoaderMock::$log = [];\n $l1 = new LoaderMock('a');\n $l2 = new LoaderMock('b');\n $l3 = new LoaderMock('c');\n /** @noinspection PhpParamsInspection */\n SetterLoader::push($l1);\n Loader::notMerge();\n /** @noinspection PhpParamsInspection */\n SetterLoader::push($l2);\n Loader::getParent();\n Loader::notMerge();\n /** @noinspection PhpParamsInspection */\n SetterLoader::push($l3);\n Loader::getParent(false);\n $this->assertSame($l3, SetterLoader::pop());\n $this->assertSame($l2, SetterLoader::pop());\n Loader::notMerge();\n $this->assertSame($l1, SetterLoader::pop());\n $expected = [\n 'a:notMerge',\n 'b:getParent:1',\n 'b:notMerge',\n 'c:getParent:0',\n 'a:notMerge',\n ];\n $this->assertEquals($expected, LoaderMock::$log);\n }", "public function getTree();", "public function getTree();", "public function testGetConfigTreeBuilder()\n {\n $config = new Configuration('foo');\n $this->assertInstanceOf(TreeBuilder::class, $config->getConfigTreeBuilder());\n }", "public function testLoadDir()\n {\n $this->expectOutputString('345456678789');\n $this->createInstance()->loadDir($this->addRootDir('2-a-module'));\n }", "public function testLoad()\r\n\t{\r\n\t\t$engines = array(\r\n\t\t\t'MyISAM',\r\n\t\t\t'MEMORY',\r\n\t\t\t'InnoDB',\r\n\t\t\t'BerkeleyDB',\r\n\t\t\t'BLACKHOLE',\r\n\t\t\t'EXAMPLE',\r\n\t\t\t'ARCHIVE',\r\n\t\t\t'CSV',\r\n\t\t\t'ndbcluster',\r\n\t\t\t'FEDERATED',\r\n\t\t\t'MRG_MYISAM',\r\n\t\t\t'ISAM'\r\n\t\t);\r\n\r\n\t\tforeach($engines as $engine)\r\n\t\t{\r\n\t\t\t$se = StorageEngine::model()->findAllByAttributes(array(\r\n\t\t\t\t'Engine' => $engine\t\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\tif(count($se) == 0)\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t$se = $se[0];\r\n\t\t\t\r\n\t\t\t$this->assertType('StorageEngine', $se);\r\n\t\t\t$this->assertType('string', $se->Comment);\r\n\t\t\t$this->assertType('string', $se->Support);\r\n\t\t}\r\n\t}", "public function testParse_parsesGroupsNested()\n\t{\n\t\t$tokens = [\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Group\\Open(),\n\t\t\tnew Token\\Group\\Close(),\n\t\t\tnew Token\\Group\\Close(),\n\t\t\tnew Token\\Group\\Close()\n\t\t];\n\t\t\n\t\t// parse the tokens\n\t\t$parser = new Parser();\n\t\t$root = $parser->parse($tokens);\n\t\t\n\t\t// create group and text elements\n\t\t$group1 = new Element\\Group();\n\t\t$group2 = new Element\\Group();\n\t\t$group3 = new Element\\Group();\n\t\t\n\t\t// set parent-child and child-parent relationships\n\t\t$group2->setParent($group1);\n\t\t$group1->appendChild($group2);\n\t\t\n\t\t$group3->setParent($group2);\n\t\t$group2->appendChild($group3);\n\t\t\n\t\t$this->assertEquals($group1, $root);\n\t\t\n\t\treturn;\n\t}", "protected function setUp()\n {\n parent::setUp();\n\n // TODO Auto-generated ParserTest::setUp()\n\n $this->Parser = new Parser(/* parameters */);\n }", "abstract public function parse(): Ast\\Node;", "function load() {\n\tglobal $path;\t\n\t$p = new Parser();\n\t$file = file_get_contents(\"{$path}/../Parser/data.json\"); \n\t$json = json_decode($file, true);\n\t$movies = $json['movies'];\n\n\tforeach ($movies as $movie) {\n\t\taddToDb($movie); //parse and insert\n\t}\n}", "function testLoadCorrected() {\n\t\t$hints = new \\Scrivo\\PageDefinitionHints(\n\t\t\tself::$context, self::PAGE_HOME_ID,\n\t\t\t\\Scrivo\\PageDefinitionHints::CHILD_PAGE_DEFINITION_REMAINING);\n\t\t$this->assertEquals(\n\t\t\t1, $hints[self::PAGE_DEFINITION_MENU_ID]->maxNoOfChildren);\n\t\t$this->assertEquals(\n\t\t\t0, $hints[self::PAGE_DEFINITION_FORUM_ID]->maxNoOfChildren);\n\n\t\t$hints = new \\Scrivo\\PageDefinitionHints(\n\t\t\tself::$context, self::PAGE_MENU1_ID,\n\t\t\t\\Scrivo\\PageDefinitionHints::CHILD_PAGE_DEFINITION_REMAINING);\n\t\t$this->assertNull(\n\t\t\t$hints[self::PAGE_DEFINITION_CONTENT_ID]->maxNoOfChildren);\n\t\t$this->assertEquals(\n\t\t\t0, $hints[self::PAGE_DEFINITION_FORUM_ID]->maxNoOfChildren);\n\n\t\t$hints = new \\Scrivo\\PageDefinitionHints(\n\t\t\tself::$context, self::PAGE_MENU2_ID,\n\t\t\t\\Scrivo\\PageDefinitionHints::CHILD_PAGE_DEFINITION_REMAINING);\n\t\t$this->assertNull(\n\t\t\t$hints[self::PAGE_DEFINITION_CONTENT_ID]->maxNoOfChildren);\n\t\t$this->assertEquals(\n\t\t\t1, $hints[self::PAGE_DEFINITION_FORUM_ID]->maxNoOfChildren);\n\t}", "public function testOrgApacheSlingCommonsHtmlInternalTagsoupHtmlParser() {\n\n }", "abstract public function load($file = null, $fixture_type = self::OWN);", "abstract protected function validateParse();", "public function testReadANodeFromTheXmlFile()\n {\n foreach ($this->reader as $path => $node) {\n self::assertEquals(\n '/test',\n $path,\n 'The expected path was not returned.'\n );\n\n self::assertEquals(\n 'test',\n $node->getLocalName(),\n 'The expected node was not read from the file.'\n );\n }\n }", "public function testScan(): void\n {\n $this->assertEquals(\n 3,\n $this->oMap->scan([self::$fixtureGroups['tree']])\n );\n }", "public function testLoadFiles()\n {\n $this->expectOutputString('123234');\n $this->createInstance()->loadFiles($this->addRootDir([\n 'example/8-my-other-module/1-file.php',\n 'example/8-my-other-module/2-file.php'\n ]));\n }", "public static function init() {\n\t\tself::testNode();\n\t\tself::testList();\n\t}", "public function testDefaultFolderTreesDefineNew()\n {\n }", "public function testLoad()\n {\n $context = 'Test loading from decoded file';\n\n $mock = $this->getMockBuilder('ptolemic\\sifter\\Core\\Adapters\\Config\\Json')\n ->setMethods(array('decode'))\n ->getMock();\n\n $mock->method('decode')\n ->with($this->anything())\n ->willReturn($context);\n\n $this->assertEquals($context, $mock->load(__DIR__.'/../../Resources/Sample.json'));\n\n }", "function file_parse()\r\n\t{\r\n\t//aquí el código del método\r\n\t}", "public function testParser()\n\t\t{\n\t\t\t\n\t\t\t$dumpFile = dirname(__FILE__).'/data/urls/parser.dump';\n\t\t\t\n\t\t\t$newStamps = array();\n\t\t\t\n\t\t\tif (is_readable($dumpFile)) {\n\t\t\t\t$stamps = unserialize(file_get_contents($dumpFile));\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($this->urls as $testUrl => $parserClass) {\n\t\t\t\t$dump = \"url: {$testUrl}\\n\";\n\t\t\t\t\n\t\t\t\t$exception = null;\n\t\t\t\t\n\t\t\t\tif (!$parserClass)\n\t\t\t\t\t$parserClass = '\\Onphp\\GenericUri';\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$url = \\Onphp\\ClassUtils::callStaticMethod(\"$parserClass::parse\", $testUrl, true);\n\t\t\t\t} catch (\\Onphp\\WrongArgumentException $e) {\n\t\t\t\t\t$exception = $e;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$fix = $parserClass == '\\Onphp\\HttpUrl';\n\t\t\t\t\n\t\t\t\tif ($fix)\n\t\t\t\t\t$url->ensureAbsolute();\n\t\t\t\t\n\t\t\t\tif ($exception) {\n\t\t\t\t\t$dump .= \"wrong argument exception: {$e->getMessage()}\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tif (!$fix)\n\t\t\t\t\t\t$this->assertEquals($testUrl, $url->toString());\n\t\t\t\t\t\n\t\t\t\t\t$dump .=\n\t\t\t\t\t\t\"class: \".get_class($url).\"\\n\"\n\t\t\t\t\t\t.\"toString(): \".$url->toString().\"\\n\"\n\t\t\t\t\t\t.\"getSchemeSpecificPart(): \".$url->getSchemeSpecificPart().\"\\n\"\n\t\t\t\t\t\t.\"getScheme(): \".$url->getScheme().\"\\n\"\n\t\t\t\t\t\t.\"getUserInfo(): \".$url->getUserInfo().\"\\n\"\n\t\t\t\t\t\t.\"getHost(): \".$url->getHost().\"\\n\"\n\t\t\t\t\t\t.\"getPort(): \".$url->getPort().\"\\n\"\n\t\t\t\t\t\t.\"getPath(): \".$url->getPath().\"\\n\"\n\t\t\t\t\t\t.\"getQuery(): \".$url->getQuery().\"\\n\"\n\t\t\t\t\t\t.\"getFragment(): \".$url->getFragment().\"\\n\"\n\t\t\t\t\t\t.\"isValidScheme(): \".$url->isValidScheme().\"\\n\"\n\t\t\t\t\t\t.\"isValidUserInfo(): \".$url->isValidUserInfo().\"\\n\"\n\t\t\t\t\t\t.\"isValidHost(): \".$url->isValidHost().\"\\n\"\n\t\t\t\t\t\t.\"isValidPort(): \".$url->isValidPort().\"\\n\"\n\t\t\t\t\t\t.\"isValidPath(): \".$url->isValidPath().\"\\n\"\n\t\t\t\t\t\t.\"isValidQuery(): \".$url->isValidQuery().\"\\n\"\n\t\t\t\t\t\t.\"isValidFragment(): \".$url->isValidFragment().\"\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($stamps[$testUrl])) {\n\t\t\t\t\t$this->assertEquals($stamps[$testUrl], $dump);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newStamps[$testUrl] = $dump;\n\t\t\t}\n\t\t\t\n\t\t\tfile_put_contents($dumpFile.'.new', serialize($newStamps));\n\t\t\t\n\t\t\t/*\n\t\t\t$coverage = xdebug_get_code_coverage();\n\t\t\t\n\t\t\t$classContent = explode(\"\\n\", file_get_contents($genericUriClass));\n\t\t\t\n\t\t\tforeach ($coverage[$genericUriClass] as $line => $coveredMark) {\n\t\t\t\t$classContent[$line - 1] = null;\n\t\t\t}\n\t\t\t\n\t\t\tfile_put_contents(\n\t\t\t\tdirname(__FILE__).'/data/urls/GenericUri.class.coverage',\n\t\t\t\timplode(\"\\n\", $classContent)\n\t\t\t);\n\t\t\t*/\n\t\t}", "public function testLoadOnFlatfile() {\n echo \"| test testLoadOnFlatfile \\n\";\n $testObj = new uuuxxxgibtsnicht();\n $this->assertEquals(\"a string\", $testObj->string, \"Could not get public property from testcalss-\");\n\n $result = $this->classcache->getAllKnownClasses();\n $this->assertTrue(array_key_exists(\"uuuxxxgibtsnicht\", $result), 'Testclass not found.');\n unset($testObj);\n }", "abstract public function parse(): bool;", "protected function _parse($dir) {\n\t\t$this->_modules=$this->_scanmodules($dir);\t\t\n\t\tforeach($this->_modules as $module) {\n\t\t\tif($module!=\"maerdo\") {\n\t\t\t\t$this->tree[$module]=$this->_getDirectoryTree(APPLICATION_PATH.'/modules/'.$module.'/views/scripts/');\n\t\t\t}\n\t\t}\t\t\n\t\t$this->_parseTree();\n\t\t$this->_writeFiles();\n\t\treturn true;\n\t}", "protected function setUp()\n\t {\n\t\t$xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\n\t\t$xml .= \"<test><element attribute=\\\"attr\\\">value</element><anotherelement></anotherelement><lastelement>element</lastelement></test>\";\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXML($xml, LIBXML_PARSEHUGE);\n\t\t$this->object = new DOMXPathExtended($dom);\n\t }", "public function should_load()\n {\n }" ]
[ "0.655164", "0.64511824", "0.6348039", "0.62003136", "0.60833335", "0.6007918", "0.596799", "0.5865975", "0.5865975", "0.580139", "0.5782035", "0.57721025", "0.5770423", "0.5762242", "0.57371527", "0.57220465", "0.57220465", "0.5709494", "0.5703111", "0.57030344", "0.5699944", "0.5677782", "0.5671182", "0.55869335", "0.5585407", "0.5577711", "0.5557083", "0.5541408", "0.5534007", "0.55229694", "0.5511164", "0.5499687", "0.54794276", "0.5478608", "0.5475757", "0.546937", "0.54563963", "0.54544467", "0.54513", "0.5440117", "0.5428556", "0.5423488", "0.5423285", "0.54044014", "0.5402836", "0.53971446", "0.53898275", "0.5373262", "0.53726524", "0.53713953", "0.5368685", "0.5358643", "0.5353267", "0.53509325", "0.5342774", "0.53383905", "0.5335761", "0.53280336", "0.5320909", "0.5320408", "0.5316074", "0.5306736", "0.5296493", "0.5294731", "0.5286249", "0.5286249", "0.5281459", "0.5276324", "0.5262091", "0.52583295", "0.52533287", "0.5243622", "0.52272576", "0.52254695", "0.52203774", "0.52203774", "0.5210799", "0.5189019", "0.51887304", "0.516846", "0.5167081", "0.51662743", "0.51618767", "0.5158022", "0.51509696", "0.51460594", "0.51401436", "0.5136825", "0.5136365", "0.5135077", "0.5122903", "0.5122545", "0.5121511", "0.5119574", "0.51115906", "0.5108683", "0.5100681", "0.50969106", "0.50928664", "0.5091769" ]
0.7716059
0
The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. Generated from protobuf field uint64 chan_id = 1;
Уникальный идентификатор канала для канала. Первые 3 байта — это высота блока, следующие 3 — индекс внутри блока, а последние 2 байта — индекс выхода для канала. Сгенерировано из поля protobuf uint64 chan_id = 1;
public function getChanId() { return $this->chan_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getChannelId()\n {\n return self::$channel_id;\n }", "public function getChannelId()\n {\n return $this->channelId;\n }", "public function getChannelId() {\n return $this->channelId;\n }", "public function setChanId($var)\n {\n GPBUtil::checkUint64($var);\n $this->chan_id = $var;\n\n return $this;\n }", "public function setChanId($var)\n {\n GPBUtil::checkUint64($var);\n $this->chan_id = $var;\n\n return $this;\n }", "public function getChannelId();", "public function getChannelId() : int\n {\n return $this->channelId;\n }", "public function getChannelID()\n {\n return $this->channelID;\n }", "public function getId()\n {\n return $this->_libChannelId;\n }", "public function getYouTubeChannelId()\n\t{\n\t\treturn $this->yt_channel_id;\n\t}", "public function getLibChannelId()\n {\n return $this->_libChannelId;\n }", "public function getChanId($type, $id)\n {\n return $type . ':' . $id;\n }", "public function get_channel_id($channel)\n {\n if ( ! isset(self::$_cache['channels'][$channel]))\n {\n $query = $this->db->select('channel_id')\n ->where('channel_name', $channel)\n ->limit(1)\n ->get('channels');\n\n if ($query->num_rows() > 0)\n {\n $row = $query->row();\n self::$_cache['channels'][$channel] = $row->channel_id;\n }\n else\n {\n self::$_cache['channels'][$channel] = FALSE;\n }\n }\n\n return self::$_cache['channels'][$channel];\n }", "public function getPendingChanId()\n {\n return $this->pending_chan_id;\n }", "public function getChannel()\n {\n $value = $this->get(self::channel);\n return $value === null ? (integer)$value : $value;\n }", "public function uniqueId()\n {\n return \"hub-\".$this->bet->user->hub_id;\n }", "protected function _getChannelAssignedId()\n {\n return null;\n }", "public function setChannelID($var)\n {\n GPBUtil::checkMessage($var, \\ChannelIdentifier::class);\n $this->channelID = $var;\n\n return $this;\n }", "public function getSocketChannelName(): string\n {\n return hash_hmac('md5', $this->id, Config::get('SOCKETS_SALT'));\n }", "public function getCommuterId()\n\t{\n\t\treturn $this->commuter_id;\n\t}", "protected function _createChannelId()\n {\n return 'MAGENTO/' . Mage::app()->getStore($this->_storeId)->getName();\n }", "public function getChannel()\n {\n return $this->_aChannel;\n }", "public function getChannelIdentity()\n {\n if (array_key_exists(\"channelIdentity\", $this->_propDict)) {\n if (is_a($this->_propDict[\"channelIdentity\"], \"\\Microsoft\\Graph\\Model\\ChannelIdentity\") || is_null($this->_propDict[\"channelIdentity\"])) {\n return $this->_propDict[\"channelIdentity\"];\n } else {\n $this->_propDict[\"channelIdentity\"] = new ChannelIdentity($this->_propDict[\"channelIdentity\"]);\n return $this->_propDict[\"channelIdentity\"];\n }\n }\n return null;\n }", "public function getChannel()\n {\n return (string)$this->c;\n }", "private function getCommunicationId()\n {\n return uniqid(date(\"Y-m-d-His_\"));\n }", "public function getChannel() {\n return $this->channel;\n }", "public function getId_ch()\n {\n return $this->id_ch;\n }", "public function channel()\n {\n $channel = $this->isNumeric() ? $this->params[1] : $this->params[0];\n if ($channel[0] == '#' or $channel[0] == '&') {\n return $channel;\n } else {\n return null;\n }\n }", "public function getChannelPartnerId()\n {\n return $this->channel_partner_id;\n }", "public function getChannelPartnerId()\n {\n return $this->channel_partner_id;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "abstract public function getChannelKey() : int;", "public function getChannel()\n {\n return $this->Channel;\n }", "public function getChannel()\n {\n $value = $this->get(self::CHANNEL);\n return $value === null ? (string)$value : $value;\n }", "public function ChatID()\n {\n $chat = $this->Chat();\n\n return $chat['id'];\n }", "public function getUniqueId()\r\n {\r\n return $this->getParent()->getUniqueId() . \"_cl\" . $this->getId();\r\n }", "public function getChatId()\n {\n if (array_key_exists(\"chatId\", $this->_propDict)) {\n return $this->_propDict[\"chatId\"];\n } else {\n return null;\n }\n }", "public function getChatId () :string\n {\n if ($this->getUpdateType () == 'edited_message'){\n $chat_id = $this->content ['edited_message']['chat']['id'];\n }\n if ($this->getUpdateType () == 'channel_post'){\n $chat_id = $this->content ['channel_post']['chat']['id'];\n }\n if ($this->getUpdateType () == 'edited_channel_post'){\n $chat_id = $this->content ['edited_channel_post']['chat']['id'];\n }\n if ($this->getUpdateType () == 'callback_query'){\n $chat_id = $this->content ['callback_query']['message']['chat']['id'];\n }\n if ($this->getUpdateType () == 'my_chat_member'){\n $chat_id = $this->content ['my_chat_member']['chat']['id'];\n }\n if ($this->getUpdateType () == 'chat_member'){\n $chat_id = $this->content ['chat_member']['chat']['id'];\n }\n if ($this->getUpdateType () == 'chat_join_request'){\n $chat_id = $this->content ['chat_join_request']['chat']['id'];\n }\n return $chat_id ?? $this->content ['message']['chat']['id'];\n }", "function GetChannel() {\n\t\treturn $this->channel;\n\t}", "public static function getPrivateChannel(): ?string\n {\n\n return optional(DiscordUser::find(auth()->user()->group->id))->channel_id;\n }", "protected function get_channel() {\n\n\t\treturn $this->channel;\n\t}", "public function getChannelMAC()\n {\n return $this->channel_MAC;\n }", "public function getChannel()\n {\n if (is_null($this->channel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->channel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->channel;\n }", "protected function getFreeChannelId(): int\n\t{\n\t\tfor ($i = 1; $i <= $this->config->maxChannels; ++$i) {\n\t\t\tif (!isset($this->channels[$i])) {\n\t\t\t\treturn $i;\n\t\t\t}\n\t\t}\n\n\t\tthrow new \\RuntimeException('No available channel ID');\n\t}", "public function getChannelName(): string;", "public function cohInstanceId() {\n return 'coh-instance-' . crc32($this->uuid->generate());\n }", "public function Callback_ChatID()\n {\n return $this->data['callback_query']['message']['chat']['id'];\n }", "function getChannel() {\r\n $channels = Channel::GetAllChannels();\r\n if (is_null($channels)) {\r\n return false;\r\n }\r\n $channelId = false;\r\n foreach ($channels as $id_channel) {\r\n $channel = new Channel($id_channel);\r\n if ($channel->GetName() == \"html\" or $channel->GetName() == \"web\") {\r\n $channelId = $id_channel;\r\n break;\r\n }\r\n }\r\n if (!$channelId)\r\n $channelId = $channels[0];\r\n Module::log(Module::SUCCESS, \"Using channel with ID \" . $channelId);\r\n return $channelId;\r\n }", "public function getChannelName();", "public function getChocolateyId()\n {\n return ChocolateyId::find($this->attributes['mail']);\n }", "public function getIpcChannel() {\n return $this->channel;\n }", "public function setChannel($var)\n {\n GPBUtil::checkInt32($var);\n $this->channel = $var;\n\n return $this;\n }", "public function getChannel()\n {\n return $this->get('channel');\n }", "public function getUniqueId()\n {\n $id = $this->getFullIdentifier() . '-';\n if ($this->_block) {\n $id .= $this->_block->id;\n } else {\n $id .= uniqid();\n }\n return $id;\n }", "public static function setChannelId($channel_id)\n {\n self::$channel_id = $channel_id;\n }", "public function getChannelName(){\n\t\tif (isset($this->channelName)){\n\t\t\treturn $this->channelName;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "function getConnectionID () {\n\t//the connection id is a unique 6-letter word that identifies the connection between two browsers. once a connection\n\t//is started the id is returned and the other browser requires this to join the connection and exchange data. the id\n\t//itself is based on the unix time number converted to base 35 (0-9,A-Z)\n\treturn strtoupper (substr(base_convert(time(),10,35),0,6));\n}", "public function getChannelName () {\r\n return '@' . $name;\r\n }", "public function getChannel(): ?string\n {\n return $this->channel;\n }", "public function generatePacketID();", "static function getId()\n {\n self::$id += 0x1;\n \n return \"idg_\".dechex(self::$id);\n }", "public function getChannel();", "public function getChannel();", "public function getChannel();", "public function getChannel();", "public function getUniqueId()\n {\n return $this->module ? ltrim($this->module->getUniqueId() . '/' . $this->id, '/') : $this->id;\n }", "public function createChan($id = null) {\n\t\tif (is_null($id) || !isset($this->chans[$id])) {\n\t\t\t$chanDriver = new AmqpChanDriver($this->conn, $id);\n\t\t\t$id = $chanDriver->getId();\n\t\t\t$this->chans[$id] = $chanDriver;\n\t\t}\n\t\treturn $this->chans[$id];\n\t}", "public function removeChannel($channelid)\n {\n }", "static public function getIdentifier() {\n return \\Drupal::state()->get('acquia_connector.identifier');\n }", "public function channel(?int $id = null): Channel\n\t{\n\t\tif ($id !== null && isset($this->channels[$id])) {\n\t\t\treturn $this->channels[$id];\n\t\t}\n\n\t\t$id ??= $this->getFreeChannelId();\n\t\t$reply = $this->protocol->channelOpen($id);\n\n\t\t$this->channels[$id] = new Channel(\\WeakReference::create($this->protocol), $id, $this->config->channelTimeout);\n\t\t// $this->channels[$id]->once('close', function () use ($id) { unset($this->channels[$id]); });\n\t\treturn $this->channels[$id];\n\t}", "public function getChimpid()\n {\n return $this->chimpid;\n }", "public function getCommentCohortId() {\n\t\treturn $this->commentCohortId;\n\t}", "public function getChannelName($id){\n\t\t$channel_id = $id; \n\t\t$channel__name_dat = DB::select(DB::raw(\"SELECT Channel_Name FROM channels WHERE Channel_Id =\".$channel_id));\n\t\t$ch_name = $channel__name_dat[0]->Channel_Name;\n\t\treturn $ch_name;\n\t}", "public function getPacketId()\n {\n $value = $this->get(self::PACKETID);\n return $value === null ? (string)$value : $value;\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->channel = $var;\n\n return $this;\n }", "public function getNameChannelAttribute()\n {\n return \"{$this->channels_id} {$this->channel->name}\";\n }", "public function getParentChannel()\n {\n $channel = new channel(null, $this->parentId);\n return ($channel->id) ? $channel : null;\n }", "public function getChampionshipId() {\n\n\t\treturn $this->championshipId;\n\t}", "public function getCircuitId()\n {\n return $this->circuit_id;\n }", "function getForumId( $params )\n\t\t{\n\t\t\treturn $this->mod_config['comment_forum_id'] ;\n\t\t}", "public function getChannelById($channelId);", "public function channel($id): ChannelContract\n\t{\n\t\treturn new Channel($this->client->channels($id)->fetch());\n\t}", "public function setChannelIdentity($val)\n {\n $this->_propDict[\"channelIdentity\"] = $val;\n return $this;\n }", "function getInstanceIdFromChannelId($db, $channel_id) \n{\n\n\t$stmt = $db->prepare('SELECT id FROM smf_discord_news WHERE channel_id=?');\n\t$stmt->bindParam(1, $channel_id, PDO::PARAM_INT);\n\t$stmt->execute();\n\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\treturn @$row['id'];\n}", "public function getStructure()\n\t{\n\t\treturn $this->Channel;\n\t}", "public function getConnectorId()\n {\n return $this->connector_id;\n }", "public static function getBotId(): int\n\t{\n\t\treturn (int)Main\\Config\\Option::get(self::MODULE_ID, self::OPTION_BOT_ID, 0);\n\t}", "public function getChapId()\n {\n $id = $this->chapIdentifier;\n $this->chapIdentifier++;\n\n return $id;\n }", "public function getCid(): string\n\t{\n\t\tif ($this->has('cid')) {\n\t\t\treturn $this->get('cid');\n\t\t}\n\t\t$cid = hash('sha256', $this->get('from_email') . '|' . $this->get('date') . '|' . $this->get('subject') . '|' . $this->get('message_id'));\n\t\t$this->set('cid', $cid);\n\t\treturn $cid;\n\t}", "public function getContractId() {\n $result = \"HDCD\";\n if (strlen((string)$this->id) < 5)\n for ($i = 0; $i < 5 - strlen((string)$this->id); $i++)\n $result .= '0';\n return $result .= $this->id;\n }", "public function getUniqueId()\n {\n return $this->unique_id;\n }", "public function getUniqueId()\n {\n return $this->unique_id;\n }", "public function GetForumId() {\r\n\t\t$forumId = $this->defineForumId ();\r\n\t\treturn $forumId;\r\n\t}", "public function getTelegramChatId();", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }" ]
[ "0.6975092", "0.6895727", "0.68796986", "0.6877774", "0.6877774", "0.68075144", "0.6637533", "0.65074205", "0.61285365", "0.60326266", "0.58090186", "0.5803423", "0.5685878", "0.5670205", "0.55032825", "0.54639584", "0.5440623", "0.5382514", "0.53401893", "0.5337272", "0.5325181", "0.52726424", "0.52662116", "0.5260478", "0.51996374", "0.5198129", "0.51946294", "0.5179197", "0.5174878", "0.5174878", "0.51675415", "0.51675415", "0.51675415", "0.51675415", "0.51660967", "0.5130943", "0.5125182", "0.51060945", "0.5061956", "0.50586754", "0.5055931", "0.5028936", "0.5026003", "0.50147647", "0.50021034", "0.49776965", "0.49492744", "0.49341533", "0.49276385", "0.49045408", "0.49026552", "0.4898134", "0.48659137", "0.48649085", "0.48357314", "0.48356625", "0.48336065", "0.4830262", "0.48127177", "0.47972956", "0.4781498", "0.47680226", "0.4763544", "0.47497597", "0.47487912", "0.47446924", "0.47446924", "0.47446924", "0.47446924", "0.47145993", "0.47039002", "0.46853876", "0.4676073", "0.4671088", "0.46687162", "0.46509328", "0.46249902", "0.4621461", "0.4619326", "0.46138853", "0.4611531", "0.46070513", "0.46018097", "0.45938355", "0.4592705", "0.45904016", "0.45766717", "0.45627692", "0.45605752", "0.45545936", "0.45489323", "0.45383698", "0.4537615", "0.4537218", "0.45362225", "0.45362225", "0.4534844", "0.45185256", "0.45055744" ]
0.7280238
1
Creates a Pageplanner client based on the config.
Создает клиент Pageplanner на основе конфигурации.
public function createFromConfig() { $config = $this->configFactory->get('pageplanner.settings'); $client_configuration = [ 'baseUrl' => $config->get('base_url'), 'access_token_url' => $config->get('access_token_url'), 'client_id' => $config->get('client_id'), 'client_secret' => $config->get('client_secret'), ]; $client = new PageplannerClient($client_configuration); return $client; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function factory($config = array()) {\n\t\t$default = array(\n 'base_url' => 'https://my.rightscale.com/',\n 'version' => '1.0',\n 'curl.CURLOPT_FOLLOWLOCATION' => false,\n 'curl.CURLOPT_RETURNTRANSFER' => true\n );\n\t\t$required = array ('acct_num', 'base_url', 'version');\n\t\t$config = Inspector::prepareConfig ( $config, $default, $required );\n\t\t\n\t\t$client = new self ( $config->get( 'base_url' ),\n\t\t\t$config->get('acct_num'),\n $config->get('oauth_refresh_token'),\n\t\t\t$config->get('email'),\n\t\t\t$config->get('password'),\n\t\t\t$config->get('version')\n\t\t);\n\t\t$client->setConfig ( $config );\n\t\t\n\t\t// Add the XML service description to the client\n $path = __DIR__ . DIRECTORY_SEPARATOR . 'rs_guzzle_client_v'. $client->getVersion() . '.xml';\n $client->setDescription(ServiceDescription::factory($path));\n\n\t\t// Keep them cookies\n\t\t$client->cookieJar = new IndiscriminateArrayCookieJar();\n $client->getEventDispatcher()->addSubscriber(new CookiePlugin($client->cookieJar));\n\n $client->getEventDispatcher()->addSubscriber(new HttpAuthenticationPlugin($client));\n $client->getEventDispatcher()->addSubscriber(new ShardAwarenessPlugin($client));\n\n\t\treturn $client;\n\t}", "public function make(array $config)\n {\n Arr::requires($config, ['from', 'auth_id', 'auth_token']);\n\n $client = new Client();\n\n return new PlivoGateway($client, $config);\n }", "public static function factory($config = array())\n {\n $configuration = static::buildConfig($config);\n\n $client = new self($configuration->get('base_url'), $configuration);\n\n $authPlugin = new CurlAuthPlugin($configuration->get('api_key'), '');\n $client->addSubscriber($authPlugin);\n\n static::loadDefinitions($client);\n static::loadStandardSettings($client, $configuration);\n\n return $client;\n }", "public static function factory($config = array())\n {\n $configuration = static::buildConfig($config);\n\n $client = new self($configuration->get('base_url'), $configuration);\n\n $client->addSubscriber(new KeyAuthPlugin($configuration->get('key')));\n\n static::loadDefinitions($client);\n static::toggleRateLimitingPlugin($client, $config);\n\n return $client;\n }", "public function build($type = self::ENTERPRISE)\n {\n\n $soap_client_factory = new SoapClientFactory();\n $soap_client = $soap_client_factory->factory($this->wsdl, $this->soap_options);\n\n if($type == self::PARTNER){\n $client = new PartnerClient($soap_client, $this->username, $this->password, $this->token);\n } else {\n $client = new EnterpriseClient($soap_client, $this->username, $this->password, $this->token);\n }\n\n if($this->log) {\n $log_plugin = new LogPlugin($this->log);\n $client->getEventDispatcher()->addSubscriber($log_plugin);\n }\n\n return $client;\n }", "protected function createClient()\n {\n $isActive = $this->settings->getSettingByKey('marketingVendorsValue');\n if ($isActive && $isActive->getValue() === Config::KEY) {\n $config = $this->settings->getSettingByKey(Config::KEY);\n\n if ($config) {\n $configArray = $config->getValue();\n\n // validate configuration\n $requiredConfigFields = array_keys($this->config->getSettingsConfig());\n $isValid = true;\n foreach ($requiredConfigFields as $requiredConfigField) {\n if (!array_key_exists($requiredConfigField, $configArray)) {\n $isValid = false;\n }\n if (empty($configArray[$requiredConfigField])) {\n $isValid = false;\n }\n }\n\n // if configuration is not valid then do nothing\n if (!$isValid) {\n return;\n }\n\n $endpoint = $configArray['api_url'];\n $apiSecret = $configArray['api_secret'];\n $apiKey = $configArray['api_key'];\n $customerId = $configArray['customer_id'];\n try {\n $this->connector = $this->createConnector(new Client($customerId, $endpoint, $apiSecret, $apiKey));\n } catch (\\Exception $exception) {\n $this->logger->debug(json_encode($exception->getMessage()));\n }\n\n $this->ownerEmail = $configArray['email'];\n }\n }\n }", "protected function createConnection(array $config): Client\n {\n return $this->factory->make($config);\n }", "public static function newInstance( $config, $type )\n {\n try\n {\n if (!isset(self::$instance))\n {\n $requestedRouter = 'JapaRouter'.ucfirst($type);\n\n $class_file = JAPA_LIBRARY_DIR . 'japa/'.$requestedRouter.'.php';\n\n if(!@file_exists($class_file))\n {\n throw new JapaInitException($class_file.' dosent exists');\n }\n\n include_once($class_file);\n\n $object = new $requestedRouter( $config );\n\n if (!($object instanceof JapaRouter))\n {\n throw new JapaInitException($class.' dosent extends JapaRouter');\n }\n\n // set singleton instance\n self::$instance = $object;\n\n return $object;\n }\n else\n {\n $type = get_class(self::$instance);\n\n throw new JapaInitException('Router instance exists: '.$type);\n }\n\n }\n catch (JapaInitException $e)\n {\n $e->performStackTrace();\n }\n }", "private function constructClient($config)\n {\n $clientDefinition = new Definition('Evozon\\TranslatrBundle\\Clients\\NullAdapter');\n switch ($config['adapter']) {\n case 'onesky':\n $clientDefinition->setClass('Evozon\\TranslatrBundle\\Clients\\OneSkyAdapter');\n\n $clientDefinition->addArgument(new Reference('event_dispatcher'));\n $clientDefinition->addArgument($config['project']);\n $clientDefinition->addArgument($config['locale_format']);\n\n $clientDefinition->addMethodCall('setApiKey', [$config['api_key']]);\n $clientDefinition->addMethodCall('setSecret', [$config['secret']]);\n break;\n\n case 'phraseapp':\n $clientDefinition->setClass('Evozon\\TranslatrBundle\\Clients\\PhraseAppAdapter');\n\n $clientDefinition->addArgument(new Reference('event_dispatcher'));\n $clientDefinition->addArgument($config['project']);\n $clientDefinition->addArgument($config['locale_format']);\n\n $clientDefinition->addMethodCall('setApiKey', [$config['api_key']]);\n break;\n }\n\n return $clientDefinition;\n }", "public static function factory($config = array())\n {\n // Create a new Vimeo client\n $client = new self('http://vimeo.com/api/rest/v2', $config);\n\n // Ensure that the OauthPlugin is attached to the client\n $client->addSubscriber(new OauthPlugin($config));\n\n // Set service description\n $client->setDescription(\n ServiceDescription::factory(\n __DIR__ . '/../../../Resources/config/guzzle/service_vimeo.json'\n )\n );\n\n return $client;\n }", "public function createClient(array $config = []);", "public static function factory(array $config = array())\r\n {\r\n return new Pagination($config);\r\n }", "function createClient()\r\n{\r\n global $endpoint;\r\n return new PredictionServiceClient([\r\n 'apiEndpoint' => $endpoint\r\n ]);\r\n}", "protected function init_client( $config ) {\n\t\t$default = array(\n\t\t\t'base_url' => '{{scheme}}://api.{{domain}}/{{version}}/?appid={{appid}}&appkey={{appkey}}',\n\t\t\t'scheme' => 'https',\n\t\t\t'version' => '0.1',\n\t\t\t'domain' => \\PSU::isDev() ? 'dev.plymouth.edu' : 'plymouth.edu',\n\t\t);\n\n\t\t$required = array(\n\t\t\t'appid',\n\t\t\t'appkey',\n\t\t\t'base_url',\n\t\t);\n\n\t\t$config = \\Guzzle\\Common\\Inspector::prepareConfig( $config, $default, $required );\n\n\t\t$client = new \\Guzzle\\Service\\Client(\n\t\t\t$config->get('base_url'),\n\t\t\t$config\n\t\t);\n\n\t\t$client->setConfig( $config );\n\n\t\treturn $client;\n\t}", "static private function getPhantomJsClientInstance () {\n $client = Client::getInstance();\n $command = OSUtils::getCommandRealPath(\"phantomjs\");\n $client->getEngine()->setPath($command);\n return $client;\n }", "public static function make(array $config): Client\n {\n self::$storage = new SessionStorage();\n\n if (self::$client != null) {\n return self::$client;\n }\n \n self::$client = new Client([\n 'verify' => false,\n 'connect_timeout' => self::CONNECT_TIMEOUT,\n 'handler' => self::makeAuthHandler($config),\n ]);\n\n return self::$client;\n }", "public static function factory($config = array())\r\n {\r\n return ClientBuilder::factory(__NAMESPACE__)\r\n ->setConfig($config)\r\n ->setConfigDefaults(array(\r\n Options::VERSION => self::LATEST_API_VERSION,\r\n Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/workspaces-%s.php'\r\n ))\r\n ->setExceptionParser(new JsonQueryExceptionParser())\r\n ->build();\r\n }", "static public function create($type, SagepaySettings $config)\r\n {\r\n $integration = strtolower($type);\r\n $integrationApi = 'Sagepay' . ucfirst($integration) . 'Api';\r\n\r\n if (class_exists($integrationApi))\r\n {\r\n return new $integrationApi($config);\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n }", "public static function factory($config = array())\n {\n $default = array('redirect.disable' => true);\n $required = array('token');\n $config = Collection::fromConfig($config, $default, $required);\n\n $client = new self($config->get('base_url'), $config);\n // Attach a service description to the client\n $description = ServiceDescription::factory(__DIR__ . '/services.php');\n $client->setDescription($description);\n\n $oauth_plugin = new Oauth2Plugin(array('Bearer ' . $config->get('token')));\n $client->addSubscriber($oauth_plugin);\n\n return $client;\n }", "private function create_plan_template(){\n // ------------------------------------------------------------------\n $plan = factory( PjSalePlan::class )->state('init')->make();\n // ------------------------------------------------------------------\n\n // ------------------------------------------------------------------\n // Plan sections\n // ------------------------------------------------------------------\n $plan->sections = factory( PjSalePlanSection::class, 1 )->state('init')->make();\n $plan->sections->each( function( $section, $sectionIndex ){\n $section->divisions_number = $sectionIndex +1;\n });\n // ------------------------------------------------------------------s\n\n // ------------------------------------------------------------------\n return $plan;\n // ------------------------------------------------------------------\n }", "public static function factory(array $config)\n {\n return GuzzleClientFactory::createClient($config);\n }", "function newPage () {\n\t\treturn new page ($this->db, $this->getAllOptionsForPage (), $this);\n\t}", "private function setClient( $config ){\n\t\t$this->client = new Client([\n\t\t\t'base_url' => $config['endpoint'],\n\t\t\t'defaults' => $config['defaults'],\n\t\t\t'emitter' => $config['emitter']\n\t\t]);\n\t}", "public static function factory($config = array())\n {\n $default = array(\n 'base_url' => '{scheme}://{hostname}/oauth',\n 'scheme' => 'https',\n 'hostname' => 'www.sparkreel.com'\n );\n\n $required = array('base_url', 'client_id', 'client_secret');\n $config = Collection::fromConfig($config, $default, $required);\n\n $client = new self($config->get('base_url'), $config);\n\n // Attach a service description to the client\n $description = ServiceDescription::factory(dirname(__DIR__) . '/Resources/OAuth2.json');\n $client->setDescription($description);\n\n // send client_id & client_secret as Basic auth\n $client->setDefaultOption('auth', array($config->get('client_id'), $config->get('client_secret'), 'Basic'));\n\n return $client;\n }", "static public function factory($config) \n {\n return new self();\n }", "public static function factory($config = []): Client\n {\n $url = 'https://api.convertkit.com';\n\n if (isset($config[ 'url' ])) {\n $url = $config[ 'url' ];\n }\n\n $extraParams = [\n 'api_secret' => $config[ 'api_secret' ],\n 'origin' => $config[ 'origin' ]\n ];\n\n $handler = HandlerStack::create();\n $handler->push(Middleware::mapRequest(function ($request) use ($extraParams) {\n $uri = $request->getUri();\n $uri .= ( $uri ? '?' : '' );\n $uri .= http_build_query( $extraParams );\n\n return new Request(\n $request->getMethod(),\n $uri,\n $request->getHeaders(),\n $request->getBody(),\n $request->getProtocolVersion()\n );\n }));\n\n return new self(\n new GuzzleHttpClient([\n 'base_uri' => $url,\n 'handler' => $handler\n ]),\n new Description([\n 'name' => 'ConvertKit',\n 'apiVersion' => '3',\n 'description' => 'Services description used by Guzzle for talking to Convert Kit REST API.',\n 'baseUri' => $url,\n 'operations' => [\n 'getAllLists' => [\n 'httpMethod' => 'GET',\n 'uri' => '/v3/forms',\n 'parameters' => [],\n 'responseModel' => 'getResponse'\n ],\n 'addSubscriberToList' => [\n 'httpMethod' => 'POST',\n 'uri' => '/v3/forms/{formId}/subscribe',\n 'parameters' => [\n 'formId' => [ 'location' => 'uri'],\n 'email' => [ 'location' => 'json'],\n 'first_name' => [ 'location' => 'json'],\n 'tags' => [ 'location' => 'json'],\n 'fields' => [ 'location' => 'json']\n ],\n 'responseModel' => 'getResponse'\n ],\n 'getAllTags' => [\n 'httpMethod' => 'GET',\n 'uri' => '/v3/tags',\n 'parameters' => [],\n 'responseModel' => 'getResponse'\n ],\n 'createTag' => [\n 'httpMethod' => 'POST',\n 'uri' => '/v3/tags',\n 'parameters' => [\n 'name' => [ 'location' => 'json']\n ],\n 'responseModel' => 'getResponse'\n ],\n 'getCustomFields' => [\n 'httpMethod' => 'GET',\n 'uri' => '/v3/custom_fields',\n 'parameters' => [],\n 'responseModel' => 'getResponse'\n ],\n 'createCustomField' => [\n 'httpMethod' => 'POST',\n 'uri' => '/v3/custom_fields',\n 'parameters' => [\n 'label' => [ 'location' => 'json']\n ],\n 'responseModel' => 'getResponse'\n ],\n 'getSubscriptionsToForm ' => [\n 'httpMethod' => 'GET ',\n 'uri' => '/v3/forms/{formId}/subscriptions',\n 'parameters' => [\n 'formId' => ['location ' => 'uri']\n ],\n 'responseModel' => 'getResponse'\n ],\n 'getSubscribersByEmail' => [\n 'httpMethod' => 'GET ',\n 'uri' => '/v3/subscribers?email_address={email}',\n 'parameters' => [\n 'email' => ['location' => 'uri']\n ],\n 'responseModel' => 'getResponse'\n ]\n ],\n 'models' => [\n 'getResponse' => [\n 'type' => 'object',\n 'additionalProperties' => [\n 'location' => 'json'\n ]\n ]\n ]\n ])\n );\n }", "protected function createConnection( array $config )\n {\n return $this->factory->make( $config );\n }", "public static function factory($config = array())\n {\n return ClientBuilder::factory(__NAMESPACE__)\n ->setConfig($config)\n ->setConfigDefaults(array(\n Options::VERSION => static::LATEST_API_VERSION,\n Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/cloudwatch-%s.php'\n ))\n ->build();\n }", "public static function getNewInstance($config = null);", "public function create(\n array $config = []\n ): Client {\n if (count($config) === 0) {\n $config = $this->defaultConfig;\n }\n\n $options = [];\n\n if (isset($config['options'])) {\n $options = $config['options'];\n\n unset($config['options']);\n }\n\n $client = new Client($config);\n\n foreach ($options as $option => $value) {\n $method = $this->resolveOptionMutatorMethod($client, $option);\n\n $client->$method($value);\n }\n\n return $client;\n }", "protected function createTransport(array $config) {\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->transportClass;\n }\n return Yii::createObject($config);\n }", "protected function _createPublicationObject() {\n $publication = new PapayaContentPagePublication();\n $publication->setDatabaseAccess($this->getDatabaseAccess());\n return $publication;\n }", "private function createClient($config)\n {\n return new StorageClient();\n }", "function createGatewayClient($clientConfig){\n $gatewayClient = new GatewayClient($clientConfig);\n return $gatewayClient;\n }", "public static function create(QueryBuilder $builder, int $limit, int $page): PagerInterface\n {\n $pager = new self($limit);\n $pager->setQuery(new ProxyQuery($builder));\n $pager->setPage($page);\n $pager->init();\n\n return $pager;\n }", "static public function factory($config)\n {\n return new self();\n }", "static public function factory($config)\n {\n return new self();\n }", "public function __construct($config)\n {\n # Call parent constructor to initialize common settings\n parent::__construct($config);\n\n $this->payfortEndpoint = 'https://paymentservices.payfort.com/FortAPI/paymentApi';\n\n # Check if it is sandbox environment to make requests to Payfort sandbox url.\n if (data_get($this->config, 'sandbox', false)) {\n $this->payfortEndpoint = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi';\n }\n\n # Setting Http Client\n $this->httpClient = new Client([\n 'curl' => [\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_CONNECTTIMEOUT => false\n ],\n 'headers' => [\n 'Accept' => 'application/json'\n ],\n ]);\n }", "public function create()\n {\n $config = new Configuration();\n $config->setClassMetadataFactoryName(Mapping\\ClassMetadataFactory::class);\n\n $cache = new CacheAdapter();\n // must use ObjectManager in compile phase...\n $cache->setCache($this->objectManager->get(CacheManager::class)->getCache('Flow_Persistence_Doctrine'));\n $config->setMetadataCacheImpl($cache);\n $config->setQueryCacheImpl($cache);\n\n $resultCache = new CacheAdapter();\n // must use ObjectManager in compile phase...\n $resultCache->setCache($this->objectManager->get(CacheManager::class)->getCache('Flow_Persistence_Doctrine_Results'));\n $config->setResultCacheImpl($resultCache);\n\n if (is_string($this->settings['doctrine']['sqlLogger']) && class_exists($this->settings['doctrine']['sqlLogger'])) {\n $configuredSqlLogger = $this->settings['doctrine']['sqlLogger'];\n $sqlLoggerInstance = new $configuredSqlLogger();\n if ($sqlLoggerInstance instanceof SQLLogger) {\n $config->setSQLLogger($sqlLoggerInstance);\n } else {\n throw new InvalidConfigurationException(sprintf('TYPO3.Flow.persistence.doctrine.sqlLogger must point to a \\Doctrine\\DBAL\\Logging\\SQLLogger implementation, %s given.', get_class($sqlLoggerInstance)), 1426150388);\n }\n }\n\n $eventManager = $this->buildEventManager();\n\n $flowAnnotationDriver = $this->objectManager->get(FlowAnnotationDriver::class);\n $config->setMetadataDriverImpl($flowAnnotationDriver);\n\n $proxyDirectory = Files::concatenatePaths([$this->environment->getPathToTemporaryDirectory(), 'Doctrine/Proxies']);\n Files::createDirectoryRecursively($proxyDirectory);\n $config->setProxyDir($proxyDirectory);\n $config->setProxyNamespace(Proxies::class);\n $config->setAutoGenerateProxyClasses(false);\n\n // Set default host to 127.0.0.1 if there is no host configured but a dbname\n if (empty($this->settings['backendOptions']['host']) && !empty($this->settings['backendOptions']['dbname'])) {\n $this->settings['backendOptions']['host'] = '127.0.0.1';\n }\n\n // The following code tries to connect first, if that succeeds, all is well. If not, the platform is fetched directly from the\n // driver - without version checks to the database server (to which no connection can be made) - and is added to the config\n // which is then used to create a new connection. This connection will then return the platform directly, without trying to\n // detect the version it runs on, which fails if no connection can be made. But the platform is used even if no connection can\n // be made, which was no problem with Doctrine DBAL 2.3. And then came version-aware drivers and platforms...\n $connection = DriverManager::getConnection($this->settings['backendOptions'], $config, $eventManager);\n try {\n $connection->connect();\n } catch (ConnectionException $exception) {\n $settings = $this->settings['backendOptions'];\n $settings['platform'] = $connection->getDriver()->getDatabasePlatform();\n $connection = DriverManager::getConnection($settings, $config, $eventManager);\n }\n\n $entityManager = EntityManager::create($connection, $config, $eventManager);\n $flowAnnotationDriver->setEntityManager($entityManager);\n\n if (isset($this->settings['doctrine']['dbal']['mappingTypes']) && is_array($this->settings['doctrine']['dbal']['mappingTypes'])) {\n foreach ($this->settings['doctrine']['dbal']['mappingTypes'] as $typeName => $typeConfiguration) {\n Type::addType($typeName, $typeConfiguration['className']);\n $entityManager->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping($typeConfiguration['dbType'], $typeName);\n }\n }\n\n if (isset($this->settings['doctrine']['filters']) && is_array($this->settings['doctrine']['filters'])) {\n foreach ($this->settings['doctrine']['filters'] as $filterName => $filterClass) {\n $config->addFilter($filterName, $filterClass);\n $entityManager->getFilters()->enable($filterName);\n }\n }\n\n if (isset($this->settings['doctrine']['dql']) && is_array($this->settings['doctrine']['dql'])) {\n $this->applyDqlSettingsToConfiguration($this->settings['doctrine']['dql'], $config);\n }\n\n return $entityManager;\n }", "public static function factory($config = [])\n {\n $default = ['base_url' => 'https://www.cloudflare.com'];\n\n // The following values are required when creating the client\n $required = [\n //'user',\n //'token',\n ];\n\n // Merge in default settings and validate the config\n $config = Collection::fromConfig($config, $default, $required);\n\n // Create a new client\n $client = new self($config->get('base_url'), $config);\n\n // $client = $app['guzzle.client'];\n // $description = ServiceDescription::factory('src/cloudflare.json');\n // $client->setDescription($description);\n $description = ServiceDescription::factory('src/cloudflare.json');\n $client->setDescription($description);\n\n return $client;\n }", "public function make(array $config): Client\n {\n return $this->buildClient($config);\n }", "public function make(array $config): Client\n {\n return $this->buildClient($config);\n }", "protected function createPredisDriver(array $config): PredisCachePool\n {\n $client = new PredisClient(\\sprintf('tcp:/%s:%s', $config['server'], $config['port']));\n\n return new PredisCachePool($client);\n }", "public static function factory($config = array())\n {\n return ClientBuilder::factory(__NAMESPACE__)\n ->setConfig($config)\n ->setConfigDefaults(array(\n Options::VERSION => self::LATEST_API_VERSION,\n Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/opsworks-%s.php'\n ))\n ->setExceptionParser(new JsonQueryExceptionParser())\n ->build();\n }", "public function createClient();", "protected function createConnection(array $config)\n {\n return $this->factory->make($config);\n }", "protected function createConnection(array $config)\n {\n return $this->factory->make($config);\n }", "protected function createConnection(array $config)\n {\n return $this->factory->make($config);\n }", "protected function createConnection(array $config)\n {\n return $this->factory->make($config);\n }", "public function createProvider(array $config = []);", "public static function factory($config = array())\n {\n $client = new Client([\n 'headers' => [\n 'Accept' => 'application/json',\n ],\n ]);\n\n $configDirectories = array(__DIR__ . \"/Resources\");\n $locator = new FileLocator($configDirectories);\n $phpLoader = new PhpLoader($locator);\n $description = $phpLoader->load($locator->locate('staades_api_2_0.php'));\n\n $description = new Description($description);\n\n // Create a new Staades client\n $guzzleClient = new self($client, $description, null, null, null, $config);\n\n return $guzzleClient;\n }", "public static function factory($config)\n {\n return new self();\n }", "public function execute(): Page\n {\n $resultPage = $this->pageFactory->create();\n $resultPage->setActiveMenu('UpStreamPay_Core::payments');\n $resultPage->getConfig()->getTitle()->prepend(__('Payments grid'));\n\n return $resultPage;\n }", "public static function factory($config = array())\n {\n $default = array(\n 'base_uri' => 'https://{account_name}.blob.core.windows.net/'\n );\n $required = array('base_uri', 'account_name', 'account_key');\n $config = Collection::fromConfig($config, $default, $required);\n\n $client = new self(\n $config->get('base_uri'),\n $config->get('account_name'),\n $config->get('account_key')\n );\n\n return $client;\n }", "protected function getPersonaClient()\n {\n if (!isset($this->personaClient)) {\n $cacheDriver = new \\Doctrine\\Common\\Cache\\PredisCache(\n $this->getCacheClient()\n );\n\n $this->personaClient = new \\Talis\\Persona\\Client\\Tokens([\n 'persona_host' => PERSONA_HOST,\n 'persona_oauth_route' => PERSONA_OAUTH_ROUTE,\n 'userAgent' => 'echo-php-client',\n 'cacheBackend' => $cacheDriver,\n ]);\n }\n\n return $this->personaClient;\n }", "public static function factory($config = 'default'){\n\t\t$connection = Config::get(\"migrate.{$config}.connection\"); \n\t\t$driver = Config::get(\"database.{$connection}.driver\");\n\t\t$driver=\"{$driver}_Migrate\";\n\t\treturn new $driver($config);\n\t}", "public static function factory($config = array())\n {\n $config = Collection::fromConfig($config, array(\n Options::BASE_URL => 'http://169.254.169.254/{version}/',\n 'version' => 'latest',\n 'request.options' => array(\n 'connect_timeout' => 5,\n 'timeout' => 10\n )\n ), array('base_url', 'version'));\n\n return new self($config);\n }", "public static function factory( $config = array() ){\n \n // Provide a hash of default client configuration options\n $default = array (\n 'key' => '',\n );\n\n // No values are currently required when creating the client\n $required = array ();\n\n // Merge in default settings and validate the config\n $config = Collection::fromConfig( $config, $default, $required );\n\n // Add configured API key as default command parameter although individual command execution may override\n $config->add( Client::COMMAND_PARAMS, array ( \n 'key' => $config->get('key'),\n ) );\n \n // Sanitize authentication type now to pre-empty errors\n if( $mode = $config->get('auth') ){\n if( ! in_array( $mode, array('loco','basic','query'), true ) ){\n throw new InvalidArgumentException('No such authentication mode, '.json_encode($mode) ); \n }\n }\n\n // Create a new instance of self\n $client = new self( '', $config );\n\n // describe service from included php file.\n $service = ServiceDescription::factory( __DIR__.'/Resources/service.php');\n \n // allow override of base_url after it's been set by service description\n if( $baseUrl = $config->get('base_url') ){\n $service->setBaseUrl( $baseUrl );\n }\n \n // Prefix Loco identifier to user agent string\n $client->setUserAgent( $service->getName().'/'.$service->getApiVersion(), true );\n\n return $client->setDescription( $service );\n \n }", "public function createClient()\n {\n $this->artisan('migrate', ['--database' => 'testbench']);\n $client = app(ClientRepository::class)->createPasswordGrantClient(null, 'test', 'http://localhost');\n config()->set('lighthouse-graphql-passport.client_id', $client->id);\n config()->set('lighthouse-graphql-passport.client_secret', $client->secret);\n }", "protected function createConnection(array $config)\n {\n return $this->factory->make($config, $config['options']);\n }", "abstract protected function getFactory($config);", "static public function factory($config)\n {\n return new self(self::_parseConfig($config));\n }", "function get_client() {\n $client = new Everyman\\Neo4j\\Client(Config::$val['db']['host'], Config::$val['db']['port']);\n $client->getTransport()->setAuth(Config::$val['db']['user'], Config::$val['db']['pass']);\n return $client;\n}", "public static function make()\n {\n return new PHPCasProvider(\n new ConfigsFactory(),\n new RequestBrokerFactory(),\n new RequestResponseFactory(),\n new HttpRequest(),\n new CookieJar());\n }", "public function createClient()\n\t{\n\t\t$this->client = new Client;\n\t}", "abstract public function make(array $config): Provider;", "public static function factory($config = array())\n {\n $config['allow_redirects'] = false;\n\n $stack = new HandlerStack();\n $stack->setHandler(new CurlHandler());\n $stack->push(add_header('Authorization', 'Bearer ' . $config['token']));\n $stack->push(add_header('Accept', 'application/json'));\n $config['handler'] = $stack;\n\n $config['description'] = ClientCommands::getCommands();\n\n $client = new self($config);\n\n return $client;\n }", "public function configureClientForProject(Project $project);", "private function __construct($config){\n $this->bigQuery = new BigQueryClient($config);\n }", "function create_gp_client( $wiki ) {\n\tglobal $config;\n\t\n\t#TODO: if $config doesn't know $wiki, look it up in toolserver.wikis!\n\t\n\tif ( !isset( $config[ $wiki ] ) ) {\n\t\tdie_with_error(\"unknown wiki: $wiki\");\n\t}\n\t\n\t$gp_graph = $config[ $wiki ][ 'gp-graph' ];\n\t$gp_host = @$config[ $wiki ][ 'gp-host' ];\n\t$gp_port = @$config[ $wiki ][ 'gp-port' ];\n\n\t$gp = gpMediaWikiGlue::new_client_connection( $gp_graph, $gp_host, $gp_port ); #todo: optional auth\n\t$gp->connect();\n\t\n\t$v = $gp->protocol_version();\n\t\n\t$mysql_host = @$config[ $wiki ][ 'mysql-host' ];\n\t$mysql_user = $config[ $wiki ][ 'mysql-user' ];\n\t$mysql_password = @$config[ $wiki ][ 'mysql-password' ];\n\n\t$mysql_database = $config[ $wiki ][ 'mysql-database' ];\n\t$mysql_prefix = @$config[ $wiki ][ 'mysql-prefix' ];\n\t$mysql_temp_db = @$config[ $wiki ][ 'mysql-temp-db' ];\n\n\t$gp->mysql_connect($mysql_host, $mysql_user, $mysql_password);\n\t$gp->mysql_select_db($mysql_database);\n\t$gp->prefix = $mysql_prefix;\n\t$gp->temp_table_db = $mysql_temp_db;\n\t\n\treturn $gp;\n}", "private function loadPaginator(){\n \n $Interface = \"\\\\Voodoo\\\\Core\\\\Interfaces\\\\Pagination\";\n \n $ClassInjection = $this->getConfig(\"VoodooDependencies.Controller.Pagination\");\n \n $DI = new \\ReflectionClass($ClassInjection);\n \n if(!$DI->implementsInterface($Interface))\n throw new Exception(\"{$ClassInjection} Must implement the interface: {$Interface}\");\n \n \n $this->Paginator = $DI->newInstanceArgs(array($this->getRequestURI(),$this->getConfig(\"Views.Pagination.PagePattern\"))); \n \n $this->Paginator->setItemsPerPage($this->getConfig(\"Views.Pagination.ItemsPerPage\"))\n ->setNavigationSize($this->getConfig(\"Views.Pagination.NavigationSize\"));\n return\n $this;\n }", "public function createClient() {\n $this->client = $this->getKernel()->getContainer()->get('test.client');\n $client = $this->client;\n return $client;\n }", "protected function createConnection(array $config)\n {\n return $this->factory->make($config, $this);\n }", "public static function create(ContainerInterface $container) {\n return new static(\n $container->get('polaris.client'),\n $container->get('entity_type.manager'),\n $container->get('entity.form_builder')\n );\n }", "public static function make($config)\n {\n return new static($config);\n }", "public static function create($type, $config)\n {\n return new $type($config);\n }", "public static function factory($config = array())\n {\n $default = array(\n 'masterKey' => null,\n 'writeKey' => null,\n 'readKey' => null,\n 'projectId' => null,\n 'organizationKey' => null,\n 'organizationId' => null,\n 'version' => '3.0',\n 'headers' => array(\n 'Keen-Sdk' => 'php-' . self::VERSION\n )\n );\n\n // Create client configuration\n $config = self::parseConfig($config, $default);\n\n $file = 'keen-io-' . str_replace('.', '_', $config['version']) . '.php';\n\n // Create the new Keen IO Client with our Configuration\n return new self(\n new Client($config),\n new Description(include __DIR__ . \"/Resources/{$file}\"),\n null,\n function ($arg) {\n return json_decode($arg->getBody(), true);\n },\n null,\n $config\n );\n }", "public function make(AlgoliaConfig $config)\n {\n return new AlgoliaManager(\n new Client(\n $config->getApplicationId(),\n $config->getApiKey(),\n $config->getHostsArray(),\n $config->getOptions()\n ),\n new ActiveRecordFactory(),\n new ActiveQueryChunker()\n );\n }", "public function createPage()\n\t{\n\t\t$page = new Page(); // introduce $page variable for action\n\t\t$page->checkMultilingualSetup();\n\n\t\t// log the last viewed page in the Page object itself\n\t\t$page->add('lastPage', $this->getNextUrl());\n\n\t\t// Add assets that are common for all p-actions\n\t\t$page->addCommonAssets();\n\t\t// Add assets that are common for all p-actions of given module\n\t\t$page->addModuleAssets($this->moduleName);\n\n\t\treturn $page;\n\t}", "function createPages() { }", "public function __construct($config, $sandbox)\n {\n $this->config = $config;\n $this->sandbox = $sandbox;\n \n $this->client = new Client($config['account_sid'], $config['auth_token']);\n }", "public function execute()\n { \n $page_object = $this->pageFactory->create();;\n return $page_object;\n }", "public static function createClient() : Client {\n try {\n // Initializes an instance of the DeliveryClient client\n if(is_null(static::$app))\n $client = new DeliveryClient(env(\"KONTENT_AI_KEY\"));\n else\n return static::$app;\n } catch (\\Throwable $e) {\n throw new \\Exception($e->getMessage());\n }\n static::$client = $client;\n static::$app = new Client();\n static::$query = new QueryParams();\n return static::$app;\n }", "public function createService(ServiceLocatorInterface $serviceLocator)\n {\n $config = $serviceLocator->get('Config');\n\n return new Client($config['axalian']['tvdb']);\n }", "public static function create($config = [])\n {\n return new static($config);\n }", "public static function create($config = [])\n {\n return new static($config);\n }", "private function processClient()\n {\n $config = $this->getAdobeConfig();\n\n $connection = new Connection($config['host'], $config['connection']);\n $client = new Client($connection);\n\n if ($config['session-cache']['enabled']) {\n $this->loginClient($client);\n }\n\n return $client;\n }", "public function createProducer(ProducerConfig $config)\n {\n }", "public function createProducer(ProducerConfig $config)\n {\n }", "final protected function _createClient()\n {\n $aCreds = array(\n 'customer_id' => $this->_sCustomerId,\n 'api_key' => $this->_sApiKey\n );\n return new Postmates_Shipping_Client_Client('', $aCreds);\n }", "public function make($config)\n\t{\n\t\t$connector = $this->createConnector($config)->connect($config);\n\n\t\treturn $this->createConnection($config['driver'], $connector, $config);\n\t}", "public static function instanciate($config){\n\n //de no existir instancia la creamos\n if (!self::$instance instanceof self){\n\n self::$instance = new self($config);\n \n }\n\n //de existir la regresamos\n return self::$instance;\n\n }", "public function createPage() {\r\n\r\n }", "private function createInstance()\n {\n $postFields = 'region_code='.$this->config['region_code'].'&';\n $postFields .= 'init_url=https://'.$this->config['domain'].'&';\n $postFields .= 'url='.$this->config['domain'].'&';\n $postFields .= 'create_config_file='.$this->config['create_config_file'];\n $curl_out = $this->curlPostRequst($this->config['live_actions']['createInstance'], $postFields);\n return $curl_out;\n }", "public function createService(ServiceLocatorInterface $serviceLocator)\n {\n $config = $serviceLocator->get('Config');\n $options = isset($config['netglue_tripadvisor']['scraper']) ?\n $config['netglue_tripadvisor']['scraper'] :\n array();\n\n return new ScraperOptions($options);\n }", "public function create()\n {\n return new Client();\n }", "public function newInstance($type)\n {\n if ($type == 'curl') {\n $adapter = new AdapterCurl(\n new StackBuilder(new MessageFactory)\n );\n } elseif ($type == 'stream') {\n $adapter = new AdapterStream(\n new StackBuilder(new MessageFactory),\n new FormData(new PartFactory),\n new CookieJarFactory\n );\n } else {\n throw new Exception\\UnknownAdapterType;\n }\n\n return new Manager(\n new MessageFactory,\n new Transport(\n new PhpFunc,\n new TransportOptions,\n $adapter\n )\n );\n }", "function __construct(array $config, Client $client)\n {\n // PDO db connection statement preparation\n $dsn = 'mysql:host=' . $config['db_host'] . ';dbname=' . $config['db_name'] . ';port=' . $config['db_port'];\n\n // note the PDO::FETCH_OBJ, returning object ($result->id) instead of array ($result[\"id\"])\n // @see http://php.net/manual/de/pdo.construct.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);\n\n // create new PDO db connection\n $this->db = new PingablePDO($dsn, $config['db_user'], $config['db_pass'], $options);\n\n $this->pageSize = $config['page_size'];\n\n $this->bots = new Bots($this->db, $this->pageSize);\n $this->types = new Types($this->db, $this->pageSize);\n $this->config = new Config($this->db);\n $this->submissions = new Submissions($this->db, $this->pageSize);\n $this->confirmedPeople = new ConfirmedPeople($this->db);\n $this->twitch = new Twitch($client, $this->config->get('client-ID'), self::$requestOptions);\n\n $this->venticHeaders = array_merge(self::$requestOptions, [\n 'headers' => [\n 'User-Agent' => $this->config->get('3v-ua')\n ]\n ]);\n\n $this->client = $client;\n\n $this->login = new Auth(\n $this->config->get('auth0_clientId'),\n $this->config->get('auth0_clientSecret'),\n $this->config->get('auth0_redirectUrl'),\n $this->config->get('auth0_domain'),\n $this->db\n );\n\t}", "public function createClient(){\r\n\t\treturn new Client($this->data[self::FIRSTNAME_REF], $this->data[self::SECONDNAME_REF], $this->data[self::EMAIL_REF], $this->data[self::STATUS_REF], $this->data[self::TELEPHONE_REF]);\r\n\t}", "protected static function _create($config)\n {\n if (!empty($config)) {\n return new self($config);\n } else {\n throw new OneException('OneDB configuration is not set');\n }\n }" ]
[ "0.589269", "0.56591886", "0.5611916", "0.5608609", "0.544673", "0.5438752", "0.53812695", "0.536054", "0.53473115", "0.53204286", "0.53101736", "0.5303859", "0.5281442", "0.52418023", "0.52396166", "0.5223288", "0.5182758", "0.51740223", "0.5133805", "0.51177514", "0.5114257", "0.50760514", "0.50720847", "0.50688857", "0.5068751", "0.5037388", "0.50310326", "0.5029184", "0.5023227", "0.50231034", "0.50152224", "0.50113595", "0.49939525", "0.4993084", "0.49874863", "0.49774528", "0.49774528", "0.49636346", "0.49572986", "0.49537542", "0.4951746", "0.4951746", "0.4943218", "0.49386692", "0.49190512", "0.49070662", "0.49070662", "0.49070662", "0.49070662", "0.4903497", "0.49007258", "0.48994458", "0.4895512", "0.48878673", "0.48854062", "0.48802203", "0.48727146", "0.48660228", "0.48652726", "0.48601472", "0.48582062", "0.48576814", "0.48555633", "0.4854802", "0.4853823", "0.48507807", "0.48389122", "0.48363277", "0.4823628", "0.48192617", "0.48131678", "0.4808531", "0.4803481", "0.48013467", "0.47957802", "0.47837526", "0.4781734", "0.47796878", "0.47637266", "0.47624087", "0.47588965", "0.47511417", "0.4748239", "0.47431144", "0.4738799", "0.4738799", "0.47354358", "0.47350922", "0.47350922", "0.47344434", "0.47329542", "0.47316688", "0.47227165", "0.4716632", "0.47049233", "0.4702901", "0.46952462", "0.46819168", "0.46802297", "0.4679939" ]
0.85108775
0
Get the route I/O implementation. When no implementation is provided through the constructor, a new implementation will be constructed based on the configuration.
Получите реализацию ввода-вывода маршрута. Если реализация не предоставлена через конструктор, будет создана новая реализация на основе конфигурации.
final protected function getIO() { if ($this->io) { return $this->io; } $objectFactory = new ObjectFactory(); $this->io = $objectFactory->createFromConfig(self::CONFIG_ROUTER_IO, self::DEFAULT_ROUTER_IO, self::CLASS_ROUTER_IO); return $this->io; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTargetHandler(): TargetHandlerInterface\n {\n return new Route();\n }", "public function getRoute() {\n return new Route(new Request());\n }", "public function __invoke(): RouterAdapterInterface\n {\n $parser = new RouteParser\\Std;\n $generator = new DataGenerator\\GroupCountBased;\n\n $collector = new RouteCollector($parser, $generator);\n\n $mapper = new Mapper($parser, $collector);\n $matcher = new Matcher($mapper);\n $generator = new UrlGenerator($mapper);\n\n return new RouterAdapter($mapper, $matcher, $generator);\n }", "protected abstract function getRouter(): RouterInterface;", "protected abstract function getRouter(): RouterInterface;", "public function getRoute(): RouteInterface;", "public function get(): string|null\n {\n $router = $this->simpleRouter();\n if ($router) return $router;\n\n $router = $this->dynamicRouter();\n if ($router) return $router;\n\n return null;\n }", "public function getIo()\n {\n return $this->io;\n }", "public function getIo()\n {\n return $this->io;\n }", "public static function createIOFromConfig() {\n $class = Zibo::getInstance()->getConfigValue(self::CONFIG_IO);\n if (!$class) {\n throw new ZiboException('No opcode cache implementation set. Please set the ' . self::CONFIG_IO . ' configuration value.');\n }\n\n $objectFactory = new ObjectFactory();\n return $objectFactory->create($class, self::INTERFACE_IO);\n }", "public function __construct(RouterIO $io = null) {\n $this->io = $io;\n }", "public static function getImplementation()\n {\n if (null === static::$implementation) {\n static::setImplementation(static::$defaultImplementation);\n }\n\n return static::$implementation;\n }", "public static\n\tfunction inst() {\n\t\t\n\t\tif(is_null(self::$r)) self::$r = new Router();\n\t\treturn self::$r;\n\t}", "public function getObject()\n\t{\n\t\t// Initialize the area discovery strategy\n\t\t$strategy = new Strategy_File($this->areaList);\n\t\t$strategy->setDiscoveryType($this->discoveryType, $this->_serviceLocator->get('web.Visit'));\n\t\tif($this->defaultArea !== null)\n\t\t{\n\t\t\t$strategy->setDefaultArea($this->defaultArea);\n\t\t}\n\n\t\t// Connect to the view helpers.\n\t\t\\Trinity\\Template\\Helper_Url::setStrategy($strategy);\n\n\t\treturn $strategy;\n\t}", "public function router()\n {\n if (!$this->router) {\n $this->router = Pi::engine()->application()->getRouter();\n }\n\n return $this->router;\n }", "private static function routeInstance()\n\t{\n\t\treturn Route_MD::getInstance();\n\t}", "public function getRouter()\n {\n if (is_null($this->router)) {\n $this->router = new Router($this->input, $this);\n\n $maps = json_decode(file_get_contents(JPATH_BASE . '/src/routes.json'));\n\n if (!$maps) {\n throw new \\RuntimeException('Invalid router file.');\n }\n\n $this->router->addMaps($maps, true);\n $this->router->setDefaultController('Cobalt\\\\Controller\\\\DefaultController');\n }\n\n return $this->router;\n }", "public static function router()\n {\n return DI::getInstance()->get('router');\n }", "public function getIoAdapter()\n {\n if (is_null($this->_ioFile)) {\n $this->_ioFile = new Varien_Io_File();\n }\n return $this->_ioFile;\n }", "public function getRouter()\n {\n if (!$this->router instanceof RouteStackInterface) {\n $this->router = Pi::engine()->application()->getRouter();\n }\n\n return $this->router;\n }", "function router()\n {\n /** @var RouterInterface $router */\n static $router;\n if (!$router) {\n $router = container()->get(Router::class);\n }\n\n return $router;\n }", "public function getResource()\n {\n if (null === $this->handle) {\n $this->handle = fopen($this->path, 'r');\n }\n\n return $this->handle;\n }", "public function getGenerator(): UrlGeneratorInterface\n {\n if (isset($this->generator)) {\n return $this->generator;\n }\n\n if (null === $this->options['cache_dir']) {\n $routes = $this->getRouteCollection();\n $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true);\n if ($compiled) {\n $generatorDumper = new CompiledUrlGeneratorDumper($routes);\n $routes = array_merge($generatorDumper->getCompiledRoutes(), $generatorDumper->getCompiledAliases());\n }\n $this->generator = new $this->options['generator_class']($routes, $this->context, $this->logger, $this->defaultLocale);\n } else {\n $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_generating_routes.php',\n function (ConfigCacheInterface $cache) {\n $dumper = $this->getGeneratorDumperInstance();\n\n $cache->write($dumper->dump(), $this->getRouteCollection()->getResources());\n }\n );\n\n $this->generator = new $this->options['generator_class'](self::getCompiledRoutes($cache->getPath()), $this->context, $this->logger, $this->defaultLocale);\n }\n\n if ($this->generator instanceof ConfigurableRequirementsInterface) {\n $this->generator->setStrictRequirements($this->options['strict_requirements']);\n }\n\n return $this->generator;\n }", "protected function getHandle()\n\t{\n\t\t$destination = $this->getParameter('destination');\n\t\tif(is_null($this->handle)) {\n\t\t\t$this->handle = fopen($destination, $this->getParameter('mode', 'a'));\n\t\t\tif(!$this->handle) {\n\t\t\t\tthrow new AgaviLoggingException('Cannot open stream \"' . $destination . '\".');\n\t\t\t}\n\t\t}\n\t\treturn $this->handle;\n\t}", "public static function getInstance() : Routing\n {\n if (! self::$instance) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public function getFilesystem()\n {\n if ($this->filesystem) {\n return $this->filesystem;\n }\n\n // Do we want to allow variable replacement in adapters that aren't local?\n $path = $this->parseConfigVars((string) $this->getProperty('server_path'));\n $adapter = $this->getFilesystemAdapter();\n\n $filesystem = ee('File')->getPath($path, $adapter);\n $filesystem->setUrl($this->getProperty('url'));\n $this->filesystem = $filesystem;\n\n return $this->filesystem;\n }", "public function Router() {\n if (self::$instance == null)\n self::$instance = new self();\n return self::$instance;\n }", "public function get_route_resolver() {\n\t\treturn $this->route_resolver ?: function () {};\n\t}", "public function getRouteFactory(): ?RouteFactoryInterface\n {\n return $this->routeFactory;\n }", "public static function getInstance() {\n\n if (is_null(self::$instance)) {\n self::$instance = new Router();\n }\n\n return self::$instance;\n }", "public function getRouter()\n\t{\n\t\tif($this->router===null)\n\t\t{\n\t\t\t$this->router = new Router($this->route);\n\t\t\t\n\t\t\t$this->setComponent($this->router);\n\t\t\t$conf = Dispatcher::getActionConfig($this->router->controller,$this->router->action);\n\t\t\t$this->configure($this->conf,$conf);\n\t\t}\n\t\treturn $this->router;\n\t}", "protected function getFilesystem()\n {\n return new Filesystem();\n }", "protected function getRouterService()\n {\n $a = new \\Symfony\\Bridge\\Monolog\\Logger('router');\n $a->pushProcessor(($this->privates['debug.log_processor'] ?? $this->getDebug_LogProcessorService()));\n $a->pushHandler(($this->privates['monolog.handler.console'] ?? $this->getMonolog_Handler_ConsoleService()));\n $a->pushHandler(($this->privates['monolog.handler.main'] ?? $this->getMonolog_Handler_MainService()));\n \\Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddDebugLogProcessorPass::configureLogger($a);\n\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router((new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($this->getService, [\n 'routing.loader' => ['services', 'routing.loader', 'getRouting_LoaderService', false],\n ], [\n 'routing.loader' => 'Symfony\\\\Component\\\\Config\\\\Loader\\\\LoaderInterface',\n ]))->withContext('router.default', $this), 'kernel::loadRoutes', ['cache_dir' => $this->targetDir.'', 'debug' => true, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\CompiledUrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\CompiledUrlGeneratorDumper', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableCompiledUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\CompiledUrlMatcherDumper', 'strict_requirements' => true, 'resource_type' => 'service'], ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService()), ($this->privates['parameter_bag'] ?? ($this->privates['parameter_bag'] = new \\Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBag($this))), $a, $this->getEnv('LOCALE'));\n\n $instance->setConfigCacheFactory(($this->privates['config_cache_factory'] ?? $this->getConfigCacheFactoryService()));\n\n return $instance;\n }", "public static function instance()\n {\n if (null === self::$_instance) {\n $routeCollector = new RouteCollector(\n new \\FastRoute\\RouteParser\\Std,\n new \\FastRoute\\DataGenerator\\GroupCountBased\n );\n self::$_instance = $routeCollector;\n }\n return self::$_instance;\n }", "public function getInstance(array $methods, Resource $resource, callable $handler): Route;", "protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, 'kernel:loadRoutes', array('cache_dir' => $this->targetDirs[0], 'debug' => true, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'srcDevDebugProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'srcDevDebugProjectContainerUrlMatcher', 'strict_requirements' => true, 'resource_type' => 'service'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'});\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n\n return $instance;\n }", "public static function getInstance()\n {\n if (!isset(self::$instance)) {\n self::$instance = new Router();\n }\n\n return self::$instance;\n }", "public function getRouter() : Router;", "public function getAdapter()\n\t{\n\t\tif (!isset($this->config['view'])) {\n\t\t\tthrow new Exception('Route adapter not set!');\n\t\t}\n\n\t\t/** @var ViewAdapterAbstract $adapter_name */\n\t\t$adapter_name = $this->config['view'];\n\n\t\treturn $adapter_name::instance();\n\t}", "public static function getInstance() {\n if (self::$instance == NULL) {\n self::$instance = new Router();\n }\n return self::$instance;\n }", "function router()\n {\n return o2system()->getService('router');\n }", "public static function getInstance()\n {\n if (!isset(self::$instance)) {\n self::$instance = new Router();\n }\n return self::$instance;\n }", "public function path()\n {\n return new RouteParser($this);\n }", "protected function _initRouter()\n {\n return new SimpleRouter();\n }", "protected function getApiPlatform_OperationPathResolver_RouterService()\n {\n return $this->privates['api_platform.operation_path_resolver.router'] = new \\ApiPlatform\\Core\\Bridge\\Symfony\\Routing\\RouterOperationPathResolver(($this->privates['api_platform.router'] ?? $this->getApiPlatform_RouterService()), ($this->privates['api_platform.operation_path_resolver.custom'] ?? $this->getApiPlatform_OperationPathResolver_CustomService()), ($this->privates['api_platform.subresource_operation_factory.cached'] ?? $this->getApiPlatform_SubresourceOperationFactory_CachedService()));\n }", "private function getRoute()\n {\n $method = $this->getUri();\n $rules = Config::getRoute();\n foreach ($rules as $rule => $class) {\n if ($method === $rule && in_array(Config::$initInterface, class_implements($class))) {\n (new $class)->init();\n return;\n }\n }\n throw new \\Exception('Have not init class');\n }", "public function http()\n {\n return $this->requestHandler;\n }", "protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, ($this->targetDirs[2].'/config/routing_dev.yml'), array('cache_dir' => __DIR__, 'debug' => true, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'appDevDebugProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'appDevDebugProjectContainerUrlMatcher', 'strict_requirements' => true), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, NULL);\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->get('config_cache_factory')) && false ?: '_'});\n\n return $instance;\n }", "protected function io()\n {\n if (!$this->io) {\n $this->io = new TerminusStyle($this->input(), $this->output());\n }\n return $this->io;\n }", "public static function getRouter();", "public static function make(): LoggerInterface\n {\n $config = static::getConfig();\n $logSetting = $config['separate_log'] ?? false;\n\n $logger = null;\n\n // see if its a falsy value\n if (!$logSetting) {\n $logger = static::getLaravelLogger();\n }\n\n // see if its a string pointing to a file location\n if (!$logger && is_string($logSetting)) {\n $logger = static::makeSpecificFileLogger($logSetting);\n }\n\n // logSetting is not falsy yet nor a string representing a file\n // use separate file with the default name\n if (!$logger) {\n $logger = static::makeDefaultFileLogger();\n }\n\n return $logger;\n }", "function getImpl($args) {\n\t\t$object = new \\OMV\\System\\Filesystem\\Filesystem($args);\n\t\t$object->setBackend($this);\n\t\treturn $object;\n\t}", "protected function getFileSystem() {\n return new Filesystem();\n }", "protected function getEndpoint()\n {\n return $this->getUseDistSystem()\n ? $this->distEndpoint\n : $this->liveEndpoint;\n }", "public static function route() {\n return $GLOBALS['_input']->route();\n }", "final protected static function getRouter()\n {\n if (!isset(self::$router)) {\n self::$router = new DynamicRouter;\n }\n return self::$router;\n }", "protected function getApiPlatform_RouterService()\n {\n return $this->privates['api_platform.router'] = new \\ApiPlatform\\Core\\Bridge\\Symfony\\Routing\\Router(($this->services['router'] ?? $this->getRouterService()));\n }", "public function getFilesystem()\n {\n if (!$this->filesystem) {\n $this->filesystem = new Filesystem($this);\n }\n return $this->filesystem;\n }", "public function create(): SocketInterface\n {\n return match ($this->implementation) {\n SocketImplementation::SOCKET => $this->createSocketSocket(),\n SocketImplementation::STREAM => $this->createStreamSocket(),\n SocketImplementation::FSOCKOPEN => $this->createFsockopenSocket()\n };\n }", "protected function connector()\n {\n $customCreator = $this->customCreators[$this->driver] ?? null;\n\n if ($customCreator) {\n return $customCreator();\n }\n\n switch ($this->driver) {\n case 'predis':\n return new PredisConnector;\n case 'phpredis':\n return new PhpRedisConnector;\n }\n }", "protected function getApiPlatform_RouterService()\n {\n return $this->privates['api_platform.router'] = new \\ApiPlatform\\Core\\Bridge\\Symfony\\Routing\\Router(($this->services['router'] ?? $this->getRouterService()), 1);\n }", "public static function getInstance() {\r\n if (Router::$s_instance == null) {\r\n Router::$s_instance = new Router();\r\n }\r\n\r\n return Router::$s_instance;\r\n }", "public static function getRouter() {\n static $router;\n if(!isset($router)) {\n $router = new PitRouter;\n $router->setBaseURL('/');\n }\n return $router;\n }", "public function route() {\n \n // Save server variables\n $this->server = (object) array(\n 'data' => $_POST,\n 'query' => $_GET,\n 'name' => $_SERVER['SERVER_NAME'],\n 'address' => $_SERVER['SERVER_ADDR'],\n 'port' => $_SERVER['SERVER_PORT'],\n 'host' => $_SERVER['HTTP_HOST'],\n 'path' => $_SERVER['REDIRECT_URL'],\n 'root' => $_SERVER['DOCUMENT_ROOT'],\n 'protocol' => $_SERVER['SERVER_PROTOCOL']\n );\n \n // Save client information\n $this->client = (object) array(\n 'address' => $_SERVER['REMOTE_ADDR'],\n 'port' => $_SERVER['REMOTE_PORT'],\n 'userAgent' => $_SERVER['HTTP_USER_AGENT']\n );\n \n // Check for path\n if(!isset($this->server->path))\n throw new Exception('Routing path not set');\n \n // Get path array and clean\n $path = explode('/', $this->server->path);\n if($path[0] === '')\n array_shift($path);\n if($path[count($path) - 1] === '')\n array_pop($path);\n \n\n // Get clean path string\n $pstr = '/' . implode('/', $path);\n \n // Execute all bound methods\n try {\n // This is what actually does any routing\n Kernel::bindings('router:route')->execute($path);\n \n // If no match was made\n throw new NotFoundException(\"Resource not found\");\n }\n \n // Handle successful routing\n catch(Completion $object) {\n \n // Do nothing once the request is routed\n // TODO perhaps consider logging?\n }\n \n // Handle any exceptions\n catch(Exception $exception) {\n \n // Update exception\n $exception = new Exception($exception->getMessage() . \" using path `$pstr`\", 0, $exception);\n \n // Try to resolve with error pages\n Kernel::bindings('router:exception')->execute($path, $exception);\n \n // Else throw the error\n throw $exception;\n }\n }", "public function getFilesystem()\n {\n if (!isset($this->filesystem))\n {\n if ($this->isVerbose())\n {\n $this->filesystem = new sfFilesystem($this->dispatcher, $this->formatter);\n }\n else\n {\n $this->filesystem = new sfFilesystem();\n }\n }\n\n return $this->filesystem;\n }", "protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router((new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('routing.loader' => function (): \\Symfony\\Component\\Config\\Loader\\LoaderInterface {\n return ($this->services['routing.loader'] ?? $this->load('getRouting_LoaderService.php'));\n })))->withContext('router.default', $this), 'kernel::loadRoutes', array('cache_dir' => $this->targetDirs[0], 'debug' => false, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'srcProdProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'srcProdProjectContainerUrlMatcher', 'strict_requirements' => NULL, 'resource_type' => 'service'), ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService()), new \\Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBag($this), ($this->privates['logger'] ?? $this->privates['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()));\n\n $instance->setConfigCacheFactory(($this->privates['config_cache_factory'] ?? $this->privates['config_cache_factory'] = new \\Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory()));\n\n return $instance;\n }", "public function route(){\n return new Mapi_Ip_Route($this->param);\n }", "protected function filesystem()\n {\n if (! $this->filesystem instanceof Filesystem) {\n $this->setFilesystem($this->filesystemInstance());\n }\n\n return $this->filesystem;\n }", "public static function init() {\n static $instance = null;\n\n if ($instance === null) {\n $instance = new RouteContainer();\n }\n\n return $instance;\n }", "public function createRouteFactory()\n {\n if ($this->_routeFactory == null) {\n $this->_routeFactory = new RouteFactory($this->createContainer());\n }\n\n return $this->_routeFactory;\n }", "protected function getRoute()\n {\n return isset($this->routeCache[$this->resolving]) ? $this->routeCache[$this->resolving] : null;\n }", "public function getRoute() {\n if ($this->route === null && $this->isIgnoredRoute() === false) {\n $this->route = $this->routes->matchRoute($this);\n }\n\n return $this->route;\n }", "public function getResource($request = NULL)\n {\n if (!$request) {\n $request = new Request();\n }\n\n $route = $this->route($request);\n $filename = $route->getFilename();\n $className = $route->getClass();\n\n if ($filename && is_readable($filename)) {\n require_once($filename);\n }\n\n return new $className($this, $request);\n }", "public static function route()\n\t{\n\t\treturn static::$route;\n\t}", "static public function getRoute()\n {\n $baseUri = $_SERVER['REQUEST_URI'];\n $baseUri = substr($baseUri, 1);\n $uris = explode('/', $baseUri);\n $uris[0] = $uris[0] . CLASS_SUFFIX;\n if(count($uris) !== 2) {\n throw new \\Exception(\"Error formating route\");\n }\n self::executeAction($uris);\n }", "protected function filesystemInstance()\n {\n return Filesystem::create();\n }", "public function getStreamFactory(): StreamFactoryInterface\n {\n return $this->streamFactory;\n }", "public function getRoute() {\n $this->buildRoute();\n\n return $this->route;\n\t}", "public function getRoute();", "public function getRoute();", "public function getRoute();", "public function getRouter(){\n\t\tif($this->router === null){\n\t\t\t$this->router = $this->makeRouter();\n\t\t}\n\t\treturn $this->router;\n\t}", "public function connection($name = null)\n {\n $name = $name ?: $this->getDefault();\n\n if (!isset($this->_connections[$name])) {\n /* @var \\creocoder\\flysystem\\connectors\\ConnectorInterface $connector */\n $connector = $this->getConnectorsLocator()->get($name);\n $this->_connections[$name] = new Filesystem($connector->connect());\n }\n\n return $this->_connections[$name];\n }", "abstract public function getEndpoint();", "protected function getRoutes() {\n $routeFile = $this->_app->config('routing.routeFile');\n if (file_exists($routeFile)) {\n // configuration file requires Router variable to be defined\n /** @noinspection PhpUnusedLocalVariableInspection */\n $router = $this;\n /** @noinspection PhpIncludeInspection */\n include($this->_app->config('routing.routeFile'));\n } else {\n throw new FileNotFoundException('Invalid or no route file was specified in configuration.');\n }\n }", "private function createRouter()\n {\n return new Router(\n new RouteCollection(new RouteFactory()),\n new Generator()\n );\n }", "public function route() {\n\t\treturn $this->route;\n\t}", "public function getHandler()\n {\n if (static::$_handler === null) {\n static::$_handler = new Handler($this->config);\n }\n\n return static::$_handler;\n }", "final public function getResource()\n {\n return $this->socket;\n }", "public static function getInstance()\n {\n if (null === static::$instance) {\n //load the address port and dbs from a file or a DIC - but what about the DIC in the rest slim framework???\n static::$instance = new static();\n }\n return static::$instance;\n }", "public function getFilesystem()\n {\n if (null === $this->filesystem) {\n $this->filesystem = new Filesystem();\n }\n\n return $this->filesystem;\n }", "public function connection()\n\t{\n\t\tif ($this->connection === NULL)\n\t\t{\n\t\t\t$mapperConfig = $this->mapperConfig();\n\n\t\t\tif (isset($mapperConfig['connectionClass']))\n\t\t\t{\n\t\t\t\t$class = $mapperConfig['connectionClass'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$class = $this->factory()->connection($this->type());\n\t\t\t}\n\n\t\t\t$this->connection = new $class($mapperConfig);\n\t\t}\n\n\t\treturn $this->connection;\n\t}", "public function getResource()\n {\n $handle = fopen($this->path, 'r');\n return $handle;\n }", "public function __invoke(): ResponseInterface\n {\n $route = $this\n ->request\n ->getServerParams()['PATH_INFO'];\n\n // if no route found return 404\n if (!isset($this->routes[$route])) {\n return $this->controller->json([], AbstractController::RESPONSE_NOT_FOUND);\n }\n\n // TODO: request method type check\n \n // TODO: global exception handler \n \n $controllerInfo = $this->routes[$route];\n $method = $controllerInfo['method'];\n\n $response = $this\n ->container\n ->get($controllerInfo['controller'])\n ->$method($this->request->getQueryParams());\n\n if (!$response instanceof ResponseInterface) {\n return $this->controller->json([], AbstractController::RESPONSE_NO_CONTENT);\n }\n\n return $response;\n }", "public function getRoute(string $name): IRoute;", "public function getRouter(){\n\t\treturn Registry::get('router');\n\t}", "static private function getRouting()\n {\n $app = self::getSilexApplication();\n\n foreach (self::$available_modules as $class => $route) {\n $module_routing = new ModuleRouting();\n $module_routing\n ->setApp($app)\n ->setModule($class)\n ->setPrefixRoute($route)\n ->generateRouting();\n }\n\n $specific_routing = new SpecificRouting();\n $specific_routing\n ->setApp($app)\n ->generateRouting();\n }", "private function getTransport()\n {\n if ($this->transport) {\n return $this->transport;\n }\n\n $transportClassName = '\\\\Sokil\\\\Upload\\\\Transport\\\\' . $this->options['transport'] . 'Transport';\n\n $this->transport = new $transportClassName(\n $this->options['fieldName'],\n $this->options['supportedFormats'],\n $this->options['validateChecksum']\n );\n \n return $this->transport;\n }", "protected function get__route()\n\t{\n\t\t$route = \"\";\n\t\t$routes = self::getConfig();\n\n\t\t$template = $this->Template;\n\n\t\tif ( ! empty($template))\n\t\t{\n\t\t\t$group = $template->TemplateGroup;\n\t\t\t$name = \"{$group->group_name}/{$template->template_name}\";\n\n\t\t\tif ( ! empty($routes[$name]))\n\t\t\t{\n\t\t\t\t$route = $routes[$name];\n\t\t\t}\n\t\t}\n\n\t\tif (empty($route))\n\t\t{\n\t\t\t$route = $this->route;\n\t\t}\n\n\t\treturn $route;\n\t}", "abstract function &getHandler($portNode);" ]
[ "0.5728421", "0.56790453", "0.5642945", "0.56292874", "0.56292874", "0.5626678", "0.5552771", "0.540827", "0.540827", "0.540761", "0.54072225", "0.5363315", "0.52957124", "0.5291361", "0.52874243", "0.5286259", "0.52728575", "0.52299494", "0.5182032", "0.5167767", "0.51622874", "0.5157789", "0.5149104", "0.5145749", "0.51368606", "0.5135289", "0.51029605", "0.5096525", "0.5083065", "0.5056885", "0.5052928", "0.5038389", "0.50349927", "0.502796", "0.5005209", "0.49911842", "0.49880594", "0.4986476", "0.498616", "0.497965", "0.4970007", "0.49660307", "0.4963431", "0.49613467", "0.4959013", "0.49373075", "0.49268273", "0.49253818", "0.49233848", "0.49195737", "0.49176344", "0.49157992", "0.49076998", "0.49060425", "0.48945254", "0.48888007", "0.48879132", "0.4874449", "0.4873733", "0.48713598", "0.48677883", "0.48567757", "0.48320365", "0.48177457", "0.48161277", "0.48154047", "0.48116297", "0.48015043", "0.47888887", "0.47799265", "0.4777246", "0.4767312", "0.47669625", "0.47663164", "0.47650254", "0.47451428", "0.4740773", "0.47310027", "0.47297257", "0.47297257", "0.47297257", "0.47278333", "0.47271523", "0.47258124", "0.4725707", "0.4719993", "0.47174773", "0.47135416", "0.4696144", "0.46959397", "0.46862602", "0.46846664", "0.4683465", "0.46760648", "0.46742186", "0.4673706", "0.46692058", "0.46688318", "0.46668747", "0.46650514" ]
0.7483556
0
Validate that the shared secret is present, either from the constructor or an environment variable.
Проверьте, что общий секрет присутствует, либо из конструктора, либо из переменной окружения.
private function checkSharedSecret($sharedSecret) { if (!is_null($sharedSecret)) { return $sharedSecret; } $sec = getenv('APPLE_IAP_SHARED_SECRET'); if (!is_null($sec) && $sec) { return $sec; } throw new IAPSharedSecretException('An error was encountered whilst setting the Shared Secret. Ensure one is set.', 100021004); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSecretRequired() {\r\n\t\t$config = array('secret' => '');\r\n\t\t$hd3 = new HD3($config);\r\n\t}", "private function checkKey()\n {\n if ($this->secret == null)\n throw new \\Exception(\"Secret must be set\");\n }", "private function validateSecret()\n\t{\n\t\tif (strcmp($this->secret,NET_AUTO_REGISTER_SECRET)!==0)\n\t\t{\n\t\t\t$this->db->logMessage(\"[\".get_class($this).\"] could not register device from IP \".$this->ipv4.\" because of a wrong secret [\".$this->secret.\"]\");\n\t\t\t$this->db->blockIPv4($this->ipv4);\n\t\t\t$this->response->back(NET_SECRET_WRONG);\n\t\t}\n\t}", "function commandline_cron_validate_secret($secret) {\n\t\n\tif (empty($secret)) {\n\t\treturn false;\n\t}\n\t\n\t$correct_secret = commandline_cron_generate_secret();\n\tif (empty($correct_secret)) {\n\t\treturn false;\n\t}\n\t\n\treturn ($secret === $correct_secret);\n}", "function is_secret_key_valid( $secretkey ) {\n \n $api_key = get_option( 'ppom_rest_secret_key', true );\n \n $key_valide = false;\n \n if( trim($api_key == $secretkey) )\n $key_valide = true;\n \n return $key_valide;\n }", "static public function applicationCredentialExists() {\n $keys = self::getHeadersKeys();\n\n $request = restful_parse_request();\n\n $public_passed = !empty($request['__application'][$keys['public']]);\n $secret_passed = !empty($request['__application'][$keys['secret']]);\n\n return $public_passed && $secret_passed;\n }", "public function validate(string $secret): bool;", "public static function hasSecretIdField(): bool;", "private function get_secret_key()\n {\n switch (get_option('hb_sharegroop_mode')) {\n case 'test':\n return get_option('hb_sharegroop_test_secret_key');\n case 'live':\n return get_option('hb_sharegroop_live_secret_key');\n }\n }", "function init() {\n\t\t$secret = 'z' . _elgg_services()->crypto->getRandomString(31);\n\n\t\tif (_elgg_services()->datalist->set('__site_secret__', $secret)) {\n\t\t\treturn $secret;\n\t\t}\n\n\t\treturn false;\n\t}", "public function get_app_secret() {\n\t\tif (!empty($this->app_secret)) {\t\n\t\t\treturn $this->app_secret;\n\t\t} else {\n\t\t\t throw new Exception('Application secret is Missing');\n\t\t}\n\t}", "public function isConfigured()\n {\n if (HSetting::Get('secret') != \"\") {\n return true;\n }\n return false;\n }", "function advanced_notifications_validate_secret($secret) {\n\t$result = false;\n\t\n\tif (!empty($secret)) {\n\t\t$correct_secret = advanced_notifications_generate_secret();\n\t\tif (!empty($correct_secret)) {\n\t\t\tif ($secret === $correct_secret) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "abstract protected function getSecret(): string;", "public function getSecret();", "public function getSecret();", "public function getSecret();", "static function validateSecretCode($code) {\n if (!empty($code) && is_scalar($code) && preg_match('~^\\\\w{' . SECRET_KEY_LENGTH . '}+$~', $code)\n && file_exists(USER_DATA_DIRECTORY . $code . '.php')) {\n return $code;\n }\n return null;\n }", "public function validateKeys()\n {\n if (in_array(null, [$this->secret, $this->clientId, $this->environment])) {\n throw PlaidException::missingKeys();\n }\n\n if (! in_array($this->environment, ['sandbox', 'development', 'production'])) {\n throw PlaidException::invalidEnvironment();\n }\n }", "protected function ensureValidPhappEnvironment() {\n // Ensure the PHAPP_ENV variable will be set after running the environment\n // command.\n $command = ' ;[ ! -z \"$PHAPP_ENV\" ]';\n if ($env_command = $this->manifest->getCommand('environment')) {\n $command = trim($env_command) . ' ' . $command ;\n }\n $process = Process::fromShellCommandline($this->ensureCommandRunsViaBash($command));\n if ($this->workingDirectory) {\n $process->setWorkingDirectory($this->workingDirectory);\n }\n $exit_code = $process->run();\n\n if ($exit_code != 0) {\n throw new PhappEnvironmentUndefinedException();\n }\n }", "public function getSecret()\n {\n return '__SECRET__';\n }", "protected function _getSharedSecret()\n\t{\n\t\treturn $this->_getHelper()->getSharedSecret();\n\t}", "public function getSecret(): ?string;", "public function getClientSecret();", "public function getClientSecret();", "public function setSecret(): void\n {\n $secret = config('terminal-africa.secret');\n\n if (! $secret) {\n throw TerminalAfricaException::secretKeyNotSet();\n }\n\n $this->secret = $secret;\n }", "private function ensureAppKey()\n {\n if (! $this->app['config']['app.key']) {\n if (! $key = Config::getAppKey()) {\n $this->createAndSaveKey();\n }\n\n $this->app['config']['app.key'] = $key;\n }\n }", "public function testCreateNamespacedSecret()\n {\n }", "public function CheckKeys(){\n $key = Config::inst()->get('AddressFinderField', 'Key');\n $secret = Config::inst()->get('AddressFinderField', 'Secret');\n\n if(isset($key) && isset($secret)){\n return true;\n }\n return false;\n }", "public function __construct(string $secret)\n {\n $this->secret = $secret;\n }", "function is_valid_vircurex_apisecret($key) {\r\n\treturn strlen($key) >= 1 && strlen($key) <= 255;\r\n}", "public function getEnvClientSecret()\n {\n return getenv('INFUSIONSOFT_CLIENT_SECRET');\n }", "private function hasAwsCredentials()\n {\n $mustBeNonEmpty = array(\n 'AWS_S3_KEY',\n 'AWS_S3_SECRET',\n 'AWS_S3_REGION',\n 'AWS_S3_BUCKET',\n 'AWS_S3_BUCKET_SUBFOLDER'\n );\n\n foreach($mustBeNonEmpty as $envVar) {\n if(empty(getenv($envVar))) {\n return false;\n }\n }\n\n return true;\n }", "function is_valid_cexio_apisecret($key) {\r\n\treturn strlen($key) >= 20 && strlen($key) <= 32 && preg_match(\"#^[A-Za-z0-9]+$#\", $key);\r\n}", "function is_valid_btce_apisecret($key) {\r\n\treturn strlen($key) == 64 && preg_match(\"#^[a-z0-9]+$#\", $key);\r\n}", "public static function SECRET()\n {\n return self::load(self::SECRET);\n }", "function is_valid_mtgox_apisecret($key) {\r\n\treturn strlen($key) > 36 && preg_match('#^[A-Za-z0-9/\\\\+=]+$#', $key);\r\n}", "function are_key_constants_set() {\n\t\treturn defined( 'AWS_ACCESS_KEY_ID' ) && defined( 'AWS_SECRET_ACCESS_KEY' );\n\t}", "public function getIsSecret()\n {\n if (array_key_exists(\"isSecret\", $this->_propDict)) {\n return $this->_propDict[\"isSecret\"];\n } else {\n return null;\n }\n }", "public function getSecret() : string;", "public function isSecret()\n {\n return !$this->isPublic();\n }", "protected function validateGeneral() {\n\t\t$tempKey = $this->getTempKey();\n\t\t$time = $this->getStartTime();\n\t\treturn (\n\t\t\t!empty($tempKey)\n\t\t\tAND !empty($time)\n\t\t\tAND preg_match('/[a-z0-9]{' . self::SECRET_KEY_LENGTH . '}/i', $tempKey)\n\t\t\tAND is_integer($time)\n\t\t\tAND abs(time() - $time) <= self::PROCESS_LIFETIME\n\t\t);\n\t}", "public function testSecretValue(){\n $this->assertEquals( $this->secretValue(), $this->credentialsObject()->getSecret());\n }", "abstract protected function getConfirmationSecret();", "protected function checkEnvVariable()\n {\n $key = $this->checkKey();\n $output = $this->execSSH(\"cd $this->domain;cat .env\");\n if (str_contains($output, $key)) {\n $this->info(\"Key $key found in remote environment file\");\n } else {\n $this->error(\"Key $key NOT found in remote environment file\");\n }\n }", "function is_valid_bitstamp_apisecret($key) {\r\n\treturn strlen($key) == 32 && preg_match(\"#^[A-Za-z0-9]+$#\", $key);\r\n}", "function env_has(string $key): bool\n{\n return \\array_key_exists($key, $_ENV);\n}", "public function ajax_validate_secret_key() {\r\n\t\tcheck_ajax_referer( 'gf_stripe_ajax', 'nonce' );\r\n\r\n\t\tif ( ! GFCommon::current_user_can_any( $this->_capabilities_settings_page ) ) {\r\n\t\t\twp_send_json_error( array( 'message' => esc_html__( 'Access denied.', 'gravityformsstripe' ) ) );\r\n\t\t}\r\n\r\n\t\t// Load the Stripe API library.\r\n\t\tif ( ! class_exists( 'GF_Stripe_API' ) ) {\r\n\t\t\trequire_once 'includes/class-gf-stripe-api.php';\r\n\t\t}\r\n\r\n\t\t$stripe = new GF_Stripe_API( rgpost( 'key' ) );\r\n\r\n\t\t// Initialize validity state.\r\n\t\t$is_valid = true;\r\n\r\n\t\t$account = $stripe->get_account();\r\n\t\tif ( is_wp_error( $account ) ) {\r\n\t\t\t$this->log_error( __METHOD__ . '(): ' . $account->get_error_message() );\r\n\r\n\t\t\t$is_valid = false;\r\n\t\t}\r\n\r\n\t\t// Prepare response.\r\n\t\t$response = $is_valid ? 'valid' : 'invalid';\r\n\r\n\t\t// Send API key validation response.\r\n\t\tdie( $response );\r\n\r\n\t}", "public function getConsumerSecret();", "public function getConsumerSecret();", "private function checkKeys()\n {\n if ($this->secretKey == null)\n throw new \\Exception(\"Project key should not be empty\");\n\n if ($this->projectId == null)\n throw new \\Exception(\"Project id should not be empty\");\n }", "protected function validServerSecret($secret)\n\t{\n\t\t//check secret valid\n\t\t$sl = $this->getServiceLocator();\n\t\t/* @var $server \\HtAuthentication\\Model\\Server */\n\t\t$server = $sl->get('Server');\n\t\t$serverObject = $server->getBySecret($secret);\n\t\tif (!$serverObject) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public static function checkSecurityKeys()\n {\n if (Security::getSalt() === '__SALT__') {\n trigger_error(sprintf('Please change the value of %s in %s to a salt value specific to your application.', '\\'Security.salt\\'', 'ROOT/config/app.php'), E_USER_NOTICE);\n }\n }", "private static function validate( $key = null, $value = null ) {\n\t\tif ( empty( $key ) && empty( $value ) ) {\n\t\t\tthrow new InvalidArgumentException('nothing to validate');\n\t\t}\n\n\t\tif ( $key === 'environment' && ! in_array( $value, self::$_validEnvironments ) ) {\n\t\t\tthrow new Exception('\"' . $value . '\" is not a valid environment.');\n\t\t}\n\n\t\tif ( ! isset( self::$_cache[ $key ] ) ) {\n\t\t\tthrow new Exception( $key . ' is not a valid configuration setting.' );\n\t\t}\n\n\t\tif ( empty( $value ) ) {\n\t\t\tthrow new InvalidArgumentException( $key . ' cannot be empty.' );\n\t\t}\n\n\t\treturn true;\n\t}", "protected function checkEnvironmentOrDie() {}", "protected function checkEnvironmentOrDie() {}", "private function get_secret_key()\n {\n $secret_key = $this->params['test_secret_key'];\n if ($this->params['mode'] === 'live')\n {\n $secret_key = $this->params['live_secret_key'];\n }\n \n return $secret_key;\n }", "function is_valid_cryptotrade_apisecret($key) {\r\n\treturn strlen($key) == 40 && preg_match(\"#^[a-f0-9]+$#\", $key);\r\n}", "public function setSecret($var)\n {\n GPBUtil::checkString($var, True);\n $this->secret = $var;\n\n return $this;\n }", "private function checkConfig()\n {\n foreach (config('topdesk') as $key => $config) {\n if ($config === null) {\n throw new ConfigNotFound(\"You need to set the config for env('topdesk.\".$key.\"')\", 400);\n }\n if ($config === '') {\n throw new ConfigNotFound(\n \"It seems unlikely that the env('topdesk.\".$key.\"') should be an empty string!? I don't work with people like that!\",\n 400\n );\n }\n }\n }", "function is_valid_796_apisecret($key) {\r\n\treturn strlen($key) == 60 && preg_match(\"#^[A-Za-z0-9\\\\+\\\\/]+$#\", $key);\r\n}", "private static function csrfGetSecret() {\n\t\t$file = 'include/csrfmagic/csrf-secret.php';\n\t\t$secret = '';\n\t\tif (file_exists($file)) {\n\t\t\tinclude $file;\n\t\t}\n\t\treturn $secret;\n\t}", "protected function checkSecret($hookSecret)\n\t{\n\t\tif (!$this->app->input->server->get('HTTP_X_HUB_SIGNATURE', false))\n\t\t{\n\t\t\tthrow new \\Exception(\"HTTP header 'X-Hub-Signature' is missing.\");\n\t\t}\n\n\t\tif (!extension_loaded('hash'))\n\t\t{\n\t\t\tthrow new \\Exception(\"Missing 'hash' extension to check the secret code validity.\");\n\t\t}\n\n\t\tlist($algo, $hash) = explode('=', $this->app->input->server->get('HTTP_X_HUB_SIGNATURE'), 2) + array('', '');\n\n\t\tif (!in_array($algo, hash_algos(), TRUE))\n\t\t{\n\t\t\tthrow new \\Exception(\"Hash algorithm '$algo' is not supported.\");\n\t\t}\n\n\t\t$this->rawPost = file_get_contents('php://input');\n\n\t\tif ($hash !== hash_hmac($algo, $this->rawPost, $hookSecret))\n\t\t{\n\t\t\tthrow new \\Exception('Hook secret does not match.');\n\t\t}\n\t}", "public static function getAppSecret()\n {\n $app_secret = sfConfig::get('app_facebook_app_secret', \"xxx\");\n if ( \"xxx\" == $app_secret ) {\n throw new Exception('{m14tFacebookConnect} No App Secret set!');\n }\n return $app_secret;\n }", "public function getConsumerSecret(): string;", "public function testReadNamespacedSecret()\n {\n }", "public function getTokenSecret();", "public function secret() {\n return $this->get('secret');\n }", "public function validateIfApiuserValidCredentials($username, $secret);", "public function testSecretDirNotExistException()\n {\n $dockerSecretInstance = new SecretsReader();\n $dockerSecretInstance->read('not_existing_secret');\n }", "public function getSecret()\n {\n return $this->getParameter('secret');\n }", "public function getSecret()\n {\n return $this->getParameter('secret');\n }", "public function getSecret()\n {\n return $this->getParameter('secret');\n }", "private function checkAppToken() {\n\n // check app token (if needed)\n if (!isset($this->parameters['app_token'])) {\n $this->parameters['app_token'] = \"\";\n }\n if (!$this->apiclients_id = array_search($this->parameters['app_token'], $this->app_tokens)) {\n if ($this->parameters['app_token'] != \"\") {\n $this->returnError(__(\"parameter app_token seems wrong\"), 400,\n \"ERROR_WRONG_APP_TOKEN_PARAMETER\");\n } else {\n $this->returnError(__(\"missing parameter app_token\"), 400,\n \"ERROR_APP_TOKEN_PARAMETERS_MISSING\");\n }\n }\n }", "public function getValidAccessToken()\n {\n return getenv('VALID_ACCESS_TOKEN');\n }", "public function setSecret($secret)\n {\n }", "function requiresAuth()\n {\n // If the site is \"private\", all API methods except ShaiShai/config\n // need authentication\n\n if (common_config('site', 'private')) {\n return true;\n }\n\n // check whether a user has been specified somehow\n\n $id = $this->arg('id');\n $user_id = $this->arg('user_id');\n $screen_name = $this->arg('screen_name');\n\n if (empty($id) && empty($user_id) && empty($screen_name)) {\n return true;\n }\n\n return false;\n }", "public function testSecretNotExistException()\n {\n $this->secretReader->read('not_existing_secret');\n }", "public static function authKeyNotProvided()\n {\n return new static('Auth key for Gammu Api was not provided.');\n }", "public function setSecret($secret = \"\")\n {\n $this->secret = $secret;\n }", "public function checkAppKey()\n {\n // $appKey = trim($this->_request->getParam('appKey'));\n // Currently we will allow all.\n return true;\n }", "public static function verifyKey(): bool\n {\n $key = $_COOKIE;\n $config = (require __DIR__ . '/../config.php')['db'];\n $db = new DB1($config['dbname'], $config['login'], $config['password']);\n $password = $db->connect()->execute('SELECT * FROM nineth.admin')[0]['password'];\n if (isset($key['secretkey']) && $password === $key['secretkey']) {\n return true;\n }\n return false;\n }", "function valid_consumer_keypair()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$this->get_request_token();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch(Exception $e)\r\n\t\t{\r\n\t\t\t$this->response_code;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function loadSiteKey() {\n $dir = __DIR__ . '/../app_data';\n $required_vars = ['SIGNING_KEY'];\n DotEnv::load($dir, $required_vars);\n}", "public function getAuthSecret(): string;", "private function keyExists()\n {\n if (! file_exists($this->token_path))\n $this->returnError(401, [\n 'error' => 'key not valid',\n 'input' => 'key: ' . $this->access_key,\n 'suggest' => 'url: https://jaevalen.com/Register/'\n ]);\n }", "public function check_availability() {\n \n // Verify if app_id and app_secret exists\n if ( ($this->app_id != '') && ( $this->app_secret != '') ) {\n \n return true;\n \n } else {\n\n return false;\n\n }\n \n }", "public function testNowEnvRequiredCanBeUsedWithoutLoadingFile()\n {\n putenv('REQUIRED_VAR=1');\n\n $nowenv = new NowEnv($this->_fixturesFolder);\n $nowenv->required('REQUIRED_VAR')->notEmpty();\n\n $this->assertTrue(true);\n }", "function __construct( $key = NULL, $secret = NULL )\n\t{\n\t\t$this->key = $key;\n\t\t$this->secret = $secret;\n\t}", "function validate_token($secret_key)\n{\n $auth_token = isset($_SERVER[\"HTTP_AUTH_TOKEN\"]) ? $_SERVER[\"HTTP_AUTH_TOKEN\"] : null;\n\n if (!$auth_token) {\n return false;\n }\n\n $authService = new AuthService();\n $verification = $authService->verify_jwt($auth_token, $secret_key);\n\n if (!$verification) {\n return false;\n }\n\n $decoded = json_decode(json_encode($verification), true);\n return $custom_data = $decoded['data'];\n}", "protected function has_client_credentials(){\n\n if (empty(get_option(WP_LOCATOR_OAUTH_CLIENT_ID)) || empty(get_option(WP_LOCATOR_OAUTH_CLIENT_SECRET))){\n\n return false;\n\n }\n\n return true;\n }", "protected function has_valid_sesskey() {\n if (!confirm_sesskey($this->sesskey)) {\n throw new \\Exception('invalid_sesskey');\n }\n }", "public function testGetClientSecret()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "static private function verifySymmetricKeyEnvironment()\n\t{\n\t\tif (!extension_loaded('mcrypt')) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The PHP %s extension is required, however is does not appear to be loaded',\n\t\t\t\t'mcrypt'\n\t\t\t);\n\t\t}\n\t\tif (!function_exists('mcrypt_module_open')) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The cipher used, %1$s (also known as %2$s), requires libmcrypt version 2.4.x or newer. The version installed does not appear to meet this requirement.',\n\t\t\t\t'AES-192',\n\t\t\t\t'rijndael-192'\n\t\t\t);\n\t\t}\n\t\tif (!in_array('rijndael-192', mcrypt_list_algorithms())) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The cipher used, %1$s (also known as %2$s), does not appear to be supported by the installed version of libmcrypt',\n\t\t\t\t'AES-192',\n\t\t\t\t'rijndael-192'\n\t\t\t);\n\t\t}\n\t}", "public function get_secret_key()\n\t{\n\t\treturn $this->is_test_mode() ? $this->secret_key_test : $this->secret_key;\n\t}", "public function get_test_secret_key() {\n\t\treturn $this->get_option( 'test_secret_key' );\n\t}", "function createSecret(): string\n {\n if (!isset($this->otp)) {\n $this->otp = TOTP::create();\n }\n return $this->otp->getSecret();\n }", "public static function getSiteSecret() {\n $secret = sfConfig::get('app_appFlower_siteSecret');\n if (!$secret) {\n throw new sfConfigurationException('Configure app_appFlower_siteSecret.');\n }\n return $secret;\n }", "function _drush_bootstrap_drush_validate() {\n // @todo _drush_environment_php_ini_checks() always returns TRUE.\n $return = _drush_environment_check_php_ini();\n if ($return !== TRUE) {\n return $return;\n }\n\n if (drush_environment_lib() === FALSE) {\n return FALSE;\n }\n\n if (drush_environment_table_lib() === FALSE) {\n return FALSE;\n }\n\n return TRUE;\n}", "public function getClientSecret(): string\n {\n return (string) Craft::parseEnv($this->clientSecret);\n }" ]
[ "0.6596329", "0.6552299", "0.63359183", "0.62482417", "0.6159209", "0.6078702", "0.6002188", "0.5943635", "0.5759173", "0.5746942", "0.5724714", "0.5711327", "0.5710372", "0.5707937", "0.56542766", "0.56542766", "0.56542766", "0.56377584", "0.56364757", "0.5629885", "0.5614603", "0.5595957", "0.5567296", "0.55662173", "0.55662173", "0.5559202", "0.55553824", "0.5541857", "0.5535729", "0.5534827", "0.5531145", "0.5508921", "0.5488493", "0.5469328", "0.54364556", "0.54348475", "0.5411403", "0.5406302", "0.5405663", "0.53951263", "0.53927684", "0.5382446", "0.5364433", "0.535628", "0.53556687", "0.53492916", "0.53222233", "0.53208333", "0.5313885", "0.5313885", "0.5305806", "0.5302152", "0.53008765", "0.52915573", "0.52774054", "0.52774054", "0.52739286", "0.52634346", "0.5258896", "0.5248887", "0.524219", "0.5237422", "0.52345735", "0.52338576", "0.52309936", "0.5229627", "0.5214921", "0.5202792", "0.52008075", "0.5185369", "0.5180508", "0.5180508", "0.5180508", "0.5164152", "0.5152719", "0.5145684", "0.5126227", "0.512492", "0.51158684", "0.5115737", "0.5100118", "0.50740826", "0.5073396", "0.5071524", "0.5067138", "0.5063707", "0.505419", "0.5048518", "0.50482506", "0.5046446", "0.5045711", "0.5037368", "0.5028538", "0.50128746", "0.50055546", "0.49988684", "0.49921048", "0.49899486", "0.49865404", "0.49863538" ]
0.71178234
0
Sanitise the receipt data.
Очистите данные чека.
private function sanitise($receiptData) { return str_replace("\r\n", '', $receiptData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function cleanData()\n {\n $this->sanitizeData();\n }", "public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return strip_tags($purifier->purify($field));\n },\n $this->_data\n );\n }", "public static function clean_sensitive_data($data)\n\t{\n\t\t$internal_keys = array('formbuilder_id', 'redirect', 'failpage', 'checkout', 'token');\n if (!empty($data) && is_array($data)) {\n foreach ($data as $key => $value)\n {\n if (is_string($value))\n {\n $data[$key] = htmlspecialchars($value);\n }\n\n if (substr($key, 0, 2) == 'cc') // Remove credit card information\n {\n unset($data[$key]);\n }\n elseif (in_array($key, $internal_keys)) // Remove information for internal operations\n {\n unset($data[$key]);\n }\n }\n }\n\t\treturn $data;\n\t}", "public function sanitize(&$data);", "function clean_data($data) {\n\t\t\t\t\t\t\t$data = trim($data);\n\t\t\t\t\t\t\t// Un-quotes quoted string\n\t\t\t\t\t\t\t$data = stripslashes($data);\n\t\t\t\t\t\t\t// Convert special characters to HTML entities\n\t\t\t\t\t\t\t$data = htmlspecialchars($data);\n\t\t\t\t\t\t\treturn $data;\n\t\t\t\t\t\t}", "function cleanData($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean_input($data){\n $data = strip_tags($data);\n $data = trim($data);\n $data = htmlentities($data);\n $data = htmlspecialchars($data);\n $data = strIpslashes($data);\n\n return $data;\n }", "public static function purify($data)\n {\n if ((isset($data) && ($data != '')) && strlen($data) < 255 ) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');\n\n return $data;\n }\n }", "function sanitise($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "function cleanData($data){\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "public static function sanitize($data) {\n\t\t\n\t\tif (is_array($data) ) {\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$data[$key]= self::sanitize($value);\n\t\t\t}\n\t\t}\t\n\t\telse if (is_object($data) ) {\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$data->$key= self::sanitize($value);\n\t\t\t}\n\t\t}else{\t\t\n\t\t\t$data = trim($data);\n\t\t\t$data = htmlspecialchars($data, ENT_QUOTES);\n\t\t}\n\t\treturn $data;\n\t}", "function clean_input($data) {\n $data = trim($data); // strips unnecessary characters from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n }", "function safe_data($body) {\r\n\r\n\t//remove excess whitespace\r\n\t$body = trim($body);\r\n\r\n\t//return null for nothing input\r\n\tif (strlen($body) == 0) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\t//validate characters\r\n\t$body = validate($body);\r\n\r\n\t//limit line length for single line entries\r\n\tif (strlen($body) > 100) {\r\n\t\t$body = substr($body, 0, 100);\r\n\t}\r\n\r\n\t//remove line breaks (not allowed in single lines!)\r\n\t$body = strtr($body, array(\"\\r\"=>' ', \"\\n\"=>' '));\r\n\r\n\t$body = clean_up($body);\r\n\r\n\treturn $body;\r\n}", "public function sanitizeData($data) {\n\t if (empty ( $data )) {\n\t\t return $data;\n\t }\n\t if (is_array ( $data )) {\n\t\t foreach ( $data as $key => $val ) {\n\t\t\t $data [$key] = $this->sanitizeData ( $val );\n\t\t }\n\t\t return $data;\n\t } else {\n\t\t $data = trim ( strip_tags ( $data ) );\n\t\t return $data;\n\t }\n }", "function sanitiseInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean($data)\n {\n if (is_array($data)) {\n return array_map(function($item) {\n return clean_xss($item);\n }, $data);\n }\n return clean_xss($data);\n }", "function clean($data){\n $data = htmlspecialchars($data);\n $data = stripslashes($data);\n $data = trim($data);\n return $data;\n }", "function SetData(&$unvalidated)\n {\n $this->_data = array();\n @reset($unvalidated);\n foreach($unvalidated as $key => $val) {\n if (strlen($val))\n $this->_data[$key] = htmlspecialchars($val);\n }\n }", "public static function clean($data) {\n\t\tif (empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (is_array($data)) {\n\t\t\tforeach ($data as $key => $val) {\n\t\t\t\t$data[$key] = Sanitize::clean($val);\n\t\t\t}\n\t\t\treturn $data;\n\t\t} else {\n\t\t\t$data = trim($data);\n\t\t\t$data = Sanitize::html($data);\n\t\t\treturn $data;\n\t\t}\n\t}", "private function sanitize_data( &$data ){\n foreach($data as $key => $val){\n if(is_array($val)){\n foreach($val as $sub_key => $sub_val){\n $val[$sub_key] = filter_var($sub_val,FILTER_SANITIZE_STRING);\n }\n } else{\n $data[$key] = filter_var($val,FILTER_SANITIZE_STRING);\n }\n }\n }", "function clean($data) {\n $data = trim($data);\n $data= stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function cleanData($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "private function cleanData($data){\t\n\t\treturn $data;\n\t}", "function sanitise_input($data) {\n\t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean_input($data) \n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "protected function clean($data)\n {\n $data = str_replace(\n array(\n '”','‘','’','´','“','€',\"\\r\",\"\\n\",\n ),array(\n '\"',\"'\",\"'\",\"'\",'\"','&euro;','','',\n ),$data);\n\n return str_replace('\"', '\"\"', $data);\n }", "function clean_post_input($data) {\n /* trim whitespace */\n $data = trim($data);\n \n $data = htmlspecialchars($data);\n return $data;\n }", "public function CleanData($data){\n\t\t\t$data = trim($data);\n\t\t\t$data=htmlentities($data,ENT_QUOTES, 'UTF-8');\n\t\t\t$data = filter_var($data,FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\treturn $data;\n\t\t\t}", "public function CleanData($data){\n\t\t\t$data = trim($data);\n\t\t\t$data=htmlentities($data,ENT_QUOTES, 'UTF-8');\n\t\t\t$data = filter_var($data,FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\treturn $data;\n\t\t\t}", "public function CleanData($data){\n\t\t\t$data = trim($data);\n\t\t\t$data=htmlentities($data,ENT_QUOTES, 'UTF-8');\n\t\t\t$data = filter_var($data,FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\treturn $data;\n\t\t\t}", "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "public function cleanInput($data) {\n $data = trim($data);\n $data = str_replace(\"'\", \"\\'\", $data);\n $data = htmlspecialchars($data);\n $data = stripslashes($data);\n\n return $data;\n }", "function clean_input($data){\r\n\t\t$data = trim($data);\r\n\t\t$data = stripslashes($data);\r\n\t\t$data = htmlspecialchars($data);\r\n\t\treturn $data;\r\n\t}", "function cleanInput($data) {\n\t\n\t$data = trim($data); // removes spaces, tabs and new lines\n\t$data = stripslashes($data); // removes any back slashes\n\t$data = htmlspecialchars($data); //convert special characters to entity codes\n\t\n\treturn $data;\n\n}", "public function sanitize()\n {\n $inputs = $this->all();\n\n foreach ($inputs as $field => $value) {\n $inputs[$field] = filter_var($value, FILTER_SANITIZE_STRING);\n }\n\n $this->replace($inputs);\n }", "function clean_input($data){\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t}", "function clean_input($data){\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t}", "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n }", "function clean_data($data){\n $data = trim($data);\n $data = stripslashes($data);\n \n return $data;\n }", "function Sanitize_Data($data)\n{\n $data = trim($data);\n $data = htmlspecialchars($data);\n $data = stripslashes($data);\n return $data;\n}", "function sanitize($data) {\n if(is_array($data)) {\n foreach($data as $key => $contents) {\n $data[$key] = sanitize($contents);\n }\n return $data;\n } else {\n $data = trim($data);\n if(get_magic_quotes_gpc()) {\n $data = stripslashes($data);\n }\n $data = mysql_real_escape_string(htmlspecialchars($data));\n return $data;\n }\n }", "function cleanInput($data) {\n \t$data = trim($data);\n \t$data = stripslashes($data);\n \t$data = htmlspecialchars($data);\n \treturn $data;\n }", "protected function sanitize_values( $data ) {\n\t\t$data = lib2()->array->get( $data );\n\t\tif ( ! isset( $data['field'] ) ) { $data['field'] = ''; }\n\t\tif ( ! isset( $data['correlation'] ) ) { $data['correlation'] = ''; }\n\t\tif ( ! isset( $data['value'] ) ) { $data['value'] = ''; }\n\n\t\treturn $data;\n\t}", "public function sanitizeData(&$data)\n {\n $not_include = ['winning_numbers', 'powerball', 'megaball', 'cash_ball', 'bonus', 'power_play'];\n foreach ($data as $delta => &$row) {\n if (!in_array($delta, $not_include)) {\n $data->{$delta} = trim($row);\n if ($row == 'NULL') {\n $data->{$delta} = '';\n }\n if (is_numeric($row)) {\n $data->{$delta} = floatval($row);\n if (strpos($row, '000') > -1) {\n $data->{$delta} = intval($row);\n }\n }\n }\n }\n }", "public static function sanitizeData( $data ) {\n $data = sanitize_text_field(stripslashes_deep( $data ) );\n return $data;\n }", "public function clean($data)\n {\n $this->setRawData($data);\n\n $value = trim($data);\n\n if (!$value) $value = null;\n\n $this->setData($value);\n }", "function clean($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function clean($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "public function sanitize(array $data);", "protected function cleanData(&$data){\n\n }", "function validate_data($data){\r\n\t\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\t\treturn $data;\r\n\t\t\t\t\t}", "function cleanup($data) {\r\n return $data;\r\n \r\n // do not ignore empty spaces!\r\n\t\tif (strlen(trim($data)) > 0) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t}", "protected function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = strip_tags($data);\n $data = filter_var($data, FILTER_SANITIZE_STRING);\n $data = htmlspecialchars($data);\n return $data;\n }", "private function sanitizePlain($data) {\n\t\t$res = filter_var($data, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW);\n\t\treturn $res;\n\t}", "function cleaning($data)\n{\n$data = cleanInput($data); // curatire pt. atacuri XSS cros site scripting \n// a mySQL connection is required before using this function\n// transforma caracterele speciale in escape (\\x00, \\n, \\r, \\, ', \" and \\x1a.) \n// $data = mysql_real_escape_string($data);\nreturn $data;\n}", "function filter_any_data($data){\n\t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "function cleanInput($data) { \r\n return htmlspecialchars(stripslashes(trim($data)));\r\n }", "function process_input($data) {\n\t $data = trim($data);\n\t $data = stripslashes($data);\n\t $data = htmlspecialchars($data);\n\t return $data;\n\t}", "public static function scrubInput($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function sanitize($data) {\n \n//trim whitespace, convert special chars (including quotes) to html entitites, get rid of slashes, replace (',') with '' so an array can't be input\n trim( htmlspecialchars (stripslashes ( str_replace( array( '(', ')' ), '', $data ) ) ), ENT_QUOTES );\n \n return $data;\n }", "public static function sanitizeData ($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n\n return $data;\n }", "static function sanitize_basic($data) {\r\n $data = trim($data); //strip unnecessary characters (extra space, tab, newline)\r\n $data = stripslashes($data); //remove backslashes (\\)\r\n $data = htmlspecialchars($data); //converts special characters to HTML entities\r\n $data = filter_var($data, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\r\n return $data;\r\n }", "function wprt_sanitize_data( $data = '', $type = '' ) {\n\tif ( $data && $type ) {\n\t\t$class = new WPRT_Sanitize_Data();\n\t\treturn $class->parse_data( $data, $type );\n\t}\n}", "function clean_input($data) {\n $data = trim($data); // strips unnecessary characters from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n}", "function validate($data){\n\t\t\t\t$data= trim($data);\n\t\t\t\t$data= stripcslashes($data);\n\t\t\t\t$data= htmlspecialchars($data);\n\t\t\t\treturn $data;\n\t\t\t}", "private function stripInput($data) {\r\n\t\t$data = trim ( $data );\r\n\t\t$data = stripslashes ( $data );\r\n\t\t$data = htmlspecialchars ( $data );\r\n\t\treturn $data;\r\n\t}", "function pre_test_input($data) {\n\t\t$data = trim($data); //remove blank spaces\n\t\t$data = stripslashes($data); //remove \\'s\n\t\t$data = htmlspecialchars($data); //protect against html\n\t\treturn $data;\n\t}", "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function PreClean($data) {\n\tif(is_array($data)) {\n\t\tforeach($data as $key => $val) {\n\t\t\t$return[$key] = PreClean($val);\n\t\t}\n\t return ($return);\n\t} else {\n \treturn (strip_tags(trim($data)));\n \t}\n}", "function sanitize($data)\n {\n // De asemenea poate sa fie folosit si pentru getting POST/GET variables\n //$_POST = sanitize($_POST);\n //$_GET = sanitize($_GET);\n if (is_array($data))\n \t foreach($data as $var=>$val) {\n $output[$var] = sanitize($val);\n } \n else \n {\n \t\t// remove whitespaces (not a must though)\n \t\t$data = trim($data); \n \t\t// apply stripslashes if magic_quotes_gpc is enabled\n \t\tif(get_magic_quotes_gpc()) \n \t\t{\t$data = stripslashes($data); }\n \t\t// curatire p. atacuri XSS cros site scripting \n \t\t$data = cleanInput($data);\n \t\t// a mySQL connection is required before using this function\n \t\t// transforma caracterele speciale in escape (\\x00, \\n, \\r, \\, ', \" and \\x1a.) \n \t\t$data = mysql_real_escape_string($data);\n \t}\n return $data;\n }", "function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "public function sanitizeData($input) {\n\t\t$data = trim($input);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\n\t}", "public function cleanData($data) {\n\t\t$bad = array('&nbsp;', \"\\n\", \"\\r\");\n\t\t$data = trim(preg_replace('/<[^>]+>/', ' ', str_replace($bad, ' ', $data)));\n\t\t\n\t\t$data = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec(\\\\1-103))', $data);\n\t\t//$data = preg_replace('~&#([0-9]+);~e', 'chr(\\\\1-103)', $data);\n\t\t\n\t\t$data = preg_replace('/\\s+/', ' ', $data); // condense multiple whitespace\n\t\t\n\t\t$data = str_replace(\n\t\t\tarray('&#192;', '&#193;', '&#194;', '&#195;', '&#196;', '&#197;', '&#198;', '&#199;', '&#200;', '&#201;', '&#202;', '&#203;', '&#204;', '&#205;', '&#206;', '&#207;', '&#208;', '&#209;', '&#210;', '&#211;', '&#212;', '&#213;', '&#214;', '&#215;', '&#216;', '&#217;', '&#218;', '&#219;', '&#220;', '&#221;', '&#222;', '&#223;', '&#224;', '&#225;', '&#226;', '&#227;', '&#228;', '&#229;', '&#230;', '&#231;', '&#232;', '&#233;', '&#234;', '&#235;', '&#236;', '&#237;', '&#238;', '&#239;', '&#240;', '&#241;', '&#242;', '&#243;', '&#244;', '&#245;', '&#246;', '&#247;', '&#248;', '&#249;', '&#250;', '&#251;', '&#252;', '&#253;', '&#254;', '&#255;', '&#338;', '&#339;', '&#352;', '&#353;', '&#376;', '&#402;', '&#223;'),\n\t\t\tarray('A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'x', 'O', 'U', 'U', 'U', 'U', 'Y', 'p', 'B', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'o', 'n', 'o', 'o', 'o', 'o', 'o', '-', 'o', 'u', 'u', 'u', 'u', 'y', 'p', 'y', 'E', 'e', 'S', 's', 'Y', 'f', 'ss'),\n\t\t\t$data\n\t\t); // bad, but probably good enough, and the best I can come up with damn you char encoding hell\n\t\t\n\t\t$data = html_entity_decode($data, ENT_QUOTES, 'UTF-8');\n\t\t\n\t\treturn $data;\n\t}", "function verifyData($inputData){\n $inputData = trim($inputdata);\n $inputData = stripslashes($inputData);\n $inputData = htmlspecialchars($inputData);\n return $inputData;\n }", "private function secure_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function cleanInput($data) {\r\n\t\r\n\t$data = trim($data);\r\n\t\r\n\t$data = stripslashes($data);\r\n\t\r\n\t$data = htmlspecialchars($data);\r\n\t\r\n\treturn $data;\r\n}", "function fn_sd_checkout_questions_check_user_data($data)\n{\n $res = [];\n foreach ($data as $key => $value) {\n if ($value) {\n $res[$key] = trim(strip_tags($value));\n }\n }\n\n return $res;\n}", "public function clean($data) {\n $data = stripslashes($data);\n $data = html_entity_decode($data, ENT_QUOTES, 'UTF-8');\n $data = urldecode($data);\n return $data;\n }", "function sanitize () {\n\t\t$this->text = preg_replace(\"/\\r/\", \"\", $this->text); // remove carriage returns\n\t\t$this->text = preg_replace(\"/(?<=\\n)\\s*\\n/\", \"\\n\", $this->text); // remove extra whitespace and duplicate empty lines\n\t\n\t\t// entify\n\t\t$this->text = htmlentities($this->text, ENT_QUOTES, \"UTF-8\");\n\t}", "function sanitize_input($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "private function cleanup($data) {\n $clean_input = Array();\n if (is_array($data)) {\n foreach ($data as $k => $v) {\n $clean_input[$k] = $this->cleanup($v);\n }\n } else {\n $clean_input = trim(strip_tags($data));\n }\n return $clean_input;\n }", "public function sanitize($data) {\n foreach($data as $index=>$row) {\n\n $info[$index] = $this->sanitizeline($row);\n }\n return $info;\n }", "function validate($data) {\n $data = trim($data); // remove extra white space(s)\n $data = stripslashes($data); // remove forward and back slashes\n $data = htmlspecialchars($data); // remove special characters\n return $data;\n }", "function validate($data) {\n $data = trim($data); // remove extra white space(s)\n $data = stripslashes($data); // remove forward and back slashes\n $data = htmlspecialchars($data); // remove special characters\n return $data;\n }", "function sanitize($data)\n{\n return filter_var(trim($_POST[$data]), FILTER_SANITIZE_STRING);\n}", "function cleanInput($data){\n $data=trim($data);\n $data=stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "function cleanInput($data){\n $data=trim($data);\n $data=stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "public static function sanitize($data)\r\n {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "function input_filter($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data; \n\t}", "static \tpublic function clean_data($data){\n\t\treturn $data;\n\t\t//escapes quotes, but dosn't escape html tags\n\t\t$data = htmlspecialchars($data);\n\t\t$data = preg_replace(\"/=/\", \"=\\\"\\\"\", $data);\n\t\t$data = preg_replace(\"/&quot;/\", \"&quot;\\\"\", $data);\n\t\t$tags = \"/&lt;(\\/|)(\\w*)(\\ |)(\\w*)([\\\\\\=]*)(?|(\\\")\\\"&quot;\\\"|)(?|(.*)?&quot;(\\\")|)([\\ ]?)(\\/|)&gt;/i\";\n\t\t$replacement = \"<$1$2$3$4$5$6$7$8$9$10>\";\n\t\t$data = preg_replace($tags, $replacement, $data);\n\t\t$data = preg_replace(\"/=\\\"\\\"/\", \"=\", $data);\n\t\t$data = preg_replace('!\\s+!', ' ', $data);\n\t\treturn $data;\n\t}", "private function sanitize ($data) {\n return htmlspecialchars($data);\n }", "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "public static function xss_clean(array $data): array {\n foreach ($data as $k => $v) {\n $data[$k] = filter_var($v, FILTER_SANITIZE_STRING);\n }\n\n return $data;\n }", "private function sanitize($form_data) {\n\t\t$sanitized_data = filter_var_array($form_data, FILTER_SANITIZE_STRING);\n\t \n\t\t// Return the sanitized datas\n\t\treturn $sanitized_data;\n\t}", "private function sanitize($form_data) {\n\t\t$sanitized_data = filter_var_array($form_data, FILTER_SANITIZE_STRING);\n\t \n\t\t// Return the sanitized datas\n\t\treturn $sanitized_data;\n\t}", "protected function secure_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "public function validate($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }" ]
[ "0.7163163", "0.7048423", "0.67910886", "0.6635465", "0.6520095", "0.64677644", "0.63564765", "0.6344687", "0.6336512", "0.63134396", "0.62931657", "0.62896824", "0.62532514", "0.62292385", "0.6227534", "0.6218878", "0.6217376", "0.6203315", "0.6203238", "0.61882305", "0.61864936", "0.61811316", "0.6179911", "0.61643535", "0.61347145", "0.61299413", "0.61258495", "0.61118555", "0.6100127", "0.6100127", "0.6100127", "0.6093058", "0.6093058", "0.6086428", "0.60861516", "0.6078892", "0.6072068", "0.6065017", "0.6065017", "0.60561407", "0.6052979", "0.6050391", "0.6039081", "0.6032485", "0.6027013", "0.6026677", "0.6012404", "0.60120654", "0.6002547", "0.60007614", "0.59874904", "0.597717", "0.5972437", "0.5965595", "0.59508514", "0.59444845", "0.59435177", "0.5933798", "0.5928882", "0.58943933", "0.58943623", "0.58928174", "0.5889621", "0.5889244", "0.588683", "0.58841634", "0.5877407", "0.58760285", "0.58747625", "0.5873192", "0.5873192", "0.586517", "0.586146", "0.584766", "0.58456266", "0.58423275", "0.58384603", "0.5836452", "0.58229613", "0.5818428", "0.5812816", "0.5805017", "0.58000815", "0.5799127", "0.57960373", "0.57948625", "0.57948625", "0.5791126", "0.57909125", "0.57909125", "0.57874584", "0.5787347", "0.57862794", "0.5785476", "0.5784995", "0.5781089", "0.57809055", "0.57809055", "0.57800996", "0.57782304" ]
0.7589649
0
Get real path to video file
Получить реальный путь к файлу видео
public function videoPath();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVideoPath()\n {\n $leagueName = $this->game->league->name;\n $startDate = $this->game->start_date->format('Y-m-d');\n $gameSlug = str_slug($this->game->homeTeam->nickname . ' ' . $this->game->awayTeam->nickname . ' ' . $this->game->id);\n $fileName = str_slug($this->team->nickname . ' ' . $this->id);\n $extension = 'mp4';\n\n $path = 'highlights/' .$leagueName . '/' . $startDate . '/' . $gameSlug . '/' . $fileName . '.' . $extension;\n\n return $path;\n }", "public function getVideoAbsolutePath()\n {\n return $this->videoAbsolutePath;\n }", "public function getVideoFile()\n {\n return $this->videoFile;\n }", "public function getVideoStoragePath($res = 'source')\n {\n return $this->videoStorageDirPath.$res.'_'.$this->filename;\n }", "public function mediaPath(): string\n {\n return 'assets/' . $this->path() . '/' . $this->mediaHash() . '/' . $this->filename();\n }", "protected function getVideoUploadDir() {\n return 'uploads/video';\n }", "public function video_url() {\n\t\treturn wp_get_attachment_url( $this->video_id() );\n\t}", "public function targetFilePath(): string {\n if ($this->targetPath == null) {\n $this->targetPath = self::UPLOAD_VIDEOS_DIR . $this->uniqueName() . '.' . self::ENCODED_FILE_TYPE;\n }\n return $this->targetPath;\n }", "public function url()\n {\n return Storage::disk('ocean')->url($this->getVideoPath());\n }", "public function getVideoFolder() {\n $parts = explode(\":\",$this->video_url);\n $parts = end($parts);\n return dirname($parts);\n }", "public function MP4Location()\n\t{\tif (file_exists($filename = $this->MP4Filename()))\n\t\t{\treturn $filename;\n\t\t}\n\t\treturn '';\n\t}", "public function getBaseMediaPath();", "private function getMovieFileName()\n\t{\n\t\treturn(TEST_VBOX_IMAGE_DIR.'/vbox/'.VM_NAME.'.webm');\n\t}", "public function getVideoId(){\n switch($this->getVideoHost()){\n case 'youtube':\n parse_str(parse_url($this->url, PHP_URL_QUERY), $query);\n return $query['v'];\n break;\n case 'youtu':\n $path = parse_url($this->url, PHP_URL_PATH);\n $path = str_replace('/', '', $path);\n return $path;\n break;\n case 'vimeo':\n $path = parse_url($this->url, PHP_URL_PATH);\n $path = str_replace('/', '', $path);\n return $path;\n break;\n }\n }", "function video_plugin_path(){\n return path_join(WP_PLUGIN_URL, basename(dirname( __FILE__ )));\n}", "public function getRealPath();", "protected function MP4Filename()\n\t{\treturn $this->mp4_dir . $this->id . '.mp4';\n\t}", "public function getCurrentMotionFilename()\n {\n $data = $this->makeRequest('get', 'videostatus');\n $filename = $data['fname'] ?? null;\n return $filename;\n }", "public function getMediaPath(){\r\n\t\treturn $this->strMediaPath;\r\n\t}", "public function getRealPath() {}", "public function getRealFullPath() {}", "public function getMediaPath($file);", "public function getFullMediaPathAttribute()\n {\n return $this->baseUrl . \"/\" . $this->filename;\n }", "public function getVideoName($withExtension = true) {\n if( $data = parse_url($this->video_url) )\n return pathinfo($data['path'], $withExtension?PATHINFO_BASENAME:PATHINFO_FILENAME);\n\n return '';\n }", "public function getPathExternalUrl() {\n return Yii::app()->params['site_url'] . '/' . Yii::app()->params['partnerSystemApiFilesUrl'].'/getProjectVideo?id='.$this->id;\n }", "public function getFullPath()\n {\n return $this->upload_url.'/'.$this->fileName;\n }", "public function get_path(){\n $path = stream_get_meta_data($this->file);\n return $path['uri'];\n }", "public function getTrackFullPath() : string\n {\n return $this->fileLocation . '/../' . $this->basePath . $this->fileName;\n }", "public function getRealPath(){ }", "public function getUrl () {\n $voice_uri = Config::getConfig(\"voice_uri\");\n return $voice_uri . \"/videos/\" . $this->name . \".\" . $this->ext;\n }", "public function getTempStoragePath()\n {\n return sprintf('inbounds/%d/%d/%s',\n $this->getVideo()->getId(),\n $this->getId(),\n $this->getToken()\n );\n }", "public function video_upload(Request $request)\n {\n//\n// 'video_file' => 'required|mimes:mp4,ogx,oga,ogv,ogg,webm|max:200000'\n// ]);\n\n $path = Storage::disk('local')->put('public/video', $request->file('file'));\n\n $ufule = explode('/', $path);\n\n // P\n $this->putFilenameToDb($ufule['2']);\n\n //$this->transfer($path);\n\n return $ufule['2'];\n\n //return $path; //$request->file('video.webm');\n }", "public function getTrackPath() : string\n {\n return $this->basePath . $this->fileName;\n }", "protected function get_file_name(): string {\n\t\t\treturn 'media';\n\t\t}", "protected static function getConverterPath()\n {\n return Config::get('sonus::ffmpeg');\n }", "public function getFilePath()\n {\n if ($this->src == null) {\n return false;\n }\n return Yii::getAlias('@frontend/web') . $this->src;\n }", "public function getRealPath()\n {\n return $this->_finfo->getRealPath();\n }", "public function getFullPath();", "public function video(): UploadedFileInterface {\n return $this->getUploadedVideo();\n }", "public function getFilePath(): string\n {\n return $this->result->getFile()->getFullPath();\n }", "function getVideoLink($onetcode,$oldonetcode) {\n\n\t//if ($onetcode!=$oldonetcode)\n\t//$onetcode=$oldonetcode;\n\n\t$dir = base_path() . drupal_get_path('module','occupations_detail') . \"/videos/\";\n\t$path = \"..\".$dir.$onetcode.\".flv\";\n\n\tif (file_exists($path))\n\treturn $dir.$onetcode.\".flv\";\n\telse\n\treturn '';\n\n\t}", "public function get_video()\r\n {\r\n\r\n $from = NULL;\r\n $vid = NULL;\r\n $pos = NULL;\r\n\r\n if (!empty($_POST['embvideo']) || !empty($_POST['filevideo']))\r\n {\r\n\r\n //verifica que tipo de video foi enviado, se embeded, se do arquivo\r\n if ($_POST['embvideo'])\r\n {\r\n\r\n $from = \"embeded\";\r\n $vid = $_POST['embvideo'];\r\n }\r\n if ($_POST['filevideo'])\r\n {\r\n\r\n $from = \"fromfile\";\r\n $vid = $_POST['filevideo'];\r\n }\r\n\r\n $pos = ($_POST['videopos'] == \"baixo\") ? \"baixo\" : \"cima\";\r\n\r\n return '{\"video\":\"' . self::text_clean_json($vid) . '\",\"from\":\"' . $from . '\",\"pos\":\"' . $pos . '\"}';\r\n }\r\n else\r\n {\r\n return \"\";\r\n }\r\n }", "function video_url($table, $url, $path)\n{\n if ($table == 'video') {\n return $GLOBALS['urlServer'] . 'modules/video/video.php?action2=download&amp;id=' . $path;\n } else {\n return $url;\n\n }\n}", "public function getAbsolutePath()\n {\n return null === $this->imagepresentation ? null : $this->getUploadRootDir().'/'.$this->imagepresentation;\n }", "public function getRealPathname()\n\t{\n\t\treturn $this->getRealPath().DIRECTORY_SEPARATOR.$this->getThumbnail();\n\t}", "public function message()\n {\n return 'Invalid video path';\n }", "public abstract function getVideoDownloadLink();", "function getVideosPath($locale)\n {\n return $this->getLocalizedPath('videos', $locale);\n }", "public function path(): ?string\n {\n return $this->file->path();\n }", "public function getFullPath() : string;", "public function getSongFilePath()\n {\n \treturn $this->_datapath->create(\"songs\", $this->file_name);\n }", "public function getCurrentFullPath() {}", "protected function getUploadAbsolutePath()\n {\n return __DIR__ . '/../../../../web/' . $this->getUploadPath();\n }", "public function getPathFile(): string\n {\n return $this->PathFile;\n }", "function get_file( ) {\n\t$file = '';\n\t$sql = \"SELECT id, path FROM queue WHERE played = 0 ORDER BY id ASC LIMIT 1\";\n\t$results = mysql_query($sql);\n\tif(!$results) {\n\t\t$file = \"/Misc/Alien Song.MPEG\"; //bad query\n\t} else {\n\t\t$num = mysql_num_rows($results);\n\t\tif($num == 0) {\n\t\t\t//select random\n\t\t\t$file = \"/Misc/PBR_draft_1.avi\"; //no unplayed videos\n\t\t} else {\n\t\t\twhile($row = mysql_fetch_array($results)) {\n\t\t\t\t$file = $row['path'];\n\t\t\t\t$id = $row['id'];\n\t\t\t\t$sql = \"UPDATE queue SET played = 1 WHERE id = $id\";\n\t\t\t\t$results = mysql_query($sql);\n\t\t\t\tif(!$results) die(\"couldnt update playlist\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $file;\n}", "public function getVideosPath(Skill $skill) {\n\t\treturn $this->getSkillPath($skill)->append($this->getVideosSegment());\n\t}", "public function filename(): ?string\n {\n return FFI::vips()->vips_connection_filename($this->pointer);\n }", "public function getVideoUrl(){\r\n\t\r\n}", "public function getFullPath() {}", "public function getFullPath() {}", "public function getVideoUrl() {\n return $this->video_url;\n }", "abstract public function getFileVideoComponent($file_path, $read_from_cache=true);", "private function codecVideo($path)\n {\n $ffmpeg = FFMpeg::create([\n 'ffmpeg.binaries' => env('FFMPG'),\n 'ffprobe.binaries' => env('FFPROBE'),\n 'timeout' => 9800, // The timeout for the underlying process\n 'ffmpeg.threads' => 1\n ]);\n Log::info('starting open video');\n\n $videoCodec = $ffmpeg->open(public_path($path));\n $format = new X264();\n $format->setAudioCodec('libmp3lame');\n Log::info('coding audio');\n $codecName =\"export_\".str_random(20).\".mp4\";\n $newVideoPath = public_path(\"uploads/targets/$codecName\");\n $videoCodec->save($format,$newVideoPath);\n Log::info('video coding finish');\n\n return $codecName;\n }", "public function getMpeg4Url(): string\n {\n return $this->mpeg4_url;\n }", "public function getFullPath( ) : string\n {\n $disk = ( app( )->make( TemporaryFiles::class ) )->getDisk( );\n return $disk->path( $this->getPath( ) );\n }", "public function getVideo()\n {\n return $this->get(self::VIDEO);\n }", "public static function getFilename();", "public function localFilename(): string;", "public function getRealPath()\n {\n $sReturn = self::DEFAULT_VALUE;\n if( isset($this->_Value) )\n {\n $info = new \\SplFileInfo($this->_Value);\n $sReturn = $info->getRealPath();\n unset($info);\n }//if(...\n return $sReturn;\n }", "function getFilePath(){\n return self::$uploaddir . \"/\" . $this->fileName;\n }", "private function getFullPath($filename)\n {\n return BP . $this->mediaPathTmp . $filename;\n }", "protected function getUploadAbsolutePath()\n {\n return __DIR__.'/../../../web/'.$this->getUploadPath();\n }", "public function getAbsolutePath()\n {\n return $this->fileInfo->getPathname();\n }", "public function getBaseMediaUrl();", "public function getBaseMediaUrl();", "public function getSrcPath();", "public function fullPath()\n\t{\n\t\treturn $this->file->getPathname();\n\t}", "function viewVideo($id){\n\t\n\t$m = new MongoClient();\n\t$gridfs = $m->selectDB('videography')->getGridFS('video');\n\t\n\t$stream =$gridfs->findOne(array(\"_id\" => $id))->getResource();\n\t$stringcoded = stream_get_contents($stream); //converts the stream to string data\n\t$encoded = base64_encode($stringcoded); //encodes string data to base64\n\t\n\t//echo $encoded;\n\treturn 'data:video/' . \"mp4\" . ';base64,' . $encoded; \n}", "private function getFilePath()\n {\n $config = Kohana::$config->load('upload');\n\n return $config[$this->type]['path'] . $this->filename;\n }", "public static function getWebDir()\n {\n return 'uploads/media';\n }", "public function mediaUrl(): string\n {\n return $this->kirby()->url('media') . '/' . $this->mediaPath();\n }", "public function getFilename () {}", "function get_header_video_url()\n{\n}", "public function getRealPath()\n {\n return realpath($this->path);\n }", "public function getFileWebPath()\n {\n return static::getAttachmentHandler()->getFileUrl($this->getFileKey());\n }", "public function getAbsolutePath(){\n\t\treturn $this->_storage->getAbsolutePath($this->_key);\n\t}", "static function getAbsolutePath($path = '') {\n return GSDATAUPLOADPATH . '/public' . $path . '/';\n }", "public function getRealPath()\n {\n return $this->sRealPath;\n }", "public function getPath()\n {\n return $this->file->get('tmp_name');\n }", "public function upload()\n {\n $file = $this->file('video');\n\n $source = fopen(\n $file->getRealPath(),\n 'r+'\n );\n\n $destination = $this->destinations->prefix('app')->unprocessed . $file->getClientOriginalExtension();\n\n Storage::disk('root')\n ->put($destination, $source, 'private');\n\n ProcessVideo::dispatch(\n $this->destinations,\n storage_path($destination),\n $file->getClientOriginalName(),\n auth()->user()\n );\n\n return $this->destinations->getPaths();\n }", "public function getAbsolutePath()\n {\n return null === $this->storedFilename\n ? null\n : $this->getUploadRootDir().'/'.$this->storedFilename;\n }", "public function getFilepath()\n {\n $this->filepath = $this->router->defaultFilepath($this->route);\n return $this->filepath;\n }", "public function getVideoId()\n {\n $fullId = $this->getId();\n $position = strrpos($fullId, '/');\n if ($position === false) {\n require_once 'Zend/Gdata/App/Exception.php';\n throw new Zend_Gdata_App_Exception('Slash not found in atom:id');\n } else {\n return substr($fullId, strrpos($fullId,'/') + 1);\n }\n }", "public function getFullPath()\n {\n return $this->path.'/'.$this->filename;\n }", "public function getFSPath($path)\n {\t\n \t$path = substr($path, strlen(self::STREAM_NAME)+3); // cut off upload://\n \t$path = str_replace(\"\\\\\", \"/\", $path); // canonicalize path\n \tif($path == \"..\" || substr($path, 0, 3) == \"../\" || substr($path, -3, 3) == \"/..\" || strstr($path, \"/../\")) {\n \t\t$GLOBALS['log']->fatal(\"Invalid uploaded file name supplied: $path\");\n \t\treturn null;\n \t}\n \t\n return self::getDir().\"/\".$path;\n }", "public function getAbsolutePath()\n {\n return $this->file->getRealPath();\n }", "public function getImagePreviewDirectory()\n {\n return $this->mediaDirectory->getAbsolutePath(self::PREVIEW_DIRECTORY_PATH);\n }", "public function getFilePath() {\n return $this->getValue(self::FIELD_PATH);\n }", "public function getMediaPlayerUrl() {\n\t\t // if (!$this->_MediaPlayerUrl)\n\t\t\t//$this->_MediaPlayerUrl = $this->publishAsset('mediaplayer.swf');\n\t\t // return $this->_MediaPlayerUrl;\n\t\t}", "public function getFullPath()\n {\n \treturn sprintf(\"%s\".DIRECTORY_SEPARATOR.\"%d\", self::GetUploadPath(), $this->getId());\n }" ]
[ "0.8130591", "0.7865285", "0.7425562", "0.7060125", "0.6949543", "0.6914217", "0.6826084", "0.67882794", "0.6786562", "0.6721562", "0.6718103", "0.66969776", "0.6654779", "0.65657383", "0.6513043", "0.6512702", "0.6439401", "0.6429019", "0.64233106", "0.6419869", "0.6385776", "0.63708824", "0.6354576", "0.63002497", "0.6291477", "0.6284901", "0.6281865", "0.62703115", "0.62541693", "0.62173706", "0.62127733", "0.6193298", "0.61921924", "0.6189281", "0.6160332", "0.61372304", "0.60840446", "0.6066257", "0.60586214", "0.6056959", "0.6054638", "0.60529554", "0.60501546", "0.6049947", "0.604259", "0.6036385", "0.6030826", "0.60238504", "0.6020104", "0.5992869", "0.5991087", "0.5990779", "0.5990703", "0.5984242", "0.5980929", "0.5975857", "0.59739614", "0.5967142", "0.596638", "0.596638", "0.59660274", "0.5934979", "0.5934207", "0.59321207", "0.59274304", "0.5916011", "0.591155", "0.5909201", "0.59057283", "0.59056455", "0.5903772", "0.58941954", "0.58908725", "0.58860505", "0.58860505", "0.58759624", "0.5871763", "0.58685815", "0.58653945", "0.5864804", "0.5853555", "0.5847955", "0.5847589", "0.5842349", "0.583234", "0.5825115", "0.5822828", "0.58191997", "0.5817153", "0.5815524", "0.58122677", "0.5810153", "0.580516", "0.57936686", "0.5793566", "0.5783398", "0.5778741", "0.57724917", "0.57721895", "0.57704896" ]
0.83919275
0
Get the time for result video duration
Получить время для продолжительности видео с результатом
public function duration();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDuration()\n {\n if (!isset($this->thumbnail)) {\n $this->duration = $this->getByMetaProperty('video:duration');\n }\n\n return $this->duration;\n }", "private function getVideoDuration($videoPath)\n {\n $getID3 = new \\getID3;\n $file = $getID3->analyze('storage' . $videoPath);\n // $duration = date('H:i:s.v', $file['playtime_seconds']);\n $duration = date('H:i:s', $file['playtime_seconds']);\n return $duration;\n }", "public function getDuration();", "public function getDuration();", "public function getVideoDurationSec()\n {\n $videoDurationSec = $this->getPropertyByLabelList('video_duration');\n\n if (empty($videoDurationSec)) {\n $videoDurationMin = $this->getPropertyByLabelList('video_duration_min');\n\n if (!empty($videoDurationMin))\n $videoDurationSec = $videoDurationMin * 60;\n }\n\n return $videoDurationSec;\n }", "public function getDuration()\n {\n return $this->getElapsedTime();\n }", "function getDuration($file) {\n $file = 'src/vid/' . $file;\n $result = shell_exec(\"avprobe \" . escapeshellarg($file) . \" 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//\");\n $parts = explode(':', trim($result));\n $time = ($parts[0] * 3600) + ($parts[1] * 60) + $parts[2];\n return $time;\n }", "public function getDuration(): float;", "function duration()\n\t{\n\t\t//Difference\n\t\t$startTime = strtotime($this->startTime);\n\t\t\n\t\tif(is_null($this->endTime))\n\t\t\t$endTime = time();\n\t\telse \n\t\t\t$endTime = strtotime($this->endTime);\n\t\t\n\t\t//Return the number of seconds\n\t\treturn $endTime - $startTime;\n\t}", "public function getTime(): float\n {\n return $this->duration;\n }", "public function getDuration(): float\n {\n\n $command = new Commands\\Duration();\n return $command->getFormattedOutput();\n\n }", "protected function getDuration($video)\n\t{\n\t\t$streams = $this->ffprobe->streams($video->filePath);\n\t\ttry {\n\t\t\tif($video->isVideo) {\n\t\t\t\treturn $streams->videos()->first()->get('duration');\n\t\t\t} else {\n\t\t\t\treturn $streams->audios()->first()->get('duration');\n\t\t\t}\n\t\t} catch(FFMpeg\\Exception\\InvalidArgumentException $e) {\n\t\t\tob_start();\n\t\t\techo `ffmpeg -i \"{$video->filePath}\" 2>&1`;\n\t\t\t$output = ob_get_clean();\n\n\t\t\tpreg_match(\"#Duration: (\\d\\d):(\\d\\d):(\\d\\d(\\.\\d\\d)?)#\", $output, $result);\n\t\t\t$duration = ((int) $result[1]) * 60 * 60; // hours\n\t\t\t$duration += ((int) $result[2]) * 60; // minutes\n\t\t\t$duration += ((float) $result[3]);\n\t\t\treturn $duration;\n\t\t}\n\t}", "public function get_duration() {\n\t\treturn $this->duration;\n\t}", "public function getDurationMilliseconds():float;", "function getDuration(){\r\n\t\t$maxTime=0;\r\n\t\tforeach ($this->tracks as $track){\r\n\t\t\t$msgStr = $track[count($track)-1];\r\n\t\t\tlist($time) = explode(\" \", $msgStr);\r\n\t\t\t$maxTime = max($maxTime, $time);\r\n\t\t}\r\n\t\treturn $maxTime * $this->getTempo() / $this->getTimebase() / 1000000;\r\n\t}", "public function getFinishTime();", "function getSongDuration($filename){\n // $mpeg->getInfo();\n // $info = $mpeg->return_info();\n // $songduration = $info['length'];\n\n $getID3 = new getID3();\n $result = $getID3->analyze($filename);\n\n return $result['playtime_string'];\n}", "protected function _getDurationTime()\n {\n $duration = $this->_properties['duration'];\n return isset($duration) ? (new FrozenTime($duration))->format('G:i:s') : '';\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\n {\n return $this->duration;\n }", "public function getDuration()\r\n\t{\r\n\t\treturn $this->duration;\r\n\t}", "public function duration(): float\n {\n // calculate duration\n $duration = $this->trackPoints[sizeof($this->trackPoints) - 1]->getTimestamp()->getTimestamp() - $this->trackPoints[0]->getTimestamp()->getTimestamp();\n // return duration\n return $duration;\n }", "function getVidDuration($video_id) {\r\nglobal $api_key;\r\n$infoList = json_decode(file_get_contents('https://www.googleapis.com/youtube/v3/videos?id='.$video_id.'&part=contentDetails&key='.$api_key));\r\n\t\t \r\nforeach($infoList->items as $info){\r\n\treturn $info->contentDetails->duration;\r\n}\r\n}", "public function getQueryElapsedTime(): float;", "public function getDuration()\n {\n $start = $this->getStarted();\n\n if (empty($start)) {\n return 0;\n }\n\n $end = $this->getFinished();\n\n if (empty($end)) {\n $end = new \\DateTime();\n }\n\n return $end->getTimestamp() - $start->getTimestamp();\n }", "public function getDuration()\n\t{\n\t\treturn $this->duration;\n\t}", "public function getDuration()\n\t{\n\t\treturn $this->duration;\n\t}", "public function getDuration()\n\t{\n\t\treturn $this->duration;\n\t}", "public function getDuration() {return $this->duration;}", "public function getElapsedTime()\n {\n if (!isset($this->unit)) $this->setUnit();\n return ($this->end * $this->unit) - ($this->start * $this->unit);\n }", "public function getDuration(): float\n {\n return $this->duration;\n }", "public function getDuration() {\n return $this->duration;\n }", "public function getDuration() : int\n {\n return $this->safeGet('duration');\n }", "public function getElapsedMs() {\n return $this->diff()->inMs();\n }", "public function getDuration()\n {\n return isset($this->duration) ? $this->duration : null;\n }", "public function getVideoDurationMin()\n {\n $durationSec = $this->getVideoDurationSec();\n return intval((int) $durationSec / 60);\n }", "public function getDurationSeg()\n {\n $aux = $this->getDuration() %60;\n if ($aux < 10 ) $aux= '0' . $aux;\n return $aux;\n }", "public function getDuration()\n {\n return isset($this->duration) ? $this->duration : '';\n }", "public function getDuration()\n {\n return isset($this->duration) ? $this->duration : '';\n }", "public function getDuration(): TimeInterface;", "function get_execution_time();", "public function getDuration()\n {\n return $this->begin->diff($this->end);\n }", "function getDuration()\n {\n return $this->_duration;\n }", "private function getElapsedTime()\r\n\t{\r\n\t\t$message = sprintf(\"Executed in %.4f seconds.\", abs(microtime(true) - $this->timer));\r\n\r\n\t\t$this->stopTimer();\r\n\r\n\t\treturn $message;\r\n\t}", "public function getTime()\n {\n return $this->finishTime - $this->startTime;\n }", "public function getTiming();", "public function getDurationSec(){\n return $this->appStop->getTimestamp() - $this->appStart->getTimestamp();\n }", "public function duration(): float\n {\n return (float) (max(0,\n microtime(true)\n + ($this->drips() / $this->rate())\n - $this->timer())\n );\n }", "public function getDuration(): int|float\n {\n return $this->end - $this->start;\n }", "function _get_va($video, $ffmpeg)\r\n{\r\n\r\n $command = $ffmpeg . ' -i ' . $video . ' -vstats 2>&1';\r\n $output = shell_exec($command);\r\n\r\n $regex_sizes = \"/Video: ([^,]*), ([^,]*), ([0-9]{1,4})x([0-9]{1,4})/\";\r\n if (preg_match($regex_sizes, $output, $regs)) {\r\n $codec = $regs [1] ? $regs [1] : null;\r\n $width = $regs [3] ? $regs [3] : null;\r\n $height = $regs [4] ? $regs [4] : null;\r\n }\r\n if (!isset($height) || intval($height < 10)) {\r\n $regex_sizes = \"(\\b[^0]\\d+x[^0]\\d+\\b)\";\r\n if (preg_match($regex_sizes, $output, $regs)) {\r\n if (isset($regs[0])) {\r\n $sizer = @explode('x', $regs[0]);\r\n $width = $sizer[0] ? $sizer[0] : null;\r\n $height = $sizer[1] ? $sizer[1] : null;\r\n //var_dump($sizer);\r\n }\r\n }\r\n }\r\n\r\n $regex_duration = \"/Duration: ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}).([0-9]{1,2})/\";\r\n if (preg_match($regex_duration, $output, $regs)) {\r\n $hours = $regs [1] ? $regs [1] : null;\r\n $mins = $regs [2] ? $regs [2] : null;\r\n $secs = $regs [3] ? $regs [3] : null;\r\n $ms = $regs [4] ? $regs [4] : null;\r\n }\r\n\r\n return array(\r\n 'width' => $width,\r\n 'height' => $height,\r\n 'hours' => $hours,\r\n 'mins' => $mins,\r\n 'secs' => $secs,\r\n 'ms' => $ms\r\n );\r\n\r\n}", "function getDuration() {\n\t\treturn $this->_Duration;\n\t}", "public function getDurationInMs()\n {\n return $this->durationInMs;\n }", "public function getElapsed()\n {\n return microtime(true) - $this->start;\n }", "public function getDuration()\n {\n $time = round($this->getDistance() / 40 * 60);\n return \\Carbon\\Carbon::now()->diffForHumans(\\Carbon\\Carbon::now()->subMinutes($time), true);\n }", "public function getDuration() {\n $interval = $this->getBeginning()->diff($this->getEnd());\n return $interval->m + $interval->y * 12 + 1;\n }", "public function getDuration()\n {\n $value = $this->get(self::DURATION);\n return $value === null ? (integer)$value : $value;\n }", "public final function getResolutionTime(): float\n\t{\n\t\treturn $this->resolutionTime;\n\t}", "public function getTimeout(): float;", "public function getTotalElapsedSeconds(){ }", "public function getTimeElapsed()\n {\n return $this->time_elapsed;\n }", "public function finish_time() {\n\t\treturn $this->runstats['finish_time'];\n\t}", "public function _getDiffTime() {\r\n\treturn ($this->_getmicrotime() - $this->_timeStart);\r\n }", "public function getTimeElapsed()\n {\n $timeNow = time();\n $timeRes = $timeNow - $this->startTimeStamp [0];\n $nar = 0;\n\n // variável de retorno\n $r = \"\";\n\n // Agora\n if ($timeRes == 0) {\n $r = \"agora\";\n } else\n // Segundos\n if\n ($timeRes > 0 and $timeRes < 60) {\n $r = $timeRes . \" segundos atrás\";\n } else\n // Minutos\n if\n (($timeRes > 59) and ( $timeRes < 3599)) {\n $timeRes = $timeRes / 60;\n if (round($timeRes, $nar) >= 1 and round($timeRes, $nar) < 2) {\n $r = round($timeRes, $nar) . \" minuto atrás\";\n } else {\n $r = round($timeRes, $nar) . \" minutos atrás\";\n }\n } else\n // Horas\n // Usar expressao regular para fazer hora e MEIA\n if\n ($timeRes > 3559 and $timeRes < 86400) {\n $timeRes = $timeRes / 3600;\n\n if (round($timeRes, $nar) >= 1 and round($timeRes, $nar) < 2) {\n $r = round($timeRes, $nar) . \" hora atrás\";\n } else {\n $r = round($timeRes, $nar) . \" horas atrás\";\n }\n } else\n // Dias\n // Usar expressao regular para fazer dia e MEIO\n if\n ($timeRes > 86400 and $timeRes < 2591999) {\n\n $timeRes = $timeRes / 86400;\n if (round($timeRes, $nar) >= 1 and round($timeRes, $nar) < 2) {\n $r = round($timeRes, $nar) . \" dia atrás\";\n } else {\n\n preg_match('/(\\d*)\\.(\\d)/', $timeRes, $matches);\n\n if ($matches [2] >= 5) {\n $ext = round($timeRes, $nar) - 1;\n\n // Imprime o dia\n $r = $ext;\n\n // Formata o dia, singular ou plural\n if ($ext >= 1 and $ext < 2) {\n $r .= \" dia \";\n } else {\n $r .= \" dias \";\n }\n\n // Imprime o final da data\n $r .= \"1/2 atrás\";\n } else {\n $r = round($timeRes, 0) . \" dias atrás\";\n }\n }\n } else\n // Meses\n if\n ($timeRes > 2592000 and $timeRes < 31103999) {\n\n $timeRes = $timeRes / 2592000;\n if (round($timeRes, $nar) >= 1 and round($timeRes, $nar) < 2) {\n $r = round($timeRes, $nar) . \" mês atrás\";\n } else {\n\n preg_match('/(\\d*)\\.(\\d)/', $timeRes, $matches);\n\n if ($matches [2] >= 5) {\n $ext = round($timeRes, $nar) - 1;\n\n // Imprime o mes\n $r .= $ext;\n\n // Formata o mes, singular ou plural\n if ($ext >= 1 and $ext < 2) {\n $r .= \" mês \";\n } else {\n $r .= \" meses \";\n }\n\n // Imprime o final da data\n $r .= \"1/2 atrás\";\n } else {\n $r = round($timeRes, 0) . \" meses atrás\";\n }\n }\n } else\n // Anos\n if\n ($timeRes > 31104000) {\n $r = $this->getDatePTBR();\n }\n return $r;\n }", "public function getDurationAttribute()\n {\n if ($this->started_at && $this->completed_at) {\n return $this->started_at->longAbsoluteDiffForHumans($this->completed_at);\n }\n }", "public function durationHour()\n {\n return floor($this->expected_duration_minutes / 60);\n }", "public function _getDuration()\n {\n return intval($this->_getPlanDataByKey('ndays_plan'));\n }", "public function getElapsed()\n {\n return $this->_elapsed;\n }", "function durationToRuntime($duration) {\n\tif (ereg(\"PT([0-9]+)H([0-9]+)M\",$duration,$regs) !== false) {\n\t\treturn ($regs[1]*60) + $regs[2];\n\t} else {\n\t\treturn 0;\n\t}\n}", "public function getEndTime()\n {\n return $this->result['endTime'];\n }", "public function elapsed()\r\n\t{\r\n\t\tif ($this->stopTime)\r\n\t\t\treturn round($this->stopTime - $this->startTime, 4);\r\n\r\n\t\treturn round(microtime(true) - $this->startTime, 4);\r\n\t}", "public function diff()\r\n {\r\n return $this->getmicrotime() - $this->start;\r\n }", "public function getElapsedTime(): float\n {\n return round(\n $this->timerEnd - $this->timerStart,\n $this->precision\n );\n }", "public function getTime()\n {\n $start_timex = explode(' ',$this->start_time);\n\n $end_timex = explode(' ',$this->end_time);\n\n if(sizeof($start_timex) != 2 || sizeof($end_timex) != 2)\n {\n return 0;\n }\n\n $seconds = $end_timex[1] - $start_timex[1];\n\n $miceroseconds = $end_timex[0] - $start_timex[0];\n\n $total = ($seconds + $end_timex[0]) - $start_timex[0];\n\n return round($total,3);\n }", "public function getElapsedTime()\n {\n\n // Currently running - get up-to-date duration\n if ($this->_state == self::STOPWATCH_STATE_RUNNING && !empty($this->_start_time)) {\n $elapsed = microtime(true) - $this->_start_time;\n return $elapsed + $this->_elapsed_time;\n }\n\n return $this->_elapsed_time;\n }", "public function getDuration(): Duration {\n return $this->duration;\n }", "public function getItemDuration();", "function wegameComProcessDuration($option)\r\n\t{\r\n\t\tif (!defined('HWDVIDSPATH')) { define('HWDVIDSPATH', dirname(__FILE__).'/../../'); }\r\n\t\t$c = hwd_vs_Config::get_instance();\r\n\r\n\t\t$ext_v_durat[0] = 0;\r\n\t\t$ext_v_durat[1] = \"0:00:00\";\r\n\t\treturn $ext_v_durat;\r\n\t}", "public function getTimeToFinish(): int;", "function elapsed()\r\n {\r\n $tmp = xhelpGetElapsedTime($this->getVar('elapsed'));\r\n return $this->_prettyElapsed($tmp);\r\n }", "public function getDuration()\n {\n\n $currentDate = strtotime(date(\"Y-m-d H:i:s\"));\n $startDate = strtotime('2014-08-10T12:00:00+0900');\n $endDate = strtotime('2014-08-10T12:00:00+0902');\n\n if ($startDate == $currentDate) {\n $getSeconds = ($endDate - $startDate) * 1000;\n } else {\n $getSeconds = 0;\n }\n return $getSeconds;\n }", "public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }", "public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }", "public function total_time() {\n\t\treturn $this->session_duration;\n\t}", "public function getElapsedSecs() {\n\t\tif (null === $this->_endedMicrotime) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $this->_endedMicrotime - $this->_startedMicrotime;\n\t}", "protected function getElapsedProcessTime()\n {\n return (int) (time() - $this->getRenderTime());\n }", "public function getElapsedSecs()\n {\n if (is_null($this->_endedMicrotime)) {\n return false;\n }\n return ($this->_endedMicrotime - $this->_startedMicrotime);\n }", "public function getFinishTime() {\n return strip_tags($this->getTrackDescription()->div->div->table[2]->tr[0]->td[1]->asXML());\n }", "function formatVideoRuntime($runtime, $short = true) {\n $hours = (int)($runtime / 3600);\n $remainingTime = $runtime - $hours * 3600;\n $minutes = (int)($remainingTime / 60);\n $seconds = (int)($remainingTime - $minutes * 60);\n if ($hours > 0) {\n return $hours . ':' . $minutes . ':' . $seconds;\n } else {\n return $minutes . ':' . $seconds;\n }\n}", "public function getFinishTime()\n {\n return $this->finish_time;\n }", "public function get_duration() {\n\t\t$resume_duration = $this->get_resume_duration();\n\t\tif ( 'listing' === $this->get_package_subscription_type() ) {\n\t\t\treturn false;\n\t\t} elseif ( $resume_duration ) {\n\t\t\treturn $resume_duration;\n\t\t} else {\n\t\t\treturn get_option( 'resume_manager_submission_duration' );\n\t\t}\n\t}", "public function getMessageDuration()\n {\n \treturn $this->messageDuration;\n }", "public function getRunTimeInMilliseconds(): float\n {\n return ($this->end - $this->start) * 1000;\n }" ]
[ "0.73334354", "0.71813", "0.715252", "0.715252", "0.71131986", "0.7063934", "0.69958234", "0.6985395", "0.6869773", "0.68380517", "0.68192935", "0.67933285", "0.6783574", "0.6773437", "0.67630655", "0.67462486", "0.6731025", "0.67087126", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.66347045", "0.6633574", "0.66207916", "0.6615928", "0.6613839", "0.66114056", "0.65886134", "0.65886134", "0.65886134", "0.65816355", "0.6562829", "0.6555968", "0.6548411", "0.65302813", "0.65150046", "0.6504127", "0.6471485", "0.64680624", "0.6466706", "0.6466706", "0.64592004", "0.6453735", "0.6419929", "0.6382061", "0.6366635", "0.636537", "0.6364104", "0.63332295", "0.63284665", "0.63240355", "0.63116074", "0.631145", "0.63025004", "0.6296952", "0.62861884", "0.628419", "0.6283608", "0.6282818", "0.6263039", "0.62575454", "0.6236879", "0.62324536", "0.6226057", "0.62240696", "0.619491", "0.6194157", "0.6176166", "0.6174556", "0.61659694", "0.61408055", "0.61296463", "0.6128004", "0.61277694", "0.6118807", "0.61185884", "0.61101925", "0.61039555", "0.60971117", "0.6096848", "0.60940176", "0.6090855", "0.6081728", "0.6081728", "0.60568845", "0.6047803", "0.60299546", "0.60297036", "0.60225224", "0.6019023", "0.5976623", "0.59702194", "0.59677505", "0.5964703" ]
0.74392426
0
Returns all registered handlers as array( $name => array( $type => array( $priority => array( callback, callback, ) ) )
Возвращает все зарегистрированные обработчики в виде массива( $name => массив( $type => массив( $priority => массив( callback, callback, ) ) ) )
public function getAllHandlers() { $ret = []; foreach ($this->registrations as $name => $types) { foreach ($types as $type => $registrations) { foreach ($registrations as $registration) { $priority = $registration[self::REG_KEY_PRIORITY]; $handler = $registration[self::REG_KEY_HANDLER]; $ret[$name][$type][$priority][] = $handler; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHandlers(): array;", "public function getHandlers(): array\n {\n return $this->handlers;\n }", "public function getHandlers(): array\n {\n return $this->handlers;\n }", "public function getHandlers(): array;", "public function getHandlers(): array;", "public function getHandlers(): array;", "public function getHandlers();", "public function getHandlers();", "protected function getEventHandlers(): array\n\t{\n\t\treturn [];\n\t}", "public function get_handlers() {\n\t\treturn $this->handlers;\n\t}", "public function getHandlers()\n {\n return $this->handlers;\n }", "public function getHandlers()\n {\n return $this->handlers;\n }", "public function getHandlers()\n {\n return $this->handlers;\n }", "function __getRegisteredHandlers()\n\t{\n\t\tstatic $arHandlersList = null;\n\t\tif (!isset($arHandlersList))\n\t\t{\n\t\t\t$arHandlersList = array();\n\t\t\tforeach(GetModuleEvents(\"sale\", \"onSaleDeliveryHandlersBuildList\", true) as $arHandler)\n\t\t\t\t$arHandlersList[] = ExecuteModuleEventEx($arHandler);\n\t\t}\n\t\treturn $arHandlersList;\n\t}", "public static function getHandlers()\n {\n return static::$handlers;\n }", "function getsHandlersNamesList(): array;", "private function getActiveHandlers()\n {\n $handlers = [];\n foreach ($this->handlers as $keyword => $handler) {\n if (array_key_exists($keyword, $this->capabilities)) {\n $handlers[] = $handler;\n }\n }\n\n return $handlers;\n }", "public static function getHandlers() {\r\n return array(\r\n 'tags' => array(\r\n 'tr' => 'handleTr',\r\n 'ntr' => 'handleNTr',\r\n ),\r\n 'filters' => array(\r\n 'tr' => 'handleTr',\r\n 'ntr' => 'handleNTr',\r\n ),\r\n 'hooks' => array(),\r\n );\r\n }", "protected function _getHandlers()\n {\n if (!static::$_handlers) {\n static::$_handlers = P4Cms_Navigation_DynamicHandler::fetchAll();\n }\n\n return static::$_handlers;\n }", "abstract public function handlers(): array;", "public function getExtensionHandlers()\n {\n return array_values($this->handlers);\n }", "abstract private function registerHandlers(): array;", "public function getRegisteredHandlers()\n {\n return $this->_requestHandlers;\n }", "public function getHandlers() {\n\n return $this->cacheHandlers;\n\n }", "public function getRegisteredHandlers()\n {\n $result = new PHP2_WebService_VO_XML();\n\n $result->Handlers->attributes['handlersCount'] = count($this->_requestHandlers);\n\n foreach ($this->_requestHandlers as $handlerName => $handlerInfo)\n {\n $handlerXMLObject = new PHP2_WebService_VO_XML(null, array('name' => $handlerName));\n $handlerXMLObject->Parameters = new PHP2_WebService_VO_XML();\n\n if (is_array($handlerInfo['parameters']))\n {\n foreach ($handlerInfo['parameters'] as $parameterInfo)\n {\n $handlerXMLObject->Parameters->addToCollection('Parameter', new PHP2_WebService_VO_XML(null, $parameterInfo));\n }\n }\n\n $result->Handlers->addToCollection('Handler', $handlerXMLObject);\n }\n\n return $result;\n }", "protected function getQueryHandlers(): array\n\t{\n\t\treturn [];\n\t}", "function feproc_handleruserapi_getallhandlers($args)\r\n{\r\n // Get arguments from argument array.\r\n extract($args);\r\n\r\n // Argument check\r\n if (!isset($startnum))\r\n {\r\n $startnum = 0;\r\n } else {\r\n --$startnum;\r\n }\r\n\r\n if (!isset($numitems))\r\n {\r\n $numitems = -1;\r\n }\r\n\r\n //$handlers = array();\r\n\r\n // Early security check.\r\n if (!pnSecAuthAction(0, 'FEproc::', \"::\", ACCESS_READ))\r\n {\r\n return array();\r\n }\r\n\r\n if ($type)\r\n {\r\n $where = \"fp_type = '$type'\";\r\n } else {\r\n $where = '';\r\n }\r\n\r\n $handlers = DBUtil::selectObjectArray('feproc_handlers', $where, 'name', $startnum, $numitems);\r\n foreach ($handlers as &$obj) {\r\n $obj['source'] = implode(':', array($obj['type'], $obj['modulename'], $obj['apiname'], $obj['apifunc']));\r\n $obj['hid'] = $obj['id'];\r\n }\r\n unset($obj);\r\n \r\n return $handlers;\r\n}", "public function getOperationHandlers()\n {\n $operationHandlers = [];\n foreach (glob($this->globPattern) as $file) {\n $class = $this->getOperationHandlerNamespace() . basename($file, '.php');\n\n if (class_exists($class) && is_subclass_of($class, $this->getOperationHandlerNamespace() . \"OperationHandler\"))\n {\n $operationHandlers[] = $class;\n }\n }\n\n return $operationHandlers;\n }", "public function getRawHandlers()\n {\n return $this->raw_handlers;\n }", "public function getEventHandlersMap()\n {\n return $this->eventHandlersMap;\n }", "public static function get_handlers($path)\n\t{\n\t\t$result = Kohana::list_files($path);\n\t\tarray_walk($result,function (&$f,$k){$f = basename($f, EXT);});\n\t\treturn $result;\n\t}", "public function getOrderedHandlers($name, $type) {\n\t\t$registrations = [];\n\n\t\tif (!empty($this->registrations[$name][$type])) {\n\t\t\tif ($name !== 'all' && $type !== 'all') {\n\t\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations[$name][$type]);\n\t\t\t}\n\t\t}\n\t\tif (!empty($this->registrations['all'][$type])) {\n\t\t\tif ($type !== 'all') {\n\t\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations['all'][$type]);\n\t\t\t}\n\t\t}\n\t\tif (!empty($this->registrations[$name]['all'])) {\n\t\t\tif ($name !== 'all') {\n\t\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations[$name]['all']);\n\t\t\t}\n\t\t}\n\t\tif (!empty($this->registrations['all']['all'])) {\n\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations['all']['all']);\n\t\t}\n\n\t\tusort($registrations, function ($a, $b) {\n\t\t\t// priority first\n\t\t\tif ($a[self::REG_KEY_PRIORITY] < $b[self::REG_KEY_PRIORITY]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ($a[self::REG_KEY_PRIORITY] > $b[self::REG_KEY_PRIORITY]) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t// then insertion order\n\t\t\treturn ($a[self::REG_KEY_INDEX] < $b[self::REG_KEY_INDEX]) ? -1 : 1;\n\t\t});\n\n\t\t$handlers = [];\n\t\tforeach ($registrations as $registration) {\n\t\t\t$handlers[] = $registration[self::REG_KEY_HANDLER];\n\t\t}\n\n\t\treturn $handlers;\n\t}", "public function getHandlers()\n {\n return $this->logHandler;\n }", "public static function getHandlers(string $name, string $ns = 'GNUsocial.'): array\n {\n return self::$dispatcher->getListeners($ns . $name);\n }", "protected function getCommandHandlers(): array\n\t{\n\t\treturn [];\n\t}", "protected function getHandlersFor(string $event): array\n {\n if (!isset($this->orderedHandlers[$event])) {\n $this->orderHandlersFor($event);\n }\n\n return array_merge(\n $this->orderedHandlers[$event],\n $this->getMasterHandlersFor($event)\n );\n }", "public function getEventHandlers()\n {\n return null;\n }", "public static function getActiveHandlersList()\n {\n $cacheKey = 'DevGroup/EventsSystem:activeHandlersList';\n $handlers = Yii::$app->cache->get($cacheKey);\n if ($handlers === false) {\n $eventEventHandlers = EventEventHandler::find()\n ->where(['is_active' => 1])\n ->orderBy(['sort_order' => SORT_ASC])\n ->asArray(true)\n ->all();\n $events = Event::find()\n ->where(['id' => array_column($eventEventHandlers, 'event_id', 'event_id')])\n ->indexBy('id')\n ->asArray(true)\n ->all();\n $eventGroups = EventGroup::find()\n ->where(['id' => array_column($events, 'event_group_id', 'event_group_id')])\n ->indexBy('id')\n ->asArray(true)\n ->all();\n $eventHandlers = EventHandler::find()\n ->where(['id' => array_column($eventEventHandlers, 'event_handler_id', 'event_handler_id')])\n ->indexBy('id')\n ->asArray(true)\n ->all();\n $handlers = [];\n foreach ($eventEventHandlers as $eventEventHandler) {\n if (isset(\n $eventHandlers[$eventEventHandler['event_handler_id']],\n $events[$eventEventHandler['event_id']],\n $eventGroups[$events[$eventEventHandler['event_id']]['event_group_id']]\n ) === false\n ) {\n continue;\n }\n try {\n $data = Json::decode($eventEventHandler['packed_json_params']);\n } catch (\\Exception $e) {\n $data = [];\n }\n $handlers[] = [\n 'class' => $eventGroups[$events[$eventEventHandler['event_id']]['event_group_id']]['owner_class_name'],\n 'name' => $events[$eventEventHandler['event_id']]['execution_point'],\n 'callable' => [\n $eventHandlers[$eventEventHandler['event_handler_id']]['class_name'],\n $eventEventHandler['method'],\n ],\n 'data' => $data,\n ];\n }\n Yii::$app->cache->set(\n $cacheKey,\n $handlers,\n 86400,\n new TagDependency(\n [\n 'tags' => [\n NamingHelper::getCommonTag(EventGroup::className()),\n NamingHelper::getCommonTag(Event::className()),\n NamingHelper::getCommonTag(EventHandler::className()),\n NamingHelper::getCommonTag(EventEventHandler::className()),\n ],\n ]\n )\n );\n }\n return $handlers;\n }", "public function getEvents(){\n return $this->eventHandlers;\n }", "public function executeHandlersByType($type) {\n\t\t$result = array();\n\n\t\tif (isset($this->handlers[$type])) {\n\t\t\tforeach ($this->notificationClient->data as $notificationData) {\n\t\t\t\tforeach ($this->handlers[$type] as $handler) {\n\t\t\t\t\t$result[] = $handler->execute($notificationData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getConfigHandlers()\n {\n return $this->configHandlers;\n }", "protected function getFunctionDefinitions() {\n\t\t$helperFunctions = array();\n\t\tforeach($this->handlers as $handler) {\n\t\t\t$helpers = $handler->getHelperFunctions();\n\t\t\tif($helpers) {\n\t\t\t\tforeach($helpers as $helper) {\n\t\t\t\t\t$line1 = $helper[0];\n\t\t\t\t\tif(!isset($helperFunctions[$line1])) {\n\t\t\t\t\t\t$helperFunctions[$line1] = $helper;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tksort($helperFunctions);\n\n\t\t// add handler functions\n\t\t$handlerFunctions = array();\n\t\tforeach($this->handlers as $handler) {\n\t\t\t$function = $handler->getHandlerFunctionDefinition();\n\t\t\tif($function) {\n\t\t\t\t$line1 = $function[0];\n\t\t\t\tif(!isset($handlerFunctions[$line1])) {\n\t\t\t\t\t$handlerFunctions[$line1] = $function;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tksort($handlerFunctions);\n\n\t\t// add controller functions\n\t\t$controllerFunctions = array();\n\t\tforeach($this->handlers as $handler) {\n\t\t\t$function = $handler->getControllerFunctionDefinition();\n\t\t\tif($function) {\n\t\t\t\t$line1 = $function[0];\n\t\t\t\tif(!isset($controllerFunctions[$line1])) {\n\t\t\t\t\t$controllerFunctions[$line1] = $function;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add dispatcher functions\n\t\t$dispatcherFunctions = array();\n\t\tforeach($this->handlers as $handler) {\n\t\t\t$function = $handler->getDispatcherFunctionDefinition();\n\t\t\tif($function) {\n\t\t\t\t$line1 = $function[0];\n\t\t\t\tif(!isset($dispatcherFunctions[$line1])) {\n\t\t\t\t\t$dispatcherFunctions[$line1] = $function;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tksort($dispatcherFunctions);\n\t\t\n\t\treturn array_merge(array_values($helperFunctions), array_values($handlerFunctions), array_values($controllerFunctions), array_values($dispatcherFunctions));\n\t}", "public function differentHandlersDataProvider(): array\n {\n return [\n # 0, class method\n [\n '/one-component-class-method/',\n [\n $this,\n 'helloWorldOutput'\n ],\n 'Hello world!'\n ],\n # 1, lambda\n [\n '/one-component-lambda/',\n function () {\n return 'Hello lambda!';\n },\n 'Hello lambda!'\n ]\n ];\n }", "protected function getHandlers($messageName)\n {\n if (!empty($this->events[$messageName])) {\n return $this->sortByPriority($this->events[$messageName]);\n }\n\n return [];\n }", "public function getFileHandlers()\n {\n return $this->fileHandlers;\n }", "function shop_get_standard_handlers_options() {\n\n $stdhandlers = array();\n $handlers = get_list_of_plugins('/local/shop/datahandling/handlers');\n foreach ($handlers as $h) {\n if (!preg_match('/^std|ext/', $h)) {\n continue;\n }\n $handlername = get_string('handlername', 'shophandlers_'.$h);\n $stdhandlers[$h] = get_string('generic', 'local_shop').' '.$handlername;\n }\n return $stdhandlers;\n}", "protected function loadHandlers($handlerName)\n {\n $handlers = [];\n\n foreach ($this->handlerNamespaces as $namespace) {\n $className = \"{$namespace}{$handlerName}\";\n if (class_exists($className)) {\n $handler = new $className();\n $handlers[] = $handler;\n }\n }\n\n return $handlers;\n }", "public function getRegisteredRequestHandlerClassNames() {}", "public static function handlerClasses()\n\t{\n\t\t$handlers = parent::handlerClasses();\n\t\t$handlers[] = 'IPS\\convert\\Login';\n\t\treturn $handlers;\n\t}", "protected function getHandlers(string $channel): array\n {\n // always include default handler\n $handlers = [];\n\n foreach ($this->config->getHandlers($channel) as $handler) {\n if (!$handler instanceof Autowire) {\n $handlers[] = $handler;\n continue;\n }\n\n try {\n $handlers[] = $handler->resolve($this->factory);\n } catch (ContainerExceptionInterface $e) {\n throw new ConfigException($e->getMessage(), $e->getCode(), $e);\n }\n }\n\n $handlers[] = $this->eventHandler;\n\n return $handlers;\n }", "public function toOptionArray()\n {\n $options = [];\n foreach ($this->logManager->getHandlers() as $handler) {\n $options[$handler] = ucfirst($handler);\n }\n\n return $options;\n }", "static function getSubscribedEvents() {\n\n // - Return a list of events names as key.\n // - With elements containing a method name\n // or a array with method name and priority.\n //\n // For exampl like this with multiple callbacks:\n //\n // $events['event.name'] = array();\n // $events['event.name'][] = 'static callback function on this object';\n // $events['event.name'][] = array(\n // 'static callback function on this object',\n // 10\n // );\n //\n // or like this for a single callback:\n //\n // $events['event.name'] = array();\n // $events['event.name'] = array(\n // 'static callback function on this object',\n // 10\n // );\n //\n // or like this when the priority is not important.\n //\n // $events['event.name'] = 'static callback function on this object';\n\n \t$events['bank.money_transfer'] = 'onMoneyTransfer';\n \treturn $events;\n }", "static function map_event_handlers_from( $object )\n {\n $map = map_event_handlers_and_filters_from($object);\n return $map[\"event_handlers\"];\n }", "final protected function getHandler()\n {\n foreach ($this->handlers as $route => $handler) {\n if ($route == 'default') {\n return array($route, $handler);\n }\n else {\n if (preg_match($route, $this->url)) {\n return array($route, $handler);\n }\n }\n }\n return null;\n }", "public function provides()\n\t{\n\t\treturn [\n\t\t\t// attributes\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeGetHandler',\n\n\t\t\t// Attribute sets\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetGetHandler',\n\n\t\t\t// Entity types\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeGetHandler',\n\n\t\t\t// Entities\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityGetHandler',\n\t\t];\n\t}", "public function getMonitorEvents()\n {\n return array(\n \"RESPONSE\" => array('handleResponseEvent',2)\n );\n }", "public function getConnectionHandlers()\n {\n return $this->connectionHandlers;\n }", "public function get_handler();", "public function getRegisteredFunctions();", "static function getCacheHandlers()\n\t{\n\t\treturn StashHandlers::getHandlers();\n\t}", "public function getEvents()\r\n {\r\n return [\r\n // Provide name and optional priority\r\n 'before' => ['onBefore'],\r\n 'complete' => ['onComplete'],\r\n // You can pass a list of listeners with different priorities\r\n //'error' => [['beforeError', 'first'], ['afterError', 'last']]\r\n ];\r\n }", "public final function getLocalEventHandlers()\n\t{\n\t\treturn $this->aEventScriptLocalCache;\n\t}", "public function getInformation(): array\n {\n $handlerConfigurations = $this->configurationProvider->getConfiguredResources();\n\n $information = [];\n foreach ($handlerConfigurations as $path => $handlerConfiguration) {\n $information[$path] = $this->fetchInformationForHandler($handlerConfiguration);\n }\n\n return $information;\n }", "protected static function initHandlers () {\n\t\t\tforeach (static::$handlers as $key => $value) {\n\t\t\t\tstatic::$handlers[$key] = ['\\\\Tracy\\\\Debugger', $key];\n\t\t\t}\n\t\t\t//register_shutdown_function(self::$handlers['shutdownHandler']); // already registered inside tracy debugger\n\t\t}", "public function createHandlers(JobInterface $job, $level, $bubble)\n {\n $handlers = [];\n foreach ($this->factories as $factory) {\n $handlers[] = $factory->createHandler($job, $level, $bubble);\n }\n\n return $handlers;\n }", "static function map_event_handlers_and_filters_from( $object )\n {\n $map = array(\"filters\" => array(), \"event_handlers\" => array());\n foreach( get_class_methods($object) as $method_name )\n {\n if( strpos($method_name, \"handle_\") === 0 )\n {\n $event_name = substr($method_name, strlen(\"handle_\"));\n $map[\"event_handlers\"][$event_name] = $method_name;\n }\n elseif( strpos($method_name, \"filter_\") === 0 )\n {\n $filter_name = substr($method_name, strlen(\"filter_\"));\n $map[\"filters\"][$filter_name] = $method_name;\n }\n }\n\n return $map;\n }", "public function register_import_handler()\n {\n global $g_dirs;\n $l_handler_array = [];\n\n $l_not_supported = [\n 'isys_import_handler.class.php',\n 'isys_import_handler_cabling.class.php',\n 'isys_import_handler_csv.class.php'\n ];\n\n $l_dir_import = $g_dirs[\"import\"] . \"handler/\";\n if (is_dir($l_dir_import))\n {\n $l_import_fh = opendir($l_dir_import);\n while ($l_file = readdir($l_import_fh))\n {\n if ($l_file != \".\" && $l_file != \"..\" && !in_array($l_file, $l_not_supported) && is_file($l_dir_import . \"/\" . $l_file))\n {\n $l_handler = preg_replace(\"/^isys_import_handler_(.*?).class.php$/\", \"\\\\1\", $l_file);\n $l_handler_array[$l_file] = $l_file;\n\n $this->register($l_handler, \"isys_import_handler_\" . $l_handler);\n }\n }\n }\n\n return $l_handler_array;\n }", "protected function getHandlerStack()\n {\n if ($this->handlerStack) {\n return $this->handlerStack;\n }\n $this->handlerStack = HandlerStack::create();\n foreach ($this->middlewares as $name => $middleware) {\n $this->handlerStack->push($middleware, $name);\n }\n return $this->handlerStack;\n }", "public function handlersNamespace();", "public function getDependencies() : array\n {\n return [\n 'invokables' => [\n PingHandler::class => PingHandler::class,\n ],\n 'factories' => [\n AddHandler::class => AddHandlerFactory::class,\n GetAllHandler::class => GetAllHandlerFactory::class,\n\n CacheService::class => CacheServiceFactory::class,\n DatabaseService::class => DatabaseServiceFactory::class,\n RepositoryService::class => RepositoryServiceFactory::class\n ],\n ];\n }", "public function handlerStats()\n {\n return $this->transferStats?->getHandlerStats() ?? [];\n }", "protected function init_handlers() {\n\t\t$keys = [ self::KEY_SCRIPTS, self::KEY_STYLES ];\n\t\tforeach ( $keys as $key ) {\n\t\t\tif ( $this->hasConfigKey( $key ) ) {\n\t\t\t\t$this->add_handler( $key );\n\t\t\t}\n\t\t}\n\t}", "public function getEventSubscribers() : array\n\t{\n\n\t\treturn [\n\t\t\tnew IceHawkInitEventSubscriber(),\n\t\t\tnew IceHawkReadEventSubscriber(),\n\t\t\tnew IceHawkWriteEventSubscriber(),\n\t\t];\n\t}", "public function getRegisteredHooks()\n {\n $hooks = array();\n $enabled_modules = $this->_model->modules->fetchEnabledModules();\n foreach ($enabled_modules as $module) {\n $name = ucfirst(strtolower($module['name']));\n $module_obj = Solar::factory(\"Foresmo_Modules_{$name}\", array('model' => $this->_model));\n if (isset($module_obj->register) && is_array($module_obj->register)) {\n $hooks[$name] = $module_obj->register;\n }\n $module_obj = null;\n }\n\n return $hooks;\n }", "public function getHandlers(ProgressUpdateEvent $e)\n {\n if (array_key_exists($e->getTag(), $this->handlersByTag)) {\n $handlers = $this->handlersByTag[$e->getTag()];\n $toReturn = [];\n foreach ($handlers as $handler) {\n if($handler->isSharable()) {\n $toReturn[] = $handler;\n } else {\n $toReturn[] = clone $handler;\n }\n }\n\n return $toReturn;\n }\n\n throw new HandlerNotFoundException($e);\n }", "public function getSubscribedEvents()\n {\n $subscribedEvents = array();\n foreach ($this->validProviders as $provider => $class) {\n $subscribedEvents['command.' . $provider] = 'handleCommand';\n $subscribedEvents['command.' . $provider . '.help'] = 'handleCommandHelp';\n }\n return $subscribedEvents;\n }", "public function execute() {\n\t\t$sequence = array(\n\t\t\t\\Kaltura\\Notification\\Handler::HANDLER_TYPE_PRE_PROCESS,\n\t\t\t$this->notificationClient->type,\n\t\t\t\\Kaltura\\Notification\\Handler::HANDLER_TYPE_ALWAYS_PROCESS,\n\t\t\t\\Kaltura\\Notification\\Handler::HANDLER_TYPE_POST_PROCESS,\n\t\t);\n\n\t\t$result = array();\n\n\t\tforeach ($sequence as $handlerType) {\n\t\t\t$result[$handlerType] = $this->executeHandlersByType($handlerType);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function aopHandles(): array\n {\n /** @var Aop $aop */\n $aop = \\bean(Aop::class);\n\n return $aop->getAspects();\n }", "public static function hooks()\n {\n return new isys_array(\n [\n 'mod.cmdb.objectCreated' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__OBJECT_CREATED',\n 'handler' => 'isys_module_cmdb_eventhandler::onObjectCreated'\n ],\n 'mod.cmdb.objectDeleted' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__OBJECT_DELETED',\n 'handler' => 'isys_module_cmdb_eventhandler::onObjectDeleted'\n ],\n 'mod.cmdb.afterCreateCategoryEntry' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__AFTER_CATEGORY_CREATE',\n 'handler' => 'isys_module_cmdb_eventhandler::onAfterCategoryEntryCreate'\n ],\n 'mod.cmdb.afterCategoryEntrySave' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__AFTER_CATEGORY_SAVE',\n 'handler' => 'isys_module_cmdb_eventhandler::onAfterCategoryEntrySave'\n ],\n 'mod.cmdb.beforeRankRecord' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__BEFORE_RANK',\n 'handler' => 'isys_module_cmdb_eventhandler::onBeforeRankRecord'\n ],\n 'mod.cmdb.afterObjectTypeSave' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__AFTER_OBJECT_TYPE_SAVE',\n 'handler' => 'isys_module_cmdb_eventhandler::onAfterObjectTypeSave'\n ],\n 'mod.cmdb.afterObjectTypePurge' => [\n 'title' => 'LC__MODULE__CMDB_EVENTS__AFTER_OBJECT_TYPE_PURGE',\n 'handler' => 'isys_module_cmdb_eventhandler::onAfterObjectTypePurge'\n ]\n ]\n );\n }", "abstract public function getCallbacks(): array;", "public static function getSubscribedEvents(): array\n {\n return [\n KernelEvents::CONTROLLER => [['onKernelResponse', self::PRIORITY]],\n ConsoleEvents::COMMAND => [['onConsoleResponse', self::PRIORITY]],\n ];\n }", "public function getEventMappings()\n {\n return [\n 'karma.cache.clear' => ['method' => 'onCacheClear'],\n 'karma.cache.warmup' => ['method' => 'onCacheWarmup'],\n ];\n }", "public static function clearRegisteredHandlers(): void\n {\n self::$handlers = [];\n }", "public final function getLocalTimerHandlers()\n\t{\n\t\treturn $this->aTimerScriptLocalCache;\n\t}", "public function buildHandlerStack()\n {\n return tap(HandlerStack::create(), function ($stack) {\n $stack->push($this->buildBeforeSendingHandler(), 'before_sending');\n $stack->push($this->buildRecorderHandler(), 'recorder');\n $stack->push($this->buildStubHandler(), 'stub');\n });\n }", "public function getHandlerStack()\n {\n return $this->handlerStack;\n }", "public function getHandlerStack()\n {\n return $this->handlerStack;\n }", "public static function getSubscribedEvents() {\n\t\treturn array(\n\t\t\t'syntaxtree.level.enter' => 'levelEnterHandler',\n\t\t\t'syntaxtree.level.left' => 'levelLeftHandler'\n\t\t);\n\t}", "public function clearHandlers()\n {\n $this->handlers = [];\n }", "public static function getSubscribedEvents()\n {\n return array(\n array(\n \"event\" => Events::PRE_SERIALIZE,\n \"method\" => \"onPreSerialize\"\n ),\n array(\n \"event\" => Events::POST_SERIALIZE,\n \"method\" => \"onPostSerialize\"\n ),\n array(\n \"event\" => Events::PRE_DESERIALIZE,\n \"method\" => \"onPreDeserialize\"\n )\n );\n // TODO: Implement getSubscribedEvents() method.\n }", "public function getUrlHandlersForAction($action){\n\t\t//$class = $this->definingClassForAction($action);\n\t\t//$urlHandlers = Config::inst()->get($class, 'url_handlers') ?: array();\n\n\t\t/** @var array $urlHandlers */\n\t\t$urlHandlers = $this->config()->url_handlers; //has all url_handlers incl. parent controllers\n\n\t\treturn array_filter($urlHandlers, function($url_handler) use($action){return strtolower($url_handler) == $action;});\n\t}", "public function getHandlerStack(): HandlerStack\n {\n if ($this->handlerStack) {\n return $this->handlerStack;\n }\n\n $this->handlerStack = HandlerStack::create();\n\n foreach ($this->middleware as $name => $middleware) {\n $this->handlerStack->push($middleware, $name);\n }\n\n return $this->handlerStack;\n }", "protected function loadHandlers()\n {\n $handlers = include __DIR__ . '/../config/handlers.php';\n foreach ($handlers as $prefix => $handler) {\n if (class_exists(addslashes($handler))) {\n throw new InvalidArgumentException('Class '.$handler.' does not exist.');\n }\n\n try {\n $refClass = new ReflectionClass($handler);\n } catch (\\Exception $e) {\n throw new InvalidArgumentException('Unable to load '.$handler.' class.');\n }\n\n if (!$refClass->isInstantiable()) {\n throw new InvalidArgumentException('Class '.$handler.' is not instantiable.');\n }\n\n $this->handlers[$prefix] = new $handler($this->context);\n }\n }", "public function hooks() {\n\t\t\tlog_workload_event('Event hooks configuration successfull');\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'EVENT_MENU_MAIN' => 'menu_main_callback',\n\t\t\t);\n\t\t}", "public static function getSubscribedEvents()\n {\n return [\n 'onPluginsInitialized' => ['onPluginsInitialized', 0],\n 'onGetPageBlueprints' => ['onGetPageBlueprints', 0]\n ];\n }", "public function getFunctions(): array\n {\n return $this->functions;\n }", "private function collectEventNames(): array\n {\n $names = [];\n\n foreach ((new Finder)->in(__DIR__ . '/../../handler')->files() as $handler) {\n if ('AbstractWebhook' === ($name = substr($handler->getBasename(), 0, strlen($handler->getBasename()) - 11))) { // cut off 'Handler.php' suffix from file names\n continue; // skip the abstract webhook class\n }\n\n $names[] = Str::githubEventNameFromClass($name);\n }\n\n return $names;\n }", "public function get_signals()\n {\n return [\n 'priorized' => $this->m_priority_register,\n 'standard' => $this->m_signal_register\n ];\n }", "public static function viewHandlers() {\n deprecated('LegacyAssetModel::viewHandlers()');\n\n $exts = static::viewExtensions();\n $result = [];\n foreach ($exts as $ext) {\n if ($ext !== 'php') {\n $result[\"ViewHandler.$ext\"] = [];\n }\n }\n\n return $result;\n }", "public static function getSubscribedEvents()\n {\n $actionsToListen = [\n CKFinderEvent::COPY_FILE,\n CKFinderEvent::CREATE_FOLDER,\n CKFinderEvent::DELETE_FILE,\n CKFinderEvent::DELETE_FOLDER,\n CKFinderEvent::DOWNLOAD_FILE,\n CKFinderEvent::FILE_UPLOAD,\n CKFinderEvent::MOVE_FILE,\n CKFinderEvent::RENAME_FILE,\n CKFinderEvent::RENAME_FOLDER,\n CKFinderEvent::SAVE_IMAGE,\n CKFinderEvent::EDIT_IMAGE,\n CKFinderEvent::CREATE_RESIZED_IMAGE,\n ];\n\n return array_fill_keys($actionsToListen, 'logUserAction');\n }" ]
[ "0.81403285", "0.81056905", "0.81056905", "0.81012934", "0.81012934", "0.81012934", "0.809625", "0.809625", "0.78584856", "0.76795024", "0.7605464", "0.7605464", "0.7605464", "0.7573912", "0.7564637", "0.75008523", "0.7496123", "0.74648315", "0.73401344", "0.73396766", "0.72330356", "0.7227269", "0.7169838", "0.71299595", "0.7084463", "0.7039626", "0.7017309", "0.6916431", "0.6888539", "0.67801607", "0.67539585", "0.67406785", "0.67240494", "0.6687531", "0.66674984", "0.6625167", "0.6621168", "0.6545105", "0.6469583", "0.64682347", "0.6441746", "0.64221066", "0.64055556", "0.6375036", "0.6370299", "0.6343804", "0.62869996", "0.62823504", "0.6201369", "0.61929613", "0.6188039", "0.61854726", "0.61723197", "0.6170436", "0.6159591", "0.6095591", "0.6065394", "0.6065301", "0.6034143", "0.6006837", "0.59966105", "0.5981319", "0.5977618", "0.597311", "0.5968089", "0.5967627", "0.5964947", "0.5943852", "0.5934392", "0.59327376", "0.59324986", "0.5918643", "0.5911347", "0.5902654", "0.5898187", "0.5858782", "0.5841053", "0.58320755", "0.5824476", "0.5818069", "0.5799039", "0.5779632", "0.5766064", "0.57576764", "0.57562464", "0.5745388", "0.5745388", "0.5736989", "0.5734962", "0.57234144", "0.5720462", "0.57203174", "0.5716796", "0.57119095", "0.57108426", "0.57097566", "0.5707401", "0.5703236", "0.5695215", "0.56933075" ]
0.8793732
0
Is a handler registered for this specific name and type? "all" handlers are not considered. If you need to consider "all" handlers, you must check them independently, or use (bool)elgg_get_ordered_hook_handlers().
Зарегистрирован ли обработчик для этого конкретного имени и типа? Обработчики "all" не учитываются. Если вам нужно учитывать обработчики "all", вы должны проверять их отдельно или использовать (bool)elgg_get_ordered_hook_handlers().
public function hasHandler($name, $type) { return !empty($this->registrations[$name][$type]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasHandler($entity_type_id, $handler_type);", "public function hasHandlers() {\n return !empty($this->handlers);\n }", "public function has($name)\n {\n return isset($this->handlers[$name]);\n }", "public static function hasHandler($name, $plugin=null) {\r\n if (array_key_exists($name, Event::$_handlers)) {\r\n if (isset($plugin)) {\r\n foreach (Event::$_handlers[$name] as $handler) {\r\n if (get_class($handler[0]) == $plugin) {\r\n return true;\r\n }\r\n }\r\n } else {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public static function hasHandler($name, $plugin=null) {\n if (array_key_exists($name, Event::$_handlers)) {\n if (isset($plugin)) {\n foreach (Event::$_handlers[$name] as $handler) {\n if (get_class($handler[0]) == $plugin) {\n return true;\n }\n }\n } else {\n return true;\n }\n }\n return false;\n }", "public function hasHandler($sClassName)\n {\n if(array_search($sClassName, $this->_handlers)!==false)\n {\n return true;\n }\n return false;\n }", "public function hasEventHandler($name)\n\t{\n\t\t$name=strtolower($name);\n\t\treturn ( isset($this->_e[$name]) && count($this->_e[$name])>0 );\n\t}", "public function hasHandlersFor(string $event)\n {\n return isset($this->handlers[$event]);\n }", "public static function hasHandler(string $name, ?string $plugin = null, string $ns = 'GNUsocial.'): bool\n {\n $listeners = self::$dispatcher->getListeners($ns . $name);\n if (isset($plugin)) {\n foreach ($listeners as $event_handler) {\n $class = (new ReflectionFunction((new ReflectionFunction($event_handler))->getStaticVariables()['handler']))->getClosureScopeClass()->getName();\n if ($class === $plugin) {\n return true;\n }\n }\n } else {\n return !empty($listeners);\n }\n return false;\n }", "public function handler_exists($class_name) {\n\t\t \tif (empty($class_name)) return FALSE;\n\n\t\t\t$mod = str_replace('directory_listing_', '', strtolower($class_name));\n\t\t \t$mod = str_replace(\"_handler\", \"\", $mod); // strip trailing _handler\n\n\t\t \t$filename = \"/handlers/$mod/$mod.php\";\n\t\t\t$abs_path = realpath(dirname(__FILE__).'/..').$filename;\n\t\t\tif (file_exists($abs_path)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t }", "public function exists($handler_id) {\n $instance_ids = $this->webform->getHandlers()->getInstanceIds();\n return (isset($instance_ids[$handler_id])) ? TRUE : FALSE;\n }", "public static function hasHandlers($class, $name)\n {\n if (empty(self::$_eventWildcards) && empty(self::$_events[$name])) {\n return false;\n }\n\n if (is_object($class)) {\n $class = get_class($class);\n } else {\n $class = ltrim($class, '\\\\');\n }\n\n $classes = array_merge(\n [$class],\n class_parents($class, true),\n class_implements($class, true)\n );\n\n // regular events\n foreach ($classes as $class) {\n if (!empty(self::$_events[$name][$class])) {\n return true;\n }\n }\n\n // wildcard events\n foreach (self::$_eventWildcards as $nameWildcard => $classHandlers) {\n if (!StringHelper::matchWildcard($nameWildcard, $name)) {\n continue;\n }\n foreach ($classHandlers as $classWildcard => $handlers) {\n if (empty($handlers)) {\n continue;\n }\n foreach ($classes as $class) {\n if (!StringHelper::matchWildcard($classWildcard, $class)) {\n return true;\n }\n }\n }\n }\n\n return false;\n }", "public function has(string $handler): bool\n {\n return $this->locator->has($handler);\n }", "public function hasRecordHandler($type)\n {\n $hasRecordParser = $this->hasRecordParser($type);\n $hasRecordBuilder = $this->hasRecordBuilder($type);\n $hasRecordHandler = $hasRecordParser && $hasRecordBuilder;\n\n return $hasRecordHandler;\n }", "public static function isAnyHooksRegistered($hookName){\n\t\tif(isset(static::$hooks[$hookName]) and !empty(static::$hooks[$hookName])){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function is_hook( $type ) {\n\treturn in_array( $type, array( 'filter', 'action', 'filter_reference', 'action_reference' ) );\n}", "public static function handle($name, array $args=array()) {\r\n $result = null;\r\n if (array_key_exists($name, Event::$_handlers)) {\r\n foreach (Event::$_handlers[$name] as $handler) {\r\n $result = call_user_func_array($handler, $args);\r\n if ($result === false) {\r\n break;\r\n }\r\n }\r\n }\r\n return ($result !== false);\r\n }", "public static function handle($name, $args=array()) {\n $result = null;\n if (array_key_exists($name, Event::$_handlers)) {\n foreach (Event::$_handlers[$name] as $handler) {\n $result = call_user_func_array($handler, $args);\n if ($result === false) {\n break;\n }\n }\n }\n return ($result !== false);\n }", "public function registered($name)\n\t{\n\t\treturn array_key_exists($name, $this->registry);\n\t}", "protected function hookSpecific($data, $handler)\n {\n if(is_null($handler))\n return false;\n\n if(!array_key_exists('tags', $data) || empty($data['tags'])) /* If there are no WP tags, this can't be hooked */\n return false;\n\n foreach($data['tags'] as $hook) { /* Iterate over WP tags */\n if(!array_key_exists('tag', $hook) || empty($hook['tag'])) /* If empty, skip */\n continue;\n $tag = (string) $hook['tag'];\n\n $priority = (array_key_exists('priority', $hook) && !empty($hook['priority'])) ? (int) $hook['priority'] : 10; /* Read the priority, if it's defined. If not set default value to 10. */\n $args = (array_key_exists('args', $hook) && !empty($hook['args'])) ? (int) $hook['args'] : 1; /* Read the arguments to pass to the function, if it's defined. If not set default value to 1. */\n\n $this->callWPRegisterer($tag, $handler, $priority, $args); /* Call the real WordPress function to register this action */\n }\n\n return true;\n }", "public function hasHandler($commandClass)\n {\n $type = Type::create($commandClass)->toString();\n\n return isset($this->handlers[$type]);\n }", "public function hasStorageHandler() : bool;", "public function erasable($handler = null)\n {\n $handler = (!$handler) ? $this->_handler : $handler;\n\n return in_array($handler, array('inifile', 'gdbm', 'qdbm', 'db4'), true);\n }", "public function exists()\n {\n return $this->handler->exists();\n }", "function getsHandlersNamesList(): array;", "public function get_handler() {\n global $CFG;\n\n $enablehandler = $this->enablehandler;\n $handlerlabel = $this->shortname;\n\n $handler = null;\n\n if (empty($enablehandler)) {\n return false;\n } else if ($enablehandler == SPECIFIC_HANDLER) {\n $thehandler = $this->itemcode;\n } else {\n $thehandler = $enablehandler;\n }\n\n if (!empty($thehandler) &&\n file_exists($CFG->dirroot.'/local/shop/datahandling/handlers/'.$thehandler.'/'.$thehandler.'.class.php')) {\n include_once($CFG->dirroot.'/local/shop/datahandling/handlers/'.$thehandler.'/'.$thehandler.'.class.php');\n $classtype = \"shop_handler_{$thehandler}\";\n $handler = new $classtype($handlerlabel);\n }\n\n return $handler;\n }", "public function isHookableOn($hookName) {\n // Ugly hack for stopping transplant and LiveEdit DnD from being used,\n // nothing we can do for LiveEdit delete :( c'est la vie\n $backtrace = debug_backtrace();\n if ((isset($backtrace[1]['class']) &&\n $backtrace[1]['class'] == 'AdminModulesPositions') ||\n (isset($backtrace[1]['class']) &&\n $backtrace[0]['class'] == 'MultiBlockAtoh')) {\n return false;\n }\n return in_array($hookName, $this->_actualHookables);\n }", "protected function isRegistered( $insHandle ) {\r\n\t\treturn (\r\n\t\t\twp_script_is( $insHandle, 'registered' ) ||\r\n\t\t\twp_script_is( $insHandle, 'queue' ) ||\r\n\t\t\twp_script_is( $insHandle, 'done' ) ||\r\n\t\t\twp_script_is( $insHandle, 'to_do' )\r\n\t\t);\r\n\t}", "public function handles($event)\n {\n return in_array($event, $this->_events);\n }", "public function has($name)\n {\n return $this->containerHandler->has($name);\n }", "function feproc_handleruserapi_counthandlers()\r\n{\r\n // Early security check.\r\n if (!pnSecAuthAction(0, 'FEproc::', '::', ACCESS_READ))\r\n {\r\n return false;\r\n }\r\n\r\n return DBUtil::selectObjectCount('feproc_handlers', '', 'id', '');\r\n}", "function determineTypeHandler($type);", "public function getAllHandlers() {\n\t\t$ret = [];\n\t\tforeach ($this->registrations as $name => $types) {\n\t\t\tforeach ($types as $type => $registrations) {\n\t\t\t\tforeach ($registrations as $registration) {\n\t\t\t\t\t$priority = $registration[self::REG_KEY_PRIORITY];\n\t\t\t\t\t$handler = $registration[self::REG_KEY_HANDLER];\n\t\t\t\t\t$ret[$name][$type][$priority][] = $handler;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "protected function isAttributeHandler($handler)\n {\n return is_string($handler) && class_exists($handler) && method_exists($handler, 'handle');\n }", "protected function isAttributeHandler($handler)\n {\n return is_string($handler) && class_exists($handler) && method_exists($handler, 'handle');\n }", "public function canHandle()\n {\n if (\n array_key_exists('body', $this->payload) &&\n array_key_exists('path', $this->payload) &&\n array_key_exists('headers', $this->payload) &&\n array_key_exists('requestContext', $this->payload) &&\n !array_key_exists('elb', $this->payload['requestContext'])\n ) {\n return true;\n }\n return false;\n }", "public function canHandle(Request $request): bool\n {\n return $request->query->get('request_type') === self::HANDLER_TYPE;\n }", "public function pluginExists( $type , $name )\n {\n return in_array( $name , $this->pluginList[ $type ] );\n }", "public function getHandlers();", "public function getHandlers();", "public function isHookImplementation($hook_name) {\n if (substr($hook_name, 0, 5) !== 'hook_') {\n throw new \\Exception(\"$hook_name must begin with 'hook_'\");\n }\n\n if ($this->getFunctionName() == $this->getModuleName() . '_' . substr($hook_name, 5)) {\n return TRUE;\n }\n\n return FALSE;\n }", "private function isUpdateHandler($handler)\n {\n return is_callable($handler) ||\n is_string($handler) && class_exists($handler) && is_subclass_of($handler, UpdateHandler::class);\n }", "public static function isRegistered($name)\n {\n return in_array($name, self::getRegistered());\n }", "protected function CallEventHandlers($Sender, $EventClassName, $EventName, $EventHandlerType = 'Handler', $Options = array()) {\r\n\t\t$Return = FALSE;\r\n\r\n\t\t// Look through $this->EventHandlerCollection for relevant handlers\r\n\t\tif ($this->CallEventHandler($Sender, $EventClassName, $EventName, $EventHandlerType)) {\r\n\t\t\t$Return = TRUE;\r\n\t\t}\r\n\r\n\t\t// Look for \"Base\" (aka any class that has $EventName)\r\n\t\tif ($this->CallEventHandler($Sender, 'Base', $EventName, $EventHandlerType)) {\r\n\t\t\t$Return = TRUE;\r\n\t\t}\r\n\r\n\t\t// Look for Wildcard event handlers\r\n\t\t$WildEventKey = $EventClassName.'_'.$EventName.'_'.$EventHandlerType;\r\n\t\tif ($this->CallEventHandler($Sender, 'Base', 'All', $EventHandlerType, $WildEventKey)) {\r\n\t\t\t$Return = TRUE;\r\n\t\t}\r\n\t\tif ($this->CallEventHandler($Sender, $EventClassName, 'All', $EventHandlerType, $WildEventKey)) {\r\n\t\t\t$Return = TRUE;\r\n\t\t}\r\n\r\n\t\treturn $Return;\r\n\t}", "public static function hasHookFired( $type = 'action', $hook = NULL ) {\n if ( ! in_array( $type, [ 'action', 'filter' ], TRUE ) ) $type = 'action';\n $target = $type === 'filter' ? 'filters' : 'actions';\n if ( empty( $hook ) || ! is_string( $hook ) ) {\n $msg = __METHOD__ . ' needs a valid hook to check.';\n throw new \\InvalidArgumentException( $msg );\n }\n return array_key_exists( $hook, static::$hooks_done[$target] );\n }", "public function getOrderedHandlers($name, $type) {\n\t\t$registrations = [];\n\n\t\tif (!empty($this->registrations[$name][$type])) {\n\t\t\tif ($name !== 'all' && $type !== 'all') {\n\t\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations[$name][$type]);\n\t\t\t}\n\t\t}\n\t\tif (!empty($this->registrations['all'][$type])) {\n\t\t\tif ($type !== 'all') {\n\t\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations['all'][$type]);\n\t\t\t}\n\t\t}\n\t\tif (!empty($this->registrations[$name]['all'])) {\n\t\t\tif ($name !== 'all') {\n\t\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations[$name]['all']);\n\t\t\t}\n\t\t}\n\t\tif (!empty($this->registrations['all']['all'])) {\n\t\t\tarray_splice($registrations, count($registrations), 0, $this->registrations['all']['all']);\n\t\t}\n\n\t\tusort($registrations, function ($a, $b) {\n\t\t\t// priority first\n\t\t\tif ($a[self::REG_KEY_PRIORITY] < $b[self::REG_KEY_PRIORITY]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ($a[self::REG_KEY_PRIORITY] > $b[self::REG_KEY_PRIORITY]) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t// then insertion order\n\t\t\treturn ($a[self::REG_KEY_INDEX] < $b[self::REG_KEY_INDEX]) ? -1 : 1;\n\t\t});\n\n\t\t$handlers = [];\n\t\tforeach ($registrations as $registration) {\n\t\t\t$handlers[] = $registration[self::REG_KEY_HANDLER];\n\t\t}\n\n\t\treturn $handlers;\n\t}", "public static function isDynamicHandlerId($id)\n {\n if (!preg_match('#P4Cms_Navigation_DynamicHandler/(.+)#', $id, $matches)) {\n return false;\n }\n\n return $matches[1];\n }", "public function hasEventListener($type);", "public function isHandling($level)\n {\n $record = array(\n 'level' => $level,\n );\n\n foreach ($this->handlers as $handler) {\n if ($handler->isHandling($record)) {\n return true;\n }\n }\n\n return false;\n }", "public function signalExists(string $name): bool {\n\t\treturn array_key_exists($name, $this->signals);\n\t}", "public static function getRequestHandler($name) {\n // TODO : calling this direct without configuring may throw and error - TestCase for this\n $handler = RequestHandlerFactory::$HANDLER_MAP->get($name, null);\n if($handler == null) {\n throw new NoHandlerAvailableException(\"The handler for {$name} does not exist!\");\n return FALSE;\n }\n return $handler;\n }", "function __getRegisteredHandlers()\n\t{\n\t\tstatic $arHandlersList = null;\n\t\tif (!isset($arHandlersList))\n\t\t{\n\t\t\t$arHandlersList = array();\n\t\t\tforeach(GetModuleEvents(\"sale\", \"onSaleDeliveryHandlersBuildList\", true) as $arHandler)\n\t\t\t\t$arHandlersList[] = ExecuteModuleEventEx($arHandler);\n\t\t}\n\t\treturn $arHandlersList;\n\t}", "public function viewHasHookHandlers($view) {\n\t\treturn $this->hooks->hasHandler('view', $view) || $this->hooks->hasHandler('view_vars', $view);\n\t}", "abstract private function registerHandlers(): array;", "public function hasEvent($name)\n\t{\n\t\treturn !strncasecmp($name,'on',2) && method_exists($this->_owner,$name);\n\t}", "function feproc_handleruserapi_gethandler($args)\r\n{\r\n // Get arguments from argument array.\r\n extract($args);\r\n\r\n if (isset($hid)) {\r\n //$where = \"id = $hid\";\r\n $handler = DBUtil::SelectObjectById('feproc_handlers', $hid);\r\n }\r\n \r\n elseif (isset($name)) {\r\n //$where = \"name = $name\";\r\n $handler = DBUtil::SelectObjectById('feproc_handlers', $name, 'name');\r\n }\r\n\r\n elseif (isset($source)) {\r\n list($type, $modulename, $apiname, $apifunc) = split(':', $source, 4);\r\n $where = \"type = $type\"\r\n . \" and modulename = $modulename\"\r\n . \" and apiname = $apiname\"\r\n . \" and apifunc = $apifunc\"\r\n ;\r\n $obj = DBUtil::selectObjectArray('feproc_handlers', $where);\r\n $handler = $obj[0];\r\n }\r\n else // No arguments set, return an error\r\n {\r\n pnSessionSetVar('errormsg', _FXMODARGSERROR);\r\n return false;\r\n }\r\n \r\n $handler['source'] = implode(':', array($handler['type'], $handler['modulename'], $handler['apiname'], $handler['apifunc']));\r\n $handler['hid'] = $handler['id'];\r\n $handler['attributes'] = unserialize($handler['attributes']);\r\n \r\n return $handler;\r\n}", "public function processHandlers($name, $handlers){\r\n \r\n if(count($handlers) == 0){\r\n \r\n foreach($this->_defaulthandlers as $handler){\r\n \r\n //initialize BrowserConsole\r\n if($handler == BrowserConsoleHandler::class){\r\n $handle = App::make($handler, ['level' => $this->minloglevel]);\r\n }\r\n else{\r\n \r\n //load the logpath \r\n if($this->_config->send_log_to == 'file'){\r\n\r\n $this->logfolder = ABSOLUTE_PATH .DS. $this->_config->logpath;\r\n $this->logfile = $this->logfolder .DS. strtolower($name).'.log';\r\n \r\n $stream = $this->logfile;\r\n }\r\n else{\r\n $stream = 'php://stderr';\r\n }\r\n \r\n $handle = App::make($handler, [\r\n 'stream' => $stream,\r\n 'level' => $this->minloglevel, \r\n 'bubble' => $this->_config->log_to_console\r\n ]);\r\n }\r\n \r\n //insert handler\r\n if(!is_null($handle))\r\n $this->logger->pushHandler($handle);\r\n }\r\n }\r\n }", "public function getHandlers(): array;", "public function getHandlers(): array;", "public function getHandlers(): array;", "public function isRegistered()\n {\n return in_array($this->loader, spl_autoload_functions(), true);\n }", "public function isRegistered(string $name)\n {\n return array_key_exists($name, $this->componentClasses)\n || array_key_exists($name, $this->componentArrays);\n }", "function pluginLoaded($type) {\n if(array_key_exists($type, $this->_plugins)) {\n return true;\n }\n return false;\n }", "public function hasCommandHandler($command)\n {\n return array_key_exists(get_class($command), $this->handlers);\n }", "public function isRegistered() {\n\t\n\t\treturn $this->getCallbackController()->isRegistered();\n\t}", "public function isRegistered(string $name): bool;", "function getHandlers(): array;", "protected function isNameRegisteredInAdministrationMenu($name)\n {\n return array_search($name->toAdminName(), $this->config->get('administrator::administrator.menu'));\n }", "function feproc_handleruserapi_getallhandlers($args)\r\n{\r\n // Get arguments from argument array.\r\n extract($args);\r\n\r\n // Argument check\r\n if (!isset($startnum))\r\n {\r\n $startnum = 0;\r\n } else {\r\n --$startnum;\r\n }\r\n\r\n if (!isset($numitems))\r\n {\r\n $numitems = -1;\r\n }\r\n\r\n //$handlers = array();\r\n\r\n // Early security check.\r\n if (!pnSecAuthAction(0, 'FEproc::', \"::\", ACCESS_READ))\r\n {\r\n return array();\r\n }\r\n\r\n if ($type)\r\n {\r\n $where = \"fp_type = '$type'\";\r\n } else {\r\n $where = '';\r\n }\r\n\r\n $handlers = DBUtil::selectObjectArray('feproc_handlers', $where, 'name', $startnum, $numitems);\r\n foreach ($handlers as &$obj) {\r\n $obj['source'] = implode(':', array($obj['type'], $obj['modulename'], $obj['apiname'], $obj['apifunc']));\r\n $obj['hid'] = $obj['id'];\r\n }\r\n unset($obj);\r\n \r\n return $handlers;\r\n}", "public static function isRegistered($name)\n {\n\n return in_array($name, stream_get_wrappers());\n }", "public static function handle(string $name, array $args = [], string $ns = 'GNUsocial.'): bool\n {\n return !(self::$dispatcher->dispatch(new GenericEvent($name, $args), $ns . $name)->isPropagationStopped());\n }", "public function executeHandlersByType($type) {\n\t\t$result = array();\n\n\t\tif (isset($this->handlers[$type])) {\n\t\t\tforeach ($this->notificationClient->data as $notificationData) {\n\t\t\t\tforeach ($this->handlers[$type] as $handler) {\n\t\t\t\t\t$result[] = $handler->execute($notificationData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function has(string $name, string $type = self::NAME_MODE): bool {\n if ($type == self::NAME_MODE) {\n return array_key_exists($name, $this->list());\n } elseif ($type == self::FULL_MODE) {\n return in_array($name, $this->list());\n }\n return false;\n }", "public function get_handler_info($method, $type = 'postprod') {\n global $CFG;\n\n if (!empty($this->isset)) {\n // Bundle or set.\n debug_trace('Catalog item get handler info : Is a set or a bundle. No handler', TRACE_DEBUG);\n return [null,null];\n }\n\n $handler = null;\n $methodname = null;\n\n // TODO : Rationalize .... there is probably only one case to process.\n if ($type == 'postprod') {\n\n $hashandler = $this->enablehandler;\n if (empty($hashandler)) {\n debug_trace('Catalog item get handler info : Has no handler declared', TRACE_DEBUG);\n return [null, null];\n }\n\n $h = $this->enablehandler;\n\n if (!file_exists($CFG->dirroot.'/local/shop/datahandling/handlers/'.$h.'/'.$h.'.class.php')) {\n print_error('errorbadhandler', 'local_shop', $h);\n }\n\n include_once($CFG->dirroot.'/local/shop/datahandling/handlers/'.$h.'/'.$h.'.class.php');\n\n $classname = 'shop_handler_'.$h;\n $handler = new $classname('');\n } else {\n $handler = $this->get_handler();\n if (is_object($handler)) {\n $classname = get_class($handler);\n } else {\n debug_trace('Catalog item get handler info : No handler found', TRACE_DEBUG);\n return [null, null];\n }\n }\n\n if (!empty($method)) {\n $methodname = $method;\n if (!empty($type)) {\n // Extend possible queries, Keep the alternative for older compatibility.\n $methodname = $type.'_'.$method;\n }\n if (!method_exists($classname, $methodname)) {\n if ($type == 'postprod') {\n print_error('errorunimplementedhandlermethod', 'local_shop', $methodname);\n } else {\n debug_trace('Catalog item get handler info : Info type not yet supported', TRACE_DEBUG);\n return [null, null];\n }\n }\n }\n\n return array($handler, $methodname);\n }", "private function emailChannelHandler(): AbstractHandler|false\n {\n return last(app('log.iclogger')->getHandlers());\n }", "public function registered ($name) {\n\t\treturn isset($this->services[$name]);\n\t}", "public function handles($uri)\n\t{\n\t\treturn in_array($uri, $this->uris);\n\t}", "public function getHandler($entity_type_id, $handler_type);", "function action_exists($name)\n{\n\treturn Hooks::action_exists($name);\n}", "public static function isHookRegistered(Hook $hookToCheck){\n\t\tif(isset(static::$hooks[$hookToCheck->getName()]) and !empty(static::$hooks[$hookToCheck->getName()])){\n\t\t\tforeach(static::$hooks[$hookToCheck->getName()] as $hook){\n\t\t\t\tif($hookToCheck === $hook){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "static function is_event_plugin($name)\n {\n return (strstr($name, '_event_'));\n }", "public function exists($type, $name)\n\t{\n\t\tswitch ($type) {\n\n\t\t\tcase GET:\n\t\t\t\treturn isset($this->get[$name]);\n\t\t\tbreak;\n\n\t\t\tcase POST:\n\t\t\t\treturn isset($this->post[$name]);\n\t\t\tbreak;\n\n\t\t\tcase SESSION:\n\t\t\t\treturn isset($this->session[$name]);\n\t\t\tbreak;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function isHook($hook)\n {\n $isHook = false;\n if (!empty($hook)) {\n // if it's a key-path hook\n if (is_array($hook)) {\n $isHook = self::isHook($hook[1]);\n }\n // classname begin with &\n if ($hook[0] == '&') {\n $hook = substr($hook, 1);\n }\n //Check class exists\n if (class_exists($hook)) {\n $isHook = true;\n } //Check if namespace and class exists\n else {\n if (strpos($hook, \"\\\\\") !== false && class_exists($hook)) {\n $isHook = true;\n } //Check if file.php is used\n else {\n if (strpos($hook, \".php\") !== false) {\n $hookArray = explode(\".php\", $hook);\n if (!empty($hookArray) && is_array($hookArray)) {\n $file = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName($hookArray[0] . \".php\");\n if (file_exists($file)) {\n $isHook = true;\n }\n }\n }\n }\n }\n //Check if function is used\n if ($isHook === false && strpos($hook, \"->\") !== false) {\n $hookArray = explode(\"->\", $hook);\n if (!empty($hookArray) && is_array($hookArray)) {\n if (class_exists($hookArray[0])) {\n $isHook = true;\n }\n }\n }\n }\n return $isHook;\n }", "public function pickHandler()\n {\n $type = $this->prefer;\n $isHTML = self::isHTMLRequest();\n \n if ($type === 'js' && !$isHTML) $type = 'extension';\n\n if ($type === 'extension') {\n $type = null;\n if (static::checkUserAgent('firefox')) $type = 'firefox';\n elseif (static::checkUserAgent('chrome')) $type = 'chrome';\n elseif ($isHTML) $type = 'js';\n }\n \n return isset($type) ? $this->handlers[$type] : null;\n }", "public static function register()\n\t{\n\t\t$className = \\get_called_class();\n\t\tif (isset(self::$registered[$className])) return false;\n\t\tself::$registered[$className] = func_get_args();\n\t\tadd_action('_foomo_oembeds_loaded', array(__CLASS__, '_foomo_oembeds_loaded'));\n\t\treturn true;\n\t}", "public function hasResponder();", "protected function isAttributeHandler(mixed $value): bool\n {\n if ($value instanceof Closure) {\n return true;\n }\n\n return class_exists($value) && (method_exists($value, '__invoke') || method_exists($value, 'handle'));\n }", "public function getHandlerForType($type)\n {\n $bestHandler = $this->defaultHandler;\n foreach ($this->handlers as $handler) {\n if ($handler->getType() === $type && $handler->getPriority() > $bestHandler->getPriority()) {\n $bestHandler = $handler;\n }\n }\n\n return $bestHandler;\n }", "abstract public function handlers(): array;", "public function hasEvent($name);", "public static function off($class, $name, $handler = null)\n {\n $class = ltrim($class, '\\\\');\n if (empty(self::$_events[$name][$class]) && empty(self::$_eventWildcards[$name][$class])) {\n return false;\n }\n if ($handler === null) {\n unset(self::$_events[$name][$class]);\n unset(self::$_eventWildcards[$name][$class]);\n return true;\n }\n\n // plain event names\n if (isset(self::$_events[$name][$class])) {\n $removed = false;\n foreach (self::$_events[$name][$class] as $i => $event) {\n if ($event[0] === $handler) {\n unset(self::$_events[$name][$class][$i]);\n $removed = true;\n }\n }\n if ($removed) {\n self::$_events[$name][$class] = array_values(self::$_events[$name][$class]);\n return $removed;\n }\n }\n\n // wildcard event names\n $removed = false;\n foreach (self::$_eventWildcards[$name][$class] as $i => $event) {\n if ($event[0] === $handler) {\n unset(self::$_eventWildcards[$name][$class][$i]);\n $removed = true;\n }\n }\n if ($removed) {\n self::$_eventWildcards[$name][$class] = array_values(self::$_eventWildcards[$name][$class]);\n // remove empty wildcards to save future redundant regex checks :\n if (empty(self::$_eventWildcards[$name][$class])) {\n unset(self::$_eventWildcards[$name][$class]);\n if (empty(self::$_eventWildcards[$name])) {\n unset(self::$_eventWildcards[$name]);\n }\n }\n }\n\n return $removed;\n }", "public static function getHandlers()\n {\n return static::$handlers;\n }", "private function IsEventRegistered($event_name)\n\t{\n\t\tif (isset($this->events[$event_name]))\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 getHandlers(): array\n {\n return $this->handlers;\n }", "public function getHandlers(): array\n {\n return $this->handlers;\n }", "protected function init_handlers() {\n\t\t$keys = [ self::KEY_SCRIPTS, self::KEY_STYLES ];\n\t\tforeach ( $keys as $key ) {\n\t\t\tif ( $this->hasConfigKey( $key ) ) {\n\t\t\t\t$this->add_handler( $key );\n\t\t\t}\n\t\t}\n\t}", "protected function isSearchParamHasHandler($param)\n {\n return in_array($param, $this->getHandlingSearchParams());\n }", "public function get_handlers() {\n\t\treturn $this->handlers;\n\t}", "public function has(string $name, string $type=null): bool\n {\n if (\\is_null($type)) {\n foreach ($this->observers as $types) {\n foreach ($types as $observer) {\n if ($observer->getName() == $name) {\n return true;\n }\n }\n }\n } else {\n foreach ($this->observers[$type] as $observer) {\n if ($observer->getName() == $name) {\n return true;\n }\n }\n }\n\n return false;\n }", "function exists( $name ) {\n\t\treturn isset( $this->registry[ $name ]);\n\t}" ]
[ "0.72055304", "0.7032729", "0.69128156", "0.68877596", "0.68718505", "0.67608595", "0.6705924", "0.66769755", "0.6180191", "0.6164526", "0.60675144", "0.60157716", "0.59728354", "0.5946055", "0.59081894", "0.5867558", "0.58553106", "0.5830427", "0.5787456", "0.5771814", "0.5751737", "0.57264537", "0.5675719", "0.56598145", "0.56070876", "0.5586993", "0.55529076", "0.55413216", "0.5526996", "0.55145174", "0.54991215", "0.5487114", "0.5458058", "0.54568774", "0.54568774", "0.5440272", "0.5426836", "0.5416434", "0.53989553", "0.53989553", "0.5392281", "0.5388613", "0.53868264", "0.53798217", "0.53789234", "0.5370859", "0.5370793", "0.5340556", "0.5325932", "0.53256255", "0.5308251", "0.53080773", "0.5306252", "0.530065", "0.52892184", "0.5284275", "0.52783096", "0.52776873", "0.52776873", "0.52776873", "0.52644646", "0.5257823", "0.52510357", "0.52437425", "0.5226953", "0.521513", "0.5214095", "0.5205521", "0.5199873", "0.5193906", "0.5193323", "0.5193297", "0.5181417", "0.5170498", "0.5169412", "0.51649165", "0.516394", "0.51472574", "0.5141707", "0.5137673", "0.51371634", "0.51139474", "0.51092297", "0.50997967", "0.50947475", "0.5090106", "0.50875676", "0.5081999", "0.50753015", "0.5065886", "0.5058866", "0.5049033", "0.5041748", "0.5040722", "0.5040722", "0.5035687", "0.5033494", "0.5022333", "0.5020399", "0.5019026" ]
0.7956945
0
Returns an ordered array of handlers registered for $name and $type.
Возвращает упорядоченный массив обработчиков, зарегистрированных для $name и $type.
public function getOrderedHandlers($name, $type) { $registrations = []; if (!empty($this->registrations[$name][$type])) { if ($name !== 'all' && $type !== 'all') { array_splice($registrations, count($registrations), 0, $this->registrations[$name][$type]); } } if (!empty($this->registrations['all'][$type])) { if ($type !== 'all') { array_splice($registrations, count($registrations), 0, $this->registrations['all'][$type]); } } if (!empty($this->registrations[$name]['all'])) { if ($name !== 'all') { array_splice($registrations, count($registrations), 0, $this->registrations[$name]['all']); } } if (!empty($this->registrations['all']['all'])) { array_splice($registrations, count($registrations), 0, $this->registrations['all']['all']); } usort($registrations, function ($a, $b) { // priority first if ($a[self::REG_KEY_PRIORITY] < $b[self::REG_KEY_PRIORITY]) { return -1; } if ($a[self::REG_KEY_PRIORITY] > $b[self::REG_KEY_PRIORITY]) { return 1; } // then insertion order return ($a[self::REG_KEY_INDEX] < $b[self::REG_KEY_INDEX]) ? -1 : 1; }); $handlers = []; foreach ($registrations as $registration) { $handlers[] = $registration[self::REG_KEY_HANDLER]; } return $handlers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function executeHandlersByType($type) {\n\t\t$result = array();\n\n\t\tif (isset($this->handlers[$type])) {\n\t\t\tforeach ($this->notificationClient->data as $notificationData) {\n\t\t\t\tforeach ($this->handlers[$type] as $handler) {\n\t\t\t\t\t$result[] = $handler->execute($notificationData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getAllHandlers() {\n\t\t$ret = [];\n\t\tforeach ($this->registrations as $name => $types) {\n\t\t\tforeach ($types as $type => $registrations) {\n\t\t\t\tforeach ($registrations as $registration) {\n\t\t\t\t\t$priority = $registration[self::REG_KEY_PRIORITY];\n\t\t\t\t\t$handler = $registration[self::REG_KEY_HANDLER];\n\t\t\t\t\t$ret[$name][$type][$priority][] = $handler;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "function getsHandlersNamesList(): array;", "public static function getHandlers(string $name, string $ns = 'GNUsocial.'): array\n {\n return self::$dispatcher->getListeners($ns . $name);\n }", "public function getHandlers();", "public function getHandlers();", "function getHandlers(): array;", "public function getHandlers(): array;", "public function getHandlers(): array;", "public function getHandlers(): array;", "protected function getHandlers($messageName)\n {\n if (!empty($this->events[$messageName])) {\n return $this->sortByPriority($this->events[$messageName]);\n }\n\n return [];\n }", "public function getHandlers(): array\n {\n return $this->handlers;\n }", "public function getHandlers(): array\n {\n return $this->handlers;\n }", "public function clearHandlers($name, $type) {\n\t\tunset($this->registrations[$name][$type]);\n\t}", "function __getRegisteredHandlers()\n\t{\n\t\tstatic $arHandlersList = null;\n\t\tif (!isset($arHandlersList))\n\t\t{\n\t\t\t$arHandlersList = array();\n\t\t\tforeach(GetModuleEvents(\"sale\", \"onSaleDeliveryHandlersBuildList\", true) as $arHandler)\n\t\t\t\t$arHandlersList[] = ExecuteModuleEventEx($arHandler);\n\t\t}\n\t\treturn $arHandlersList;\n\t}", "protected function getEventHandlers(): array\n\t{\n\t\treturn [];\n\t}", "public function getListeners(?string $type)\n {\n $events = $this->_events;\n if (is_array($events)) {\n $fireEvents = $events[$type] ?? null;\n if ($fireEvents) {\n return $fireEvents;\n }\n }\n return [];\n }", "public function named(string $type): array\n {\n if ($this->contain($type)) {\n return $this->types[$type];\n }\n\n return [];\n }", "function feproc_handleruserapi_getallhandlers($args)\r\n{\r\n // Get arguments from argument array.\r\n extract($args);\r\n\r\n // Argument check\r\n if (!isset($startnum))\r\n {\r\n $startnum = 0;\r\n } else {\r\n --$startnum;\r\n }\r\n\r\n if (!isset($numitems))\r\n {\r\n $numitems = -1;\r\n }\r\n\r\n //$handlers = array();\r\n\r\n // Early security check.\r\n if (!pnSecAuthAction(0, 'FEproc::', \"::\", ACCESS_READ))\r\n {\r\n return array();\r\n }\r\n\r\n if ($type)\r\n {\r\n $where = \"fp_type = '$type'\";\r\n } else {\r\n $where = '';\r\n }\r\n\r\n $handlers = DBUtil::selectObjectArray('feproc_handlers', $where, 'name', $startnum, $numitems);\r\n foreach ($handlers as &$obj) {\r\n $obj['source'] = implode(':', array($obj['type'], $obj['modulename'], $obj['apiname'], $obj['apifunc']));\r\n $obj['hid'] = $obj['id'];\r\n }\r\n unset($obj);\r\n \r\n return $handlers;\r\n}", "private function getActiveHandlers()\n {\n $handlers = [];\n foreach ($this->handlers as $keyword => $handler) {\n if (array_key_exists($keyword, $this->capabilities)) {\n $handlers[] = $handler;\n }\n }\n\n return $handlers;\n }", "protected function getHandlersFor(string $event): array\n {\n if (!isset($this->orderedHandlers[$event])) {\n $this->orderHandlersFor($event);\n }\n\n return array_merge(\n $this->orderedHandlers[$event],\n $this->getMasterHandlersFor($event)\n );\n }", "public function getHandlerForType($type)\n {\n $bestHandler = $this->defaultHandler;\n foreach ($this->handlers as $handler) {\n if ($handler->getType() === $type && $handler->getPriority() > $bestHandler->getPriority()) {\n $bestHandler = $handler;\n }\n }\n\n return $bestHandler;\n }", "public static function getHandlers() {\r\n return array(\r\n 'tags' => array(\r\n 'tr' => 'handleTr',\r\n 'ntr' => 'handleNTr',\r\n ),\r\n 'filters' => array(\r\n 'tr' => 'handleTr',\r\n 'ntr' => 'handleNTr',\r\n ),\r\n 'hooks' => array(),\r\n );\r\n }", "public function getRegisteredHandlers()\n {\n $result = new PHP2_WebService_VO_XML();\n\n $result->Handlers->attributes['handlersCount'] = count($this->_requestHandlers);\n\n foreach ($this->_requestHandlers as $handlerName => $handlerInfo)\n {\n $handlerXMLObject = new PHP2_WebService_VO_XML(null, array('name' => $handlerName));\n $handlerXMLObject->Parameters = new PHP2_WebService_VO_XML();\n\n if (is_array($handlerInfo['parameters']))\n {\n foreach ($handlerInfo['parameters'] as $parameterInfo)\n {\n $handlerXMLObject->Parameters->addToCollection('Parameter', new PHP2_WebService_VO_XML(null, $parameterInfo));\n }\n }\n\n $result->Handlers->addToCollection('Handler', $handlerXMLObject);\n }\n\n return $result;\n }", "public function getListeners($type)\n {\n return $this->listeners[$type]??[];\n }", "public function get_handler_info($method, $type = 'postprod') {\n global $CFG;\n\n if (!empty($this->isset)) {\n // Bundle or set.\n debug_trace('Catalog item get handler info : Is a set or a bundle. No handler', TRACE_DEBUG);\n return [null,null];\n }\n\n $handler = null;\n $methodname = null;\n\n // TODO : Rationalize .... there is probably only one case to process.\n if ($type == 'postprod') {\n\n $hashandler = $this->enablehandler;\n if (empty($hashandler)) {\n debug_trace('Catalog item get handler info : Has no handler declared', TRACE_DEBUG);\n return [null, null];\n }\n\n $h = $this->enablehandler;\n\n if (!file_exists($CFG->dirroot.'/local/shop/datahandling/handlers/'.$h.'/'.$h.'.class.php')) {\n print_error('errorbadhandler', 'local_shop', $h);\n }\n\n include_once($CFG->dirroot.'/local/shop/datahandling/handlers/'.$h.'/'.$h.'.class.php');\n\n $classname = 'shop_handler_'.$h;\n $handler = new $classname('');\n } else {\n $handler = $this->get_handler();\n if (is_object($handler)) {\n $classname = get_class($handler);\n } else {\n debug_trace('Catalog item get handler info : No handler found', TRACE_DEBUG);\n return [null, null];\n }\n }\n\n if (!empty($method)) {\n $methodname = $method;\n if (!empty($type)) {\n // Extend possible queries, Keep the alternative for older compatibility.\n $methodname = $type.'_'.$method;\n }\n if (!method_exists($classname, $methodname)) {\n if ($type == 'postprod') {\n print_error('errorunimplementedhandlermethod', 'local_shop', $methodname);\n } else {\n debug_trace('Catalog item get handler info : Info type not yet supported', TRACE_DEBUG);\n return [null, null];\n }\n }\n }\n\n return array($handler, $methodname);\n }", "public function getOperationHandlers()\n {\n $operationHandlers = [];\n foreach (glob($this->globPattern) as $file) {\n $class = $this->getOperationHandlerNamespace() . basename($file, '.php');\n\n if (class_exists($class) && is_subclass_of($class, $this->getOperationHandlerNamespace() . \"OperationHandler\"))\n {\n $operationHandlers[] = $class;\n }\n }\n\n return $operationHandlers;\n }", "protected function loadHandlers($handlerName)\n {\n $handlers = [];\n\n foreach ($this->handlerNamespaces as $namespace) {\n $className = \"{$namespace}{$handlerName}\";\n if (class_exists($className)) {\n $handler = new $className();\n $handlers[] = $handler;\n }\n }\n\n return $handlers;\n }", "protected function _getHandlers()\n {\n if (!static::$_handlers) {\n static::$_handlers = P4Cms_Navigation_DynamicHandler::fetchAll();\n }\n\n return static::$_handlers;\n }", "public static function dispatcher($name)\n\t{\n\t\tstatic $all = [];\n\n\t\tif(! isset($all[$name]))\n\t\t{\n\t\t\t// system has been installed\n\t\t\t// use default mode\n\t\t\tif(Helper::isSystemInstall())\n\t\t\t{\n\t\t\t\t$cache = new Cache($name, 'events');\n\n\t\t\t\tif( $cache->ready() )\n\t\t\t\t{\n\t\t\t\t\t$data = $cache->import();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$event = new EventFactory($name);\n\t\t\t\t\tif( $event->load() === false )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new NotFoundException(\"Event '{$name}' is not registered in system\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$data = $event->getContentData();\n\t\t\t\t\tif(! $cache->export($data))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new WriteException(\"Can't write cache data for the '{$name}' event\");\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$data = (new EventFactory($name))->getContentData();\n\t\t\t}\n\n\t\t\t$manager = new Dispatcher(\n\t\t\t\t$data[\"name\"],\n\t\t\t\t$data[\"completable\"],\n\t\t\t\tfunction (Dispatcher $manager) use ($data) {\n\t\t\t\t\tforeach($data[\"classes\"] as $class_name)\n\t\t\t\t\t{\n\t\t\t\t\t\t/** @var \\EApp\\Event\\Interfaces\\EventPrepareInterface $class */\n\t\t\t\t\t\t$class = new $class_name($data[\"name\"]);\n\t\t\t\t\t\t$class->prepare($manager);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t$all[$name] = $manager;\n\t\t}\n\n\t\treturn $all[$name];\n\t}", "abstract private function registerHandlers(): array;", "public function processHandlers($name, $handlers){\r\n \r\n if(count($handlers) == 0){\r\n \r\n foreach($this->_defaulthandlers as $handler){\r\n \r\n //initialize BrowserConsole\r\n if($handler == BrowserConsoleHandler::class){\r\n $handle = App::make($handler, ['level' => $this->minloglevel]);\r\n }\r\n else{\r\n \r\n //load the logpath \r\n if($this->_config->send_log_to == 'file'){\r\n\r\n $this->logfolder = ABSOLUTE_PATH .DS. $this->_config->logpath;\r\n $this->logfile = $this->logfolder .DS. strtolower($name).'.log';\r\n \r\n $stream = $this->logfile;\r\n }\r\n else{\r\n $stream = 'php://stderr';\r\n }\r\n \r\n $handle = App::make($handler, [\r\n 'stream' => $stream,\r\n 'level' => $this->minloglevel, \r\n 'bubble' => $this->_config->log_to_console\r\n ]);\r\n }\r\n \r\n //insert handler\r\n if(!is_null($handle))\r\n $this->logger->pushHandler($handle);\r\n }\r\n }\r\n }", "public function getCallbacks(string $name): array\n {\n return $this->fieldCallbacks[$name] ?? [];\n }", "public function getHandlers()\n {\n return $this->handlers;\n }", "public function getHandlers()\n {\n return $this->handlers;\n }", "public function getHandlers()\n {\n return $this->handlers;\n }", "protected function getQueryHandlers(): array\n\t{\n\t\treturn [];\n\t}", "public static function getActiveHandlersList()\n {\n $cacheKey = 'DevGroup/EventsSystem:activeHandlersList';\n $handlers = Yii::$app->cache->get($cacheKey);\n if ($handlers === false) {\n $eventEventHandlers = EventEventHandler::find()\n ->where(['is_active' => 1])\n ->orderBy(['sort_order' => SORT_ASC])\n ->asArray(true)\n ->all();\n $events = Event::find()\n ->where(['id' => array_column($eventEventHandlers, 'event_id', 'event_id')])\n ->indexBy('id')\n ->asArray(true)\n ->all();\n $eventGroups = EventGroup::find()\n ->where(['id' => array_column($events, 'event_group_id', 'event_group_id')])\n ->indexBy('id')\n ->asArray(true)\n ->all();\n $eventHandlers = EventHandler::find()\n ->where(['id' => array_column($eventEventHandlers, 'event_handler_id', 'event_handler_id')])\n ->indexBy('id')\n ->asArray(true)\n ->all();\n $handlers = [];\n foreach ($eventEventHandlers as $eventEventHandler) {\n if (isset(\n $eventHandlers[$eventEventHandler['event_handler_id']],\n $events[$eventEventHandler['event_id']],\n $eventGroups[$events[$eventEventHandler['event_id']]['event_group_id']]\n ) === false\n ) {\n continue;\n }\n try {\n $data = Json::decode($eventEventHandler['packed_json_params']);\n } catch (\\Exception $e) {\n $data = [];\n }\n $handlers[] = [\n 'class' => $eventGroups[$events[$eventEventHandler['event_id']]['event_group_id']]['owner_class_name'],\n 'name' => $events[$eventEventHandler['event_id']]['execution_point'],\n 'callable' => [\n $eventHandlers[$eventEventHandler['event_handler_id']]['class_name'],\n $eventEventHandler['method'],\n ],\n 'data' => $data,\n ];\n }\n Yii::$app->cache->set(\n $cacheKey,\n $handlers,\n 86400,\n new TagDependency(\n [\n 'tags' => [\n NamingHelper::getCommonTag(EventGroup::className()),\n NamingHelper::getCommonTag(Event::className()),\n NamingHelper::getCommonTag(EventHandler::className()),\n NamingHelper::getCommonTag(EventEventHandler::className()),\n ],\n ]\n )\n );\n }\n return $handlers;\n }", "public function all(string $type=null): array\n {\n if (\\is_null($type)) {\n return $this->observers;\n } else {\n return ($this->observers[$type] ?? []);\n }\n }", "public static function get_handlers($path)\n\t{\n\t\t$result = Kohana::list_files($path);\n\t\tarray_walk($result,function (&$f,$k){$f = basename($f, EXT);});\n\t\treturn $result;\n\t}", "abstract public function handlers(): array;", "public function get_handlers() {\n\t\treturn $this->handlers;\n\t}", "public function GetModulesOfType($type)\n {\n $pointerArray = array();\n foreach ($this->modules as $moduleKey => $module) {\n if (is_subclass_of($this->modules[$moduleKey], $type) || 0 == strcasecmp(get_class($this->modules[$moduleKey]), $type)) {\n $pointerArray[] = $this->modules[$moduleKey];\n }\n }\n\n return $pointerArray;\n }", "public static function getHandlers()\n {\n return static::$handlers;\n }", "protected function sortHooks ( int $type, $tag = null ) : array\n\t{\n\t\t// Get actions or filters\n\t\t$accessing = $this->getType($type);\n\n\t\t// If there is no TAG set\n\t\tif ( $tag === null )\n\t\t{\n\t\t\t// Sort each TAG\n\t\t\tforeach ( $this->$accessing as $key => $value )\n\t\t\t{ $this->sortHooks($key); }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// If the TAG exists, sort it, if not return an empty array\n\t\t\tif ( isset( $this->$accessing[$tag] ) )\n\t\t\t{ ksort ( $this->$accessing[$tag] ); }\n\t\t\telse\n\t\t\t{ return array(); }\n\n\t\t\treturn $this->$accessing[$tag];\n\t\t}\n\t}", "public function createHandlers(JobInterface $job, $level, $bubble)\n {\n $handlers = [];\n foreach ($this->factories as $factory) {\n $handlers[] = $factory->createHandler($job, $level, $bubble);\n }\n\n return $handlers;\n }", "function determineTypeHandler($type);", "protected function getKeyMapForType( $type )\n\t{\n\t\treturn array();\n\t}", "protected function getKeyMapForType( $type )\n\t{\n\t\treturn array();\n\t}", "protected function findRoutineNames($type, $schema = '')\n {\n $bindings = [':type' => $type];\n $where = 'ROUTINE_TYPE = :type';\n if (!empty($schema)) {\n $where .= ' AND ROUTINE_SCHEMA = :schema';\n $bindings[':schema'] = $schema;\n }\n\n $sql = <<<MYSQL\nSELECT ROUTINE_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.ROUTINES WHERE {$where}\nMYSQL;\n\n $rows = $this->connection->select($sql, $bindings);\n\n $defaultSchema = $this->getNamingSchema();\n $addSchema = (!empty($schema) && ($defaultSchema !== $schema));\n\n $names = [];\n foreach ($rows as $row) {\n $row = array_change_key_case((array)$row, CASE_UPPER);\n $resourceName = array_get($row, 'ROUTINE_NAME');\n $schemaName = $schema;\n $internalName = $schemaName . '.' . $resourceName;\n $name = ($addSchema) ? $internalName : $resourceName;\n $quotedName = $this->quoteTableName($schemaName) . '.' . $this->quoteTableName($resourceName);\n $returnType = array_get($row, 'DATA_TYPE');\n if (!empty($returnType) && (0 !== strcasecmp('void', $returnType))) {\n $returnType = static::extractSimpleType($returnType);\n }\n $settings = compact('schemaName', 'resourceName', 'name', 'internalName', 'quotedName', 'returnType');\n $names[strtolower($name)] =\n ('PROCEDURE' === $type) ? new ProcedureSchema($settings) : new FunctionSchema($settings);\n }\n\n return $names;\n }", "public function getInstancesOf($type, $reverseOrder = false)\n {\n $plugins = array_filter(\n $this->getInstances(),\n function ($plugin) use ($type) {\n return is_a($plugin, $type);\n }\n );\n\n return $reverseOrder ? array_reverse($plugins) : $plugins;\n }", "public function getByType(string $type): array {\n return $this->filterLogs(function ($item) use ($type) {\n return $item instanceof $type;\n });\n }", "public function getByType(string $type): array {\n return $this->filterLogs(function ($item) use ($type) {\n return $item instanceof $type;\n });\n }", "public function getHandlers() {\n\n return $this->cacheHandlers;\n\n }", "public function hasHandler($name, $type) {\n\t\treturn !empty($this->registrations[$name][$type]);\n\t}", "protected function init_dependency_type( $type ) {\n\t\t$array = [ ];\n\t\t$data = $this->getConfigKey( $type );\n\t\tforeach ( $data as $dependency ) {\n\t\t\t$handle = array_key_exists( 'handle',\n\t\t\t\t$dependency ) ? $dependency['handle'] : '';\n\t\t\t$array[ $handle ] = $dependency;\n\t\t}\n\t\treturn $array;\n\t}", "public function getActions($name) {\n $class = $this->getClass($name);\n if (!isset($this->actions[$name])) {\n $reflection = new \\ReflectionClass($class);\n $methods = $reflection->getMethods(\\ReflectionMethod::IS_PUBLIC);\n $this->actions[$name] = array();\n foreach ($methods as $method) {\n if ($method->class == $class and $method->name != 'before' and $method->name != 'after')\n $this->actions[$name][] = $method->name;\n }\n }\n return $this->actions[$name];\n }", "function listHashesByType($type)\n\t{\n $this->endpoint = \"api.php?api_key=\".$this->api_key.\"&action=type&type=\".$type;\n return $this->makeCall($this->url.$this->endpoint);\n\t}", "private function collectEventNames(): array\n {\n $names = [];\n\n foreach ((new Finder)->in(__DIR__ . '/../../handler')->files() as $handler) {\n if ('AbstractWebhook' === ($name = substr($handler->getBasename(), 0, strlen($handler->getBasename()) - 11))) { // cut off 'Handler.php' suffix from file names\n continue; // skip the abstract webhook class\n }\n\n $names[] = Str::githubEventNameFromClass($name);\n }\n\n return $names;\n }", "public function getFunctions($type)\n {\n $class = $this->getTypeClass($type);\n return $this->getFunctionsClass($class);\n }", "public function getRegisteredHandlers()\n {\n return $this->_requestHandlers;\n }", "public function inspect($nameFilter = null, $typeFilter = null)\n {\n $result = [];\n $name = $nameFilter ? $this->normalizeName($nameFilter) : null;\n\n if (empty($typeFilter)) {\n $typeFilter = static::I_ALL;\n }\n\n $types = [\n static::I_BINDINGS => 'classDefinitions',\n static::I_DELEGATES => 'delegates',\n static::I_PREPARES => 'prepares',\n static::I_ALIASES => 'aliases',\n static::I_SHARES => 'shares',\n ];\n\n foreach ($types as $type => $source) {\n if ($typeFilter & $type) {\n $result[$type] = $this->filter($this->{$source}, $name);\n }\n }\n\n return $result;\n }", "private function getHandlersFromCommunicationConfig($topicName)\n {\n $topicConfig = $this->getCommunicationConfig()->getTopic($topicName);\n $handlers = [];\n foreach ($topicConfig[CommunicationConfig::TOPIC_HANDLERS] as $handlerConfig) {\n $handlers[] = [\n $this->objectManager->create($handlerConfig[CommunicationConfig::HANDLER_TYPE]),\n $handlerConfig[CommunicationConfig::HANDLER_METHOD]\n ];\n }\n return $handlers;\n }", "public function getExtensionHandlers()\n {\n return array_values($this->handlers);\n }", "public function splitType($type)\n {\n $values = array('type' => $type);\n if (strpos($type, 'P4Cms_Navigation_Page_Dynamic/') === 0) {\n list($values['type'], $values['handler']) = explode('/', $type, 2);\n }\n\n return $values;\n }", "protected function getDefinitions($type)\n {\n try {\n $fields = $this->finder->index();\n return Arr::get($fields, $type, []);\n } catch (\\Throwable $th) {\n throw $th;\n return [];\n }\n }", "public function getAllTypeNames()\n {\n $query = $this->dbh->query(\"SELECT * FROM types\");\n\n $types = array();\n\n while($row = $query->fetch()) {\n $types[] = $row['name'];\n }\n\n return $types;\n }", "protected function orderHandlersFor(string $event)\n {\n $sorted = $this->handlers[$event];\n\n krsort($sorted, SORT_NUMERIC);\n\n $this->orderedHandlers[$event] = call_user_func_array('array_merge', $sorted);\n }", "public function listTypes()\n {\n $this->calledMethods[] = ['method' => 'listTypes', 'arguments' => func_get_args()];\n return $this->types;\n }", "public function getAll(string $type) :array\n {\n if(!array_key_exists($type,config(\"swapi.endpoints\"))){\n throw new RouteNotFoundException(\"The route \\\"$type\\\" to SWApi is not found\");\n }\n\n $this->call(\"$type/\");\n\n $result = $this->getResultado();\n\n return $result->results;\n }", "public function provides()\n\t{\n\t\treturn [\n\t\t\t// attributes\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Attributes\\AttributeGetHandler',\n\n\t\t\t// Attribute sets\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\AttributeSets\\AttributeSetGetHandler',\n\n\t\t\t// Entity types\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\EntityTypes\\EntityTypeGetHandler',\n\n\t\t\t// Entities\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityCreateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityUpdateHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityDeleteHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityFetchHandler',\n\t\t\t'Congraph\\Eav\\Handlers\\Commands\\Entities\\EntityGetHandler',\n\t\t];\n\t}", "public function findEvents(){\n $events = config('webmagic.request.events');\n\n foreach($events as $key=>$event){\n $names[$key] = $key;\n }\n return $names;\n }", "public function getPaymentHandlers()\n {\n return [\n ApplePayPayment::class,\n BanContactPayment::class,\n BankTransferPayment::class,\n BelfiusPayment::class,\n CreditCardPayment::class,\n DirectDebitPayment::class,\n EpsPayment::class,\n GiftCardPayment::class,\n GiroPayPayment::class,\n iDealPayment::class,\n IngHomePayPayment::class,\n KbcPayment::class,\n KlarnaPayLaterPayment::class,\n KlarnaSliceItPayment::class,\n PayPalPayment::class,\n PaySafeCardPayment::class,\n Przelewy24Payment::class,\n SofortPayment::class,\n ];\n }", "private function getPlugins($type)\n {\n $this->_loadScopedData();\n if (!isset($this->_inherited[$type]) && !array_key_exists($type, $this->_inherited)) {\n $this->_inheritPlugins($type);\n }\n return $this->_inherited[$type];\n }", "function data_get_views_handler_options($type = NULL, $reset = FALSE) {\n static $handlers;\n if (!isset($handlers) || $reset) {\n $handlers = array();\n $handlers['field'] = array(\n 'views_handler_field' => 'views_handler_field',\n 'views_handler_field_numeric' => 'views_handler_field_numeric',\n 'views_handler_field_date' => 'views_handler_field_date',\n 'views_handler_field_url' => 'views_handler_field_url',\n 'views_handler_field_data_markup' => 'views_handler_field_data_markup',\n );\n $handlers['filter'] = array(\n 'views_handler_filter_date' => 'views_handler_filter_date',\n 'views_handler_filter_float' => 'views_handler_filter_float',\n 'views_handler_filter_numeric' => 'views_handler_filter_numeric',\n 'views_handler_filter_string' => 'views_handler_filter_string',\n );\n $handlers['argument'] = array(\n 'views_handler_argument' => 'views_handler_argument',\n 'views_handler_argument_date' => 'views_handler_argument_date',\n 'views_handler_argument_numeric' => 'views_handler_argument_numeric',\n 'views_handler_argument_string' => 'views_handler_argument_string',\n );\n $handlers['sort'] = array(\n 'views_handler_sort' => 'views_handler_sort',\n 'views_handler_sort_date' => 'views_handler_sort_date',\n );\n // Allow other modules to alter the list of available handlers.\n drupal_alter('data_views_handlers', $handlers);\n }\n return isset($type) && isset($handlers[$type]) ? $handlers[$type] : $handlers;\n}", "public function getHandlers(ProgressUpdateEvent $e)\n {\n if (array_key_exists($e->getTag(), $this->handlersByTag)) {\n $handlers = $this->handlersByTag[$e->getTag()];\n $toReturn = [];\n foreach ($handlers as $handler) {\n if($handler->isSharable()) {\n $toReturn[] = $handler;\n } else {\n $toReturn[] = clone $handler;\n }\n }\n\n return $toReturn;\n }\n\n throw new HandlerNotFoundException($e);\n }", "public function getEvents()\r\n {\r\n return [\r\n // Provide name and optional priority\r\n 'before' => ['onBefore'],\r\n 'complete' => ['onComplete'],\r\n // You can pass a list of listeners with different priorities\r\n //'error' => [['beforeError', 'first'], ['afterError', 'last']]\r\n ];\r\n }", "public function differentHandlersDataProvider(): array\n {\n return [\n # 0, class method\n [\n '/one-component-class-method/',\n [\n $this,\n 'helloWorldOutput'\n ],\n 'Hello world!'\n ],\n # 1, lambda\n [\n '/one-component-lambda/',\n function () {\n return 'Hello lambda!';\n },\n 'Hello lambda!'\n ]\n ];\n }", "function types(){\n\t\tif(false && $types = Cache::instance()->get('event.types', false)){} else {\n\t\t\t$results = DB::select_array(array(DB::expr(\"DISTINCT `types`\")))->from(\"events\")->as_object()->execute();\n\t\t\t$types = array();\n\t\t\tforeach($results as $result) $types[] = $result->types;\n\t\t\t$types = array_unique(explode(\",\", implode(\",\", $types)));\n\t\t\tCache::instance()->set('event.types', $types);\n\t\t}\n\t\treturn $types;\n\t}", "public function execute() {\n\t\t$sequence = array(\n\t\t\t\\Kaltura\\Notification\\Handler::HANDLER_TYPE_PRE_PROCESS,\n\t\t\t$this->notificationClient->type,\n\t\t\t\\Kaltura\\Notification\\Handler::HANDLER_TYPE_ALWAYS_PROCESS,\n\t\t\t\\Kaltura\\Notification\\Handler::HANDLER_TYPE_POST_PROCESS,\n\t\t);\n\n\t\t$result = array();\n\n\t\tforeach ($sequence as $handlerType) {\n\t\t\t$result[$handlerType] = $this->executeHandlersByType($handlerType);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getAllNamedActions(string $ptype) : array\n {\n return $this->model->getValuesForFieldInPolicy(Consts::P, $ptype, 2);\n }", "public function getNames(): array\n\t{\n\t\treturn $this->types;\n\t}", "public function getRegisteredRequestHandlerClassNames() {}", "protected function getHandlers(string $channel): array\n {\n // always include default handler\n $handlers = [];\n\n foreach ($this->config->getHandlers($channel) as $handler) {\n if (!$handler instanceof Autowire) {\n $handlers[] = $handler;\n continue;\n }\n\n try {\n $handlers[] = $handler->resolve($this->factory);\n } catch (ContainerExceptionInterface $e) {\n throw new ConfigException($e->getMessage(), $e->getCode(), $e);\n }\n }\n\n $handlers[] = $this->eventHandler;\n\n return $handlers;\n }", "public function getAllWithType($type);", "protected function eventPluginTypes()\n\t{\n\t\treturn ['phproberto_routing'];\n\t}", "protected function _getMetaInjectorsWithTypeEqualTo($type)\n {\n $metaInjectors = array();\n if (null !== $this->_meta->getInjectors()) {\n foreach ($this->_meta->getInjectors() as $metaInjector) {\n if ($type === $metaInjector->getType()) {\n $metaInjectors[] = $metaInjector;\n }\n }\n }\n return $metaInjectors;\n }", "public function getHandlers()\n {\n return $this->logHandler;\n }", "public static function getHookexecuteList(){\n $sql='SELECT name FROM `' . _DB_PREFIX_ . 'hook` WHERE LOWER(name) NOT LIKE \\'action%\\' AND LOWER(name) NOT LIKE \\'dashboard%\\'\n AND LOWER(name) NOT LIKE \\'displayadmin%\\' AND LOWER(name) NOT LIKE \\'displayattribute%\\' AND LOWER(name) NOT LIKE \\'displaybackoffice%\\'\n AND LOWER(name) NOT LIKE \\'displaybefore%\\' AND LOWER(name) NOT LIKE \\'displaycarrier%\\' AND LOWER(name) NOT LIKE \\'displaycompare%\\'\n AND LOWER(name) NOT LIKE \\'displaycustomer%\\' AND LOWER(name) NOT LIKE \\'displayfeature%\\' AND LOWER(name) NOT LIKE \\'display%product\\'\n AND LOWER(name) NOT LIKE \\'displayheader%\\' AND LOWER(name) NOT LIKE \\'header%\\' AND LOWER(name) NOT LIKE \\'displayInvoice%\\' \n AND LOWER(name) NOT LIKE \\'displaymaintenance%\\' AND LOWER(name) NOT LIKE \\'displaymobile%\\' AND LOWER(name) NOT LIKE \\'displaymyaccount%\\' \n AND LOWER(name) NOT LIKE \\'displayorder%\\' AND LOWER(name) NOT LIKE \\'displayoverride%\\' AND LOWER(name) NOT LIKE \\'displaypayment%\\' \n AND LOWER(name) NOT LIKE \\'displaypdf%\\' AND LOWER(name) NOT LIKE \\'displayproduct%\\' AND LOWER(name) NOT LIKE \\'displayshopping%\\'';\n $results = Db::getInstance()->executeS($sql);\n $hooklist = array();\n if ($results && is_array($results) && sizeof($results))\n foreach ($results as $result)\n $hooklist[] = $result['name'];\n return array_values($hooklist);\n }", "private function ___getItemsByType_() {\n return array();\n }", "public static function GetLogTypes()\n {\n // initialize return value\n $aTypes = array();\n\n // append all the loggers with high priority loggers first\n $aLoggers = self::$aHighPriorityLoggers + self::$aLowPriorityLoggers;\n\n // cycle through loggers\n foreach( $aLoggers as $sLogger )\n {\n // try to get log types with this logger\n $aTypes = array_merge(\n call_user_func_array(\n array( $sLogger, 'GetLogTypes' ),\n func_get_args()\n ),\n $aTypes\n );\n }\n\n // get the unique types and sort them\n $aTypes = array_unique( $aTypes );\n sort( $aTypes );\n\n return $aTypes;\n }", "public function findByType(string $type): array;", "protected function getCommandHandlers(): array\n\t{\n\t\treturn [];\n\t}", "public static function getUnitPlugins($type) {\n $manager = self::unitPluginManager();\n $units = [];\n\n foreach ($manager->getDefinitions() as $id => $plugin) {\n if ($plugin['type'] == $type) {\n $units[$id] = $manager->createInstance($id, $plugin);\n }\n }\n\n return $units;\n }", "public function getExtensionsFor(string $type): array\n {\n return $this->catalogue->getExtensionsFor($type);\n }", "public static function event_types() {\n\t\treturn array(\n\t\t\tself::EVENT_TYPE_START => self::EVENT_TYPE_START,\n\t\t\tself::EVENT_TYPE_TIME => self::EVENT_TYPE_TIME,\n\t\t\tself::EVENT_TYPE_CONV => self::EVENT_TYPE_CONV,\n\t\t\tself::EVENT_TYPE_END => self::EVENT_TYPE_END,\n\t\t);\n\t}", "public function getTypes(): array\n\t{\n\t\treturn array_map(function ($name) { return self::fromString($name); }, $this->types);\n\t}", "public static function typeRoutes () {\n return include dirname(__FILE__). '/../../../routes/type.php';\n }", "private static function parse(string $type)\n\t{\n\t\t$values = [];\n\t\tforeach (static::${$type} as $key => $item) {\n\t\t\tif ('cron' === static::$sapi && !$item['testCli']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isset($item['type']) && ($methodName = 'parser' . $item['type']) && \\method_exists(__CLASS__, $methodName)) {\n\t\t\t\t$values[$key] = \\call_user_func_array([__CLASS__, $methodName], [$key, $item]);\n\t\t\t} elseif (isset($item['container'])) {\n\t\t\t\t$container = $item['container'];\n\t\t\t\tif (isset(static::${$container}[\\strtolower($key)]) || isset(static::${$container}[$key])) {\n\t\t\t\t\t$values[$key] = static::${$container}[\\strtolower($key)] ?? static::${$container}[$key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}", "function Register($type, $handler)\n\t\t{\n\t\t\t$this->databaseTypes[$type] = $handler;\n\t\t}" ]
[ "0.7161018", "0.7026488", "0.66113025", "0.6379648", "0.6107522", "0.6107522", "0.608803", "0.6029227", "0.6029227", "0.6029227", "0.59928787", "0.5945849", "0.5945849", "0.59303594", "0.58992445", "0.5879072", "0.58011216", "0.5765971", "0.57299995", "0.56806815", "0.56784797", "0.5609209", "0.559871", "0.55733836", "0.55689526", "0.55570674", "0.55375874", "0.5506145", "0.547643", "0.5470573", "0.54565084", "0.5437065", "0.5428906", "0.54162484", "0.54162484", "0.54162484", "0.5414201", "0.54054946", "0.5399574", "0.536497", "0.5359229", "0.5355568", "0.53549206", "0.5352444", "0.5348829", "0.5266538", "0.5264495", "0.5262646", "0.5262646", "0.52612644", "0.5224547", "0.51929057", "0.51929057", "0.517736", "0.5169366", "0.5159848", "0.5157366", "0.5152555", "0.5149438", "0.5149187", "0.5143598", "0.5117011", "0.51137906", "0.51090795", "0.5095685", "0.5091946", "0.5078279", "0.5058517", "0.5052147", "0.500536", "0.49952483", "0.49950466", "0.4991017", "0.49907053", "0.49838418", "0.4978711", "0.4975094", "0.4973539", "0.496545", "0.49502993", "0.49487805", "0.49467364", "0.4945354", "0.4944599", "0.49284554", "0.49239585", "0.49172732", "0.49153987", "0.491043", "0.49086958", "0.48909998", "0.48846912", "0.488175", "0.488032", "0.4872158", "0.48558328", "0.48487192", "0.48485017", "0.48402926", "0.48388743" ]
0.8531514
0
Retrieve the folder list
Получить список папок
public function fetchFolderList() { $client = new Client($this->getUrl()); $args = array( 'sid' => new Value($this->getSid()), ); $response = $client->send(new Request('folder.list', array(new Value($args, "struct")))); $response = json_decode(json_encode($response), true); if (isset($response['val']['me']['struct']['folders']['me']['array'])) { return array_combine( array_map(function($o) { return $o['me']['struct']['id']['me']['int']; }, $response['val']['me']['struct']['folders']['me']['array']), array_map(function($o) { return $o['me']['struct']['name']['me']['string']; }, $response['val']['me']['struct']['folders']['me']['array']) ); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDirList();", "public function listFolders()\n {\n return $this->_driver->listFolders();\n }", "public function getDirectories();", "public function getDirectories();", "public function listFolders()\n {\n return $this->decodeList($this->_listFolders());\n }", "private function get_folders()\r\n {\r\n\r\n if (!$this -> folder_query)\r\n $this -> folder_query = \"SELECT DISTINCT $this->folder FROM $this->table ORDER BY $this->folder ASC\";\r\n\r\n return logex::$tcnx -> query($this -> folder_query);\r\n }", "abstract protected function fetchFolders();", "function getSubfolders() ;", "public function getFolder();", "public function getFolder();", "public function folders()\n {\n return $this->folders;\n }", "public function getAllFolders()\n {\n $qb = $this->getEntityManager()->createQueryBuilder();\n $results = $qb->select('f.id, f.name')->distinct(true)\n ->from('P5\\Model\\Folder', 'f')\n ->join('P5\\Model\\Document', 'd', 'WITH', 'd.folder=f')\n ->getQuery()->getArrayResult();\n\n return $results;\n }", "public function getFolders() {\n\t\treturn $this->callApi('webservice', 'getFolders');\n\n\t}", "private function dropbox_list_folder() {\n global $_POST;\n $listFiles = new CRUD(\n \"https://api.dropboxapi.com/2/files/list_folder\",\n \"POST\",\n array(\n \"Authorization\" => $_POST[\"Authorization\"],\n \"Content-type\" => \"application/json\"\n ),\n array(\n \"path\" => \"\",\n \"recursive\" => false,\n \"include_media_info\" => false,\n \"include_deleted\" => false,\n \"include_has_explicit_shared_members\" => false\n )\n );\n\n $execRes = json_decode($listFiles -> response(\"json\"));\n $listArray = array();\n\n # process reporting is complete\n if($execRes -> {'state'} == \"success\") {\n\n try {\n # dropbox response is also correct\n $resList = json_decode($execRes -> {'data'}) -> {'entries'};\n\n for($i = 0 ; $i < count($resList) ; $i++) {\n $tmp = array(\n \"name\" => $resList[$i] -> {'name'}, \n \"path_display\" => $resList[$i] -> {'path_display'},\n \"client_modified\" => $resList[$i] -> {'client_modified'},\n \"id\" => $resList[$i] -> {'id'}\n );\n array_push($listArray, $tmp);\n }\n \n $this -> stdRet(\n \"success\", \n \"Listing dropbox folder is complete.\", \n $listArray\n );\n } catch (Exception $e) {\n # dropbox response is error occuring\n $this -> stdRet(\n \"failure\",\n \"Listing dropbox folder is failure.\",\n $e -> getMessage()\n );\n }\n\n \n } else {\n $this -> stdRet(\"failure\", \"Can not decode Dropbox result.\", \"\");\n } \n\n return ; \n }", "public function getFolderInfo() {}", "public function getFolder()\n {\n $folder = Folders::all();\n return response()->json(['folder' => $folder]);\n }", "public static function getAll()\n\t{\n\t\t$db = PearDatabase::getInstance();\n\t\t$folders = Vtiger_Cache::get('reports', 'folders');\n\t\tif (!$folders) {\n\t\t\t$folders = array();\n\t\t\t$result = $db->pquery(\"SELECT * FROM vtiger_reportfolder ORDER BY foldername ASC\", array());\n\t\t\t$noOfFolders = $db->num_rows($result);\n\t\t\tif ($noOfFolders > 0) {\n\t\t\t\tfor ($i = 0; $i < $noOfFolders; $i++) {\n\t\t\t\t\t$folderModel = Reports_Folder_Model::getInstance();\n\t\t\t\t\t$values = $db->query_result_rowdata($result, $i);\n\t\t\t\t\t$folders[$values['folderid']] = $folderModel->setData($values);\n\t\t\t\t\tVtiger_Cache::set('reportsFolder', $values['folderid'], $folderModel);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVtiger_Cache::set('reports', 'folders', $folders);\n\t\t}\n\t\treturn $folders;\n\t}", "public function getFolderList()\n {\n $this->_logger->debug('Horde::getFolderList()');\n $folderlist = $this->getFolders();\n $folders = array();\n foreach ($folderlist as $f) {\n $folders[] = $this->statFolder($f->serverid, $f->parentid, $f->displayname);\n }\n\n return $folders;\n }", "private static function getFolders() : array\n\t{\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeFunctions = \\MarkNotes\\Functions::getInstance();\n\n\t\t// Call the listfiles.get event and initialize $arrFiles\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$args = [&$arrFiles];\n\t\t$aeEvents->loadPlugins('task.listfiles.get');\n\t\t$aeEvents->trigger('task.listfiles.get::run', $args);\n\t\t$arrFiles = $args[0];\n\n\t\t// Now, only keep directory name, not files\n\t\t$arrFiles = array_map('dirname', $arrFiles);\n\n\t\t// And make the array unique (not the same folder twice)\n\t\t$arrFolders = $aeFunctions->array_iunique($arrFiles, SORT_STRING);\n\n\t\t// The first position of the array is the /docs folder,\n\t\t// remove it\n\t\tunset($arrFolders[0]);\n\n\t\t// Now, just keep relative name (like \"folder_name\")\n\t\t// and not fullname\n\t\t// (like c:\\website\\marknotes\\docs\\folder_name\n\t\t$arrFolders = array_map('basename', $arrFolders);\n\n\t\treturn $arrFolders;\n\t}", "function module_folders()\n\t{\n\t\treturn Modules::folders();\n\t}", "abstract public function getKnownFolders();", "private function _listFolders()\n {\n $folders = array();\n\n $result = imap_list($this->getBackend(), $this->_getBaseMbox(), '*');\n if (!$result) {\n throw new Horde_Kolab_Storage_Exception(\n sprintf(\n Horde_Kolab_Storage_Translation::t(\n \"Listing folders for %s failed. Error: %s\"\n ),\n $this->_getBaseMbox(),\n imap_last_error()\n )\n );\n }\n\n $root = $this->_getBaseMbox();\n $server_len = strlen($root);\n foreach ($result as $folder) {\n if (substr($folder, 0, $server_len) == $root) {\n $folders[] = substr($folder, $server_len);\n }\n }\n\n return $folders;\n }", "public function folderList ($path = '') {\n\n $param = [\n \"path\" => $path,\n \"recursive\" => false,\n \"include_media_info\" => false,\n \"include_deleted\" => false,\n \"include_mounted_folders\" => true,\n \"include_has_explicit_shared_members\" => false,\n \"include_non_downloadable_files\" => true\n ];\n\n $response = $this->sendRequest('files/list_folder', $param);\n $response = $this->parseResponse($response);\n\n dd($response);\n\n }", "function getFolders()\n { \n return array(\n INTERNALMAIL_FOLDER_ALL => array('name'=>'Все'),\n INTERNALMAIL_FOLDER_FAVORITE => array('name'=>'Избранные'),\n INTERNALMAIL_FOLDER_IGNORE => array('name'=>'Игнорирую'),\n );\n }", "public function getFolders()\n {\n return $this->folders;\n }", "public function listAll()\n {\n return $this->getDirectories()->merge($this->getFiles());\n }", "public function checkFolderList()\n {\n $data = array();\n $apiKey = !empty($this->apiKey) ? $this->apiKey : $this->getDbData('api_key');\n if ($apiKey == '') {\n return false;\n }\n $mailin = $this->createObjMailin($apiKey);\n $dataApi = array( \"page\" => 1,\n \"page_limit\" => 50\n );\n $listResp = $mailin->getFolders($dataApi);\n \n //folder id\n $sortArray = array();\n $returnFolderList = false;\n if (!empty($listResp['data']['folders'])) {\n foreach ($listResp['data']['folders'] as $value) {\n if (strtolower($value['name']) == 'magento') {\n $sortArray['key'] = $value['id'];\n $sortArray['list_name'] = $value['name'];\n if (!empty($value['lists'])) {\n foreach ($value['lists'] as $val) {\n if (strtolower($val['name']) == 'magento') {\n $sortArray['folder_name'] = $val['name'];\n }\n }\n }\n }\n }\n\n if (count($sortArray) > 0) {\n $returnFolderList = $sortArray;\n } else {\n $returnFolderList = false;\n }\n }\n return $returnFolderList;\n }", "public function folder_search() {\n\n if(Server::RequestMethod(\"POST\")) {\n $data = Server::post();\n $data[\"padre\"] = FOLDERS_PATH;\n\n $res = $this->_visualizador->getFoldersList($data);\n\n if(count($res))\n {\n $html = '<ul>';\n\n foreach ($res as $row) {\n $val = '';\n $class = '';\n $pos = substr($val, -1);\n \n if($pos != '\\\\') \n {\n $val = substr_replace($row[\"nodo\"], \"\", -1);\n $class = 'folder inactive';\n }\n else\n {\n $val = $row[\"nodo\"];\n $class = 'file ';\n\n }\n\n $html .= \"<li class='\" . $class . \"' open_folder='no' path='\" . $data[\"padre\"] . $row[\"nodo\"] . \"' parms='\" . json_encode($data) . \"'><label style='padding: 3px 30px;'>\" . $val . \"</label></li>\";\n }\n\n $html .= \"</ul>\";\n \n } else {\n\n $html = '<ul><li class=\"search-empty\">No existen coincidencias con su busqueda...</li></ul>';\n }\n\n echo $html;\n\n } else {\n\n $this->redireccionar(\"error/access/5656\");\n }\n }", "private function list_folder() {\n\t\t\n\t\t$this->files \t= array();\n\t\t$this->subs\t\t= array();\n\t\t\n\t\t$fp = opendir($this->source);\n\t\tif ( !$fp ) return;\n\t\t\n\t\twhile ( ( $entry = readdir($fp) ) !== false ) {\n\t\t\t\n\t\t\t$entry_path = $this->source . $entry;\n\t\t\t\n\t\t\tif ( $this->isFolder( $entry_path ) ) {\n\t\t\t\t\n\t\t\t\tif ( !$this->is_skip_folder($entry) ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( $this->isLink($entry_path) ) {\n\t\t\t\t\t\t$this->subs[] = array( $this->folderFixPath($entry) => $this->folderFixPath(readlink($entry_path)) );\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->subs[] = $this->folderFixPath( $entry );\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif ( !$this->is_skip_file($entry) ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( $this->isLink($entry_path) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$entry = array( $entry => readlink($entry_path) );\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->files[] = $entry;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function getListingFolders()\n {\n $stream = $this->getStram();\n $folders = imap_list($stream, $this->imapPath, '*');\n foreach ($folders as $key => $folder) {\n $folder = str_replace($this->imapPath, '', imap_utf7_decode($folder));\n $folders[$key] = $folder;\n }\n\n return $folders;\n }", "public function getFolders()\n {\n $folder_types = array_filter(['user', 'share'], function ($type) {\n return $this->helper->allowFolderType($type);\n });\n\n return view('laravel-filemanager::tree')\n ->with([\n 'root_folders' => array_map(function ($type) use ($folder_types) {\n $path = $this->lfm->dir($this->helper->getRootFolder($type));\n\n return (object) [\n 'name' => trans('laravel-filemanager::lfm.title-' . $type),\n 'url' => $path->path('working_dir'),\n 'children' => $path->folders(),\n 'has_next' => ! ($type == end($folder_types)),\n ];\n }, $folder_types),\n ]);\n }", "function folderList($folders){\n\t\t// do the folders\n\t\t$foldersret = \"\";\n\t\tfor($i = 0; $i<count($folders);$i++){\n\t\t\t$file \t= $folders[$i][0];\n\t\t\t$path \t= $folders[$i][1];\n\t\t\t$isOpen = $folders[$i][2];\n\t\t\tif(substr($path,0,3) == \".//\"){ $hPath = substr($path,3); }else{ $hPath = $path; };\n\t\t\tif(!in_array($hPath,$this->ignoreFolders)){\n\t\t\t\tif($isOpen){ $class1 = \"open\"; $class2 = \"contents_open\"; }else{ $class1 = \"closed\"; $class2 = \"contents\"; }\n\t\t\t\t\n\t\t\t\t$path = str_replace(\"//\",\"/\",$path);\n\t\t\t\t$path = str_replace(\" \",\"%20\",$path);\n\t\t\t\t\n\t\t\t\t$comment = \"<span class=\\\"folder_comment\\\"> <a href=\\\"$PHP_SELF?dir=$hPath\\\"> ></a>\";\n\t\t\t\tif(file_exists(\"$path/fComments.txt\")){\n\t\t\t\t\t$comment .= \" - \" . file_get_contents(\"$path/fComments.txt\") . \"</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$comment .= \"</span>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$foldersret .= \"\n\t\t\t\t\n\t\t\t\t<!-- START FOLDER -->\n\t<li class=\\\"$class1\\\" id=\\\"\".$this->stripID(\"li_$path/$file\").\"\\\">\n\t\t<!-- FOLDER TITLE -->\n\t\t<a href=\\\"?dir=$path\\\" class=\\\"\".$this->stripID(\"$path/$file\").\" $path\\\" title=\\\"click to open this folder\\\">$file</a> <span>$comment</span>\n\t\t<!-- START CONTENTS -->\n\t\t<ul class=\\\"$class2\\\" id=\\\"\".$this->stripID(\"F_$path/$file\").\"\\\" >\";\n\t\t\tif($isOpen){\n\t\t\t\t$list = new FNFileList;\n\t\t\t\t$rec_folders = $list->getFolderArray($path);\n\t\t\t\t$rec_files = $list->getFilesArray($path);\n\t\t\t\t$foldersret .= $this->folderList($rec_folders);\n\t\t\t\t$foldersret .= $this->fileList($rec_files);\n\t\t\t}else{\n\t\t\t\t$foldersret .= \"<li>Empty</li>\";\t\n\t\t\t}\n\t\t\t\n\t\t$foldersret .= \"</ul>\n\t\t<!-- END CONTENTS -->\n\t</li>\n\t<!-- END FOLDER -->\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $foldersret;\n\t}", "function getDirectoryListing($basedir = \"\");", "abstract protected function getDirectories(): array;", "public function ListFolders($id){\n //dd($id);\n $historial =explode(\"||\", $id);\n //print_r($historial);\n $lastId = explode(\",\",$historial[count($historial) -2])[1];\n $query = \"'$lastId' in parents and trashed = false\";\n //dd( $lastId);\n $optParams = [\n 'fields' => 'files(id, name, modifiedTime, iconLink, webViewLink, webContentLink, mimeType)',\n 'q' => $query\n ];\n\n $results = $this->drive->files->ListFiles($optParams);\n $list = $results->getFiles();\n //asort($list);\n print view('drive.index',compact('list','id','lastId'));\n }", "protected function getDirectoryListing()\n {\n $tp = trim($_GET['select']); // if 'select' is set, update information on a specific subdir on the root path\n\n $dest_path = strlen($tp) > 0 ? '/workspace' . $tp : $this->get('destination');\n $base_dir = $this->sanitizePath($dest_path);\n\n\n if (!is_readable($base_dir) || !is_writable($base_dir)) {\n return $this->handleGeneralError('Cannot access {$file}', array('file' => basename($dest_path)));\n }\n\n $count_level_str = substr(substr($dest_path, strlen($this->get('destination'))), 1);\n $nesting = !isset($tp) ? 0 : strlen($count_level_str) ? sizeof(explode('/', $count_level_str)) : 0;\n $ignore_files = $this->get('ignore_files');\n $ignore = strlen(trim(Symphony::Configuration()->get('ignore', 'filemanager'))) > 0 ? base64_decode(Symphony::Configuration()->get('ignore', 'filemanager')) : NULL;\n\n if (!is_null($ignore)) {\n $ignore = explode(' ', ((strlen($ignore) > 0 && strlen($ignore_files) > 0) ? $ignore . ' ' : $ignore) . $ignore_files);\n $ignore = '/(' . implode('|', preg_replace('/(\\/i?|\\(|\\))/i', '', $ignore)) . ')/i';\n }\n\n\n $excl = $this->sanitizePath(explode(',', FILEMANAGER_EXCLUDE_DIRS));\n\n array_shift($excl);\n\n $exclude = array_merge($excl, $this->sanitizePath(explode(',', $this->get('exclude_dirs'))));\n\n $roots = $this->getRootPaths();\n $roots = sizeof($roots) > 0 ? $roots : NULL;\n\n\n try {\n $dirs = new DirectoryTools($base_dir, $ignore, $exclude, $roots, $nesting);\n $this->_Result = $dirs->getDirectoryTree(true);\n\n } catch (Exception $e) {\n return $this->handleGeneralError('Cannot resolve directory structure for {$root}', array('root' => substr($base_dir, strlen(FILEMANAGER_WORKSPACE) - 9)));\n }\n\n }", "public function Get_User_Folders(){\n\t \n\t $result_key = parent::Initial_Result('folders');\n\t $result = &$this->ModelResult[$result_key];\n try{\n\t\t$folder = array('user'=>array(),'share'=>array());\n\t\t\n\t\t$DB_OBJ = $this->DBLink->prepare(parent::SQL_Permission_Filter(SQL_AdArchive::ADMIN_ARCHIVE_GET_FOLDERS()));\n\t\t$DB_OBJ->bindValue(':owner'\t, $this->USER->UserNO);\n\t\n\t\tif(!$DB_OBJ->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t\n\t\twhile($tmp = $DB_OBJ->fetch(PDO::FETCH_ASSOC)){\n\t\t if($tmp['owner']==$this->USER->UserNO){\n\t\t\t$folder['user'][$tmp['ufno']] = $tmp; \n\t\t }else{\n\t\t\t$folder['share'][$tmp['ufno']] = $tmp; \n\t\t }\n\t\t}\n\t\t\n\t\t//return\n\t\t$result['data'] \t= $folder;\n\t\t$result['action'] \t= true;\n\t\t\n\t } catch (Exception $e) {\n $result['message'][] = $e->getMessage();\n }\n\t return $result;\n\t}", "public function getFolders()\n {\n $userId = Auth::user()->id;\n\n try {\n\n $folders = DB::table('user_directory as ud')\n ->leftJoin('user_parent_directory as usd','ud.id','=','usd.user_directory_id')\n ->select('ud.id', 'ud.name', 'ud.created_at', 'ud.updated_at')\n ->where('ud.user_id', $userId)\n ->whereNull('usd.user_directory_id')\n ->whereNull('ud.deleted_at')->get();\n\n $documents = $this->getDocuments($userId, 0);\n $signatures = $this->getUserSignatures('true');\n\n $response = array($this->common->success => true);\n $response['data']['folders'] = $folders;\n $response['data']['documents'] = $documents;\n $response['data']['signatures'] = $signatures;\n\n } catch (\\Exception $e) {\n $response = $this->common->getErrorMessage($e->getMessage());\n }\n\n return Response::json($response);\n }", "public function getFolders() {\n\t\treturn $this->folders;\n\t}", "public function listDirectory($path)\n {\n \t// Get all the directories\n $list = new ArrayObject();\n\t\ttry {\n\t if (!$this->getConnection()) {\n\t return array();\n\t }\n\t\n\t if (strpos($path, 'workspace://') === 0) {\n\t $id = str_replace('workspace://SpacesStore/', '', $path);\n\t $parent = $this->getNode($id);\n\t } else {\n\t $parent = $this->getNodeByPath($this->normalizePath($path));\n\t }\n\t\n\t if (!$parent) {\n\t return $list;\n\t // throw new Exception(\"Failed getting children for path $path\");\n\t }\n\t\n\t // list everything using the node->getChildren()\n\t $children = $parent->getChildren();\n\t foreach ($children as $childAssoc) {\n\t $child = $childAssoc->getChild();\n\t /* @var $child Node */\n\t if (strpos($child->getType(), 'folder')) {\n\t $list->append($child->cm_name);\n\t } else {\n\t // content\n\t $fileObject = $this->nodeToFile($child);\n\t if (za()->getUser()->getRole() == User::ROLE_EXTERNAL && $fileObject->isprivate) {\n\t continue;\n\t }\n\t $list->append($fileObject);\n\t }\n\t }\n\t\t} catch (Exception $e) {\n\t\t\t$this->log->err(\"Failed to load files from $path: \".$e->getMessage());\n\t\t}\n\n return $list;\n }", "public function listAction()\n {\n if ($this->folder !== null) {\n $files = $this->folder->getFiles(\n 0,\n 0,\n Folder::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS,\n false,\n $this->settings['order_by'] ?? 'name',\n $this->settings['order_direction'] === 'desc'\n );\n\n $files = $this->filterFilesByFileMetadataGroupAccess($files);\n\n $this->view->assign('files', $files);\n }\n\n $this->view->assign('folder', $this->folder);\n }", "public function mollieGetOrderFolders()\n {\n return Registry::getConfig()->getConfigParam('aOrderfolder');\n }", "protected function _getFolders()\n\t{\n\t\tif (is_null($this->folders))\n\t\t{\n\t\t\t$path = & $this->_getPath();\n\t\t\tjimport('joomla.filesystem.folder');\n\t\t\t$this->folders = &JFolder::folders($path, '.', false, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'pdf_fonts','overrides'));\n\t\t}\n\t\treturn $this->folders;\n\t}", "abstract protected function getFolder();", "function getFolderList($path = '')\n\t{\n\t\t$ret = array();\n\t\txoops_load(\"XoopsList\");\n\t\tforeach(XoopsList::getDirListAsArray($path) as $folder)\n\t\t\tforeach(getFolderList($path . DIRECTORY_SEPARATOR . $folder) as $key => $values)\n\t\t\t\t$ret[$key] = $values;\n\t\t$ret[sha1(_RESOURCES_SALT_BLOWFISH.$path)] = array('is' => 'folder', 'path' => $path, 'files' => count($files = XoopsList::getFileListAsArray($path)));\n\t\tforeach($files as $file)\n\t\t\t$ret[sha1(_RESOURCES_SALT_BLOWFISH.($md5 = md5_file($path . DIRECTORY_SEPARATOR . $file)))] = array('is' => 'file', 'file' => $file, 'path' => $path, 'bytes' => filesize($path . DIRECTORY_SEPARATOR . $file));\n\t\treturn $ret;\n\t}", "public function folders() {\n return new Folder($this->client);\n }", "public function getFolders()\n {\n $user_path = !$this->getUserSlug() ? null : parent::getPath('user');\n $lfm_user_path = !$this->getUserSlug() ? null : parent::getFileName($user_path);\n $user_folders = !$this->getUserSlug() ? [] : parent::getDirectories($user_path);\n\n $share_path = parent::getPath('share');\n $lfm_share_path = parent::getFileName($share_path);\n $shared_folders = parent::getDirectories($share_path);\n\n return view('laravel-filemanager::tree')\n ->with('user_dir', $lfm_user_path['long'])\n ->with('dirs', $user_folders)\n ->with('share_dir', $lfm_share_path['long'])\n ->with('shares', $shared_folders);\n }", "function directoryListing($id = 0) {\n $logon_result = $this->log_on();\n if($id == 0 && $id != $this->tree_starting_id) $id = $this->tree_starting_id;\n $childList = array();\n if ($logon_result['success']) {\n if (strlen($this->civicweb_url) > 0) {\n //Get results\n try { \n $client = new SoapClient($this->civicweb_url . 'Global/WebServices/Document.asmx?wsdl', array('exceptions' => 1,));\n $client->__setCookie('CurrentSession', $logon_result['session_id']);\n \n $parameters = new stdClass();\n $parameters->id = $id;\n $parameters->Path = NULL;\n $parameters->includeDocuments = \"true\";\n $parameters->documentProvider = \"iCompass.CivicWeb.Items.DocumentProvider\";\n $parameters->controlID = NULL; \n $retval = $client->GetChildList($parameters);\n $childList = $retval->GetChildListResult;\n }\n catch (SoapFault $E) { \n if($this->debug == 1) {\n print(\"<pre>\"); \n print_r($E);\n print(\"</pre>\");\n }\n $childList = array();\n } \n return $childList;\n }\n } \n }", "public function actionDataFolders()\n {\n return $this->getOrSetHasCache('storageApiDataFolders', function() {\n $folders = [];\n foreach (Yii::$app->storage->findFolders() as $key => $folder) {\n $folders[$key] = $folder->toArray();\n $folders[$key]['toggle_open'] = (int) Yii::$app->adminuser->identity->setting->get('foldertree.'.$folder->id);\n $folders[$key]['subfolder'] = Yii::$app->storage->getFolder($folder->id)->hasChild();\n }\n return $folders;\n }, 0, new DbDependency(['sql' => 'SELECT MAX(id) FROM admin_storage_folder WHERE is_deleted=false']));\n }", "public function give_folderlist($local_only = false)\n {\n $_PM_ = $this->_PM_;\n \t$myUsername = 'unknown user';\n \tif (!empty($_SESSION['phM_username'])) {\n \t $myUsername = basename($_SESSION['phM_username']);\n \t} elseif (!empty($this->uid)) {\n \t $DB = new DB_Base();\n \t $userInfo = $DB->get_usrdata($this->uid, true);\n \t $myUsername = $userInfo['username'];\n \t}\n $icon_path = $this->_PM_['path']['theme'].'/icons/';\n $WP_msg = &$GLOBALS['WP_msg'];\n if (file_exists($_PM_['path']['handler'].'/rss/lang.'.$WP_msg['language'].'.php')) {\n require_once($_PM_['path']['handler'].'/rss/lang.'.$WP_msg['language'].'.php');\n } else {\n require_once($_PM_['path']['handler'].'/rss/lang.de.php');\n }\n\n $folders = array();\n foreach ($this->get_hybridlist(true) as $k => $v) {\n if ($v['owner'] == 0) {\n if (!$_SESSION['phM_privs']['all'] && !$_SESSION['phM_privs']['rss_see_global_feeds']) continue;\n $hasSharedFolders = true;\n } else {\n $hasPersonalFolders = true;\n }\n $folders[$k] = $v;\n }\n if (empty($folders)) return array();\n\n \t$return = array();\n \tforeach ($folders as $k => $v) {\n \t $basefolder = 'folder_def';\n if ($v['childof'] == 0) {\n $v['childof'] = 'root';\n }\n if (!empty($v['type']) && $v['type'] == 2) {\n $basefolder = 'rss';\n } elseif ($v['owner'] == 0) {\n $basefolder = 'contactsfolder_global';\n if ($v['childof'] == 0) $v['childof'] = 'shareroot';\n }\n $return[$k] = array(\n 'path' => $v['path'],\n 'foldername' => $v['name'],\n 'type' => !empty($v['type']) ? $v['type'] : 0,\n 'icon' => $_PM_['path']['theme'].'/icons/'.$basefolder.'.png',\n 'big_icon' => $_PM_['path']['theme'].'/icons/'.$basefolder.'_big.gif',\n 'subdirs' => !empty($v['subdirs']) ? 1 : 0,\n 'childof' => $v['childof'],\n 'has_folders' => !empty($v['has_folders']) ? 1 : 0,\n 'has_items' => !empty($v['has_items']) ? 1 : 0,\n 'level' => $v['level']+1\n );\n \t}\n \treturn $return;\n }", "public function files_list();", "public function getProcessingFolders() {}", "public function getDirectory();", "public function getDirectory();", "public function getFolders($rootFolder = null);", "public function listData()\n\t{\n\t\t/*try{\n\t\t\t\n\t\t\t// Parent folder ID to get data under the folder.\n\t\t\t$folder_id = 'FOLDER_ID';\n\n\t\t\t// Get the directory contents.\n\t\t\t$recursive = false; // If you want sub directories make it 'true'.\n\t\t\t$directory_contents = collect(Storage::disk('google')->listContents($folder_id, $recursive));\n\n\t\t}catch(\\Exception $e){\n\t\t\t\n\t\t\t\\Log::debug($e);\n\t\t}*/\n\n\t\treturn view('google.listdata');\n\t}", "public function getDirectories()\n {\n return $this->directories;\n }", "public function getDirectories()\n {\n return $this->directories;\n }", "public function list_albums() {\n\t\tif(!$this->prepare_token()) {\n\t\t\treturn false;\t\n\t\t}\n\n\t\tif(!$this->set_wrap_folder_id()) {\n\t\t\treturn __('Main folder missing', 'ag_ml');\t\n\t\t}\n\t\t\n\t\t$endpoint = 'https://graph.microsoft.com/v1.0/me/drive/items/'. $this->main_folder_id .'/children'; // ?select=name,id';\n\t\t$response = $this->curl_call($endpoint, false, true);\n\t\t\n\t\tif(!is_array($response) || !isset($response['value'])) {return __('Error querying albums', 'ag_ml');}\n\t\tif(!count($response['value'])) {return __('No albums found', 'ag_ml');}\n\t\t\n\t\t$folders = array();\n\t\tforeach($response['value'] as $folder) {\n\t\t\t$folders[ $folder['id'] ] = $folder['name'];\n\t\t}\n\t\t\n\t\treturn $folders;\n\t}", "public function getTopLevelFolders() {\n $this->checkAuth();\n\n $response = $this->client->request(\n \"GET\",\n $this->baseUrl . '/folders/0',\n ['headers' => $this->getDefaultHeaders()]\n );\n\n $folder_data = json_decode($response->getBody());\n\n $folders = [];\n foreach ($folder_data as $folder) {\n $folders[] = Folder::fromJson($folder);\n }\n\n return $folders;\n }", "function listaDir(){\n\t\t$base='public/images/';\n\t\t//$displaImg=\"images/\";\n\t\t\t$path = $_SERVER['DOCUMENT_ROOT'].$base;\n\t\t\t$dirs = array();\n\t\t\t// directory handle\n\t\t\t$dir = dir($path);\n\t\t\twhile (false !== ($entry = $dir->read())) {\n\t\t\t\tif ($entry != '.' && $entry != '..') {\n\t\t\t\t\tif (is_dir($path . '/' .$entry)) {\n\t\t\t\t\t\t//printVar($entry);\n\t\t\t\t\t\tif($entry!='cursos'){\n\t\t\t\t\t\t\t//printVar($entry);\n\t\t\t\t\t\t\t$dirs[] = $entry;\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\treturn $dirs;\n\n\n\n\n\t}", "public function getFolders()\n {\n if (empty($this->_folders)) {\n ob_start();\n $this->_logger->debug('Horde::getFolders()');\n try {\n $supported = $this->_connector->horde_listApis();\n } catch (Exception $e) {\n $this->_logger->err($e->getMessage());\n $this->_endBuffer();\n return array();\n }\n $folders = array();\n if (array_search('calendar', $supported)) {\n $folders[] = $this->getFolder(self::APPOINTMENTS_FOLDER_UID);\n }\n\n if (array_search('contacts', $supported)) {\n $folders[] = $this->getFolder(self::CONTACTS_FOLDER_UID);\n }\n\n if (array_search('tasks', $supported)) {\n $folders[] = $this->getFolder(self::TASKS_FOLDER_UID);\n }\n\n if (array_search('mail', $supported)) {\n $folders = array_merge($folders, $this->_getMailFolders());\n }\n\n $this->_endBuffer();\n\n $this->_folders = $folders;\n }\n\n return $this->_folders;\n }", "public function getFolders() {\n\t\treturn $this->_executeGetRequest('user/folders');\n\t}", "function index() {\n $this->set('files', $this->_dirList($this->directory));\n }", "public function get_all_dirs(Request $request)\n {\n $folderLocation = $request->folder_location;\n\n if (is_array($folderLocation)) {\n $folderLocation = rtrim(implode('/', $folderLocation), '/');\n }\n\n $location = \"{$this->directory}/{$folderLocation}\";\n\n return response()->json(\n str_replace($location, '', Storage::disk($this->filesystem)->directories($location))\n );\n }", "public function actionIndex()\n\t{ \n $inDir = isset($_GET['directory']);\n \n $dir = ($inDir)?urldecode($_GET['directory']):'';\n $folder = new Folder();\n $list = $folder->dirList($dir);\n //die(print_r($list));\n $this->render('index',array('folder' => $list['struct'], 'destination' =>$list['destination'], \n 'inDir' => $inDir));\n\t}", "function PicFolderList()\n{\n return array(\"orig\", \"w1920\", \"w1024\", \"w640\", \"w320\", \"w80\");\n}", "private function getFolderList(){\n\n\t\t// Check if file was uploaded\n\t\tif (isset($_POST[\"folderList\"])) {\n\n\t\t\t$response = array('responseType' => '','response' => array('message' => '','content' => false, ), );\n\n\t\t\ttry {\n\n\t\t\t\t// Upload the file to Dropbox\n\t\t\t\t$folderData = $this->dropbox->getFolderList();\n\n\t\t\t\t// if still good, build our response.\n\t\t\t\t$response['responseType'] = 'success';\n\t\t\t\t$response['response']['message'] = 'Received request to list folders.';\n\t\t\t\t$response['response']['content'] = array('dropboxResponse' => $folderData, );\n\n\t\t\t} catch (\\Exception $e) {\n\n\t\t\t\t$data = $e->getMessage();\n\n\t\t\t\t// if not still good, then build that response\n\t\t\t\t$response['responseType'] = 'error';\n\t\t\t\t$response['response']['message'] = 'There was a problem retrieving the list.';\n\t\t\t\t$response['response']['content'] = array('errorText' => $data, );\n\t\t\t\n\t\t\t} // end try\n\t\t} else {\n\t\t\t// if no file was sent\n\t\t\t$data = array( 'error_summary' => \"Unable to complete request.\", 'error' => array( '.tag' => \"path\", 'path' => array( '.tag' => \"not_found\", ), ), );\n\n\t\t\t$response['responseType'] = 'error';\n\t\t\t$response['response']['message'] = 'We received your request, but header was no data.';\n\t\t\t$response['response']['content'] = array('errorText' => $data, );\n\t\t\n\t\t} // end if isset\n\n\t\treturn $response;\n\t}", "function folders($type='campaign') {\n $params = array();\n $params[\"type\"] = $type;\n return $this->callServer(\"folders\", $params);\n }", "private function _api_list()\n\t{\n\t\t$output = array(\n\t\t\t\"base\" \t\t=> $this->data_lib->get_dir('external'), \n\t\t\t\"content\" \t=> $this->data_lib->get_dir_content(false, $info, true),\n\t\t\t\"uploadleft\" => array(\n\t\t\t\t\"files\" => $this->data_lib->files_left(),\n\t\t\t\t\"folders\" => $this->data_lib->folders_left()\n\t\t\t\t)\n\t\t);\n\t\t$this->output->set_output(json_encode($output));\n\t}", "public function test_lister_on_folders_call()\n {\n $listing = Directory_Lister::listing(array(\n 'directory' => $this->directory,\n 'method' => 'folders',\n ));\n\n $this->assertEquals(3, $listing['count']);\n $this->assertEquals(3, $listing['max']);\n }", "public function getFolders()\n {\n return $this->domain->config('paths.generator');\n }", "public function directoryList($reversed = FALSE);", "private function getImagineerList()\n\t{\n\t\t// We do not load them here, just get a list by iterating\n\t\t// thru the wed directory and checking each folder that\n\t\t// has a file inside that is named the same as the folder\n\t\t// Example: folder-communication, file-communications.php\n\t\t$iterator = new DirectoryIterator($this->options['WED_PATH']);\n\t\t$list = array();\n\n\t\tforeach ($iterator as $fileinfo)\n\t\t{\n\t\t if ( ($fileinfo->isDir()) && (!$fileinfo->isDot()) )\n\t\t {\n\t\t $list[] = $fileinfo->getFilename();\n\t\t }\n\t\t}\n\n\t\treturn $list;\n\t}", "public function getChildren() {\n\t\t\\GO::debug('Shared::getChildren()');\n\n\t\t$shares =\\GO\\Files\\Model\\Folder::model()->getTopLevelShares(\\GO\\Base\\Db\\FindParams::newInstance()->limit(100));\n\n\t\t$nodes = array();\n\t\tforeach($shares as $folder){\n\t\t\t$nodes[]=new \\GO\\DAV\\FS\\Directory($folder->path);\n\t\t}\n\n\t\treturn $nodes;\n\t}", "public function index()\n {\n $folders = FoldersHierarchy::getUserFoldersWithLinks($this->user);\n\n $transformedFolders = $this->transformer\n ->setUser($this->user)\n ->transformCollection($folders);\n\n return $this->respond($transformedFolders);\n }", "public function listFolderTypes()\n {\n return $this->_driver->listAnnotation(\n self::ANNOTATION_FOLDER_TYPE\n );\n }", "function getFolders() {\n if ($this->congExists == true) {\n $jsonUrl = $this->getJsonUrl(\"title\", $this->mainFolderId);\n\n $json = file_get_contents($jsonUrl);\n $data = json_decode($json, true);\n $data = $data['items'];\n\n // controllare eventuali errori. Mi � capitato l'errore 500 dal server google.\n\n foreach ($data as $item) {\n include (\"templates/sezione_tpl.php\");\n };\n }\n }", "public function getFolders()\n {\n return array_values(config('modules.paths.generator'));\n }", "public function getFileList($settings)\n {\n $data =[\n 'path' => $settings->dropbox_path\n ];\n $post = json_encode($data);\n\n $url = 'https://api.dropboxapi.com/2/files/list_folder';\n $curl = curl_init($url); //initialise\n curl_setopt($curl,CURLOPT_HTTPHEADER,array('Authorization: Bearer ' . $settings->dropbox_token,'Content-Type: application/json'));\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $post);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n\n $items = \\GuzzleHttp\\json_decode($response)->entries;\n\n $items = (object) $items;\n\n return $items;\n }", "public function getFileList()\r\n\t\t{\r\n\t\t\tif(isset($_SESSION['primrix']['user'])){ //security check\r\n\t\t\t\tif(UserModel::getLoginSession()){ //session time check\r\n\t\t\t\t\t$folder = 'site/files' . $_SESSION['assetManager']['folder']; //'site/files/images/'\r\n\t\t\t\t\t$fileInfoArray = File::getFileList($folder . '/');\r\n\t\t\t\t\techo $fileInfoArray['totalFiles'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "static function getFolders($path) {\n return self::getItems($path, '*/', 'getFolderURL');\n }", "function get_files_and_folders(){\n $service = new Google_Service_Drive($GLOBALS['client']);\n\n $parameters['q'] = \"mimeType='application/vnd.google-apps.folder' and 'root' in parents and trashed=false\";\n $files = $service->files->listFiles($parameters);\n \n echo \"<ul>\";\n foreach( $files as $k => $file ){\n echo \"<li> \n \n {$file['name']} - {$file['id']} ---- \".$file['mimeType'];\n\n try {\n // subfiles\n $sub_files = $service->files->listFiles(array('q' => \"'{$file['id']}' in parents\"));\n echo \"<ul>\";\n foreach( $sub_files as $kk => $sub_file ) {\n echo \"<li&gt {$sub_file['name']} - {$sub_file['id']} ---- \". $sub_file['mimeType'] .\" </li>\";\n }\n echo \"</ul>\";\n } catch (\\Throwable $th) {\n // dd($th);\n }\n \n echo \"</li>\";\n }\n echo \"</ul>\";\n}", "function listAll($saveData){\n //First do the input sanitizing\n if(!array_key_exists('folder',$saveData)){\n exit(\"No folder data was set\");\n }\n\n //Now we can extract the folder data\n $folder = $saveData['folder'];\n\n //Check if it is not an illegal option\n if($folder != \"all\" && $folder != \"open\" && $folder != \"closed\"){\n exit(\"Unsafe folder setting. Aborting listing. Are you hacking me?\");\n }\n\n //Now, depending on the folder setting, list all files in it\n $openFiles = array();\n $closedFiles = array();\n if($folder == \"open\" || $folder == \"all\") $openFiles = scandir(\"data/open/\");\n foreach($openFiles as $key => $file){\n $openFiles[$key] = \"data/open/$file\";\n }\n if($folder == \"closed\" || $folder == \"all\") $closedFiles = scandir(\"data/closed/\");\n foreach($closedFiles as $key => $file){\n $closedFiles[$key] = \"data/closed/$file\";\n }\n \n\n //Now merge the lists\n $allFiles = array_merge($openFiles, $closedFiles);\n\n //Only list .rental files\n $files = array();\n foreach($allFiles as $file){\n if(strpos($file, 'rental') !== false){\n $files[] = $file;\n }\n }\n\n //For each file, create an object and add it to the result list\n $rentals = array();\n foreach($files as $file){\n $rentals[] = readRental($file);\n }\n\n //Send back the rentals, encoded as JSON\n echo json_encode($rentals);\n}", "public function getDirectories() {\n\t\treturn $this->_directories;\n\t}", "public function getFolders()\n {\n if (empty($this->_folders)) {\n try {\n $supported = $this->_connector->listApis();\n } catch (Exception $e) {\n return array();\n }\n $folders = array();\n if (array_search('calendar', $supported) !== false) {\n $folders[] = $this->getFolder(self::APPOINTMENTS_FOLDER_UID);\n }\n\n if (array_search('contacts', $supported) !== false) {\n $folders[] = $this->getFolder(self::CONTACTS_FOLDER_UID);\n }\n\n if (array_search('tasks', $supported) !== false) {\n $folders[] = $this->getFolder(self::TASKS_FOLDER_UID);\n }\n\n if (array_search('notes', $supported) !== false) {\n $folders[] = $this->getFolder(self::NOTES_FOLDER_UID);\n }\n\n if (array_search('mail', $supported) !== false) {\n try {\n $folders = array_merge($folders, $this->_getMailFolders());\n } catch (Horde_ActiveSync_Exception $e) {\n return array();\n }\n }\n $this->_folders = $folders;\n }\n\n return $this->_folders;\n }", "function ListLists() {\n if ($handle = opendir('lists')) {\n if (!$handle) {\n echo '{\"request\":\"NAK\",\"msg\",\"Could not open list folder\"}';\n }\n /* This is the correct way to loop over the directory. */\n echo '{\"request\":\"ACK\",\"lists\":[';\n $index = 0;\n while (false !== ($file = readdir($handle))) {\n if (!is_dir($file) && (substr($file, strlen($file) - 4) == \".lst\")) {\n if ($index >= 1) {\n echo \",\";\n }\n echo '\"' . $file . '\"';\n $index++;\n }\n }\n echo ']}';\n }\n}", "public function getKnownFolders()\n {\n if (!isset($this->_folder)) {\n throw new Horde_ActiveSync_Exception('Sync state not loaded');\n }\n $folders = array();\n foreach ($this->_folder as $folder) {\n $folders[] = $folder['id'];\n }\n\n return $folders;\n }", "function nlist($folder) \r\n\t{\r\n\t\treturn ftp_nlist( $this->conn, $folder );\r\n }", "function listDirs() {\n\tglobal $base;\n\t$result = array();\n\t\n\t// if the Directory opens ...\n\tif(($dir = @opendir(IMAGE_DIR . $base))) {\n\t\t\n\t\t// ... while Files remain ...\n\t\twhile(FALSE !== ($file = readdir($dir))) {\n\t\t\t\n\t\t\t// ... if NOT hierarchy entries ...\n\t\t\tif($file != \".\" && $file != \"..\") {\n\t\t\t\t\n\t\t\t\t// ... if File is a Directory ...\n\t\t\t\tif(is_dir(IMAGE_DIR . basePath($file)))\n\t\t\t\t\n\t\t\t\t// ... return the Directory\n\t\t\t\t$result[] = $file;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// close the Directory\n\t\tclosedir($dir);\n\t}\n\t\n\t// return the Directories\n\treturn $result;\n}", "public function getFolderTreeAttribute()\n {\n // Get sorting setup\n\n return FileManagerFolder::with(['folders.shared', 'shared:token,id,item_id,permission,protected,expire_in'])\n ->where('parent_id', 0)\n ->where('user_id', $this->id)\n ->sortable()\n ->get();\n }", "public function get_folders($folder) {\n\t\t\t$data = $this->get_folder_items($folder);\n\t\t\tforeach($data['entries'] as $item){\n\t\t\t\t$array = '';\n\t\t\t\tif($item['type'] == 'folder'){\n\t\t\t\t\t$array = $item;\n\t\t\t\t}\n\t\t\t\t$return[] = $array;\n\t\t\t}\n\t\t\treturn array_filter($return);\n\t\t}", "public function getFolders() {\n\t\t$folders = false;\n\t\tif ($this->_imap) {\n\t\t\t$imapfolders = imap_list($this->_imap, $this->_imapurl, '*');\n\t\t\tif ($imapfolders) {\n\t\t\t\tforeach ($imapfolders as $imapfolder) {\n\t\t\t\t\t$folders[] = substr($imapfolder, strlen($this->_imapurl));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $folders;\n\t}", "function _fetch_upload_dirs_settings() {\n\t\t$this->EE->db->select('id, url');\n\t\t$query = $this->EE->db->from('upload_prefs')->get()->result_array();\n\t\t$dirs = array();\n\t\tforeach ($query as $dir) {\n\t\t\t$dirs[$dir['id']] = $dir['url'];\n\t\t}\n\t\treturn $dirs;\n\t}", "public function getSongsFolder()\n\t{\n\t\treturn $this->_datapath->create(\"songs\");\n\t}", "function fm_event_api_after_folder_read($event)\n{\n $data = $event->getFolderData();\n $list = $event->getFolderContent();\n}", "public function getDirectories() : array\n {\n return $this->directories;\n }", "protected function get_cms_folders()\n\t{\n\t\t$json = <<<EOF\n{\n \"name\": \"cms_folders\",\n \"columns\": {\n \"folder_path\": {\n \"allow_null\": true,\n \"auto_increment\": false,\n \"binary\": false,\n \"comment\": \"\",\n \"decimals\": null,\n \"default\": null,\n \"length\": 0,\n \"name\": \"folder_path\",\n \"type\": \"TEXT\",\n \"unsigned\": false,\n \"values\": [\n\n ],\n \"zerofill\": false\n },\n \"folder_last_modified\": {\n \"allow_null\": false,\n \"auto_increment\": false,\n \"binary\": false,\n \"comment\": \"\",\n \"decimals\": null,\n \"default\": \"0\",\n \"length\": 11,\n \"name\": \"folder_last_modified\",\n \"type\": \"INT\",\n \"unsigned\": false,\n \"values\": [\n\n ],\n \"zerofill\": false\n },\n \"folder_id\": {\n \"allow_null\": false,\n \"auto_increment\": true,\n \"binary\": false,\n \"comment\": \"\",\n \"decimals\": null,\n \"default\": null,\n \"length\": 10,\n \"name\": \"folder_id\",\n \"type\": \"INT\",\n \"unsigned\": true,\n \"values\": [\n\n ],\n \"zerofill\": false\n },\n \"folder_parent_id\": {\n \"allow_null\": false,\n \"auto_increment\": false,\n \"binary\": false,\n \"comment\": \"\",\n \"decimals\": null,\n \"default\": \"0\",\n \"length\": 10,\n \"name\": \"folder_parent_id\",\n \"type\": \"INT\",\n \"unsigned\": true,\n \"values\": [\n\n ],\n \"zerofill\": false\n },\n \"folder_name\": {\n \"allow_null\": true,\n \"auto_increment\": false,\n \"binary\": false,\n \"comment\": \"\",\n \"decimals\": null,\n \"default\": null,\n \"length\": 250,\n \"name\": \"folder_name\",\n \"type\": \"VARCHAR\",\n \"unsigned\": false,\n \"values\": [\n\n ],\n \"zerofill\": false\n }\n },\n \"indexes\": {\n \"PRIMARY\": {\n \"type\": \"primary\",\n \"name\": \"PRIMARY\",\n \"length\": [\n null\n ],\n \"columns\": [\n \"folder_id\"\n ]\n }\n },\n \"comment\": \"\"\n}\nEOF;\n\n\t\treturn json_decode( trim( $json ), TRUE );\n\t}", "public function filelistAction()\n {\n $project = $this->byId($this->_getParam('projectid'), 'Project');\n $client = $this->byId($project->clientid, 'Client');\n \n $folder = $this->_getParam('folder', '');\n \n $path = 'Clients/'.$client->title.'/Projects/'.$project->title;\n \t$projectPath = $path;\n $parent = '';\n if ($folder != null && mb_strlen($folder)) {\n $path = base64_decode($folder);\n $parent = dirname($path);\n if ($path == $projectPath) { \n $parent = '';\n }\n }\n\n $content = $this->cacheService->get($path);\n\n if (!$content) {\n\t $files = array();\n\t try {\n\t \t$files = $this->fileService->listDirectory($path);\n\t } catch (Exception $e) {\n\t \t$this->log->err(\"Failed loading files from $path\");\n\t }\n\t\n\t $this->view->files = $files;\n\t $this->view->project = $project;\n\t \n\t if ($path == '/') {\n\t $this->view->base = '';\n\t } else {\n\t $this->view->base = trim($path, '/').'/';\n\t }\n\t $this->view->parentPath = $parent;\n\t $content = $this->view->render('project/file-list.php');\n\n\t $this->cacheService->store($path, $content);\n }\n\n $this->getResponse()->appendBody($content); \n }", "public function getFolderListLeavesOutNavigationalEntries() {}" ]
[ "0.8484952", "0.80418897", "0.7961529", "0.7961529", "0.7913016", "0.7912574", "0.7639715", "0.74905777", "0.74160355", "0.74160355", "0.74000865", "0.73791766", "0.7378712", "0.73241615", "0.73236805", "0.7318604", "0.7307601", "0.72877115", "0.7251974", "0.7222656", "0.72137237", "0.7213282", "0.7196945", "0.7185134", "0.712112", "0.7102492", "0.70938754", "0.70483035", "0.70125777", "0.7009778", "0.7006836", "0.6991692", "0.696843", "0.69186425", "0.691507", "0.69004315", "0.6898068", "0.6878903", "0.6874719", "0.686782", "0.6866658", "0.6862469", "0.6861467", "0.6848277", "0.6816869", "0.679904", "0.6793881", "0.67626935", "0.67430544", "0.67338914", "0.67265195", "0.67201406", "0.6718152", "0.6718152", "0.67160565", "0.671447", "0.6709937", "0.6709937", "0.67001635", "0.6697953", "0.66905075", "0.66805935", "0.6674805", "0.664862", "0.6640432", "0.6637532", "0.66336775", "0.66257256", "0.66200095", "0.6613346", "0.66084313", "0.6607994", "0.65924454", "0.6588701", "0.6573061", "0.6571015", "0.65519094", "0.65475273", "0.6546667", "0.6545195", "0.6540377", "0.6536101", "0.65130776", "0.65116596", "0.65096545", "0.6507666", "0.6502587", "0.65025455", "0.64958566", "0.6481048", "0.64809287", "0.64760244", "0.6472104", "0.6464935", "0.64618033", "0.6449679", "0.6448333", "0.6440143", "0.6439115", "0.6434191" ]
0.82878464
1
Fetch the document report state
Получить состояние отчета документа
public function fetchDocumentReportState($document_id) { $client = new Client($this->getUrl()); $args = array( 'sid' => new Value($this->getSid()), 'id' => new Value($document_id), ); $response = $client->send(new Request('document.get', array(new Value($args, "struct")))); $response = json_decode(json_encode($response), true); if (isset($response['val']['me']['struct']['documents']['me']['array'][0]['me']['struct']['is_pending']['me']['int'])) { $state = $response['val']['me']['struct']['documents']['me']['array'][0]['me']['struct']['is_pending']['me']['int']; if ($state !== null) { $is_pending['is_pending'] = $state; return $is_pending; } else { return false; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_documentState() :int\n\t{\n\t\treturn( $this->documentState );\n\t}", "public function getReport() {}", "public function getReport() {}", "function getReport() ;", "public function getDocumentsStatuses();", "private function query_report_data()\n {\n }", "protected function getReport()\n {\n return $this->report;\n }", "public function getStoreState();", "public function getReport()\n {\n return $this->report;\n }", "public function getReport() {\n return $this->report;\n }", "public function getReport() {\n return $this->_reportData;\n }", "public function getCurrentStates()\n {\n return new PingdomApiReportGetCurrentStatesResponse($this->callSoapClient('Report_getCurrentStates'));\n }", "public function get() {\n return $this->report;\n }", "public function getReportStatus(){\r\n $this->initDb();\r\n if($this->id != \"\"){\r\n $this->report_status = getValue(\"SELECT report_status_id FROM tbl_subjects WHERE subject_id = \" . $this->id);\r\n }\r\n return $this->report_status;\r\n }", "private function get_sales_report_data()\n {\n }", "public function getExternalDocumentsStatistic() {}", "public function getReviewstate() {}", "public function fetchReports()\n\t{\n\t\t//create the request object\n\t\t$objApiRequest = $this->getApiRequestModel();\n\n\t\t//setup the object and specify the action\n\t\t$objApiRequest->setApiAction(\"reports/basic/view\");\n\n\t\t//execute\n\t\t$objReports = $objApiRequest->performGETRequest(array())->getBody();\n\t\treturn $objReports->data;\n\t}", "protected function getInitialReport()\n\t{\n\t\treturn $this->getReportAndRelatedData($this->getDriver(), $this->reportId);\n\t}", "protected function getReferenceIndexStatus() {}", "public function getConversionReportingState()\n {\n return $this->conversion_reporting_state;\n }", "public function getDocumentInformation()\n {\n return $this->documentInformation;\n }", "private function get_analytics_report_data()\n {\n }", "public function status() {\n return [\n '#type' => 'requirements_report_page',\n '#requirement' => $this->requirementManager->listRequirement(),\n ];\n }", "function allure1Report()\n {\n $result1 = $this->allure1Generate();\n\n if ($result1->wasSuccessful()) {\n return $this->allure1Open();\n } else {\n return $result1;\n }\n }", "static function getReported(){\n $report = false;\n $query = static::getInstance()->db->prepare(\"SELECT id, chapter_id, pseudo, content, DATE_FORMAT(creation_date, '%d/%m/%Y à %Hh%imin') AS creation_date, report FROM p4_comment WHERE report = 1\");\n $query->execute();\n $queryReport = $query->fetch(PDO::FETCH_ASSOC);\n if($queryReport){\n $report = true;\n }\n return $query;\n }", "function allure2Report()\n {\n $result1 = $this->allure2Generate();\n\n if ($result1->wasSuccessful()) {\n return $this->allure2Open();\n } else {\n return $result1;\n }\n }", "public function getDocument()\n {\n return $this->result;\n }", "public function getDocumentInfo()\n {\n return $this->get(self::DOCUMENTINFO);\n }", "public function documentDetails()\n {\n $this->documentIdentification();\n $this->documentTerminal();\n $this->documentOurReference();\n $this->documentYourReference();\n $this->documentDate();\n $this->documentTableIdentification();\n $this->documentShippingCode();\n }", "public function report()\n {\n return new StudentsByDocumentReport();\n }", "function getServerReport(){\n return $this->serverReport;\n }", "public function fetchReport() {\n $report_db = Loader::db($this->host, $this->username, $this->password, $this->databasename, true);\n\n try {\n $results = &$report_db->Execute(\"\n select\n id\n , operations\n , hours\n , snowfall24\n , snowfall24_note\n , snowfallnew\n , snowfallnew_note\n , temperature\n , temperature_note\n , winds\n , weather\n , baseheather\n , basepan\n , conditions\n , summary\n , other\n , reporttime\n , submittime\n , type\n , web\n , email\n , fax\n , status\n , morning\n , published\n from incw_snowconditions\n where\n published = 1 and\n type = 'web'\n order by id DESC\n limit 1\n \");\n }\n catch (ADODB_Exception $e) {\n // ADOdb threw an exception\n throw new SnowReportException($e->getMessage(), $e->getCode(), $e);\n }\n\n if ($results === false) {\n // No result means the query was bad\n throw new SnowReportException($report_db->ErrorMsg());\n }\n\n if ($results->fields === false) {\n // Empty result set\n throw new SnowReportException(\"No matching report\");\n }\n\n // This loads all the results from the query into the object\n // we're going to return. We'll also decorate this with some\n // other data, like metric and nice timestamps\n $report = (object) $results->fields;\n\n // Clean up the result sets, C5 says this is optional, I don't trust them.\n $results->Close();\n $report_db->Close();\n\n // Metric conversions\n $report->temperature_metric = SnowReportConverter::toCelcius($report->temperature);\n\n $report->snowfall24_metric = SnowReportConverter::toCentimeters($report->snowfall24);\n $report->snowfallnew_metric = SnowReportConverter::toCentimeters($report->snowfallnew);\n\n $report->baseheather_metric = SnowReportConverter::toCentimeters($report->baseheather);\n $report->basepan_metric = SnowReportConverter::toCentimeters($report->basepan);\n\n // Friendly time format, included the \"ago\"\n $date_helper = Loader::helper('date');\n $report->submittimeago = $date_helper->timeSince($report->submittime);\n $report->reportdate = $date_helper->date(\"F j, Y\", $report->submittime);\n $report->reportday = $date_helper->date(\"l\", $report->submittime);\n $report->reporttime = $date_helper->date(\"g:i a\", $report->submittime);\n\n // Ski WA data\n $report->pollingdate = date('Y-m-d H:i:s', $report->submittime);\n\n return $report;\n }", "public function getReportContent()\n {\n return $this->reportContent;\n }", "public function getDocdecision()\n {\n return $this->docdecision;\n }", "public static function get_reports()\n {\n }", "function getExistingReportDetails(){\n\t\t$conn = Doctrine_Manager::connection();\n\t\t$id_check = \"\";\n\t\tif(!isEmptyString($this->getID())){\n\t\t\t$id_check = \" AND id <> '\".$this->getID().\"' \";\n\t\t}\n\t\t\n\t\t$query = \"SELECT * FROM activityreport WHERE type = '\".$this->getType().\"' AND clientid = '\".$this->getClientID().\"' AND voucherid = '\".$this->getVoucherID().\"' AND TO_DAYS(startdate) <= TO_DAYS('\".$this->getStartDate().\"') AND TO_DAYS(enddate) >= TO_DAYS('\".$this->getEndDate().\"') \".$id_check;\n\t\t// debugMessage($ref_query);\n\t\t$result = $conn->fetchRow($query);\n\t\treturn $result;\n\t}", "public function getDocumentCounters()\n {\n return $this->document_counters;\n }", "public function getReports();", "public function report() {\r\n $where = '';\r\n\r\n if ( !$this->user->has_permission( User::ROLE_ADMIN ) )\r\n $where .= ' AND u.`company_id` = ' . (int) $this->user->company_id;\r\n\r\n $report = $this->get_results( \"SELECT w.`title`, u.`contact_name`, u.`work_phone`, u.`email`, u.`billing_state`, CONCAT( 'http://', w.`domain`, '/' ) FROM `websites` AS w LEFT JOIN `users` AS u ON ( u.`user_id` = w.`user_id` ) WHERE w.`status` = 1 $where ORDER BY u.`billing_state` ASC, w.`title` ASC\", PDO::FETCH_ASSOC );\r\n\r\n array_unshift( $report, array( 'Website Title', 'Store Owner', 'Phone Number', 'Email Address', 'State', 'Link' ) );\r\n\r\n return $report;\r\n }", "public function readDocument()\n {\n dd(\"Verify and Import Local Sheet\");\n\n }", "function get_document() {\n\t\treturn $this->get_mapped_property( 'document' );\n\t}", "public function readDetailedReportData() {\n\t\t$result = $this->xhprofModelObject->generic_execute_get_query(\"detaile_report_data\",\n\t\t\tarray());\n\t\treturn $result;\n\t}", "public function getConfStatus() {\n $results = []; \n \n $ente_id = $this->ORMmanager->getServiceUser()->getEnti()->getId(); \n $results['ncandprinc'] = $this->reportService->reportNotConfCandPrinc($ente_id);\n $results['ncandsec'] = $this->reportService->reportNotConfCandSec($ente_id);\n $results['nliste'] = $this->reportService->reportNotConfLists($ente_id);\n return $results;\n }", "public function Generate_Report()\n\t{\n\t\t//\n\t\t// criteria start_date YYYYMMDD\n\t\t// criteria end_date YYYYMMDD\n\t\t// company_id\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t$this->search_query = new Status_Overview_Report_Query($this->server);\n\t\n\t\t\t$data = new stdClass();\n\t\n\t\t\t// Save the report criteria\n\t\t\t$data->search_criteria = array(\n\t\t\t 'company_id' => $this->request->company_id,\n\t\t\t 'status_type' \t=> $this->request->status_type,\n\t\t\t 'balance_type'\t=> $this->request->balance_type,\n\t\t\t 'attributes'\t \t=> $this->request->attributes,\n\t\t\t);\n\t\n\t\t\tif(isset($this->request->date))\n\t\t\t{\n\t\t\t\t// Dates before the end of the requested date\n\t\t\t\t$date = $this->request->date;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Dates before the end of today\n\t\t\t\t$date = date('Ymd') . \"235959\";\n\t\t\t}\n\t\n\t\t\t$_SESSION['reports']['status_overview']['report_data'] = new stdClass();\n\t\t\t$_SESSION['reports']['status_overview']['report_data']->search_criteria = $data->search_criteria;\n\t\t\t$_SESSION['reports']['status_overview']['url_data'] = array('name' => 'Status Overview', 'link' => '/?module=reporting&mode=status_overview');\n\t\n\t\n\t\t\t$data->search_results = $this->search_query->Fetch_Status_Overview_Data( $this->request->status_type, $this->request->balance_type, $date, $this->request->company_id, $this->request->attributes);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$data->search_message = \"Unable to execute report. Reporting server may be unavailable.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// This doesn't work. I'd fix it, but I'm not sure we're supposed to limit this [benb]\n\t\t// we need to prevent client from displaying too large of a result set, otherwise\n\t\t// the PHP memory limit could be exceeded;\n\t\tif(!empty($data->search_results) && count($data->search_results) > $this->max_display_rows)\n\t\t{\n\t\t\t$data->search_message = \"Your report would have more than \" . $this->max_display_rows . \" lines to display. Please narrow the date range.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\n\t\t// Sort if necessary\n\t\t$data = $this->Sort_Data($data);\n\n\t\tECash::getTransport()->Add_Levels(\"report_results\");\n\t\tECash::getTransport()->Set_Data($data);\n\t\t$_SESSION['reports']['status_overview']['report_data'] = $data;\n\t}", "public function report()\n\t{\n\t\tif ( ! $this->report )\n\t\t{\n\t\t\trequire_once __DIR__ . '/class-bstat-report.php';\n\t\t\t$this->report = new bStat_Report();\n\t\t}\n\n\t\treturn $this->report;\n\t}", "public function getReportCount();", "public function getCallConversionReportingState()\n {\n return $this->call_conversion_reporting_state;\n }", "protected function fetchData() {\n\t\t$criteria = clone $this->getCriteria();\n\t\tif (($pagination=$this->getPagination())!==false) {\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t}\n\t\tif (($sort=$this->getSort())!==false) {\n\t\t\t$sort->applyOrder($criteria);\n\t\t}\n\t\t$sphinx = $this->getSphinx();\n\t\t$documentIds = $sphinx->findDocumentIdAll($criteria);\n\t\t$data = $this->fetchActualData($documentIds);\n\t\treturn $data;\n\t}", "final public function getResultDocument()\n {\n }", "public function refarralsReport()\n\t\t{\n\t\t\t$this->referrals->set(\"id\", $_GET['id']);\n\t\t\t$data = $this->referrals->selectRemison();\n\t\t\treturn $data;\n\t\t}", "public function getDocument(){\n return $this->_document; \n }", "public function getReport()\n {\n //gets the questions of the questionnaire\n $questions = Question::where(\"questionnaire_id\",\"=\",$this->id)->get();\n\n $stadistics = [];\n $stadistics['questions'] = $this->getReportFor($questions);\n $stadistics['questionnaire_answersCount'] = $this->getAnswersCount();\n $stadistics['questionnaire_name'] = $this->getTitle();\n return $stadistics;\n }", "public function getDateReported();", "function getSavedReportsForSelf() {\r\n\t\treturn $this->getSavedReportsForUser( $_SESSION['userid'] );\r\n\t}", "public static function status_report()\n {\n }", "public function read() {\n\t\treturn $this->state->read();\n\t}", "public function apiGetState()\n\t{\n\t\treturn $this->sendApiRequest('state/', 'GET');\n\t}", "function getDetailedStatus() ;", "public function getTracking() {\n return $this->doRequest();\n }", "public static function getReportDate()\n {\n return App::make(Api\\Context::class)->getReportingDate();\n }", "public function getProgressDocuments()\n {\n return $this->progress_documents;\n }", "public function readStates () {\r\n\t\t// Busca os estados\r\n\t\treturn $this->db->get('Estados')->result();\r\n\t}", "public function report();", "public function report();", "function getHtmlReport(){\n return $this->htmlReport;\n }", "public function journal() {\n\t\trequire_once(MODEL . \"master/company.php\");\n\t\trequire_once(MODEL . \"common/doc_type.php\");\n\t\trequire_once(MODEL . \"accounting/voucher_type.php\");\n require_once(MODEL . \"master/project.php\");\n\n\t\tif (count($this->getData) > 0) {\n\t\t\t$start = strtotime($this->GetGetValue(\"start\"));\n\t\t\t$end = strtotime($this->GetGetValue(\"end\"));\n $projectId = $this->GetGetValue(\"projectId\");\n\t\t\t$docIds = $this->GetGetValue(\"docType\", array());\n\t\t\t$status = $this->GetGetValue(\"status\");\n\t\t\t$output = $this->GetGetValue(\"output\", \"web\");\n\t\t\t$showNo = $this->GetGetValue(\"showNo\", \"0\") == \"1\";\n\t\t\t$showAdditionalColumn = $this->GetGetValue(\"showCol\", \"0\") == \"1\";\n\t\t\t$orientation = strtoupper($this->GetGetValue(\"orientation\", \"p\"));\n\t\t\tif (!in_array($orientation, array(\"P\", \"L\"))) {\n\t\t\t\t$orientation = \"P\";\n\t\t\t}\n\t\t\tif (count($docIds) == 0) {\n\t\t\t\t$this->persistence->SaveState(\"error\", \"Mohon pilih jenis dokumen terlebih dahulu. Sekurang-kurangnya pilih 1.\");\n\t\t\t\tredirect_url(\"accounting.report/journal\");\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\t// OK bikin querynya... (Untuk Bank masuk dilihat dari jenis dokumen BM dan OR)\n\t\t\tif ($showAdditionalColumn) {\n\t\t\t\t$query =\n \"SELECT\n a.id, a.voucher_date, a.doc_no, b.note, e.entity_cd, c.acc_name AS acc_debit, c.acc_no AS acc_no_debit, b.amount, d.acc_name AS acc_credit, d.acc_no AS acc_no_credit,\n dept.dept_code, activity.act_code, project.project_name, debtor.debtor_name, creditor.creditor_name, employee.nama\n FROM ac_voucher_master AS a\n JOIN ac_voucher_detail AS b ON a.id = b.voucher_master_id\n JOIN cm_acc_detail AS c ON b.acc_debit_id = c.id\n JOIN cm_acc_detail AS d ON b.acc_credit_id = d.id\n JOIN cm_company AS e ON a.entity_id = e.entity_id\n LEFT JOIN cm_dept AS dept ON b.dept_id = dept.id\n LEFT JOIN cm_activity AS activity ON b.activity_id = activity.id\n LEFT JOIN cm_project AS project ON b.project_id = project.id\n LEFT JOIN ar_debtor_master AS debtor ON b.debtor_id = debtor.id\n LEFT JOIN ap_creditor_master AS creditor ON b.creditor_id = creditor.id\n LEFT JOIN hr_employee_master AS employee ON b.employee_id = employee.id\n WHERE a.is_deleted = 0 AND a.voucher_date BETWEEN ?start AND ?end AND a.doc_type_id IN ?docTypes %s\";\n if ($projectId > 0){\n $query.= \" And b.project_id = ?projectId\";\n }\n $query.= \" ORDER BY a.voucher_date, a.doc_no\";\n\t\t\t} else {\n\t\t\t\t$query =\n \"SELECT a.id, a.voucher_date, a.doc_no, b.note, e.entity_cd, c.acc_name AS acc_debit, c.acc_no AS acc_no_debit, b.amount, d.acc_name AS acc_credit, d.acc_no AS acc_no_credit\n FROM ac_voucher_master AS a\n JOIN ac_voucher_detail AS b ON a.id = b.voucher_master_id\n JOIN cm_acc_detail AS c ON b.acc_debit_id = c.id\n JOIN cm_acc_detail AS d ON b.acc_credit_id = d.id\n JOIN cm_company AS e ON a.entity_id = e.entity_id\n WHERE a.is_deleted = 0 AND a.voucher_date BETWEEN ?start AND ?end AND a.doc_type_id IN ?docTypes %s\";\n if ($projectId > 0){\n $query.= \" And b.project_id = ?projectId\";\n }\n $query.= \" ORDER BY a.voucher_date, a.doc_no\";\n\n\t\t\t}\n\n\t\t\t$extendedWhere = \"\";\n\t\t\tif ($this->userCompanyId != 7 && $this->userCompanyId != null) {\n\t\t\t\t$extendedWhere .= \" AND a.entity_id = ?sbu\";\n\t\t\t\t$this->connector->AddParameter(\"?sbu\", $this->userCompanyId);\n\t\t\t}\n\t\t\tif ($status != null) {\n\t\t\t\t$extendedWhere .= \" AND a.status = ?status\";\n\t\t\t\t$this->connector->AddParameter(\"?status\", $status);\n\t\t\t}\n\n\t\t\t$this->connector->CommandText = sprintf($query, $extendedWhere);\n\t\t\t$this->connector->AddParameter(\"?start\", date(SQL_DATETIME, $start));\n\t\t\t$this->connector->AddParameter(\"?end\", date(SQL_DATETIME, $end));\n\t\t\t$this->connector->AddParameter(\"?projectId\", $projectId);\n $this->connector->AddParameter(\"?docTypes\", $docIds);\n\t\t\t$report = $this->connector->ExecuteQuery();\n\t\t} else {\n\t\t\t$end = time();\n\t\t\t$start = mktime(0, 0, 0, date(\"m\"), 1, date(\"Y\"));\n $projectId = null;\n\t\t\t$docIds = array();\n\t\t\t$status = null;\n\t\t\t$showNo = true;\n\t\t\t$showAdditionalColumn = false;\n\t\t\t$report = null;\n\t\t\t$output = \"web\";\n\t\t\t$orientation = \"P\";\n\n\t\t\tif ($this->persistence->StateExists(\"error\")) {\n\t\t\t\t$this->Set(\"error\", $this->persistence->LoadState(\"error\"));\n\t\t\t\t$this->persistence->DestroyState(\"error\");\n\t\t\t}\n\t\t}\n\n\t\t$company = new \\Company();\n\t\tif ($this->userCompanyId == 7 || $this->userCompanyId == null) {\n\t\t\t$company = $company->LoadById(7);\n\t\t} else {\n\t\t\t$company = $company->LoadById($this->userCompanyId);\n\t\t}\n\n\t\t$docType = new \\DocType();\n\t\t$vocType = new \\VoucherType();\n\n $project = new \\Project();\n $this->Set(\"projectList\", $project->LoadByEntityId($this->userCompanyId));\n $this->Set(\"projectId\", $projectId);\n\t\t$this->Set(\"start\", $start);\n\t\t$this->Set(\"end\", $end);\n\t\t$this->Set(\"docTypes\", $docType->LoadHaveVoucher());\n\t\t$this->Set(\"vocTypes\", $vocType->LoadAll());\n\t\t$this->Set(\"docIds\", $docIds);\n\t\t$this->Set(\"status\", $status);\n\t\t$this->Set(\"showNo\", $showNo);\n\t\t$this->Set(\"showCol\", $showAdditionalColumn);\n\t\t$this->Set(\"report\", $report);\n\t\t$this->Set(\"output\", $output);\n\t\t$this->Set(\"orientation\", $orientation);\n\t\t$this->Set(\"company\", $company);\n\t}", "public function Generate_Report()\n\t{\n\t\t//\n\t\t// criteria start_date YYYYMMDD\n\t\t// criteria end_date YYYYMMDD\n\t\t// company_id\n\t\t//\n\n\t\ttry\n\t\t{\n\t\t\t$this->search_query = new Status_History_Report_Query($this->server);\n\n\t\t\t$data = new stdClass();\n\n\t\t\t// Save the report criteria\n\t\t\t$data->search_criteria = array(\n\t\t\t 'start_date_MM' => $this->request->start_date_month,\n\t\t\t 'start_date_DD' => $this->request->start_date_day,\n\t\t\t 'start_date_YYYY' => $this->request->start_date_year,\n\t\t\t 'company_id' => $this->request->company_id,\n\t\t\t 'status_type' => $this->request->status_type\n\t\t\t);\n\n\t\t\t$_SESSION['reports']['status_history']['report_data'] = new stdClass();\n\t\t\t$_SESSION['reports']['status_history']['report_data']->search_criteria = $data->search_criteria;\n\t\t\t$_SESSION['reports']['status_history']['url_data'] = array('name' => 'Status History', 'link' => '/?module=reporting&mode=status_history');\n\n\t\t\t// Start date\n\t\t\t$start_date_YYYY = $this->request->start_date_year;\n\t\t\t$start_date_MM\t = $this->request->start_date_month;\n\t\t\t$start_date_DD\t = $this->request->start_date_day;\n\t\t\tif(!checkdate($start_date_MM, $start_date_DD, $start_date_YYYY))\n\t\t\t{\n\t\t\t\t//return with no data\n\t\t\t\t$data->search_message = \"Start Date invalid or not specified.\";\n\t\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$start_date_YYYYMMDD = 10000 * $start_date_YYYY\t+ 100 * $start_date_MM + $start_date_DD;\n\n\n\t\t\t$data->search_results = $this->search_query->Fetch_Status_History_Data( $start_date_YYYYMMDD,\n\t\t\t\t $this->request->status_type,\n\t\t\t\t $this->request->company_id);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$data->search_message = \"Unable to execute report. Reporting server may be unavailable.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// we need to prevent client from displaying too large of a result set, otherwise\n\t\t// the PHP memory limit could be exceeded;\n\t\tif(!empty($data->search_results) && count($data->search_results) > $this->max_display_rows)\n\t\t{\n\t\t\t$data->search_message = \"Your report would have more than \" . $this->max_display_rows . \" lines to display. Please narrow the date range.\";\n\t\t\tECash::getTransport()->Set_Data($data);\n\t\t\tECash::getTransport()->Add_Levels(\"message\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Sort if necessary\n\t\t$data = $this->Sort_Data($data);\n\n\t\tECash::getTransport()->Add_Levels(\"report_results\");\n\t\tECash::getTransport()->Set_Data($data);\n\t\t$_SESSION['reports']['status_history']['report_data'] = $data;\n\t}", "public function getState() {}", "public function getWorkReports()\n {\n return $this->postRequest('GetWorkReports');\n }", "public function getRecordInformation() {}", "public function buildReport()\n\t{\n\t\t$this->_arrReportData = array();\n\t\t$this->_arrTotals = array();\n\t\t\n\t\t$strEarliestVerificationTime\t= $this->_strEarliestTime;\n\t\t$strLatestVerificationTime\t\t= $this->_strLatestTime;\n\t\t$intSaleItemStatusIdVerified\t= DO_Sales_SaleItemStatus::VERIFIED;\n\t\t\n\t\t$strQueryTemplate = \"\nSELECT \tsi.id AS sale_item_id, \n\t\tsi.sale_id AS sale_id, \n\t\tsi.created_by AS created_by, \n\t\tsi.product_id AS product_id, \n\t\tverified_details.changed_on AS verified_on,\n\t\tcurrent_details.sale_item_status_id AS current_status_id,\n\t\tcurrent_details.changed_on AS current_status_changed_on\n\t\t\nFROM \tsale_item AS si \n\t\tINNER JOIN sale_item_status_history AS verified_details \n\t\t\tON \tsi.id = verified_details.sale_item_id \n\t\t\t\tAND verified_details.sale_item_status_id = $intSaleItemStatusIdVerified\n\t\tINNER JOIN sale AS s\n\t\t\tON si.sale_id = s.id\n\t\tINNER JOIN product AS p\n\t\t\tON p.id = si.product_id\n\t\tINNER JOIN vendor AS v\n\t\t\tON v.id = p.vendor_id\n\t\tINNER JOIN product_type AS pt\n\t\t\tON pt.id = p.product_type_id\n\t\tINNER JOIN \n\t\t\t(\n\t\t\t\tSELECT\tsale_item_status_history.sale_item_status_id AS sale_item_status_id, /* This table defines details of the current state of the sale_item */\n\t\t\t\t\t\tsale_item_status_history.changed_on AS changed_on,\n\t\t\t\t\t\tsale_item_status_history.changed_by AS changed_by,\n\t\t\t\t\t\tsale_item_status_history.sale_item_id AS sale_item_id\n\t\t\t\tFROM\tsale_item_status_history\n\t\t\t\t\t\tINNER JOIN \n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tSELECT sale_item_id, MAX(id) AS id /* This finds the id of the most recent sale_item_status_history record, for each sale_item_id */\n\t\t\t\t\t\t\t\tFROM sale_item_status_history\n\t\t\t\t\t\t\t\tGROUP BY sale_item_id\n\t\t\t\t\t\t\t) AS newest_sale_item_status_record\n\t\t\t\t\t\t\t\tON sale_item_status_history.id = newest_sale_item_status_record.id\n\t\t\t) AS current_details\n\t\t\t\tON si.id = current_details.sale_item_id\n\nWHERE\tsi.created_by IN (<DealerIds>)\n\t\tAND verified_details.changed_on BETWEEN '$strEarliestVerificationTime' AND '$strLatestVerificationTime'\n\nORDER BY v.name ASC, pt.name ASC, p.name ASC\n\";\n\n\t\t// Convert new line chars to spaces, and remove all tabs\n\t\t$strQueryTemplate = str_replace(\"\\n\", \" \", $strQueryTemplate);\n\t\t$strQueryTemplate = str_replace(\"\\t\", \" \", $strQueryTemplate);\n\t\t\n\t\t$dsSales = DO_Sales_Sale::getDataSource();\n\n\t\t$strNowTimestamp = Data_Source_Time::currentTimestamp($dsSales);\n\n\t\t// Cache data that will be used repeatedly\n\t\t$arrDealerCarriers\t\t\t= Carrier::listForCarrierTypeId(CARRIER_TYPE_SALES_CALL_CENTRE);\n\t\t$arrVendors\t\t\t\t\t= DO_Sales_Vendor::getAll();\n\t\tforeach ($arrVendors as &$doVendor)\n\t\t{\n\t\t\tif ($doVender->coolingOffPeriod === NULL)\n\t\t\t{\n\t\t\t\t$doVender->coolingOffPeriod = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$arrProductTypesNotIndexed\t= DO_Sales_ProductType::listAll();\n\t\t$arrProductTypes\t\t\t= array();\n\t\tforeach ($arrProductTypesNotIndexed as $doProductType)\n\t\t{\n\t\t\t$arrProductTypes[$doProductType->id] = $doProductType;\n\t\t}\n\t\t$arrDealers\t\t= array();\n\t\t$arrProducts\t= array();\n\t\t\n\t\t$arrProductTotalsTemplate = array(\t\"TotalVerified\"\t\t\t\t\t\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalCompletedAndCooledOff\"\t\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalCompletedButNotCooledOff\"\t\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalCancelledAndClawedBack\"\t\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalCancelledButNotClawedBack\"\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalOutstandingDispatched\"\t\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalOutstandingManualIntervention\"\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalOutstandingAwaitingDispatch\"\t\t=> 0,\n\t\t\t\t\t\t\t\t\t\t\t\"TotalOutstandingVerified\"\t\t\t\t=> 0\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\n\t\tforeach ($this->_arrDealers as $intDealerId=>$objDealerDetails)\n\t\t{\n\t\t\t$this->_arrTotals[$intDealerId] = array();\n\t\t\t\n\t\t\t// This will store the Sales totals, grouped by product, for the current dealer (and possibly their subordinates)\n\t\t\t// The key will be the product id\n\t\t\t$arrProductTotals = array();\n\t\t\t\n\t\t\t// Get a reference to the dealer object, (It makes it easier to reference)\n\t\t\t$objDealer = &$objDealerDetails->dealer;\n\t\t\t\n\t\t\t// Work out what dealer ids to use\n\t\t\t$arrDealerIds = ($objDealerDetails->includeSubordinates && count($objDealerDetails->subordinates))? array_merge(array($intDealerId), array_keys($objDealerDetails->subordinates)) : array($intDealerId);\n\t\t\t$strDealerIds = implode(\", \", $arrDealerIds);\n\t\t\t\n\t\t\t// Build the query specific to this dealer, and possibly their subordinates\n\t\t\t$strQuery = str_replace(\"<DealerIds>\", $strDealerIds, $strQueryTemplate);\n\t\t\t\n\t\t\t// Execute the query\n\t\t\tif (MDB2::isError($objResults = $dsSales->query($strQuery)))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Failed to execute SaleItemSummary Report Query for dealer {$objDealerDetails->dealer->username}, using query: $strQuery - \". $objResults->getMessage());\n\t\t\t}\n\t\t\n\t\t\twhile ($arrRecord = $objResults->fetchRow(MDB2_FETCHMODE_ASSOC))\n\t\t\t{\n\t\t\t\t// Get Product details\n\t\t\t\tif (!array_key_exists($arrRecord['product_id'], $arrProducts))\n\t\t\t\t{\n\t\t\t\t\t// Cache the product\n\t\t\t\t\t$arrProducts[$arrRecord['product_id']] = DO_Sales_Product::getForId($arrRecord['product_id']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$intVendorId = $arrProducts[$arrRecord['product_id']]->vendorId;\n\t\t\t\t\n\t\t\t\tif (!array_key_exists($arrRecord['product_id'], $this->_arrTotals[$intDealerId]))\n\t\t\t\t{\n\t\t\t\t\t// This is the first sale item of this product for this dealer\n\t\t\t\t\t// Initialise the totals\n\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']] = $arrProductTotalsTemplate;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Calculate the timestamp for the end of the clawback period\n\t\t\t\t$strVerifiedOn\t\t\t\t\t\t= $arrRecord['verified_on'];\n\t\t\t\t$strEndOfClawbackPeriodTimestamp\t= date(\"Y-m-d H:i:s\", strtotime(\"+{$objDealer->clawbackPeriod} hour {$strVerifiedOn}\"));\n\t\t\t\tif ($strEndOfClawbackPeriodTimestamp < '2001')\n\t\t\t\t{\n\t\t\t\t\tthrow new exception(\"Could not calculate the 'end of clawback period' timestamp for sale item: {$arrRecord['sale_item_id']} - dealer.clawbackPeriod = {$objDealer->clawbackPeriod} hours, saleItem.verifiedOn = {$strVerifiedOn}, resultant end of clawback period = $strEndOfClawbackPeriodTimestamp\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Calculate the timestamp for the end of the cooling off period\n\t\t\t\t$strEndOfCoolingOffTimestamp = date(\"Y-m-d H:i:s\", strtotime(\"+{$arrVendors[$intVendorId]->coolingOffPeriod} hour {$strVerifiedOn}\"));\n\t\t\t\tif ($strEndOfCoolingOffTimestamp < '2001')\n\t\t\t\t{\n\t\t\t\t\tthrow new exception(\"Could not calculate the 'end of cooling off' timestamp for sale item: {$arrRecord['sale_item_id']} - vendor->coolingOffPeriod = {$arrVendors[$arrRecord['vendor_id']]->coolingOffPeriod} hours, saleItem.verifiedOn = {$strVerifiedOn}, resultant cooling off end timestamp = $strEndOfCoolingOffTimestamp\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Update the tallies appropriately\n\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalVerified'] += 1;\n\t\t\t\t\n\t\t\t\t$intCurrentStatus\t\t\t= $arrRecord['current_status_id'];\n\t\t\t\t$strCurrentStatusTimestamp\t= $arrRecord['current_status_changed_on'];\n\t\t\t\t\n\t\t\t\tswitch ($intCurrentStatus)\n\t\t\t\t{\n\t\t\t\t\tcase DO_Sales_SaleItemStatus::CANCELLED:\n\t\t\t\t\t\t// SaleItem has been cancelled\n\t\t\t\t\t\t// Check if it happened before or after the clawback period ended\n\t\t\t\t\t\tif ($strCurrentStatusTimestamp > $strEndOfClawbackPeriodTimestamp)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The SaleItem was cancelled after the end of the clawback period\n\t\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalCancelledButNotClawedBack'] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The SaleItem was cancelled before the end of the clawback period\n\t\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalCancelledAndClawedBack'] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase DO_Sales_SaleItemStatus::COMPLETED:\n\t\t\t\t\t\t// SaleItem has been completed\n\t\t\t\t\t\t// Check if it has cooled off or not\n\t\t\t\t\t\tif ($strNowTimestamp > $strEndOfCoolingOffTimestamp)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The SaleItem has cooled off\n\t\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalCompletedAndCooledOff'] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The SaleItem has not cooled off yet\n\t\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalCompletedButNotCooledOff'] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase DO_Sales_SaleItemStatus::DISPATCHED:\n\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalOutstandingDispatched'] += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase DO_Sales_SaleItemStatus::MANUAL_INTERVENTION:\n\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalOutstandingManualIntervention'] += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase DO_Sales_SaleItemStatus::AWAITING_DISPATCH:\n\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalOutstandingAwaitingDispatch'] += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase DO_Sales_SaleItemStatus::VERIFIED:\n\t\t\t\t\t\t$this->_arrTotals[$intDealerId][$arrRecord['product_id']]['TotalOutstandingVerified'] += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// Whatever the status is, it shouldn't be set to it\n\t\t\t\t\t\t$doSaleItemStatus = DO_Sales_SaleItemStatus::getForId($intCurrentStatus);\n\t\t\t\t\t\tthrow new Exception(\"SaleItem (id {$arrRecord['sale_item_id']}) has been verified, but is now of an illegal status: {$doSaleItemStatus->name} ($intCurrentStatus)\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Translate the totals into the report data\n\t\t// In the report, each dealer/product combination is represented by a single row\n\t\tforeach ($this->_arrTotals as $intDealerId=>$arrDealerProductTotals)\n\t\t{\n\t\t\t$arrRecord = array(\t\"DealerId\"\t\t\t=> $intDealerId,\n\t\t\t\t\t\t\t\t\"DealerUsername\"\t=> $this->_arrDealers[$intDealerId]->dealer->username,\n\t\t\t\t\t\t\t\t\"DealerCarrier\"\t\t=> $arrDealerCarriers[$this->_arrDealers[$intDealerId]->dealer->carrierId]->name\n\t\t\t\t\t\t\t\t);\n\t\t\tforeach ($arrDealerProductTotals as $intProductId=>$arrProductTotals)\n\t\t\t{\n\t\t\t\t$arrRecord['VendorName']\t\t\t\t\t\t\t= $arrVendors[$arrProducts[$intProductId]->vendorId]->name;\n\t\t\t\t$arrRecord['ProductTypeName']\t\t\t\t\t\t= $arrProductTypes[$arrProducts[$intProductId]->productTypeId]->name;\n\t\t\t\t$arrRecord['ProductName']\t\t\t\t\t\t\t= $arrProducts[$intProductId]->name;\n\t\t\t\t$arrRecord['TotalVerified']\t\t\t\t\t\t\t= $arrProductTotals['TotalVerified'];\n\t\t\t\t$arrRecord['TotalCompletedAndCooledOff']\t\t\t= $arrProductTotals['TotalCompletedAndCooledOff'];\n\t\t\t\t$arrRecord['TotalCompletedButNotCooledOff']\t\t\t= $arrProductTotals['TotalCompletedButNotCooledOff'];\n\t\t\t\t$arrRecord['TotalCancelledAndClawedBack']\t\t\t= $arrProductTotals['TotalCancelledAndClawedBack'];\n\t\t\t\t$arrRecord['TotalCancelledButNotClawedBack']\t\t= $arrProductTotals['TotalCancelledButNotClawedBack'];\n\t\t\t\t$arrRecord['TotalOutstandingDispatched']\t\t\t= $arrProductTotals['TotalOutstandingDispatched'];\n\t\t\t\t$arrRecord['TotalOutstandingManualIntervention']\t= $arrProductTotals['TotalOutstandingManualIntervention'];\n\t\t\t\t$arrRecord['TotalOutstandingAwaitingDispatch']\t\t= $arrProductTotals['TotalOutstandingAwaitingDispatch'];\n\t\t\t\t$arrRecord['TotalOutstandingVerified']\t\t\t\t= $arrProductTotals['TotalOutstandingVerified'];\n\t\t\t\t\n\t\t\t\t$this->_arrReportData[] = $arrRecord;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn count($this->_arrReportData);\n\t}", "public function reports_page()\n {\n }", "public function getDetailedStatus() {}", "public function getReporting() {\n\t\t\treturn $this->_reporting;\n\t\t}", "function status_report($report_hash) {\r\n\t\t$reports = new reports($this->current_hash);\r\n\r\n\t\t$_POST['report_hash'] = $report_hash;\r\n\t\t$_POST['doit_print'] = 1;\r\n\r\n\t\t// Populate data for reports object.\r\n\t\t//TODO what method should I call? reports class does not handle status reports\r\n\t\t$reports->doit_status_report();\r\n\t\techo \"<pre> report data is \".print_r($reports->results,1).\"</pre>\";\r\n\t\tdie();\r\n\t}", "public function statePage() {\n\n $output['info'] = array(\n '#prefix' => '<p>',\n '#markup' => $this->t('State variables represent a certain state of a process. For example the last time cron was run.'),\n '#suffix' => '</p>',\n );\n\n // Get the the Last Visited timestamp and prepare it for display.\n $last = \\Drupal::state()->get('demo_variable.last_visited');\n $time = $last ? format_date($last) : $this->t('Unknown');\n\n // Set the Last Visited timestamp to the current time and store it.\n // The state service should be inject it as a depencency, not hardcoded,\n // but we leave that for the Dependency Injection demo module./\n \\Drupal::state()->set('demo_variable.last_visited', REQUEST_TIME);\n\n $output['state'] = array(\n '#prefix' => '<p>',\n '#markup' => $this->t('Last time you visited this page: @time', array('@time' => $time)),\n '#suffix' => '</p>',\n );\n\n return $output;\n }", "public function read()\n {\n return $this->store->read();\n }", "public function read()\n {\n return $this->state(function (array $attributes) {\n return [\n 'has_been_read' => 1,\n ];\n });\n }", "function getCurrentReport($identifier)\r\n {\r\n $field = strlen($identifier) == 32 ? 'ra.ra_key' : 'ra.ra_r_id';\r\n $identifier = $this->dbh->sql_safe($identifier);\r\n\r\n $sql = 'SELECT ra.ra_id AS RA_ID, ra.ra_key AS RA_KEY, ra.ra_u_id AS RA_U_ID, ra.ra_r_id AS RA_R_ID, ra.ra_title AS RA_TITLE, ra.ra_timeCreated AS RA_TIMECREATED '\r\n . 'FROM report_archive AS ra '\r\n . 'WHERE ' . $field . ' = ' . $identifier . ' '\r\n . 'ORDER BY ra.ra_timeCreated DESC '\r\n . 'LIMIT 1 ';\r\n\r\n return $this->dbh->query_first($sql);\r\n }", "public function getData()\n {\n return $this->getStatus();\n }", "public function getReport()\n {\n\n $req = $this->_bdd->prepare('SELECT comments.id AS c_id, comments.comment, comments.id_user,comments.report, comments.published, DATE_FORMAT(comment_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS comment_date_fr, users.id AS u_id, users.pseudo FROM users INNER JOIN comments ON users.id=comments.id_user WHERE report =1 AND published = 1 ORDER BY comment_date DESC');\n $req->execute();\n\n return $req;\n }", "function fetchReportMenu(){\n\n $election_levels = $this->fetchElectionLevels();\n\n $retVal = array();\n\n for($a=0;$a<count($election_levels);$a++){\n $retVal[$election_levels[$a]['election_level_name']] = $this->fetchCandidatePost($election_levels[$a]['election_level_id']);\n }\n\n\n return $retVal;\n }", "private function status() {\n $this->load->model('Status');\n\n $rows = array();\n foreach ($this->Status->get_status() as $record) {\n $rows[] = (array) $record;\n }\n $this->data['collections'] = $rows;\n\n return $this->parser->parse('status', $this->data, true);\n }", "function fetchViewingPageAndDirectory()\n\t{\n\t\tstatic $viewingPageData\t\t=\tfalse;\n\t\tif ( $viewingPageData === FALSE )\n\t\t{\n\t\t\t$viewingPageData\t\t\t=\t$this->__fetchViewingData();\n\t\t}\n\t\t\n\t\treturn $viewingPageData;\n\t}", "function getReport() {\n\t\tif ( !$this->_Report instanceof reportCentreReport ) {\n\t\t\t$this->_Report = reportCentreReport::getInstance($this->getReportID());\n\t\t}\n\t\treturn $this->_Report;\n\t}", "function cache_getBoardIndexReports()\n{\n\t$data = array();\n\n\t$request = wesql::query('\n\t\tSELECT lr.id_report, lr.id_member, lr.subject, lr.time_updated,\n\t\t\tIFNULL(mem.real_name, lr.membername) AS author_name, IFNULL(mem.id_member, 0) AS id_author\n\t\tFROM {db_prefix}log_reported AS lr\n\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = lr.id_member)\n\t\tWHERE lr.closed = {int:view_closed}\n\t\t\tAND ' . (we::$user['mod_cache']['bq'] == '1=1' || we::$user['mod_cache']['bq'] == '0=1' ? we::$user['mod_cache']['bq'] : 'lr.' . we::$user['mod_cache']['bq']) . '\n\t\tORDER BY lr.time_updated DESC\n\t\tLIMIT 1',\n\t\tarray(\n\t\t\t'view_closed' => 0,\n\t\t)\n\t);\n\tif ($row = wesql::fetch_assoc($request))\n\t\t$data = $row;\n\twesql::free_result($request);\n\n\treturn array(\n\t\t'data' => $data,\n\t\t'expires' => time() + 240,\n\t);\n}", "private function Find_Loan_Document()\n\t{\n\t\trequire_once('prpc/client.php');\n\n\t\t$prpc_server = Server::Get_Server($this->config->mode, 'CONDOR', $this->config->property_short);\n\t\t$condor_api = new prpc_client(\"prpc://{$prpc_server}/condor_api.php\");\n\n\t\t$loan_doc = NULL;\n\t\t$docs = $condor_api->Find_By_Application_Id($this->Get_Application_ID());\n\n\t\tif(!empty($docs))\n\t\t{\n\t\t\tforeach($docs as $doc)\n\t\t\t{\n\t\t\t\t// get the latest Loan Document archived\n\t\t\t\t// Mantis #12161 - Added in check for card loan docs as well\t[RV]\n\t\t\t\tif(($doc['template_name'] == 'Loan Document' || $doc['template_name'] == 'Card Loan Document')\n\t\t\t\t\t&& (is_null($loan_doc) || strtotime($doc['date_created']) > strtotime($loan_doc['date_created'])))\n\t\t\t\t{\n\t\t\t\t\t$loan_doc = $doc;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!is_null($loan_doc))\n\t\t\t{\n\t\t\t\t$_SESSION['condor_data'] = array(\n\t\t\t\t\t'archive_id' => $loan_doc['document_id'],\n\t\t\t\t\t'document' => $condor_api->Find_By_Archive_Id($loan_doc['document_id']),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn (!is_null($loan_doc)) ? $loan_doc['document_id'] : FALSE;\n\t}", "public static function get_stored_state()\n {\n }", "public function getDetailedStatus();", "public function report() {\n }", "public function progresReporting() {\n\t\tif (!isset($this->reportingLabels)) {\n\t\t\t$SQL = \"\n\t\t\t\tSELECT mst.go_refid,\n\t go_desc,\n\t go_sub_refid,\n\t go_sub_desc\n\t FROM webset_tx.def_goalobj_mst mst\n\t INNER JOIN webset_tx.def_goalobj_dtl dtl ON mst.go_refid = dtl.go_refid\n\t ORDER BY mst.seqnum, dtl.seqnum\n\t \";\n\t\t\t$this->reportingLabels = db::execSQL($SQL)->assocAll();\n\t\t}\n\t\treturn $this->reportingLabels;\n\t}", "function reportToOsclass() {\n\t\treturn $_COOKIE[ 'osclass_save_stats' ];\n\t}", "public function getsalesdata()\n\n\t{\n\t\t$resource = Mage::getSingleton('core/resource');\n\t\t$pos_sales_report = $resource->getTableName('pos_sales_report');\n\t\t//get session values for grid views\n\n\t\t$default_pagging_value=Mage::getStoreConfig(\"pos/notifications/default_pagging_value\");\n\n\t\t$salesreport_view=Mage::getSingleton('core/session')->getsalesreport_view();\n\n\t\tif(!empty($salesreport_view))\n\n\t\t{\n\n\t\t\t$salesreport_view_value=$salesreport_view;\t\n\n\t\t}\n\n\t\telse\n\n\t\t{\n\n\t\t\t$salesreport_view_value=$default_pagging_value;\t\n\n\t\t}\n\n\t\t$page=1;\n\n\t\t$pagesize=$salesreport_view_value;\n\n\t\t//Get order ids from pos_sales_report table\n\n\t\t$connection = Mage::getSingleton('core/resource')->getConnection('core_read');\n\n\t\t$select = $connection->select()->from($pos_sales_report, array('order_id'));\n\n\t\t$rowArray =$connection->fetchAll($select); //return row\n\n\t\tforeach($rowArray as $data)\n\n\t\t{\n\n\t\t\t$sales_data[] = array('eq' => $data['order_id']);\t\t\n\n\t\t}\n\n\t\t\n\n\t\t//Count total no of records\n\n\t\t$sales_record = Mage::getModel('sales/order')->getCollection()\n\n\t\t->addFieldToFilter('entity_id',$sales_data);\n\n\t\t$total_records=$sales_record->count();\n\n\t\t\n\n\t\t$order=Mage::getModel('sales/order')->getCollection()\n\n\t\t->addFieldToFilter('entity_id',$sales_data)\n\n\t\t->setOrder('entity_id', 'DESC')\n\n\t\t->setCurPage($page) // set the offset (useful for pagination)\t\n\n\t\t->setPageSize($pagesize); // limit number of results returned\n\n\t\t$display_records=$order->count();\n\n\t\t$total_pages=ceil($total_records/$display_records);\n\n\t\t$order->total_records=$total_records;\n\n\t\t$order->total_pages=$total_pages;\n\n\t\t$order->page=$page;\n\n\t\t$order->pagesize=$pagesize;\n\n\t\t//echo'<pre>';print_r($order);die;\n\n\t\treturn $order;\n\n\t}", "public function getEntityExportStatus();", "public function getOfrcreport()\n\t{\n\t\treturn $this->ofrcreport;\n\t}", "public function index(){\n\n return $this->stateService->getAll();\n }", "public function statusAction()\n {\n $project = $this->byId();\n $view = new CompositeView();\n \n $projectStatus = $this->_getParam('projectstatus', null);\n $status = null;\n if ($projectStatus) {\n $status = $this->projectService->getStatus($projectStatus);\n } else {\n $status = $this->projectService->getProjectStatus($project, $this->_getParam('period', 7));\n }\n\n $view->project = $project;\n $view->status = $status;\n\n $content = $view->render('project/status.php');\n\n if ($this->_getParam('pdf')) {\n ini_set('memory_limit', '32M');\n \n include_once \"dompdf/dompdf_config.inc.php\";\n include_once \"dompdf/include/dompdf.cls.php\";\n include_once \"dompdf/include/frame_tree.cls.php\";\n include_once \"dompdf/include/stylesheet.cls.php\";\n include_once \"dompdf/include/frame.cls.php\";\n include_once \"dompdf/include/style.cls.php\";\n include_once \"dompdf/include/attribute_translator.cls.php\";\n include_once \"dompdf/include/frame_factory.cls.php\";\n include_once \"dompdf/include/frame_decorator.cls.php\";\n include_once \"dompdf/include/positioner.cls.php\";\n include_once \"dompdf/include/block_positioner.cls.php\";\n include_once \"dompdf/include/block_frame_decorator.cls.php\";\n include_once \"dompdf/include/frame_reflower.cls.php\";\n include_once \"dompdf/include/block_frame_reflower.cls.php\";\n include_once \"dompdf/include/frame_reflower.cls.php\";\n include_once \"dompdf/include/text_frame_reflower.cls.php\";\n include_once \"dompdf/include/canvas_factory.cls.php\";\n include_once \"dompdf/include/canvas.cls.php\";\n include_once \"dompdf/include/abstract_renderer.cls.php\";\n include_once \"dompdf/include/renderer.cls.php\";\n include_once \"dompdf/include/cpdf_adapter.cls.php\";\n include_once \"dompdf/include/font_metrics.cls.php\";\n include_once \"dompdf/include/block_renderer.cls.php\";\n include_once \"dompdf/include/text_renderer.cls.php\";\n include_once \"dompdf/include/image_cache.cls.php\";\n include_once \"dompdf/include/text_frame_decorator.cls.php\";\n include_once \"dompdf/include/inline_positioner.cls.php\";\n include_once \"dompdf/include/page_frame_reflower.cls.php\";\n include_once \"dompdf/include/list_bullet_frame_decorator.cls.php\";\n include_once \"dompdf/include/list_bullet_positioner.cls.php\";\n include_once \"dompdf/include/list_bullet_frame_reflower.cls.php\";\n include_once \"dompdf/include/list_bullet_image_frame_decorator.cls.php\";\n include_once \"dompdf/include/list_bullet_renderer.cls.php\";\n include_once \"dompdf/include/page_frame_decorator.cls.php\";\n include_once \"dompdf/include/table_frame_decorator.cls.php\";\n include_once \"dompdf/include/cellmap.cls.php\";\n include_once \"dompdf/include/table_frame_reflower.cls.php\";\n include_once \"dompdf/include/table_row_frame_decorator.cls.php\";\n include_once \"dompdf/include/null_positioner.cls.php\";\n include_once \"dompdf/include/table_row_frame_reflower.cls.php\";\n\t\t\tinclude_once \"dompdf/include/table_cell_frame_decorator.cls.php\";\n\t\t\tinclude_once \"dompdf/include/table_cell_positioner.cls.php\";\n\t\t\tinclude_once \"dompdf/include/table_cell_frame_reflower.cls.php\";\n\t\t\tinclude_once \"dompdf/include/table_row_group_frame_decorator.cls.php\";\n\t\t\tinclude_once \"dompdf/include/table_row_group_frame_reflower.cls.php\";\n\t\t\tinclude_once \"dompdf/include/table_cell_renderer.cls.php\";\n\t\t\tinclude_once \"dompdf/include/inline_frame_decorator.cls.php\";\n\t\t\tinclude_once \"dompdf/include/inline_frame_reflower.cls.php\";\n\t\t\tinclude_once \"dompdf/include/image_frame_decorator.cls.php\";\n\t\t\tinclude_once \"dompdf/include/image_frame_reflower.cls.php\";\n\t\t\tinclude_once \"dompdf/include/inline_renderer.cls.php\";\n\t\t\tinclude_once \"dompdf/include/image_renderer.cls.php\";\n\t\t\tinclude_once \"dompdf/include/dompdf_exception.cls.php\";\n\t\t\t\n\t\t\t$dompdf = new DOMPDF();\n\t\t\t$dompdf->load_html($content);\n\t\t\t$dompdf->render();\n\t\t\t\n\t\t\t$date = date('Y-m-d');\n\t\t\tif ($status->created) {\n\t\t\t $date = date('Y-m-d', strtotime($status->created));\n\t\t\t}\n\t\t\t\n\t\t\t$name = $project->title .' status-'.$date.'.pdf';\n\t\t\t$dompdf->stream($name);\n\n } else {\n echo $content;\n }\n }", "public function getdeliverystatus(){\n \n $PoGrnDetailTbl = TableRegistry::get('PoGrnDetail');\n \n $query = $PoGrnDetailTbl->find();\n $query->matching('PoGrn', function ($q) {\n $POID = $this->request->data['po_id'];\n return $q->where(['po_id'=>$POID]);\n });\n $query->select(['grn_batch_no','grn_product_name','Price'=>'sum(received_pack_price)', 'Received'=>'sum(received_pack_qty)']);\n $query->group(['grn_batch_no','grn_product_name']);\n $query->hydrate(false); // Results as arrays intead of entities\n \n $data = $query->toArray(); // Execute the query and return the array\n \n $this->set(compact('data'));\n $this->set('_serialize', ['data']);\n }", "public function requestReport()\n {\n if (! array_key_exists('ReportType', $this->options)) {\n $this->log('Report Type must be set in order to request a report!', 'Warning');\n\n return false;\n }\n\n $url = $this->urlbase.$this->urlbranch;\n\n $query = $this->genQuery();\n\n $path = $this->options['Action'].'Result';\n if ($this->mockMode) {\n $xml = $this->fetchMockFile()->$path;\n } else {\n $response = $this->sendRequest($url, ['Post' => $query]);\n\n if (! $this->checkResponse($response)) {\n return false;\n }\n\n $xml = simplexml_load_string($response['body'])->$path;\n }\n\n $this->parseXML($xml->ReportRequestInfo);\n }" ]
[ "0.6434507", "0.63355", "0.63355", "0.6117104", "0.6025682", "0.5967133", "0.5676298", "0.5641673", "0.5618857", "0.5591743", "0.5581803", "0.55745405", "0.55716085", "0.55584836", "0.5537741", "0.5510609", "0.55091584", "0.55044657", "0.548563", "0.5480077", "0.5472045", "0.547096", "0.54422444", "0.5396585", "0.53953606", "0.53917664", "0.5371874", "0.5371436", "0.5369362", "0.5344802", "0.5344273", "0.53339076", "0.53260726", "0.5311098", "0.5289309", "0.52892834", "0.52850467", "0.5267347", "0.52599585", "0.5256831", "0.5238913", "0.5213599", "0.51945144", "0.5176004", "0.51545787", "0.5131036", "0.51284504", "0.51142293", "0.5099817", "0.50986457", "0.5088308", "0.5087556", "0.5073222", "0.5056378", "0.5054006", "0.5053461", "0.5043129", "0.50361425", "0.50354385", "0.50322735", "0.50321525", "0.50266284", "0.5024528", "0.5022183", "0.5022183", "0.5017918", "0.50150865", "0.50132203", "0.500854", "0.5006093", "0.5005412", "0.4998976", "0.4997566", "0.49957225", "0.49924502", "0.49898422", "0.49645644", "0.4958975", "0.4950638", "0.49484396", "0.49391493", "0.49328136", "0.49311525", "0.49222898", "0.49201795", "0.49172416", "0.49151382", "0.49108246", "0.49108037", "0.49087554", "0.49069494", "0.4906484", "0.49056923", "0.49050045", "0.4901002", "0.48932192", "0.4892435", "0.48855528", "0.487726", "0.48627684" ]
0.7153301
0
Fetch the document report ID
Получить идентификатор отчета документа
public function fetchDocumentReportId($document_id) { $client = new Client($this->getUrl()); $args = array( 'sid' => new Value($this->getSid()), 'id' => new Value($document_id), ); $response = $client->send(new Request('document.get', array(new Value($args, "struct")))); $response = json_decode(json_encode($response), true); if (isset($response['val']['me']['struct']['documents']['me']['array'][0]['me']['struct']['parts']['me']['array'][0]['me']['struct']['id']['me']['int'])) { $report_id = $response['val']['me']['struct']['documents']['me']['array'][0]['me']['struct']['parts']['me']['array'][0]['me']['struct']['id']['me']['int']; if ($report_id != null) { return $report_id; } else { return false; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId() {\n\t\treturn $this->get('reportid');\n\t}", "public function getReportId(): string\n {\n return $this->reportId;\n }", "public function getReportId()\n\t{\n\t\treturn $this->report_id;\n\t}", "function getReportID() {\n\t\treturn $this->_ReportID;\n\t}", "public function getDocumentId() {}", "private function getDocumentId()\n {\n return $this->request->attributes->get('singleDocument', null);\n }", "public function getDocumentId()\n {\n return $this->get(self::DOCUMENTID);\n }", "public function getDocumentId(): string\n {\n return $this->documentId;\n }", "public function getReportId(): string\n {\n return explode('/', $this->toArray()['statusUrl'])[6];\n }", "public function getResultReportId(): string\n {\n return explode('/', $this->getXmlUrl())[6];\n }", "public function getReportUid(): string\n {\n return $this->report_uid;\n }", "private function get_latest_reportID(){\n\n $latest_reports = $this->get_response($this->base_url);\n\n if(NULL != json_decode($latest_reports)){\n return $latest_reports;\n } \n if(!isset($latest_reports->children()[0]->url)){\n handle_exception(new XMLFormatException(\"XML Node 'url' is missing\"));\n }\n $latest_id = get_id($latest_reports->children()[0]->url);\n return $latest_id;\n }", "public function getId(): ?int {\n\t\t$ids = $this->getReportIds();\n\t\t$id = array_shift( $ids );\n\t\treturn $id;\n\t}", "public function getId_reporte()\n {\n return $this->id_reporte;\n }", "function getDocumentID() {\n return $this->iDocumentID;\n }", "function get_documentId() :?int\n\t{\n\t\treturn( $this->documentId );\n\t}", "public function get_doc_id() {\n\n\t\tif ( ! empty( $this->override_doc_id ) ) {\n\n\t\t\t$this->doc_id = $this->override_doc_id;\n\n\t\t} else {\n\n\t\t\tif ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {\n\t\t\t\tif ( bp_docs_is_existing_doc() ) {\n\t\t\t\t\t$this->doc_id = get_queried_object_id();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// AJAX\n\t\t\t\tif ( isset( $_REQUEST['query']['auto_draft_id'] ) ) {\n\n\t\t\t\t\t$this->doc_id = (int) $_REQUEST['query']['auto_draft_id'];\n\n\t\t\t\t} else if ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] && isset( $_REQUEST['post_id'] ) ) {\n\n\t\t\t\t\t$maybe_doc = get_post( $_REQUEST['post_id'] );\n\t\t\t\t\tif ( bp_docs_get_post_type_name() == $maybe_doc->post_type ) {\n\t\t\t\t\t\t$this->doc_id = $maybe_doc->ID;\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// In order to check if this is a doc, must check ajax referer\n\t\t\t\t\t$this->doc_id = $this->get_doc_id_from_url( wp_get_referer() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->doc_id;\n\t}", "protected function getEditId()\n\t{\n\t\treturn $this->reportId;\n\t}", "function get_document_id($_course, $path) {\n\t\t$TABLE_DOCUMENT = Database::get_course_table ( TABLE_DOCUMENT, $_course ['dbName'] );\n\t\t\n\t\t$sql = \"SELECT id FROM $TABLE_DOCUMENT WHERE path = '$path'\";\n\t\t$sql .= \" AND cc='\" . $_course [\"code\"] . \"' \";\n\t\t$result = api_sql_query ( $sql, __FILE__, __LINE__ );\n\t\t\n\t\tif ($result && mysql_num_rows ( $result ) == 1) {\n\t\t\t$row = mysql_fetch_row ( $result );\n\t\t\treturn $row [0];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function snax_get_report_page_id() {\n\treturn apply_filters( 'snax_report_page_id', get_option( 'snax_report_page_id' ) );\n}", "public function getDocliteId(): string\n {\n return $this->id;\n }", "public function getDocument($id){\n $sql = new Sql($this->adapter);\n \n $select = $sql->select()\n ->from(array('rd' => 'report_documents'))\n ->where(array('rd.id' => $id));\n\n $statement = $sql->prepareStatementForSqlObject($select);\n $result = $statement->execute();\n \n return $result;\n }", "public function getIdreporte1()\n {\n return $this->idreporte1;\n }", "function getCurrentReport($identifier)\r\n {\r\n $field = strlen($identifier) == 32 ? 'ra.ra_key' : 'ra.ra_r_id';\r\n $identifier = $this->dbh->sql_safe($identifier);\r\n\r\n $sql = 'SELECT ra.ra_id AS RA_ID, ra.ra_key AS RA_KEY, ra.ra_u_id AS RA_U_ID, ra.ra_r_id AS RA_R_ID, ra.ra_title AS RA_TITLE, ra.ra_timeCreated AS RA_TIMECREATED '\r\n . 'FROM report_archive AS ra '\r\n . 'WHERE ' . $field . ' = ' . $identifier . ' '\r\n . 'ORDER BY ra.ra_timeCreated DESC '\r\n . 'LIMIT 1 ';\r\n\r\n return $this->dbh->query_first($sql);\r\n }", "function getPrimaryKey() {\n\t\treturn $this->getScheduled().':'.$this->getReportID();\n\t}", "public function fetchDocumentReportUrl($report_id, $exclude_biblio = 1, $exclude_quotes = 1, $exclude_small_matches = 1)\n {\n $client = new Client($this->getUrl());\n $args = array(\n 'sid' => new Value($this->getSid()),\n 'id' => new Value($report_id),\n 'exclude_biblio' => new Value($exclude_biblio),\n 'exclude_quotes' => new Value($exclude_quotes),\n 'exclude_small_matches' => new Value($exclude_small_matches),\n );\n\n $response = $client->send(new Request('report.get', array(new Value($args, \"struct\"))));\n $response = json_decode(json_encode($response), true);\n if (isset($response['val']['me']['struct']['view_only_url']['me']['string'])) {\n $report_url = $response['val']['me']['struct']['view_only_url']['me']['string'];\n if ($report_url != null) {\n return $report_url;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function extractID(): string\n {\n $idColumn = $this->qb->getIdColumn($this->request, new MetaData());\n if ('rec_id' === $idColumn) {\n return $this->records['recordId'];\n }\n\n $uri = $this->qb->getUri() . '/' . $this->records['recordId'];\n try {\n $record = $this->conn->performFMRequest('GET', $uri, $this->qb->getOptions());\n return $record[0]['fieldData'][$idColumn];\n } catch (Exception $e) {\n throw new FMException('Unable to locate record primary key with error ' . $e->getMessage());\n }\n\n }", "public function getDocId(): ?int\n {\n return $this->getOption('docId');\n }", "public function getId()\n {\n if ($this->def->getId() === null) {\n throw new \\RuntimeException('No id found for document');\n }\n\n return $this->def->getId();\n }", "public function getReport():?int\n {\n return $this->report;\n }", "public function getReportRequestId()\n {\n if (isset($this->response)) {\n return $this->response['ReportRequestId'];\n } else {\n return false;\n }\n }", "public function fetchProjectID(): string {\n return $this->source->fetchProjectID();\n }", "function utilIdByDocument($p_connection,$p_document)\r\n{\r\n\t$id = 0;\r\n\t$query = \"SELECT id FROM pdv WHERE document = :document\";\r\n\t$stmt = $p_connection->prepare($query);\r\n\t$stmt->bindParam(\"document\",$p_document);\r\n\t$stmt->execute();\r\n\twhile ($row = $stmt->fetch(PDO::FETCH_ASSOC))\r\n\t{\r\n\t\t$id = $row['id'];\r\n\t}\r\n\treturn $id;\r\n}", "public function getIdentifier() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(3, $this->_result)) return (string) $this->_result[3];\n\t\t\telse parent::throwGetColException('Not set CampaignPagesModel::getIdentifier', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignPagesModel::getIdentifier', __LINE__, __FILE__);\n\t}", "function getDocumentByID($document_id = 0);", "public function getPageId() {}", "public function get_report_customer_id()\n {\n }", "public function get_report_customer_id()\n {\n }", "public function getRecordId()\n {\n $value = null;\n switch ($this->result) {\n case \"OK\":\n if (isset($this->data[$this->pointer])) {\n if (isset($this->data[$this->pointer]->recordId)\n ) {\n $value = $this->data[$this->pointer]->recordId;\n }\n }\n break;\n case \"PORTAL\":\n if (isset($this->data[$this->pointer]) &&\n isset($this->data[$this->pointer]->recordId)\n ) {\n $value = $this->data[$this->pointer]->recordId;\n }\n break;\n case \"RECORD\":\n case \"PORTALRECORD\":\n if (isset($this->data) && isset($this->data->recordId)) {\n $value = $this->data->recordId;\n }\n break;\n }\n return $value;\n }", "public function fetch_the_id() {}", "public function getReport() {}", "public function getReport() {}", "function f_getReport($rid)\n\t{\n\t\tglobal $db;\n\t\t$sql_query = \"select report from test_request where request_id = $rid\";\n\t\t$result = $db->query($sql_query) or die($db->error);\n\t\t$row = $result->fetch_assoc();\n\t\t\n\t\treturn $row['report'];\n\t}", "public function getDocNumber()\n {\n return $this->doc_number;\n }", "public function getPageId();", "function recovery_document_id($pmid, $manager_cazy)\n{\n $document_id_in_pub_document = $manager_cazy->pdo->prepare(\"SELECT document_id FROM extern_db.pub_document WHERE pub_db_acc = '$pmid'\");\n $document_id_in_pub_document->execute();\n $document_id_find = $document_id_in_pub_document->fetch();\n $document_id = '';\n if (!empty($document_id_find))\n {\n $document_id = $document_id_find['document_id'];\n }\n return $document_id;\n}", "public function getRecordId()\n {\n return $this->source->record_id;\n }", "public function getReportTypeId(): string\n {\n return $this->reportTypeId;\n }", "public function getIdDoc()\n {\n return $this->hasOne(MDocument::className(), ['IdDoc' => 'IdDoc']);\n }", "public function getIdDoc()\n {\n return $this->hasOne(MDocument::className(), ['IdDoc' => 'IdDoc']);\n }", "public function getRecordId()\n\t{\n\t\treturn $this->record->getId();\n\t}", "function getReport() ;", "public function getIdentifierValue($document) {\n return $this->reflFields[$this->identifier]->getValue($document);\n }", "function getExistingReportDetails(){\n\t\t$conn = Doctrine_Manager::connection();\n\t\t$id_check = \"\";\n\t\tif(!isEmptyString($this->getID())){\n\t\t\t$id_check = \" AND id <> '\".$this->getID().\"' \";\n\t\t}\n\t\t\n\t\t$query = \"SELECT * FROM activityreport WHERE type = '\".$this->getType().\"' AND clientid = '\".$this->getClientID().\"' AND voucherid = '\".$this->getVoucherID().\"' AND TO_DAYS(startdate) <= TO_DAYS('\".$this->getStartDate().\"') AND TO_DAYS(enddate) >= TO_DAYS('\".$this->getEndDate().\"') \".$id_check;\n\t\t// debugMessage($ref_query);\n\t\t$result = $conn->fetchRow($query);\n\t\treturn $result;\n\t}", "public function getRecordId()\n {\n\n return $this->id;\n\n }", "private function Get_Client_Id()\n\t{\n\t\t$start_date = $this->process_date . '000000';\n\t\t$end_date = $this->process_date . '235959';\n\n\t\t$status_query = \"\n\t\t\tSELECT client_identifier\n\t\t\t FROM ecld_file\n\t\t\t WHERE date_created BETWEEN '{$start_date}'\n\t\t\t AND '{$end_date}'\n\t\t\t\";\n\n\t\t$st = $this->db->query($status_query);\n\n\t\tswitch($st->rowCount())\n\t\t{\n\t\t\tcase 1:\n\t\t\t\treturn $st->fetchColumn(0);\n\t\t\tcase 0:\n\t\t\t\tthrow new Exception( \"Deposit file sent for \" . $this->process_date . \", but no ecld_file entry found!\" );\n\t\t\tdefault:\n\t\t\t\tthrow new Exception( \"More than 1 ecld_file entry found for \" . $this->process_date . '.' );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getDocumentSetId()\n {\n return $this->documentSetId;\n }", "public function getCampaignId() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(1, $this->_result)) return (string) $this->_result[1];\n\t\t\telse parent::throwGetColException('Not set CampaignPagesModel::getCampaignId', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignPagesModel::getCampaignId', __LINE__, __FILE__);\n\t}", "public function fetchId();", "public function getId() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(0, $this->_result)) return (string) $this->_result[0];\n\t\t\telse parent::throwGetColException('Not set CampaignPagesModel::getId', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignPagesModel::getId', __LINE__, __FILE__);\n\t}", "public function getDocNumber()\n {\n return $this->docNumber;\n }", "public function getPdf_id() {\n\t\treturn $this->pdf_id;\n\t}", "public function getRecordId()\n {\n return $this->recordId;\n }", "public function documentIdentification()\n {\n $this->builder->textStyle(false, false, false);\n $this->builder->textFont('C');\n\n if (isset($this->document['second_way']) && $this->document['second_way']) {\n $this->builder->text($this->labels->second_way . ' - ');\n }\n\n if ($this->printer->copies > 1) {\n $this->builder->variable('#CopyNumber#');\n } else {\n $this->builder->text($this->labels->original);\n }\n\n $this->linebreak();\n\n $this->builder->textStyle(false, false, true);\n $this->builder->textFont('A');\n\n $documentName = $this->labels->document_types[$this->document['document_type_id']];\n $this->builder->text($documentName . ' ' . $this->document['document_set']['name'] . '/' . $this->document['number']);\n $this->linebreak();\n }", "public static function getAcc_DocID($doc_num, $carrier){ \n return self::model()->find(\"doc_number=:doc_number AND id_carrier=:carrier\", array(':doc_number'=>$doc_num,':carrier'=>$carrier))->id;\n }", "public function determineId() {}", "public function getReportDocument(Request $request)\n {\n $p_id = $request->get('id');\n $nreport = 'ArchiveDetailDocumentLetter';\n $controls = array(\n 'p_id' => $p_id,\n );\n $report = JSRClient::GetReportWithParameters($nreport, $controls);\n return $report;\n }", "public function get_id();", "public function get_id();", "public function get_id();", "public function get_id();", "public function getId()\n {\n return $this->getFieldValue('id');\n }", "public function CurrentReport() {\n\t\t$id = isset($_REQUEST['ID']) ? $_REQUEST['ID'] : ($this->getRequest()->latestParam('Action') == 'EditForm') ? Session::get('currentReport') : null;\n\n\t\tif($id) {\n\t\t\tforeach($this->Reports() as $report) {\n\t\t\t\tif($id == $report->ID()) return $report;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function getAllDetailsByID($document_id = 0);", "function GetDocID($strTitle, $strType)\r\n\t{\r\n\t\t$oDocType = documentType::GetInstance();\r\n\t\t/*\r\n\t\t\tReturns the numeric doc_ID value of the title\r\n\t\t*/\r\n\t\t$strNewTitle = $this->db->EscapeString($strTitle);\r\n\t\r\n\t\t$typeID = $oDocType->GetID($strType);\r\n\t\r\n\t\t$sql = \"SELECT * FROM $this->table_Name WHERE $this->field_Name = '$strNewTitle' AND $this->field_DocTypeId = $typeID;\";\r\n\t\r\n\t\t/*\r\n\t\t\tRetrieves a list of records\r\n\t\t*/\r\n\t\t$records = $this->db->Select($sql);\r\n\r\n\t\tif(sizeof($records) > 0)\r\n\t\t{\r\n\t\t\treturn $records[0][$this->field_Id];\r\n\t\t}\r\n\t\t\r\n\t\treturn -1;\r\n\t}", "function getID() {\n\t\treturn $this->get(\"id\");\n\t}", "public function getIdentifierValue($document)\n {\n if ($document instanceof Proxy && !$document->__isInitialized()) {\n return $document->__identifier__;\n }\n return $this->reflFields[$this->identifier]->getValue($document);\n }", "public function getIdentifierValue($document)\n {\n if ($document instanceof Proxy && !$document->__isInitialized()) {\n return $document->__identifier__;\n }\n return $this->reflFields[$this->identifier]->getValue($document);\n }", "public function getIdentifierValue($document)\n {\n return (string) $this->reflFields[$this->identifier]->getValue($document);\n }", "public function getID();", "public function getID();", "public function getID();", "public function getDocumentNumber() {\n return $this->documentNumber;\n }", "public function getDocumentNumber() {\n return $this->documentNumber;\n }", "public function getPageIdDB() {\n\t\t$dbr = wfGetDB( DB_REPLICA );\n\t\t$res = $dbr->select(\n\t\t\t'page', 'page_id',\n\t\t\t[ 'page_title' => $this->id, 'page_namespace' => NS_PATHWAY ],\n\t\t\t__METHOD__\n\t\t);\n\t\tforeach ( $res as $row ) {\n\t\t\t$pageId = $row[\"page_id\"];\n\t\t}\n\t\treturn $pageId;\n\t}", "public function getReport($report){\n if (isset($this->reports[$report])){\n return $this->reports[$report];\n }\n return FALSE;\n }", "public function getDocumentNumber()\n\t{\n\t return $this->documentNumber;\n\t}", "public function getDocumentNumber()\n\t{\n\t return $this->documentNumber;\n\t}", "public function getReport()\n {\n $reportClass = $this->reportType;\n\n return $reportClass::find($this->reportId);\n }", "public function get_id() {\n return $this->get_field( 'ID' );\n }", "protected function determinePageId() {}", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "protected function determinePageId() {}", "protected function getReport()\n {\n return $this->report;\n }", "function primary_key_value()\n\t{\n\t\treturn( $this->documentId );\n\t\t\n\t}" ]
[ "0.74781", "0.7407043", "0.7296133", "0.72374976", "0.7165756", "0.6876116", "0.6864428", "0.6685102", "0.6668466", "0.6595459", "0.659429", "0.6584339", "0.6563596", "0.65163344", "0.64862293", "0.63471144", "0.6258361", "0.62327975", "0.6216223", "0.61977625", "0.6188312", "0.61513114", "0.6144943", "0.6140637", "0.613454", "0.60921526", "0.60577273", "0.60573274", "0.60205543", "0.601677", "0.60128564", "0.59960306", "0.59899163", "0.5984195", "0.59629065", "0.59415466", "0.5917752", "0.5911647", "0.5911227", "0.5908523", "0.59076154", "0.59076154", "0.58924353", "0.58901215", "0.588225", "0.5877122", "0.5847994", "0.5837357", "0.58211803", "0.58211803", "0.58128244", "0.5806174", "0.5803875", "0.57909834", "0.5787777", "0.57851475", "0.5776715", "0.57740325", "0.5765858", "0.57617474", "0.57583743", "0.574334", "0.573509", "0.573399", "0.5721737", "0.5709011", "0.57079655", "0.57019293", "0.57019293", "0.57019293", "0.57019293", "0.5688976", "0.5660793", "0.5660223", "0.56432134", "0.56389946", "0.563485", "0.563485", "0.56343174", "0.5621946", "0.5621946", "0.5621946", "0.56185675", "0.56185675", "0.5607489", "0.56063336", "0.55996", "0.55996", "0.5598883", "0.5588867", "0.5584645", "0.55832016", "0.5583094", "0.5583094", "0.55821913", "0.558201", "0.5581768", "0.5580822", "0.5571415", "0.5565854" ]
0.75795394
0
Add class to bottom sidebar widgets based on how many they are
Добавить класс к нижним виджетам боковой панели в зависимости от их количества
function cosmos_bottom_sidebar_class($params) { $sidebar_id = $params[0]['id']; if ( $sidebar_id == 'sidebar-bottom' ) { $total_widgets = wp_get_sidebars_widgets(); $sidebar_widgets = count($total_widgets[$sidebar_id]); $class = 'class="span' . floor(12 / $sidebar_widgets) . ' '; $params[0]['before_widget'] = str_replace('class="', $class, $params[0]['before_widget']); } return $params; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ti_footer_sidebar_class() {\n\t$count = 0;\n\n\tif ( is_active_sidebar( 'sidebar-3' ) )\n\t\t$count++;\n\n\tif ( is_active_sidebar( 'sidebar-4' ) )\n\t\t$count++;\n\n\tif ( is_active_sidebar( 'sidebar-5' ) )\n\t\t$count++;\n\n\t$class = '';\n\n\tswitch ( $count ) {\n\t\tcase '1':\n\t\t\t$class = ' col-1';\n\t\t\tbreak;\n\t\tcase '2':\n\t\t\t$class = ' col-2';\n\t\t\tbreak;\n\t\tcase '3':\n\t\t\t$class = ' col-3';\n\t\t\tbreak;\n\t}\n\n\tif ( $class )\n\t\techo $class;\n}", "function alienship_sidebar_class( $prefix = false ) {\n\n\tif ( ! $prefix )\n\t\t_doing_it_wrong( __FUNCTION__, __( 'You must specify a prefix when using alienship_sidebar_class.', 'alienship' ), '1.0' );\n\n\t$count = 0;\n\n\tif ( is_active_sidebar( $prefix.'-1' ) )\n\t\t$count++;\n\n\tif ( is_active_sidebar( $prefix.'-2' ) )\n\t\t$count++;\n\n\tif ( is_active_sidebar( $prefix.'-3' ) )\n\t\t$count++;\n\n\tif ( is_active_sidebar( $prefix.'-4' ) )\n\t\t$count++;\n\n\t$class = '';\n\n\tswitch ( $count ) {\n\t\tcase '1':\n\t\t\t$class = ' col-sm-12';\n\t\t\tbreak;\n\n\t\tcase '2':\n\t\t\t$class = ' col-sm-6';\n\t\t\tbreak;\n\n\t\tcase '3':\n\t\t\t$class = ' col-sm-4';\n\t\t\tbreak;\n\n\t\tcase '4':\n\t\t\t$class = ' col-sm-3';\n\t\t\tbreak;\n\t}\n\n if ( $class )\n\t return $class;\n}", "function scratch_footer_widgets_class( $attr, $context ) {\n\tif ( 'footer-widgets' === $context ) {\n\t\tglobal $sidebars_widgets;\n\t\tif ( is_array( $sidebars_widgets ) && !empty( $sidebars_widgets[ $context ] ) ) {\n\t\t\t$count = count( $sidebars_widgets[ $context ] );\n\t\t\tif ( 1 === $count )\n\t\t\t\t$attr['class'] .= ' sidebar-col-1';\n\t\t\telseif ( !( $count % 3 ) || $count % 2 )\n\t\t\t\t$attr['class'] .= ' sidebar-col-3';\n\t\t\telseif ( !( $count % 2 ) )\n\t\t\t\t$attr['class'] .= ' sidebar-col-2';\n\t\t}\n\t}\n\treturn $attr;\n}", "function audiotheme_widget_count_class( $params ) {\n\t$class = '';\n\t$sidebar_widgets = wp_get_sidebars_widgets();\n\t$order = array_search( $params[0]['widget_id'], $sidebar_widgets[ $params[0]['id'] ] ) + 1;\n\tif ( $order == count( $sidebar_widgets[ $params[0]['id'] ] ) ) {\n\t\t$class = ' widget-last';\n\t}\n\n\t$params[0]['before_widget'] = preg_replace( '/class=\"(.*?)\"/i', 'class=\"$1 widget-' . $order . $class . '\"', $params[0]['before_widget'] );\n\n\treturn $params;\n}", "function pipdig_extra_col_class() {\r\n\t$count = 0;\r\n\r\n\tif ( is_active_sidebar( 'sidebar-2' ) )\r\n\t\t$count++;\r\n\r\n\tif ( is_active_sidebar( 'sidebar-3' ) )\r\n\t\t$count++;\r\n\r\n\tif ( is_active_sidebar( 'sidebar-4' ) )\r\n\t\t$count++;\r\n\r\n\tif ( is_active_sidebar( 'sidebar-5' ) )\r\n\t\t$count++;\r\n\r\n\t$class = '';\r\n\t\r\n\tif (get_theme_mod('disable_responsive')) {\r\n\t\t$sm = $md = 'xs';\r\n\t} else {\r\n\t\t$sm = 'sm';\r\n\t\t$md = 'md';\r\n\t}\r\n\r\n\tswitch ( $count ) {\r\n\t\tcase '1':\r\n\t\t\t$class = 'col-'.$sm.'-12 widget-area';\r\n\t\t\tbreak;\r\n\t\tcase '2':\r\n\t\t\t$class = 'col-'.$sm.'-6 widget-area';\r\n\t\t\tbreak;\r\n\t\tcase '3':\r\n\t\t\t$class = 'col-'.$sm.'-4 widget-area';\r\n\t\t\tbreak;\r\n\t\tcase '4':\r\n\t\t\t$class = 'col-'.$sm.'-3 widget-area';\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif ( $class )\r\n\t\techo 'class=\"' . $class . '\"';\r\n}", "function understrap_slbd_count_widgets( $sidebar_id ) {\n\n\t\t_deprecated_function( 'understrap_slbd_count_widgets', '0.8.9', 'understrap_widget_classes' );\n\n\t\t// If loading from front page, consult $_wp_sidebars_widgets rather than options\n\t\t// to see if wp_convert_widget_settings() has made manipulations in memory.\n\t\tglobal $_wp_sidebars_widgets;\n\t\tif ( empty( $_wp_sidebars_widgets ) ) :\n\t\t\t$_wp_sidebars_widgets = get_option( 'sidebars_widgets', array() ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited\n\t\tendif;\n\t\t$sidebars_widgets_count = $_wp_sidebars_widgets;\n\t\tif ( isset( $sidebars_widgets_count[ $sidebar_id ] ) ) :\n\t\t\t$widget_count = count( $sidebars_widgets_count[ $sidebar_id ] );\n\t\t\t$widget_classes = 'widget-count-' . count( $sidebars_widgets_count[ $sidebar_id ] );\n\t\t\tif ( 0 == $widget_count % 4 || $widget_count > 6 ) : // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison\n\t\t\t\t// Four widgets per row if there are exactly four or more than six.\n\t\t\t\t$widget_classes .= ' col-md-3';\n\t\t\telseif ( 6 == $widget_count ) : // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison\n\t\t\t\t// If two widgets are published.\n\t\t\t\t$widget_classes .= ' col-md-2';\n\t\t\telseif ( $widget_count >= 3 ) :\n\t\t\t\t// Three widgets per row if there's three or more widgets.\n\t\t\t\t$widget_classes .= ' col-md-4';\n\t\t\telseif ( 2 == $widget_count ) : // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison\n\t\t\t\t// If two widgets are published.\n\t\t\t\t$widget_classes .= ' col-md-6';\n\t\t\telseif ( 1 == $widget_count ) : // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison\n\t\t\t\t// If just on widget is active.\n\t\t\t\t$widget_classes .= ' col-md-12';\n\t\t\tendif;\n\t\t\treturn $widget_classes;\n\t\tendif;\n\t}", "function sukelius_widget_classes( $params ) {\r\n\r\n\tglobal $my_widget_num; // Global a counter array\r\n\t$this_id = $params[0]['id']; // Get the id for the current sidebar we're processing\r\n\t$arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets\r\n\r\n\tif ( !$my_widget_num ) { // If the counter array doesn't exist, create it\r\n\t\t$my_widget_num = array();\r\n\t}\r\n\r\n\tif ( !isset( $arr_registered_widgets[$this_id] ) || !is_array( $arr_registered_widgets[$this_id] ) ) { // Check if the current sidebar has no widgets\r\n\t\treturn $params; // No widgets in this sidebar... bail early.\r\n\t}\r\n\r\n\tif ( isset($my_widget_num[$this_id] ) ) { // See if the counter array has an entry for this sidebar\r\n\t\t$my_widget_num[$this_id] ++;\r\n\t} else { // If not, create it starting with 1\r\n\t\t$my_widget_num[$this_id] = 1;\r\n\t}\r\n\r\n\t$class = 'class=\"widget-' . $my_widget_num[$this_id] . ' '; // Add a widget number class for additional styling options\r\n\r\n\tif ( $my_widget_num[$this_id] == 1 ) { // If this is the first widget\r\n\t\t$class .= 'widget-first ';\r\n\t} elseif( $my_widget_num[$this_id] == count( $arr_registered_widgets[$this_id] ) ) { // If this is the last widget\r\n\t\t$class .= 'widget-last ';\r\n\t}\r\n\r\n\t$params[0]['before_widget'] = str_replace( 'class=\"', $class, $params[0]['before_widget'] ); // Insert our new classes into \"before widget\"\r\n\r\n\treturn $params;\r\n\r\n}", "function widget_first_last_classes($params) {\r\n\r\n\tglobal $my_widget_num; // Global a counter array\r\n\t$this_id = $params[0]['id']; // Get the id for the current sidebar we're processing\r\n\t$arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets\r\n\r\n\tif(!$my_widget_num) {// If the counter array doesn't exist, create it\r\n\t\t$my_widget_num = array();\r\n\t}\r\n\r\n\tif(!isset($arr_registered_widgets[$this_id]) || !is_array($arr_registered_widgets[$this_id])) { // Check if the current sidebar has no widgets\r\n\t\treturn $params; // No widgets in this sidebar... bail early.\r\n\t}\r\n\r\n\tif(isset($my_widget_num[$this_id])) { // See if the counter array has an entry for this sidebar\r\n\t\t$my_widget_num[$this_id] ++;\r\n\t} else { // If not, create it starting with 1\r\n\t\t$my_widget_num[$this_id] = 1;\r\n\t}\r\n\r\n\t$class = 'class=\"widget-' . $my_widget_num[$this_id] . ' '; // Add a widget number class for additional styling options\r\n\r\n\tif($my_widget_num[$this_id] == 1) { // If this is the first widget\r\n\t\t$class .= 'widget-first ';\r\n\t} elseif($my_widget_num[$this_id] == count($arr_registered_widgets[$this_id])) { // If this is the last widget\r\n\t\t$class .= 'widget-last ';\r\n\t}\r\n\r\n\t$params[0]['before_widget'] = str_replace('class=\"', $class, $params[0]['before_widget']); // Insert our new classes into \"before widget\"\r\n\r\n\treturn $params;\r\n\r\n}", "function add_sidebar_class( $classes ) {\n global $post;\n if (is_singular('cpt_speakers') || is_singular('cpt_topics' )) {\n // show adv. #1\n $classes[] = \"sidebar-primary\";\n return $classes;\n} else {\n // show adv. #2\n $classes[] = '';\n return $classes;\n}\n}", "function _rj_widget_first_last_classes($params) {\n\n\tglobal $my_widget_num; // Global a counter array\n\t$this_id = $params[0]['id']; // Get the id for the current sidebar we're processing\n\t$arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets\n\n\tif(!$my_widget_num) {// If the counter array doesn't exist, create it\n\t\t$my_widget_num = array();\n\t}\n\n\tif(!isset($arr_registered_widgets[$this_id]) || !is_array($arr_registered_widgets[$this_id])) { // Check if the current sidebar has no widgets\n\t\treturn $params; // No widgets in this sidebar... bail early.\n\t}\n\n\tif(isset($my_widget_num[$this_id])) { // See if the counter array has an entry for this sidebar\n\t\t$my_widget_num[$this_id] ++;\n\t}\n\telse { // If not, create it starting with 1\n\t\t$my_widget_num[$this_id] = 1;\n\t}\n\n\t$class = 'class=\"widget-' . $my_widget_num[$this_id] . ' '; // Add a widget number class for additional styling options\n\n\tif($my_widget_num[$this_id] == 1) { // If this is the first widget\n\t\t$class .= 'first-widget ';\n\t}\n\telseif($my_widget_num[$this_id] == count($arr_registered_widgets[$this_id])) { // If this is the last widget\n\t\t$class .= 'last-widget ';\n\t}\n\n\t$params[0]['before_widget'] = str_replace('class=\"', $class, $params[0]['before_widget']); // Insert our new classes into \"before widget\"\n\n\treturn $params;\n\n}", "function jcg_main_container_class() {\n $mainClass = 'm-100 t-100 d-80 ld-70 cf';\n if ( ! is_active_sidebar('main-sidebar') ) {\n $mainClass .= ' no-sidebar';\n }\n echo $mainClass;\n}", "function eino_subsidiary_classes( $classes ) {\n \n\tif ( is_active_sidebar( 'subsidiary' ) ) {\n\t\t\n\t\t$the_sidebars = wp_get_sidebars_widgets();\n\t\t$num = count( $the_sidebars['subsidiary'] );\n\t\t$classes[] = 'sidebar-subsidiary-' . $num;\n\t\t\n }\n \n return $classes;\n\t\n}", "function accesspress_mag_sidebar_layout_class($classes){\r\n global $post;\r\n \tif( is_404() ) {\r\n \t$classes[] = ' ';\r\n \t} elseif( is_singular() ) {\r\n \t $global_sidebar= of_get_option( 'global_post_sidebar', 'right-sidebar' );\r\n \t$post_sidebar = get_post_meta( $post -> ID, 'accesspress_mag_sidebar_layout', true );\r\n $page_sidebar = get_post_meta( $post -> ID, 'accesspress_mag_page_sidebar_layout', true );\r\n if( 'post' == get_post_type() ) {\r\n if( $post_sidebar == 'global-sidebar' || empty( $post_sidebar ) ){\r\n $post_class = $global_sidebar;\r\n } else {\r\n $post_class = $post_sidebar;\r\n }\r\n \t$classes[] = 'single-post-'.$post_class;\r\n } else {\r\n $classes[] = 'page-'.$page_sidebar;\r\n }\r\n \t} elseif( is_archive() ) {\r\n \t if( is_category() ) {\r\n \t $cat_id = get_query_var( 'cat' );\r\n $global_sidebar = of_get_option( 'global_archive_sidebar', 'right-sidebar' );\r\n $category_sidebar = of_get_option( $cat_id.'_cat_sidebar', 'global-sidebar' );\r\n if( $category_sidebar == 'global-sidebar' ){\r\n $sidebar_option = $global_sidebar;\r\n } else {\r\n $sidebar_option = $category_sidebar;\r\n }\r\n $classes[] = 'archive-'.$sidebar_option;\r\n \t } else {\r\n \t $archive_sidebar = of_get_option( 'global_archive_sidebar', 'right-sidebar' );\r\n $classes[] = 'archive-'.$archive_sidebar;\r\n \t }\r\n } elseif( is_search() ) {\r\n $archive_sidebar = of_get_option( 'global_archive_sidebar', 'right-sidebar' );\r\n $classes[] = 'archive-'.$archive_sidebar;\r\n }else{\r\n \t$classes[] = 'page-right-sidebar';\r\n \t}\r\n \treturn $classes;\r\n }", "function ccp_lib_wp_main_classes() {\n\tif (! is_active_sidebar('sidebar-left') && ! is_active_sidebar('sidebar-right')) { // no columns\n\t\techo \"col-md-12\";\n\t} else if (! is_active_sidebar('sidebar-right')) { // only left\n\t\techo \"col-md-8\";\n\t} else if (! is_active_sidebar('sidebar-left')) { // only right\n\t\techo \"col-md-8\";\n\t} else { // both columns\n\t\techo \"col-md-6\";\n\t}\n}", "function succulents_qodef_get_blog_single_holder_classes($classes) {\n $sidebar_classes = array();\n $sidebar_classes[] = 'qodef-bs-grid-holder';\n $sidebar_classes[] = 'qodef-grid-large-gutter';\n\t\n\t $classes = $classes . ' ' . implode(' ', $sidebar_classes);\n\t \n return $classes;\n }", "function uwmadison_widgets_classes($params) {\n\t\tglobal $widget_classes;\n\n\t\tif ( $params[0]['name'] == \"Main Sidebar\" ) {\n\t\t\t$before_widget_string = $params[0]['before_widget'];\n\t\t\t$params[0]['before_widget'] = str_replace('class=\"', 'class=\"uw-content-box ' . $widget_classes[$params[0]['widget_id']], $before_widget_string);\n\t\t}\n\n\t\treturn $params;\n\t}", "function sukelius_additional_body_classes( $classes ) {\r\n \r\n /* Add class sidebar-subsidiary-$num to body ($num is number of active widgets in subsidiary sidebar) */\r\n if ( is_active_sidebar( 'subsidiary' ) ) {\r\n $the_sidebars = wp_get_sidebars_widgets();\r\n $num = count( $the_sidebars['subsidiary'] );\r\n $classes[] = 'sidebar-subsidiary-'.$num;\r\n }\r\n \r\n /* Fixing long titles with active sidebar header */\r\n if ( is_active_sidebar( 'header' ) )\r\n $classes[] = 'sidebar-header-active'; \r\n \r\n if ( !has_nav_menu( 'secondary' ) ) \r\n $classes[] = 'no-sec-menu';\r\n \r\n /* Add has-icons class if any of social profiles are active */\r\n $twitter = hybrid_get_setting( 'sukelius_input_twitter' );\r\n $facebook = hybrid_get_setting( 'sukelius_input_facebook' );\r\n $pinterest = hybrid_get_setting( 'sukelius_input_pinterest' );\r\n $rss = hybrid_get_setting( 'sukelius_input_rss' );\r\n \r\n if ( $twitter || $facebook || $pinterest || $rss ) {\r\n $classes[] = 'has-icons';\r\n }\r\n \r\n return $classes;\r\n \r\n}", "function country_inn_site_footer_widget_action() { \n\t\tif (is_active_sidebar('footer-1') || is_active_sidebar('footer-2') || is_active_sidebar('footer-3') || is_active_sidebar('footer-4'))\n { \n\t $count = 0;\n\t for ( $i = 1; $i <= 4; $i++ )\n\t {\n\t if ( is_active_sidebar( 'footer-' . $i ) )\n\t {\n\t $count++;\n\t }\n\t }\n\t $column=3;\n\t if( $count == 4 ) \n\t {\n\t $column = 3; \n\t \n\t }\n\t elseif( $count == 3)\n\t {\n\t $column=4;\n\t }\n\t elseif( $count == 2) \n\t {\n\t $column = 6;\n\t }\n\t elseif( $count == 1) \n\t {\n\t $column = 12;\n\t }\n\t ?> \n\t\t\n\n <div class=\"footer dark-bg sec-pad\">\n\n <div class=\"container\"> \n\n <div class=\"row\">\n <?php\n for ( $i = 1; $i <= 4 ; $i++ )\n {\n if ( is_active_sidebar( 'footer-' . $i ) )\n { \n ?>\n\n <div class=\"col-md-<?php echo absint( $column ); ?>\">\n <div class=\"footer-widget\">\n <?php dynamic_sidebar('footer-' . $i); ?>\n </div>\n </div>\n <?php }\n\n }\n ?> \n </div><!-- /.row -->\n </div><!-- /.container -->\n </div>\n <!-- Footer Top End --> \n\t<?php \n }\n }", "function sp_blog_page_bottom_widget() {\n\t\n\techo '<aside id=\"sidebar-page-bottom\" class=\"sidebar hidden-print\">';\n\techo '<div class=\"widget-wrapper container\">';\n\n\t/////////////////////////////////////////////////////\n\t// custom blog category widgets\n\t/////////////////////////////////////////////////////\n\t// check if custom blog widget is set and is an array\n\tif ( sp_get_option( 'custom_blog_category_widget', 'isset' ) && is_array( sp_get_option( 'custom_blog_category_widget' ) ) ) {\n\t\t// get the category ids\n\t\t$cat_ids = sp_get_option( 'custom_blog_category_widget' );\n\t\t\n\t\t// loop through the ids and output each widget\n\t\tforeach( $cat_ids as $cat ) {\n\t\t\t// checks if current post category matches the saved settings\n\t\t\tif ( isset( get_queried_object()->term_id ) && get_queried_object()->term_id === (int)$cat ) {\n\t\t\t\tdynamic_sidebar( 'page-bottom-blog-category-' . $cat );\t\n\t\t\t}\n\t\t}\n\t}\n\n\techo '</div>' . PHP_EOL;\n\techo '</aside>' . PHP_EOL;\n}", "function kvell_edge_get_blog_single_holder_classes($classes) {\n $sidebar_classes = array();\n $sidebar_classes[] = 'edgtf-grid-large-gutter';\n\t\n\t $classes = $classes . ' ' . implode(' ', $sidebar_classes);\n\t \n return $classes;\n }", "function grve_sidebar_class() {\n\n\tif( is_search() ) {\n\t\treturn '';\n\t}\n\n\t$grve_sidebar_class = \"\";\n\t$grve_sidebar_extra_content = false;\n\n\tif ( is_singular( 'post' ) ) {\n\t\t$grve_sidebar_id = grve_post_meta( 'grve_post_sidebar', grve_option( 'post_sidebar' ) );\n\t\t$grve_sidebar_layout = grve_post_meta( 'grve_post_layout', grve_option( 'post_layout', 'none' ) );\n\t} else if ( is_singular( 'page' ) ) {\n\t\t$grve_sidebar_id = grve_post_meta( 'grve_page_sidebar', grve_option( 'page_sidebar' ) );\n\t\t$grve_sidebar_layout = grve_post_meta( 'grve_page_layout', grve_option( 'page_layout', 'none' ) );\n\t} else if ( is_singular( 'portfolio' ) ) {\n\t\t$grve_sidebar_id = grve_post_meta( 'grve_portfolio_sidebar', grve_option( 'portfolio_sidebar' ) );\n\t\t$grve_sidebar_layout = grve_post_meta( 'grve_portfolio_layout', grve_option( 'portfolio_layout', 'none' ) );\n\t\t$grve_sidebar_extra_content = grve_check_portfolio_details();\n\t\tif( $grve_sidebar_extra_content && 'none' == $grve_sidebar_layout ) {\n\t\t\t$grve_sidebar_layout = 'right';\n\t\t}\t\n\t}else {\n\t\tif ( grve_woocommerce_enabled() ) {\n\t\t\tif( is_product() ) {\n\t\t\t\t$grve_sidebar_id = grve_post_meta( 'grve_product_sidebar', 'grve-woocommerce-sidebar-product' );\n\t\t\t\t$grve_sidebar_layout = grve_post_meta( 'grve_product_layout', 'right' );\n\t\t\t} else if ( is_shop() || is_product_category() || is_product_tag() ) {\n\t\t\t\t$grve_sidebar_id = grve_post_meta_shop( 'grve_page_sidebar', 'grve-woocommerce-sidebar-shop' );\n\t\t\t\t$grve_sidebar_layout = grve_post_meta_shop( 'grve_page_layout', 'right' );\n\t\t\t} else {\n\t\t\t\t$grve_sidebar_id = grve_option( 'blog_sidebar' );\n\t\t\t\t$grve_sidebar_layout = grve_option( 'blog_layout', 'none' );\n\t\t\t}\n\t\t} else {\n\t\t\t$grve_sidebar_id = grve_option( 'blog_sidebar' );\n\t\t\t$grve_sidebar_layout = grve_option( 'blog_layout', 'none' );\n\t\t}\n\t}\n\n\tif ( 'none' != $grve_sidebar_layout && ( is_active_sidebar( $grve_sidebar_id ) || $grve_sidebar_extra_content ) ) {\n\n\t\tif ( 'right' == $grve_sidebar_layout ) {\n\t\t\t$grve_sidebar_class = 'grve-right-sidebar';\n\t\t} else if ( 'left' == $grve_sidebar_layout ) {\n\t\t\t$grve_sidebar_class = 'grve-left-sidebar';\n\t\t}\n\t}\n\n\treturn $grve_sidebar_class;\n\n}", "private function get_number_of_active_widgets() {\n\n\t\t$count = 0;\n\n\t\tfor ( $i = 1; $i <= $this->max_widgets; $i++ ) {\n\t\t\tif ( is_active_sidebar( 'footer-' . $i ) ) {\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\treturn $count;\n\n\t}", "function eino_front_page_classes( $classes ) {\n\t\n\tif ( is_active_sidebar( 'front-page' ) && ( is_page_template( 'page-templates/front-page.php' ) || is_page_template( 'page-templates/portfolio-page.php') || is_page_template( 'page-templates/slider.php' ) || is_page_template( 'page-templates/download-page.php' ) ) ) {\n\t\t\n\t\t$the_sidebars = wp_get_sidebars_widgets();\n\t\t$num = count( $the_sidebars['front-page'] );\n\t\t$classes[] = 'sidebar-front-page-' . $num;\n\t\t\n }\n \n return $classes;\n\t\n}", "function overlap_get_main_class( $sidebar_position ){\r\n\r\n if( empty($sidebar_position) ){\r\n $sidebar_position = overlap_get_sidebar_position();\r\n }\r\n\r\n $classes = array();\r\n $classes[] = 'w-main';\r\n if( $sidebar_position == '1' ){\r\n $classes[] = 'col-12';\r\n }else{\r\n $classes[] = 'col-9';\r\n }\r\n\r\n return apply_filters('overlap_get_main_class', implode(' ', $classes) ); \r\n}", "function wpg_body_class($class) {\n\t\n\t$class[] = 'hfeed site';\n\t\n\t// Active sidebar - 2 column (content)\n\tif (is_active_sidebar( 'wpg-sidebar-right' ) ) {\n\t\t$class[] = 'active-sidebar';\n\t}\n\treturn $class;\n}", "function refined_magazine_footer_widget()\r\n {\r\n //Check if there are widgets on any footer sidebar\r\n if (is_active_sidebar('footer-1') || is_active_sidebar('footer-2') || is_active_sidebar('footer-3')) {\r\n ?>\r\n\r\n <div class=\"top-footer\">\r\n <div class=\"container-inner clearfix\">\r\n <?php\r\n $count = 0;\r\n for ($i = 1; $i <= 3; $i++) {\r\n if (is_active_sidebar('footer-' . $i)) {\r\n $count++;\r\n }\r\n }\r\n $column = $count;\r\n $column_class = 'widget-column footer-active-' . absint($count);\r\n for ($i = 1; $i <= 4; $i++) {\r\n if (is_active_sidebar('footer-' . $i)) {\r\n ?>\r\n <div class=\"ct-col-<?php echo esc_attr($column); ?>\">\r\n <?php dynamic_sidebar('footer-' . $i); ?>\r\n </div>\r\n <?php\r\n }\r\n }\r\n\r\n ?>\r\n </div> <!-- .container-inner -->\r\n </div> <!-- .top-footer -->\r\n <?php\r\n }\r\n }", "function sp_site_bottom_widget() {\n\tglobal $post;\n\n\tif ( ! is_object( $post ) )\n\t\treturn;\n\t\n\techo '<aside id=\"sidebar-site-bottom\" class=\"sidebar hidden-print\">';\n\techo '<div class=\"widget-wrapper container\">';\n\n\t/////////////////////////////////////////////////////\n\t// custom page widgets\n\t/////////////////////////////////////////////////////\n\t// check if custom page widget is set and is an array\n\tif ( sp_get_option( 'custom_page_widget', 'isset' ) && is_array( sp_get_option( 'custom_page_widget' ) ) ) {\n\t\t// get the page ids\n\t\t$page_ids = sp_get_option( 'custom_page_widget' ); // array\n\t\t\n\t\t// loop through the ids and output each custom widget\n\t\tforeach( $page_ids as $page ) {\n\t\t\t// continue if the page id matches the page id set\n\t\t\tif ( $post->ID == $page )\n\t\t\t\tdynamic_sidebar( 'site-bottom-page-' . $page );\t\n\t\t}\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom blog category widgets\n\t/////////////////////////////////////////////////////\n\t// check if custom blog widget is set and is an array\n\tif ( sp_get_option( 'custom_blog_category_widget', 'isset' ) && is_array( sp_get_option( 'custom_blog_category_widget' ) ) ) {\n\t\t// get the category ids\n\t\t$cat_ids = sp_get_option( 'custom_blog_category_widget' );\n\t\t\n\t\t// loop through the ids and output each widget\n\t\tforeach( $cat_ids as $cat ) {\n\t\t\t// checks if current post category matches the saved settings\n\t\t\tif ( isset( get_queried_object()->term_id ) && get_queried_object()->term_id === (int)$cat ) {\n\t\t\t\tdynamic_sidebar( 'site-bottom-blog-category-' . $cat );\t\n\t\t\t}\n\t\t}\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom WOO category widgets\n\t/////////////////////////////////////////////////////\t\t\n\t// check if WOO is active\n\tif ( sp_woo_exists() ) {\n\t\tif ( sp_get_option( 'custom_product_category_widget', 'isset' ) && is_array( sp_get_option( 'custom_product_category_widget' ) ) ) {\n\n\t\t\t// get the product category ids\n\t\t\t$cat_ids = sp_get_option( 'custom_product_category_widget' );\n\n\t\t\t// loop through the ids and output each widget\n\t\t\tforeach( $cat_ids as $cat ) {\n\t\t\t\tif ( isset( get_queried_object()->term_id ) && get_queried_object()->term_id === (int)$cat ) {\n\t\t\t\t\tdynamic_sidebar( 'site-bottom-product-category-' . $cat );\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\techo '</div>' . PHP_EOL;\n\techo '</aside>' . PHP_EOL;\n}", "function sp_page_bottom_widget() {\n\tglobal $post;\n\n\tif ( ! is_object( $post ) )\n\t\treturn;\n\t\n\techo '<aside id=\"sidebar-page-bottom\" class=\"sidebar hidden-print\">';\n\techo '<div class=\"widget-wrapper container\">';\n\n\t/////////////////////////////////////////////////////\n\t// custom page widgets\n\t/////////////////////////////////////////////////////\n\t// check if custom page widget is set and is an array\n\tif ( sp_get_option( 'custom_page_widget', 'isset' ) && is_array( sp_get_option( 'custom_page_widget' ) ) ) {\n\t\t// get the page ids\n\t\t$page_ids = sp_get_option( 'custom_page_widget' ); // array\n\t\t\n\t\t// loop through the ids and output each custom widget\n\t\tforeach( $page_ids as $page ) {\n\t\t\t// continue if the page id matches the page id set\n\t\t\tif ( $post->ID == $page )\n\t\t\t\tdynamic_sidebar( 'page-bottom-page-' . $page );\t\n\t\t}\n\t}\n\n\techo '</div>' . PHP_EOL;\n\techo '</aside>' . PHP_EOL;\n}", "function nicholls_home_widget_sidebar() {\r\n\tfnbx_generate_widgets( 'Home Special' );\r\n}", "function widget_area_class( $id ) {\n\n\t$count = count_widgets( $id );\n\n\t$class = '';\n\n\tif ( $count == 1 ) {\n\t\t$class .= ' widget-full';\n\t} elseif ( $count % 3 == 1 ) {\n\t\t$class .= ' widget-thirds';\n\t} elseif ( $count % 4 == 1 ) {\n\t\t$class .= ' widget-fourths';\n\t} elseif ( $count % 2 == 0 ) {\n\t\t$class .= ' widget-halves uneven';\n\t} else {\n\t\t$class .= ' widget-halves';\n\t}\n\n\treturn $class;\n\n}", "function sidebar_widget_init() {\n\tregister_sidebar(array('name' => __( 'Default Sidebar', ktz_theme_textdomain ),'id' => 'sidebar_default','description' => 'sidebar','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n\tif (class_exists('bbPress')):\n\tregister_sidebar(array('name' => __( 'BBPress Sidebar', ktz_theme_textdomain ),'id' => 'sidebar_forum','description' => 'sidebar','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n\tendif;\n register_sidebar(array('name' => __( 'Footer 1', ktz_theme_textdomain ),'id' => 'widget_fot1','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n register_sidebar(array('name' => __( 'Footer 2', ktz_theme_textdomain ),'id' => 'widget_fot2','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n register_sidebar(array('name' => __( 'Footer 3', ktz_theme_textdomain ),'id' => 'widget_fot3','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n register_sidebar(array('name' => __( 'Footer 4', ktz_theme_textdomain ),'id' => 'widget_fot4','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n register_sidebar(array('name' => __( 'Footer 5', ktz_theme_textdomain ),'id' => 'widget_fot5','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n register_sidebar(array('name' => __( 'Footer 6', ktz_theme_textdomain ),'id' => 'widget_fot6','before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">','after_widget' => '</aside>','before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">','after_title' => '</span></h4>', ));\n\t/* Register new sidebar via admin panel and display in post single or page */\n\t$sidebars_new = ot_get_option( 'ktz_sidebars', array() );\n\n if ($sidebars_new){\n foreach ($sidebars_new as $sidebar_new) {\n register_sidebar(array(\n 'name' => $sidebar_new[\"title\"],\n 'id' => $sidebar_new[\"slug\"],\n 'description' => 'Kentooz custom sidebars.',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h4 class=\"widget-title\"><span class=\"ktz-blocktitle\">',\n 'after_title' => '</span></h4>',\n ));\n }\n }\n}", "function parallax_hook_sidebar_bottom() {\n \tdo_action( 'parallax_sidebar_bottom' );\n \tdo_action( 'tha_sidebar_bottom' );\n }", "function biagiotti_mikado_register_sticky_sidebar_widget( $widgets ) {\n\t\t$widgets[] = 'BiagiottiMikadoClassStickySidebar';\n\t\t\n\t\treturn $widgets;\n\t}", "function enable_widgetized_sidebar()\n{\n if ( function_exists('register_sidebar') ) {\n register_sidebar(array('name'=>'sidebar_top',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n ));\n\t register_sidebar(array('name'=>'sidebar1',\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n\t ));\t\n\t register_sidebar(array('name'=>'sidebar2',\t\t\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n\t ));\n\t register_sidebar(array('name'=>'sidebar3',\t\t\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n\t ));\n\t register_sidebar(array('name'=>'sidebar4',\t\t\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n\t ));\n\t register_sidebar(array('name'=>'sidebar5',\t\t\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n\t ));\n\t register_sidebar(array('name'=>'sidebar6',\t\t\n\t\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t 'after_widget' => '</div>',\n\t\t 'before_title' => '<h3>',\n\t\t 'after_title' => '</h3>',\n\t ));\n }\n}", "function bpxl_widgets_init() {\n\tregister_sidebar(array(\n\t\t'name' => __( 'Primary Sidebar', 'bloompixel' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Main sidebar of the theme.', 'bloompixel' ),\n\t\t'before_widget' => '<div class=\"widget sidebar-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title uppercase\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => __( 'Secondary Sidebar', 'bloompixel' ),\n\t\t'id' => 'sidebar-2',\n\t\t'description' => __( 'Only displayed when 3 column layout is enabled.', 'bloompixel' ),\n\t\t'before_widget' => '<div class=\"widget sidebar-widget sidebar-small-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title uppercase\">',\n\t\t'after_title' => '</h3>',\n\t));\n\t$sidebars = array(1, 2, 3, 4);\n\tforeach($sidebars as $number) {\n\tregister_sidebar(array(\n\t\t'name' => __( 'Footer', 'bloompixel' ) . ' ' . $number,\n\t\t'id' => 'footer-' . $number,\n\t\t'description' => __( 'This widget area appears on footer of theme.', 'bloompixel' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title uppercase\">',\n\t\t'after_title' => '</h3>'\n\t));\n\t}\n}", "function m3_home_genesis_meta() {\r\n\r\n\tif ( is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-right' ) ) {\r\n\t\r\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\r\n\t\tadd_action( 'genesis_loop', 'm3_home_loop_helper' );\r\n\r\n\t\tadd_filter( 'body_class', 'add_body_class' );\r\n\t\t\tfunction add_body_class( $classes ) {\r\n \t\t\t$classes[] = 'news';\r\n \t\t\t return $classes;\r\n\t\t}\r\n\r\n\t\tadd_action( 'genesis_loop', 'child_grid_loop_helper' );\r\n\r\n\t}\r\n}", "function gsplit_body_class( $classes ) {\n $classes[] = 'content-sidebar content-split-sidebar';\n return $classes;\n}", "function shuttle_sidebar_css($classes) {\r\n\r\n// Get theme options values.\r\n$shuttle_homepage_layout = shuttle_var ( 'shuttle_homepage_layout' );\r\n$shuttle_general_layout = shuttle_var ( 'shuttle_general_layout' );\r\n$shuttle_blog_layout = shuttle_var ( 'shuttle_blog_layout' );\r\n$shuttle_post_layout = shuttle_var ( 'shuttle_post_layout' );\r\n\r\n\t$class_sidebar = NULL;\r\n\r\n\tif ( is_front_page() ) {\r\n\t\tif ( $shuttle_homepage_layout == \"option1\" or empty( $shuttle_homepage_layout ) ) {\t\t\r\n\t\t\t$class_sidebar = '';\r\n\t\t} else if ( $shuttle_homepage_layout == \"option2\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-left';\r\n\t\t} else if ( $shuttle_homepage_layout == \"option3\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-right';\r\n\t\t}\r\n\t} else if ( is_page() and ! is_page_template( 'template-blog.php' ) ) {\t\r\n\t\tif ( $shuttle_general_layout == \"option1\" or empty( $shuttle_general_layout ) ) {\t\t\r\n\t\t\t$class_sidebar = '';\r\n\t\t} else if ( $shuttle_general_layout == \"option2\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-left';\r\n\t\t} else if ( $shuttle_general_layout == \"option3\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-right';\r\n\t\t}\r\n\t} else if ( shuttle_check_isblog() and ! is_single() ) {\r\n\t\tif ( $shuttle_blog_layout == \"option1\" or empty( $shuttle_blog_layout ) ) {\t\t\r\n\t\t\t$class_sidebar = '';\r\n\t\t} else if ( $shuttle_blog_layout == \"option2\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-left';\r\n\t\t} else if ( $shuttle_blog_layout == \"option3\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-right';\r\n\t\t}\r\n\t} else if ( is_singular( 'post' ) ) {\r\n\t\tif ( $shuttle_post_layout == \"option1\" or empty( $shuttle_post_layout ) ) {\t\t\r\n\t\t\t$class_sidebar = '';\r\n\t\t} else if ( $shuttle_post_layout == \"option2\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-left';\r\n\t\t} else if ( $shuttle_post_layout == \"option3\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-right';\r\n\t\t} else {\r\n\t\t\t$class_sidebar = '';\r\n\t\t}\r\n\t} else if ( is_search() ) {\r\n\t\tif ( $shuttle_general_layout == \"option1\" or empty( $shuttle_general_layout ) ) {\t\t\r\n\t\t\t$class_sidebar = '';\r\n\t\t} else if ( $shuttle_general_layout == \"option2\" ) {\r\n\t\t\t$class_sidebar = 'layout-sidebar-left';\r\n\t\t} else if ($shuttle_general_layout == \"option3\") {\r\n\t\t\t$class_sidebar = 'layout-sidebar-right';\r\n\t\t}\r\n\t}\r\n\r\n\t// Output sidebar class\r\n\tif( ! empty( $class_sidebar ) ) {\r\n\t\t$classes[] = $class_sidebar;\r\n\t} else {\r\n\t\t$classes[] = 'layout-sidebar-none';\r\n\t}\r\n\treturn $classes;\r\n}", "function __register_sidebars(){\n\n // Register main sidebar \n // on the right side\n register_sidebar([\n 'name' => 'My Primary Sidebar',\n 'id' => 'primary-sidebar',\n 'class' => 'pm-sidebar',\n 'before_widget' => '<article>',\n 'after_widget' => '</article>'\n ]);\n\n // Register Sidebar on the bottom\n // left side..\n register_sidebar([\n 'name' => 'Bottom Left Sidebar',\n 'id' => 'bottom-left',\n 'class' => 'pm-bt-left',\n 'before_widget' => '<article>',\n 'after_widget' => '</article>'\n ]);\n\n // Register Sidebar on the bottom\n // left side..\n register_sidebar([\n 'name' => 'Bottom Right Sidebar',\n 'id' => 'bottom-right',\n 'class' => 'pm-bt-right',\n 'before_widget' => '<article>',\n 'after_widget' => '</article>'\n ]);\n\n}", "function superfood_elated_side_menu_body_class($classes) {\n\n\t\tif (is_active_widget( false, false, 'eltdf_side_area_opener' )) {\n\n\t\t\t$classes[] = 'eltdf-side-menu-slide-from-right';\n\n\t\t}\n\n\t\treturn $classes;\n }", "function unapp_widgets_init() {\r\n\tregister_sidebar(\r\n\t\tarray(\r\n\t\t\t'name' => esc_html__( 'Sidebar', 'unapp' ),\r\n\t\t\t'id' => 'sidebar-1',\r\n\t\t\t'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'unapp' ),\r\n\t\t\t'before_widget' => '<article id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</article>',\r\n\t\t\t'before_title' => '<h2 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h2>',\r\n\t\t)\r\n\t);\r\n\tregister_sidebar(\r\n\t\tarray(\r\n\t\t\t'name' => esc_html__( 'Footer One', 'unapp' ),\r\n\t\t\t'id' => 'footer-sidebar-1',\r\n\t\t\t'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'unapp' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h4>',\r\n\t\t)\r\n\t);\r\n\tregister_sidebar(\r\n\t\tarray(\r\n\t\t\t'name' => esc_html__( 'Footer Two', 'unapp' ),\r\n\t\t\t'id' => 'footer-sidebar-2',\r\n\t\t\t'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'unapp' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h4>',\r\n\t\t)\r\n\t);\r\n\tregister_sidebar(\r\n\t\tarray(\r\n\t\t\t'name' => esc_html__( 'Footer Three', 'unapp' ),\r\n\t\t\t'id' => 'footer-sidebar-3',\r\n\t\t\t'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'unapp' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h4>',\r\n\t\t)\r\n\t);\r\n\tregister_sidebar(\r\n\t\tarray(\r\n\t\t\t'name' => esc_html__( 'Footer Four', 'unapp' ),\r\n\t\t\t'id' => 'footer-sidebar-4',\r\n\t\t\t'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'unapp' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h4>',\r\n\t\t)\r\n\t);\r\n}", "function succulents_qodef_side_menu_body_class( $classes ) {\n\t\t\n\t\tif ( is_active_widget( false, false, 'qodef_side_area_opener' ) ) {\n\t\t\t\n\t\t\t$classes[] = 'qodef-side-menu-slide-from-right';\n\t\t}\n\t\t\n\t\treturn $classes;\n\t}", "function wpex_toggle_bar_classes() {\n\n\t// Add default classes\n\t$classes = array( 'clr' );\n\n\t// Add animation classes\n\tif ( $animation = wpex_get_mod( 'toggle_bar_animation', 'fade' ) ) {\n\t\t$classes[] = 'toggle-bar-'. $animation;\n\t}\n\n\t// Add visibility classes\n\tif ( $visibility = wpex_get_mod( 'toggle_bar_visibility', 'always-visible' ) ) {\n\t\t$classes[] = $visibility;\n\t}\n\n\t// Apply filters for child theming\n\t$classes = apply_filters( 'wpex_toggle_bar_active', $classes );\n\n\t// Turn classes into space seperated string\n\t$classes = implode( ' ', $classes );\n\n\t// Return classes\n\treturn $classes;\n\n}", "private function body_classes( $classes ) {\n\n\t\t$sidebar_1 = $this->sidebar_context( 1 );\n\t\t$sidebar_2 = $this->sidebar_context( 2 );\n\n\t\t$sidebar_1_original = $sidebar_1;\n\t\t$sidebar_2_original = $sidebar_2;\n\n\t\t$sidebar_1 = empty( $sidebar_1 ) ? 'None' : $sidebar_1;\n\t\t$sidebar_2 = empty( $sidebar_2 ) ? 'None' : $sidebar_2;\n\n\t\t$c_page_id = Avada()->fusion_library->get_page_id();\n\n\t\t$classes[] = 'fusion-body';\n\n\t\tif ( ! is_rtl() ) {\n\t\t\t$classes[] = 'ltr';\n\t\t}\n\n\t\tif ( is_page_template( 'blank.php' ) ) {\n\t\t\t$classes[] = 'fusion-blank-page';\n\t\t}\n\n\t\tif ( fusion_get_option( 'header_sticky' ) ) {\n\t\t\t$classes[] = 'fusion-sticky-header';\n\t\t}\n\t\tif ( ! fusion_get_option( 'header_sticky_tablet' ) ) {\n\t\t\t$classes[] = 'no-tablet-sticky-header';\n\t\t}\n\t\tif ( ! fusion_get_option( 'header_sticky_mobile' ) ) {\n\t\t\t$classes[] = 'no-mobile-sticky-header';\n\t\t}\n\t\tif ( ! Avada()->settings->get( 'mobile_slidingbar_widgets' ) ) {\n\t\t\t$classes[] = 'no-mobile-slidingbar';\n\t\t}\n\t\tif ( 'mobile' === fusion_get_option( 'status_totop' ) || 'off' === fusion_get_option( 'status_totop' ) ) {\n\t\t\t$classes[] = 'no-desktop-totop';\n\t\t}\n\t\tif ( false === strpos( fusion_get_option( 'status_totop' ), 'mobile' ) ) {\n\t\t\t$classes[] = 'no-mobile-totop';\n\t\t}\n\t\tif ( fusion_get_option( 'avada_rev_styles' ) ) {\n\t\t\t$classes[] = 'avada-has-rev-slider-styles';\n\t\t}\n\t\tif ( ! fusion_get_option( 'status_outline' ) ) {\n\t\t\t$classes[] = 'fusion-disable-outline';\n\t\t}\n\t\tif ( 'horizontal' === Avada()->settings->get( 'woocommerce_product_tab_design' ) && ( is_singular( 'product' ) || class_exists( 'Woocommerce' ) && ( is_account_page() || is_checkout() ) ) ) {\n\t\t\t$classes[] = 'woo-tabs-horizontal';\n\t\t}\n\n\t\t$classes[] = 'fusion-sub-menu-' . Avada()->settings->get( 'main_menu_sub_menu_animation' );\n\n\t\t$classes[] = 'mobile-logo-pos-' . strtolower( Avada()->settings->get( 'logo_alignment' ) );\n\n\t\t$classes[] = 'layout-' . strtolower( fusion_get_option( 'layout' ) ) . '-mode';\n\n\t\t$classes[] = 'avada-has-boxed-modal-shadow-' . fusion_get_option( 'boxed_modal_shadow' );\n\n\t\t$classes[] = 'layout-scroll-offset-' . Avada()->settings->get( 'scroll_offset' );\n\n\t\tif ( 0 === intval( fusion_get_option( 'margin_offset[top]' ) ) ) {\n\t\t\t$classes[] = 'avada-has-zero-margin-offset-top';\n\t\t}\n\n\t\tif ( is_array( $sidebar_1 ) && ! empty( $sidebar_1 ) && ( $sidebar_1[0] || '0' == $sidebar_1[0] ) && ! Avada_Helper::is_buddypress() && ! Fusion_Helper::is_bbpress() && ! is_page_template( '100-width.php' ) && ! is_page_template( 'blank.php' ) && ( ! class_exists( 'WooCommerce' ) || ( class_exists( 'WooCommerce' ) && ! is_cart() && ! is_checkout() && ! is_account_page() && ! ( get_option( 'woocommerce_thanks_page_id' ) && is_page( get_option( 'woocommerce_thanks_page_id' ) ) ) ) ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons\n\t\t\t$classes[] = 'has-sidebar';\n\t\t}\n\n\t\tif ( is_array( $sidebar_1 ) && $sidebar_1[0] && is_array( $sidebar_2 ) && $sidebar_2[0] && ! Avada_Helper::is_buddypress() && ! Fusion_Helper::is_bbpress() && ! is_page_template( '100-width.php' ) && ! is_page_template( 'blank.php' ) && ( ! class_exists( 'WooCommerce' ) || ( class_exists( 'WooCommerce' ) && ! is_cart() && ! is_checkout() && ! is_account_page() && ! ( get_option( 'woocommerce_thanks_page_id' ) && is_page( get_option( 'woocommerce_thanks_page_id' ) ) ) ) ) ) {\n\t\t\t$classes[] = 'double-sidebars';\n\t\t}\n\n\t\tif ( is_page_template( 'side-navigation.php' ) && 0 !== get_queried_object_id() ) {\n\t\t\t$classes[] = 'has-sidebar';\n\n\t\t\tif ( is_array( $sidebar_2 ) && $sidebar_2[0] ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( is_home() ) {\n\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t}\n\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( is_archive() && ( ! ( class_exists( 'BuddyPress' ) && Avada_Helper::is_buddypress() ) && ! ( class_exists( 'bbPress' ) && Fusion_Helper::is_bbpress() ) && ! ( class_exists( 'Tribe__Events__Main' ) && Fusion_Helper::is_events_archive( $c_page_id ) ) && ( class_exists( 'WooCommerce' ) && ! is_shop() ) || ! class_exists( 'WooCommerce' ) ) && ! is_tax( 'portfolio_category' ) && ! is_tax( 'portfolio_skills' ) && ! is_tax( 'portfolio_tags' ) && ! is_tax( 'product_cat' ) && ! is_tax( 'product_tag' ) ) {\n\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t}\n\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( is_tax( 'portfolio_category' ) || is_tax( 'portfolio_skills' ) || is_tax( 'portfolio_tags' ) ) {\n\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t}\n\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( function_exists( 'is_product_taxonomy' ) && is_product_taxonomy() ) {\n\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t}\n\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( is_search() ) {\n\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t}\n\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( ( Fusion_Helper::is_bbpress() || Avada_Helper::is_buddypress() ) && ! Fusion_Helper::bbp_is_forum_archive() && ! Fusion_Helper::bbp_is_topic_archive() && ! Avada_Helper::bbp_is_user_home() && ! Fusion_Helper::bbp_is_search() ) {\n\t\t\tif ( Avada()->settings->get( 'bbpress_global_sidebar' ) ) {\n\t\t\t\t$sidebar_1 = is_array( $sidebar_1 ) ? $sidebar_1[0] : $sidebar_1;\n\t\t\t\t$sidebar_1 = empty( $sidebar_1 ) ? 'None' : $sidebar_1;\n\t\t\t\t$sidebar_2 = is_array( $sidebar_2 ) ? $sidebar_2[0] : $sidebar_2;\n\t\t\t\t$sidebar_2 = empty( $sidebar_2 ) ? 'None' : $sidebar_2;\n\n\t\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t\t}\n\t\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( is_array( $sidebar_1 ) && $sidebar_1[0] ) {\n\t\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t\t}\n\t\t\t\tif ( is_array( $sidebar_1 ) && $sidebar_1[0] && is_array( $sidebar_2 ) && $sidebar_2[0] ) {\n\t\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ( Fusion_Helper::is_bbpress() || Avada_Helper::is_buddypress() ) && ( Fusion_Helper::bbp_is_forum_archive() || Fusion_Helper::bbp_is_topic_archive() || Avada_Helper::bbp_is_user_home() || Fusion_Helper::bbp_is_search() ) ) {\n\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t}\n\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t}\n\t\t}\n\n\t\tif ( class_exists( 'Tribe__Events__Main' ) && Fusion_Helper::is_events_archive( $c_page_id ) && ! is_tag() ) {\n\t\t\t$classes[] = 'tribe-filter-live';\n\n\t\t\tif ( '100-width.php' !== tribe_get_option( 'tribeEventsTemplate', 'default' ) ) {\n\t\t\t\tif ( 'None' !== $sidebar_1 ) {\n\t\t\t\t\t$classes[] = 'has-sidebar';\n\t\t\t\t}\n\t\t\t\tif ( 'None' !== $sidebar_1 && 'None' !== $sidebar_2 ) {\n\t\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$override = function_exists( 'Fusion_Template_Builder' ) ? Fusion_Template_Builder()->get_override( 'content' ) : false;\n\t\tif ( $override ) {\n\n\t\t\t$has_sidebar_key = array_search( 'has-sidebar', $classes );\n\t\t\t$has_double_sidebars_key = array_search( 'double-sidebars', $classes );\n\n\t\t\tif ( is_array( $sidebar_1_original ) && ! empty( $sidebar_1_original ) && $sidebar_1_original[0] ) {\n\t\t\t\t$classes[] = 'has-sidebar';\n\n\t\t\t\tif ( is_array( $sidebar_2_original ) && ! empty( $sidebar_2_original ) && $sidebar_2_original[0] ) {\n\t\t\t\t\t$classes[] = 'double-sidebars';\n\t\t\t\t} elseif ( $has_double_sidebars_key ) {\n\t\t\t\t\tunset( $classes[ $has_double_sidebars_key ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( $has_sidebar_key ) {\n\t\t\t\t\tunset( $classes[ $has_sidebar_key ] );\n\t\t\t\t}\n\t\t\t\tif ( $has_double_sidebars_key ) {\n\t\t\t\t\tunset( $classes[ $has_double_sidebars_key ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( 'no' !== fusion_get_page_option( 'display_header', $c_page_id ) ) {\n\t\t\tif ( 'left' === fusion_get_option( 'header_position' ) || 'right' === fusion_get_option( 'header_position' ) ) {\n\t\t\t\t$classes[] = 'side-header';\n\t\t\t} else {\n\t\t\t\t$classes[] = 'fusion-top-header';\n\t\t\t}\n\n\t\t\tif ( 'left' === fusion_get_option( 'header_position' ) ) {\n\t\t\t\t$classes[] = 'side-header-left';\n\t\t\t} elseif ( 'right' === fusion_get_option( 'header_position' ) ) {\n\t\t\t\t$classes[] = 'side-header-right';\n\t\t\t}\n\t\t\t$classes[] = 'menu-text-align-' . strtolower( Avada()->settings->get( 'menu_text_align' ) );\n\t\t} else {\n\t\t\t$classes[] = 'avada-has-header-hidden';\n\t\t}\n\n\t\tif ( class_exists( 'WooCommerce' ) ) {\n\t\t\t$classes[] = 'fusion-woo-product-design-' . Avada()->settings->get( 'woocommerce_product_box_design' );\n\n\t\t\t$classes[] = 'fusion-woo-shop-page-columns-' . fusion_get_option( 'woocommerce_shop_page_columns' );\n\t\t\t$classes[] = 'fusion-woo-related-columns-' . fusion_get_option( 'woocommerce_related_columns' );\n\t\t\t$classes[] = 'fusion-woo-archive-page-columns-' . fusion_get_option( 'woocommerce_archive_page_columns' );\n\n\t\t\tif ( Avada()->settings->get( 'woocommerce_equal_heights' ) ) {\n\t\t\t\t$classes[] = 'fusion-woocommerce-equal-heights';\n\t\t\t}\n\n\t\t\tif ( Avada()->settings->get( 'woocommerce_one_page_checkout' ) ) {\n\t\t\t\t$classes[] = 'avada-woo-one-page-checkout';\n\t\t\t}\n\n\t\t\tif ( fusion_get_option( 'disable_woo_gallery' ) ) {\n\t\t\t\t$classes[] = 'avada-has-woo-gallery-disabled';\n\t\t\t}\n\t\t}\n\n\t\tif ( function_exists( 'ubermenu_get_menu_instance_by_theme_location' ) && ubermenu_get_menu_instance_by_theme_location( 'main_navigation' ) ) {\n\t\t\t$classes[] = 'fusion-ubermenu-support';\n\t\t}\n\n\t\t$classes[] = 'mobile-menu-design-' . Avada()->settings->get( 'mobile_menu_design' );\n\n\t\t$classes[] = 'fusion-image-hovers';\n\n\t\tif ( Avada()->settings->get( 'pagination_text_display' ) ) {\n\t\t\t$classes[] = 'fusion-show-pagination-text';\n\t\t} else {\n\t\t\t$classes[] = 'fusion-hide-pagination-text';\n\t\t}\n\n\t\t$classes[] = 'fusion-header-layout-' . Avada()->settings->get( 'header_layout' );\n\n\t\t$classes[] = fusion_get_option( 'responsive' ) ? 'avada-responsive' : 'avada-not-responsive';\n\n\t\t$footer_fx_class = 'avada-footer-fx-';\n\t\t$footer_fx_class .= str_replace( [ 'footer_area_', 'footer_', '_' ], [ '', '', '-' ], Avada()->settings->get( 'footer_special_effects' ) );\n\n\t\t$classes[] = $footer_fx_class;\n\t\t$classes[] = 'avada-menu-highlight-style-' . Avada()->settings->get( 'menu_highlight_style' );\n\t\t$classes[] = 'fusion-search-form-' . esc_attr( Avada()->settings->get( 'search_form_design' ) );\n\n\t\tif ( 'top' === fusion_get_option( 'header_position' ) ) {\n\t\t\t$classes[] = 'fusion-main-menu-search-' . esc_attr( Avada()->settings->get( 'main_nav_search_layout' ) );\n\t\t} else {\n\t\t\t$classes[] = 'fusion-main-menu-search-dropdown';\n\t\t}\n\n\t\t$classes[] = 'fusion-avatar-' . esc_attr( Avada()->settings->get( 'avatar_shape' ) );\n\n\t\tif ( 'top' === fusion_get_option( 'header_position' ) && fusion_get_option( 'header_sticky_shrinkage' ) ) {\n\t\t\t$classes[] = 'avada-sticky-shrinkage';\n\t\t}\n\n\t\tif ( Avada()->settings->get( 'avada_styles_dropdowns' ) ) {\n\t\t\t$classes[] = 'avada-dropdown-styles';\n\t\t}\n\n\t\t$classes[] = 'avada-blog-layout-' . Avada()->settings->get( 'blog_layout' );\n\t\t$classes[] = 'avada-blog-archive-layout-' . Avada()->settings->get( 'blog_archive_layout' );\n\n\t\tif ( class_exists( 'Tribe__Events__Main' ) ) {\n\t\t\tif ( '100-width.php' !== tribe_get_option( 'tribeEventsTemplate', 'default' ) && ( ! is_singular( 'tribe_events' ) || ( is_singular( 'tribe_events' ) && 'sidebar' === Avada()->settings->get( 'ec_meta_layout' ) ) ) ) {\n\t\t\t\t$classes[] = 'avada-ec-not-100-width';\n\t\t\t}\n\t\t\t$classes[] = 'avada-ec-meta-layout-' . Avada()->settings->get( 'ec_meta_layout' );\n\t\t}\n\n\t\tif ( Avada()->settings->get( 'image_rollover' ) ) {\n\t\t\t$classes[] = 'avada-image-rollover-yes';\n\t\t\t$classes[] = 'avada-image-rollover-direction-' . Avada()->settings->get( 'image_rollover_direction' );\n\t\t} else {\n\t\t\t$classes[] = 'avada-image-rollover-no';\n\t\t}\n\t\tif ( Avada()->settings->get( 'icon_circle_image_rollover' ) ) {\n\t\t\t$classes[] = 'avada-image-rollover-circle-yes';\n\t\t} else {\n\t\t\t$classes[] = 'avada-image-rollover-circle-no';\n\t\t}\n\t\tif ( Avada()->settings->get( 'header_shadow' ) ) {\n\t\t\t$classes[] = 'avada-header-shadow-yes';\n\t\t} else {\n\t\t\t$classes[] = 'avada-header-shadow-no';\n\t\t}\n\n\t\tif ( fusion_get_option( 'logo_background' ) ) {\n\t\t\t$classes[] = 'avada-has-logo-background';\n\t\t}\n\n\t\t$classes[] = 'avada-menu-icon-position-' . Avada()->settings->get( 'menu_icon_position' );\n\n\t\tif ( Avada()->settings->get( 'megamenu_shadow' ) ) {\n\t\t\t$classes[] = 'avada-has-megamenu-shadow';\n\t\t}\n\n\t\tif ( Avada()->settings->get( 'mainmenu_dropdown_display_divider' ) ) {\n\t\t\t$classes[] = 'avada-has-mainmenu-dropdown-divider';\n\t\t}\n\n\t\tif ( Avada()->settings->get( 'main_nav_icon_circle' ) ) {\n\t\t\t$classes[] = 'fusion-has-main-nav-icon-circle';\n\t\t}\n\n\t\tif ( fusion_get_option( 'header_100_width' ) ) {\n\t\t\t$classes[] = 'avada-has-header-100-width';\n\t\t}\n\n\t\tif ( fusion_get_option( 'page_title_100_width' ) ) {\n\t\t\t$classes[] = 'avada-has-pagetitle-100-width';\n\t\t}\n\n\t\tif ( fusion_get_option( 'page_title_bg_full' ) ) {\n\t\t\t$classes[] = 'avada-has-pagetitle-bg-full';\n\t\t}\n\n\t\tif ( fusion_get_option( 'bg_pattern_option' ) && ! ( fusion_get_option( 'bg_color' ) || fusion_get_option( 'bg_image[url]' ) ) ) {\n\t\t\t$classes[] = 'avada-has-page-background-pattern';\n\t\t}\n\n\t\tif ( fusion_get_option( 'page_title_bg_parallax' ) ) {\n\t\t\t$classes[] = 'avada-has-pagetitle-bg-parallax';\n\t\t}\n\n\t\tif ( fusion_get_option( 'mobile_menu_search' ) ) {\n\t\t\t$classes[] = 'avada-has-mobile-menu-search';\n\t\t}\n\n\t\tif ( fusion_get_option( 'main_nav_search_icon' ) ) {\n\t\t\t$classes[] = 'avada-has-main-nav-search-icon';\n\t\t}\n\n\t\tif ( fusion_get_option( 'megamenu_item_display_divider' ) ) {\n\t\t\t$classes[] = 'avada-has-megamenu-item-divider';\n\t\t}\n\n\t\tif ( fusion_get_option( 'footer_100_width' ) ) {\n\t\t\t$classes[] = 'avada-has-100-footer';\n\t\t}\n\n\t\tif ( ! fusion_get_option( 'breadcrumb_mobile' ) ) {\n\t\t\t$classes[] = 'avada-has-breadcrumb-mobile-hidden';\n\t\t}\n\n\t\tif ( 'auto' === fusion_get_option( 'page_title_mobile_height' ) ) {\n\t\t\t$classes[] = 'avada-has-page-title-mobile-height-auto';\n\t\t}\n\n\t\tif ( fusion_get_option( 'page_title_bg_retina[url]' ) ) {\n\t\t\t$classes[] = 'avada-has-pagetitlebar-retina-bg-image';\n\t\t}\n\n\t\t$classes[] = 'avada-has-titlebar-' . fusion_get_option( 'page_title_bar' );\n\n\t\tif ( fusion_get_option( 'footerw_bg_image[url]' ) ) {\n\t\t\t$classes[] = 'avada-has-footer-widget-bg-image';\n\t\t}\n\n\t\tif ( 0 === Fusion_Color::new_color( fusion_get_option( 'header_border_color' ) )->alpha ) {\n\t\t\t$classes[] = 'avada-header-border-color-full-transparent';\n\t\t}\n\n\t\tif ( 0 === Fusion_Color::new_color( fusion_get_option( 'grid_separator_color' ) )->alpha ) {\n\t\t\t$classes[] = 'avada-has-transparent-grid-sep-color';\n\t\t}\n\n\t\tif ( 0 === Fusion_Color::new_color( fusion_get_option( 'social_bg_color' ) )->alpha ) {\n\t\t\t$classes[] = 'avada-social-full-transparent';\n\t\t}\n\n\t\tif ( fusion_get_option( 'slidingbar_widgets' ) ) {\n\t\t\t$classes[] = 'avada-has-slidingbar-widgets';\n\t\t\t$classes[] = 'avada-has-slidingbar-position-' . fusion_get_option( 'slidingbar_position' );\n\t\t\t$classes[] = 'avada-slidingbar-toggle-style-' . fusion_get_option( 'slidingbar_toggle_style' );\n\t\t\tif ( fusion_get_option( 'slidingbar_sticky' ) ) {\n\t\t\t\t$classes[] = 'avada-has-slidingbar-sticky';\n\t\t\t}\n\t\t\tif ( fusion_get_option( 'slidingbar_border' ) ) {\n\t\t\t\t$classes[] = 'avada-has-slidingbar-border';\n\t\t\t}\n\t\t\tif ( false !== strpos( '%', fusion_get_option( 'slidingbar_width' ) ) ) {\n\t\t\t\t$classes[] = 'avada-has-slidingbar-width-percent';\n\t\t\t}\n\t\t}\n\n\t\tif ( '' !== fusion_get_option( 'bg_image[url]' ) && fusion_get_option( 'bg_full' ) ) {\n\t\t\t$classes[] = 'avada-has-bg-image-full';\n\t\t}\n\n\t\tif ( '' !== fusion_get_option( 'header_bg_image[url]' ) ) {\n\t\t\t$classes[] = 'avada-has-header-bg-image';\n\t\t\t$classes[] = 'avada-header-bg-' . fusion_get_option( 'header_bg_repeat' );\n\n\t\t\tif ( fusion_get_option( 'header_bg_full' ) ) {\n\t\t\t\t$classes[] = 'avada-has-header-bg-full';\n\t\t\t}\n\n\t\t\tif ( fusion_get_option( 'header_bg_parallax' ) ) {\n\t\t\t\t$classes[] = 'avada-has-header-bg-parallax';\n\t\t\t}\n\t\t}\n\n\t\tif ( Fusion_Color::new_color( Avada()->settings->get( 'header_top_bg_color' ) )->alpha < 1 ) {\n\t\t\t$classes[] = 'avada-header-top-bg-not-opaque';\n\t\t}\n\n\t\tif ( 0 === Fusion_Color::new_color( Avada()->settings->get( 'timeline_color' ) )->alpha ) {\n\t\t\t$classes[] = 'avada-has-transparent-timeline_color';\n\t\t}\n\n\t\tif ( Fusion_Color::new_color( Avada()->settings->get( 'content_bg_color' ) )->alpha < 1 ) {\n\t\t\t$classes[] = 'avada-content-bg-not-opaque';\n\t\t}\n\n\t\t$classes[] = 'avada-has-pagination-' . fusion_get_option( 'pagination_sizing' );\n\n\t\tif ( fusion_get_page_option( 'fallback', $c_page_id ) ) {\n\t\t\t$classes[] = 'avada-has-slider-fallback-image';\n\t\t}\n\n\t\t$classes[] = 'avada-flyout-menu-direction-' . fusion_get_option( 'flyout_menu_direction' );\n\n\t\tif ( function_exists( 'has_blocks' ) && has_blocks() ) {\n\t\t\t$classes[] = 'avada-has-blocks';\n\t\t}\n\n\t\tif ( Fusion_Helper::tribe_is_v2_views_enabled() ) {\n\t\t\t$classes[] = 'avada-ec-views-v2';\n\t\t} else {\n\t\t\t$classes[] = 'avada-ec-views-v1';\n\t\t}\n\n\t\treturn $classes;\n\t}", "function gymfitness_widgets()\n{\nregister_sidebar(array(\n 'name' =>'Sidebar 1',\n 'id'=>'sidebar_1',\n 'before_widget' =>'<div class=\" widget\">',\n 'after_widget'=>'</div>',\n 'before_title'=>'<h3 class=\"text-center texto-primario\">',\n 'after_widget'=>'</h3>'\n) );\n\nregister_sidebar(array(\n 'name' =>'Sidebar 2',\n 'id'=>'sidebar_2',\n 'before_widget' =>'<div class=\" widget\">',\n 'after_widget'=>'</div>',\n 'before_title'=>'<h3 class=\"text-center texto-primario\">',\n 'after_widget'=>'</h3>'\n) );\n}", "function sidebars_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'widget blog main slider', 'wpcloudstudy' ),\n 'id' => 'widget-main-slider',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget educational solution', 'wpcloudstudy' ),\n 'id' => 'widget-educational-solution',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget enroll today', 'wpcloudstudy' ),\n 'id' => 'widget-enroll-today',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget course offer', 'wpcloudstudy' ),\n 'id' => 'widget-course-offer',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget focus on', 'wpcloudstudy' ),\n 'id' => 'widget-focus-on',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget awesome teacher', 'wpcloudstudy' ),\n 'id' => 'widget-awesome-teacher',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget comments', 'wpcloudstudy' ),\n 'id' => 'widget-comments',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget events', 'wpcloudstudy' ),\n 'id' => 'widget-events',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget achievements', 'wpcloudstudy' ),\n 'id' => 'widget-achievements',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'widget news', 'wpcloudstudy' ),\n 'id' => 'widget-news',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n register_sidebar( array(\n 'name' => __( 'top bar', 'wpcloudstudy' ),\n 'id' => 'top-bar',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n ) );\n register_sidebar( array(\n 'name' => __( 'header inner', 'wpcloudstudy' ),\n 'id' => 'header-inner',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n ) );\n register_sidebar( array(\n 'name' => __( 'footer widget 1', 'wpcloudstudy' ),\n 'id' => 'footer-widget-1',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<img class=\"widget-title\">',\n ) );\n register_sidebar( array(\n 'name' => __( 'footer widget 2', 'wpcloudstudy' ),\n 'id' => 'footer-widget-2',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __( 'footer widget 3', 'wpcloudstudy' ),\n 'id' => 'footer-widget-3',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __( 'footer widget 4', 'wpcloudstudy' ),\n 'id' => 'footer-widget-4',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __( 'footer bottom', 'wpcloudstudy' ),\n 'id' => 'footer-bottom',\n ) );\n register_sidebar( array(\n 'name' => __( 'footer logo', 'wpcloudstudy' ),\n 'id' => 'footer-logo',\n ) );\n}", "function kumonosu_sidebars() {\n\n/**\n* Creates a sidebar\n* @param string|array Builds Sidebar based off of 'name' and 'id' values.\n*/\n$right_sidebar = array(\n\t'name' => __( 'Right Side Bar', 'kumonosu_blog' ),\n\t'id' => 'kumonosu-right-sidebar',\n\t'description' => '',\n\t'class' => __('Widgets which display on the right side of the page.', 'kumonosu_blog'),\n\t'before_widget' => '<div id=\"%1\" class=\"widget %2 row\"><div class=\"col-12\">',\n\t'after_widget' => '</div></div>',\n\t'before_title' => '<h2 class=\"title-underline\">',\n\t'after_title' => '</h2>',\n);\n\nregister_sidebar( $right_sidebar );\n\n\n/**\n* Creates a sidebar\n* @param string|array Builds Sidebar based off of 'name' and 'id' values.\n*/\n$footer_left = array(\n\t'name' => __( 'Footer Widget Left', 'kumonosu_blog' ),\n\t'id' => 'footer-left',\n\t'description' => __('Widgets which display on left footer such as Tags.', 'kumonosu_blog'),\n\t'class' => '',\n\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s col \">',\n\t'after_widget' => '</div>',\n\t'before_title' => '<h2 class=\"title-underline\">',\n\t'after_title' => '</h2>',\n);\n\nregister_sidebar( $footer_left );\n\n\n/**\n* Creates a sidebar\n* @param string|array Builds Sidebar based off of 'name' and 'id' values.\n*/\n$footer_left = array(\n\t'name' => __( 'Footer Widget Right', 'kumonosu_blog' ),\n\t'id' => 'footer-right',\n\t'description' => __('Widgets which display on right footer such as Facebook Page.', 'kumonosu_blog'),\n\t'class' => '',\n\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s col \">',\n\t'after_widget' => '</div>',\n\t'before_title' => '<h2 class=\"title-underline\">',\n\t'after_title' => '</h2>',\n);\n\nregister_sidebar( $footer_left );\n\n\n\n/**\n * Creates a sidebar\n * @param string|array Builds Sidebar based off of 'name' and 'id' values.\n */\n$lang = array(\n\t'name' => __( 'Language Switcher', 'kumonosu_blog' ),\n\t'id' => 'language-switcher',\n\t'description' => '',\n\t'class' => '',\n\t'before_widget' => '<div id=\"%1\" class=\"widget %2\">',\n\t'after_widget' => '</div>',\n\t'before_title' => '',\n\t'after_title' => '',\n);\n\nregister_sidebar( $lang );\n\n\n}", "function freshio_footer_widgets()\n\t{\n\t\t$rows = intval(apply_filters('freshio_footer_widget_rows', 1));\n\t\t$regions = intval(apply_filters('freshio_footer_widget_columns', 5));\n\t\tfor ($row = 1; $row <= $rows; $row++) :\n\n\t\t\t// Defines the number of active columns in this footer row.\n\t\t\tfor ($region = $regions; 0 < $region; $region--) {\n\t\t\t\tif (is_active_sidebar('footer-' . esc_attr($region + $regions * ($row - 1)))) {\n\t\t\t\t\t$columns = $region;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($columns)) :\n\t\t\t\t?>\n\t\t\t\t<div class=\"col-full\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=<?php echo '\"footer-widgets row-' . esc_attr($row) . ' col-' . esc_attr($columns) . ' fix\"'; ?>>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tfor ($column = 1; $column <= $columns; $column++) :\n\t\t\t\t\t\t\t$footer_n = $column + $regions * ($row - 1);\n\n\t\t\t\t\t\t\tif (is_active_sidebar('footer-' . esc_attr($footer_n))) :\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"block footer-widget-<?php echo esc_attr($column); ?>\">\n\t\t\t\t\t\t\t\t\t<?php dynamic_sidebar('footer-' . esc_attr($footer_n)); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\tendfor;\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .footer-widgets.row-<?php echo esc_attr($row); ?> -->\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\tunset($columns);\n\t\t\tendif;\n\t\tendfor;\n\t}", "function pcurio_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Sidebar', 'pcurio' ),\n 'class' => 'sidebar-1',\n 'description' => '',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widgetTitle\">',\n 'after_title' => '</h1>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Footer Sidebar 1',\n 'class' => 'footer-sidebar-1',\n 'description' => 'Appears in the footer area',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widgetTitle\">',\n 'after_title' => '</h3>',\n ) );\n register_sidebar( array(\n 'name' => 'Footer Sidebar 2',\n 'class' => 'footer-sidebar-2',\n 'description' => 'Appears in the footer area',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widgetTitle\">',\n 'after_title' => '</h3>',\n ) );\n register_sidebar( array(\n 'name' => 'Footer Sidebar 3',\n 'class' => 'footer-sidebar-3',\n 'description' => 'Appears in the footer area',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widgetTitle\">',\n 'after_title' => '</h3>',\n ) );\n register_sidebar( array(\n 'name' => 'Footer Sidebar 4',\n 'class' => 'footer-sidebar-4',\n 'description' => 'Appears in the footer area',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widgetTitle\">',\n 'after_title' => '</h3>',\n ) );\n}", "static public function refresh_sidebar_widgets() {\n\t\t// Contains an array of all sidebars and widgets inside each sidebar.\n\t\t$widgetized_sidebars = self::get_sidebar_widgets();\n\n\t\t$cs_sidebars = self::get_custom_sidebars();\n\t\t$delete_widgetized_sidebars = array();\n\n\t\tforeach ( $widgetized_sidebars as $id => $bar ) {\n\t\t\tif ( substr( $id, 0, 3 ) == self::$sidebar_prefix ) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ( $cs_sidebars as $csbar ) {\n\t\t\t\t\tif ( $csbar['id'] == $id ) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! $found ) {\n\t\t\t\t\t$delete_widgetized_sidebars[] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$all_ids = array_keys( $widgetized_sidebars );\n\t\tforeach ( $cs_sidebars as $cs ) {\n\t\t\t$sb_id = $cs['id'];\n\t\t\tif ( ! in_array( $sb_id, $all_ids ) ) {\n\t\t\t\t$widgetized_sidebars[ $sb_id ] = array();\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $delete_widgetized_sidebars as $id ) {\n\t\t\tunset( $widgetized_sidebars[ $id ] );\n\t\t}\n\n\t\tupdate_option( 'sidebars_widgets', $widgetized_sidebars );\n\t}", "function shop_isle_footer_widgets() {\n\t\t?>\n\t\t<!-- Widgets start -->\n\n\t<?php if ( is_active_sidebar( 'sidebar-footer-area-1' ) || is_active_sidebar( 'sidebar-footer-area-2' ) || is_active_sidebar( 'sidebar-footer-area-3' ) || is_active_sidebar( 'sidebar-footer-area-4' ) ) : ?>\n\n\t\t<div class=\"container-fluid\" style=\"background:white;\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\n\t\t\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\t<?php if ( is_active_sidebar( 'sidebar-footer-area-4' ) ) : ?>\n\t\t\t\t\t\t<div class=\"\">\n\t\t\t\t\t\t\t<?php dynamic_sidebar('sidebar-footer-area-4'); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<!-- Widgets end -->\n\n\t\t\t\t</div><!-- .row -->\n\t\t\t</div>\n\t\t</div>\n\n\t<?php endif; ?>\n\n\t\t<?php\n\t}", "function ark_widgets_init() {\n\n\t\tregister_sidebar(array(\n\t\t\t'name' => ark_wp_kses(__('Content Sidebar', 'ark')),\n\t\t\t'id' => 'sidebar-content',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t'after_widget' => '</div></div>',\n\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\n\t\tregister_sidebar(array(\n\t\t\t'name' => ark_wp_kses(__('Content Sidebar 2', 'ark')),\n\t\t\t'id' => 'sidebar-content-2',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t'after_widget' => '</div></div>',\n\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\n\t\tif (class_exists('WooCommerce')) {\n\t\t\tregister_sidebar(array(\n\t\t\t\t'name' => 'Shop Sidebar',\n\t\t\t\t'id' => 'shop-sidebar',\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t\t'after_title' => '</h4>'\n\t\t\t));\n\t\t}\n\n\t\tfor ($i = 1; $i <= 4; $i++) {\n\t\t\tregister_sidebar(array(\n\t\t\t\t'name' => ark_wp_kses(__('Footer Sidebar', 'ark')) . ' #' . $i,\n\t\t\t\t'id' => 'sidebar-footer-' . $i,\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"widget-body\">',\n\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t'before_title' => '<h3 class=\"footer-title widget-title ffb-widget-title\">',\n\t\t\t\t'after_title' => '</h3>'\n\t\t\t));\n\t\t}\n\n\t\tif (class_exists('ffSidebarManager')) {\n\t\t\t$sidebarsThemeOptions = ffSidebarManager::getQuery('sidebars');\n\t\t\tif( !empty($sidebarsThemeOptions) ) {\n\t\t\t\tforeach ($sidebarsThemeOptions->get('sidebars') as $key => $sidebar) {\n\t\t\t\t\tregister_sidebar(array(\n\t\t\t\t\t\t'name' => strip_tags($sidebar->get('title')),\n\t\t\t\t\t\t'id' => 'ark-custom-sidebar-' . sanitize_title($sidebar->get('slug')),\n\t\t\t\t\t\t'description' => strip_tags($sidebar->get('description')),\n\t\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t\t\t\t'after_title' => '</h4>'\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'upper-widgets',\n 'id' => 'upper-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n register_sidebar( array(\n 'name' => 'left-sidebar',\n 'id' => 'left-sidebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'right-sidebar',\n 'id' => 'right-sidebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'desktop-widebar',\n 'id' => 'desktop-widebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'desktop-not-widebar',\n 'id' => 'desktop-not-widebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'lower-widgets',\n 'id' => 'lower-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n register_sidebar( array(\n 'name' => 'mobile-upper-widgets',\n 'id' => 'mobile-upper-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n register_sidebar( array(\n 'name' => 'mobile-widebar',\n 'id' => 'mobile-widebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'mobile-lower-widgets',\n 'id' => 'mobile-lower-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n/* register_sidebar( array(\n 'name' => 'leftSidebar',\n 'id' => 'leftSidebar',\n 'before_widget' => '<div class=\"sidebarWidget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'mobileBanner',\n 'id' => 'mobileBanner',\n 'before_widget' => '<div class=\"mobileWidget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<p class=\"mobilewidget-title\">',\n 'after_title' => '</div>',\n ) );\n*/\n}", "function wp_list_widget_controls_dynamic_sidebar($params)\n{\n}", "function custom_footer_widget_class( $input ) {\n\n\t\t$footer_widgets_number = $this->active_widgets;\n\n\t\t$input .= ' col-' . $footer_widgets_number;\n\n\t\treturn $input;\n\n\t}", "function lunchroom_body_classes( $classes ) {\n if (is_bbpress()) {\n $classes[] = esc_attr('hs_no_sidebar');\n }\n\n return $classes;\n}", "function vgmAddSidebar()\n{\n register_sidebar(array(\n 'id' => 'footer_widget_first',\n 'name' => 'Première zone de widget du footer',\n 'description' => 'Apparait à gauche du footer, en premier pour les mobiles',\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer_widget_second',\n 'name' => 'Seconde zone de widget du footer',\n 'description' => 'Apparait à gauche du footer, en deuxième pour les mobiles',\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer_widget_third',\n 'name' => 'Troisième zone de widget du footer',\n 'description' => 'Apparait à droite du footer, en troisième pour les mobiles',\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n register_sidebar(array(\n 'id' => 'footer_widget_fourth',\n 'name' => 'Quatrième zone de widget du footer',\n 'description' => 'Apparait à droite du footer, en dernier pour les mobiles',\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>'\n ));\n}", "public function has_sidebar() {\n\t\t// Get our extra body classes.\n\t\treturn ( apply_filters( 'avada_has_sidebar', in_array( 'has-sidebar', $this->body_classes, true ), $this->body_classes, 'has-sidebar' ) );\n\t}", "function twentyfive_widgets_init() {\n\tregister_sidebar( array(\n\t\t\t'name' => __( 'Sidebar', 'twentyfive' ),\n\t\t\t'id' => 'sidebar-1',\n\t\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfive' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget box box-white %2$s\">',\n\t\t\t'after_widget' => '</div></section>',\n\t\t\t'before_title' => '<div class=\"title\"><h3>',\n\t\t\t'after_title' => '</h3></div><div class=\"body\">',\n\t) );\n\n\tregister_sidebar( array(\n\t\t\t'name' => __( 'Content Bottom 1', 'twentyfive' ),\n\t\t\t'id' => 'sidebar-2',\n\t\t\t'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentyfive' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget box box-white %2$s\">',\n\t\t\t'after_widget' => '</div></section>',\n\t\t\t'before_title' => '<div class=\"title\"><h3>',\n\t\t\t'after_title' => '</h3></div><div class=\"body\">',\n\t) );\n\n\tregister_sidebar( array(\n\t\t\t'name' => __( 'Content Bottom 2', 'twentyfive' ),\n\t\t\t'id' => 'sidebar-3',\n\t\t\t'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentyfive' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t\t'after_title' => '</h2>',\n\t) );\n}", "function st_blog_widget_blcok()\n\t{\n\t\tglobal $st_blog_customizer_all_values;\n\n\t\tif ( is_active_sidebar('full-width-widget') ) { ?>\n\t\t\t<!-- instagram -->\n\t\t\t<section class=\"st-blog-full-width-widget clearfix\" id=\"st-full-width\">\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<?php dynamic_sidebar('full-width-widget'); ?>\n\t\t\t\t</div>\t\t\t\n\t\t\t</section>\n\t\t<?php }\n\t}", "function wpb_widgets_init() {\n\tregister_sidebar( array(\n 'name' =>__( 'Home page Side bar', 'wpb'),\n 'id' => 'sidebar-0',\n 'description' => __( 'Footer middle Section', 'wpb' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<div class=\"sub-ttl\">',\n 'after_title' => '</div>',\n\t) );\n\tregister_sidebar( array(\n 'name' =>__( 'Commen Side Bar for all page', 'wpb'),\n 'id' => 'sidebar-a',\n 'description' => __( 'Footer middle Section', 'wpb' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<div class=\"sub-ttl\">',\n 'after_title' => '</div>',\n\t) );\n register_sidebar( array(\n 'name' => __( 'Footer one', 'wpb' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'This is footer left side', 'wpb' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<div class=\"sub-ttl\">',\n 'after_title' => '</div>',\n ) );\n \n register_sidebar( array(\n 'name' =>__( 'Footer Two', 'wpb'),\n 'id' => 'sidebar-2',\n 'description' => __( 'Footer middle Section', 'wpb' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h2>',\n\t) );\n\t\n\tregister_sidebar( array(\n 'name' =>__( 'Footer Three', 'wpb'),\n 'id' => 'sidebar-3',\n 'description' => __( 'Footer middle Section', 'wpb' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n 'name' =>__( 'BLog Side bar', 'wpb'),\n 'id' => 'sidebar-4',\n 'description' => __( 'Footer middle Section', 'wpb' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n\t) );\t\n }", "function stcath_count_widgets( $sidebar_id ) {\n\t// to see if wp_convert_widget_settings() has made manipulations in memory.\n\tglobal $_wp_sidebars_widgets;\n\tif ( empty( $_wp_sidebars_widgets ) ) {\n\t\t$_wp_sidebars_widgets = get_option( 'sidebars_widgets', array() );\n\t}\n\n\t$sidebars_widgets_count = $_wp_sidebars_widgets;\n\n\tif ( isset( $sidebars_widgets_count[ $sidebar_id ] ) ) {\n\t\treturn 'small-12 medium-' . ( 12 / count( $sidebars_widgets_count[ $sidebar_id ] ) );\n\t}\n}", "function ourWidgetsInit() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"side-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Left',\n 'id' => 'footerleft',\n 'before_widget' => '<div class=\"left-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Center-Left',\n 'id' => 'footercenterleft',\n 'before_widget' => '<div class=\"center-left-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Center-Right',\n 'id' => 'footercenterright',\n 'before_widget' => '<div class=\"center-right-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Right',\n 'id' => 'footerright',\n 'before_widget' => '<div class=\"right-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n}", "function boomvisibility_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Main Sidebar', 'boomvisibility' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'boomvisibility' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Call to Action Widget Area', 'boomvisibility' ),\n\t\t'id' => 'sidebar-2',\n\t\t'description' => __( 'Appears in the top right of the website', 'boomvisibility' ),\n\t\t'before_widget' => '<div id=\"call-to-action\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\t\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Left Widget Area', 'boomvisibility' ),\n\t\t'id' => 'sidebar-4',\n\t\t'description' => __( 'Appears on the bottom left of all pages', 'boomvisibility' ),\n\t\t'before_widget' => '<div class=\"footer-widget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Middle Widget Area', 'boomvisibility' ),\n\t\t'id' => 'sidebar-5',\n\t\t'description' => __( 'Appears on the bottom middle of all pages', 'boomvisibility' ),\n\t\t'before_widget' => '<div class=\"footer-widget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Right Widget Area', 'boomvisibility' ),\n\t\t'id' => 'sidebar-6',\n\t\t'description' => __( 'Appears on the bottom right of all pages', 'boomvisibility' ),\n\t\t'before_widget' => '<div class=\"footer-widget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Consultation Block Area', 'boomvisibility' ),\n\t\t'id' => 'sidebar-10',\n\t\t'description' => __( 'Appears on the bottom of all pages', 'boomvisibility' ),\n\t\t'before_widget' => '<div class=\"consultation-widget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Main Page Sidebar', 'boomvisibility' ),\n\t\t'id' => 'sidebar-11',\n\t\t'description' => __( 'Appears on the sidebar of all pages', 'boomvisibility' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Contact Page Sidebar', 'boomvisibility' ),\n\t\t'id' => 'sidebar-12',\n\t\t'description' => __( 'Appears on the sidebar of contact pages', 'boomvisibility' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\t\n}", "function fw_ext_extension_get_columns_classes( $full_width = false ) {\n $main_column_class = ' column-main';\n $sidebar_class = ' column-sidebar';\n \n //default values\n $column_classes = array(\n 'main_column_class' => 'col-12 col-xs-12 col-md-7 col-xl-8' . $main_column_class,\n 'sidebar_class' => 'col-12 col-xs-12 col-md-5 col-xl-4' . $sidebar_class,\n 'position' => 'right'\n );\n if ( is_page() ) {\n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n \n //if no Unyson installed - return - no sidebar on pages by default\n if ( ! function_exists( 'fw_ext_sidebars_show' ) ) {\n return $column_classes;\n }\n }\n \n //check for unyson\n if ( function_exists( 'fw_ext_sidebars_get_current_position' ) ) {\n \n //full width\n if ( in_array( fw_ext_sidebars_get_current_position(), array( 'full' ) ) ) {\n \n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n //making 10 columns width on single post if no sidebar\n if ( is_single() ) {\n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-xl-10 offset-xl-1\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n }\n \n //left sidebar\n } elseif ( in_array( fw_ext_sidebars_get_current_position(), array( 'left' ) ) ) {\n \n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-lg-7 col-xl-8 order-xl-2\" . $main_column_class;\n $column_classes['sidebar_class'] = \"col-12 col-xs-12 col-lg-5 col-xl-4 order-xl-1\" . $sidebar_class;\n $column_classes['position'] = 'left';\n \n } elseif ( in_array( fw_ext_sidebars_get_current_position(), array( 'right' ) ) ) {\n \n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-lg-7 col-xl-8 \" . $main_column_class;\n $column_classes['sidebar_class'] = \"col-12 col-xs-12 col-lg-5 col-xl-4\" . $sidebar_class;\n $column_classes['position'] = 'right';\n \n }\n //no catching right sidebar. Right sidebar is default\n else {\n //default - right sid\n //ebar\n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-lg-7 col-xl-8\" . $main_column_class;\n $column_classes['sidebar_class'] = \"col-12 col-xs-12 col-lg-5 col-xl-4\" . $sidebar_class;\n $column_classes['position'] = 'right';\n \n //default for page is fullwidth - do we need this?\n if ( is_page() ) {\n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n }\n \n }\n }\n \n if ( $full_width || !digiboost_is_active_widgets_in_main_sidebar_exists() ) {\n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n }\n \n return $column_classes;\n }", "function init(){\n\t $sidebars = Sidebar_Generator::get_sidebars();\n\t \n\n\t if(is_array($sidebars)){\n\t\t\t$z=1;\n\t\t\tforeach($sidebars as $sidebar){\n\t\t\t\t$sidebar_class = Sidebar_Generator::name_to_class($sidebar);\n\t\t\t\tregister_sidebar(array(\n\t\t\t \t'name'=>$sidebar,\n\t\t\t\t\t'id'=> \"th_sidebar-$z\",\n\t\t\t \t'before_widget' => '<div id=\"%1$s\" class=\"widget '.$sidebar_class.' %2$s\">',\n\t\t \t\t\t'after_widget' => '</div>',\n\t\t \t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h3>',\n\t\t \t));\t $z++;\n\t\t\t}\n\t\t}\n\t}", "function bones_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __( 'Sidebar 1', 'bonestheme' ),\n\t\t'description' => __( 'The first (primary) sidebar.', 'bonestheme' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n ));\n\n register_sidebar(array(\n\t\t'id' => 'sidebar2',\n\t\t'name' => __( 'Frontbar - Sidebar 2', 'bonestheme' ),\n\t\t'description' => __( 'The first (primary) sidebar.', 'bonestheme' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n ));\n \n register_sidebar(array(\n\t\t'id' => 'sidebar3',\n\t\t'name' => __( 'Bottom Float - Sidebar 3', 'bonestheme' ),\n\t\t'description' => __( 'The first (primary) sidebar.', 'bonestheme' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\t/*\n\tto add more sidebars or widgetized areas, just copy\n\tand edit the above sidebar code. In order to call\n\tyour new sidebar just use the following code:\n\n\tJust change the name to whatever your new\n\tsidebar's id is, for example:\n\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar2',\n\t\t'name' => __( 'Sidebar 2', 'bonestheme' ),\n\t\t'description' => __( 'The second (secondary) sidebar.', 'bonestheme' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tTo call the sidebar in your template, you can just copy\n\tthe sidebar.php file and rename it to your sidebar's name.\n\tSo using the above example, it would be:\n\tsidebar-sidebar2.php\n\n\t*/\n}", "public function add_sidebars( $count = 1, $name = false, $class = false ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Example: $theme->add_sidebars(2, 'My Sidebar %d', 'custom-sidebar');\n\t\t$args = array(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t'after_widget' \t=> '</aside>',\n\t\t\t);\n\n\t\tif ($name) $args['name'] = $name;\n\t\tif ($class) $args['class'] = $class;\n\n\t\tself::$config['sidebars'][] = array( 'count' => $count, 'args' => $args );\t// Gets provided args and passing it to the $config.\n\t}", "public function double_sidebars() {\n\n\t\t// Get our extra body classes.\n\t\treturn ( apply_filters( 'avada_has_double_sidebars', in_array( 'double-sidebars', $this->body_classes, true ), $this->body_classes, 'double-sidebars' ) );\n\t}", "function ct_home_do_bottom() {\n\n\tif ( is_active_sidebar( 'home-bottom' ) ) {\t\t\t\t\t\t\t\t\n\t\n\t\techo '<section id=\"home-bottom\" class=\"clearfix\"><div class=\"wrap\">';\n\t\t\n\t\t\tgenesis_widget_area( 'home-bottom', array(\n\t\t\t\t'before' => '<aside class=\"home-bottom\">',\n\t\t\t) );\n\t\t\n\t\techo '</div><!-- end .wrap --></section><!-- end #home-bottom -->'.\"\\n\";\n\t}\n}", "function fundify_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'fundify' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tfor ( $i = 2; $i <= 4; $i++ ) {\n\t\tregister_sidebar( array(\n\t\t\t'name' => sprintf( __( 'Footer Column %d', 'fundify' ), $i - 1 ),\n\t\t\t'id' => 'sidebar-' . $i,\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\t}\n}", "function register_additional_childtheme_sidebars() {\n register_sidebar( array(\n 'id' => 'sidebar-2',\n 'name' => __( 'Footer Menu Left', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'id' => 'sidebar-3',\n 'name' => __( 'Footer Menu Middle', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n \n register_sidebar( array(\n 'id' => 'sidebar-4',\n 'name' => __( 'Footer Menu Right', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'id' => 'footer-social',\n 'name' => __( 'Footer Social Icons', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'id' => 'search-box',\n 'name' => __( 'Search Bar', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n\n register_sidebar( array(\n 'id' => 'search-box-footer',\n 'name' => __( 'Search Bar Footer', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n\n register_sidebar( array(\n 'id' => 'footer-copyright',\n 'name' => __( 'Footer Copyright Text', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'id' => 'navbar-logo',\n 'name' => __( 'Navbar Logo', 'child-theme-textdomain' ),\n 'description' => __( 'Appears on the static front page template', 'child-theme-textdomain' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title-footer\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "private function import_sidebars() {\n\t\t$widgets_from_old_theme = wp_get_sidebars_widgets();\n\t\t$new_widget_array = array();\n\n\t\tif ( ! empty( $widgets_from_old_theme['sidebar-1'] ) ) {\n\t\t\t$new_widget_array['sidebar-1'] = $widgets_from_old_theme['sidebar-1'];\n\t\t}\n\n\t\tif ( ! empty( $widgets_from_old_theme['zerif-sidebar-footer'] ) ) {\n\t\t\t$new_widget_array['footer-one-widgets'] = $widgets_from_old_theme['zerif-sidebar-footer'];\n\t\t}\n\n\t\tif ( ! empty( $widgets_from_old_theme['zerif-sidebar-footer-2'] ) ) {\n\t\t\t$new_widget_array['footer-two-widgets'] = $widgets_from_old_theme['zerif-sidebar-footer-2'];\n\t\t}\n\n\t\tif ( ! empty( $widgets_from_old_theme['zerif-sidebar-footer-3'] ) ) {\n\t\t\t$new_widget_array['footer-three-widgets'] = $widgets_from_old_theme['zerif-sidebar-footer-3'];\n\t\t}\n\t\tif ( ! isset( $new_widget_array['wp_inactive_widgets'] ) ) {\n\t\t\t$new_widget_array['wp_inactive_widgets'] = array();\n\t\t}\n\n\t\tupdate_option( 'sidebars_widgets', $new_widget_array );\n\t}", "function gymfitness_widgets(){\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id'=>'sidebar',\n 'before_widget'=> '<div class=\"widget\">',\n 'after_widget'=> '</div>',\n 'before_title'=>'<h3 class=\"text-primary\">',\n 'after_title'=>'</h3>'\n ));\n}", "function brf_widgets_init() {\r\n\tregister_sidebar( array(\r\n\t\t'name' => esc_html__( 'Start Sida', 'brf' ),\r\n\t\t'id' => 'front-sidebar',\r\n\t\t'description' => esc_html__( 'Sidebar för startsidan.', 'brf' ),\r\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</section>',\r\n\t\t'before_title' => '<h3 class=\"rounded\">',\r\n\t\t'after_title' => '</h3>',\r\n\t) );\r\n \r\n register_sidebar( array(\r\n\t\t'name' => esc_html__( 'Nyheter', 'brf' ),\r\n\t\t'id' => 'header-sidebar',\r\n\t\t'description' => esc_html__( 'Sidebar för nyheter.', 'brf' ),\r\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</section>',\r\n\t\t'before_title' => '<h3 class=\"widget-title\">',\r\n\t\t'after_title' => '</h3>',\r\n\t) );\r\n \r\n register_sidebar( array(\r\n 'name' => esc_html__( 'Kontakt', 'brf' ),\r\n 'id' => 'home-sidebar',\r\n 'description' => esc_html__( 'Sidebar för kontakt', 'brf' ),\r\n 'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\r\n 'after_widget' => '</section>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>',\r\n ) );\r\n \r\n register_sidebar( array(\r\n 'name' => esc_html__( 'Footer', 'brf' ),\r\n 'id' => 'footer-sidebar',\r\n 'description' => esc_html__( 'Sidebar för footer', 'brf' ),\r\n 'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\r\n 'after_widget' => '</section>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>',\r\n ) );\r\n}", "function gregr_home_do_bottom() {\n\n\tif ( is_active_sidebar( 'home-bottom' ) ) {\t\t\t\t\t\t\t\t\n\t\n\t\techo '<section id=\"home-bottom\" class=\"clearfix\"><div class=\"wrap\">';\n\t\t\n\t\t\tgenesis_widget_area( 'home-bottom', array(\n\t\t\t\t'before' => '<aside class=\"home-bottom\">',\n\t\t\t) );\n\t\t\n\t\techo '</div><!-- end .wrap --></section><!-- end #home-bottom -->'.\"\\n\";\n\t}\n}", "function nothing_custom_html() {\n\t\t\t$columns_count = 0;\n\t\t\tfor($i = 1; $i < 5; $i++) {\n\t\t\t\t(is_active_sidebar('sidebar-nothing-col'.$i)) ? $columns_count++ : 0;\n\t\t\t}\n\t\t\t$columns_number = Dfd_Theme_Helpers::dfd_num_to_string($columns_count);\n\n\t\t\tif ( $columns_count > 0 ) : ?>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$counter = 0;\n\t\t\t\t\tfor ($i = 1; $i < $columns_count + 1; $i++) {\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"<?php echo esc_attr($columns_number); ?> columns\">\n\t\t\t\t\t\t\t<?php dynamic_sidebar('sidebar-nothing-col' . $i); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t<?php endif;\n\t\t}", "function gregr_home_widget_test() {\n\n\tif ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) {\n\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_featured' );\t\t\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_middle' );\n\t\tadd_action( 'genesis_after_header', 'gregr_home_do_bottom' );\n\t}\n}", "function dynamic_sidebar($index = 1)\n{\n}", "function southgate_body_classes( $classes ) {\n\t// Adds a class of hfeed to non-singular pages.\n\tif ( ! is_singular() ) {\n\t\t$classes[] = 'hfeed';\n\t}\n\n\t// Adds a class of no-sidebar when there is no sidebar present.\n\tif ( ! is_active_sidebar( 'sidebar-1' ) ) {\n\t\t$classes[] = 'no-sidebar';\n\t}\n\n\treturn $classes;\n}", "function phptemplate_body_class($sidebar_left, $sidebar_right) {\n if ($sidebar_left != '' && $sidebar_right != '') {\n $class = 'sidebars';\n }\n else {\n if ($sidebar_left != '') {\n $class = 'sidebar-left';\n }\n if ($sidebar_right != '') {\n $class = 'sidebar-right';\n }\n }\n\n if (isset($class)) {\n print ' class=\"' . $class . '\"';\n }\n}", "function ct_home_widget_test() {\n\n\tif ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) {\n\n // remove_action( 'genesis_loop', 'genesis_do_loop' );\n // add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\t\tadd_action( 'genesis_after_header', 'ct_home_do_featured' );\t\t\n\t\tadd_action( 'genesis_after_header', 'ct_home_do_middle' );\n\t\tadd_action( 'genesis_after_header', 'ct_home_do_bottom' );\n\t}\n}", "function magazinevibe_edge_header_type3_widget_areas() {\n register_sidebar(array(\n 'name' => esc_html__('Right From Main Menu', 'magazinevibe'),\n 'id' => 'edgtf-right-from-main-menu',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s edgtf-right-from-main-menu-widget\">',\n 'after_widget' => '</div>',\n 'description' => esc_html__('Widgets added here will appear on the right hand side from the main menu', 'magazinevibe')\n ));\n }", "function is_sidebar_active( $index ){\n global $wp_registered_sidebars;\n \n $widgetcolums = wp_get_sidebars_widgets();\n \n if ( $widgetcolums[$index] ) return true;\n \n return false;\n}", "function gymfitness_widgets(){\n\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>', \n 'before_title' => '<h3 class=\"text-primary\">',\n 'after_title' => '</h3>'\n ) );\n\n}", "function navy_additional_widgets_init() {\n\tregister_sidebar(array(\n\t\t'name'\t\t\t=>\tesc_html__( 'Nurture Sidebar', 'navy'),\n\t\t'id'\t\t\t=>\t'sidebar-nurture',\n\t\t'description'\t=>\tesc_html__( 'Widgets in this area will be shown into the sidebar on nurture posts.', 'navy'),\n\t\t'before_widget' =>\t'<div class=\"col-md-12 blog_widget\">',\n\t\t'after_widget'\t=>\t'</div>',\n\t\t'before_title'\t=>\t'<h4>',\n\t\t'after_title'\t=>\t'</h4>',\n\t) );\n}", "function bones_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __( 'Sidebar 1', 'bonestheme' ),\n\t\t'description' => __( 'The first (primary) sidebar.', 'bonestheme' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t'after_title' => '</h3>'\n\t));\n\n register_sidebar(array(\n 'id' => 'Footer-Menu-1',\n 'name' => __( 'Footer1', 'bonestheme' ),\n 'description' => __( 'Footer Menu Left', 'bonestheme' ),\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n\n register_sidebar(array(\n 'id' => 'Footer-Menu-2',\n 'name' => __( 'Footer2', 'bonestheme' ),\n 'description' => __( 'Footer Menu Middle', 'bonestheme' ),\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n\n register_sidebar(array(\n 'id' => 'Footer-Menu-3',\n 'name' => __( 'Footer3', 'bonestheme' ),\n 'description' => __( 'Footer Menu Right', 'bonestheme' ),\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n\n\t\n}", "function is_sidebar_active( $index ){\r\n global $wp_registered_sidebars;\r\n \r\n $widgetcolums = wp_get_sidebars_widgets();\r\n \r\n if ($widgetcolums[$index]) return true;\r\n \r\n return false;\r\n}", "function widgetsInit() {\r\n register_sidebar( array(\r\n\t\t'name' => 'Grupo 1',\r\n\t\t'id' => 'group1',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div class=\"group1\">',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n register_sidebar( array(\r\n\t\t'name' => 'Grupo 2',\r\n\t\t'id' => 'group2',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => 'Contato',\r\n\t\t'id' => 'contact-info',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n register_sidebar( array(\r\n\t\t'name' => 'Redes Sociais',\r\n\t\t'id' => 'social-media',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n}", "function tiny_sidebar(){\n\t register_sidebar( array (\n\t 'name' => __( 'Tiny UpperBar', 'tiny_theme' ),\n\t 'id' => 'primary-widget-area',\n\t 'class' => '',\n\t 'description' => __( 'The primary widget area', 'tiny_theme' ),\n\t 'before_widget' => '<div class=\"widget %2$s\" id=\"%1$s\" >',\n\t 'after_widget' => \"</div>\",\n\t 'before_title' => '<h3>',\n\t 'after_title' => '</h3>',\n\t ) );\n\t}", "function wpb_first_and_last_menu_class($items) {\r\n$items[1]->classes[] = 'first';\r\n$items[count($items)]->classes[] = 'last';\r\nreturn $items;\r\n}", "function wp_experts_widgets_init() {\r\n\tregister_sidebar( array(\r\n\t\t'name' => esc_html__( 'Main Sidebar', \"wp-experts\" ),\r\n\t\t'id' => 'sidebar-1',\r\n\t\t'description' => esc_html__( '', \"wp-experts\" ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h3 class=\"widget-title\">',\r\n\t\t'after_title' => '</h3>',\r\n\t) );\r\n\r\n\tregister_sidebar( array(\r\n\t\t'name' => esc_html__( 'Shop Cart', \"wp-experts\" ),\r\n\t\t'id' => 'shop-cart',\r\n\t\t'description' => esc_html__( '', \"wp-experts\" ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h3 class=\"widget-title\">',\r\n\t\t'after_title' => '</h3>',\r\n\t) );\r\n\r\n\tregister_sidebar( array(\r\n \t'name' => esc_html__( 'Footer Top - Column 1', \"wp-experts\" ),\r\n \t'id' => 'footer-top-1',\r\n \t'description' => esc_html__( '', \"wp-experts\" ),\r\n \t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n \t'after_widget' => '</aside>',\r\n \t'before_title' => '<h3 class=\"widget-title\">',\r\n \t'after_title' => '</h3>',\r\n\t) );\r\n\r\n\tregister_sidebar( array(\r\n \t'name' => esc_html__( 'Footer Top - Column 2', \"wp-experts\" ),\r\n \t'id' => 'footer-top-2',\r\n \t'description' => esc_html__( '', \"wp-experts\" ),\r\n \t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n \t'after_widget' => '</aside>',\r\n \t'before_title' => '<h3 class=\"widget-title\">',\r\n \t'after_title' => '</h3>',\r\n\t) );\r\n\r\n\tregister_sidebar( array(\r\n \t'name' => esc_html__( 'Footer Top - Column 3', \"wp-experts\" ),\r\n \t'id' => 'footer-top-3',\r\n \t'description' => esc_html__( '', \"wp-experts\" ),\r\n \t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n \t'after_widget' => '</aside>',\r\n \t'before_title' => '<h3 class=\"widget-title\">',\r\n \t'after_title' => '</h3>',\r\n\t) );\r\n\r\n\tregister_sidebar( array(\r\n \t'name' => esc_html__( 'Footer Top - Column 4', \"wp-experts\" ),\r\n \t'id' => 'footer-top-4',\r\n \t'description' => esc_html__( '', \"wp-experts\" ),\r\n \t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n \t'after_widget' => '</aside>',\r\n \t'before_title' => '<h3 class=\"widget-title\">',\r\n \t'after_title' => '</h3>',\r\n\t) );\r\n\r\n\tregister_sidebar(array(\r\n 'name' => 'Woocommerce Sidebar',\r\n 'id' => 'woocommerce-widget-area',\r\n 'before_widget' => '<div id=\"%1$s\" class=\"slidingbar-widget-col %2$s\">',\r\n \t'after_widget' => '<div style=\"clear:both;\"></div></div>',\r\n \t'before_title' => '<h3 class=\"wg-title\"><span>',\r\n \t'after_title' => '</span></h3>',\r\n ));\r\n register_sidebar(array(\r\n 'name' => 'Services Sidebar',\r\n 'id' => 'services',\r\n 'before_widget' => '<div id=\"%1$s\" class=\"slidingbar-widget-col %2$s\">',\r\n \t'after_widget' => '<div style=\"clear:both;\"></div></div>',\r\n \t'before_title' => '<h3 class=\"wg-title\"><span>',\r\n \t'after_title' => '</span></h3>',\r\n ));\r\n}", "function kholisnet_widgets() {\nregister_sidebar( array(\n'name' => __( 'First Footer Widget Area', 'kholisnet' ),\n'id' => 'first-footer-widget-area',\n'description' => __( 'The first footer widget area', 'kholisnet' ),\n'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n'after_widget' => '</li>',\n'before_title' => '<h3 class=\"widget-title\">',\n'after_title' => '</h3>',\n) );\nregister_sidebar( array(\n'name' => __( 'Second Footer Widget Area', 'kholisnet' ),\n'id' => 'second-footer-widget-area',\n'description' => __( 'The Second footer widget area', 'kholisnet' ),\n'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n'after_widget' => '</li>',\n'before_title' => '<h3 class=\"widget-title\">',\n'after_title' => '</h3>',\n) );\nregister_sidebar( array(\n'name' => __( 'Third Footer Widget Area', 'kholisnet' ),\n'id' => 'third-footer-widget-area',\n'description' => __( 'The Third footer widget area', 'kholisnet' ),\n'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n'after_widget' => '</li>',\n'before_title' => '<h3 class=\"widget-title\">',\n'after_title' => '</h3>',\n) );\n}", "function trenza_theme_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'trenza' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'trenza' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Content Bottom 1', 'trenza' ),\n\t\t'id' => 'sidebar-2',\n\t\t'description' => __( 'Appears at the bottom of the content on posts and pages.', 'trenza' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Content Bottom 2', 'trenza' ),\n\t\t'id' => 'sidebar-3',\n\t\t'description' => __( 'Appears at the bottom of the content on posts and pages.', 'trenza' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "public function widgets( ) {\n $sidebar_config = array(\n 'name' => __('Sidebar', 'hoverboard'),\n 'id' => 'main-sidebar',\n 'description' => __('The primary widget area', 'hoverboard'),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n );\n register_sidebar($sidebar_config);\n\n do_action('hoverboard/widgets');\n }", "function gymfitness_widgets() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n // id for dynamic_sidebar()\n 'id'=> 'sidebar',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget'=> '</div>',\n 'before_title' => '<h3 class=\"text-primary\">',\n 'after_title' => '</h3>',\n )); \n}", "function agriflex_widgets_init() {\n\n // Area 1, located at the top of the sidebar.\n register_sidebar( array(\n 'name' => __( 'Right Column', 'agriflex' ),\n 'id' => 'right-column-widget-area',\n 'description' => __( 'The right column area', 'agriflex' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">\n <div class=\"widget-wrap\">',\n 'after_widget' => '</div></li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 4, located in the sidebar.\n register_sidebar( array(\n 'name' => __( 'Sidebar Navigation', 'agriflex' ),\n 'id' => 'sidebar-widget-navigation',\n 'description' => __( 'Sidebar Navigation', 'agriflex' ),\n 'before_title' => '<h3 class=\"widget-title\"><a>',\n 'after_title' => '</a></h3>',\n ) ); \n\n\n // Area 2, located in the second sidebar.\n register_sidebar( array(\n 'name' => __( 'Right Column Bottom', 'agriflex' ),\n 'id' => 'right-column-bottom-widget-area',\n 'description' => __( 'The right column bottom widget area', 'agriflex' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">\n <div class=\"widget-wrap\">',\n 'after_widget' => '</div></li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 3\n register_sidebar( array(\n 'name' => __( 'Home Page Bottom', 'agriflex' ),\n 'id' => 'home-middle-1',\n 'description' => __( 'Home Middle #1', 'agriflex' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) ); \n\n}", "public function override_sidebars_widgets_for_theme_switch()\n {\n }", "function yog_custom_sidebars() {\r\n\t$custom_sidebars = yog_helper()->get_theme_option( 'custom-sidebars' );\r\n\t$custom_sidebars = array_filter( (array)$custom_sidebars );\r\n\r\n\tif ( !empty( $custom_sidebars ) ) {\r\n\r\n\t\tforeach ( $custom_sidebars as $sidebar ) {\r\n\r\n\t\t\tregister_sidebar ( array (\r\n\t\t\t\t'name' => $sidebar,\r\n\t\t\t\t'id' => sanitize_title( $sidebar ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"primary widget clearfix %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<div class=\"section-title clearfix\"><h5>',\r\n\t\t\t\t'after_title' => '</h5><hr class=\"custom\"></div>',\r\n\t\t\t) );\r\n\t\t}\r\n\t}\r\n}", "function bones_register_sidebars() {\n register_sidebar(array(\n \t'id' => 'sidebar',\n \t'name' => 'Default Sidebar',\n \t'description' => 'The first (primary) sidebar.',\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h3 class=\"title widgettitle\"><span class=\"title\">',\n \t'after_title' => '</span><span class=\"side-icon icon-circle-arrow-right\"></span></h3>',\n ));\n\n\tregister_sidebar(array(\n\t 'id' => 'post',\n\t 'name' => 'Sidebar Post',\n\t 'description' => 'The Posts sidebar.',\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"title widgettitle\"><span class=\"title\">',\n\t 'after_title' => '</span><span class=\"side-icon icon-circle-arrow-right\"></span></span></h3>',\n\t));\n\tregister_sidebar(array(\n\t 'id' => 'page',\n\t 'name' => 'Sidebar Page',\n\t 'description' => 'The Pages sidebar.',\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h3 class=\"title widgettitle\"><span class=\"title\">',\n\t 'after_title' => '</span><span class=\"side-icon icon-circle-arrow-right\"></span></h3>',\n\t)); \n\t \n}" ]
[ "0.75337255", "0.7105763", "0.70128655", "0.6958141", "0.6936132", "0.68994963", "0.6839526", "0.67365664", "0.6620956", "0.66158795", "0.6540675", "0.6526998", "0.65110403", "0.6434694", "0.6402753", "0.6391378", "0.63322115", "0.62800354", "0.62608737", "0.6260805", "0.6218724", "0.6205658", "0.61627567", "0.61562955", "0.6145212", "0.6138573", "0.61259615", "0.6032784", "0.6017373", "0.6014334", "0.5999141", "0.5991017", "0.59535867", "0.593638", "0.5933789", "0.59335804", "0.593224", "0.5910296", "0.59098214", "0.5899134", "0.58716065", "0.5852925", "0.58496386", "0.5848665", "0.5834629", "0.5833677", "0.58139414", "0.5811735", "0.5804392", "0.5785574", "0.57765007", "0.5769271", "0.57396376", "0.5735991", "0.57231545", "0.5722752", "0.57126546", "0.5712133", "0.5704753", "0.57025576", "0.5702084", "0.5701504", "0.5676524", "0.56742215", "0.5660465", "0.56602615", "0.56377506", "0.5633511", "0.5629904", "0.5627115", "0.5622274", "0.56164473", "0.5611509", "0.56113", "0.5610918", "0.5608363", "0.5605075", "0.5593965", "0.5579277", "0.5579066", "0.55784607", "0.55742294", "0.5571202", "0.55672795", "0.55654943", "0.55636895", "0.5563012", "0.55579835", "0.5553126", "0.55397683", "0.5539298", "0.5530059", "0.5529002", "0.55281043", "0.55271775", "0.5524645", "0.5524321", "0.5521037", "0.55202323", "0.5520053" ]
0.782104
0
Traverses the JWT payload to the given claim and sets a value.
Проходит по JWT payload до указанного утверждения и устанавливает значение.
protected function internalSetClaim(&$payload, $claim, $value) { $current_claim = (is_array($claim)) ? array_shift($claim) : $claim; if (is_array($claim) && count($claim) > 0) { if (!isset($payload->$current_claim)) { $payload->$current_claim = new \stdClass(); } $this->internalSetClaim($payload->$current_claim, $claim, $value); } else { $payload->$current_claim = $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setClaim($key, $value){\n\t\t$this->payload[$key] = $value;\n\t\treturn $this;\n\t}", "public function update(Request $request, Claim $claim)\n {\n //\n }", "function setField($key, $value)\n{\n $host = getenv('Z_URL') ? getenv('Z_URL') : 'http://localhost:8080';\n $bearer = getenv('PAT');\n if (!$bearer) {\n throw new Exception('PAT not defined');\n }\n\n if (!isset($_SERVER['HTTP_AUTHORIZATION'])) {\n throw new Exception('Unathorised');\n }\n $token = trim(substr($_SERVER['HTTP_AUTHORIZATION'], 7));\n\n if (!$key || !$value) {\n throw new Exception('Key or value not passed');\n }\n\n // Get the keys\n $openidConfig = file_get_contents($host . '/oauth/v2/keys');\n $jwks = json_decode($openidConfig, true);\n // Decode JWT and get the userId out of it\n $decoded = JWT::decode($token, JWK::parseKeySet($jwks));\n $userId = $decoded->sub;\n\n if (!$userId) {\n throw new Exception('Couldn\\'t authenticate the user');\n }\n\n // Make the actual request using the PAT token of the service user that is allowed to make such requests\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => $host . '/management/v1/users/' . $userId . '/metadata/' . $key,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => '',\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 0,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => 'POST',\n CURLOPT_POSTFIELDS => json_encode([\n \"id\" => $userId,\n \"key\" => $key,\n \"value\" => $value\n ]),\n CURLOPT_HTTPHEADER => array(\n 'accept: application/json',\n 'Content-Type: application/json',\n \"Authorization: Bearer $bearer\"\n ),\n ));\n\n curl_exec($curl);\n curl_close($curl);\n}", "public function setDrupalClaims(JwtAuthGenerateEvent $event) {\n $event->addClaim(\n ['drupal', 'uid'],\n $this->currentUser->id()\n );\n }", "public static function setClaim ($app_name, $client_secret, $data) {\n # which is part of JWT access token\n $token = array(\n \"iss\" => \"https://example.org\",\n \"aud\" => $app_name,\n \"iat\" => 1356999524,\n \"nbf\" => 1357000000,\n \"data\" => $data\n );\n return JWT::encode($token, $client_secret);\n }", "public function updateJwtData(JWTCreatedEvent $event)\r\n {\r\n $data = $event->getData();\r\n\r\n $res = $this->user->findBy(['telephone'=>$data['telephone']]);\r\n $data['status'] =$res[0]->getStatus();\r\n $data['id'] = $res[0]->getId();\r\n\r\n $event->setData($data);\r\n }", "public function setaccess_token($value);", "public function setUserClaimValue(setUserClaimValue $parameters) {\n return $this->__soapCall('setUserClaimValue', array($parameters), array(\n 'uri' => 'http://service.ws.um.carbon.wso2.org',\n 'soapaction' => ''\n ));\n }", "public function setTokenClaim($key, $value)\n {\n $this->token->withClaim($key, $value);\n return $this;\n }", "protected function internalUnsetClaim(&$payload, $claim) {\n $current_claim = (is_array($claim)) ? array_shift($claim) : $claim;\n\n if (!isset($payload->$current_claim)) {\n return;\n }\n\n if (is_array($claim) && count($claim) > 0) {\n $this->internalUnsetClaim($payload->$current_claim, $claim);\n }\n else {\n unset($payload->$current_claim);\n }\n }", "public function setRememberToken($value)\n {\n $field = $this->getRememberTokenName();\n\n $this->{$field} = $value;\n }", "public function setVariableValue(ContextInterface $ctx, SetVariableValueRequest $request): void;", "public function setUser(?Identity $value): void {\n $this->getBackingStore()->set('user', $value);\n }", "protected function internalGetClaim(&$payload, $claim) {\n $current_claim = (is_array($claim)) ? array_shift($claim) : $claim;\n\n if (!isset($payload->$current_claim)) {\n return NULL;\n }\n\n if (is_array($claim) && count($claim) > 0) {\n return $this->internalGetClaim($payload->$current_claim, $claim);\n }\n else {\n return $payload->$current_claim;\n }\n }", "private function setJwtCookie(Controller $controller): void\n {\n $expire = '+1 day';\n $cookieKey = Configure::read('Session.cookie') . '-JWT';\n $cookie = new Storage(\n $controller,\n $cookieKey,\n ['http' => false, 'expire' => $expire]\n );\n\n $existingToken = $cookie->read();\n\n // User not logged-in: No JWT-cookie for you!\n if (!$this->CurrentUser->isLoggedIn()) {\n if ($existingToken) {\n $cookie->delete();\n }\n\n return;\n }\n\n if ($existingToken) {\n // Encoded JWT token format: <header>.<payload>.<signature>\n $parts = explode('.', $existingToken);\n $payloadEncoded = $parts[1];\n // [performance] Done every logged-in request. Don't decrypt whole\n // token with signature. We only make sure it exists, the auth\n // happens elsewhere.\n $payload = Jwt::jsonDecode(Jwt::urlsafeB64Decode($payloadEncoded));\n $isCurrentUser = $payload->sub === $this->CurrentUser->getId();\n // Assume expired if within the next two hours.\n $aboutToExpire = $payload->exp > (time() - 7200);\n // Token doesn't require an update if it belongs to current user and\n // isn't about to expire.\n if ($isCurrentUser && !$aboutToExpire) {\n return;\n }\n }\n\n /// Set new token\n // Use easy to change cookieSalt to allow emergency invalidation of all\n // existing tokens.\n $jwtKey = Configure::read('Security.cookieSalt');\n $jwtPayload = [\n 'sub' => $this->CurrentUser->getId(),\n // Token is valid for one day.\n 'exp' => (new DateTimeImmutable($expire))->getTimestamp(),\n ];\n $jwtToken = \\Firebase\\JWT\\JWT::encode($jwtPayload, $jwtKey);\n $cookie->write($jwtToken);\n }", "public function setPrincipalId(?string $value): void {\n $this->getBackingStore()->set('principalId', $value);\n }", "public function setPrincipalId(?string $value): void {\n $this->getBackingStore()->set('principalId', $value);\n }", "public function setPrincipalId(?string $value): void {\n $this->getBackingStore()->set('principalId', $value);\n }", "function setRefreshedToken($value)\n {\n $this->_props['RefreshedToken'] = $value;\n }", "public function set($key, $value, $expiresIn = null);", "public function set(string $token): void;", "public function claimReviewed($claimReviewed)\n {\n return $this->setProperty('claimReviewed', $claimReviewed);\n }", "public function approveClaim($input);", "function setObject(mofilmUserProfileMovie $inObject) {\n\t\treturn $this->_setValue($inObject);\n\t}", "public function setRememberToken($value)\n {\n if (! empty($this->getRememberTokenName())) {\n $this->{$this->getRememberTokenName()} = $value;\n }\n }", "public function setRememberToken($value)\n {\n if (! empty($this->getRememberTokenName())) {\n $this->{$this->getRememberTokenName()} = $value;\n }\n }", "public function update(Claim $claim)\n {\n $claim->supplier_id = $this->validateRequest()['supplier_id'];\n $claim->claim_date = $this->validateRequest()['claim_date'];\n $claim->nir = implode(',', $this->validateRequest()['nir']);\n $claim->defects = $this->validateRequest()['defects'];\n $claim->claim_amount = $this->validateRequest()['claim_amount'];\n $claim->claim_value = $this->validateRequest()['claim_value'];\n $claim->claim_currency = $this->validateRequest()['claim_currency'];\n $claim->observations = $this->validateRequest()['observations'];\n $claim->claim_status_id = 1;\n $claim->user_id = auth()->user()->id;\n $claim->save();\n\n return back();\n }", "public function store(Claim $claim, Request $request)\n {\n $claim->supplier_id = $this->validateRequest()['supplier_id'];\n $claim->company_id = $request->session()->get('company_was_selected');;\n $claim->claim_date = $this->validateRequest()['claim_date'];\n $claim->nir = implode(',', $this->validateRequest()['nir']);\n $claim->defects = $this->validateRequest()['defects'];\n $claim->claim_amount = $this->validateRequest()['claim_amount'];\n $claim->claim_value = $this->validateRequest()['claim_value'];\n $claim->claim_currency = $this->validateRequest()['claim_currency'];\n $claim->observations = $this->validateRequest()['observations'];\n $claim->claim_status_id = 1;\n $claim->user_id = auth()->user()->id;\n $claim->save();\n\n return back();\n }", "public function setFieldValue($value);", "public function setRoleMemberInfo(?Identity $value): void {\n $this->getBackingStore()->set('roleMemberInfo', $value);\n }", "public function set(Fixture $fixture, $object, $property, $value);", "public function setPrincipal(?DirectoryObject $value): void {\n $this->getBackingStore()->set('principal', $value);\n }", "public function setPrincipal(?DirectoryObject $value): void {\n $this->getBackingStore()->set('principal', $value);\n }", "public function setAudience(string $audience)\n {\n return $this->setPayload(self::JWT_CLAIM_AUDIENCE, $audience);\n }", "public function setToken(string $token);", "public function __construct(Claim $claim)\n {\n $this->claim = $claim;\n }", "public function setFederatedTokenId(?string $value): void {\n $this->getBackingStore()->set('federatedTokenId', $value);\n }", "public function parseClaims($jwt)\n {\n //PHP 7 has convenient \"??\" operator, but we're making this\n //5.4+ compatible. So this is a simple \"safe array access\" that\n //won't cause warnings or errors if we try to get a non-existent key\n $get = function ($arr, $key) {\n return array_key_exists($key, $arr) ? $arr[$key] : null;\n };\n\n $hasResourceOwner = array_key_exists('http://byu.edu/claims/resourceowner_byu_id', $jwt);\n\n $jwt['byu']['client'] = [\n 'byuId' => $get($jwt, 'http://byu.edu/claims/client_byu_id'),\n 'claimSource' => $get($jwt, 'http://byu.edu/claims/client_claim_source'),\n 'netId' => $get($jwt, 'http://byu.edu/claims/client_net_id'),\n 'personId' => $get($jwt, 'http://byu.edu/claims/client_person_id'),\n 'preferredFirstName' => $get($jwt, 'http://byu.edu/claims/client_preferred_first_name'),\n 'prefix' => $get($jwt, 'http://byu.edu/claims/client_name_prefix'),\n 'restOfName' => $get($jwt, 'http://byu.edu/claims/client_rest_of_name'),\n 'sortName' => $get($jwt, 'http://byu.edu/claims/client_sort_name'),\n 'subscriberNetId' => $get($jwt, 'http://byu.edu/claims/client_subscriber_net_id'),\n 'suffix' => $get($jwt, 'http://byu.edu/claims/client_name_prefix'),\n 'surname' => $get($jwt, 'http://byu.edu/claims/client_surname'),\n 'surnamePosition' => $get($jwt, 'http://byu.edu/claims/client_surname_position')\n ];\n\n if ($hasResourceOwner) {\n $jwt['byu']['resourceOwner'] = [\n 'byuId' => $get($jwt, 'http://byu.edu/claims/resourceowner_byu_id'),\n 'netId' => $get($jwt, 'http://byu.edu/claims/resourceowner_net_id'),\n 'personId' => $get($jwt, 'http://byu.edu/claims/resourceowner_person_id'),\n 'preferredFirstName' => $get($jwt, 'http://byu.edu/claims/resourceowner_preferred_first_name'),\n 'prefix' => $get($jwt, 'http://byu.edu/claims/resourceowner_prefix'),\n 'restOfName' => $get($jwt, 'http://byu.edu/claims/resourceowner_rest_of_name'),\n 'sortName' => $get($jwt, 'http://byu.edu/claims/resourceowner_sort_name'),\n 'suffix' => $get($jwt, 'http://byu.edu/claims/resourceowner_suffix'),\n 'surname' => $get($jwt, 'http://byu.edu/claims/resourceowner_surname'),\n 'surnamePosition' => $get($jwt, 'http://byu.edu/claims/resourceowner_surname_position')\n ];\n }\n\n $webresCheckKey = $hasResourceOwner ? 'resourceOwner' : 'client';\n $jwt['byu']['webresCheck'] = [\n 'byuId' => $jwt['byu'][$webresCheckKey]['byuId'],\n 'netId' => $jwt['byu'][$webresCheckKey]['netId'],\n 'personId' => $jwt['byu'][$webresCheckKey]['personId']\n ];\n\n $jwt['wso2'] = [\n 'apiContext' => $get($jwt, 'http://wso2.org/claims/apicontext'),\n 'application' => [\n 'id' => $get($jwt, 'http://wso2.org/claims/applicationid'),\n 'name' => $get($jwt, 'http://wso2.org/claims/applicationname'),\n 'tier' => $get($jwt, 'http://wso2.org/claims/applicationtier')\n ],\n 'clientId' => $get($jwt, 'http://wso2.org/claims/client_id'),\n 'endUser' => $get($jwt, 'http://wso2.org/claims/enduser'),\n 'endUserTenantId' => $get($jwt, 'http://wso2.org/claims/enduserTenantId'),\n 'keyType' => $get($jwt, 'http://wso2.org/claims/keytype'),\n 'subscriber' => $get($jwt, 'http://wso2.org/claims/subscriber'),\n 'tier' => $get($jwt, 'http://wso2.org/claims/tier'),\n 'userType' => $get($jwt, 'http://wso2.org/claims/usertype'),\n 'version' => $get($jwt, 'http://wso2.org/claims/version')\n ];\n\n return $jwt;\n }", "public function SetAuthenticatedUser($profile){\n\t\t$this->data['authenticated_user'] = $profile;\n\t}", "public function setAttribute($key, $value)\n \t{\n\t $isRememberTokenAttribute = $key == $this->getRememberTokenName();\n\t if (!$isRememberTokenAttribute)\n\t {\n\t parent::setAttribute($key, $value);\n\t }\n\t}", "private function setUserTokenCookie()\n {\n if (!empty($this->OWLUserToken)) {\n $cookieValue = $this->generateSignedCookie($this->OWLUserToken);\n $this->setPHPCookie($this->cookieNames['USER_TOKEN'], $cookieValue);\n }\n\n }", "public function setRememberToken($value)\n {\n $tokens = $this->model->authTokens;\n if (isset($tokens[0])) {\n $token = $tokens[0];\n $token->token($value);\n $token->save();\n } else {\n // No token found, make one\n $token = new AuthTokenModel(Gatekeeper::getDatasource(), [\n 'token' => $value,\n 'user_id' => $this->model->id,\n 'expires' => strtotime('+14 days')\n ]);\n $token->save();\n }\n }", "public function claim($sequence);", "public function set(string $key, $value, int $expiresAfterSeconds);", "function updateToken(TokenInterface $token);", "public function setClaimedBySalesmanStatus(Request $request)\n {\n $counter = 0;\n $claim_status = $request->claimed_by_salesman == 0 ? \"Not Claimed\" : \"Claimed\";\n $selected_invoice_customers = $request->selected_invoice_customers;\n if(count($selected_invoice_customers) > 0){\n foreach($selected_invoice_customers as $ivc_id){\n try {\n $invoice_customer = InvoiceCustomer::findOrFail($ivc_id);\n $invoice_customer->claimed_by_salesman = $request->claimed_by_salesman;\n $invoice_customer->save();\n $counter++;\n } catch (Exception $e) {\n return $e;\n }\n \n }\n }\n\n return redirect()->back()\n ->with('successMessage', \"$counter invoice customer claimed_by_salesman has been updated to $claim_status\");\n }", "public function setTwilioTokenAttribute($value)\n {\n $this->attributes['twilio_token'] = encrypt($value);\n }", "public function updateStatus(Claim $claim, Request $request)\n {\n $claim->claim_status_id = $request->claim_status_id;\n $claim->resolution = $request->resolution;\n $claim->save();\n\n return back();\n }", "public function setServicePrincipalObjectId(?string $value): void {\n $this->getBackingStore()->set('servicePrincipalObjectId', $value);\n }", "public function setUserClaimValues(SetUserClaimValues $parameters) {\n return $this->__soapCall('setUserClaimValues', array($parameters), array(\n 'uri' => 'http://service.ws.um.carbon.wso2.org',\n 'soapaction' => ''\n ));\n }", "protected function setToken(Token &$token, $value) {\n\t\tif (is_array($value)) {\n\t\t\t$token->type = Token::T_ARRAY;\n\t\t\t$token->value = $value;\n\t\t} elseif (is_numeric($value)) {\n\t\t\t$token->type = Token::T_NUMBER;\n\t\t\t$token->value = $value;\n\t\t} elseif (preg_match(\"/^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/\", $value)) {\n\t\t\t$this->setDateToken($token, $value);\n\t\t} elseif (in_array($value, array('true', 'false'))) {\n\t\t\t$token->type = Token::T_BOOLEAN;\n\t\t\t$token->value = $value == 'true';\n\t\t} else {\n\t\t\t$token->type = Token::T_TEXT;\n\t\t\t$token->value = $value;\n\t\t}\n\t}", "public function setToken(Token $token);", "public function setClaimDocAccess(Request $request, $claim_id, $doc_id) {\n $currentUser = MICHelper::currentUser();\n\n $claim = Claim::find($claim_id);\n $doc = ClaimDoc::find($doc_id);\n $i_cda = $request->input('cda');\n\n if (!is_array($i_cda)) {\n $i_cda = array();\n }\n\n // Remove Access\n $cda = ClaimDocAccess::where('doc_id', $doc_id)->get();\n foreach ($cda as $row) {\n if (isset( $i_cda[$row->partner_uid] )) {\n unset($i_cda[$row->partner_uid]); // Already Access\n } else {\n $row->forceDelete();\n // Activity Feed - Remove Access to Doc\n $_user = User::find($row->partner_uid);\n $ca_params = array(\n 'claim' => $claim, \n 'doc' => $doc, \n 'user' => $_user, \n );\n MICClaim::addClaimActivity($claim->id, $currentUser->id, 'remove_access_doc', $ca_params);\n MICNotification::sendNotification('claim.doc.remove_access_doc', $ca_params);\n }\n }\n\n // Grant Access\n foreach ($i_cda as $uid=>$item) {\n $n_cda = new ClaimDocAccess;\n $n_cda->doc_id = $doc_id;\n $n_cda->partner_uid = $uid;\n $n_cda->save();\n\n // Activity Feed - Grant Access to Doc\n $_user = User::find($uid);\n $ca_params = array(\n 'claim' => $claim, \n 'doc' => $doc, \n 'user' => $_user, \n );\n MICClaim::addClaimActivity($claim->id, $currentUser->id, 'grant_access_doc', $ca_params);\n MICNotification::sendNotification('claim.doc.grant_access_doc', $ca_params);\n }\n\n return response()->json(['status'=>'success']);\n }", "public function setUserValue($context)\n {\n// $token = $context->getToken();\n// if ($token) {\n// $this->user = $token->getUser();\n// } else {\n// $this->user = null;\n// }\n var_dump($context->get('security.token_storage'));\n }", "public function offsetSet($offset, $value)\n {\n $this->session[$offset] = $value;\n }", "public function updateJwtData(JWTCreatedEvent $event){\n $userEvent = $event->getUser();\n\n // data get on the variable $event for add new dataUser like his firstname and lastname\n $dataEventUpdate = $event->getData();\n\n // VsCode doesn't know that the $userEvent is instance of entity user that's why, those function are underlined in red color\n $dataEventUpdate['firstName'] = $userEvent->getFirstName();\n $dataEventUpdate['lastName'] = $userEvent->getLastName();\n\n $event->setData($dataEventUpdate) ;\n }", "public function setUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('userPrincipalName', $value);\n }", "public function setUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('userPrincipalName', $value);\n }", "public function setUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('userPrincipalName', $value);\n }", "public function setUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('userPrincipalName', $value);\n }", "public function setUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('userPrincipalName', $value);\n }", "public function setRememberToken($value)\n {\n $this->token = $value;\n }", "public function setRememberToken($value)\n {\n $this->token = $value;\n }", "public function setAttribute($key, $value)\n {\n $isRememberTokenAttribute = $key == $this->getRememberTokenName();\n if (!$isRememberTokenAttribute)\n {\n parent::setAttribute($key, $value);\n }\n }", "public function setRequestToken(string $requestToken): void\n {\n }", "public function setAccount($accountId, $bearerToken, $bearerTokenExpiry);", "public function set ( $identifier, $value );", "public function api_set($in_key, $in_value) {\n\t\t$set_url = $this->api_base . $this->api_version . 'key';\n\t\t$set_args = array('key' => $in_key, 'value' => $in_value);\n\t\t$set_call = new rest_call('PUT', $set_url, $set_args, $this->token);\n\t\t$response = $set_call->send();\n\t\tif ($response->status === 'ok') {\n\t\t\techo $response->status . \"\\n\";\n\t\t}\n\t}", "public function setRememberToken($value)\n {\n }", "public function setRememberToken($value)\n {\n }", "public function setRememberToken($value)\n {\n }", "public function setRememberToken($value)\n {\n }", "public function set(Identity $identity): void;", "public function onJWTCreated(JWTCreatedEvent $event): void\n {\n $request = $this->requestStack->getCurrentRequest() ?: Request::createFromGlobals();\n $user = $event->getUser();\n\n $manager = $this->registry->getManager();\n $repository = $manager->getRepository(User::class);\n $current = $repository->findOneBy(['username' => $user->getUsername()]);\n\n $data = $event->getData();\n\n if (isset($data['roles'])) {\n unset($data['roles']);\n }\n\n if (isset($data['tokenId']) && empty($data['tokenId'])) {\n // todo Generate long live token for access control\n $data['ipAddress'] = $request->getClientIp();\n } else {\n $data['uid'] = $current->getId();\n }\n\n $event->setData($data);\n }", "public function setValueObjectId(?string $value): void {\n $this->getBackingStore()->set('valueObjectId', $value);\n }", "public function setToken();", "function updateClaim($json) {\n $list = json_decode($json, true);\n $list = $list[0];\n $claimID = $list['id'];\n $theClaim = $list['claim'];\n $corrAnsw = $list['correctAnswer'];\n\n $connection = db_connect();\n echo setClaimWorker($connection, $claimID, $theClaim, $corrAnsw);\n}", "public function setStandardClaims(JwtAuthGenerateEvent $event) {\n $event->addClaim('iat', time());\n // @todo make these more configurable.\n $event->addClaim('exp', strtotime('+1 hour'));\n }", "private function setJWT() {\n include dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php';\n $this->jwt = new JWT();\n }", "function set_custom_field($member,$field,$amount)\n\t{\n\t\t$id=$this->connection->query_value_null_ok('profilefields','profilefieldid',array('title'=>'ocp_'.$field));\n\t\tif (is_null($id)) return;\n\t\t$this->connection->query_update('userfields',array('field'.strval($id)=>$amount),array('userid'=>$member),'',1);\n\t}", "public function setAuthIdentity($identity);", "public function setAnnotationParamValue($value);", "public function getClaim($claim)\n {\n return $this->payload()->get($claim);\n }", "function setHasRefreshedToken($value)\n {\n $this->_props['HasRefreshedToken'] = $value;\n }", "public function setAudience(?MeetingAudience $value): void {\n $this->getBackingStore()->set('audience', $value);\n }", "public function setAttribute($key, $value)\n\t{\n\t\t$isRememberTokenAttribute = $key == $this->getRememberTokenName();\n\t\tif (!$isRememberTokenAttribute)\n\t\t{\n\t\t parent::setAttribute($key, $value);\n\t\t}\n\t}", "public function setDeviceToken(Request $request)\n {\n $current_user = auth()->user();\n $current_user->device_token = request('device_token');\n $current_user->save();\n return response()->json(['message' => 'deviceToken is saved successfully'], 200);\n\n\n }", "public function setEffectivePropertyValueForNode(\n\t\tContextInterface $ctx,\n\t\tSetEffectivePropertyValueForNodeRequest $request\n\t): void;", "public function setSessionValue($key, $value);", "public function setAttribute($key, $value)\n {\n $isRememberTokenAttribute = $key == $this->getRememberTokenName();\n if (!$isRememberTokenAttribute)\n {\n parent::setAttribute($key, $value);\n }\n }", "public function setAttribute($key, $value)\n {\n $isRememberTokenAttribute = $key == $this->getRememberTokenName();\n if (!$isRememberTokenAttribute)\n {\n parent::setAttribute($key, $value);\n }\n }", "public function updateToken(TokenInterface $token);", "public function onJWTCreated(JWTCreatedEvent $event){ \n $payload = $event->getData();\n $payload['user_info'] = $event->getUser()->getDetails(); \n $event->setData($payload);\n \n }", "public function setClaim(AwsCognitoClaim $claim)\n {\n $this->claim = $claim;\n $this->token = $this->setToken($claim->getToken());\n\n return $this;\n }", "public function setReturnValue(ContextInterface $ctx, SetReturnValueRequest $request): void;", "function entity_metadata_user_set_properties($account, $name, $value) {\n switch ($name) {\n case 'roles':\n $account->roles = array_intersect_key(user_roles(), array_flip($value));\n break;\n }\n}", "public function setPrincipal($principal) {\r\n\t\t@session_regenerate_id(true);\r\n\t\t$this->principal = $principal;\r\n\t}", "public function setAudience($audience){\n\t\treturn $this->setClaim('aud', $audience);\n }", "public function store(ClaimRequest $request) //ClaimRequest\n {\n\n $claim = $this->storeUpdateCommons($request, 0);\n $this->carrier_email_fax_notifcation($claim, $request);\n $this->recipient_email_fax_notifcation($claim, $request);\n $this->setUnSetSession();\n return redirect()->to('claim');\n }", "public function setIdentity(?IdentitySet $value): void {\n $this->getBackingStore()->set('identity', $value);\n }" ]
[ "0.61161107", "0.5574237", "0.55351037", "0.5224094", "0.5095632", "0.5094144", "0.50593626", "0.5018905", "0.5000803", "0.49686524", "0.4956498", "0.4954332", "0.49280933", "0.48923603", "0.4892011", "0.48841655", "0.48841655", "0.48841655", "0.48546278", "0.48039994", "0.48000723", "0.4798062", "0.4779433", "0.47640824", "0.4742506", "0.4742506", "0.47215593", "0.4709678", "0.4697869", "0.46935457", "0.46832412", "0.46746182", "0.46746182", "0.4669262", "0.46363795", "0.46245706", "0.46235228", "0.4618519", "0.46149966", "0.4614586", "0.46114576", "0.46068946", "0.46041942", "0.46017677", "0.45859197", "0.45738065", "0.4563148", "0.45621175", "0.45413974", "0.45387927", "0.45296577", "0.45271385", "0.45214462", "0.45078754", "0.45030954", "0.45022967", "0.44965172", "0.44965172", "0.44965172", "0.44965172", "0.44965172", "0.4495817", "0.4495817", "0.4494519", "0.44857115", "0.4482694", "0.448179", "0.4476985", "0.44693533", "0.44693533", "0.44693533", "0.44693533", "0.44672945", "0.44647688", "0.44640544", "0.44558325", "0.44512036", "0.44496042", "0.44457543", "0.4443894", "0.44410977", "0.44399795", "0.44384062", "0.4437668", "0.44352353", "0.44334677", "0.44267532", "0.44264954", "0.44211838", "0.44189775", "0.44189775", "0.44170016", "0.44117627", "0.44107985", "0.44046673", "0.44041914", "0.44014835", "0.438868", "0.43820915", "0.43815696" ]
0.70129365
0
Traverses the JWT payload to the given claim and unset its value.
Проходит по JWT payload до указанного утверждения и удаляет его значение.
protected function internalUnsetClaim(&$payload, $claim) { $current_claim = (is_array($claim)) ? array_shift($claim) : $claim; if (!isset($payload->$current_claim)) { return; } if (is_array($claim) && count($claim) > 0) { $this->internalUnsetClaim($payload->$current_claim, $claim); } else { unset($payload->$current_claim); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Claim $claim)\n {\n //\n }", "public function destroy(Claim $claim)\n {\n //\n }", "protected function _unsetTokenRequest() {\n \n $sessionStorage = $this->getSessionStorage();\n $sessionStorage->tokenRequest = null;\n unset($sessionStorage->tokenRequest);\n }", "public function discardToken(): void {\n $this->token = null;\n\n $settings = $this->settings;\n\n $cacheKey = 'msdynwebapi.token.' . sha1( $settings->instanceURI . $settings->applicationID . $settings->applicationSecret ?? $settings->certificatePath );\n $this->getPool()->deleteItem( $cacheKey );\n }", "public function destroy(Claim $claim)\n {\n $claim->delete();\n return back();\n }", "public abstract function clearToken();", "public function unsetSessionValue($key);", "protected function unsetOWLUserToken()\n {\n $owlFactory = new OwlFactory();\n $owlFactory->userLogout(/*user token?*/);\n }", "public function offsetUnset($offset)\n {\n unset($this->session[$offset]);\n }", "public function testPayloadTamperNoSignatureCheck()\n {\n $token = new Token();\n $token->create();\n\n $tokenParts = explode('.', (string)$token);\n $jsonString = base64_decode($tokenParts[1]);\n $payload = json_decode($jsonString === false ? '' : $jsonString, true);\n $payload['var1'] = 'fiddled_with';\n\n $jsonString = json_encode($payload);\n $jsonData = $tokenParts[0] . '.' .\n Base64Url::encode($jsonString === false ? '' : $jsonString) . '.' .\n $tokenParts[2];\n \n $newToken = new Token();\n $newToken->createFromJson($jsonData, false);\n $this->assertEquals($newToken->getClaim('var1'), 'fiddled_with');\n }", "public function removeSecurityToken()\n {\n $this->security_token = null;\n }", "public function __unset($property);", "public function erase(string $personalToken): void;", "public function unsetToken()\n {\n unset($this->token);\n $this->tokenManager->deleteToken();\n }", "function remove_sensitive_data($object,$advanced=false) {\n\n // password\n if (isset($object['password'])) {\n unset($object['password']);\n }\n\n //\n // advanced, ex: when user is logged in, and request data regarding another user\n if ($advanced == true) {\n\n // token\n if (isset($object['token'])) {\n unset($object['token']);\n }\n\n // email address\n if (isset($object['email_address'])) {\n unset($object['email_address']);\n }\n\n // firebase_identification_token\n if (isset($object['firebase_identification_token'])) {\n unset($object['firebase_identification_token']);\n }\n\n }\n //\n //\n\n return $object;\n}", "public function remove(){\n\n if($this->cookies->has('RMU')){\n $this->cookies->get('RMU')->delete();\n\n }\n\n if($this->cookies->has('RMT')){\n $this->cookies->get('RMT')->delete();\n }\n\n $this->session->destroy('auth-identity');\n }", "public function removePreviousClaim($previousClaim) {\n\n\t\tif(empty($this->_previousClaimsModel)) {\n\n $this->_previousClaimsModel = new Datasource_Insurance_PreviousClaims();\n }\n\t\t$this->_previousClaimsModel->removePreviousClaim($previousClaim);\n\t}", "#[ReturnTypeWillChange]\n public function offsetUnset($offset): void\n {\n assert(is_array($this->body));\n unset($this->body[$offset]);\n }", "public function __invoke(Request $request)\n {\n Auth::user()->token()->revoke();\n // Auth::user()->tokens()->first()->revoke();\n // $request->user()->tokens->each(function ($token, $key) {\n // $token->delete();\n // });\n // dd($token);\n // $token->revoke();\n // Auth::guard('api')->logout();\n return $this->respondWithMessage(\"User logout successfully.\");\n }", "public function offsetUnset($offset)\n {\n unset($this->value[$offset]);\n }", "public function offsetUnset($property): void {\n NestedArray::unsetValue($this->data, (array) $property);\n }", "public function clearTokens() {\n $this->request->session()->forget(array('access_token','refresh_token','token_expires'));\n }", "public function removeToken($key);", "public function removePasswordResetToken()\n {\n \t$this->password_reset_token = null;\n }", "public function unset($property) {\n $this->offsetUnset($property);\n }", "public function unsetFormToken($path, $token = '')\n {\n $tokenName = Core\\Session::XSRF_TOKEN_NAME;\n if (empty($token) && isset($_POST[$tokenName])) {\n $token = $_POST[$tokenName];\n }\n if (!empty($token) && is_array($_SESSION[$tokenName]) === true) {\n if (isset($_SESSION[$tokenName][$path])) {\n unset($_SESSION[$tokenName][$path]);\n }\n }\n }", "public function release_claim( ActionScheduler_ActionClaim $claim ) {\n\t\t/** @var \\wpdb $wpdb */\n\t\tglobal $wpdb;\n\t\t$wpdb->update( $wpdb->actionscheduler_actions, [ 'claim_id' => 0 ], [ 'claim_id' => $claim->get_id() ], [ '%d' ], [ '%d' ] );\n\t\t$wpdb->delete( $wpdb->actionscheduler_claims, [ 'claim_id' => $claim->get_id() ], [ '%d' ] );\n\t}", "public function unset(): void\n {\n if (!$this->handle) {\n $this->model->customAttributes()->delete();\n } else {\n $ak = $this->getAttributeKeyByHandle($this->handle);\n $this->model->customAttributes()->where('key_id', $ak->id)->delete();\n }\n\n Cache::forget($this->makeCacheKey($this->handle));\n Cache::forget($this->makeCacheKey());\n }", "public function clearToken()\n {\n $this->session->remove($this->sessionVariableName);\n }", "public function unset(string $field): void;", "public function offsetUnset($offset)\n {\n foreach($this->fields as $field) {\n /** @var $field Field */\n if ($field->getName() === $offset) {\n $this->fields->detach($field);\n break;\n }\n }\n }", "public function unsetAccount();", "public abstract function logout($jwt);", "public function revokeAuthCodeRelatedTokens($auth_code);", "public function __unset($property_name);", "public function offsetUnset($offset) {\n if ($this->offsetExists($offset)) {\n $this[$offset] = null;\n }\n }", "public function remove()\n {\n if ($this->cookies->has('RMU')) {\n $this->cookies->get('RMU')->delete();\n }\n if ($this->cookies->has('RMT')) {\n $this->cookies->get('RMT')->delete();\n }\n\n $this->session->remove('auth-identity');\n }", "public function offsetUnset($offset) {\n if ($this->offsetExists($offset)) {\n $this->{$offset} = null;\n }\n }", "public function offsetUnset($offset)\n {\n $hash = $this->hashKey($offset);\n \n unset($this->elements[$hash]);\n }", "public function removeAuthorization($access_token);", "public function unset_field(string $p_fieldname) {\n if (array_key_exists($p_fieldname,$this->fields)) {\n unset($this->fields[$p_fieldname]);\n } else if (array_key_exists($p_fieldname,$this->fields_computed)) {\n unset($this->fields_computed[$p_fieldname]);\n } else if (array_key_exists($p_fieldname,$this->fields_ro)) {\n unset($this->fields_ro[$p_fieldname]);\n }\n }", "#[\\ReturnTypeWillChange]\n public function offsetUnset(mixed $offset): void\n {\n unset($this->attributes[$offset]);\n }", "public static function __fieldUnset(UnsetPropertyHook $hook): void;", "public function offsetUnset($offset)\n {\n $this->$offset = null;\n }", "public function offsetUnset($offset)\n {\n $this->$offset = null;\n }", "public function removePasswordResetToken(): void\n {\n $this->password_reset_token = null;\n }", "#[\\ReturnTypeWillChange]\n public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->fieldValues[$offset]);\n }", "public function offsetUnset($offset)\n\t{\n\t\tunset($this->properties[$offset]);\n\t}", "public function __unset($attr) {\n \n // Request is an object attribute\n if (@array_key_exists($attr, $this->_pattern)) {\n $this->_pattern[$attr] = null;\n }\n }", "public function untrackCacheStorageForOrigin(ContextInterface $ctx, UntrackCacheStorageForOriginRequest $request): void;", "function adrotate_remove_capability($capability){\n\n\t$check_order = adrotate_get_sorted_roles();\n\n\tforeach($check_order as $role) {\n\t\t$role = get_role($role->name);\n\t\t$role->remove_cap($capability);\n\t}\n\n}", "public function removePasswordResetToken() {\n\t\t$this -> password_reset_token = null;\n\t}", "public function offsetUnset($offset)\n {\n unset($this->sanitized[$offset]);\n }", "protected function internalGetClaim(&$payload, $claim) {\n $current_claim = (is_array($claim)) ? array_shift($claim) : $claim;\n\n if (!isset($payload->$current_claim)) {\n return NULL;\n }\n\n if (is_array($claim) && count($claim) > 0) {\n return $this->internalGetClaim($payload->$current_claim, $claim);\n }\n else {\n return $payload->$current_claim;\n }\n }", "public function removeProperty($property);", "public function offsetUnset($offset)\n\t{\n\t\tunset($_SESSION[$offset]);\n\t}", "public function unsetRevokeOnlyAccessToken(): void\n {\n $this->revokeOnlyAccessToken = [];\n }", "public function offsetUnset($offset)\n {\n if($this->offsetExists($offset)) {\n $this->fields[$offset]->setValue(null);\n }\n }", "public function __unset($property) {\n parent::offsetUnset($property);\n }", "public function offsetUnset($offset) {\n\t\tif (isset($query[$property])) {\n\t\t\t$this->query['property'] = null;\n\t\t}\n\t}", "public function offsetUnset($offset)\n {\n unset($this->body[$offset]);\n }", "public function unmap($obj);", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n $this->save(false);\n }", "public function removePasswordResetToken()\n\t{\n\t\t$this->u_password_reset_token = null;\n\t}", "public function removePasswordResetToken() {\n\t\t$this->password_reset_token = null;\n\t}", "public function deleteItemClaim()\n {\n if (!empty($this->item_claim_additional_upload)\n && Storage::disk('local')->exists('item_claim_doc/' . $this->item_claim_additional_upload)) {\n Storage::disk('local')->delete('item_claim_doc/' . $this->item_claim_additional_upload);\n }\n\n // then delete the record in item_claim table\n $this->delete();\n }", "public function releaseClaim() {\n // DB_DataObject doesn't let us save nulls right now\n $sql = sprintf(\"UPDATE irc_waiting_message SET claimed=NULL WHERE id=%d\", $this->id);\n $this->query($sql);\n\n $this->claimed = null;\n $this->encache();\n }", "public function unsetAction()\n {\n self::settingCookie('1');\n self::commonFunctionForSetUnsetCookie();\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function downPayload();", "public function removePasswordResetToken()\r\n {\r\n $this->password_reset_token = null;\r\n }", "public function removePasswordResetToken()\r\n {\r\n $this->password_reset_token = null;\r\n }", "public function removePasswordResetToken()\r\n {\r\n $this->password_reset_token = null;\r\n }", "public function offsetUnset($object) {\n\t\t$this->isModified = TRUE;\n\t\tunset($this->storage[$this->hash($object)]);\n\t}", "public function UnsetAuthenticatedUser(){\n\t\tunset($this->data['authenticated_user']);\n\t}", "private function ajax_remCompanyMember($payload) {\n\t\t// split at first equal sign\n\t\t$pos=strpos($payload,\"=\");\n\t\tif (!$pos) return \"false\";\n\n\t\t$companyId=substr($payload,0,$pos)+0;\n\t\t$email=trim(substr($payload,$pos+1));\n\t\tglobal $wpdb;\n\t\t$cmpMailAccTable=$wpdb->prefix . 'mgremailwhitelist_companymailaccounts';\n\t\tif (!$wpdb->delete(\n\t\t\t$cmpMailAccTable,\n\t\t\tarray(\"company_id\"=>$companyId, \"email_id\"=>$email),\n\t\t\tarray('%d','%s')\n\t\t)) return \"false\";\n\t\treturn \"true\";\n\t}", "public function deleteToken()\n {\n Settings::set('oAuth_token', null);\n }", "public function offsetUnset($offset)\n {\n unset($this->store->memoized[$offset]);\n }", "public function offsetUnset(mixed $offset): void\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n if ($offset instanceof UniqueId) {\n $offset = $offset->id();\n }\n\n $this->elements->offsetUnset($offset);\n }", "public function offsetUnset($offset)\n {\n $this->set($offset, null);\n }", "public function removePasswordResetToken()\n {\n $this->resetToken = null;\n }", "public function removePasswordResetToken() {\r\n $this->password_reset_token = null;\r\n }", "#[\\ReturnTypeWillChange]\n\tpublic function offsetUnset($offset) {\n\t\t// TODO Should this be allowed? Does allowing this cause an expectation\n\t\t// that were the same doc commenct parsed again the value would still be\n\t\t// different?\n\t\tunset($this->_annotations[strtolower($offset)]);\n\t}", "protected function clearUserDataFromStorage(): void\n {\n $this->session->remove($this->getName());\n \n if ( ! is_null($this->recaller())) {\n $this->getCookie()->queue(\n $this->getCookie()->erase($this->getRecallerName())\n );\n }\n }", "public function clearOAuthToken();", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }" ]
[ "0.59622973", "0.59622973", "0.5720983", "0.54547435", "0.5407743", "0.5396113", "0.5318857", "0.5304542", "0.5288652", "0.522043", "0.52193594", "0.51880586", "0.51459354", "0.51388305", "0.5102131", "0.50986123", "0.50963575", "0.50911266", "0.5068065", "0.5064195", "0.50551194", "0.50404656", "0.50348645", "0.50210595", "0.50161", "0.5011074", "0.5007498", "0.50064135", "0.49963865", "0.4995012", "0.49945554", "0.49754426", "0.49745733", "0.49743682", "0.49739486", "0.49696302", "0.49563625", "0.49536937", "0.49516493", "0.49373618", "0.4931401", "0.4925212", "0.49177745", "0.49177513", "0.49177513", "0.4910441", "0.48987594", "0.48981062", "0.48976725", "0.4892126", "0.48849356", "0.48774722", "0.48773906", "0.48761585", "0.48755974", "0.48746687", "0.4873496", "0.48732346", "0.48729804", "0.48662755", "0.48612505", "0.4859617", "0.48590994", "0.48545027", "0.48433435", "0.48414707", "0.48410767", "0.48325253", "0.48305094", "0.48258665", "0.48258665", "0.48258665", "0.48258665", "0.48258665", "0.48256275", "0.4825613", "0.4825613", "0.4825613", "0.48238376", "0.4821835", "0.4816749", "0.4815894", "0.48146778", "0.48112106", "0.48085484", "0.4807338", "0.4788036", "0.47840938", "0.47832656", "0.47814453", "0.4778975", "0.4776673", "0.4776673", "0.4776673", "0.4776673", "0.4776673", "0.4776673", "0.4776673", "0.4776673", "0.4776673" ]
0.73240256
0
Is data to be render as reverse heading.
Данные должны отображаться как обратный заголовок.
private function is_reverse_heading() { return in_array( $this->id, [ 'links_ratio', 'keywords_meta', 'page_objects' ], true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isDisplayingHeaders()\n\t\t{\n\t\t\treturn $this->displayHeaders;\n\t\t}", "public function hasHeadings()\n {\n return (bool) $this->headings;\n }", "public function getSubHeading()\n {\n return false;\n }", "public function render($data=NULL) {\n\t\treturn parent::render('lib.stdheader', $data);\n\t}", "public function isHead(){ }", "function isHead()\n {\n\n }", "public function hasTitles()\n {\n return false;\n }", "public function heading($data = '', $h = '1', $attributes = '')\n\t{\n\t\treturn '<h'.$h.$this->_stringify_attributes($attributes).'>'.$data.'</h'.$h.'>';\n\t}", "public function displayHeaderRightSideContent(){\n\t\tif($this->HEADER_RIGHT_SIDE_CONTENT_ALIGN==\"l\"){\n\t\t\techo \"<div align=\\\"left\\\">\".$this->HEADER_RIGHT_SIDE_CONTENT.\"</div>\";\n\t\t}\n\t\telse if($this->HEADER_RIGHT_SIDE_CONTENT_ALIGN==\"c\"){\n\t\t\techo \"<div align=\\\"center\\\">\".$this->HEADER_RIGHT_SIDE_CONTENT.\"</div>\";\n\t\t}\n\t\telse if($this->HEADER_RIGHT_SIDE_CONTENT_ALIGN==\"r\"){\n\t\t\techo \"<div align=\\\"right\\\">\".$this->HEADER_RIGHT_SIDE_CONTENT.\"</div>\";\n\t\t}\n\t}", "public function displayReverse()\n {\n $temp = $this->tail;\n while ($temp != null) {\n echo $temp->data . \" \";\n $temp = $temp->prev;\n }\n }", "public function renderHeader(&$data, LBHToolkit_TableMaker_Paging $pagingInfo);", "function heading($data = '', $h = '1')\n{\n\treturn \"<h\".$h.\">\".$data.\"</h\".$h.\">\";\n}", "public function isHead()\n {/*{{{*/\n return ($this->method === self::METHOD_HEAD);\n }", "abstract public function getHeading();", "private function has_page_header_subheading() {\n\t\tif ( $this->get_page_subheading ) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function isReversed()\n {\n return $this->reversed;\n }", "protected function isReverseMerge()\n\t{\n\t\treturn $this->io->getOption('reverse');\n\t}", "public function hasTitles()\n {\n return true;\n }", "public function hasTitles()\n\t{\n\t\treturn false;\n\t}", "public function hasTitles()\n {\n return true;\n }", "public function testRenderDataOrder() {\n $this->controller->data = 'Member';\n $return = View::render(array('template' => 'tests/data', 'format' => 'html'));\n $this->assertEquals('Data is Member', $return);\n \n $this->controller->data = 'Member';\n $return = View::render(array('template' => 'tests/data', 'data' => array('data' => 'Implicit'), 'format' => 'html'));\n $this->assertEquals('Data is Implicit', $return);\n }", "public function isHead()\n {\n return ($this->getMethod() == self::METHOD_HEAD);\n }", "function render($mode, Doku_Renderer &$renderer, $data) {\n if($mode != 'xhtml') return false;\n // prevent caching to show lastest posts\n $renderer->info['cache'] = false;\n $renderer->doc .= $this->tumblr($data);\n return true;\n }", "public function isHead()\n {\n return $this->getMethod() === self::METHOD_HEAD;\n }", "function setUseHeaders($hflag) {\r\n if (!is_bool($hflag)) return false;\r\n if ($this->useheaders === $hflag) return true;\r\n if ($hflag) {\r\n // Apply headings from first row to all entries\r\n // and remove first row\r\n $heads = array_shift($this->data);\r\n foreach ($this->data as $i=>$r) {\r\n $r2 = array();\r\n foreach ($r as $j=>$d) {\r\n $r2[$heads[$j]] = $d;\r\n }\r\n $this->data[$i] = $r2;\r\n }\r\n } else {\r\n // Extract headings from longest data record\r\n // and prepend header line to data array\r\n $maxrec = 0;\r\n $maxct = 0;\r\n foreach ($this->data as $i=>$d) {\r\n if (count($d)>$maxct) {\r\n $maxct = count($d);\r\n $maxrec = $i;\r\n }\r\n }\r\n $heads = array();\r\n foreach ($this->data[$maxrec] as $h=>$f) {\r\n $heads[] = $h;\r\n }\r\n foreach ($this->data as $i=>$r) {\r\n $r2 = array();\r\n foreach ($heads as $h) {\r\n $r2[] = $r[$h];\r\n }\r\n $this->data[$i] = $r2;\r\n }\r\n array_unshift($this->data, $heads);\r\n }\r\n $this->useheaders = $hflag;\r\n return true;\r\n }", "protected function shouldHaveHeaderRow()\n {\n return ! (bool) array_get($this->exportInfo->options(), 'no_header_row', false);\n }", "function thb_builder_section_has_title( $section_data ) {\n\t\tif ( ! isset( $section_data['rows'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $section_data['rows'] as $row ) {\n\t\t\tif ( isset( $row['columns'] ) && ! empty( $row['columns'] ) ) {\n\t\t\t\tforeach ( $row['columns'] as $column ) {\n\t\t\t\t\tif ( isset( $column['blocks'] ) && ! empty( $column['blocks'] ) ) {\n\t\t\t\t\t\tforeach ( $column['blocks'] as $block ) {\n\t\t\t\t\t\t\tif ( isset( $block['data'] ) && isset( $block['data']['is_title'] ) && $block['data']['is_title'] == '1' ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}" ]
[ "0.567824", "0.5629914", "0.5595981", "0.54988366", "0.54837555", "0.5348828", "0.5341114", "0.53230447", "0.5321234", "0.5303389", "0.5296077", "0.52771574", "0.52557003", "0.5248757", "0.5210278", "0.5209881", "0.5192269", "0.5180118", "0.517761", "0.51685697", "0.51387024", "0.5132013", "0.5126763", "0.5126404", "0.51257974", "0.51231915", "0.511589", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5105226", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628", "0.5101628" ]
0.80024296
0
Get tag cloud HTML.
Получить HTML теговой облака.
private function get_tag_cloud( $data ) { $font_size_max = 22; $font_size_min = 10; $max = max( $data ); $html = '<div class="wp-tag-cloud">'; foreach ( $data as $keyword => $occurrences ) { $size = ( $occurrences / $max ) * ( $font_size_max - $font_size_min ) + $font_size_min; $size = round( $size, 2 ); $html .= sprintf( '<span class="keyword-cloud-item" style="font-size: %.2fpx">%s</span>', $size, htmlspecialchars( $keyword, ENT_QUOTES | ENT_SUBSTITUTE, 'utf-8' ) ); } $html .= '</div>'; return apply_filters( 'rank_math/seo_analysis/tag_cloud_html', $html, $data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTagCloud()\n {\n if (!$this->tag_cloud) {\n $this->tag_cloud = $this->buildTagCloud();\n }\n return $this->tag_cloud;\n }", "function print_tag_cloud()\n{\n global $ilance, $myapi, $ilconfig, $ilpage, $show;\n \n\tif ($ilconfig['enablepopulartags'] == false)\n\t{\n\t\treturn;\n\t}\n $badwords = explode(', ', $ilconfig['globalfilters_vulgarpostfilterlist']);\n $tags = array();\n\t$counter = 0;\n $html = '';\n \n $sql = $ilance->db->query(\"\n SELECT keyword AS tag_name, count AS tag_count, searchmode\n FROM \" . DB_PREFIX . \"search\n WHERE count > \" . $ilconfig['populartagcount'] . \"\n ORDER BY count\n LIMIT \" . $ilconfig['populartaglimit'] . \"\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n while ($res = $ilance->db->fetch_assoc($sql))\n {\n $tags[] = $res;\n }\n }\n \n $newtags = process_cloud_tags($tags);\n if (!empty($newtags))\n {\n foreach ($newtags as $array)\n {\n $counter++;\n if ($counter < 30)\n {\n if (!in_array(stripslashes(mb_strtolower($array['tag_name'])), $badwords))\n {\n $html .= '<a href=\"' . $ilpage['search'] . '?q=' . urlencode(stripslashes(html_entity_decode($array['tag_name']))) . '&amp;mode=' . urlencode($array['searchmode']) . '\" class=\"' . $array['tag_class'] . '\">' . mb_strtolower(stripslashes($array['tag_name'])) . '</a> &nbsp; ';\n }\n }\n }\n\t\t\n $show['tagcloud'] = 1;\n }\n else\n {\n $show['tagcloud'] = 0;\n }\n \n return $html;\n}", "public function tagCloud()\n\t{\n\t\tif(\\Module::isDisabled('Tag') || \\Module::isDisabled('Blog')) {\n\t\t\treturn null;\n\t\t}\n\n\t\t\\Module::load('Tag');\n\t\t\\Module::load('Blog');\n\n\t\t$arr = array(\n\t\t\t\t'maxFont' => $this->get('maxsize', 26),\n\t\t\t\t'minFont' => $this->get('minsize', 10),\n\t\t\t\t'fontUnit' => $this->get('unit', 'pt'),\n\t\t\t\t'wrap' => $this->get('wrap', ''),\n\t\t\t\t'format' => $this->get('format', 'font'),\n\t\t\t\t'classPrefix' => $this->get('class_prefix', 'tag'),\n\t\t\t\t'order' => $this->get('order', 'random'),\n\t\t\t\t'orderDir' => $this->get('order_dir', false),\n\t\t\t\t'title' => $this->get('tag_title', 'Total posts %s'),\n\t\t\t\t'url' => $this->get('url', 'blog/tag/'),\n\t\t\t);\n\t\t$tc = new \\Reborn\\Util\\TagCloud($arr);\n\n\t\t$posts = \\Blog\\Model\\Blog::where('status', 'live')\n\t\t\t\t\t\t\t->where('created_at', '<=', date('Y-m-d H:i:s'))\n\t\t\t\t\t\t\t->get(array('id'));\n\t\tif ($posts->isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\n\t\tforeach ($posts as $p) {\n\t\t\t$ids[] = $p->id;\n\t\t}\n\n\t\t$tags = \\Tag\\Model\\TagsRelationship::where('object_name', 'blog')\n\t\t\t\t\t\t\t->whereIn('object_id', array_values($ids))->get();\n\n\t\tforeach ($tags as $t) {\n\t\t\t$tc->add($t->tag->name);\n\t\t}\n\t\t$data = array();\n\n\t\t$data['tag_body'] = $tc->generate();\n\n\t\t$data['title'] = $this->get('title', 'Tag Cloud');\n\n\t\treturn $this->show($data, 'tagCloud');\n\t}", "function TagCloud($mode='')\n\t{\n\t\tif($mode=='menu')\n\t\t{\n\t\t\t$t_start = $this->template['menu_cloud_start'];\n\t\t\t$t_item = $this->template['menu_cloud_item'];\n\t\t\t$t_end = $this->template['menu_cloud_end'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$t_start = $this->template['cloud_start'];\n\t\t\t$t_item = $this->template['cloud_item'];\n\t\t\t$t_end = $this->template['cloud_end'];\n\t\t}\n\n\t\t$tags = $this->getAllTagWords($mode);\n\t\t$tags = $this->TagSort($tags, $mode);\n\n\t\tif(!is_array($tags))\n\t\t{\n\t\t\treturn $this->show_message(LAN_TAG_18, '', 'return');\n\t\t}\n\n\t\t// tags will be displayed between class 1 to class 5\n\t\t$min_size = 1;\n\t\t$max_size = 5;\n\n\t\t// get the largest and smallest array values\n\t\t$min_qty = min(array_values($tags));\n\t\t$max_qty = max(array_values($tags));\n\n\t\t// find the range of values\n\t\t$spread = $max_qty - $min_qty;\n\t\t// we don't want to divide by zero\n\t\tif(0 == $spread)\n\t\t{\n\t\t\t$spread = 1;\n\t\t}\n\n\t\t// determine the increment, this is the increase per tag quantity (times used)\n\t\t$step = ($max_size - $min_size)/($spread);\n\n\t\t$text = $t_start;\n\t\t// loop through our tag array\n\t\tforeach ($tags as $key => $value)\n\t\t{\n\t\t\t$class = ceil($min_size + (($value - $min_qty) * $step));\n\t\t\t$this->word = $this->createTagWordLink($key, $class);\n\t\t\t$this->number = $value;\n\t\t\t$text .= $this->e107->tp->parseTemplate($t_item, true, $this->shortcodes);\n\t\t}\n\t\t$text .= $t_end;\n\t\treturn $text;\n\t}", "function tag_cloud($tags, $route, $options = array(), $title = '')\n{\n\t$result = '';\n if ($title != '')\n {\n $result .= '<div class=\"tag_cloud_header\"><h2>' . $title . '</h2></div>';\n }\n\n if(count($tags) > 0)\n {\n $emphasizers_begin = array(-2 => '<small><small>', \n -1 => '<small>', \n 0 => '', \n 1 => '<big>', \n 2 => '<big><big>');\n $emphasizers_end = array(-2 => '</small></small>', \n -1 => '</small>', \n 0 => '', \n 1 => '</big>', \n 2 => '</big></big>');\n\n $class = isset($options['class']) ? $options['class'] : 'tag-cloud';\n $result .= '<ul class=\"'.$class.'\">';\n\n foreach ($tags as $name => $count)\n {\n $link = reaktor_link_to($name,\n $route.$name, \n array('rel' => 'tag'));\n\n $result .= '\n <li>'.$emphasizers_begin[$count].$link.$emphasizers_end[$count].'</li>';\n }\n\n $result .= '</ul>';\n }\n\n return $result;\n}", "protected function buildTagCloud()\n {\n if ($tag_cloud = $this->grav['cache']->fetch($this->cache_id)) {\n return $tag_cloud;\n }\n\n $tag_cloud = [];\n $tags = [];\n $minCount = PHP_INT_MAX;\n $maxCount = 0;\n $taxonomy = $this->grav['taxonomy']->taxonomy();\n $term = $this->config->get('plugins.tagcloud.taxonomy');\n\n foreach ($taxonomy[$term] as $tag => $items) {\n $count = count($items);\n\n if ($count < $minCount) {\n $minCount = $count;\n }\n if ($count > $maxCount) {\n $maxCount = $count;\n }\n $tags[strval($tag)] = $count;\n }\n\n if (!empty($tags)) {\n $minSize = floatval($this->config->get('plugins.tagcloud.min_size'));\n $maxSize = floatval($this->config->get('plugins.tagcloud.max_size'));\n\n if ($minCount === $maxCount) {\n $ratio = 0;\n } else {\n $ratio = ($maxSize - $minSize) / ($maxCount - $minCount);\n }\n\n foreach ($tags as $tag => $count) {\n $tag_cloud[strval($tag)] = array(\n 'count' => $count,\n 'size' => $minSize + $ratio * ($count - $minCount)\n );\n }\n\n $order_by = $this->config->get('plugins.tagcloud.order_by');\n $order_dir = $this->config->get('plugins.tagcloud.order_dir');\n\n if ($order_by == 'name') {\n if ($order_dir == 'asc') {\n ksort($tag_cloud);\n } else {\n krsort($tag_cloud);\n }\n } else {\n if ($order_dir == 'asc') {\n asort($tag_cloud, function($a, $b) {\n return $a['count'] - $b['count'];\n });\n } else {\n arsort($tag_cloud, function($a, $b) {\n return $a['count'] - $b['count'];\n });\n }\n }\n\n $count = intval($this->config->get('plugins.tagcloud.count'));\n if ($count > 0) {\n $tag_cloud = array_slice($tag_cloud, 0, $count);\n }\n }\n\n $this->grav['cache']->save($this->cache_id, $tag_cloud);\n return $tag_cloud;\n }", "function TagCloudList()\n\t{\n\t\t$tags = $this->getAllTagWords();\n\t\t$tags = $this->TagSort($tags);\n\t\tif(!is_array($tags))\n\t\t{\n\t\t\treturn $this->show_message(LAN_TAG_18, '', 'return');\n\t\t}\n\n\t\t$text = $this->template['cloudlist_start'];\n\t\tforeach($tags as $key => $value)\n\t\t{\n\t\t\t$this->word = $this->createTagWordLink($key);\n\t\t\t$this->number = $value;\n\t\t\t$text .= $this->e107->tp->parseTemplate($this->template['cloudlist_item'], true, $this->shortcodes);\n\t\t}\n\t\t$text .= $this->template['cloudlist_end'];\n\t\treturn $text;\n\t}", "function name_tag_cloud($obj)\n{\n\tif ($obj == NULL)\n\t{\n\t\treturn '';\n\t}\n\t$html = tag_cloud($obj);\n\treturn $html;\n}", "public function getTagsCloudFront() {\n\tif (!$tags = $this->_cache->load('tagsfront'.$this->getRole())){\n\t$tags = $this->getAdapter();\n\t$select = $tags->select()\n\t\t->from($this->_name,array('total' => 'COUNT(*)','term'))\n\t\t->joinLeft('finds',$this->_name . '.contentID = finds.id',array())\n\t\t->where('contenttype = ?', (string)'findsrecord')\n\t\t->where('origin != ?', (string)'YahooGeo')\n\t\t->order('total DESC')\n\t\t->group('term')\n\t\t->limit(25);\n\t$tags = $tags->fetchAll($select);\n\t$this->_cache->save($tags, 'tagsfront'.$this->getRole());\n\t} \n\treturn $tags;\n\t}", "function ciniki_web_processTagCloud($ciniki, $settings, $base_url, $tags) {\n\n $min = 0;\n $max = 1;\n // Find the minimum and maximum\n foreach($tags as $tag) {\n if( $min == 0 ) { $min = $tag['num_tags']; }\n elseif( $tag['num_tags'] < $min ) { $min = $tag['num_tags']; }\n if( $tag['num_tags'] > $max ) { $max = $tag['num_tags']; }\n }\n \n $fmax = 9;\n $fmin = 0;\n $tag_content = '';\n $size = 0;\n foreach($tags as $tag) {\n if( $max > $fmax ) {\n $fontsize = round(($fmax * ($tag['num_tags']-$min))/($max-$min));\n } else {\n $fontsize = $tag['num_tags'];\n }\n if( !isset($tag['permalink']) || $tag['permalink'] == '' ) {\n $tag['permalink'] = rawurlencode($tag['name']);\n }\n $tag_content .= \"<span class='size-$fontsize'><a href='$base_url/\" . $tag['permalink'] . \"'>\" \n . $tag['name'] . \"</a></span> \";\n $size += strlen($tag['name']);\n }\n\n $cloud_size = 'word-cloud-medium';\n if( $size > 150 ) {\n $cloud_size = 'word-cloud-large';\n }\n $content = \"<div class='word-cloud-wrap'>\";\n $content .= \"<div class='word-cloud $cloud_size'>\";\n $content .= $tag_content;\n $content .= \"</div>\";\n $content .= \"</div>\";\n\n return array('stat'=>'ok', 'content'=>$content);\n}", "function wp_ajax_get_tagcloud()\n{\n}", "function sed_tag_cloud($area = 'all', $order = 'tag', $limit = null)\r\n{\r\n\tglobal $db_tag_references;\r\n\t$res = array();\r\n\t$limit = is_null($limit) ? '' : ' LIMIT ' . $limit;\r\n\tswitch($order)\r\n\t{\r\n\t\tcase 'Alphabetical':\r\n\t\t\t$order = '`tag`';\r\n\t\t\tbreak;\r\n\t\tcase 'Frequency':\r\n\t\t\t$order = '`cnt` DESC';\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$order = 'RAND()';\r\n\t}\r\n\t$where = $area == 'all' ? '' : \"WHERE tag_area = '$area'\";\r\n\t$sql = sed_sql_query(\"SELECT `tag`, COUNT(*) AS `cnt`\r\n\t\tFROM $db_tag_references\r\n\t\t$where\r\n\t\tGROUP BY `tag`\r\n\t\tORDER BY $order $limit\");\r\n\twhile($row = sed_sql_fetchassoc($sql))\r\n\t{\r\n\t\t$res[$row['tag']] = $row['cnt'];\r\n\t}\r\n\tsed_sql_freeresult($sql);\r\n\treturn $res;\r\n}", "function getTags() ;", "public function getTagsCloud() {\n\t$tags = $this->getAdapter();\n\t$select = $tags->select()\n\t\t->from($this->_name,array('total' => 'COUNT(*)','term'))\n\t\t->joinLeft('finds',$this->_name . '.contentID = finds.id',array())\n\t\t->where('contenttype = ?', (string)'findsrecord')\n\t\t->where('origin != ?', (string)'YahooGeo')\n\t\t->group('term');\n\treturn $tags = $tags->fetchAll($select);\n\t}", "function generate_cloud($language,$user_id = 0){\n include('classes/jforg_tags.php'); \n $result .= '<div id=\"tags\">';\n $tags = new jforg_tags();\n $cloud = $tags->tag_cloud($user_id);\n $unsorted = array();\n foreach($cloud as $tag){\n $result2 = '';\n $result2 .= \"<a href=\\\"/\".$language;\n $result2 .=\"/tag/\";\n $result2 .= $tag['tag_value'].\".htm\\\"\"; \n $result2 .= \"class=\\\"class\".$tag['class'].\"\\\" >\";\n $result2 .= $tag['tag_value'].\"</a> \";\n $unsorted[$tag['tag_value']] = $result2;\n }\n ksort($unsorted);\n foreach($unsorted as $sorted){\n $result .= $sorted;\n }\n $result .= '</div>';\n return $result; \n }", "function jss_tag_cloud( $args = '' ) {\n\t//set some default\n\t$defaults = array(\n\t 'format' => 'list', //display as list\n\t 'taxonomy' => 'phototype', //our custom post type taxonomy\n\t\t'hide_empty' => 'true',\n\t 'echo' => true, //touch this and it all blows up\n\t 'link' => 'view'\n\t);\n\n\t//use wp_parse to merge the argus and default values\n\t$args = wp_parse_args( $args, $defaults );\n\n\t//go fetch the terms of our custom taxonomy. query by descending and order by most posts\n\t$tags = get_terms( $args['taxonomy'], array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) );\n\n\t//if there are no tags then end function\n\tif ( empty( $tags ))\n\t return;\n\n\t//set the minimum number of posts the tag must have to display (change to whatever)\n\t$min_num = 1;\n\n\t//logic to display tag or not based on post count\n\tforeach($tags as $key => $tag)\n\t {\n\t \t//if the post container lest than the min_num variable set above\n\t if($tag->count < $min_num)\n\t {\n\t //unset it and destroy part of the array\n\t unset($tags[$key]);\n\t }\n\t }\n\n\tforeach ( $tags as $key => $tag ) {\n\t if ( 'edit' == $args['link'] )\n\n\t //display the link to edit the tag, if the user is logged in and has rights\n\t $link = get_edit_tag_link( $tag -> term_id, $args['taxonomy'] );\n\t else\n\t //get the permalink for the taxonomy\n\t $link = get_term_link( intval($tag -> term_id), $args['taxonomy'] );\n\n\t //check if there is an error\n\t if ( is_wp_error( $link ) )\n\t return false;\n\n\t $tags[ $key ] -> link = $link;\n\t $tags[ $key ] -> id = $tag -> term_id;\n\t}\n\t//generate our tag cloud\n\t$return = jss_generate_tag_cloud( $tags, $args ); // here is where whe list what we are sorting\n\n\t//create a new filter hook\n\t$return = apply_filters( 'jss_tag_cloud', $return, $args );\n\n\tif ( 'array' == $args['format'] || empty($args['echo']) )\n\t return $return;\n\n\techo $return;\n}", "function getTags();", "public function getTagContent() {\n\t\treturn($this->tagContent);\n\t}", "public function getTagCloud()\n {\n /**\n * @TODO: Arrumar para pegar as tags dos posts do blog\n */\n $tagCloud = [];\n \n $blogs = $this->entityManager->getRepository(Blog::class)\n ->findBlogsHavingAnyTag();\n $totalBlogCount = count($blogs);\n \n $tags = $this->entityManager->getRepository(Tag::class)\n ->findAll();\n foreach ($tags as $tag) {\n \n $blogsByTag = $this->entityManager->getRepository(Blog::class)\n ->findBlogsByTag($tag->getName())->getResult();\n \n $blogCount = count($blogsByTag);\n if ($blogCount > 0) {\n $tagCloud[$tag->getName()] = $blogCount;\n }\n }\n \n $normalizedTagCloud = [];\n \n // Normalize\n foreach ($tagCloud as $name=>$blogCount) {\n $normalizedTagCloud[$name] = $blogCount/$totalBlogCount;\n }\n \n return $normalizedTagCloud;\n }", "function codeless_all_tags_html(){\n $tags = get_tags();\n $html = '<div class=\"post_tags\">';\n foreach ( $tags as $tag ) {\n $tag_link = get_tag_link( $tag->term_id );\n \n $html .= \" <a href='\". esc_url($tag_link). \"' title='\". esc_attr( $tag->name ).\" Tag' class='\".esc_attr( $tag->slug ).\"'>\";\n $html .= \"#\". esc_attr( $tag->name ).\"</a>\";\n }\n $html .= '</div>';\n return $html;\n}", "public function tagCloudAction()\n {\n $conn = $this->get('database_connection'); \n\n $tags = $conn->fetchAll(\"SELECT ts.*, COUNT(ts.id) AS SCORE, tty.code FROM tags AS ts, tagtype AS tty WHERE ts.tagtype_id = tty.id GROUP BY ts.tagref_id, ts.tagtype_id ORDER BY SCORE DESC\");\n\n $json = array();\n\n if ($tags)\n {\n $total = count($tags);\n\n for($i=0; $i< $total; $i++)\n {\n $tagTitle = $this->queryTagsContent($tags[$i]['tagref_id'],$tags[$i]['code']);\n\n $json[] = array('text'=>$tagTitle,'weight'=>$tags[$i]['SCORE']);\n }\n }\n\n return $json;\n }", "function cloud()\n{\n $small = 10;\n $big = 35;\n //get tag info from worker function\n $tags = searchcloud();\n //amounts\n if (isset($tags)) {\n if (!empty($tags)) {\n $minimum_count = min(array_values($tags));\n }\n if (!empty($tags)) {\n $maximum_count = max(array_values($tags));\n }\n $spread = $maximum_count - $minimum_count;\n if ($spread == 0) {\n $spread = 1;\n }\n $cloud_html = '';\n $cloud_tags = [];\n foreach ($tags as $tag => $count) {\n $size = $small + ($count - $minimum_count) * ($big - $small) / $spread;\n //set up colour array for font colours.\n $colour_array = [\n 'yellow',\n 'green',\n 'blue',\n 'purple',\n 'orange',\n '#0099FF',\n ];\n //spew out some html malarky!\n $cloud_tags[] = '<a style=\"color:' . $colour_array[random_int(0,\n 5)] . '; font-size: ' . floor($size) . 'px' . '\" class=\"tag_cloud\" href=\"browse.php?search=' . urlencode($tag) . '&amp;searchin=all&amp;incldead=1' . '\" title=\"\\'' . htmlsafechars($tag) . '\\' returned a count of ' . $count . '\">' . htmlsafechars(stripslashes($tag)) . '</a>';\n }\n return implode(\"\\n\", $cloud_tags) . \"\\n\";\n }\n}", "public function get_tags() {\n\t\t\t\t$this->tags = $this->strip_javascript($this->contents);\n\t \t\t}", "function tagCloud($list){\n\t\t\t\tinclude('wordcloud.class.php');\n\t\t\t\t$cloud = new wordcloud();\n\t\t\t\t$getBooks = mysqli_query($conn, \"SELECT name FROM categories ORDER BY name DESC\");\n\t\t\t\tif ($getBooks)\n\t\t\t\t{\n\t\t\t\t\twhile ($rowBooks = mysqli_fetch_assoc($getBooks))\n\t\t\t\t\t{\n\t\t\t\t\t//$getTags = explode(' ', $rowBooks['category']);\n\t\t\t\t\t$getTags = split(\", \", $rowBooks['name']);\n\t\t\t\t\t\tforeach ($getTags as $key => $value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$value = trim($value);\n\t\t\t\t\t\t\t$cloud->addWord($value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$cloud->orderBy('word','ASC');\n\t\t\t\t$myCloud = $cloud->showCloud('array');\n\t\t\t\tif (is_array($myCloud))\n\t\t\t\t{\n\t\t\t\t\t//$myCloud = natcasesort($myCloud);\n\t\t\t\t\tforeach ($myCloud as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\techo ' <a href=\"/'.$list.'/sort/'.$value['word'].'\" class=\"size'.$value['range'].'\">'.$value['word'].'</a> &nbsp;';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public function getTags(){\n\t\t$tags = explode(',', $this->tags);\n\t\t$html = \"<div class='tags'>\";\n\t\tforeach($tags as $tag) {\n\t\t\t$html .= \"<a href='\".$this->url->create('questions/tag/'.urlencode($tag).'').\"'>$tag</a> \";\n\t\t}\n\t\t$html .= \"</div>\";\n\t\treturn $html;\n\t}", "public function getGeoTagCloud() {\n\t$tags = $this->getAdapter();\n\t$select = $tags->select()\n\t\t->from($this->_name, array('total' => 'COUNT(*)', 'term'))\n\t\t->joinLeft('finds',$this->_name . '.contentID = finds.id', array())\n\t\t->where('contenttype = ?', (string)'findsrecord')\n\t\t->where('origin = ?', (string)'YahooGeo')\n\t\t->group('term')\n\t\t->order('total DESC');\n\tif(in_array($this->getRole(),$this->restricted)) {\n\t$select->where('finds.secwfstage NOT IN ( 1, 2 )');\n\t}\t\n\treturn $tags = $tags->fetchAll($select);\n\t}", "function art_tags($atts) { \nglobal $post;\n$atags = '<span class=\"art-tags\">';\nob_start();\necho get_the_term_list( $post->ID, 'article-tag', '', ', ', '' ); \n$atags = ob_get_contents();\nob_end_clean();\nreturn $atags;\n}", "function get_the_tags_html($postid){\r\n\t// Define the colours\r\n\t$tagcolours = array(\r\n\t\t'release'=>'important'\r\n\t);\r\n\t$tags = get_the_tags($postid);\r\n\tif($tags){\r\n\t\t$output = '';\r\n\t\tforeach( $tags as $tag ){\r\n\t\t\tif(strtolower($tag->name)!='owncloud'){\r\n\t\t\t\t$colour = array_key_exists($tag->name,$tagcolours) ? $tagcolours[$tag->name] : '';\r\n\t\t\t\t$output .= '<a href=\"'.get_tag_link($tag).'\"><span class=\"label '.$colour.'\">'.$tag->name.'</span></a>';\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn false;\t\r\n\t}\r\n}", "public function getTags() {}", "public function getTags() {}", "function getHomeTagCloud() {\r\n\t\treturn $this->getTagCloud();\r\n\t}", "public static function get_tag_cloud_returns() {\n return new external_single_structure(\n array(\n 'tags' => new external_multiple_structure(\n new external_single_structure(\n array(\n 'name' => new external_value(PARAM_TAG, 'Tag name.'),\n 'viewurl' => new external_value(PARAM_RAW, 'URL to view the tag index.'),\n 'flag' => new external_value(PARAM_BOOL, 'Whether the tag is flagged as inappropriate.',\n VALUE_OPTIONAL),\n 'isstandard' => new external_value(PARAM_BOOL, 'Whether is a standard tag or not.', VALUE_OPTIONAL),\n 'count' => new external_value(PARAM_INT, 'Number of tag instances.', VALUE_OPTIONAL),\n 'size' => new external_value(PARAM_INT, 'Proportional size to display the tag.', VALUE_OPTIONAL),\n ), 'Tags.'\n )\n ),\n 'tagscount' => new external_value(PARAM_INT, 'Number of tags returned.'),\n 'totalcount' => new external_value(PARAM_INT, 'Total count of tags.'),\n 'warnings' => new external_warnings(),\n )\n );\n }", "public function getContentTags() {\r return $this->contentTags;\r }", "function pinba_tags_get() {\n}", "public function render()\n {\n return $this->tagRepository->findByPage($GLOBALS['TSFE']->id)->toArray();\n }", "public function getTag() {}", "public function getHTML();", "public function getTag()\n {\n return 'div';\n }", "function &getHTMLTags()\n\t{\n\t\t$tags = array(\n\t\t\t\"a\",\n\t\t\t\"blockquote\",\n\t\t\t\"br\",\n\t\t\t\"cite\",\n\t\t\t\"code\",\n\t\t\t\"dd\",\n\t\t\t\"div\",\n\t\t\t\"dl\",\n\t\t\t\"dt\",\n\t\t\t\"em\",\n\t\t\t\"h1\",\n\t\t\t\"h2\",\n\t\t\t\"h3\",\n\t\t\t\"h4\",\n\t\t\t\"h5\",\n\t\t\t\"h6\",\n\t\t\t\"hr\",\n\t\t\t\"img\",\n\t\t\t\"li\",\n\t\t\t\"object\",\n\t\t\t\"ol\",\n\t\t\t\"p\",\n\t\t\t\"param\",\n\t\t\t\"pre\",\n\t\t\t\"span\",\n\t\t\t\"strike\",\n\t\t\t\"strong\",\n\t\t\t\"sub\",\n\t\t\t\"sup\",\n\t\t\t\"table\",\n\t\t\t\"td\",\n\t\t\t\"tr\",\n\t\t\t\"u\",\n\t\t\t\"ul\",\n\t\t\t\"ruby\", // Ruby Annotation XHTML module\n\t\t\t\"rbc\",\n\t\t\t\"rtc\",\n\t\t\t\"rb\",\n\t\t\t\"rt\",\n\t\t\t\"rp\"\n\t\t);\n\t\treturn $tags;\n\t}", "public function getTags();", "public function getTags();", "public function getTags();", "public function topicsTags()\n\t\t{\n\t\t\t$tg = $this->result->data->analysis->tg;\n\t\t\t$out = '<div class=\"' . $this->DOMsort($tg->state) . '\">' . PHP_EOL;\n\t\t\t$out .= '<input id=\"tg\" name=\"accordion-1\" type=\"checkbox\" />' . PHP_EOL;\n\t\t\t$out .= '<label for=\"tg\" id=\"ar-' . $tg->state . '\">' . $tg->total . ' Keyword(s)</label>' . PHP_EOL;\n\t\t\t$out .= '<article class=\"ac-large\">' . PHP_EOL;\n\t\t\t$out .= '<p class=\"ar-analysis-' . $tg->state . '\">';\n\t\t\tif ($tg->total >= 1) {\n\t\t\t\t$out .= $tg->total . ' Keyword(s) identified. ' . PHP_EOL;\n\t\t\t\t$out .= '<ul>';\n\t\t\t\t$out .= '<p>These are your post\\'s keywords. Use 1-4 terms in your title to optimize it!</p>';\n\t\t\t\tforeach ($tg->detail AS $tags) {\n\t\t\t\t\t$out .= '<li>' . $tags . '</li>' . PHP_EOL;\n\t\t\t\t}\n\t\t\t\t$out .= '</ul>';\n\t\t\t} else {\n\t\t\t\t$out .= '0 tags identified.';\n\t\t\t}\n\t\t\t$out .= '</p>' . PHP_EOL;\n\t\t\t$out .= '</article>' . PHP_EOL;\n\t\t\t$out .= '</div>' . PHP_EOL;\n\n\t\t\treturn $out;\n\t\t}", "function calais_gettags() {\r\n\r\n if (empty($_POST['text']))\r\n die(\"\");\r\n\t\r\n\t$content = stripslashes($_POST['text']);\r\n\r\n\t$key = get_option('calais-api-key');\r\n\tif (empty($key)) {\r\n\t\tdie(\"You have not yet configured this plugin. You must add your Calais API key in the settings menu.\");\r\n\t}\r\n\t\r\n\t$oc = new OpenCalais($key);\r\n\t$entities = $oc->getEntities($content);\r\n\t\r\n\tif (count($entities) == 0)\r\n\t\tdie(\"\");\r\n\r\n $tags = array();\r\n foreach ($entities as $type => $array) \r\n foreach ($array as $tag)\r\n $tags[] = $tag;\r\n\r\n\tdie(implode($tags, ', '));\r\n\t\r\n}", "public function getHtmlTags()\n {\n return $this->htmlTags;\n }", "public function get3dHtmlContent();", "public function tags();", "public function getTags() {\n\t\treturn view('links.tags', [\n\t\t\t'tags' => $this->tags->getAllTags(),\n\t\t]);\n\t}", "function tags_in_post($atts) { // [tags] outputs post's tags in a span\nglobal $post;\n$tags = '<span class=\"post-tags\">';\nob_start();\nthe_tags( '<span class=\"post-tags\">', ', ', '</span>' );\n$tags = ob_get_contents();\nob_end_clean();\nreturn $tags;\n}", "function get_tag()\n\t{\n\t\treturn '';\n\t}", "function ciniki_directory_web_tagCloud($ciniki, $settings, $tnid) {\n\n //\n // Load the tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n //\n // Build the query to get the tags\n //\n $strsql = \"SELECT ciniki_directory_categories.name, \"\n . \"ciniki_directory_categories.permalink, \"\n . \"COUNT(ciniki_directory_category_entries.id) AS num_tags \"\n . \"FROM ciniki_directory_categories \"\n . \"LEFT JOIN ciniki_directory_category_entries ON (\"\n . \"ciniki_directory_categories.id = ciniki_directory_category_entries.category_id \"\n . \"AND ciniki_directory_category_entries.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE ciniki_directory_categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"GROUP BY ciniki_directory_categories.name \"\n . \"HAVING num_tags > 0 \"\n . \"ORDER BY ciniki_directory_categories.name \"\n . \"\";\n //\n // Get the list of posts, sorted by publish_date for use in the web CI List Categories\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.directory', array(\n array('container'=>'tags', 'fname'=>'permalink', \n 'fields'=>array('name', 'permalink', 'num_tags')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['tags']) ) {\n $tags = $rc['tags'];\n } else {\n $tags = array();\n }\n\n return array('stat'=>'ok', 'tags'=>$tags);\n}", "function _getAllHTMLTagsAsString()\n\t\t{\n\t\t\t$result = \"\";\n\t\t\t$tags =& ilObjAdvancedEditing::_getAllHTMLTags();\n\t\t\tforeach ($tags as $tag)\n\t\t\t{\n\t\t\t\t$result .= \"<$tag>\";\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "public function getTags()\n {\n return $this->result;\n }", "function xcontent_tag_block_cloud_show($options)\r\n{\r\n include_once XOOPS_ROOT_PATH.\"/modules/tag/blocks/block.php\";\r\n return tag_block_cloud_show($options, $module_dirname);\r\n}", "public function getHtml();", "public function getHtml();", "function get_tags_string($text){\r\n\t\t$text = html_entity_decode($text);\r\n\t\t//echo htmlspecialchars($text).\"<br />\";\r\n\t $alltags=\"\";\r\n for($i=0;$i<strlen($text);$i++){\r\n if($text[$i] == \"<\" && $text[$i-1] != \"<\"){\r\n\t\t $alltags .= $text[$i];\r\n\t\t for($j=$i+1;$j<strlen($text);$j++){\r\n\t\t $alltags .= $text[$j]; \r\n\t\t if($text[$j] == \">\"){\r\n\t\t\t if($j < strlen($text)-1) \r\n\t\t $alltags .= \"########\";\r\n\t\t break;\r\n\t }\t \r\n\t }\r\n\t }\t\t\r\n }\t\r\n \"tags :-\".htmlspecialchars($alltags).\"<br />\";\r\n $tags = explode(\"########\",$alltags);\r\n $i=0;\r\n //echo count($tags);\r\n //print_r ($tags);\r\n if(count($tags) > 0){\r\n foreach(array_count_values($tags) as $key=>$t){\r\n\t\t //echo htmlspecialchars($t);\r\n\t\t /*if(!strstr($alltags_new,$t))\r\n\t\t $alltags_new.= $t.\"=\".substr_count($alltags, $t).\"\\n\"; */\r\n\t\t if(!empty($key))\r\n\t\t $alltags_new.= $key.\"=\".$t.\"\\n\";\t\t \r\n\t }}else{\r\n\t\t$alltags_new=\"0\"; \r\n\t } \t \r\n\t //echo htmlspecialchars($alltags_new); echo \"<br />\"; //exit;\r\n\t return trim($alltags_new); \r\n }", "function TagRender()\n\t{\n\t\t$type = false;\n\n\t\t//decide whether to show the taglist or the tagcloud\n\n\t\t//user can set own tag style\n\t\tif(varsettrue($this->pref['tagwords_view_style'])=='1')\n\t\t{\n\t\t\t$t = varset($_GET['type'],'');\n\t\t\tswitch($t)\n\t\t\t{\n\t\t\t\tcase 'cloud':\n\t\t\t\t\t$type='cloud';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'list':\n\t\t\t\t\t$type='list';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$type = (varsettrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//user cannot set tag style, so use default tag style value\n\t\t\t$type = (varsettrue($this->pref['tagwords_default_style'])=='1' ? 'cloud' : 'list');\n\t\t}\n\n\t\t//show the taglist or tagcloud\n\t\tif($type=='list')\n\t\t{\n\t\t\t$text = $this->e107->tp->parseTemplate($this->template['cloudlist'], true, $this->shortcodes);\n\t\t\t$this->e107->ns->tablerender(LAN_TAG_17, $text);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$text = $this->e107->tp->parseTemplate($this->template['cloud'], true, $this->shortcodes);\n\t\t\t$this->e107->ns->tablerender(LAN_TAG_16, $text);\n\t\t}\n\t\treturn;\n\t}", "public function getTagsSummary()\n {\n $groupedTags = $this->getGroupedTags();\n if ($groupedTags) {\n $html = '<div>';\n foreach ($groupedTags as $type => $tagList) {\n $tags = array_map(function ($item) {\n return sprintf('<span class=\"badge\">%s</span>', $item);\n }, $tagList->column('Name'));\n $html .= sprintf('<div><strong>%s</strong>: %s</div>', $type, implode(' ', $tags));\n }\n\n $html .= '</div>';\n return DBHTMLText::create('Tags')->setValue($html);\n }\n }", "function getTags() {\n\t\treturn readTags($this->id, 'zenpage_pages');\n\t}", "public function getHtml() {}", "public function getContentTags()\n\t{\n\t\treturn $this->contentTags;\n\t}", "function wct_talks_the_tag_cloud( $number = 10 ) {\n\t$tag_cloud = wct_generate_tag_cloud();\n\n\tif ( empty( $tag_cloud ) ) {\n\t\treturn;\n\t}\n\n\tif ( $tag_cloud['number'] != $number ) {\n\t\t$number = $tag_cloud['number'];\n\t}\n\n\t$number = number_format_i18n( $number );\n\t?>\n\t<div id=\"wct_most_used_tags\">\n\t\t<p class=\"description\"><?php printf( _n( 'Choose the most used tag', 'Choose from the %d most used tags', $number, 'wordcamp-talks' ), $number ) ;?></p>\n\t\t<div class=\"tag-items\">\n\t\t\t<?php echo $tag_cloud['tagcloud'] ;?>\n\t\t</div>\n\t</div>\n\t<?php\n}", "public function get_tags(){\n\t\treturn $this->get_val($this->settings, 'tags', array());\n\t}", "function kasviewer_wp_tags($atts, $content = null) {\r\n\t\t// verify type is set\r\n\t\tif(isset($atts['type'])){\r\n\t\t\t$type = $atts['type'];\r\n\t\t}else{\r\n\t\t\treturn \"<b>kasviewer:</b>tag type not found\"; \r\n\t\t}\r\n\t\t// switch for type\r\n\t\tswitch($type){\r\n\t\t\tcase 'img':\r\n\t\t\t\treturn kasviewer_wp_image($atts);\r\n\t\t\tbreak;\r\n\t\t\tcase 'iframe':\r\n\t\t\t\treturn kasviewer_wp_iframe($atts);\r\n\t\t\tbreak;\t\t\t\r\n\t\t\tcase 'content':\r\n\t\t\t\treturn kasviewer_wp_content($atts, $content);\r\n\t\t\tbreak;\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"<b>kasviewer:</b>tag type $type is not valid\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function getTagsList(){\n return $this->_get(2);\n }", "public function getTag()\n {\n // Return empty tag when we do not need tags\n if ($this->_useTags == false) {\n return '';\n }\n return parent::getTag();\n }", "public function executeCanvasTagCloud()\n {\n //checking for options necessary for the tag cloud\n $this->cloudOptions = array(\n 'height' => $this->getVar('width') ? $this->getVar('width') : 100,\n 'width' => $this->getVar('width') ? $this->getVar('width') : 100,\n 'maxSpeed' => $this->getVar('maxSpeed') ? $this->getVar('maxSpeed'): 0.05,\n 'minSpeed' => $this->getVar('minSpeed') ? $this->getVar('minSpeed'): 0.0,\n 'decel' => $this->getVar('decel') ? $this->getVar('decel'): 0.95,\n 'minBrightness' => $this->getVar('minBrightness') ? $this->getVar('minBrightness'): 0.1,\n 'textColour' => $this->getVar('textColour') ? $this->getVar('textColour'): \"#000000\",\n 'textHeight' => $this->getVar('textHeight') ? $this->getVar('textHeight'): 15,\n 'textFont' => $this->getVar('textFont') ? $this->getVar('textFont'): \"Helvetica, Arial, sans-serif\",\n 'outlineColour' => $this->getVar('outlineColour') ? $this->getVar('outlineColour'): \"#000000\",\n 'outlineThickness' => $this->getVar('outlineThickness') ? $this->getVar('outlineThickness'): 1,\n 'outlineOffset' => $this->getVar('outlineOffset') ? $this->getVar('outlineOffset'): 5,\n 'pulsateTo' => $this->getVar('pulsateTo') ? $this->getVar('pulsateTo'): 1.0,\n 'pulsateTime' => $this->getVar('pulsateTime') ? $this->getVar('pulsateTime'): 3,\n 'depth' => $this->getVar('depth') ? $this->getVar('depth'): 0.5,\n 'initial' => $this->getVar('initial') ? $this->getVar('initial'): null,\n 'freezeActive' => $this->getVar('freezeActive') ? $this->getVar('freezeActive'): false,\n 'reverse' => $this->getVar('reverse') ? $this->getVar('reverse'): false,\n 'hideTags' => $this->getVar('hideTags') ? $this->getVar('hideTags'): true,\n 'zoom' => $this->getVar('zoom') ? $this->getVar('zoom'): 1.0,\n 'shadow' =>\t$this->getVar('shadow') ? $this->getVar('shadow'): \"#000000\",\n 'shadowBlur' => $this->getVar('shadowBlur') ? $this->getVar('shadowBlur'): 0,\n 'shadowOffset' => $this->getVar('shadowOffset') ? $this->getVar('shadowOffset'): '[0,0]',\n 'weight' => $this->getVar('weight') ? $this->getVar('weight'): true,\n 'weightMode' => $this->getVar('weightMode') ? $this->getVar('weightMode'): \"size\",\n 'weightSize' => $this->getVar('weightSize') ? $this->getVar('weightSize'): 1.0,\n 'weightGradient' => $this->getVar('weightGradient') ? $this->getVar('weightGradient'): array('0' => '#f00', '0.33' => '#ff0', '0.66' => '#0f0', '1' =>'#00f'),\n );\n\n $this->executeTagCloud();\n }", "function getHtmlContent(){\r\n switch ( $this->TagType ) {\r\n case ttComment: \r\n case ttText: \r\n return $this->TagData;\r\n\r\n case ttNormal:\r\n if (isset( $this->StyleSheet )) {\r\n return $this->StyleSheet->getHtmlFormatted();\r\n }\r\n } \r\n }", "function PHP_Get_Tags($url) {\r\n\t\t \r\n\t\t@$html = PHP_SYSTEM_url_get_contents($url);\r\n\t\t \r\n\t\t@libxml_use_internal_errors(true);\r\n\t\t$dom = new DomDocument();\r\n\t\t@$dom->loadHTML($html);\r\n\t\t$xpath = new DOMXPath($dom);\r\n\t\t$query = '//*/meta[starts-with(@property, \\'og:\\')]';\r\n\t\t$result = $xpath->query($query);\r\n\t\t\r\n\t\tforeach ($result as $meta) {\r\n\t\t\t$property = $meta->getAttribute('property');\r\n\t\t\t$content = $meta->getAttribute('content');\r\n\t\t\r\n\t\t\t// replace og\r\n\t\t\t$property = str_replace('og:', '', $property);\r\n\t\t\t$list[$property] = $content;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn @$list;\r\n\t}", "function getHTML() {\n\t\tglobal $wgOut, $wgCategoryMagicGallery;\n\n\t\t$this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;\n\n\t\t$this->clearCategoryState();\n\t\t$this->doCategoryQuery();\n\t\t$this->finaliseCategoryState();\n\n\t\t$r = $this->getCategoryTop() .\n\t\t\t$this->getSubcategorySection() .\n\t\t\t$this->getPagesSection() .\n\t\t\t$this->getImageSection() .\n\t\t\t$this->getVideoSection() .\n\t\t\t$this->getCategoryBottom();\n\n\t\treturn $r;\n\t}", "public static function post_tags(){\n ?>\n\n <div class=\"post-tags\">\n <?php the_tags( '', ' ', '' ); ?>\n </div><!-- end .post-tags -->\n\n <?php\n }", "function gather_text_by_tag($tag) {\n $content_array = array();\n $nodes = $this->dom->getElementsByTagName($tag);\n foreach ($nodes as $node) {\n array_push($content_array, $node->nodeValue);\n }\n return $content_array;\n }", "function all_business_get_project_tags($cmsmasters_id, $taxonomy, $template_type = 'page', $show = true) {\r\n\tif (get_the_terms($cmsmasters_id, $taxonomy)) {\r\n\t\tif ($template_type == 'page') {\r\n\t\t\t$out = '<span class=\"cmsmasters_project_tags\">' . \r\n\t\t\t\tget_the_term_list($cmsmasters_id, $taxonomy, '', ', ', '') . \r\n\t\t\t'</span>';\r\n\t\t} elseif ($template_type == 'post') {\r\n\t\t\t$cmsmasters_option = all_business_get_global_options();\r\n\t\t\t$out = '';\r\n\t\t\t\r\n\t\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_portfolio_project_tag']) {\r\n\t\t\t\t$out = '<div class=\"project_details_item\">' . \r\n\t\t\t\t\t'<div class=\"project_details_item_title\">' . esc_html__('Tags', 'all-business') . ':' . '</div>' . \r\n\t\t\t\t\t'<div class=\"project_details_item_desc\">' . \r\n\t\t\t\t\t\t'<span class=\"cmsmasters_project_tags\">' . \r\n\t\t\t\t\t\t\tget_the_term_list($cmsmasters_id, $taxonomy, '', ', ', '') . \r\n\t\t\t\t\t\t'</span>' . \r\n\t\t\t\t\t'</div>' . \r\n\t\t\t\t'</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif ($show) {\r\n\t\t\techo $out;\r\n\t\t} else {\r\n\t\t\treturn $out;\r\n\t\t}\r\n\t}\r\n}", "public function getTags(){\n\t\t$this->load->view('get_tags');\n\t}", "public function run()\n {\n return Cache::tags(['Widget', 'Core', 'TagCloud'])->rememberForever('TagCloud', function () {\n\n $tagRepo = new TagRepository();\n $tags = $tagRepo->take(5)->orderBy('updated_at', 'desc')->get();\n\n return view('frontend.widgets.tag_cloud', compact([\n 'config',\n 'tags'\n ]))->render();\n });\n }", "public function getHtml(): string {\n $out = Tags::div()->addCssClass('po synopsis my-1');\n $out->append($this->getFileInfo());\n $out->append($this->buildDownloadButtons());\n return $out->getHtml();\n }", "public static function getTags()\n {\n return array (\n // HTML\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'image',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'select',\n 'shadow',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n\n // SVG\n 'svg',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'use',\n 'view',\n 'vkern',\n\n // SVG Filters\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n\n //MathML\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmuliscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mpspace',\n 'msqrt',\n 'mystyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n\n //text\n '#text'\n );\n }", "public function getEscapedTags();", "function wct_talks_get_tags() {\n\t\t$wct = wct();\n\n\t\t// Did the user submitted tags ?\n\t\tif ( ! empty( $_POST['wct']['_the_tags'] ) ) {\n\t\t\t$edit_tags = (array) $_POST['wct']['_the_tags'];\n\n\t\t// Are we editing tags ?\n\t\t} else if ( ! empty( $wct->query_loop->talk->ID ) ) {\n\t\t\t$edit_tags = (array) wp_get_object_terms( $wct->query_loop->talk->ID, wct_get_tag(), array( 'fields' => 'names' ) );\n\n\t\t// Default to an empty array\n\t\t} else {\n\t\t\t$edit_tags = array();\n\t\t}\n\n\t\t// Sanitize tags\n\t\t$edit_tags = array_map( 'esc_html', $edit_tags );\n\n\t\t/**\n\t\t * @param string the tags list output\n\t\t * @param array $edit_tags selected term slugs\n\t\t */\n\t\techo apply_filters( 'wct_talks_get_tags', join( ', ', $edit_tags ), $edit_tags );\n\t}", "abstract public function getMetaTags ();", "public function execute3dTagCloud()\n {\n //checking for options necessary for the tag cloud\n $this->cloudOptions = array(\n 'height' => $this->getVar('height') ? $this->getVar('height') : 100,\n 'width' => $this->getVar('width') ? $this->getVar('width') : 100,\n 'min_font_size' => $this->getVar('min_font_size') ? $this->getVar('min_font_size') : 10,\n 'max_font_size' => $this->getVar('max_font_size') ? $this->getVar('max_font_size') : 16,\n 'zoom' => $this->getVar('zoom') ? $this->getvar('zoom') : 100\n );\n \n $this->executeTagCloud();\n }", "final public function getContent() : string\n {\n return sprintf(self::HTML_FORMAT, $this->getTag(), $this->text);\n }", "function get_tag_contents($html, $tag, $start_str, $tag_pos = 0, $length = 0) {\r\n\tif (!empty($start_str)) {\r\n\t\t$html = end(explode($start_str, $html));\r\n\t}\r\n\r\n\t$tag_pos = stripos($html, '<'.$tag, $tag_pos);\r\n\t$length = stripos($html, '</'.$tag, $length);\r\n\t//echo \"$tag_pos|$length<br />\";\r\n\tif (false !== $tag_pos && $tag_pos < $length) {\r\n\t\treturn get_tag_contents($html, $tag, '', $tag_pos+1, $length+1);\r\n\t} else {\r\n\t\treturn substr($html, 0, $length);\r\n\t}\r\n}", "function get_tag_contents($html, $tag, $start_str, $tag_pos = 0, $length = 0) {\r\n\tif (!empty($start_str)) {\r\n\t\t$html = end(explode($start_str, $html));\r\n\t}\r\n\r\n\t$tag_pos = stripos($html, '<'.$tag, $tag_pos);\r\n\t$length = stripos($html, '</'.$tag, $length);\r\n\t//echo \"$tag_pos|$length<br />\";\r\n\tif (false !== $tag_pos && $tag_pos < $length) {\r\n\t\treturn get_tag_contents($html, $tag, '', $tag_pos+1, $length+1);\r\n\t} else {\r\n\t\treturn substr($html, 0, $length);\r\n\t}\r\n}", "abstract public function getHTML();", "function pati_the_tags(){\r\n echo pati_get_the_tags();\r\n}", "function getInnerTags() {\n // Matches all {{text}}\n $matches = array();\n preg_match_all('/(?<={{)(.*?)(?=}})/', $this->template, $matches);\n foreach ($matches[0] as $match) {\n $is_id = substr($match, 0, 3);\n\n if (strcmp($is_id, \"id_\") === 0) {\n // Getting the corresponding value\n $id_val = substr($match, 3);\n\n $toppingTag = new ToppingTag(GUID::new(), $match, $id_val);\n array_push($this->tags, $toppingTag);\n }\n }\n }", "function getTags() {\n $alldata = array();\n foreach (htmlqp($this->html, 'a.ipsTag') as $item) {\n $t = trim(strtolower($item->text()));\n $this->tags[] = $t;\n $alldata[] = array($this->tid, $t);\n $this->l('Found tag: ' . $t);\n }\n\n $sth = $this->db->prepare('INSERT INTO tags (tid, tag) VALUES (?, ?)');\n $this->db->extended->executeMultiple($sth, $alldata);\n }", "public function getHtml()\n {\n $this->_initToken();\n return parent::getHtml();\n }", "public function getHtml()\n {\n $this->_initToken();\n return parent::getHtml();\n }", "function jss_generate_tag_cloud( $tags, $args = '' ) {\n\tglobal $wp_rewrite;\n\n\t//don't touch these defaults or the sky will fall\n\t$defaults = array(\n\t\t'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,\n\t\t'format' => 'flat', 'separator' => \"\\n\", 'orderby' => 'name', 'order' => 'ASC',\n\t\t'topic_count_text_callback' => 'default_topic_count_text',\n\t\t'topic_count_scale_callback' => 'default_topic_count_scale', 'filter' => 1\n\t);\n\n //determine if the variable is null\n if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {\n\t //var_export\n\t $body = 'return sprintf (\n\t \t_n(' . var_export($args['single_text'], true) . ', ' . var_export($args['multiple_text'], true) . ', $count), number_format_i18n( $count ));';\n\t //create_function\n\t $args['topic_count_text_callback'] = create_function('$count', $body);\n\t}\n\n\t//parse arguments from above\n\t$args = wp_parse_args( $args, $defaults );\n\n\t//extract\n\textract( $args );\n\n\t//check to see if they are empty and stop\n\tif ( empty( $tags ) )\n\t\treturn;\n\n //apply the sort filter\n\t$tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );\n\n //check to see if the tags have been pre-sorted\n if ( $tags_sorted != $tags ) { // the tags have been sorted by a plugin\n\t $tags = $tags_sorted;\n\t unset($tags_sorted);\n\t} else {\n if ( 'RAND' == $order ) {\n shuffle($tags);\n } else {\n // SQL cannot save you\n if ( 'name' == $orderby )\n uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') );\n else\n uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') );\n\n if ( 'DESC' == $order )\n $tags = array_reverse( $tags, true );\n }\n }\n //check number and slice array\n if ( $number > 0 )\n $tags = array_slice($tags, 0, $number);\n\n //set array\n $counts = array();\n\n //set array for alt tag\n $real_counts = array();\n\n foreach ( (array) $tags as $key => $tag ) {\n $real_counts[ $key ] = $tag->count;\n $counts[ $key ] = $topic_count_scale_callback($tag->count);\n }\n\n //determine min coutn\n $min_count = min( $counts );\n\n //default wordpress sizing\n $spread = max( $counts ) - $min_count;\n if ( $spread <= 0 )\n $spread = 1;\n $font_spread = $largest - $smallest;\n if ( $font_spread < 0 )\n $font_spread = 1;\n $font_step = $font_spread / $spread;\n\n $a = array();\n\n //iterate thought the array\n foreach ( $tags as $key => $tag ) {\n $count = $counts[ $key ];\n $real_count = $real_counts[ $key ];\n $tag_link = '#' != $tag->link ? esc_url( $tag->link ) : '#';\n $tag_id = isset($tags[ $key ]->id) ? $tags[ $key ]->id : $key;\n $tag_name = $tags[ $key ]->name;\n\n //If you want to do some custom stuff, do it here like we did\n //call_user_func\n $a[] = \"<a href='#filter' class='tag-link-$tag_id'\n\t\tdata-option-value='.$tag_name'\n\t\ttitle='\" . esc_attr( call_user_func( $topic_count_text_callback, $real_count ) ) . \"'>$tag_name</a>\"; //background-color is added for validation purposes.\n }\n\n //set new format\n switch ( $format ) :\n case 'array' :\n $return =& $a;\n break;\n case 'list' :\n \t//create our own setup of how it will display and add all\n $return = \"<ul id='filters' class='option-set' data-option-key='filter'>\\n\\t\n\t\t<li><a href='filter' data-option-value='*' class='selected'>All</a></li>\n\t\t<li>\";\n //join\n $return .= join( \"</li>\\n\\t<li>\", $a );\n $return .= \"</li>\\n</ul>\\n\";\n break;\n default :\n \t//return\n $return = join( $separator, $a );\n break;\n endswitch;\n //create new filter hook so we can do this\n return apply_filters( 'jss_generate_tag_cloud', $return, $tags, $args );\n}", "public function index() {\n $album = ORM::factory(\"item\", 1);\n access::required(\"view\", $album);\n\n // Set up and display the actual page.\n $template = new Theme_View(\"page.html\", \"other\", \"Tag Cloud\");\n $template->content = new View(\"tag_cloud_page_cloud.html\");\n $template->content->title = t(\"Tag Cloud\");\n\n // If the tag cloud module is active, load its settings from the database.\n if (module::is_active(\"tag_cloud\")) {\n $options = array();\n foreach (array(\"tagcolor\", \"background_color\", \"mouseover\", \"transparent\", \"speed\", \"distribution\")\n as $option) {\n $value = module::get_var(\"tag_cloud\", $option, null);\n if (!empty($value)) {\n switch ($option) {\n case \"tagcolor\":\n $options[\"tcolor\"] = $value;\n break;\n case \"mouseover\":\n $options[\"hicolor\"] = $value;\n break;\n case \"background_color\":\n $options[\"bgColor\"] = $value;\n break;\n case \"transparent\":\n $options[\"wmode\"] = \"transparent\";\n break;\n case \"speed\":\n $options[\"tspeed\"] = $value;\n break;\n case \"distribution\":\n $options[\"distr\"] = \"true\";\n break;\n }\n }\n }\n $template->content->options = $options;\n }\n\n // Display the page.\n print $template;\n }", "function pinba_tag_get() {\n}", "function getTags(){\n\t\tif(isset($this->params['requested'])) {\n\t\t\t$temp_tags = $this->Product->Tagged->Tag->find('list');\n\t\t\tforeach($temp_tags as $tag){\n\t\t\t\t$tags[] = $tag;\n\t\t\t}\n\t\t\t//debug($tags);\n\t\t\treturn $tags;\n\t\t}\n\t}", "protected function createTagCloud(array $documents) {\n\t\tforeach ($documents as $document) {\n\t\t\t$this->tagCloudGenerator->addString($document['title']);\n\t\t}\n\t\treturn $this->tagCloudGenerator->renderAsArrayWithThreshold(2);\n\t}", "public static function loadTags(String $content): String {\n\t\t$dom = new DOMDocument('1.0', 'UTF-8');\n\t\tlibxml_use_internal_errors(true);\n\t\t$dom->loadHTML('<?xml encoding=\"UTF-8\">'.$content);\n\t\tlibxml_clear_errors();\n\n\t\t// fix UTF-8 problem\n\t\t/** @var DOMNode $item */\n\t\tforeach ($dom->childNodes as $item)\n\t\tif ($item->nodeType == XML_PI_NODE)\n\t\t\t$dom->removeChild($item);\n\t\t$dom->encoding = 'UTF-8';\n\n\n\n\t\t$head = $dom->getElementsByTagName(\"head\");\n\t\tif($head->count() >= 1) {\n\t\t\t$t = $dom->createDocumentFragment();\n\t\t\t$p = file_get_contents(\"../html/includes/head.html\");\n\t\t\t$t->appendXML($p);\n\t\t\t$head->item(0)->appendChild($t);\n\t\t}\n\n\t\t$title = $dom->getElementsByTagName(\"title\");\n\t\tif($title->count() >= 1) {\n\t\t\t$title->item(0)->appendChild($dom->createTextnode($_GET[\"page_title\"]));\n\t\t}\n\n\n\t\t$list = $dom->getElementsByTagName(\"tag\");\n\n\t\t//charge et supprimme les tags\n\t\twhile($lst = $list->item(0)) {\n\n\t\t\t$tgs = \"\\\\App\\\\Tags\\\\\" . ucfirst($lst->getAttribute(\"type\"));\n\t\t\t$tg = new $tgs($dom, $lst, false);\n\n\t\t\t$tg->render();\n\n\t\t\t$lst->parentNode->removeChild($lst);\n\n\t\t\t$list = $dom->getElementsByTagName(\"tag\");\n\t\t}\n\n\t\t$res = $dom->saveHTML();\n\n\t\treturn $res;\n\t}", "public function get_html(): string {\n\t\t$template = new Template( $this->view_slug, $this->context, $this );\n\n\t\t$this->set_template( $template );\n\n\t\treturn $template->get_content();\n\t}", "public function getTagsUrl()\n {\n return $this->tagsUrl;\n }", "public function get_tags_url() {\n\t\t\treturn apply_filters( 'cherry_instagram_widget_get_tags_url', $this->service_url . 'explore/tags/%s/' );\n\t\t}" ]
[ "0.7045135", "0.69770616", "0.696068", "0.69417137", "0.69000906", "0.68904924", "0.6867985", "0.6837156", "0.659075", "0.6590201", "0.6518335", "0.6456914", "0.64353496", "0.6421965", "0.6406376", "0.6324286", "0.63235843", "0.63161093", "0.6306379", "0.6284131", "0.62802255", "0.62786436", "0.6243935", "0.62262964", "0.62152785", "0.62106854", "0.6183404", "0.61777693", "0.61652267", "0.61652267", "0.61615664", "0.6132342", "0.61108905", "0.6090302", "0.60874945", "0.60614693", "0.60602766", "0.60527194", "0.60398936", "0.60368806", "0.60368806", "0.60368806", "0.5932564", "0.5921719", "0.5915481", "0.59026533", "0.5881496", "0.5878227", "0.58699906", "0.5853527", "0.5851358", "0.584769", "0.5818391", "0.5811704", "0.5808973", "0.5808973", "0.579999", "0.57959944", "0.5795462", "0.5795009", "0.57862073", "0.5781152", "0.57779396", "0.5770063", "0.5761251", "0.57214046", "0.57194465", "0.5719365", "0.5706704", "0.5691552", "0.56813735", "0.5680957", "0.5679361", "0.56719536", "0.56684375", "0.5662837", "0.5660255", "0.5653144", "0.56493145", "0.56451344", "0.56405675", "0.56328326", "0.56323916", "0.5623304", "0.5623304", "0.5617577", "0.5611246", "0.5611047", "0.56091243", "0.5608994", "0.5608994", "0.5608527", "0.56031847", "0.56028754", "0.5598722", "0.5596894", "0.5595166", "0.5593844", "0.55871034", "0.5582839" ]
0.70370823
1
Gets the states of a site.
Получает состояния сайта.
public function get_site_states( $site ) { $available_states = array( 'public' => __( 'public', 'wordpress-seo' ), 'archived' => __( 'archived', 'wordpress-seo' ), 'mature' => __( 'mature', 'wordpress-seo' ), 'spam' => __( 'spam', 'wordpress-seo' ), 'deleted' => __( 'deleted', 'wordpress-seo' ), ); $site_states = array(); foreach ( $available_states as $state_slug => $state_label ) { if ( $site->$state_slug === '1' ) { $site_states[ $state_slug ] = $state_label; } } return $site_states; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getstates()\r\n\t{\r\n\t\treturn $this->api->get( 'states', 'getList', array() )->response();\r\n\t}", "public static function getStates();", "public static function getStates();", "public function states()\n {\n return response(LocationService::getStates());\n }", "public function getStates()\n {\n return $this->states;\n }", "public function getStates()\n {\n return $this->states;\n }", "public function getStates()\n {\n return $this->states;\n }", "public function getStates()\n {\n return $this->states;\n }", "public function sites() {\n\t\t$res = $this->zap->request($this->zap->base . 'core/view/sites/');\n\t\treturn reset($res);\n\t}", "public function getStates()\n {\n $states = file_get_contents(\"states.db\");\n $states = explode(';', $states);\n return array_filter($states);\n }", "public function getStates()\n {\n return $this->states;\n }", "public function readStates () {\r\n\t\t// Busca os estados\r\n\t\treturn $this->db->get('Estados')->result();\r\n\t}", "public function States() {\n\t\treturn DataObject::get('State', 'CountryID = ' . $this->ID, 'Name');\n\t}", "public function getAllSite()\n {\n $query = \"SELECT SiteID, SiteName FROM sites WHERE Status = 1 ORDER BY SiteName ASC\";\n \n return parent::RunQuery($query);\n }", "public function getStates() {\n $stateList = array();\n if (!empty($this->shipping_country)) {\n $stateList = Subregion::model()->findAll('region_id=' . $this->shipping_country);\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n }\n return $stateList;\n }", "public function getStates(): array\n {\n return $this->states;\n }", "public function states()\n\t{\n\t\t$states = array();\n\t\tif ( array_key_exists( \\IPS\\Request::i()->country, \\IPS\\GeoLocation::$states ) )\n\t\t{\n\t\t\t$states = \\IPS\\GeoLocation::$states[ \\IPS\\Request::i()->country ];\n\t\t}\n\t\t\n\t\t\\IPS\\Output::i()->json( $states );\n\t}", "public function getStates(): array;", "public function index(){\n\n return $this->stateService->getAll();\n }", "public function states($spa);", "public static function getStates() {\n\t\t\t$sql = \"SELECT * FROM `stateCodes`\";\n\t\t\t$result = query($sql);\n\t\t\t$states = array();\n\t\t\twhile ($row = $result->fetchRow()) {\n\t\t\t\t$states[$row['stateCode']] = $row['stateName'];\n\t\t\t}\n\t\t\treturn $states;\n\t\t}", "public function getStates() {\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' begin' );\n\n\t\t$list = array ();\n\n\t\t$query = ClaimsDB::getStates ();\n\n\t\t$connectionManager = ConnectionManager::getInstance ();\n\n\t\t$rs = $connectionManager->select ( $query );\n\n\t\tforeach ( $rs as $element ) {\n\t\t\t$list [$element [\"id\"]] = Util::cleanString ( $element [\"name\"] );\n\t\t}\n\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' end' );\n\n\t\treturn $list;\n\t}", "public function getStates()\n {\n //$courts = Courts::all();\n $states = DB::select('select * from states');\n\n return compact('states');\n }", "public static function getSites()\n {\n return self::$infoSites;\n }", "public function getStatesList() {\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' begin' );\n\n\t\t$list = array ();\n\n\t\t$query = ClaimsDB::getStates ();\n\n\t\t$connectionManager = ConnectionManager::getInstance ();\n\n\t\t$rs = $connectionManager->select ( $query );\n\n\t\tforeach ( $rs as $element ) {\n\n\t\t\t$obj = new State();\n\n\t\t\t$obj->setId($element['id']);\n\t\t\t$obj->setName(Util::getLiteral($element['name']));\n\n\t\t\t$list [] = $obj;\n\t\t}\n\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' end' );\n\n\t\treturn $list;\n\t}", "public function get_us_states()\n {\n $this->db->order_by('state');\n $query = $this->db->get('us_states');\n if ($query->num_rows()) {\n return $query->result_array();\n }\n return NULL;\n }", "function GetStates()\n\t{\t\t\n\t\t// create new associative array object\n\t\t$state_array = array();\n\t\t// prepare statement\n\t\t$sql = \"select * from state order by state_id desc\";\n\t\t// run statement or error\n\t\t$result = mysql_query($sql) or die (show_error('Problem with pulling States'));\n\t\t\n\t\t// push the states onto the array stack LIFO. State ID 1-50.\n\t\tif (mysql_num_rows($result) > 0) \n\t\t{\n\t\t\t\n\t\t\twhile($row = mysql_fetch_array($result))\n\t\t {\t \n\t\t\t// prepare new state object\n\t\t\t$state \t\t = new State();\t\t\t\t\t\n\t\t\t// populate object\n\t\t\t$state->id \t\t= $row[\"state_id\"];\n\t\t\t$state->name \t= $row[\"state_desc\"];\n\t\t\t// push onto stack\n\t\t\tarray_push($state_array, $state);\n\t\t\t}\n\t\t\n\t\t}\n\t\t// return array\n\t\treturn $state_array;\t\t\n\t}", "public function getAllStates()\n {\n \t$inventoryStateService = new InventoryStateServices();\n \t$roles = $inventoryStateService->fetchAll();\n \t$result = array();\n \tforeach ($roles as $rol){\n \t\t$result[$rol['id_state_Inventory']] = $rol['conditions'];\n \t}\n \treturn $result;\n }", "public function getAllStates()\n {\n \t$inventoryStateService = new InventoryStateServices();\n \t$roles = $inventoryStateService->fetchAll();\n \t$result = array();\n \tforeach ($roles as $rol){\n \t\t$result[$rol['id_state_Inventory']] = $rol['conditions'];\n \t}\n \treturn $result;\n }", "public function states() \n {\n return $this->client->request(\n self::GET,\n Routes::modulateRoute()->routeData(\"localidades/estados/operadora/1/tipovinculacao/Todos/situacaohabilitacaoprestador/Ativo\")\n );\n }", "public static function getAllSites() {\n return array_values(self::$INDICO_SITES);\n }", "public static function getState(): array\n {\n return [\n 'locale' => Envi\\Setup::getLocale(),\n 'host' => self::getSubsite(),\n 'hostname' => self::getHost(),\n 'mainhost' => self::getHost(true),\n 'fullhost' => self::getURLPrefix(),\n 'build' => Envi\\Version::getBuild(),\n 'buildShort' => Envi\\Version::getBuild(true)\n ];\n }", "public function getWebsiteStores()\n {\n $select = Mage::getModel('core/website')->getDefaultStoresSelect(false);\n return $this->_getReadAdapter()->fetchPairs($select);\n }", "private function getStates()\n {\n return Request::has('states') ? explode(',', Request::get('states')) : null;\n }", "public static function getSessionStates() {\n return self::get(self::$nameSessionStatesCache, SessionStateApi::class);\n }", "function get_all_site_flags() : array {\n\treturn wp_list_filter(\n\t\tFlags::get_all(),\n\t\t[\n\t\t\t'available' => true,\n\t\t\t'scope' => 'site',\n\t\t]\n\t);\n}", "public function getStates()\n {\n $states = DB::table(\"states\")->get();\n return view('index')->with('states',$states);\n }", "public function getSites();", "public function getSites()\n {\n return $this->getProperty(\"Sites\", new SiteCollection());\n }", "public static function siteMap()\n {\n return [];\n }", "public function index(){\n $states = mysql_query(\"SELECT id_state, state FROM states\");\n while($row = mysql_fetch_assoc($states)){\n $this->state[] = $row;\n }\n\n return $this->state; \n }", "public static function getSites(): array\n {\n $currentSite = !defined('SITE_VERSION_CONTROL_SITES')\n ? [\n [\n 'domain' => get_option('siteurl'),\n 'key' => SITE_VERSION_CONTROL_PASSWORD,\n 'live' => false\n ]\n ] : SITE_VERSION_CONTROL_SITES;\n\n return apply_filters('site_version_control_sites', $currentSite);\n }", "public function getStates(): array\n {\n \\trigger_error(\"WebAPI::getStates is not implemented.\", E_USER_WARNING);\n\n $json = $this->_guzzle\n ->request('GET', '/crunchi/api/order/Address/CountryStates?cartCountry=USA')\n ->getBody()\n ->getContents();\n\n return \\json_decode($json);\n\n $results = [];\n foreach (\\json_decode($json) as $country) {\n //$results[] = $country;\n }\n\n return $results;\n }", "public function getSite();", "public function getSite();", "public function getSite();", "public function loadStates()\n {\n foreach (\\eZContentObjectStateGroup::fetchObjectList(\\eZContentObjectStateGroup::definition()) as $stateGroup) {\n $stateIdentifiers = array();\n $states = $stateGroup->states();\n foreach ($states as $state) {\n $stateIdentifiers[] = $state->attribute('identifier');\n }\n $this->stateIndex[$stateGroup->attribute('identifier')] = array(\n 'id' => $stateGroup->attribute('id'),\n 'status' => 'reference',\n 'identifier' => $stateGroup->attribute('identifier'),\n 'states' => $stateIdentifiers,\n );\n }\n return $this->stateIndex;\n }", "public function getStoreState();", "public function getSitesList()\n {\n $query = \"\n SELECT site_id, name\n FROM site\n ORDER BY name ASC\n \";\n return $this->dbh->getAssoc($query);\n }", "protected function getSelectedSites() {\n return $this->getSyncMaps($this->targetEnv, $this->selectedSiteIds);\n }", "function states()\n\t{\n\t\tglobal $TMPL;\n\t\t\n\n\t\t$country_code = ($TMPL->fetch_param('country_code')) ? $TMPL->fetch_param('country_code') : \"USA\";\n\t\t$return_data = '';\n\t\t\n\t\tif ($country_code == \"USA\")\n\t\t{\n\t\t\t$states_array = $this->states; \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$states_list = $country_code . \"states\";\n\t\t\t$states_array = @$this->$states_list; \n\t\t}\n\t\tforeach ($states_array as $abbrev => $state)\n\t\t{\n\t\t\t$tagdata = $TMPL->tagdata;\n\t\t\t$tagdata = $TMPL->swap_var_single('abbrev', $abbrev, $tagdata);\n\t\t\t$tagdata = $TMPL->swap_var_single('state', $state, $tagdata);\n\t\t\t$return_data .= $tagdata;\n\t\t}\n\t\t\n\t\treturn $return_data;\n\t}", "public function apiGetState()\n\t{\n\t\treturn $this->sendApiRequest('state/', 'GET');\n\t}", "public function listSites(): array\n\t{\n\t\t$response = $this->request('GET', '/sites');\n\t\t$sites = [];\n\n\t\tforeach ($response as $siteData) {\n\t\t\t$sites[] = Site::createFromArray($siteData);\n\t\t}\n\n\t\treturn $sites;\n\t}", "public function getStateList()\n {\n $options = array();\n \n /* Start here getting roles list in array */ \n return $this->find( 'all' , $options );\n \n }", "public function getStates()\n {\n return $this->hasMany(State::className(), ['country_id' => 'id']);\n }", "public function getState()\n\t{\n\t\treturn $this->model->searchState($this->result, $this->data['state'] ?? null);\n\t}", "public function getClientStates() {\n\t\treturn $this->clientStates;\n\t}", "public function get_sites()\n {\n }", "function getStates(Array $options = array())\n\t{\n\t //Zend_Loader::loadClass('States');\n $statesObj = new Default_Model_States();\n //$states = $statesObj->find($country_id)->current();\n $states = $statesObj->getStates($options);\n return $states;\n\t\n\t}", "public function getState(){\t\n\t\t$this->db->where(\"is_deleted='0'\");\n\t\t$query = $this->db->get(STATES);\n\t\treturn $query->result_array();\n\t}", "public function getIncomingStates(): array;", "public function getStates(Request $request)\n {\n $states = State::where('country_id', config('access.constants.default_country'))\n ->pluck('state', 'id')->toArray();\n\n return [\n 'status' => 'state',\n 'data' => $states,\n ];\n }", "function getAllStates()\n{\n\tglobal $db;\n\t$stateArray=array();\n\t$query = \"SELECT * FROM state ORDER BY name\";\n\t$results = mysqli_query($db,$query) or die(mysql_error());\n\twhile($row=mysqli_fetch_assoc($results))\n\t{\n\t\t$stateArray[]=$row;\n\t}\n\n\treturn $stateArray;\n}", "public static function getAllSiteNames() {\n return array_keys(self::$INDICO_SITES);\n }", "public function getSites()\n {\n foreach ($this->sites as $siteData) {\n $url = Site::trimUrl($siteData['url']);\n if (strpos($url, '?') !== false) {\n $url = substr($url, 0, strpos($url, '?'));\n }\n $url = $this->getCanonical($url);\n// var_dump($url);\n $site = Site::model()->findByAttributes(array('url' => $url));\n $published = strtotime($siteData['published']);\n //If site is added manually it might be missing title and published. Add them now.\n if ($site) {\n if (!$site->published)\n $site->published = $published;\n if (!$site->title)\n $site->title;\n }\n else {\n $site = new Site();\n $site->url = $url;\n\n $site->title = $siteData['title'];\n $site->published = $published;\n //var_dump($site->attributes);\n $site->save();\n $site->id = Yii::app()->db->lastInsertId;\n }\n }\n }", "function getSiteList() {\n global $db;\n try {\n $sql = \"SELECT site_id, site FROM sites ORDER BY date;\";\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $results;\n } catch(PDOException $e) { die(\"Failed to retrieve site list from db\"); }\n }", "public function get_states(){\n\t\t$this->layout = '';\n $this->autoRender = false;\n\t\t\n\t\t$states = array();\n\t\t$this->loadModel('State');\n\t\tif(!empty($this->request->data)){\n\t\t\t$country_id = $this->request->data['State']['country_id'];\n\t\t\t$states = $this->State->find('all',array('conditions'=>array('State.country_id'=>$country_id,'State.is_deleted'=>0,'State.status'=>1,'State.name <>'=>'null'),'order'=>array('State.name ASC'),'fields'=>array('State.id','name')));\n\t\t}\n\t\techo json_encode($states);\n exit();\n\t}", "public static function getPaperStates() {\n return self::get(self::$namePaperStatesCache, PaperStateApi::class);\n }", "public function getStatesAction()\n {\n \t$country_id=$this->_getParam(\"country_id\");\n \techo Zend_Json::encode(\\Extended\\state::getStateList($country_id));\n \tdie;\n }", "public function allState()\n\t{\n $states = State::get();\n\t\t$count = 0;\n\t\treturn view('backend.state.all-state', compact('states', 'count'));\n\n\t}", "public static function getStates()\n {\n if (null === static::$_states) {\n static::$_states = [\n self::STATE_OPEN => __('Pending'),\n self::STATE_PAID => __('Paid'),\n self::STATE_CANCELED => __('Canceled'),\n ];\n }\n return static::$_states;\n }", "public function getCurrentStates()\n {\n return new PingdomApiReportGetCurrentStatesResponse($this->callSoapClient('Report_getCurrentStates'));\n }", "function find_all_states() {\n global $db;\n $sql = \"SELECT * FROM states \";\n $sql .= \"ORDER BY name ASC;\";\n $state_result = db_query($db, $sql);\n return $state_result;\n }", "public function index()\n {\n $sites = Sites::with('hosting')->get();\n return $sites;\n }", "public function states()\n {\n return $this->hasMany(State::class);\n }", "public function getSite() {\n\t\treturn $this->data['site'];\n\t}", "public function getSiteVisits()\n {\n $visits = Traffic::visits($this->card->site_identifier);\n\n return number_format($visits);\n }", "public function states_get($id) {\n\t\tself::validate_access($id);\n\t\treturn Project::find($id)->get_states();\n\t}", "public static function get_states()\n {\n return array(\n 'AL'=>'ALABAMA',\n 'AK'=>'ALASKA',\n 'AS'=>'AMERICAN SAMOA',\n 'AZ'=>'ARIZONA',\n 'AR'=>'ARKANSAS',\n 'CA'=>'CALIFORNIA',\n 'CO'=>'COLORADO',\n 'CT'=>'CONNECTICUT',\n 'DE'=>'DELAWARE',\n 'DC'=>'DISTRICT OF COLUMBIA',\n 'FM'=>'FEDERATED STATES OF MICRONESIA',\n 'FL'=>'FLORIDA',\n 'GA'=>'GEORGIA',\n 'GU'=>'GUAM GU',\n 'HI'=>'HAWAII',\n 'ID'=>'IDAHO',\n 'IL'=>'ILLINOIS',\n 'IN'=>'INDIANA',\n 'IA'=>'IOWA',\n 'KS'=>'KANSAS',\n 'KY'=>'KENTUCKY',\n 'LA'=>'LOUISIANA',\n 'ME'=>'MAINE',\n 'MH'=>'MARSHALL ISLANDS',\n 'MD'=>'MARYLAND',\n 'MA'=>'MASSACHUSETTS',\n 'MI'=>'MICHIGAN',\n 'MN'=>'MINNESOTA',\n 'MS'=>'MISSISSIPPI',\n 'MO'=>'MISSOURI',\n 'MT'=>'MONTANA',\n 'NE'=>'NEBRASKA',\n 'NV'=>'NEVADA',\n 'NH'=>'NEW HAMPSHIRE',\n 'NJ'=>'NEW JERSEY',\n 'NM'=>'NEW MEXICO',\n 'NY'=>'NEW YORK',\n 'NC'=>'NORTH CAROLINA',\n 'ND'=>'NORTH DAKOTA',\n 'MP'=>'NORTHERN MARIANA ISLANDS',\n 'OH'=>'OHIO',\n 'OK'=>'OKLAHOMA',\n 'OR'=>'OREGON',\n 'PW'=>'PALAU',\n 'PA'=>'PENNSYLVANIA',\n 'PR'=>'PUERTO RICO',\n 'RI'=>'RHODE ISLAND',\n 'SC'=>'SOUTH CAROLINA',\n 'SD'=>'SOUTH DAKOTA',\n 'TN'=>'TENNESSEE',\n 'TX'=>'TEXAS',\n 'UT'=>'UTAH',\n 'VT'=>'VERMONT',\n 'VI'=>'VIRGIN ISLANDS',\n 'VA'=>'VIRGINIA',\n 'WA'=>'WASHINGTON',\n 'WV'=>'WEST VIRGINIA',\n 'WI'=>'WISCONSIN',\n 'WY'=>'WYOMING',\n 'AE'=>'ARMED FORCES AFRICA \\ CANADA \\ EUROPE \\ MIDDLE EAST',\n 'AA'=>'ARMED FORCES AMERICA (EXCEPT CANADA)',\n 'AP'=>'ARMED FORCES PACIFIC'\n );\n }", "public function getStates(Request $request) { \t\n \tif($request->state_id) {\n $query = States::where('id', $request->state_id);\n \t} else if($request->chapter_id) {\n \t\t$query = (new States)->getChapterStates($request->chapter_id);\n \t} else {\n $query = new States;\n \t}\n $states = CommonHelper::customPagination($query);\n \tif(count($states)) {\n return response()->json([\n 'status'=>1,\n 'base_url' => $this->base_url,\n 'message' => 'States are available',\n 'data' => $states\n ], $this->successCode);\n } else { \n return response()->json([\n 'status'=>0,\n 'base_url' => $this->base_url,\n 'message'=>'Empty states!.',\n 'data' => [],\n ], $this->errorCode);\n }\n }", "public function getStoryStates()\n {\n $states = array();\n $data = $this->getData('stories');\n $total = (int) $data->attributes()->total;\n\n // Parse story API data for state count\n $stories = $data->xpath('/stories/story');\n while(list( , $node) = each($stories)) {\n $state = (string) $node->current_state;\n if(array_key_exists($state, $states)) {\n $states[$state]++;\n } else {\n $states[$state] = 1;\n }\n }\n\n // Compile into label/value format\n $formatted = array();\n foreach( $states as $state_name => $state_count ) {\n $state = $this->getState( $state_name );\n $formatted[] = array('label' => $state[\"label\"], 'value'=> $state_count, 'color'=> $state['color'], 'state' => $state_name);\n }\n return $formatted;\n }", "public static function getAllStates() {\r\n $srch = self::searchStates();\r\n $srch->addCondition('state_deleted', '=', Self::NOT_DELETED_STATE);\r\n return $srch;\r\n }", "public function index()\n {\n $states = $this->stateRepository->all();\n\n return response()->json($states);\n }", "public function getVisibleInSiteVisibilities()\n {\n return Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds();\n }", "public function getAllActiveWebsites();", "public static function getStates()\n {\n return [\n self::STATUS_SUCCESS,\n self::STATUS_RUNNING,\n self::STATUS_ERROR,\n ];\n }", "public function states(Request $request)\n {\n\t\t// Validate country\n\t\t$request->validate([\n\t\t\t'country' => 'required|exists:world_countries,id'\n\t\t]);\t\n\n\t\t// Get states\n\t\t$country = Country::find($request->country);\n\n\t\treturn response([\n\t\t\t'states' => $country->divisions,\n\t\t\t'cities' => $country->cities,\n\t\t], 200);\n }", "public function indexAction()\n\t{\n\t\t$states = State::find([\n\t\t\t'order' => 'name'\n\t\t]);\n\n\t\treturn $this->createResponse($states);\n\t}", "public function loadSiteSettingsHistory() {\n\t\t// Check for admin access\n\t\tif($this->access < 3) { return array('result' => 'failure', 'message' => 'Access Denied!'); }\n\t\t\n\t\t$history = $this->loadHistory(array(\n\t\t\t'title' => 'Site Settings History',\n\t\t\t'id' => null,\n\t\t\t'actions' => array(\n\t\t\t\t\\Enums\\LogActions::SITE_SETTINGS_MODIFIED\n\t\t\t)\n\t\t));\n\t\t\n\t\treturn $history;\n\t}", "public function getStatesCities() {\n\n TODO:\n }", "public function getStates()\n {\n return array(\n Workflow\\Machine::STATE_UNDEFINED => array(\n 'next' => 'ready',\n 'action' => array(\n 'Lottery_Game_Dice',\n 'initBet'\n ),\n 'properties' => array(\n Lottery_Game_Dice::PROPERTY_SUM,\n Lottery_Game_Dice::PROPERTY_CHANCE\n )\n ),\n // State\n 'ready' => array(\n 'roll' => array(\n 'next' => 'finished',\n 'title' => 'Roll',\n 'visible' => true,\n 'action' => array(\n 'Lottery_Game_Dice',\n 'roll'\n ),\n 'properties' => array(),\n 'preconditions' => array()\n ),\n 'cancel' => array(\n 'next' => 'canceled',\n 'title' => 'Cancel',\n 'visible' => true\n )\n ),\n 'finished' => array(),\n 'canceled' => array()\n );\n }", "private function get_sites() {\n\t\tif ( Options::get( 'api-key' ) === '' || ! isset( $_GET['page'] ) || $_GET['page'] !== 'helpscout-docs-api' ) {\n\t\t\treturn [];\n\t\t}\n\t\t$response = HelpScout_Request::get( 'sites' );\n\t\t$response = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t$sites = [];\n\t\tif ( isset( $response->sites->items ) && count( $response->sites->items ) > 0 ) {\n\t\t\tforeach ( $response->sites->items as $site ) {\n\t\t\t\t$sites[ $site->id ] = $site->title . ' <code>' . $site->subDomain . '</code>';\n\t\t\t}\n\t\t}\n\n\t\treturn $sites;\n\t}", "public function getSites() {\n return array_unique(array_map(function ($key) {\n return $this->getDrushAliasSite($key);\n }, array_keys($this->getDrushAliases())));\n }", "public function getstates(Request $request)\n\t{\n\t\t$country \t= Country::find($request->input('c_id'));\n\t\t$states \t= State::where('region_id', $country->id)->get(['id','name']);\n\t\tif($request->ajax()){\n\t\t\t$res = response()->json([\n\t\t\t\t'states' => $states\n\t\t\t]);\n\t\t\treturn $res;\n\t\t}\n\t}", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();" ]
[ "0.7277003", "0.7092814", "0.7092814", "0.67104447", "0.65732795", "0.65732795", "0.65732795", "0.65732795", "0.6513483", "0.6502114", "0.64591026", "0.64530903", "0.64219165", "0.6373933", "0.6350699", "0.6324024", "0.6306406", "0.62642103", "0.62183285", "0.6169718", "0.6158871", "0.6123932", "0.61116195", "0.61031586", "0.6096929", "0.60948575", "0.60895973", "0.608166", "0.608166", "0.6062655", "0.6052811", "0.60289466", "0.6006216", "0.59908056", "0.59839284", "0.5925619", "0.59251857", "0.5905911", "0.5892288", "0.5866893", "0.585977", "0.58536494", "0.58493704", "0.583495", "0.583495", "0.583495", "0.5834279", "0.58336264", "0.5833527", "0.5824304", "0.58227795", "0.5793459", "0.5770845", "0.5760352", "0.5729905", "0.5724601", "0.5706557", "0.5699723", "0.5697106", "0.5695532", "0.5695282", "0.5691556", "0.5688972", "0.5683389", "0.5673173", "0.56705296", "0.5663944", "0.56618124", "0.56576174", "0.56465024", "0.56450176", "0.56375384", "0.5633716", "0.5629432", "0.56209517", "0.5615044", "0.56087136", "0.56016105", "0.5597404", "0.55963784", "0.5580622", "0.55744404", "0.5566109", "0.55465287", "0.55426407", "0.5541568", "0.5535482", "0.55334514", "0.55304366", "0.5525103", "0.5524554", "0.55222195", "0.5513238", "0.55018634", "0.5493025", "0.5493025", "0.5493025", "0.5493025", "0.5493025", "0.5493025" ]
0.7588428
0
Handles a request to update plugin network options. This method works similar to how option updates are handled in `wpadmin/options.php` and `wpadmin/network/settings.php`.
Обрабатывает запрос на обновление параметров сети плагина. Этот метод работает аналогично тому, как обрабатываются обновления параметров в `wpadmin/options.php` и `wpadmin/network/settings.php`.
public function handle_update_options_request() { $option_group = filter_input( INPUT_POST, 'network_option_group', FILTER_SANITIZE_STRING ); $this->verify_request( "{$option_group}-network-options" ); $whitelist_options = Yoast_Network_Settings_API::get()->get_whitelist_options( $option_group ); if ( empty( $whitelist_options ) ) { add_settings_error( $option_group, 'settings_updated', __( 'You are not allowed to modify unregistered network settings.', 'wordpress-seo' ), 'error' ); $this->terminate_request(); return; } foreach ( $whitelist_options as $option_name ) { $value = null; if ( isset( $_POST[ $option_name ] ) ) { // WPCS: CSRF ok. $value = sanitize_text_field( wp_unslash( $_POST[ $option_name ] ) ); // WPCS: CSRF ok. } WPSEO_Options::update_site_option( $option_name, $value ); } $settings_errors = get_settings_errors(); if ( empty( $settings_errors ) ) { add_settings_error( $option_group, 'settings_updated', __( 'Settings Updated.', 'wordpress-seo' ), 'updated' ); } $this->terminate_request(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_network_option($network_id, $option, $value)\n{\n}", "public function update_options($request)\n {\n }", "protected function processUpdateOptions()\n {\n parent::processUpdateOptions();\n // @TODO Trigger cache clear on options change, when templates are affected by these options\n // Hook::exec('actionMyModule_Model3OptionsChanged');\n }", "function nr_options()\r\n{\r\n global $wpdb, $nr_domains;\r\n\r\n $options = get_option(NOW_READING_OPTIONS);\r\n\r\n if ( !empty($_GET['curl']) ) {\r\n echo '\r\n\t\t\t<div id=\"message\" class=\"error fade\">\r\n\t\t\t\t<p><strong>Oops!</strong></p>\r\n\t\t\t\t<p>You don\\'t appear to have cURL installed!</p>\r\n\t\t\t\t<p>Since you can\\'t use cURL, I\\'ve switched your HTTP Library setting to <strong>Snoopy</strong> instead, which should work.</p>\r\n\t\t\t</div>\r\n\t\t';\r\n }\r\n\r\n if ( !empty($_GET['imagesize']) ) {\r\n echo '\r\n\t\t\t<div id=\"message\" class=\"error fade\">\r\n\t\t\t\t<p><strong>Oops!</strong></p>\r\n\t\t\t\t<p>Naughty naughty! That wasn\\'t a valid value for the image size setting!</p>\r\n\t\t\t\t<p>Don\\'t worry, I\\'ve set it to medium for you.</p>\r\n\t\t\t</div>\r\n\t\t';\r\n }\r\n\r\n if( !strstr($_SERVER['REQUEST_URI'], 'wp-admin/options') && $_GET['updated'] ) {\r\n echo '\r\n\t\t\t<div id=\"message\" class=\"updated fade\">\r\n\t\t\t\t<p><strong>Options saved.</strong></p>\r\n\t\t\t</div>\r\n\t\t';\r\n }\r\n\r\n echo '\r\n\t<div class=\"wrap\">\r\n\r\n\t\t<h2>Now Reading Redux</h2>\r\n\t\t<i>Version: ' . NOW_READING_VERSION . '</i>\r\n\t';\r\n\r\n echo '\r\n\t\t<form method=\"post\" action=\"' . get_option('siteurl') . '/wp-content/plugins/now-reading-redux/admin/options.php\">\r\n\t';\r\n\r\n if ( function_exists('wp_nonce_field') )\r\n wp_nonce_field('now-reading-update-options');\r\n\r\n echo '\r\n\t\t<table class=\"form-table\" width=\"100%\" cellspacing=\"2\" cellpadding=\"5\">\r\n\t\t\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"> <h3>Library Options</h3><hr /></th>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryTitle\"><b>' . __('Library title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"libraryTitle\" id=\"libraryTitle\" value=\"' . text_or_default($options['libraryOptions']['title'], DEFAULT_LIBRARY_TITLE) . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'libraryTitle\\').value=\\'' . DEFAULT_LIBRARY_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryReadingShelfTitle\"><b>' . __('Reading shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"libraryReadingShelfTitle\" id=\"libraryReadingShelfTitle\" value=\"' . text_or_default($options['libraryOptions']['readingShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'libraryReadingShelfTitle\\').value=\\'' . DEFAULT_READING_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryReadingShelfViz\"><b>' . __('Reading shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"libraryReadingShelfViz\" id=\"libraryReadingShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readingShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readingShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readingShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readingShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryUnreadShelfTitle\"><b>' . __('Unread shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"libraryUnreadShelfTitle\" id=\"libraryUnreadShelfTitle\" value=\"' . text_or_default($options['libraryOptions']['unreadShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'libraryUnreadShelfTitle\\').value=\\'' . DEFAULT_UNREAD_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><label for=\"libraryUnreadShelfViz\"><b>' . __('Unread shelf visual', NRTD) . ':</b></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"libraryUnreadShelfViz\" id=\"libraryUnreadShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['unreadShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['unreadShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['unreadShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['unreadShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryOnholdShelfTitle\"><b>' . __('On Hold shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"libraryOnholdShelfTitle\" id=\"libraryOnholdShelfTitle\" value=\"' . text_or_default($options['libraryOptions']['onholdShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'libraryOnholdShelfTitle\\').value=\\'' . DEFAULT_ONHOLD_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryOnholdShelfViz\"><b>' . __('On Hold shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"libraryOnholdShelfViz\" id=\"libraryOnholdShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['onholdShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['onholdShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['onholdShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['onholdShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryReadShelfTitle\"><b>' . __('Finished shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"libraryReadShelfTitle\" id=\"libraryReadShelfTitle\" value=\"' . text_or_default($options['libraryOptions']['readShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'libraryReadShelfTitle\\').value=\\'' .DEFAULT_READ_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryReadShelfViz\"><b>' . __('Finished shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"libraryReadShelfViz\" id=\"libraryReadShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['readShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __('Also used for Tag and Author pages.', NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><label for=\"libraryCss\"><b>' . __(\"Library CSS code\", NRTD) . ':</b></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"libraryCss\" id=\"libraryCss\" rows=\"6\" cols=\"75\">' . $options['libraryOptions']['css'] . '</textarea>\n\t\t\t\t\t<br />\n\t\t\t\t\t<button type=\"button\" onclick=\"document.getElementById(\\'libraryCss\\').value=\\'' . str_replace(\"\\r\", \"\", str_replace(\"\\n\", \"\", DEFAULT_LIBRARY_CSS)) . '\\'\">' . __(\"Default\", NRTD) . '</button>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryRenderStyle\"><b>' . __('Rendering style', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"libraryRenderStyle\" id=\"libraryRenderStyle\">\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['renderStyle'] == 'list') ? ' selected=\"selected\"' : '' ) . ' value=\"list\">' . __(\"List\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['libraryOptions']['renderStyle'] == 'table') ? ' selected=\"selected\"' : '' ) . ' value=\"table\">' . __(\"Table\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryItemsPerTableRow\"><b>' . __(\"Items per table row\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"libraryItemsPerTableRow\" id=\"libraryItemsPerTableRow\" style=\"width:4em;\" value=\"' . ( intval($options['libraryOptions']['itemsPerTableRow']) ) . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Number of table columns used to render the sidebar. Only meaningful when \\\"Rendering style\\\" is \\\"Table\\\". For \\\"List\\\" this is 1 by default but automatically rearanged via CSS.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"libraryShowStats\"><b>' . __(\"Show statistics\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"libraryShowStats\" id=\"libraryShowStats\"' . ( ($options['libraryOptions']['showStats']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"With this option set, Now Reading Redux will generate a graph showing the number of books read per month during the past year and a summary of the anual average.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\t\t\t\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"use_mod_rewrite\"><b>' . __(\"Use <code>mod_rewrite</code> enhanced library\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"use_mod_rewrite\" id=\"use_mod_rewrite\"' . ( ($options['useModRewrite']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t' . __(\"If you have an Apache webserver with <code>mod_rewrite</code>, you can enable this option to have your library use prettier URLs. Compare:\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t<code>/index.php?now_reading_single=true&now_reading_author=albert-camus&now_reading_title=the-stranger</code>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t<code>/library/albert-camus/the-stranger/</code>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t' . sprintf(__(\"If you choose this option, be sure you have a custom permalink structure set up at your <a href='%s'>Options &rarr; Permalinks</a> page.\", NRTD), 'options-permalink.php') . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Permalink base:\") . ' ' . htmlentities(get_option('home')) . '/\r\n\t\t\t\t\t<input type=\"text\" name=\"permalink_base\" id=\"permalink_base\" value=\"' . htmlentities($options['permalinkBase']) . '\" /></p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"> <h3>Sidebar Widget Options</h3><hr /></th>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarReadingShelfTitle\"><b>' . __('Reading shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"sidebarReadingShelfTitle\" id=\"sidebarReadingShelfTitle\" value=\"' . text_or_default($options['sidebarOptions']['readingShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'sidebarReadingShelfTitle\\').value=\\'' . DEFAULT_READING_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarReadingShelfViz\"><b>' . __('Reading shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"sidebarReadingShelfViz\" id=\"sidebarReadingShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readingShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readingShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readingShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readingShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarReadingShelfMaxItems\"><b>' . __(\"Reading shelf items limit\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"sidebarReadingShelfMaxItems\" id=\"sidebarReadingShelfMaxItems\" style=\"width:4em;\" value=\"' . ( intval($options['sidebarOptions']['readingShelf']['maxItems']) ) . '\" />\r\n\t\t\t\t\t<p>' . __(\"This controls the maximum number of items shown on this shelf. Negative value (-1, for example) to show all.\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarUnreadShelfTitle\"><b>' . __('Unread shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"sidebarUnreadShelfTitle\" id=\"sidebarUnreadShelfTitle\" value=\"' . text_or_default($options['sidebarOptions']['unreadShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'sidebarUnreadShelfTitle\\').value=\\'' . DEFAULT_UNREAD_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarUnreadShelfViz\"><b>' . __('Unread shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"sidebarUnreadShelfViz\" id=\"sidebarUnreadShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['unreadShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['unreadShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['unreadShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['unreadShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarUnreadShelfMaxItems\"><b>' . __(\"Unread shelf items limit\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"sidebarUnreadShelfMaxItems\" id=\"sidebarUnreadShelfMaxItems\" style=\"width:4em;\" value=\"' . ( intval($options['sidebarOptions']['unreadShelf']['maxItems']) ) . '\" />\r\n\t\t\t\t\t<p>' . __(\"This controls the maximum number of items shown on this shelf. Negative value (-1, for example) to show all.\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarOnholdShelfTitle\"><b>' . __('On Hold shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"sidebarOnholdShelfTitle\" id=\"sidebarOnholdShelfTitle\" value=\"' . text_or_default($options['sidebarOptions']['onholdShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'sidebarOnholdShelfTitle\\').value=\\'' . DEFAULT_ONHOLD_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarOnholdShelfViz\"><b>' . __('On Hold shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"sidebarOnholdShelfViz\" id=\"sidebarOnholdShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['onholdShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['onholdShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['onholdShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['onholdShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarOnholdShelfMaxItems\"><b>' . __(\"On Hold shelf items limit\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"sidebarOnholdShelfMaxItems\" id=\"sidebarOnholdShelfMaxItems\" style=\"width:4em;\" value=\"' . ( intval($options['sidebarOptions']['onholdShelf']['maxItems']) ) . '\" />\r\n\t\t\t\t\t<p>' . __(\"This controls the maximum number of items shown on this shelf. Negative value (-1, for example) to show all.\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarReadShelfTitle\"><b>' . __('Finished shelf title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"sidebarReadShelfTitle\" id=\"sidebarReadShelfTitle\" value=\"' . text_or_default($options['sidebarOptions']['readShelf']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'sidebarReadShelfTitle\\').value=\\'' . DEFAULT_READ_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarReadShelfViz\"><b>' . __('Finished shelf visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"sidebarReadShelfViz\" id=\"sidebarReadShelfViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readShelf']['viz'] == 'hide') ? ' selected=\"selected\"' : '' ) . ' value=\"hide\">' . __(\"Hide\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readShelf']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readShelf']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['readShelf']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarReadShelfMaxItems\"><b>' . __(\"Finished shelf items limit\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"sidebarReadShelfMaxItems\" id=\"sidebarReadShelfMaxItems\" style=\"width:4em;\" value=\"' . ( intval($options['sidebarOptions']['readShelf']['maxItems']) ) . '\" />\r\n\t\t\t\t\t<p>' . __(\"This controls the maximum number of items shown on this shelf. Negative value (-1, for example) to show all.\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarCss\"><b>' . __(\"Sidebar CSS code\", NRTD) . ':</b></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"sidebarCss\" id=\"sidebarCss\" rows=\"6\" cols=\"75\">' . $options['sidebarOptions']['css'] . '</textarea>\n\t\t\t\t\t<br />\n\t\t\t\t\t<button type=\"button\" onclick=\"document.getElementById(\\'sidebarCss\\').value=\\'' . str_replace(\"\\r\", \"\", str_replace(\"\\n\", \"\", DEFAULT_SIDEBAR_CSS)) . '\\'\">' . __(\"Default\", NRTD) . '</button>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarRenderStyle\"><b>' . __('Rendering style', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"sidebarRenderStyle\" id=\"sidebarRenderStyle\">\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['renderStyle'] == 'list') ? ' selected=\"selected\"' : '' ) . ' value=\"list\">' . __(\"List\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['sidebarOptions']['renderStyle'] == 'table') ? ' selected=\"selected\"' : '' ) . ' value=\"table\">' . __(\"Table\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"sidebarItemsPerTableRow\"><b>' . __(\"Items per table row\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"sidebarItemsPerTableRow\" id=\"sidebarItemsPerTableRow\" style=\"width:4em;\" value=\"' . ( intval($options['sidebarOptions']['itemsPerTableRow']) ) . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Number of table columns used to render the sidebar. Only meaningful when \\\"Rendering style\\\" is \\\"Table\\\". For \\\"List\\\" this is 1 by default but automatically rearanged via CSS.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Note: The sidebar width is limited and, depending on the image width (which can be controlled by the CSS,) a wide table may be problematic. Try 2 or 3.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"wishlistTitle\"><b>' . __('Wishlist Title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"wishlistTitle\" id=\"wishlistTitle\" size=\"75\" value=\"' . text_or_default($options['wishlistTitle'], DEFAULT_WISHLIST_TITLE) . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"The link title to a wishlist page. Will not show unless Wishlist URL exists.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'wishlistTitle\\').value=\\'' . DEFAULT_WISHLIST_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"wishlistUrl\"><b>' . __('Wishlist URL', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"wishlistUrl\" id=\"wishlistUrl\" size=\"75\" value=\"' . htmlentities($options['wishlistUrl'], ENT_QUOTES, \"UTF-8\") . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"An optional link shown as <i>Wishlist Title</i>. Typically used to link to an Amazon wishlist page, but can be any page.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Add 'http://' to make the URL absolute and not relative to the current page.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"> <h3>Search Options</h3><hr /></th>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"searchTitle\"><b>' . __('Search page title', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"30\" style=\"vertical-align:middle;\" name=\"searchTitle\" id=\"searchTitle\" value=\"' . text_or_default($options['searchOptions']['title'], '') . '\" />\r\n\t\t\t\t\t<button type=\"button\" style=\"vertical-align:middle; height: 25px; width: 100px\" onclick=\"document.getElementById(\\'searchTitle\\').value=\\'' . DEFAULT_SEARCH_TITLE . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"searchViz\"><b>' . __('Search page visual', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"searchViz\" id=\"searchViz\">\r\n\t\t\t\t\t\t<option' . ( ($options['searchOptions']['viz'] == 'show_image') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image\">' . __(\"Show image only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['searchOptions']['viz'] == 'show_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_text\">' . __(\"Show text only\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['searchOptions']['viz'] == 'show_image_text') ? ' selected=\"selected\"' : '' ) . ' value=\"show_image_text\">' . __(\"Show both image and text\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"searchMaxItems\"><b>' . __(\"Search items limit\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"searchMaxItems\" id=\"searchMaxItems\" style=\"width:4em;\" value=\"' . ( intval($options['searchOptions']['maxItems']) ) . '\" />\r\n\t\t\t\t\t<p>' . __(\"This controls the maximum number of items shown on this shelf. Negative value (-1, for example) to show all.\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"searchCss\"><b>' . __(\"search CSS code\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<textarea name=\"searchCss\" id=\"searchCss\" rows=\"6\" cols=\"75\">' . $options['searchOptions']['css'] . '</textarea>\r\n\t\t\t\t\t<br />\r\n\t\t\t\t\t<button type=\"button\" onclick=\"document.getElementById(\\'searchCss\\').value=\\'' . str_replace(\"\\r\", \"\", str_replace(\"\\n\", \"\", DEFAULT_SEARCH_CSS)) . '\\'\">' . __(\"Default\", NRTD) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"searchRenderStyle\"><b>' . __('Rendering style', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"searchRenderStyle\" id=\"searchRenderStyle\">\r\n\t\t\t\t\t\t<option' . ( ($options['searchOptions']['renderStyle'] == 'list') ? ' selected=\"selected\"' : '' ) . ' value=\"list\">' . __(\"List\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['searchOptions']['renderStyle'] == 'table') ? ' selected=\"selected\"' : '' ) . ' value=\"table\">' . __(\"Table\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"searchItemsPerTableRow\"><b>' . __(\"Items per table row\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"searchItemsPerTableRow\" id=\"searchItemsPerTableRow\" style=\"width:4em;\" value=\"' . ( intval($options['searchOptions']['itemsPerTableRow']) ) . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Number of table columns used to render the search. Only meaningful when \\\"Rendering style\\\" is \\\"Table\\\". For \\\"List\\\" this is 1 by default but automatically rearanged via CSS.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"> <h3>Manage Page Options</h3><hr /></th>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"format_date\"><b>' . __('Date format string', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"format_date\" id=\"format_date\" value=\"' . htmlentities($options['formatDate'], ENT_QUOTES, \"UTF-8\") . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . sprintf(__(\"How to format the book's <code>added</code>, <code>started</code> and <code>finished</code> dates. Default is <code>jS F Y</code>. Acceptable variables can be found <a href='%s'>here</a>.\", NRTD), \"http://php.net/date\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"ignore_time\"><b>' . __('No time in timestamps', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"ignore_time\" id=\"ignore_time\"' . ( ($options['ignoreTime']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"When checked <code>added</code>, <code>started</code> and <code>finished</code> dates will be displayed with day precision only, however when time is set, it will be saved.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"hide_added_date\"><b>' . __('Hide Added Date', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"hide_added_date\" id=\"hide_added_date\"' . ( ($options['hideAddedDate']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"When checked <code>added</code> date will be hidden in the Manager and Book pages\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"books_per_page\"><b>' . __(\"Books per page\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"books_per_page\" id=\"books_per_page\" style=\"width:4em;\" value=\"' . ( intval($options['booksPerPage']) ) . '\" />\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"> <h3>Amazon Options</h3><hr /></th>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"AWSAccessKeyId\"><b>' . __('Amazon Web Services Access Key ID', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"70\" name=\"AWSAccessKeyId\" id=\"AWSAccessKeyId\" value=\"' . htmlentities($options['AWSAccessKeyId'], ENT_QUOTES, \"UTF-8\") . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . sprintf(__(\"Required to add books from Amazon. It's free to sign up. Register <a href='%s'>here</a>.\", NRTD), \"https://aws-portal.amazon.com/gp/aws/developer/registration/index.html\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"SecretAccessKey\"><b>' . __('Amazon Web Services Secret Access Key', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" size=\"70\" name=\"SecretAccessKey\" id=\"SecretAccessKey\" value=\"' . htmlentities($options['SecretAccessKey'], ENT_QUOTES, \"UTF-8\") . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . sprintf(__(\"Required to add books from Amazon. Found at the same site as above. Register <a href='%s'>here</a>.\", NRTD), \"https://aws-portal.amazon.com/gp/aws/developer/registration/index.html\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"associate\"><b>' . __('Your Amazon Associates ID', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"associate\" id=\"associate\" value=\"' . htmlentities($options['associate'], ENT_QUOTES, \"UTF-8\") . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"If you choose to link to your book's product page on Amazon.com using the <code>book_url()</code> template tag - as the default template does - then you can earn commission if your visitors then purchase products.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . sprintf(__(\"If you don't have an Amazon Associates ID, you can either <a href='%s'>get one</a>, or consider entering mine - <strong>%s</strong> - if you're feeling generous.\", NRTD), \"http://associates.amazon.com\", \"thevoid0f-20\") . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"domain\"><b>' . __('Amazon domain to use', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"domain\" id=\"domain\">\r\n\t';\r\n\t\t\t\t\tforeach ( (array) $nr_domains as $domain => $country )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$selected = ($domain == $options['domain']) ? ' selected=\"selected\"' : '';\r\n\t\t\t\t\t\techo \"<option value='$domain'$selected>$country (Amazon$domain)</option>\";\r\n\t\t\t\t\t}\t\r\n\t\t\techo '\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"If you choose to link to your book's product page on Amazon.com using the <code>book_url()</code> template tag, you can specify which country-specific Amazon site to link to. Now Reading Redux will also use this domain when searching.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"NB: If you have country-specific books in your catalogue and then change your domain setting, some old links might stop working.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"image_size\"><b>' . __('Image size to use', NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"image_size\" id=\"image_size\">\r\n\t\t\t\t\t\t<option' . ( ($options['imageSize'] == 'Small') ? ' selected=\"selected\"' : '' ) . ' value=\"Small\">' . __(\"Small\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['imageSize'] == 'Medium') ? ' selected=\"selected\"' : '' ) . ' value=\"Medium\">' . __(\"Medium\", NRTD) . '</option>\r\n\t\t\t\t\t\t<option' . ( ($options['imageSize'] == 'Large') ? ' selected=\"selected\"' : '' ) . ' value=\"Large\">' . __(\"Large\", NRTD) . '</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"NB: This change will only be applied to books you add from this point onwards.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"http_lib\"><b>' . __(\"HTTP Library\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<select name=\"http_lib\" id=\"http_lib\">\r\n\t\t\t\t\t\t<option' . ( ($options['httpLib'] == 'snoopy') ? ' selected=\"selected\"' : '' ) . ' value=\"snoopy\">Snoopy</option>\r\n\t\t\t\t\t\t<option' . ( ($options['httpLib'] == 'curl') ? ' selected=\"selected\"' : '' ) . ' value=\"curl\">cURL</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Don't worry if you don't understand this; unless you're having problems searching for books, the default setting will be fine.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"proxy_host\"><b>' . __(\"Proxy hostname and port\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"text\" name=\"proxy_host\" id=\"proxy_host\" size=\"50\" value=\"' . $options['proxyHost'] . '\" />:<input type=\"text\" name=\"proxy_port\" id=\"proxy_port\" style=\"width:4em;\" value=\"' . $options['proxyPort'] . '\" />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"Don't worry if you don't understand this; unless you're having problems searching for books, the default setting will be fine.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"> <h3>Admin Options</h3><hr /></th>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"multiuser_mode\"><b>' . __(\"Multiuser mode\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"multiuser_mode\" id=\"multiuser_mode\"' . ( ($options['multiuserMode']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"If you have a multi-user blog, setting this option will enable you to specify which user is reading which book.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><b>' . __('Admin menu layout', NRTD) . ':</th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<label for=\"menu_layout_single\">' . __('Single', NRTD) . '</label>\r\n\t\t\t\t\t<input type=\"radio\" name=\"menu_layout\" id=\"menu_layout_single\" value=\"single\"' . ( ( $options['menuLayout'] == NR_MENU_SINGLE ) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<br />\r\n\t\t\t\t\t<label for=\"menu_layout_multiple\">' . __('Multiple', NRTD) . '</label>\r\n\t\t\t\t\t<input type=\"radio\" name=\"menu_layout\" id=\"menu_layout_multiple\" value=\"multiple\"' . ( ( $options['menuLayout'] == NR_MENU_MULTIPLE ) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"When set to 'Single', Now Reading Redux will add a top-level menu with submenus containing the 'Add a Book', 'Manage Books' and 'Options' screens.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"When set to 'Multiple', Now Reading Redux will insert those menus under 'Write', 'Manage' and 'Options' respectively.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"debug_mode\"><b>' . __(\"Debug mode\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"debug_mode\" id=\"debug_mode\"' . ( ($options['debugMode']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"With this option set, Now Reading Redux will produce debugging output that might help you solve problems or at least report bugs.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr valign=\"top\">\r\n\t\t\t\t<th scope=\"row\"><label for=\"userThemeTemplates\"><b>' . __(\"Use Theme templatates\", NRTD) . ':</b></label></th>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input type=\"checkbox\" name=\"userThemeTemplates\" id=\"userThemeTemplates\"' . ( ($options['userThemeTemplates']) ? ' checked=\"checked\"' : '' ) . ' />\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t' . __(\"With this option set, Now Reading Redux will try to load the templates from Theme or Child Theme folders before falling back to its defaults.\", NRTD) . '\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\r\n\t\t</table>\r\n\r\n\t\t<input type=\"hidden\" name=\"update\" value=\"yes\" />\r\n\t\t<p class=\"submit\">\r\n\t\t\t<input type=\"submit\" value=\"' . __(\"Update Options\", NRTD) . '\" />\r\n\t\t</p>\r\n\t\t</form>\r\n\t</div>\r\n\t';\r\n}", "function updateOptions(){\r\n\t\t\r\n\t\tif ( isset( $_POST['api_key'] ) ){\r\n\t\t\tupdate_option( OPTIONS_API_KEY, trim( $_POST['api_key'] ) );\r\n\t\t}\r\n\t\tif ( isset( $_POST['user_id'] ) ){\r\n\t\t\tupdate_option( OPTIONS_USER_ID, trim( $_POST['user_id'] ) );\r\n\t\t}\r\n\t\tif ( isset( $_POST['date_format'] ) ){\r\n\t\t\tupdate_option( OPTIONS_DATE_FORMAT, trim( $_POST['date_format'] ) );\r\n\t\t}\t\r\n\r\n\t\tif ( isset( $_POST['cache_expire_time'] ) ){\r\n\t\t\t$expire_time = trim( $_POST['cache_expire_time'] );\r\n\t\t\tif ( !is_numeric( $expire_time ) || $expire_time < CACHE_EXPIRE_TIME_MINIMUM ){\r\n\t\t\t\t$expire_time = CACHE_EXPIRE_TIME_MINIMUM;\r\n\t\t\t}\r\n\t\t\tupdate_option( OPTIONS_CACHE_EXPIRE_TIME, $expire_time );\r\n\t\t}\r\n\t\t\r\n\t}", "public function options_update() {\n register_setting( $this->plugin_name, $this->plugin_name, array( $this, 'validate' ) );\n }", "function tw_change_options() {\r\n\r\n\tcheck_ajax_referer( 'ajax-options-nonce', 'security-options' );\r\n\t$result = [ 'status' => 0, 'message' => 'Fail', 'number' => '', 'error' => '' ];\r\n\ttry {\r\n\t\t// prepare subscriber data\r\n\t\t$phone = esc_attr( $_POST['tw_phone_field'] );\r\n\t\t$twilio_phone = esc_attr( $_POST['tw_twphone_field'] );\r\n\t\t$sid = esc_attr( $_POST['tw_sid_field'] );\r\n\t\t$auth = esc_attr( $_POST['tw_auth_field'] );\r\n\r\n\t\tif ( ! strlen( $phone ) || ! strlen( $twilio_phone ) || ! strlen( $sid ) || ! strlen( $auth ) ) {\r\n\t\t\t$result['error'] .= __('Fields are required','twilio-integration').'<br>';\r\n\t\t}\r\n\t\tif ( ! ( tw_phone_validator( $phone )) ) {\r\n\t\t\t$result['error'] .= __('Phone number is invalid','twilio-integration').'<br>';\r\n\t\t}\r\n\t\tif ( ! ( tw_phone_validator( $twilio_phone )) ) {\r\n\t\t\t$result['error'] .= __('Twilio number is invalid').'<br>';\r\n\t\t}\r\n\r\n\t\tif ( strlen($result['error']) ) {\r\n\t\t\t$result['status'] = -1;\r\n\t\t} else {\r\n\t\t\t$result['message'] = 'Success';\r\n\t\t\tupdate_option( 'tw-admin-phone', $phone );\r\n\t\t\tupdate_option( 'tw-admin-auth', $auth );\r\n\t\t\tupdate_option( 'tw-admin-sid', $sid );\r\n\t\t\tupdate_option( 'tw-admin-twilio-number', $twilio_phone );\r\n\t\t\t$result['status'] = 1;\r\n\t\t\t$result['message'] = __('Options updated.', 'twilio-integration');\r\n\t\t}\r\n\r\n\t} catch ( Exception $e ) {\r\n\t\t$result['message'] = 'Caught exception: ' . $e->getMessage();\r\n\t}\r\n\ttw_return_json( $result );\r\n}", "public function process_admin_options() {\r\n\t\tparent::process_admin_options();\r\n\r\n\t\t$this->set_settings();\r\n\t}", "public function options_page() {\n\t\t// phpcs:disable -- $_GET values need to be used without nonces\n\t\t$this->msg = '';\n\t\tif ( ! empty( $_GET['updated'] ) || ! empty( $_GET['settings-updated'] ) ) {\n\t\t\t$this->msg = __( 'Settings updated', 'wds' );\n\n\t\t\tif ( function_exists( 'w3tc_pgcache_flush' ) ) {\n\t\t\t\tw3tc_pgcache_flush();\n\t\t\t\t$this->msg .= __( ' &amp; W3 Total Cache Page Cache flushed', 'wds' );\n\t\t\t} elseif ( function_exists( 'wp_cache_clear_cache' ) ) {\n\t\t\t\twp_cache_clear_cache();\n\t\t\t\t$this->msg .= __( ' &amp; WP Super Cache flushed', 'wds' );\n\t\t\t}\n\t\t}\n\n\t\t$errors = get_settings_errors( $this->option_name );\n\t\tif ( $errors ) {\n\t\t\tset_transient( 'wds-settings-save-errors', $errors, 3 );\n\t\t}\n\t\t// phpcs:enable\n\t}", "public function process_admin_options()\n {\n parent::process_admin_options();\n\n global $wpdb;\n\n $wpdb->update($wpdb->prefix . \"options\", array('option_value' => $this->woocommerce_api_key), array('option_name' => 'sevi_wc_key'));\n $wpdb->update($wpdb->prefix . \"options\", array('option_value' => $this->woocommerce_api_secret), array('option_name' => 'sevi_wc_secret'));\n\n add_option('sevi_wc_key', $this->woocommerce_api_key, '');\n add_option('sevi_wc_secret', $this->woocommerce_api_secret, '');\n //Call Sevi API here.\n\n $data = [\n 'active' => $this->get_option('enabled') == 'yes' ? true : false,\n 'jwtToken' => $this->get_option('sevi_token'),\n 'url' => get_site_url(),\n 'consumerKey' => $this->woocommerce_api_key,\n 'consumerSecret' => $this->woocommerce_api_secret\n ];\n \n $this->curl_call('https://exodus.sevi.io/ecommerce/woocommerce/connect', $data);\n }", "function update__options() {\n\n\t\tif ( $this->have_existing_version() AND $this->have_new_version() ) {\n\n\t\t\tdo_action( \"$this->option_name-version_update\", $this->option_page );\n\t\t\t$this->options = get_option( $this->option_name );\n\n\t\t}\n\n\t}", "public function msm_save_network_options() {\n\n\t if( 'general' === $_POST['tab'] ) {\n\n\t\t if ( isset( $_POST['msm_sharing_settings']['msm_do_share_media'] ) && $_POST['msm_sharing_settings']['msm_do_share_media'] === 'yes' ) {\n\t\t\t $new_value['msm_do_share_media'] = 'yes';\n } else {\n $new_value['msm_do_share_media'] = 'no';\n\t\t\t}\n\n\t\t if ( isset( $_POST['msm_sharing_settings']['msm_do_delete_shared_media'] ) && $_POST['msm_sharing_settings']['msm_do_delete_shared_media'] === 'yes' ) {\n\t\t\t $new_value['msm_do_delete_shared_media'] = 'yes';\n\t\t } else {\n\t\t\t $new_value['msm_do_delete_shared_media'] = 'no';\n\t\t }\n\n\t\t update_site_option( 'msm_sharing_settings', $new_value );\n\t }\n\n\t\tif( 'relationships' === $_POST['tab'] ) {\n\t\t\t$relationship_map = $this->parse_relationship_array();\n\t\t\tupdate_network_option( null, 'msm_relationships', $relationship_map );\n\t\t}\n\n\t\t// redirect to settings page in network\n\t\twp_redirect(\n\t\t\tadd_query_arg(\n\t\t\t\tarray( 'page' => 'msm-setting-admin', 'updated' => 'true', 'tab' => $_POST['tab'] ),\n\t\t\t\t( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) )\n\t\t\t)\n\t\t);\n\t\texit;\n\t}", "function add_network_option($network_id, $option, $value)\n{\n}", "private function maybe_update_settings() {\n\t\tif ( isset( $_POST['searchwp_related_nonce'] ) && ! wp_verify_nonce( $_POST['searchwp_related_nonce'], 'searchwp_related_settings' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $_POST['searchwp_related'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$settings = $_POST['searchwp_related'];\n\n\t\t$this->settings = $this->validate( $settings );\n\n\t\tupdate_option( 'searchwp_related', $settings );\n\t}", "function ei_plugin_options(){\n\t\tif(!empty($_POST)){\n\t\t\tif(get_option('ei_access_token') !== false){\n\t\t\t\tupdate_option('ei_access_token', $_POST['access-token']);\n\t\t\t}else{\n\t\t\t\tadd_option('ei_access_token', $_POST['access-token']);\n\t\t\t}\n\n\t\t\tif(get_option('ei_user_id') !== false){\n\t\t\t\tupdate_option('ei_user_id', $_POST['user-id']);\n\t\t\t}else{\n\t\t\t\tadd_option('ei_user_id', $_POST['user-id']);\n\t\t\t}\n\t\t\t?>\n\t\t\t\t<div id=\"setting-error-settings_updated\" class=\"updated settings-error\"><p><strong>Settings saved.</strong></p></div>\n\t\t\t<?php\n\t\t}\n\n\t\t$access_token = get_option('ei_access_token');\n\t\t$user_id = get_option('ei_user_id');\n\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<h2>Enjoy Instagram</h2>\n\t\t\t\t<form action=\"options-general.php?page=enjoy-instagram-menu\" method=\"post\">\n\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">Access Token</th>\n\t\t\t\t\t\t\t\t<td><input type=\"text\" class=\"regular-text\" name=\"access-token\" value=\"<?=$access_token?>\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">User ID</th>\n\t\t\t\t\t\t\t\t<td><input type=\"text\" class=\"regular-text\" name=\"user-id\" value=\"<?=$user_id?>\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\n\t\t\t\t\t<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"Save Changes\"></p>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t<?php\n\t}", "function add_option_update_handler($option_group, $option_name, $sanitize_callback = '')\n{\n}", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n }", "public function process_admin_options()\n {\n parent::process_admin_options();\n\n wp_redirect($_SERVER['REQUEST_URI']);\n exit;\n }", "private function update() {\r\n\t\tforeach($this->option_groups as $group => $items) {\r\n\t\t\t$unchecked = array();\r\n\t\t\tforeach( $items as $key => $item ) if( !isset($_POST[\"{$group}__{$key}\"]) ) {\r\n\t\t\t\t// if no regex is supplied, leave the value empty, otherwise an array(key => regex)\r\n\t\t\t\t$unchecked[$key] = isset($item['regex']) ? $item['regex'] : '';\r\n\t\t\t}\r\n\t\t\t$this->options[$group] = $unchecked;\r\n\t\t}\r\n\t\t\r\n\t\t// special options stored in $options['special'], checked means active\r\n\t\tforeach( array( 'body_classes', 'post_classes', 'comment_classes', 'menu_classes' ) as $opt ){\r\n\t\t\tif( isset($_POST[\"special__$opt\"]) )\r\n\t\t\t\t$this->options['special'][$opt] = true;\r\n\t\t\telse\r\n\t\t\t\tunset( $this->options['special'][$opt] );\r\n\t\t}\r\n\t\t\r\n\t\t// some other tweaks\r\n\t\tforeach( array( 'menu_ids' ) as $opt ) {\r\n\t\t\tif( isset($_POST[\"other__$opt\"]) )\r\n\t\t\t\t$this->options['other'][$opt] = true;\r\n\t\t\telse\r\n\t\t\t\tunset( $this->options['other'][$opt] );\r\n\t\t}\r\n\r\n\t\tupdate_option( 'wp_declutter_options', $this->options );\r\n\t\techo '<div id=\"message\" class=\"updated fade\"><p>Options updated.</p></div>';\r\n\t}", "function wp_network_admin_email_change_notification($option_name, $new_email, $old_email, $network_id)\n{\n}", "public function update_option_network_wide( string $old_value, string $new_value, string $option_name ) : string {\n\t\t$blogs = get_sites();\n\n\t\t$this->register_hooks( 'unregister' ); // Don't cause an infinite loop.\n\n\t\tforeach ( $blogs as $blog ) {\n\n\t\t\t// Make sure every other blog in the network also has this same option.\n\t\t\tupdate_blog_option( $blog->blog_id, $option_name, $new_value );\n\t\t}\n\n\t\t$this->register_hooks(); // Catch the next save.\n\n\t\treturn $new_value;\n\t}", "function IniOrUpdateOptions() {\r\n\r\n\t\t##########################\r\n\t\t# Delete the options?\r\n\t\t##########################\r\n\t\t$isdeleted = false;\r\n\t\tif ( isset($_POST['delete-settings-'.$this->g_info['ShortName']]) ) {\r\n\t\t\tdelete_option($this->g_info['OptionName']);\r\n\t\t\t$isdeleted = true;\r\n\t\t}\r\n\r\n\t\t##########################\r\n\t\t# Initialize options\r\n\t\t##########################\r\n\t\t$this->g_opt = get_option($this->g_info['OptionName']);\r\n\r\n\t\t##########################\r\n\t\t# We check if we should set the default options\r\n\t\t##########################\t\t\t\t \r\n\t\t$ResetOpt = false;\r\n\t\t// We reset options if default options not exist\r\n\t\tif ( (!$ResetOpt) && ( !is_array($this->g_opt) || empty($this->g_opt) || $this->g_opt == false ) ) {\r\n\t\t\t$ResetOpt = true;\r\n\t\t}\r\n\t\t// We don't have a pluginversion option?\r\n\t\tif ( (!$ResetOpt) && ( $this->g_opt['pluginversion'] == '') ) {\r\n\t\t\t\t$ResetOpt = true;\r\n\t\t}\r\n\t\t// Check if we have updated from an old plugin version and if the version is older than the version limit ($this->g_info['UseOldOpt'])...\r\n\t\tif ( (!$ResetOpt) && ($this->g_opt['pluginversion'] != '') ) {\r\n\t\t\tif ( version_compare($this->g_opt['pluginversion'], $this->g_info['UseOldOpt'], '<' ) ) {\r\n\t\t\t\t$ResetOpt = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t##########################\r\n\t\t# Reset to default options\r\n\t\t##########################\r\n\t\tif ($ResetOpt) {\r\n\t\t\t// Options do not exist or have not yet been loaded or are old; so we set the default options\r\n\t\t\t$this->g_opt = $this->g_opt_default;\r\n\t\t}\r\n\r\n\t\t##########################\r\n\t\t# Copy old option values into new option values to not loose old options\r\n\t\t# This is only used if the OptionName changed!\r\n\t\t##########################\r\n\t\tif ( (!$isdeleted) && ($this->g_opt['pluginversion'] != $this->g_info['Version']) ) { \r\n\t\t\tif (is_array($this->g_info['DeleteOldOpt'])) {\r\n\t\t\t\t$savedoptnameArr = $this->g_info['DeleteOldOpt'];\t// array of old option names we want to delete later\r\n\t\t\t} else {\r\n\t\t\t\t$savedoptnameArr = array();\r\n\t\t\t}\r\n\t\t\t$savedoptnameArr[] = $this->g_info['OptionName']; // append current option name to array\r\n\t\t\t$savedoptnameArr = array_reverse($savedoptnameArr); // newest option first\r\n\t\t\tforeach ($savedoptnameArr as $loopval) {\r\n\t\t\t\tif ( get_option($loopval) != false ) {\r\n\t\t\t\t\t$opttemp = get_option($loopval);\r\n\t\t\t\t\tif ( (is_array($opttemp)) && (!empty($opttemp)) ) {\r\n\t\t\t\t\t\tforeach ($opttemp as $lpOptionName => $lpOptionValue) {\r\n\t\t\t\t\t\t\tif ($lpOptionName != 'pluginversion') {\r\n\t\t\t\t\t\t\t\t$this->g_opt[$lpOptionName] = $lpOptionValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// We save the options here.\r\n\t\t\t\t\t\t$this->g_opt['pluginversion'] = $this->g_info['Version'];\r\n\t\t\t\t\t\tadd_option($this->g_info['OptionName'], $this->g_opt); \t// adds option to table if it does not exist.\r\n\t\t\t\t\t\tupdate_option($this->g_info['OptionName'], $this->g_opt);\t// we save option since add_option does nothing if option already exists\r\n\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t##########################\r\n\t\t# If new options added or old ones removed: \r\n\t\t# Remove option entries or add the new ones\r\n\t\t##########################\r\n\t\t$newarray = array();\r\n\t\tforeach ( $this->g_opt_default as $lpOptionName => $lpOptionValue ) {\r\n\t\t\tif ( array_key_exists($lpOptionName, $this->g_opt) ) {\r\n\t\t\t\t$newarray[$lpOptionName] = $this->g_opt[$lpOptionName];\r\n\t\t\t} else {\r\n\t\t\t\t$newarray[$lpOptionName] = $this->g_opt_default[$lpOptionName];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->g_opt = $newarray;\r\n\r\n\r\n\r\n\r\n\t\t##########################\r\n\t\t# Set the current plugin version\r\n\t\t##########################\r\n\t\t$this->g_opt['pluginversion'] = $this->g_info['Version'];\r\n\r\n\r\n\t\t##########################\r\n\t\t# Save/update the options if required\r\n\t\t##########################\r\n\t\tif ( isset($_POST['update-options-'.$this->g_info['ShortName']]) ) {\r\n\t\t\t// Build array of options and add the $_POST values\r\n\t\t\tforeach ($this->g_opt as $lpOptionName => $lpOptionValue) {\r\n\t\t\t\tif (method_exists($this, 'COPTSave')) {\r\n\t\t\t\t\t$optionsToBeSaved[$lpOptionName] = $this->COPTSave($lpOptionName);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$optionsToBeSaved[$lpOptionName] = $_POST[$lpOptionName];\r\n\t\t\t\t}\r\n\t\t\t\t// for plugin version we don't have a $_POST so update it manually\r\n\t\t\t\t$optionsToBeSaved['pluginversion'] = $this->g_info['Version'];\r\n\t\t\t}\r\n\t\t\t// Update Options in the database\r\n\t\t\tadd_option($this->g_info['OptionName'], $optionsToBeSaved); \t// adds option to table if it does not exist.\r\n\t\t\tupdate_option($this->g_info['OptionName'], $optionsToBeSaved);\t// we save option since add_option does nothing if option already exists \t\r\n\t\t\t// Update Options in the class\r\n\t\t\t$this->g_opt = $optionsToBeSaved;\t\t\r\n\t\t}\r\n\t}", "function wp_load_core_site_options($network_id = \\null)\n{\n}", "function process_options_page() {\n\tcheck_admin_referer( 'wcrcss-options-submit', 'wcrcss-options-nonce' );\n\n\tif ( ! current_user_can( 'switch_themes' ) ) {\n\t\tthrow new \\Exception( __( 'Access denied.', 'wordcamporg' ) );\n\t}\n\n\t$remote_css_url = trim( $_POST['wcrcss-remote-css-url'] );\n\n\tif ( '' === $remote_css_url ) {\n\t\t$notice = '';\n\t\t$post = get_safe_css_post();\n\n\t\twp_delete_post( $post->ID );\n\t} else {\n\t\t$notice = __( 'The remote CSS file was successfully synchronized.', 'wordcamporg' );\n\t\t$remote_css_url = validate_remote_css_url( $remote_css_url );\n\n\t\tsynchronize_remote_css( $remote_css_url );\n\t}\n\n\tset_output_mode( $_POST['wcrcss-output-mode'] );\n\tupdate_option( OPTION_REMOTE_CSS_URL, $remote_css_url );\n\n\treturn $notice;\n}", "function lt_settings_panel() \r\n{\r\n\t$message = '';\r\n\t\r\n\t// Save the options\r\n\tif( isset($_POST['info_update']) ) \r\n\t{\r\n\t\tcheck_admin_referer('lt_settings_panel_update_options');\r\n\t\t$new_options = $_POST['latencytracker'];\r\n\t\tupdate_option( 'plugin_latencytracker_settings', $new_options);\r\n\t\t$message = '<div id=\"message\" class=\"updated fade\"><p><strong>' . __('Settings saved.') . '</strong></p></div>';\r\n\t}\r\n\telse\r\n\t{\r\n\t\tcheck_admin_referer();\r\n\t}\r\n\t\r\n\t// Get the options array\r\n\t$options = get_option('plugin_latencytracker_settings');\t\r\n\techo '<div class=\"wrap\">';\r\n\techo '<h2>Latency Tracker Settings</h2>';\r\n\techo $message;\r\n\techo '<form method=\"post\">';\r\n\t\twp_nonce_field('lt_settings_panel_update_options');\r\n\t\techo '<table class=\"form-table\">';\r\n\t\techo '<tr valign=\"top\">';\r\n\t\techo '<th scope=\"row\">Graph Width</th>';\r\n\t\techo '<td><input type=\"text\" name=\"latencytracker[lt_graph_width]\" value=\"'. $options['lt_graph_width'] .'\" /></td>';\r\n\t\techo '</tr>';\r\n\t\techo '<tr valign=\"top\">';\r\n\t\techo '<th scope=\"row\">Graph Height</th>';\r\n\t\techo '<td><input type=\"text\" name=\"latencytracker[lt_graph_height]\" value=\"'. $options['lt_graph_height'] .'\" /></td>';\r\n\t\techo '</tr>';\r\n\t\techo '<tr valign=\"top\">';\r\n\t\techo '<th scope=\"row\">Recent Requests</th>';\r\n\t\techo '<td><input type=\"text\" name=\"latencytracker[lt_recent_requests]\" value=\"'. $options['lt_recent_requests'] .'\" /></td>';\r\n\t\techo '</tr>';\r\n\t\techo '<tr valign=\"top\">';\r\n\t\techo '<th scope=\"row\">Max Records</th>';\r\n\t\techo '<td><input type=\"text\" name=\"latencytracker[lt_max_records]\" value=\"'. $options['lt_max_records'] .'\" /></td>';\r\n\t\techo '</tr>';\t\t\t\t\t\r\n\t\techo '</table>';\r\n\t\techo '<p class=\"submit\">';\r\n\t\techo '<input type=\"submit\" name=\"info_update\" value=\"Save Changes\" />';\r\n\t\techo '</p>';\r\n\techo '</form>';\r\n\techo '</div>';\r\n}", "function referrer_wp_options_page() {\r\n\r\n // variables for the field and option names \r\n\t$opt_name_1 = 'mt_referrer_searchvisits';\r\n $opt_name_5 = 'mt_referrer_plugin_support';\r\n\t$opt_name_6 = 'mt_referrer_header';\r\n\t$opt_name_7 = 'mt_referrer_number';\r\n $hidden_field_name = 'mt_referrer_submit_hidden';\r\n\t$data_field_name_1 = 'mt_referrer_searchvisits';\r\n $data_field_name_5 = 'mt_referrer_plugin_support';\r\n\t$data_field_name_6 = 'mt_referrer_header';\r\n\t$data_field_name_7 = 'mt_referrer_number';\r\n\r\n // Read in existing option value from database\r\n\t$opt_val_1 = get_option($opt_name_1);\r\n $opt_val_5 = get_option($opt_name_5);\r\n\t$opt_val_6 = get_option($opt_name_6);\r\n\t$opt_val_7 = get_option($opt_name_7);\r\n\r\n // See if the user has posted us some information\r\n // If they did, this hidden field will be set to 'Y'\r\n if( $_POST[ $hidden_field_name ] == 'Y' ) {\r\n // Read their posted value\r\n\t\t$opt_val_1 = $_POST[$data_field_name_1];\r\n $opt_val_5 = $_POST[$data_field_name_5];\r\n\t\t$opt_val_6 = $_POST[$data_field_name_6];\r\n\t\t$opt_val_7 = $_POST[$data_field_name_7];\r\n\r\n // Save the posted value in the database\r\n\t\tupdate_option( $opt_name_1, $opt_val_1 );\r\n update_option( $opt_name_5, $opt_val_5 );\r\n\t\tupdate_option( $opt_name_6, $opt_val_6 );\r\n\t\tupdate_option( $opt_name_7, $opt_val_7 );\r\n\r\n // Put an options updated message on the screen\r\n\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n\r\n }\r\n\r\n // Now display the options editing screen\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n // header\r\n\r\n echo \"<h2>\" . __( 'Referrer WP Plugin Options', 'mt_trans_domain' ) . \"</h2>\";\r\n\r\n // options form\r\n \r\n $change3 = get_option(\"mt_referrer_plugin_support\");\r\n\t$change30 = get_option(\"mt_referrer_searchvisits\");\r\n\t$change4 = get_option(\"mt_referrer_header\");\r\n\t$change5 = get_option(\"mt_referrer_number\");\r\n\r\n\r\nif ($change3==\"Yes\" || $change3==\"\") {\r\n$change3=\"checked\";\r\n$change31=\"\";\r\n} else {\r\n$change3=\"\";\r\n$change31=\"checked\";\r\n}\r\n\r\nif ($change30==\"Yes\") {\r\n$change30=\"checked\";\r\n$change301=\"\";\r\n} else {\r\n$change30=\"\";\r\n$change301=\"checked\";\r\n}\r\n\r\n?>\t\r\n<form name=\"form3\" method=\"post\" action=\"\">\r\n<h3>Referrer Websites</h3>\r\n\r\n<?php\r\n global $wpdb;\r\n $table_name = $wpdb->prefix . \"jrreferrer\";\r\n $referrer_number = get_option(\"mt_referrer_number\");\r\n \r\n if ($referrer_number==\"\") { $referrer_number = 5; }\r\n \r\n$rows = $wpdb->get_results(\"SELECT *\r\nFROM $table_name\r\nORDER BY id DESC\r\nLIMIT 0 , $referrer_number \");\r\n\r\necho \"<ul>\"; \r\nforeach ($rows as $rows) {\r\necho '<li><a href=\"'.$rows->url.'\" rel=\"nofollow\">'.$rows->title.'</a></li>';\r\n}\r\necho \"</ul>\";\r\n?>\r\n\r\n<h3>Settings</h3>\r\n\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\r\n\r\n<p><?php _e(\"Referrer Widget Title\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_6; ?>\" value=\"<?php echo stripslashes($change4); ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Number of Referrer Websites to show\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_7; ?>\" value=\"<?php echo stripslashes($change5); ?>\" size=\"5\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Block Search Engine Referrers?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_1; ?>\" value=\"Yes\" <?php echo $change30; ?>>Yes (Default)\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_1; ?>\" value=\"No\" <?php echo $change301; ?>>No\r\n</p>\r\n\r\n<p><?php _e(\"Show Plugin Support?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_5; ?>\" value=\"Yes\" <?php echo $change3; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_5; ?>\" value=\"No\" <?php echo $change31; ?>>No\r\n</p>\r\n\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'mt_trans_domain' ) ?>\" />\r\n</p><hr />\r\n\r\n</form>\r\n</div>\r\n<?php\r\n \r\n}", "public function woocommerce_update_options() {\n\n\t\tWC_Admin_Settings::save_fields( $this->woocommerce_get_settings() );\n\n\t}", "function kemi_social_images_options_page_html() {\n// check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n}\n\n// add error/update messages\n\n// check if the user have submitted the settings\n// wordpress will add the \"settings-updated\" $_GET parameter to the url\nif ( isset( $_GET['settings-updated'] ) ) {\n// add settings saved message with the class of \"updated\"\n add_settings_error( 'kemi_social_images_messages', 'kemi_social_images_message', __( 'Settings Saved', 'kemi_social_images' ), 'updated' );\n}\n\n// show error/update messages\nsettings_errors( 'kemi_social_images_messages' );\n?>\n<div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"kemi_social_images\"\n settings_fields( 'kemi_social_images' );\n // output setting sections and their fields\n // (sections are registered for \"kemi_social_images\", each field is registered to a specific section)\n do_settings_sections( 'kemi_social_images' );\n\n\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n</div>\n<?php\n}", "function admin_save_settings () {\n\t\t\t$settings = $this->get_option ();\n\n\t\t\tif (!empty ($_POST['geopress_option_submitted'])) {\n\t\t\t\tif (strstr ($_GET['page'], \"geopress\") &&\n\t\t\t\t \t\tcheck_admin_referer ('geopress-update-options')) {\n\t\t\t\t\t$tab = $this->admin_validate_tab ();\n\t\t\t\t\t$update_options = true;\n\t\t\t\t\t$reset_options = false;\n\t\t\t\t\t$update_msg = self::$tab_names[$tab];\n\t\t\t\t\t$action_msg = __('Updated', 'wp-biographia');\n\n\t\t\t\t\tswitch ($tab) {\n\t\t\t\t\t\tcase 'locations':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'geocoding':\n\t\t\t\t\t\t\t$settings['geocoder'] = $this->admin_option ('geopress_geocoder_type');\n\t\t\t\t\t\t\t$settings['cloudmade_key'] = $this->admin_option ('geopress_cloudmade_key');\n\t\t\t\t\t\t\t$settings['google_key'] = $this->admin_option ('geopress_google_key');\n\t\t\t\t\t\t\t$settings['microsoft7_key'] = $this->admin_option ('geopress_bing_key');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'feeds':\n\t\t\t\t\t\t\t$settings['rss_enable'] = $this->admin_option ('geopress_rss_enable');\n\t\t\t\t\t\t\t$settings['rss_format'] = $this->admin_option ('geopress_rss_format');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'defaults':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'help':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'colophon':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'maps':\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$settings['map_width'] = $this->admin_option ('geopress_map_width');\n\t\t\t\t\t\t\t$settings['map_height'] = $this->admin_option ('geopress_map_height');\n\t\t\t\t\t\t\t$settings['default_zoom_level'] = $this->admin_option ('geopress_zoom_level');\n\t\t\t\t\t\t\t$settings['map_type'] = $this->admin_option ('geopress_view_type');\n\t\t\t\t\t\t\t$settings['map_format'] = $this->admin_option ('geopress_map_format');\n\t\t\t\t\t\t\t$settings['controls_zoom'] = $this->admin_option ('geopress_control_size');\n\t\t\t\t\t\t\t$settings['controls_pan'] = $this->admin_option ('geopress_control_pan');\n\t\t\t\t\t\t\t$settings['controls_type'] = $this->admin_option ('geopress_control_type');\n\t\t\t\t\t\t\t$settings['controls_overview'] = $this->admin_option ('geopress_control_overview');\n\t\t\t\t\t\t\t$settings['controls_scale'] = $this->admin_option ('geopress_control_scale');\n\t\t\t\t\t\t\t$settings['nokia_app_id'] = html_entity_decode ($this->admin_option ('geopress_nokia_app_id'));\n\t\t\t\t\t\t\t$settings['nokia_app_token'] = html_entity_decode ($this->admin_option ('geopress_nokia_app_token'));\n\t\t\t\t\t\t\t$settings['google_key'] = html_entity_decode ($this->admin_option ('geopress_google_key'));\n\t\t\t\t\t\t\t$settings['cloudmade_key'] = html_entity_decode ($this->admin_option ('geopress_cloudmade_key'));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t// end-switch\n\t\t\t\t\t\n\t\t\t\t\tif ($update_options) {\n\t\t\t\t\t\tupdate_option (self::OPTIONS, $settings);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($update_options || $reset_options) {\n\t\t\t\t\t\techo \"<div id=\\\"updatemessage\\\" class=\\\"updated fade\\\"><p>\";\n\t\t\t\t\t\techo sprintf (__('%s Settings And Options %s', 'geopress'),\n\t\t\t\t\t\t\t$update_msg, $action_msg);\n\t\t\t\t\t\techo \"</p></div>\\n\";\n\t\t\t\t\t\techo \"<script \ttype=\\\"text/javascript\\\">setTimeout(function(){jQuery('#updatemessage').hide('slow');}, 3000);</script>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$settings = $this->get_option ();\n\t\t\treturn $settings;\n\t\t}", "public function postOptions( OptionsRequest $request )\n {\n $inputs = $request->except([ '_token', '_route', '_radio', '_checkbox', '_previous' ]);\n\n /**\n * Before ssaving an option\n * we might trigger an even so that \n * it can be cauth\n */\n $inputs = Hook::filter( 'before.update.options', $inputs );\n \n /**\n * If the field is defined as a radio or checkbox field, then\n * it's deleted from the db to define new options. \n * This is performed specially in case where the user \n * disable a switch field or checkbox\n */\n\n // deleting _checkbox field\n foreach( ( array ) $request->input( '_checkbox' ) as $key ) {\n if ( in_array( $key, ( array ) $request->input( '_radio' ) ) || in_array( $key, ( array ) $request->input( '_checkbox' ) ) ) {\n $this->options->delete( $key );\n }\n }\n\n // deleting _radio field\n foreach( ( array ) $request->input( '_radio' ) as $key ) {\n if ( in_array( $key, ( array ) $request->input( '_radio' ) ) ) {\n $this->options->delete( $key );\n }\n }\n\n /**\n * Loop options and saved it\n * to the option table\n */\n foreach ( $inputs as $key => $value ) {\n if ( is_bool( $value ) ) {\n $value === true ? $this->options->set( $key, $value ) : $this->options->delete( $key );\n } else {\n $this->options->set( $key, $value );\n }\n }\n\n $response = [\n 'status' => 'success',\n 'message' => __( 'The options has been saved.' )\n ];\n\n /**\n * Redirect to previous route\n */\n if ( $request->ajax() ) {\n return $response;\n } else {\n return redirect( $request->input( '_previous' ) )\n ->with( $response );\n }\n }", "public function network_settings_page() {\n\t\tadd_submenu_page( 'settings.php', __( 'Upload Scanner Options', 'upload-scanner' ), __( 'Upload Scanner', 'upload-scanner' ), 'administrator', basename(__FILE__), array(&$this,'plugin_options'));\n\t}", "public function update_vulns_settings() {\n\n\t\t$vulns_obj = \\WPTC_Base_Factory::get( 'Wptc_Vulns' );\n\n\t\t$data = isset( $_POST['data'] ) ? wp_unslash( $_POST['data'] ) : array();\n\t\t$vulns_obj->update_vulns_settings( $data );\n\n\t\treturn array( 'success' => 1 );\n\t}", "function tas_plugin_options() {\n if (!current_user_can('manage_options'))\n {\n wp_die( __('You do not have sufficient permissions to access this page.') );\n }\n // variables for the field and option names\n $opt_tas_app_id = 'tas_app_id';\n $opt_tas_api_key = 'tas_api_key';\n $hidden_field_name = 'tas_submit_hidden';\n $data_tas_app_id = 'tas_app_id';\n $data_tas_api_key = 'tas_api_key';\n\n // Read in existing option value from database\n $opt_tas_app_id_val = get_option( $opt_tas_app_id );\n $opt_tas_api_key_val = get_option( $opt_tas_api_key );\n\n // See if the user has posted us some information\n // If they did, this hidden field will be set to 'Y'\n if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' )\n {\n // Read their posted value\n $opt_tas_app_id_val = $_POST[ $data_tas_app_id ];\n $opt_tas_api_key_val = $_POST[ $data_tas_api_key ];\n\n // Save the posted value in the database\n update_option( $opt_tas_app_id, $opt_tas_app_id_val );\n update_option( $data_tas_api_key, $opt_tas_api_key_val);\n\n // Put a \"settings saved\" message on the screen\n\n?>\n <div class=\"updated\"><p><strong><?php _e('Settings saved.', 'tas-plugin' ); ?></strong></p></div>\n<?php\n\n }\n // Now display the settings editing screen\n echo '<div class=\"wrap\">';\n // header\n echo \"<h2>\" . __( 'Titan Algolia Search Settings', 'tas-plugin' ) . \"</h2>\";\n // settings form\n ?>\n <form name=\"form1\" method=\"post\" action=\"\">\n <input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n\n <p><?php _e(\"Application ID:\", 'tas-plugin' ); ?>\n <input type=\"text\" name=\"<?php echo $data_tas_app_id; ?>\" value=\"<?php echo $opt_tas_app_id_val; ?>\" size=\"40\">\n </p><hr />\n\n <p><?php _e(\"Admin API Key:\", 'tas-plugin' ); ?>\n <input type=\"text\" name=\"<?php echo $data_tas_api_key; ?>\" value=\"<?php echo $opt_tas_api_key_val; ?>\" size=\"40\">\n </p><hr />\n\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\n </p>\n\n </form>\n </div>\n\n<?php\n\n}", "public function init() {\n\t\t$this->options = self::get_specific_options( $this->option_name );\n\t\tif ( is_multisite() && defined( 'SMARTCRAWL_SITEWIDE' ) && SMARTCRAWL_SITEWIDE ) {\n\t\t\t$this->capability = 'manage_network_options';\n\t\t}\n\n\t\tadd_action( 'init', array( $this, 'defaults' ), 999 );\n\t\tadd_action( 'admin_body_class', array( $this, 'add_body_class' ), 20 );\n\t\tadd_action( 'all_admin_notices', array( $this, 'add_settings_message' ), 10 );\n\n\t\tif ( is_multisite() ) {\n\t\t\tadd_action( 'network_admin_menu', array( $this, 'add_page' ) );\n\t\t}\n\t\tif ( ! is_multisite() || ! ( defined( 'SMARTCRAWL_SITEWIDE' ) && SMARTCRAWL_SITEWIDE ) ) {\n\t\t\tadd_action( 'admin_menu', array( $this, 'add_page' ) );\n\t\t}\n\n\t}", "public function process_admin_options()\n {\n if ( version_compare( WOOCOMMERCE_VERSION, '2.6.4', '>=' ) ) {\n $this->validate_settings_fields();\n if ( ! empty( $this->errors ) ) {\n $this->display_errors();\n }\n }\n parent::process_admin_options();\n }", "protected function run()\n {\n $options = $this->request->get();\n\n foreach ($options as $key => $value) {\n $key = 'o_' . $key;\n if ($this->config->has($key)) {\n $this->config->set($key, $value);\n $this->trigger('option.changed', [$key, $value]);\n }\n }\n\n $this->config->save();\n }", "public function processSettingsUpdate()\n\t{\n\t\t\n\t}", "function mcd_options_page_hook(){\n\t\n\t/* check privileges */\n\tif(!current_user_can('manage_options')){\n\t\tdie(__( \"You don't have sufficient privileges to display this page\", 'mcd_plugin'));\n\t}\n\t?>\n\t<div class=\"wrap\">\n\t\t<div class=\"icon32\" id=\"icon-options-general\"></div>\n\t\t<h2><?php echo __('Mobile Client Detection','mcd_plugin');?></h2>\n\t\t<div class=\"su-tabs\">\n\t\t<?php\n\t\tif($_POST){\n\t\t\t\n\t\t\t/* todo: some input validation wouldn't hurt */\n\t\t\t\n\t\t\t/* update the options */\n\t\t\t$mcd_options = array((int)$_POST['general_results'],(int)$_POST['debug_output'],(int)$_POST['mcd_mode'],(int)$_POST['add_vars']);\n\t\t\tupdate_option('mcd_options',$mcd_options);\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t/* get options */\n\t\t\t$mcd_options = mcd_get_option();\n\t\t}\n\t\t?>\n\t\t<form method=\"post\" action=\"options-general.php?page=mcd_plugin\">\n\t\t\t<fieldset>\n\t\t\t\t\n\t\t\t\t<h3>General Results Only (mobile, desktop, tablet):</h3>\n\t\t\t\t<select id=\"general_results\" name=\"general_results\">\n\t\t\t\t\t<option value=\"1\"<?php echo(($mcd_options[0]==1)?' selected=\"selected\"':'');?>>Yes</option>\n\t\t\t\t\t<option value=\"0\"<?php echo(($mcd_options[0]==0)?' selected=\"selected\"':'');?>>No</option>\n\t\t\t\t</select>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<h3>Debug Output in Footer:</h3>\n\t\t\t\t<select id=\"debug_output\" name=\"debug_output\">\n\t\t\t\t\t<option value=\"1\"<?php echo(($mcd_options[1]==1)?' selected=\"selected\"':'');?>>Yes</option>\n\t\t\t\t\t<option value=\"0\"<?php echo(($mcd_options[1]==0)?' selected=\"selected\"':'');?>>No</option>\n\t\t\t\t</select>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<h3>Modus operandi:</h3>\n\t\t\t\t<select id=\"mcd_mode\" name=\"mcd_mode\">\n\t\t\t\t\t<option value=\"0\"<?php echo(($mcd_options[2]==0)?' selected=\"selected\"':'');?>>Just load the WP template</option>\n\t\t\t\t\t<option value=\"1\"<?php echo(($mcd_options[2]==1)?' selected=\"selected\"':'');?>>Load a custom template file</option>\n\t\t\t\t\t<option value=\"2\"<?php echo(($mcd_options[2]==2)?' selected=\"selected\"':'');?>>Load a custom theme directory</option>\n\t\t\t\t</select>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<h3>Add query_vars 'platform' & 'browser':</h3>\n\t\t\t\t<select id=\"add_vars\" name=\"add_vars\">\n\t\t\t\t\t<option value=\"1\"<?php echo(($mcd_options[3]==1)?' selected=\"selected\"':'');?>>Yes</option>\n\t\t\t\t\t<option value=\"0\"<?php echo(($mcd_options[3]==0)?' selected=\"selected\"':'');?>>No</option>\n\t\t\t\t</select>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t</fieldset>\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<?php\n}", "function pagelines_ajax_save_option_callback() {\n\tglobal $wpdb;\n\n\t$option_name = $_POST['option_name'];\n\t$option_value = $_POST['option_value'];\n\n\tupdate_option( $option_name, $option_value );\n\n\tdie();\n}", "public function seon_add_network_settings() {\r\n if (is_super_admin())\r\n add_submenu_page('settings.php', __('SEON API Settings', 'seon'), __('SEON', 'seon'), 'administrator', 'seon-network-settings', array(&$this, 'seon_admin_settings'));\r\n }", "function update_site_option($option, $value)\n{\n}", "static function network_admin_option() {\n\n\t\tif ( ! current_user_can( 'manage_network' ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$themes = wp_get_themes( array( 'allowed' => true ) );\n\t\t$default_theme = get_site_option( 'default_network_theme' );\n\n\t\tif ( empty( $themes ) || ! is_array( $themes ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t?>\n\n\t\t<h3><?php _e( 'Theme settings', 'ms-dt' ); ?></h3>\n\t\t<table id=\"menu\" class=\"form-table\">\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<th scope=\"row\"><?php _e( 'Theme by default', 'ms-dt' ); ?></th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"default_network_theme\" id=\"default-network-theme\">\n\t\t\t\t\t\t<?php foreach ( $themes as $theme ) : ?>\n\t\t\t\t\t\t\t<option value=\"<?php esc_attr_e( $theme->template ); ?>\" <?php selected( esc_attr( $theme->template ), $default_theme ); ?>><?php esc_html_e( $theme->name ); ?></option> ;\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<a href=\"<?php echo esc_url( network_admin_url( 'themes.php' ) ); ?>\"><?php _e( 'See themes available', 'ms-dt' ); ?></a>\n\t\t<?php\n\n\t}", "public function update(Request $request, Network $network)\n {\n //\n }", "public function handle_form() {\r\n\r\n if ( ! isset( $_POST['Submit_Option'] ) ) {\r\n return;\r\n }\r\n\r\n if ( ! wp_verify_nonce( $_POST['_wpnonce'], '' ) ) {\r\n die( __( 'Are you cheating?', '' ) );\r\n }\r\n\r\n if ( ! current_user_can( 'read' ) ) {\r\n wp_die( __( 'Permission Denied!', '' ) );\r\n }\r\n\r\n $errors = array();\r\n $page_url = admin_url( 'admin.php?page=optionsmetadata' );\r\n $field_id = isset( $_POST['field_id'] ) ? intval( $_POST['field_id'] ) : 0;\r\n\r\n $option_id = isset( $_POST['option_id'] ) ? sanitize_text_field( $_POST['option_id'] ) : '';\r\n $option_name = isset( $_POST['option_name'] ) ? sanitize_text_field( $_POST['option_name'] ) : '';\r\n $option_value = isset( $_POST['option_value'] ) ? sanitize_text_field( $_POST['option_value'] ) : '';\r\n $autoload = isset( $_POST['autoload'] ) ? sanitize_text_field( $_POST['autoload'] ) : '';\r\n\r\n // some basic validation\r\n if ( ! $option_name ) {\r\n $errors[] = __( 'Error: Option Name is required', '' );\r\n }\r\n\r\n if ( ! $option_value ) {\r\n $errors[] = __( 'Error: Option Value is required', '' );\r\n }\r\n\r\n if ( ! $autoload ) {\r\n $errors[] = __( 'Error: Autoload is required', '' );\r\n }\r\n\r\n\r\n // bail out if error found\r\n if ( $errors ) {\r\n\r\n $first_error = reset( $errors );\r\n $redirect_to = add_query_arg( array( 'error' => $first_error ), $page_url );\r\n wp_safe_redirect( $redirect_to );\r\n exit;\r\n }\r\n\r\n $fields = array(\r\n //'option_id' => $option_id,\r\n 'option_name' => $option_name,\r\n 'option_value' => $option_value,\r\n 'autoload' => $autoload,\r\n );\r\n\r\n // New or edit?\r\n if ( ! $field_id ) {\r\n $insert_id = op_insert_option( $fields );\r\n\r\n } else {\r\n $fields['option_id'] = $field_id;\r\n\r\n $insert_id = op_insert_option( $fields );\r\n }\r\n\r\n if ( is_wp_error( $insert_id ) ) {\r\n $redirect_to = add_query_arg( array( 'message' => 'error' ), $page_url );\r\n } else {\r\n $redirect_to = add_query_arg( array( 'message' => 'success' ), $page_url );\r\n }\r\n\r\n wp_safe_redirect( $redirect_to );\r\n exit;\r\n }", "function network_mailboxes_settings() {\n $ssl_yes = false;\n $ssl_no = false;\n if (isset($_POST['submit'])) {\n $host = $_POST['host'];\n $domain = $_POST['domain'];\n $port = $_POST['port'];\n $ssl = $_POST['ssl'];\n $quota = $_POST['quota'];\n $username = $_POST['username'];\n $password = $_POST['password'];\n if($ssl==1) $ssl_yes = true;\n else $ssl_no = true;\n\n // Prepare new settings\n $new_settings = array(\n 'host' => $host,\n 'domain' => $domain,\n 'port' => $port,\n 'ssl' => $ssl,\n 'quota' => $quota,\n 'username' => $username,\n 'password' => $password\n );\n update_site_option('network_admin_mailboxes_settings', $new_settings);\n\n // Queue error message\n add_settings_error('general', 'settings_updated', __('Settings saved'), 'updated');\n }\n else if ((get_site_option('network_admin_mailboxes_settings'))?get_site_option('network_admin_mailboxes_settings'):get_blog_option(1, 'network_admin_mailboxes_settings')) {\n // Load settings if exist\n $settings = (get_site_option('network_admin_mailboxes_settings'))?get_site_option('network_admin_mailboxes_settings'):get_blog_option(1, 'network_admin_mailboxes_settings');\n $host = $settings['host'];\n $domain = $settings['domain'];\n $port = $settings['port'];\n $ssl = $settings['ssl'];\n $quota = $settings['quota'];\n $username = $settings['username'];\n $password = $settings['password'];\n if($ssl==1) $ssl_yes = true;\n else $ssl_no = true;\n }\n else {\n // Default setting for port and ssl\n $port = 2082;\n $ssl_no = true;\n }\n // Show message if exists\n settings_errors();\n \n // Load the settings form\n require(plugin_dir_path(__FILE__) . 'forms/network_admin_mailboxes_form.php');\n }", "function dg_plugin_update($checked_data) {\r\n global $wp_version;\r\n $api_url = \"https://api.divigear.com/\";\r\n $option = get_option('dg_settings');\r\n $plugin_slug = basename(dirname(__DIR__));\r\n $array_key = $plugin_slug .'/'. $plugin_slug .'.php';\r\n\r\n // need to change according to the plugin\r\n $api_key = isset($option['dgdc_license_key_setting']) ? $option['dgdc_license_key_setting'] : '';\r\n $status = isset($option['dgdc_license_key_status']) ? $option['dgdc_license_key_status'] : '';\r\n\r\n //Comment out these two lines during testing.\r\n if (empty($checked_data->checked)) {\r\n return $checked_data;\r\n }\r\n if (!array_key_exists($array_key, $checked_data->checked ) ) {\r\n return $checked_data;\r\n }\r\n\r\n $args = array(\r\n 'slug' => $plugin_slug,\r\n 'version' => $checked_data->checked[$plugin_slug .'/'. $plugin_slug .'.php'],\r\n 'apikey' => $api_key,\r\n 'status' => $status,\r\n 'file_name' => $plugin_slug\r\n );\r\n $request_string = array(\r\n 'body' => array(\r\n 'action' => 'basic_check',\r\n 'request' => serialize($args),\r\n 'api-key' => md5(get_bloginfo('url'))\r\n ),\r\n 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')\r\n );\r\n\r\n // Start checking for an update\r\n $raw_response = wp_remote_post($api_url, $request_string);\r\n\r\n if (!is_wp_error($raw_response) && ($raw_response['response']['code'] == 200))\r\n $response = unserialize($raw_response['body']);\r\n\r\n if (is_object($response) && !empty($response)) // Feed the update data into WP updater\r\n $checked_data->response[$plugin_slug .'/'. $plugin_slug .'.php'] = $response;\r\n\r\n return $checked_data;\r\n}", "function woocommerce_update_options($options, $data = \\null)\n {\n }", "function upgrade_network()\n{\n}", "public static function updateSettings()\n {\n woocommerce_update_options( self::getSettings() );\n }", "function knvb_api_options() {\n?>\n\n<div class=\"wrap\">\n <h2>KNVB API Opties</h2>\n\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields('knvb-api-settings-group'); ?>\n <?php do_settings_sections('knvb-api-settings-group'); ?>\n\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">API sleutel</th>\n <td>\n <input type=\"text\" name=\"knvb_api_key\" value=\"<?php echo esc_attr(get_option('knvb_api_key')); ?>\" />\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Pathname</th>\n <td>\n <input type=\"text\" name=\"knvb_api_pathname\" value=\"<?php echo esc_attr(get_option('knvb_api_pathname')); ?>\" />\n </td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Clubnaam (volgens KNVB-site)</th>\n <td>\n <input type=\"text\" name=\"knvb_api_clubname\" value=\"<?php echo esc_attr(get_option('knvb_api_clubname')); ?>\" />\n </td>\n </tr>\n </table>\n\n <?php submit_button(); ?>\n </form>\n\n <h2>Alle teams</h2>\n <?php\n $cache_folder = plugin_dir_path(__FILE__).'cache/';\n\n // create cache folder\n if (!file_exists($cache_folder)) {\n mkdir($cache_folder, 0777);\n }\n\n // emtpy cache folder\n $files = glob($cache_folder.'*.rtpl.php'); // get all file names\n foreach($files as $file) { // iterate files\n if(is_file($file)) {\n unlink($file); // delete file\n echo '<p>Cache removed: <code>'.$file.'</code></p>';\n }\n }\n\n // create a client and receive data\n $client = new KnvbClient(get_option('knvb_api_key'), get_option('knvb_api_pathname'), get_option('knvb_api_clubname'));\n $knvb_data = trim($client->getData('/teams', NULL, NULL, false));\n\n if(!empty($knvb_data)) {\n $dt = new DateTime('now');\n $dt->setTimezone(new DateTimeZone('Europe/Amsterdam'));\n echo '<p><em>Cache geleegd en data vernieuwd op '.$dt->format('d-m-Y \\o\\m H:i:s').'</em></p>';\n echo $knvb_data;\n }\n else {\n echo '<p>Zodra de bovenstaande settings correct zijn ingevoerd, verschijnt hier een overzicht van alle teams.</p>';\n }\n ?>\n</div>\n\n<?php\n}", "public function ajax_update() {\n\t\t$json = ! empty( $_REQUEST['json'] ); // New-style request\n\n\t\tif ( $_POST['setting_key'] !== $this->setting_key )\n\t\t\twp_die( -1 );\n\n\t\t$attachment_id = intval( $_POST['setting_media_id'] );\n\n\t\tif ( $json ) {\n\t\t\tcheck_ajax_referer( \"update-setting_{$this->setting_key}\" );\n\t\t} else {\n\t\t\tcheck_ajax_referer( \"wp-setting-media-set_{$this->setting_key}\" );\n\t\t}\n\n\t\t// Delete setting media\n\t\tif ( $attachment_id == '-1' ) {\n\t\t\tif ( delete_option( $this->setting_key ) ) {\n\t\t\t\t$return = $this->ajax_get_return_data( false );\n\t\t\t\t$json ? wp_send_json_success( $return ) : wp_die( $return );\n\t\t\t} else {\n\t\t\t\twp_die( 0 );\n\t\t\t}\n\t\t}\n\n\t\t// Update setting media\n\t\tif ( update_option( $this->setting_key, $attachment_id ) ) {\n\n\t\t\t// Maybe resize the image\n\t\t\tif ( $this->media_has_image() ) {\n\t\t\t\t$this->maybe_resize_image( $attachment_id );\n\t\t\t}\n\n\t\t\t$return = $this->ajax_get_return_data();\n\t\t\t$json ? wp_send_json_success( $return ) : wp_die( $return );\n\t\t}\n\n\t\twp_die( 0 );\n\t}", "function rest_handle_options_request($response, $handler, $request)\n{\n}", "static function adminSettings() {\r\n if (isset($_POST['rbinternal_submit'])) {\r\n foreach (self::$options AS $option) {\r\n $default = isset(self::$defaults[$option]) ? self::$defaults[$option] : '';\r\n $value = isset($_POST[$option]) ? $_POST[$option] : $default;\r\n self::saveOption($option, $value);\r\n }\r\n\r\n $updateSuccess = true;\r\n }\r\n\r\n if (isset($_POST['rbinternal_update_code'])) {\r\n try {\r\n self::updateOldCode();\r\n $codeUpdateSuccess = self::$convert_count;\r\n } catch (Exception $e) {\r\n die($e);\r\n }\r\n }\r\n\r\n $options = self::loadOptions();\r\n include_once(dirname(__FILE__) . '/templates/admin-settings.php');\r\n }", "public function process_ch2pho_options() {\n\t\tif ( !current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( 'Not allowed' );\n\t\t}\n\t\t\n\t\t// Check that nonce field created in configuration form is present\n\t\tcheck_admin_referer( 'wp_swift_google_analytics_nonce' );\n\t\t// Retrieve original plugin options array\n\t\t$options = get_option( 'wp_swift_google_analytics' );\n\t\t// Cycle through all text form fields and store their values in the options array\n\t\tforeach ( array( 'ga_account_name' ) as $option_name ) {\n if ( isset( $_POST[$option_name] ) ) {\n $options[$option_name] = sanitize_text_field( $_POST[$option_name] );\n\t\t\t} \n\t\t}\n\t // Cycle through all check box form fields and set the options\n\t // array to true or false values based on presence of\n\t // variables\n\t foreach ( array( 'track_outgoing_links' ) as $option_name ) {\n\t if ( isset( $_POST[$option_name] ) ) {\n\t\t $options[$option_name] = true;\n\t\t } else {\n\t\t $options[$option_name] = false;\n\t\t }\n\t\t}\n\t\t// Store updated options array to database\t\n\t\tupdate_option( 'wp_swift_google_analytics', $options );\n\t\t// Redirect the page to the configuration form that was processed\n\t\tif ( empty ( $GLOBALS['admin_page_hooks']['wp-swift-brightlight-main-menu'] ) ) {\n\t\t\twp_redirect( add_query_arg( array( 'page' => 'wp-swift-google-analytics-settings-menu', 'message' => '1' ), admin_url( 'admin.php' ) ) );\n\t\t\texit; \n\t\t}\n\t\telse {\n\t\t\twp_redirect( add_query_arg( array( 'page' => 'wp-swift-google-analytics-settings-menu', 'message' => '1' ), admin_url( 'options-general.php' ) ) );\n\t\t\texit; \n\t\t}\n\t}", "function wpbs_action_ajax_migrate_general_settings()\n{\n\n if (empty($_POST['token']) || !wp_verify_nonce($_POST['token'], 'wpbs_upgrader')) {\n echo json_encode(array('success' => 0));\n wp_die();\n }\n\n $do_upgrade = wpbs_process_upgrade_from();\n\n if (false == $do_upgrade) {\n echo json_encode(array('success' => 0));\n wp_die();\n }\n\n /**\n * Get old settings\n *\n */\n $old_settings = get_option('wpbs-options', array());\n\n if (!empty($old_settings)) {\n $old_settings = stripslashes_deep(json_decode($old_settings, true));\n }\n\n /**\n * Get old language settings\n *\n */\n $old_languages = get_option('wpbs-languages', array());\n\n if (!empty($old_languages)) {\n $old_languages = stripslashes_deep(json_decode($old_languages, true));\n }\n\n /**\n * Set new settings\n *\n */\n $new_settings = array();\n\n // History color\n if (!empty($old_settings['historyColor'])) {\n $new_settings['booking_history_color'] = $old_settings['historyColor'];\n }\n\n // Start day\n if (!empty($old_settings['backendStartDay'])) {\n $new_settings['backend_start_day'] = $old_settings['backendStartDay'];\n }\n\n // User roles\n if (!empty($old_settings['role_slug'])) {\n\n $editable_roles = array_reverse(array_keys(get_editable_roles()));\n\n if (in_array($old_settings['role_slug'], $editable_roles)) {\n\n foreach ($editable_roles as $key => $role) {\n\n if ($role == $old_settings['role_slug']) {\n break;\n }\n\n unset($editable_roles[$key]);\n\n }\n\n }\n\n $new_settings['user_role_permissions'] = array_reverse($editable_roles);\n\n }\n\n // Languages\n if (!empty($old_languages)) {\n $new_settings['active_languages'] = array_keys($old_languages);\n }\n\n // Selection Color\n if (!empty($old_settings['selectedColor']) && $old_settings['selectedColor'] != '#3399cc') {\n $new_settings['booking_selection_hover_color'] = $old_settings['selectedColor'];\n }\n\n // Captcha\n if (!empty($old_settings['recaptcha_public'])) {\n $new_settings['recaptcha_v2_site_key'] = $old_settings['recaptcha_public'];\n }\n\n if (!empty($old_settings['recaptcha_secret'])) {\n $new_settings['recaptcha_v2_secret_key'] = $old_settings['recaptcha_secret'];\n }\n\n $new_settings['ical_refresh_times'] = 'hourly';\n\n // Add the settings\n update_option('wpbs_settings', $new_settings);\n\n echo json_encode(array('success' => 1));\n wp_die();\n\n}", "function set_olsr_conf($postData)\n{\n global $base_plugin;\n\n exec(\"sudo cp \".$base_plugin.\"/data/olsrd.conf /etc/olsrd.conf\", $ret );\n\n if(!isset($postData['isMeshGw']))\n {\n exec(\"sudo route del defaut\", $ret );\n }\n}", "function child_themer_settings_save() {\r\n\t\r\n\tcheck_ajax_referer( 'child-themer-settings', 'security' );\r\n\t\r\n\t$update = $_POST['themer'];\r\n\tupdate_option( 'child_themer_settings', $update );\r\n\t\r\n\techo 'Settings Updated';\r\n\texit();\r\n\t\r\n}", "function theme_options_admin() {\n$option_fields = array();\nif ( $_GET['updated'] ) echo '<div id=\"message\" class=\"updated fade\"><p>Fontaine Options Saved.</p></div>';\necho '<link rel=\"stylesheet\" href=\"'.get_bloginfo('template_url').'/options/functions.css\" />';\n?>\n\n<div class=\"wrap\">\n\n <h2>Fontaine Options</h2>\n\n <div id=\"message\"></div>\n\n <div class=\"metabox-holder\">\n\n <form method=\"post\" action=\"options.php\">\n <?php wp_nonce_field('update-options'); ?>\n\n <div id=\"theme-options\">\n\n\n <?php\n include(\"options/featured-project.php\");\n ?>\n\n </div><!--theme-options-->\n\n <input type=\"hidden\" name=\"action\" value=\"update\" />\n <input type=\"hidden\" name=\"page_options\" value=\"<?php echo implode(\",\", $option_fields); ?>\" />\n\n </form>\n </div><!--end metabox-holder-->\n</div><!--end wrap-->\n\n<?php\n}", "function adext_contact_form_page_options() {\n \n wp_enqueue_style( 'adverts-admin' );\n $flash = Adverts_Flash::instance();\n $error = array();\n \n $options = get_option ( \"adext_contact_form_config\", array() );\n if( $options === null || empty( $options ) ) {\n $options = adverts_config( \"contact_form.ALL\" );\n }\n\n $scheme = Adverts::instance()->get(\"form_contact_form_config\");\n $form = new Adverts_Form( $scheme );\n \n $button_text = __(\"Update Options\", \"adverts\");\n \n if(isset($_POST) && !empty($_POST)) {\n $form->bind( stripslashes_deep( $_POST ) );\n $valid = $form->validate();\n\n if($valid) {\n\n update_option(\"adext_contact_form_config\", $form->get_values());\n $flash->add_info( __(\"Settings updated.\", \"adverts\") );\n } else {\n $flash->add_error( __(\"There are errors in your form.\", \"adverts\") );\n }\n } else {\n $form->bind( $options );\n }\n \n include ADVERTS_PATH . 'addons/contact-form/admin/options.php';\n}", "function cah_ajax_query_menu_adv_html() {\n\n // If you don't have the capabilities to be here, GTFO\n if ( !current_user_can( 'manage_options' ) )\n return;\n\n // Add the updated message, if the values have just been updated.\n if ( isset( $_GET['settings-updated'] ) ) {\n\n add_settings_error( 'cah_ajax_messages', 'cah_ajax_message_update', 'Settings Saved.', 'updated' );\n }\n\n settings_errors( 'cah_ajax_messages' );\n\n // Build the basic container, and provide a warning to the user that changing these values\n // can screw stuff up on the front end--because it totally can. I normally wouldn't include\n // something like this, but I want the end-user to be able to customize the display and\n // appearance of the query results, so I'm putting this in there.\n\n // If all else fails, I included a Reset button, so they can put everything back where it\n // was if they break something.\n ?>\n\n <div class=\"wrap\">\n <div class=\"notice notice-warning\"><p>Changing settings here will affect the operation of the Plugin, and can cause things to break if not set correctly. Please make sure you know what you're changing before you change it.</p></div>\n\n <form id=\"advanced-options-form\" action=\"options.php\" method=\"POST\">\n\n <!-- <input type=\"hidden\" name=\"action\" value=\"cah_ajax_query_advanced_update\"> -->\n\n <?php\n\n // Call the Settings API to build the form fields.\n\n settings_fields( 'cah_ajax_query_menu_adv' );\n\n do_settings_sections( 'cah_ajax_query_menu_adv' );\n\n submit_button( 'Save Settings' );\n ?>\n <input id=\"reset-defaults\" class=\"button button-primary\" type=\"button\" value=\"Reset to Defaults\">\n </form>\n </div>\n <?php\n}", "function cablecast_options_page_html()\n{\n // check user capabilities\n if (!current_user_can('manage_options')) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if (isset($_GET['settings-updated'])) {\n // add settings saved message with the class of \"updated\"\n add_settings_error('cablecast_messages', 'cablecast_message', __('Settings Saved', 'cablecast'), 'updated');\n }\n\n settings_errors('cablecast_messages');\n\n if (defined('DISABLE_WP_CRON') == false || DISABLE_WP_CRON == false) {\n ?>\n <div class=\"notice notice-warning\">\n <p>WordPress's built in cron is still enabled. This causes the cablecast plugin to attempt to sync during regular web requests which can lead to failures and poor user expericnes. It is recomended to disable the built in cron and instead run cron using the system task scheduler. See <a href=\"https://developer.wordpress.org/plugins/cron/hooking-into-the-system-task-scheduler/\">https://developer.wordpress.org/plugins/cron/hooking-into-the-system-task-scheduler/</a> for more info.</p>\n </div>\n <?php\n }\n\n ?>\n <?php\n $total = get_option('cablecast_sync_total_result_count');\n $sync_index = get_option('cablecast_sync_index');\n if ($total == FALSE) {\n $total = 0;\n }\n if ($sync_index == FALSE) {\n $sync_index = 0;\n }\n $remaining = $total - $sync_index;\n ?>\n\n <div class=\"wrap\">\n <h1><?= esc_html(get_admin_page_title()); ?></h1>\n <div class=\"notice notice-info\">\n <p>There are <?= $remaining ?> remaining shows out of <?= $total ?> shows updated after <?= esc_html(get_option('cablecast_sync_since')); ?></p>\n </div>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"cablecast\"\n settings_fields('cablecast');\n // output setting sections and their fields\n // (sections are registered for \"cablecast\", each field is registered to a specific section)\n do_settings_sections('cablecast');\n // output save settings button\n submit_button('Save Settings');\n ?>\n </form>\n </div>\n <?php\n}", "private function update_options( $options ) {\n\t\tupdate_option( $this->plugin_slug, $options );\n\n\t}", "function crepUpdateOptions() {\r\n\tif(isset($_POST['submitted'])) {\r\n\t\tif($_POST['submitted'] == 'crep_update_options') {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/** Insert into the database */\r\n\t\t\tupdate_option('crep_title', $_POST['crep_title']);\r\n\t\t\tupdate_option('crep_text', $_POST['crep_text']);\r\n\t\t\tupdate_option('crep_code', $_POST['crep_code']);\r\n\t\t\tupdate_option('crep_home_page', $_POST['crep_home_page']);\r\n\t\t\tupdate_option('crep_pages', $_POST['crep_pages']);\r\n\t\t\tupdate_option('crep_posts', $_POST['crep_posts']);\r\n\t\t\tupdate_option('crep_cookie_frequency', $_POST['crep_cookie_frequency']);\r\n\t\t\tupdate_option('crep_style', $_POST['crep_style']);\r\n\t\t\tupdate_option('crep_open_animation', $_POST['crep_open_animation']);\r\n\t\t\tupdate_option('crep_close_animation', $_POST['crep_close_animation']);\r\n\t\t\tupdate_option('crep_modal', $_POST['crep_modal']);\r\n\t\t\tupdate_option('crep_width', $_POST['crep_width']);\r\n\t\t\tupdate_option('crep_height', $_POST['crep_height']);\r\n\t\t}\r\n\t}\r\n}", "function upgrades_theme_page() {\n\tif ( $_REQUEST['saved'] ) echo '<div id=\"message\" class=\"updated fade\"><p><strong>'.__('Options saved.').'</strong></p></div>';\n?>\n<div class='wrap'>\n\t<h2><?php _e('Customize settings for your node'); ?></h2>\n\t\n\t<div id=\"nonJsForm\">\n\t\t\t<form method=\"post\" action=\"\">\t\t\t\t\n\t\t\t\t<?php wp_nonce_field('node_settings'); ?>\n\t\t\t\t\n\t\t\t\t<h3>General details</h3>\n \n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"upgrades_node_name\"><?php _e('Upgrade node codename:');?></label></th>\n\t\t\t\t\t<td><input name=\"upgrades_node_name\" type=\"text\" id=\"upgrades_node_name\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(upgrades_node_name()); ?>\" size=\"64\" />\n\t\t\t\t\t<br /><span>This is used for identifying the different feeds (ie. for the Global Network Feed Widget). \n\t\t\t\t\tFor example: &#214;stersund-Stockholm could be simply 'stockholm' for these purposes </span>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"upgrades_use_gmap\"><?php _e('Use Google Map:');?></label></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\n\t\t\t\t\t<input type=\"checkbox\" name=\"upgrades_use_gmap\" id=\"upgrades_use_gmap\" value=\"1\"\n\t\t\t\t\t<?php print (get_option('upgrades_use_gmap')) ? \"checked=\\\"checked\\\"\" : null; ?> />\n\t\t\t\t\t<br /><span>If checked, the Upgrade! theme will use a Google Map in the header. \n\t\t\t\t\tIf unchecked, the theme will use an image (if available) from the most recent post.</span>\n\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t<h3>Node Ribbon Colors</h3>\n \n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"node_color_light\"><?php _e('Node color light:');?></label></th>\n\t\t\t\t\t<td>#<input name=\"node_color_light\" type=\"text\" id=\"node_color_light\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(node_color_light()); ?>\" size=\"6\" />\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"node_color_dark\"><?php _e('Node color dark:');?></label></th>\n\t\t\t\t\t<td>#<input name=\"node_color_dark\" type=\"text\" id=\"node_color_dark\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(node_color_dark()); ?>\" size=\"6\" />\n\t\t\t\t\t\t<br />No need to specify the gray color which will be added to each ribbon.\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"node_color_text\"><?php _e('Node color link:');?></label></th>\n\t\t\t\t\t<td>#<input name=\"node_color_text\" type=\"text\" id=\"node_color_text\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(node_color_text()); ?>\" size=\"6\" />\n\t\t\t\t\t\t<br />This will be used for text links and should be contrasted enough from your other two tones (a 30% darker tone based on your dark ribbon colors usually works).\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n \n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<h3>Default Location</h3>\n \n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"upgrades_node_address\"><?php _e('Address:');?></label></th>\n\t\t\t\t\t<td><input name=\"upgrades_node_address\" type=\"text\" id=\"upgrades_node_address\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(upgrades_node_address()); ?>\" size=\"64\" />\n\t\t\t\t\t\t<p>Enter your address and your latitude and longitude will be calculated automatically.</p>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"Geo_location\"><?php _e('Geo location:');?></label></th>\n\t\t\t\t\t<td>Latitude:<input name=\"upgrades_node_lat\" type=\"text\" id=\"upgrades_node_lat\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(upgrades_node_lat()); ?>\" size=\"32\" />\n\t\t\t\t\t\n\t\t\t\t\tLongitude:<input name=\"upgrades_node_lon\" type=\"text\" id=\"upgrades_node_lon\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(upgrades_node_lon()); ?>\" size=\"32\" />\n \n\t\t\t\t\tZoom:<input name=\"upgrades_node_zoom\" type=\"text\" id=\"upgrades_node_zoom\" \n\t\t\t\t\t\tvalue=\"<?php echo esc_attr(upgrades_node_zoom()); ?>\" size=\"32\" />\n \n\t\t\t\t\t<br />\n\t\t\t\t\t Use Google Maps to find the lat/lon of your location. \n\t\t\t\t\t <a href=\"http://www.getlatlon.com/\" target=\"_blank\">More tips here</a>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n \n\t\t\t\t</table>\n \n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t\t<input type=\"hidden\" name=\"njform\" value=\"true\" />\n \n\t\t\t\t<br />\n\t\t\t\t<p class=\"submit\"><input type=\"submit\" name=\"Submit\" value=\"<?php _e('Save Settings'); ?>\" /></p>\n\t\t\t\t\n\t\t\t</form>\n\t\t</div>\n</div>\n<?php }", "function most_theme_options_ajax_action() {\n $return = 'Changes Saved';\n //update options\n foreach( $_POST['options'] as $key => $value ) {\n $changed = update_option( $key, $value );\n if( $changed ) {\n $return = 'reload';\n }\n }\n echo $return; \n die();\n}", "function process_update_requests_if_sharedaddy_not_loaded() {\n\t\tif ( isset( $_GET['page'] ) && ( $_GET['page'] == 'sharing.php' || $_GET['page'] == 'sharing' ) ) {\n\t\t\tif ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'sharing-options' ) ) {\n\t\t\t\t/** This action is documented in modules/sharedaddy/sharing.php */\n\t\t\t\tdo_action( 'sharing_admin_update' );\n\t\t\t\twp_safe_redirect( admin_url( 'options-general.php?page=sharing&update=saved' ) );\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t}", "private function upgrade ( ) {\r\n\r\n\t\t\t\tif ( $this->general_opts['version'] && version_compare ( $this->general_opts['version'], self::VERS, \"<\" ) ) {\r\n\r\n\t\t\t\t\t if ( is_array( $this->general_opts ) && is_array( $this->get_default_opts ( 'general' ) ) ) {\r\n\t\t\t\t\t\t\t // set new added general opts to their defaults and keep old settings\r\n\t\t\t\t\t\t\t $updated_general_opts = $this->general_opts + $this->get_default_opts ( 'general' );\r\n\t\t\t\t\t\t\t // set new Version number\r\n\t\t\t\t\t\t\t $updated_general_opts['version'] = self::VERS;\r\n\t\t\t\t\t\t\t update_option( 'CMM_general_opts', $updated_general_opts );\r\n\t\t\t\t\t }\r\n/*\r\necho '<pre>';\r\necho '<h1>$this->general_opts</h1>';\r\nvar_dump( $this->general_opts );\r\necho '</pre>';\r\n\r\necho '<pre>';\r\necho '<h1>$this->get_default_opts ( general )</h1>';\r\nvar_dump( $this->get_default_opts ( 'general' ) );\r\necho '</pre>';\r\n\r\necho '<pre>';\r\necho '<h1>$updated_general_opts</h1>';\r\nvar_dump( $updated_general_opts );\r\necho '</pre>';\r\n */\r\n\t\t\t\t\t if ( is_array( $this->static_opts ) && is_array( $this->get_default_opts ( 'static' ) ) ) {\r\n\t\t\t\t\t\t\t // set new added static opts to their defaults and keep old settings\r\n\t\t\t\t\t\t\t $updated_static_opts = $this->static_opts + $this->get_default_opts ( 'static' );\r\n\t\t\t\t\t\t\t update_option( 'CMM_static_opts', $updated_static_opts );\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t\t if ( is_array( $this->active_opts ) && is_array( $this->get_default_opts ( 'active' ) ) ) {\r\n\t\t\t\t\t\t\t // set new added active opts to their defaults and keep old settings\r\n\t\t\t\t\t\t\t $updated_active_opts = $this->active_opts + $this->get_default_opts ( 'active' );\r\n\t\t\t\t\t\t\t update_option( 'CMM_active_opts', $updated_active_opts );\r\n\t\t\t\t\t }\r\n\t\t\t\t}\r\n }", "public function a2020_save_settings(){\n\t\t\n\t\tif (defined('DOING_AJAX') && DOING_AJAX && check_ajax_referer('admin2020-settings-security-nonce', 'security') > 0) {\n\t\t\t\n\t\t\t$options = $this->utils->clean_ajax_input($_POST['options']);\n\t\t\t$network = $this->utils->clean_ajax_input($_POST['network']);\n\t\t\t\n\t\t\tif($network === 'true'){\n\t\t\t\t$a2020_options = get_option( 'admin2020_settings_network');\n\t\t\t} else {\n\t\t\t\t$a2020_options = get_option( 'admin2020_settings');\n\t\t\t}\n\t\t\t\n\t\t\tif($options == \"\" || !is_array($options)){\n\t\t\t\t$message = __(\"No options supplied to save\",'admin2020');\n\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\tforeach($options as $option){\n\t\t\t\tif(!is_array($option)){\n\t\t\t\t\t$option = $this->utils->clean_ajax_input($option);\n\t\t\t\t}\n\t\t\t\t$module_name = $option[0];\n\t\t\t\t$option_name = $option[1];\n\t\t\t\t$value = $option[2];\n\t\t\t\t$a2020_options['modules'][$module_name][$option_name] = $value;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($a2020_options)){\n\t\t\t\tif($network === 'true'){\n\t\t\t\t\tupdate_option( 'admin2020_settings_network', $a2020_options);\n\t\t\t\t} else {\n\t\t\t\t\tupdate_option( 'admin2020_settings', $a2020_options);\n\t\t\t\t}\n\t\t\t\t$returndata = array();\n\t\t\t\t$returndata['success'] = true;\n\t\t\t\t$returndata['message'] = __('Settings saved. You may need to refresh for changes to take effect.','admin2020');\n\t\t\t\techo json_encode($returndata);\n\t\t\t} else {\n\t\t\t\t$message = __(\"Something went wrong\",'admin2020');\n\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tdie();\n\t\t\t\n\t\t\t\n\t\t}\n\t\tdie();\t\n\t\t\n\t}", "function cah_ajax_edit_query() {\n $options = get_option( 'CAQ_options' );\n\n // Because this information is being sent via AJAX request, the $_POST['values'] field contains\n // the array object that would normally be in the $_REQUEST. We parse it from JSON, and have to\n // strip the slashes first because the double-quotes come through escaped. We also set the second\n // parameter to true so that it will return an array, rather than an object.\n $values = json_decode( stripslashes( $_POST['values'] ), true );\n\n // The index of the option to update, cast to an integer in case it matters down the road.\n $edit_index = (int) $values['index'];\n\n // Empty array to hold the new values.\n $edit_option = array();\n\n // Build the edited array.\n $edit_option['query_name'] = $values['query_name'];\n $edit_option['page_slug'] = $values['page_slug'];\n $edit_option['display_as'] = $values['display_as'];\n $edit_option['post_type'] = $values['post_type'];\n $edit_option['persistent_category'] = $values['persistent_category'];\n $edit_option['paginated'] = $values['paginated'];\n $edit_option['posts_per_page'] = $values['posts_per_page'];\n $edit_option['categories'] = $values['categories'];\n\n // Overwrite the option at the specified index.\n $options[$edit_index] = $edit_option;\n\n // Encode and echo the response.\n $resp = json_encode( $options );\n\n echo $resp;\n\n // Add the \"index\" and \"do_what\" fields to $edit_index, so the validation function knows\n // what to do with it.\n $edit_option['index'] = $edit_index;\n $edit_option['do_what'] = 'edit';\n\n // Call update_option, which triggers our custom validation function.\n update_option( 'CAQ_options', $edit_option );\n\n // Kill the server process, because nobody likes WSoDs.\n wp_die();\n}", "public function save_options_other_options(){\n\t\t$json_form = isset($_REQUEST['json_form']) ? $_REQUEST['json_form'] : '';\n\t\t$message = '';\n\t\t$page_id = '';\t\t\n\t\tif($json_form != ''){\n\t\t\t$this->layouts_manager_options['other-options'] = json_decode(stripslashes($json_form), true);\n\t\t\tupdate_option($this->option_key, $this->layouts_manager_options);\n\n\t\t\t$link = home_url().'/wp-admin/themes.php?page=layout-manager&navigation=edit-options&option=other-options';\n\n\t\t\t$return = array(\n\t\t\t\t'message' => $message,\n\t\t\t\t'page_id' => $page_id,\n\t\t\t\t'reload_url' => $link,\n\t\t\t);\n\n\t\t\techo json_encode($return);\n\t\t} die();\n\t}", "function tdf_options_page_html()\n{\n // check user capabilities\n if (! current_user_can('manage_options')) {\n return;\n }\n\n// add error/update messages\n\n// check if the user have submitted the settings\n// wordpress will add the \"settings-updated\" $_GET parameter to the url\n if (isset($_GET['settings-updated'])) {\n // add settings saved message with the class of \"updated\"\n add_settings_error('tdf_messages', 'tdf_message', __('Settings Saved', 'tdf'), 'updated');\n }\n\n// show error/update messages\n settings_errors('tdf_messages');\n?>\n\n<div class=\"wrap\">\n <h1><?php echo esc_html(get_admin_page_title()); ?></h1>\n <!-- <h1>\"TEST HEADING\"</h1> -->\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"tdf\"\n settings_fields('tdf');\n // output setting sections and their fields\n // (sections are registered for \"tdf\", each field is registered to a specific section)\n do_settings_sections('tdf');\n // output save settings button\n submit_button('Save Settings');\n ?>\n </form>\n</div>\n<?php\n}", "function update_network_option_new_admin_email($old_value, $value)\n{\n}", "function _update()\n {\n if ($this->_dnsVerboseLog) {\n log_error(\"Dynamic DNS ({$this->_dnsHost} via {$this->_dnsServiceList[$this->_dnsService]}): _update() starting.\");\n }\n\n if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53' and $this->_dnsService != 'route53-v6') {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_USERAGENT, $this->_UserAgent);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_INTERFACE, $this->_dnsRequestIfIP);\n curl_setopt($ch, CURLOPT_TIMEOUT, 15);\n }\n\n switch ($this->_dnsService) {\n case 'dyndns':\n case 'dyndns-static':\n case 'dyndns-custom':\n if (isset($this->_dnsWildcard) && $this->_dnsWildcard != \"OFF\") {\n $this->_dnsWildcard = \"ON\";\n }\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = \"https://members.dyndns.org/nic/update\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?system=dyndns&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO');\n break;\n case 'dhs':\n $post_data['hostscmd'] = 'edit';\n $post_data['hostscmdstage'] = '2';\n $post_data['type'] = '4';\n $post_data['updatetype'] = 'Online';\n $post_data['mx'] = $this->_dnsMX;\n $post_data['mx2'] = '';\n $post_data['txt'] = '';\n $post_data['offline_url'] = '';\n $post_data['cloak'] = 'Y';\n $post_data['cloak_title'] = '';\n $post_data['ip'] = $this->_dnsIP;\n $post_data['domain'] = 'dyn.dhs.org';\n $post_data['hostname'] = $this->_dnsHost;\n $post_data['submit'] = 'Update';\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $server = \"https://members.dhs.org/nic/hosts\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, '{$server}{$port}');\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n break;\n case 'noip':\n case 'noip-free':\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $server = \"https://dynupdate.no-ip.com/ducupdate.php\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n if (\n ($this->_dnsService == \"noip-free\") &&\n ($this->_forceUpdateNeeded == true) &&\n ($this->_dnsDummyUpdateDone == false)\n ) {\n // Update the IP to a dummy value to force No-IP free accounts to see a change.\n $iptoset = \"192.168.1.1\";\n $this->_dnsDummyUpdateDone = true;\n log_error(\"Dynamic DNS ({$this->_dnsHost}): Processing dummy update on No-IP free account. IP temporarily set to \" . $iptoset);\n } else {\n $iptoset = $this->_dnsIP;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?username=' . urlencode($this->_dnsUser) . '&pass=' . urlencode($this->_dnsPass) . '&hostname=' . $this->_dnsHost . '&ip=' . $iptoset);\n break;\n case 'easydns':\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = \"https://members.easydns.com/dyn/dyndns.php\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=' . $this->_dnsBackMX);\n break;\n case 'hn':\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = \"http://dup.hn.org/vanity/update\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?ver=1&IP=' . $this->_dnsIP);\n break;\n case 'zoneedit':\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n\n $server = \"https://dynamic.zoneedit.com/auth/dynamic.html\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, \"{$server}{$port}?host=\" . $this->_dnsHost);\n break;\n case 'dyns':\n /* XXX HTTPS is currently broken for them */\n $server = 'http://www.dyns.cx/postscript011.php';\n $port = '';\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?username=' . urlencode($this->_dnsUser) . '&password=' . $this->_dnsPass . '&host=' . $this->_dnsHost);\n break;\n case 'ods':\n $misc_errno = 0;\n $misc_error = \"\";\n $server = \"ods.org\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n $this->con['socket'] = fsockopen(\"{$server}{$port}\", \"7070\", $misc_errno, $misc_error, 30);\n /* Check that we have connected */\n if (!$this->con['socket']) {\n print \"error! could not connect.\";\n break;\n }\n /* Here is the loop. Read the incoming data (from the socket connection) */\n while (!feof($this->con['socket'])) {\n $this->con['buffer']['all'] = trim(fgets($this->con['socket'], 4096));\n $code = substr($this->con['buffer']['all'], 0, 3);\n sleep(1);\n switch ($code) {\n case 100:\n fputs($this->con['socket'], \"LOGIN \" . $this->_dnsUser . \" \" . $this->_dnsPass . \"\\n\");\n break;\n case 225:\n fputs($this->con['socket'], \"DELRR \" . $this->_dnsHost . \" A\\n\");\n break;\n case 901:\n fputs($this->con['socket'], \"ADDRR \" . $this->_dnsHost . \" A \" . $this->_dnsIP . \"\\n\");\n break;\n case 795:\n fputs($this->con['socket'], \"QUIT\\n\");\n break;\n }\n }\n $this->_checkStatus(0, $code);\n break;\n case 'freedns':\n curl_setopt($ch, CURLOPT_URL, 'https://freedns.afraid.org/dynamic/update.php?' . $this->_dnsPass);\n break;\n case 'dnsexit':\n curl_setopt($ch, CURLOPT_URL, 'https://update.dnsexit.com/RemoteUpdate.sv?login=' . urlencode($this->_dnsUser) . '&password=' . $this->_dnsPass . '&host=' . $this->_dnsHost . '&myip=' . $this->_dnsIP);\n break;\n case 'loopia':\n $this->_dnsWildcard = (isset($this->_dnsWildcard) && $this->_dnsWildcard == true) ? 'ON' : 'OFF';\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_URL, 'https://dns.loopia.se/XDynDNSServer/XDynDNS.php?hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard);\n break;\n case 'staticcling':\n curl_setopt($ch, CURLOPT_URL, 'https://www.staticcling.org/update.html?login=' . urlencode($this->_dnsUser) . '&pass=' . $this->_dnsPass);\n break;\n case 'dnsomatic':\n /* Example syntax\n https://username:password@updates.dnsomatic.com/nic/update?hostname=yourhostname&myip=ipaddress&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG\n */\n if (isset($this->_dnsWildcard) && $this->_dnsWildcard != \"OFF\") {\n $this->_dnsWildcard = \"ON\";\n }\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n /*\n Reference: https://www.dnsomatic.com/wiki/api\n DNS-O-Matic usernames are 3-25 characters.\n DNS-O-Matic passwords are 6-20 characters.\n All ASCII letters and numbers accepted.\n Dots, dashes, and underscores allowed, but not at the beginning or end of the string.\n Required: \"rawurlencode\" http://www.php.net/manual/en/function.rawurlencode.php\n Encodes the given string according to RFC 3986.\n */\n $server = \"https://\" . rawurlencode($this->_dnsUser) . \":\" . rawurlencode($this->_dnsPass) . \"@updates.dnsomatic.com/nic/update?hostname=\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NOCHG');\n break;\n case 'namecheap':\n /* Example:\n https://dynamicdns.park-your-domain.com/update?host=[host_name]&domain=[domain.com]&password=[domain_password]&ip=[your_ip]\n */\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $dparts = explode(\".\", trim($this->_dnsHost));\n $domain_part_count = ($dparts[count($dparts) - 1] == \"uk\") ? 3 : 2;\n $domain_offset = count($dparts) - $domain_part_count;\n $hostname = implode(\".\", array_slice($dparts, 0, $domain_offset));\n $domain = implode(\".\", array_slice($dparts, $domain_offset));\n $dnspass = trim($this->_dnsPass);\n $server = \"https://dynamicdns.park-your-domain.com/update?host={$hostname}&domain={$domain}&password={$dnspass}&ip={$this->_dnsIP}\";\n curl_setopt($ch, CURLOPT_URL, $server);\n break;\n case 'he-net':\n case 'he-net-v6':\n $server = \"https://dyn.dns.he.net/nic/update?\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_URL, $server . 'hostname=' . $this->_dnsHost . '&password=' . $this->_dnsPass . '&myip=' . $this->_dnsIP);\n break;\n case 'he-net-tunnelbroker':\n $server = \"https://ipv4.tunnelbroker.net/nic/update?\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_URL, $server . 'hostname=' . $this->_dnsHost);\n break;\n case 'digitalocean':\n /*\n * dnsHost should be the root domain\n * dnsUser should be the record ID\n * dnsPass should be the API key\n */\n $server = \"https://api.digitalocean.com/v2/domains/\" . $this->_dnsHost . \"/records/\" . $this->_dnsUser;\n $hostData = array(\"data\" => \"{$this->_dnsIP}\");\n\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n \"Authorization: Bearer {$this->_dnsPass}\",\n 'Content-Type: application/json'\n ));\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($hostData));\n curl_setopt($ch, CURLOPT_URL, $server);\n break;\n case 'selfhost':\n if (isset($this->_dnsWildcard) && $this->_dnsWildcard != \"OFF\") {\n $this->_dnsWildcard = \"ON\";\n }\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = \"https://carol.selfhost.de/nic/update\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?system=dyndns&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO');\n break;\n case 'route53':\n case 'route53-v6':\n /* Setting Variables */\n $hostname = \"{$this->_dnsHost}.\";\n $ZoneID = $this->_dnsZoneID;\n $AccessKeyId = $this->_dnsUser;\n $SecretAccessKey = $this->_dnsPass;\n $NewIP = $this->_dnsIP;\n $NewTTL = $this->_dnsTTL;\n $RecordType = ($this->_useIPv6) ? \"AAAA\" : \"A\";\n\n /* Set Amazon AWS Credentials for this record */\n $r53 = new Route53($AccessKeyId, $SecretAccessKey);\n\n /* Function to find old values of records in Route 53 */\n if (!function_exists('Searchrecords')) {\n function SearchRecords($records, $name)\n {\n if (!is_array($records)) {\n return false;\n }\n $result = array();\n foreach ($records as $record) {\n if (strtolower($record['Name']) == strtolower($name)) {\n $result [] = $record;\n }\n }\n return ($result) ? $result : false;\n }\n }\n\n $records = $r53->listResourceRecordSets(\"/hostedzone/$ZoneID\");\n\n /* Get IP for your hostname in Route 53 */\n if (false !== ($a_result = SearchRecords($records['ResourceRecordSets'], \"$hostname\"))) {\n /**\n * if hostname for ipv4 and ipv6 is the same, a_result contains more than 1 item\n * we need to get the item that corresponds to the record type\n */\n $oldTTLResult = null;\n $oldIPResult = null;\n foreach ($a_result as $resultItem) {\n if ($RecordType === $resultItem['Type']) {\n $oldTTLResult = $resultItem[\"TTL\"];\n $oldIPResult = $resultItem[\"ResourceRecords\"][0];\n }\n }\n\n $OldTTL = $oldTTLResult;\n $OldIP = $oldIPResult;\n } else {\n $OldIP = \"\";\n }\n\n /* Check if we need to update DNS Record */\n if ($OldIP !== $NewIP) {\n if (!empty($OldIP)) {\n /* Your Hostname already exists, deleting and creating it again */\n $changes = array();\n $changes[] = $r53->prepareChange(\"DELETE\", $hostname, $RecordType, $OldTTL, $OldIP);\n $changes[] = $r53->prepareChange(\"CREATE\", $hostname, $RecordType, $NewTTL, $NewIP);\n $result = $r53->changeResourceRecordSets(\"/hostedzone/$ZoneID\", $changes);\n } else {\n /* Your Hostname does not exist yet, creating it */\n $changes = $r53->prepareChange(\"CREATE\", $hostname, $RecordType, $NewTTL, $NewIP);\n $result = $r53->changeResourceRecordSets(\"/hostedzone/$ZoneID\", $changes);\n }\n }\n $this->_checkStatus(0, $result);\n break;\n case 'custom':\n case 'custom-v6':\n if ($this->_curlIpresolveV4) {\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n }\n if ($this->_curlSslVerifypeer) {\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n } else {\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n if ($this->_dnsUser != '') {\n curl_setopt($ch, CURLOPT_USERPWD, \"{$this->_dnsUser}:{$this->_dnsPass}\");\n }\n $server = str_replace(\"%IP%\", $this->_dnsIP, $this->_dnsUpdateURL);\n curl_setopt($ch, CURLOPT_URL, $server);\n break;\n case 'cloudflare':\n case 'cloudflare-v6':\n case 'cloudflare-token':\n case 'cloudflare-token-v6':\n $baseUrl = 'https://api.cloudflare.com/client/v4';\n $fqdn = str_replace(' ', '', $this->_dnsHost);\n $recordType = ($this->_useIPv6) ? 'AAAA' : 'A';\n $ttlData = intval($this->_dnsTTL) < 1 ? 1 : intval($this->_dnsTTL);\n $hostData = array(\n \"content\" => \"{$this->_dnsIP}\",\n \"type\" => $recordType,\n \"name\" => $fqdn,\n \"ttl\" => $ttlData\n );\n\n // Determine if service is token based or user/password based and define appropriate header\n if (strpos($this->_dnsService, 'token') !== false) {\n $headerAuth = array(\n \"Authorization: Bearer {$this->_dnsPass}\",\n 'Content-Type: application/json'\n );\n } else {\n $headerAuth = array(\n \"X-Auth-Email: {$this->_dnsUser}\",\n \"X-Auth-Key: {$this->_dnsPass}\",\n 'Content-Type: application/json'\n );\n }\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headerAuth);\n\n // Get all zone info\n $zonesUrl = \"$baseUrl/zones\";\n curl_setopt($ch, CURLOPT_URL, $zonesUrl);\n $output = json_decode(curl_exec($ch));\n $zoneId = null; // Set default value\n\n // Iterate zone objects, check if $fqdn is equal to or ends with zone name\n foreach ($output->result as $key => $zoneObj) {\n if (preg_match(\"/^{$zoneObj->name}$|\\.{$zoneObj->name}$/\", $fqdn)) {\n // Found matching zone\n $zoneId = $zoneObj->id;\n // Get $hostName from $fqdn, set $domainName\n // These are only really used for log messages.\n $hostName = preg_replace(\"/\\.?{$zoneObj->name}$/\", '', $fqdn);\n $domainName = $zoneObj->name;\n break;\n }\n }\n\n if ($zoneId) { // If zone ID was found get host ID\n $dnsRecordsUrl = \"$zonesUrl/$zoneId/dns_records\";\n $getHostId = \"$dnsRecordsUrl?name=$fqdn&type=$recordType\";\n curl_setopt($ch, CURLOPT_URL, $getHostId);\n $output = json_decode(curl_exec($ch));\n $recordCount = !empty($output->result) ? count($output->result) : 0;\n if ($recordCount === 0) {\n // create record\n curl_setopt($ch, CURLOPT_URL, $dnsRecordsUrl);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n } elseif ($recordCount >= 1) {\n // update record\n $recordId = $output->result[0]->id;\n $hostData[\"proxied\"] = $output->result[0]->proxied;\n curl_setopt($ch, CURLOPT_URL, \"$dnsRecordsUrl/$recordId\");\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n }\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($hostData));\n if ($recordCount > 1) {\n log_error(\"Dynamic DNS ($fqdn): Warning: multiple records for $hostName found\");\n }\n }\n break;\n case 'eurodns':\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = \"https://update.eurodyndns.org/update/\";\n $port = \"\";\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP);\n break;\n case 'gratisdns':\n $server = \"https://admin.gratisdns.com/ddns.php\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n list($hostname, $domain) = explode(\".\", $this->_dnsHost, 2);\n curl_setopt($ch, CURLOPT_URL, $server . '?u=' . urlencode($this->_dnsUser) . '&p=' . $this->_dnsPass . '&h=' . $this->_dnsHost . '&d=' . $domain . '&i=' . $this->_dnsIP);\n break;\n case 'ovh-dynhost':\n if (isset($this->_dnsWildcard) && $this->_dnsWildcard != \"OFF\") {\n $this->_dnsWildcard = \"ON\";\n }\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = \"https://www.ovh.com/nic/update\";\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?system=dyndns&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO');\n break;\n case 'citynetwork':\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n $server = 'https://dyndns.citynetwork.se/nic/update';\n $port = \"\";\n if ($this->_dnsServer) {\n $server = $this->_dnsServer;\n }\n if ($this->_dnsPort) {\n $port = \":\" . $this->_dnsPort;\n }\n curl_setopt($ch, CURLOPT_URL, $server . $port . '?hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP);\n break;\n case 'duckdns':\n $server = \"https://www.duckdns.org/update\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_URL, $server . '?domains=' . str_replace('.duckdns.org', '', $this->_dnsHost) . '&token=' . urlencode($this->_dnsUser));\n break;\n case 'dynv6':\n $server = \"https://ipv4.dynv6.com/api/update\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_INTERFACE, $this->_dnsRequestIf);\n curl_setopt($ch, CURLOPT_DNS_LOCAL_IP4, $this->_dnsIP);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n curl_setopt($ch, CURLOPT_URL, $server . '?hostname=' . $this->_dnsHost . '&ipv4=' . $this->_dnsIP . '&token=' . $this->_dnsUser);\n break;\n case 'dynv6-v6':\n $server = \"https://ipv6.dynv6.com/api/update\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_INTERFACE, $this->_dnsRequestIf);\n curl_setopt($ch, CURLOPT_DNS_LOCAL_IP6, $this->_dnsIP);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);\n curl_setopt($ch, CURLOPT_URL, $server . '?hostname=' . $this->_dnsHost . '&ipv6=' . $this->_dnsIP . '&token=' . $this->_dnsUser);\n break;\n case 'googledomains':\n $server = \"https://domains.google.com/nic/update\";\n $post_data['hostname'] = $this->_dnsHost;\n $post_data['myip'] = $this->_dnsIP;\n $post_data['offline'] = 'no';\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n curl_setopt($ch, CURLOPT_URL, $server);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n break;\n case 'strato':\n $server = \"https://dyndns.strato.com/nic/update?hostname={$this->_dnsHost}&myip={$this->_dnsIP}\";\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_URL, $server);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n break;\n case '3322':\n $server = \"http://members.3322.net/dyndns/update?hostname={$this->_dnsHost}&myip={$this->_dnsIP}\";\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_URL, $server);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n break;\n case 'oray':\n $server = \"http://ddns.oray.com/ph/update?hostname={$this->_dnsHost}&myip={$this->_dnsIP}\";\n curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);\n curl_setopt($ch, CURLOPT_URL, $server);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n break;\n case 'regfish':\n case 'regfish-v6':\n $family = $this->_useIPv6 ? 'ipv6' : 'ipv4';\n $server = \"https://dyndns.regfish.de/?fqdn={$this->_dnsHost}&{$family}={$this->_dnsIP}&forcehost=1&token=\" . urlencode($this->_dnsUser);\n curl_setopt($ch, CURLOPT_URL, $server);\n break;\n case 'linode':\n case 'linode-v6':\n $baseUrl = \"https://api.linode.com/v4\";\n $fqdn = trim($this->_dnsHost);\n $recordType = ($this->_useIPv6) ? 'AAAA' : 'A';\n\n if ($this->_dnsWildcard == 'ON') {\n $fqdn = \"*.$fqdn\";\n }\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Accept: application/json',\n 'Authorization: Bearer ' . $this->_dnsPass,\n 'Content-Type: application/json'\n ));\n\n $domainsUrl = \"$baseUrl/domains\";\n curl_setopt($ch, CURLOPT_URL, $domainsUrl);\n $output = json_decode(curl_exec($ch));\n $domainId = null;\n\n // Find matching domain and split the hostname part from it\n foreach ($output->data as $key => $domainObj) {\n if (preg_match(\"/^{$domainObj->domain}$|\\.{$domainObj->domain}$/\", $fqdn)) {\n $domainId = $domainObj->id;\n $hostName = preg_replace(\"/\\.?{$domainObj->domain}$/\", '', $fqdn);\n $domainName = $domainObj->domain;\n break;\n }\n }\n\n if ($domainId) {\n if ($this->_dnsVerboseLog) {\n log_error(\"Dynamic DNS ($fqdn): Found domain name: $domainName, ID: $domainId\");\n }\n\n $dnsRecordsUrl = \"$domainsUrl/$domainId/records\";\n curl_setopt($ch, CURLOPT_URL, $dnsRecordsUrl);\n $output = json_decode(curl_exec($ch));\n $recordId = null;\n\n // Find matching record\n foreach ($output->data as $key => $recordObj) {\n if ($recordObj->type == $recordType && $recordObj->name == $hostName) {\n $recordId = $recordObj->id;\n break;\n }\n }\n\n $hostData = array(\n \"target\" => \"{$this->_dnsIP}\",\n );\n\n if ($recordId) {\n // Update record\n if ($this->_dnsVerboseLog) {\n log_error(\"Dynamic DNS ($fqdn): Updating existing record ID: $recordId\");\n }\n\n curl_setopt($ch, CURLOPT_URL, \"$dnsRecordsUrl/$recordId\");\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n } else {\n // Create record\n if ($this->_dnsVerboseLog) {\n log_error(\"Dynamic DNS ($fqdn): Creating new record\");\n }\n\n $hostData['type'] = $recordType;\n $hostData['name'] = $hostName;\n // Linode will round up to the nearest valid TTL\n $hostData['ttl_sec'] = 0;\n\n curl_setopt($ch, CURLOPT_URL, $dnsRecordsUrl);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n }\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($hostData));\n } else {\n log_error(\"Dynamic DNS($fqdn): No zone found for domain\");\n }\n break;\n case 'azurev6':\n case 'azure':\n $hostname = \"{$this->_dnsHost}\";\n $resourceid = trim($this->_dnsResourceID);\n $app_id = $this->_dnsUser;\n $client_secret = $this->_dnsPass;\n $newip = $this->_dnsIP;\n $newttl = $this->_dnsTTL;\n // ensure resourceid starts with / and has no trailing /\n $resourceid = '/' . trim($resourceid, '/');\n // extract subscription id from resource id\n preg_match('/\\\\/subscriptions\\\\/(?<sid>[^\\\\/]*)/', $resourceid, $result);\n $subscriptionid = isset($result['sid']) ? $result['sid'] : '';\n if (isset($result['sid'])) {\n $subscriptionid = $result['sid'];\n } else {\n log_error(\"Azure subscription id not found in resource id ({$resourceid})\");\n return false;\n }\n // find tenant id from subscription id\n curl_setopt($ch, CURLOPT_URL, \"https://management.azure.com/subscriptions/\" . $subscriptionid . \"?api-version=2016-09-01\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_NOBODY, 1);\n $output = curl_exec($ch);\n $pattern = '/Bearer authorization_uri=\"https:\\\\/\\\\/login.windows.net\\\\/(?<tid>[^\"]*)/i';\n preg_match($pattern, $output, $result);\n if (isset($result['tid'])) {\n $tenantid = $result['tid'];\n } else {\n log_error(\"Tenant ID not found\");\n return false;\n }\n // get an bearer token\n curl_setopt($ch, CURLOPT_URL, \"https://login.microsoftonline.com/\" . $tenantid . \"/oauth2/token\");\n curl_setopt($ch, CURLOPT_POST, 1);\n $body = \"resource=\" . urlencode(\"https://management.core.windows.net/\") . \"&grant_type=client_credentials&client_id=\" . $app_id . \"&client_secret=\" . urlencode($client_secret);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $body);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec($ch);\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n preg_match(\"/\\\"access_token\\\":\\\"(?<tok>[^\\\"]*)\\\"/\", $server_output, $result);\n if (isset($result['tok'])) {\n $bearertoken = $result['tok'];\n } else {\n log_error(\"no valid bearer token\");\n return false;\n }\n // Update the DNS record\n if ($this->_useIPv6) {\n $url = \"https://management.azure.com\" . $resourceid . \"/AAAA/\" . $hostname . \"?api-version=2017-09-01\";\n $body = '{\"properties\":{\"TTL\":\"' . $newttl . '\", \"AAAARecords\":[{\"ipv6Address\":\"' . $newip . '\"}]}}';\n } else {\n $url = \"https://management.azure.com\" . $resourceid . \"/A/\" . $hostname . \"?api-version=2017-09-01\";\n $body = '{\"properties\":{\"TTL\":\"' . $newttl . '\", \"ARecords\":[{\"ipv4Address\":\"' . $newip . '\"}]}}';\n }\n $request_headers = array();\n $request_headers[] = 'Accept: application/json';\n $request_headers[] = 'Authorization: Bearer ' . $bearertoken;\n $request_headers[] = 'Content-Type: application/json';\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, $this->_UserAgent);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $body);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n break;\n case 'godaddy':\n case 'godaddy-v6':\n /* Read https://developer.godaddy.com/ for API documentation */\n $baseApiUrl = 'https://api.godaddy.com/v1/domains/';\n $recordType = $this->_useIPv6 ? \"AAAA\" : \"A\";\n $splitHost = explode('.', trim($this->_dnsHost));\n $dnsDomain = '*';\n if ($this->_dnsWildcard != 'ON') {\n $dnsDomain = array_shift($splitHost);\n }\n $dnsHost = implode('.', $splitHost);\n\n $url = $baseApiUrl . $dnsHost . '/records/' . $recordType . '/' . $dnsDomain;\n\n /* body can contain multiple options (data, port, priority, service, ttl, weight) */\n $data = array();\n $data[] = array('data' => $this->_dnsIP);\n if ($this->_dnsTTL) {\n $data[0]['ttl'] = $this->_dnsTTL;\n } else {\n // minimum allowed by GoDaddy\n $data[0]['ttl'] = 600;\n }\n $jsonBody = json_encode($data);\n if ($this->_dnsVerboseLog) {\n log_error(\"Dynamic DNS: calling $url with body: $jsonBody\");\n }\n\n /* PUT JSON /v1/domains/{domain}/records/{type}/{name} */\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Accept: application/json',\n 'Content-Type: application/json',\n 'Authorization: sso-key ' . $this->_dnsUser . ':' . $this->_dnsPass\n ));\n curl_setopt($ch, CURLOPT_URL, $url);\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonBody);\n break;\n default:\n break;\n }\n if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53' and $this->_dnsService != 'route53-v6') {\n $data = curl_exec($ch);\n $this->_checkStatus($ch, $data);\n @curl_close($ch);\n }\n }", "public function settings_fields( $option_group ) {\n\t\t?>\n\t\t<input type=\"hidden\" name=\"network_option_group\" value=\"<?php echo esc_attr( $option_group ); ?>\" />\n\t\t<input type=\"hidden\" name=\"action\" value=\"<?php echo esc_attr( self::UPDATE_OPTIONS_ACTION ); ?>\" />\n\t\t<?php\n\t\twp_nonce_field( \"$option_group-network-options\" );\n\t}", "public function handleRequest() {\n\t\t\n\t\t$action = $this->getParam('action');\n\t\tif (is_null($action)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tswitch ($action) {\n\t\t\t\tcase 'updateprofile':\n\t\t\t\t\t// Update user's profile\n\t\t\t\t\t$this->updateUser();\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\tcase 'addmetadata':\n\t\t\t\t\t$this->addMetadata();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'update_dvdsettings':\n\t\t\t\t\t$this->updateDefaultDVDSettings();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'update_borrower':\n\t\t\t\t\t$this->updateBorrower();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'update_frontpage':\n\t\t\t\t\t$this->updateFrontpageSettings();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'update_ignorelist':\n\t\t\t\t\t$this->updateIgnorelist();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception $ex) {\n\t\t\tVCDException::display($ex,true);\n\t\t}\n\t}", "function td_plugin_options() {\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t<div class=\"wrap\">\r\n\t\t\t\t<a href=\"http://www.tradedoubler.com/es-es/\"><img src=<?php printf(\"%s/tdplugin-es/bg_grey.jpg\",WP_PLUGIN_URL);?> alt=\"TradeDoubler Image\"/></a>\r\n\t\t\t\t<!--<h2>TradeDoubler Wordpress Plugin 1.0</h2>-->\r\n\t\t\t\t\t<form method=\"post\" action=\"options.php\">\r\n\t\t\t\t\t<?php wp_nonce_field('update-options'); ?>\r\n\t\t\t\t\t\t<table width=\"100%\" class=\"form-table\">\r\n<tr valign=\"top\">\r\n <th colspan=\"2\" scope=\"row\"><h3>Ajustes Principales</h3></th>\r\n </tr>\r\n<tr valign=\"top\">\r\n\t\t\t\t\t\t\t\t<th width=\"40%\" scope=\"row\"><div align=\"left\">Id de afiliado de Tradedoubler</div></th>\r\n\t\t<td width=\"40%\"><input type=\"text\" name=\"td_merchandiser_token\" value=\"<?php echo get_option('td_merchandiser_token'); ?>\" /></td>\r\n\t\t\t\t\t\t </tr>\r\n <tr valign=\"top\">\r\n\t\t\t\t\t\t\t\t<th width=\"40%\" scope=\"row\"><div align=\"left\">Valor del tiempo de cach&eacute; del XML (en segundos, 1 d&iacutea = 86400, 1 semana = 604800) por defecto a una semana</div></th>\r\n\t\t<td width=\"40%\"><input type=\"text\" name=\"td_cache_timeout\" value=\"<?php echo get_option('td_cache_timeout'); ?>\" /></td>\r\n\t\t\t\t\t\t </tr>\r\n\t\t\t\t\t </table>\r\n\t\t\t\t\t <input type=\"hidden\" name=\"action\" value=\"update\" />\r\n\t\t\t\t\t <input type=\"hidden\" name=\"page_options\" value=\"td_merchandiser_token,td_estilo,td_cache_timeout\" />\r\n\t\t\t\t\t\t\t\t<p class=\"submit\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</form>\r\n\t\t\t</div>\r\n\r\n<? }", "public function handle_settings_actions() {\n\n\t\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$current_action = ( empty( $_REQUEST['action'] ) ) ? null : sanitize_text_field( urldecode( $_REQUEST['action'] ) );\n\n\t\tif ( wc_shipwire()->is_plugin_settings() && $current_action ) {\n\n\t\t\tswitch ( $current_action ) {\n\n\t\t\t\tcase 'update_inventory' :\n\t\t\t\t\t$updated_count = WC_Shipwire_Product::update_all_inventory();\n\t\t\t\t\t$message = sprintf( _n( 'Updated inventory for %d product.', 'Updated inventory for %d products.', $updated_count, 'woocommerce-shipwire' ), $updated_count );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'update_tracking' :\n\t\t\t\t\t$updated_count = WC_Shipwire_Order::update_all_tracking();\n\t\t\t\t\t$message = sprintf( _n( 'Updated tracking information for %d order.', 'Updated tracking information for %d orders.', $updated_count, 'woocommerce-shipwire' ), $updated_count );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'clear_history' :\n\t\t\t\t\tdelete_option( 'wc_shipwire_update_log' );\n\t\t\t\t\t$message = __( 'History deleted.', 'woocommerce-shipwire' );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t$message = __( 'Nothing to do.', 'woocommerce-shipwire' );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// success message\n\t\t\t$this->message_handler->add_message( $message );\n\n\t\t\t$redirect_url = remove_query_arg( array( 'action' ), stripslashes( $_SERVER['REQUEST_URI'] ) );\n\t\t\twp_redirect( esc_url_raw( $redirect_url ) );\n\t\t\texit;\n\t\t}\n\t}", "function optionsframework_admin_init() {\n\t\t// Rev up the Options Machine\n\t\tglobal $of_options, $options_machine;\n\t\t$options_machine = new Options_Machine($of_options);\n\t\t\n\t\t\n\t //if reset is pressed->replace options with defaults\n if ( isset($_REQUEST['page']) && $_REQUEST['page'] == 'optionsframework' ) {\n\t\tif (isset($_REQUEST['of_reset']) && 'reset' == $_REQUEST['of_reset']) {\n\t\t\t\n\t\t\t$nonce=$_POST['security'];\n\n\t\t\tif (!wp_verify_nonce($nonce, 'of_ajax_nonce') ) {\n\t\t\t\n\t\t\t\theader('Location: themes.php?page=optionsframework&reset=error');\n\t\t\t\tdie('Security Check'); \n\t\t\t\t\n\t\t\t} else {\t\n\t\t\t\t\n\t\t\t\t$defaults = (array) $options_machine->Defaults;\n\t\t\t\tupdate_option(OPTIONS,$defaults);\n\t\t\t\tgenerate_options_css($defaults); //generate static css file\n\t\t\t\t\n\t\t\t\theader('Location: themes.php?page=optionsframework&reset=true');\n\t\t\t\tdie($options_machine->Defaults);\n\t\t\t} \n\t\t}\n }\n}", "function sc_options_page_html(){\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n // Add Error/Update Messages\n\n // Check if the user have submitted the settings\n // WordPress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'sc_messages', 'sc_message', __( 'Settings Saved', 'sc' ), 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'wporg_messages' );\n ?>\n\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // $option_group from register_setting()\n settings_fields( 'sc_settings' );\n\n // Output setting sections and their fields\n // Sections are registered for \"sc_settings\", each field is registered to a specific section\n // $page from add_settings_section() and add_settings_field()\n do_settings_sections( 'sc_settings_page' );\n\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n </div>\n <?php\n}", "function swedmedia_backtweets_options() {\n\t $hidden_field_name = 'mt_submit_hidden';\n\t $opt_name = 'swedmedia_backtweets_ignoreuser';\n\t $data_field_name = 'swedmedia_backtweets_ignoreuser';\n\t\n\t // Read in existing option value from database\n\t $opt_val = get_option( $opt_name );\n\t\n\t // See if the user has posted us some information\n\t // If they did, this hidden field will be set to 'Y'\n\t if( $_POST[ $hidden_field_name ] == 'Y' ) {\n\t // Read their posted value\n\t $opt_val = $_POST[ $data_field_name ];\n\t\n\t // Save the posted value in the database\n\t update_option( $opt_name, $opt_val );\n\t\n\t // Put an options updated message on the screen\n\t\t\n\t\t\t?>\n\t\t\t<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\n\t\t\t<?php\n\t }\n\t\n\t // Now display the options editing screen\n\t\n\t echo '<div class=\"wrap\">';\n\t\n\t // header\n\t\n\t echo \"<h2>\" . __( 'Swedmedia Backtweets Monitor', 'mt_trans_domain' ) . \"</h2>\";\n\t\n\t // options form\n\t \n\t ?>\n\t\n\t<form name=\"form1\" method=\"post\" action=\"<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>\">\n\t\t<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n\t\t\n\t\t<p><?php _e(\"User to ignore in feed:\", 'swedmedia_backtweets_ignoreuser' ); ?> \n\t\t<input type=\"text\" name=\"<?php echo $data_field_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"20\">\n\t\t</p>\n\t\t<hr />\n\t\t\n\t\t<p class=\"submit\">\n\t\t<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'swedmedia_backtweets_ignoreuser' ) ?>\" />\n\t\t</p>\n\t\n\t</form>\n\t</div>\n\t\n\t<?php\n\n}", "function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {\n\t_deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );\n\treturn register_setting( $option_group, $option_name, $sanitize_callback );\n}", "function common_admin_setup_page( $is_network = false ) {\n\tif ( $is_network ) {\n\t\t$site_ids = get_sites( 'fields=ids' );\n\t\t$roles = get_editable_roles();\n\t\tforeach( $site_ids as $site_id ) {\n\t\t\tswitch_to_blog( $site_id );\n\t\t\t$roles = array_merge( $roles, get_editable_roles() );\n\t\t\trestore_current_blog();\n\t\t}\n\t\t$edit_enabled = true;\n\t} else {\n\t\t$roles = get_editable_roles();\n\t\t$edit_enabled = is_multisite() ? boolval( get_site_option( 'googleauthenticator_network_only') ) : true;\n\t}\n\t$is_updated = $this->save_submitted_admin_setup_page( $is_network );\n\t?>\n\t<div class=\"wrap\">\n\t\t<h1><?php esc_html_e( 'Google Authenticator Settings', 'google-authenticator' ); ?></h1>\n\t\t<?php if ( $is_updated ): ?>\n\t\t\t<?php if ( $is_network ): ?>\n\t\t\t\t<div class=\"notice notice-success is-dismissible\"><p><?php esc_html_e( 'Successfullly saved your settings for the network', 'google-authenticator' ); ?></p></div>\n\t\t\t<?php else: ?>\n\t\t\t\t<div class=\"notice notice-success is-dismissible\"><p><?php esc_html_e( 'Successfullly saved your settings for the site', 'google-authenticator' ); ?></p></div>\n\t\t\t<?php endif; ?>\n\t\t<?php endif; ?>\n\t\t<form method=\"post\">\n\t\t\t<?php if ( $is_network ): ?>\n\t\t\t\t<h2><?php esc_html_e( 'Network Settings', 'google-authenticator' ); ?></h2>\n\t\t\t\t<p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input name=\"network_settings_only\" type=\"checkbox\" value=\"true\" <?php checked( get_site_option( 'googleauthenticator_network_only' ) ); ?>>\n\t\t\t\t\t\t<?php esc_html_e( 'Only use network-wide settings, ignoring site settings.', 'google-authenticator' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</p>\n\t\t\t<?php endif; ?>\n\t\t\t<?php if ( is_multisite() && $is_network || ! is_multisite() ): ?>\n\t\t\t\t<?php $two_screen_mfa = is_multisite() ? get_site_option( 'googleauthenticator_two_screen_signin' ) : get_option( 'googleauthenticator_two_screen_signin' ); ?>\n\t\t\t <h2><?php esc_html_e( 'Two Screen Signin', 'google-authenticator' ); ?></h2>\n\t\t\t\t<p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input name=\"two_screen_approach\" type=\"checkbox\" value=\"true\" <?php checked( $two_screen_mfa ); ?>>\n\t\t\t\t\t\t<?php esc_html_e( 'Ask for authenticator code on secondary login screen', 'google-authenticator' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</p>\n\t\t\t<?php endif; ?>\n\t\t\t<h2><?php esc_html_e( 'Roles requiring Google Authenticator Enabled', 'google-authenticator' ); ?></h2>\n\t\t\t<?php foreach ($roles as $role_key => $role) {\n\t\t\t\t$this->show_role_checkbox( $role_key, $role, $is_network );\n\t\t\t}\n\t\t\tif ( $edit_enabled ) {\n\t\t\t\twp_nonce_field( 'googleauthenticator', 'googleauthenticator' );\n\t\t\t\tsubmit_button();\n\t\t\t} else {\n\t\t\t\tesc_html_e( 'Network-wide settings in effect, only a super admin can modify them.', 'google-authenticator' );\n\t\t\t\tif ( current_user_can( 'manage_network' ) ) :?>\n\t\t\t\t\t<a href=\"<?php echo network_admin_url( 'settings.php?page=google_authenticator' ) ?>\"><?php esc_html_e( 'Change network wide Google Authenticator settings', 'google-authenticator' ); ?></a>\n\t\t\t\t<?php endif;\n\t\t\t}\n\t\t\t?>\n\n\t\t</form>\n\t</div>\n\t<?php\n}", "public function process_admin_options() {\n \n \t(isset($_POST['jigoshop_bank_transfer_enabled'])) ? update_option('jigoshop_bank_transfer_enabled', jigowatt_clean($_POST['jigoshop_bank_transfer_enabled'])) : @delete_option('jigoshop_bank_transfer_enabled');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_title'])) ? update_option('jigoshop_bank_transfer_title', jigowatt_clean($_POST['jigoshop_bank_transfer_title'])) : @delete_option('jigoshop_bank_transfer_title');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_description'])) ? update_option('jigoshop_bank_transfer_description', jigowatt_clean($_POST['jigoshop_bank_transfer_description'])) : @delete_option('jigoshop_bank_transfer_description');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_bank_name'])) ? update_option('jigoshop_bank_transfer_bank_name', jigowatt_clean($_POST['jigoshop_bank_transfer_bank_name'])) : @delete_option('jigoshop_bank_transfer_bank_name');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_acc_number'])) ? update_option('jigoshop_bank_transfer_acc_number', jigowatt_clean($_POST['jigoshop_bank_transfer_acc_number'])) : @delete_option('jigoshop_bank_transfer_acc_number');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_sort_code'])) ? update_option('jigoshop_bank_transfer_sort_code', jigowatt_clean($_POST['jigoshop_bank_transfer_sort_code'])) : @delete_option('jigoshop_bank_transfer_sort_code');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_iban'])) ? update_option('jigoshop_bank_transfer_iban', jigowatt_clean($_POST['jigoshop_bank_transfer_iban'])) : @delete_option('jigoshop_bank_transfer_iban');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_bic'])) ? update_option('jigoshop_bank_transfer_bic', jigowatt_clean($_POST['jigoshop_bank_transfer_bic'])) : @delete_option('jigoshop_bank_transfer_bic');\n \t\n \t(isset($_POST['jigoshop_bank_transfer_additional'])) ? update_option('jigoshop_bank_transfer_additional', jigowatt_clean($_POST['jigoshop_bank_transfer_additional'])) : @delete_option('jigoshop_bank_transfer_additional');\n \t\n }", "public function testUpdateGeneralSettings()\n {\n }", "function aia_settings_advanced_options()\n{\n $aia_options = aia_get_plugin_options() ;\n?>\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><label><?php _e('HTTP API Timeout', AIA_I18N_DOMAIN);?></label></th>\n <td><fieldset>\n <label for=\"aia_http_api_timeout\">\n <select style=\"width: 150px;\" name=\"aia_options[http_api_timeout]\" id=\"aia_http_api_timeout\">\n <option value=\"5\" <?php selected($aia_options['http_api_timeout'], 5); ?>>5 Seconds</option>\n <option value=\"10\" <?php selected($aia_options['http_api_timeout'], 10); ?>>10 Seconds</option>\n <option value=\"15\" <?php selected($aia_options['http_api_timeout'], 15); ?>>15 Seconds</option>\n <option value=\"25\" <?php selected($aia_options['http_api_timeout'], 25); ?>>25 Seconds</option>\n <option value=\"30\" <?php selected($aia_options['http_api_timeout'], 30); ?>>30 Seconds</option>\n <option value=\"45\" <?php selected($aia_options['http_api_timeout'], 45); ?>>45 Seconds</option>\n <option value=\"60\" <?php selected($aia_options['http_api_timeout'], 60); ?>>60 Seconds</option>\n </select>\n <br />\n <small><?php _e('Change the default HTTP API Timeout setting (default is 5 seconds).', AIA_I18N_DOMAIN);?></small></label>\n </fieldset></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><label><?php _e('Enable Debug', AIA_I18N_DOMAIN);?></label></th>\n <td><fieldset>\n <label for=\"aia_enable_debug\">\n <table style=\"padding: 0px;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <td style=\"padding: 5px 0px; vertical-align: top;\">\n <input name=\"aia_options[enable_debug]\" type=\"checkbox\" id=\"aia_enable_debug\" value=\"1\" <?php checked('1', $aia_options['enable_debug']) ; ?> />\n </td>\n <td style=\"padding: 5px;\">\n <?php printf(__('Enabling debug will collect data during the data rendering and processing process.<p>The data is added to the page footer but hidden with a link appearing above the form which can toggle the display of the debug data. This data is useful when trying to understand why the plugin isn\\'t operating as expected.</p><p>When debugging is enabled, specific transports employed by the <a href=\"%s\">WordPress HTTP API</a> can optionally be disabled. While rarely required, disabling transports can be useful when the plugin is not communcating correctly with the Appapro iAthletics API. <i>Extra care should be taken when disabling transports as other aspects of WordPress may not work correctly.</i> The <a href=\"%s\">WordPress Core Control</a> plugin is recommended for advanced debugging of <a href=\"%s\">WordPress HTTP API issues.</a></p>', AIA_I18N_DOMAIN), 'http://codex.wordpress.org/HTTP_API', 'http://wordpress.org/extend/plugins/core-control/', 'http://codex.wordpress.org/HTTP_API');?>\n </td>\n </tr>\n </table>\n </label>\n </fieldset></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><label><?php _e('WordPress HTTP API<br/>Transport Control', AIA_I18N_DOMAIN);?></label></th>\n <td><fieldset>\n <label for=\"aia_fsockopen_transport\">\n <input name=\"aia_options[fsockopen_transport]\" type=\"checkbox\" id=\"aia_fsockopen_transport\" value=\"1\" <?php checked('1', $aia_options['fsockopen_transport']) ; ?> />\n <?php _e('Disable <i><b>FSockOpen</b></i> Transport', AIA_I18N_DOMAIN);?></label>\n <br />\n <label for=\"aia_streams_transport\">\n <input name=\"aia_options[streams_transport]\" type=\"checkbox\" id=\"aia_streams_transport\" value=\"1\" <?php checked('1', $aia_options['streams_transport']) ; ?> />\n <?php _e('Disable <i><b>Streams</b></i> Transport', AIA_I18N_DOMAIN);?></label>\n <br />\n <label for=\"aia_curl_transport\">\n <input name=\"aia_options[curl_transport]\" type=\"checkbox\" id=\"aia_curl_transport\" value=\"1\" <?php checked('1', $aia_options['curl_transport']) ; ?> />\n <?php _e('Disable <i><b>cURL</b></i> Transport', AIA_I18N_DOMAIN);?></label>\n <br />\n <label for=\"aia_ssl_verify\">\n <input name=\"aia_options[ssl_verify]\" type=\"checkbox\" id=\"aia_ssl_verify\" value=\"1\" <?php checked('1', $aia_options['ssl_verify']) ; ?> />\n <?php _e('Disable <i><b>SSL Verify</b></i>', AIA_I18N_DOMAIN);?></label>\n <br />\n <label for=\"aia_local_ssl_verify\">\n <input name=\"aia_options[local_ssl_verify]\" type=\"checkbox\" id=\"aia_local_ssl_verify\" value=\"1\" <?php checked('1', $aia_options['local_ssl_verify']) ; ?> />\n <?php _e('Disable <i><b>Local SSL Verify</b></i>', AIA_I18N_DOMAIN);?></label>\n </fieldset></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><label><?php _e('HTTP Request Timeout', AIA_I18N_DOMAIN);?></label></th>\n <td><fieldset>\n <label for=\"aia_http_request_timeout\">\n <input name=\"aia_options[http_request_timeout]\" type=\"checkbox\" id=\"aia_http_request_timeout\" value=\"1\" <?php checked('1', $aia_options['http_request_timeout']) ; ?> />\n <?php _e('Change <i><b>HTTP Request Timeout</b></i>', AIA_I18N_DOMAIN);?></label>\n <br />\n <label for=\"aia_http_request_timeout_value\">\n <input name=\"aia_options[http_request_timeout_value]\" type=\"text\" id=\"aia_http_request_timeout_value\" value=\"<?php echo $aia_options['http_request_timeout_value'] ; ?>\" /><br />\n <small><?php _e('(in seconds)', AIA_I18N_DOMAIN);?></small></label>\n </fieldset></td>\n </tr>\n </table>\n <br /><br />\n <input name=\"aia_options[api_key]\" type=\"hidden\" id=\"aia_api_key\" value=\"<?php echo $aia_options['api_key'] ; ?>\" />\n <input name=\"aia_options[date_format]\" type=\"hidden\" id=\"aia_date_format\" value=\"<?php echo $aia_options['date_format'] ; ?>\" />\n <input name=\"aia_options[sc_posts]\" type=\"hidden\" id=\"aia_sc_posts\" value=\"<?php echo $aia_options['sc_posts'] ; ?>\" />\n <input name=\"aia_options[sc_widgets]\" type=\"hidden\" id=\"aia_sc_widgets\" value=\"<?php echo $aia_options['sc_widgets'] ; ?>\" />\n <input name=\"aia_options[default_css]\" type=\"hidden\" id=\"aia_default_css\" value=\"<?php echo $aia_options['default_css'] ; ?>\" />\n <input name=\"aia_options[custom_css]\" type=\"hidden\" id=\"aia_custom_css\" value=\"<?php echo $aia_options['custom_css'] ; ?>\" />\n <input name=\"aia_options[custom_css_styles]\" type=\"hidden\" id=\"aia_custom_css_styles\" value=\"<?php echo $aia_options['custom_css_styles'] ; ?>\" />\n <input name=\"aia_options[donation_message]\" type=\"hidden\" id=\"aia_donation_message\" value=\"<?php echo $aia_options['donation_message'] ; ?>\" />\n<?php\n}", "function show_options() {\n if (isset($_POST[\"action\"]) && $_POST[\"action\"] == \"update_settings\")\n $this->process_form();\n \n $this->show_form();\n \n // Just in case, trigger new call\n $this->get_events();\n }", "public function onWpAdminNotices() {\t\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$this->adminNoticeVersionUpgrade();\r\n\t\t$this->adminNoticeOptionsUpdated();\r\n\t}", "function delete_network_option($network_id, $option)\n{\n}", "public function save_options() {\n\t\t$original_allowed_endpoints = get_option( 'wp_rest_cache_allowed_endpoints', [] );\n\t\t$item_allowed_endpoints = get_option( 'wp_rest_cache_item_allowed_endpoints', [] );\n\n\t\t/**\n\t\t * Override cache-enabled endpoints.\n\t\t *\n\t\t * Allows to override the endpoints that will be cached by the WP REST Cache plugin.\n\t\t *\n\t\t * @since 2018.2.0\n\t\t *\n\t\t * @param array $original_allowed_endpoints An array of endpoints that are allowed to be cached.\n\t\t */\n\t\t$allowed_endpoints = apply_filters( 'wp_rest_cache/allowed_endpoints', $item_allowed_endpoints );\n\t\tif ( $original_allowed_endpoints !== $allowed_endpoints ) {\n\t\t\tupdate_option( 'wp_rest_cache_allowed_endpoints', $allowed_endpoints, false );\n\t\t}\n\n\t\t$original_rest_prefix = get_option( 'wp_rest_cache_rest_prefix' );\n\t\t$rest_prefix = rest_get_url_prefix();\n\t\tif ( $original_rest_prefix !== $rest_prefix ) {\n\t\t\tupdate_option( 'wp_rest_cache_rest_prefix', $rest_prefix, false );\n\t\t}\n\n\t\t$original_cacheable_request_headers = get_option( 'wp_rest_cache_cacheable_request_headers', [] );\n\n\t\t/**\n\t\t * Filter cacheable request headers.\n\t\t *\n\t\t * Allow to set cacheable request headers per endpoint in the format [ '/wp/v2/posts' => 'HEADER_1,HEADER_2' ].\n\t\t *\n\t\t * @since 2019.4.0\n\t\t *\n\t\t * @param array $original_cacheable_request_headers An array of endpoints and\n\t\t */\n\t\t$cacheable_request_headers = apply_filters( 'wp_rest_cache/cacheable_request_headers', $original_cacheable_request_headers );\n\t\tif ( $original_cacheable_request_headers !== $cacheable_request_headers ) {\n\t\t\tupdate_option( 'wp_rest_cache_cacheable_request_headers', $cacheable_request_headers, false );\n\t\t}\n\n\t\t$original_allowed_request_methods = get_option( 'wp_rest_cache_allowed_request_methods', [ 'GET' ] );\n\n\t\t/**\n\t\t * Override cache-enabled request methods.\n\t\t *\n\t\t * Allows to override the request methods that will be cached by the WP REST Cache plugin.\n\t\t *\n\t\t * @since 2020.1.0\n\t\t *\n\t\t * @param array $original_allowed_request_methods An array of request_methods that are allowed to be cached.\n\t\t */\n\t\t$allowed_request_methods = apply_filters( 'wp_rest_cache/allowed_request_methods', $original_allowed_request_methods );\n\t\tif ( $original_allowed_request_methods !== $allowed_request_methods ) {\n\t\t\tupdate_option( 'wp_rest_cache_allowed_request_methods', $allowed_request_methods, false );\n\t\t}\n\n\t\t$original_uncached_parameters = get_option( 'wp_rest_cache_uncached_parameters', [] );\n\n\t\t/**\n\t\t * Filter uncached query parameters.\n\t\t *\n\t\t * Allows to specify which query parameters should be omitted from the cacheable query string.\n\t\t *\n\t\t * @since 2020.1.0\n\t\t *\n\t\t * @param array $original_uncached_parameters An array of query parameters that should be omitted from the cacheable query string.\n\t\t */\n\t\t$uncached_parameters = apply_filters( 'wp_rest_cache/uncached_parameters', $original_uncached_parameters );\n\t\tif ( $original_uncached_parameters !== $uncached_parameters ) {\n\t\t\tupdate_option( 'wp_rest_cache_uncached_parameters', $uncached_parameters, false );\n\t\t}\n\n\t\t$original_cache_hit_recording = get_option( 'wp_rest_cache_hit_recording', true );\n\t\t/**\n\t\t * Filter to disable cache hit recording.\n\t\t *\n\t\t * Allows to override the cache hit recording.\n\t\t *\n\t\t * @since 2020.2.0\n\t\t *\n\t\t * @param boolean $original_uncached_parameters An array of query parameters that should be omitted from the cacheable query string.\n\t\t */\n\t\t$cache_hit_recording = apply_filters( 'wp_rest_cache/cache_hit_recording', $original_cache_hit_recording );\n\t\tif ( (int) $original_cache_hit_recording !== (int) $cache_hit_recording ) {\n\t\t\tupdate_option( 'wp_rest_cache_hit_recording', (int) $cache_hit_recording, true );\n\t\t}\n\t}", "public function process_admin_options()\n {\n $saved = parent::process_admin_options();\n\n // Maybe clear logs.\n if ('yes' !== $this->get_option('debug', 'no')) {\n if (empty(self::$log)) {\n self::$log = wc_get_logger();\n }\n self::$log->clear('omnipay.id-cc');\n }\n\n return $saved;\n }", "public function validate_options_page($arg) {\n if (is_object($arg)) {\n return $arg;\n }\n\n $type = 'updated';\n $options = PingFmCustomUrlOptions::factory();\n\n /**\n * 1 = Generate New Key\n * 2 = Let The Conversion Begin!\n * 3 = Report This Little Bugger\n */\n switch ($arg['button_action']) {\n case 1:\n $options->token = PingFmCustomUrlUtils::generate_unique_token();\n $message = self::MSG_TOKEN_SAVED;\n\n break;\n case 2:\n require_once(PCUSU_PLUGIN_DIR . 'classes/PingFmCustomUrlUpdater.php');\n\n ignore_user_abort(true);\n set_time_limit(0);\n\n $updater = new PingFmCustomUrlUpdater();\n $options = $updater->do_upgrade($options);\n\n if ($options->upgrade_error) {\n $message = self::MSG_UPGRADE_ERROR;\n $type = 'error';\n }\n else {\n $message = self::MSG_UPGRADE_SUCCESS;\n }\n\n break;\n case 3:\n $to = 'matt@mattjacob.com';\n $subject = 'Ping.fm Custom URL Plugin Error Report';\n $body = $this->_build_error_report($options);\n\n wp_mail($to, $subject, $body);\n $message = self::MSG_REPORT_SENT;\n\n break;\n default:\n $options->default_author = $arg['default_author'];\n $options->default_category = $arg['default_category'];\n $options->default_status = $arg['default_status'];\n $options->default_tags = sanitize_text_field($arg['default_tags']);\n $options->inline_images = isset($arg['inline_images']);\n $options->title_structure = sanitize_text_field($arg['title_structure']);\n $options->user_css = strip_tags(stripslashes(trim($arg['user_css'])));\n\n $message = self::MSG_SETTINGS_SAVED;\n }\n\n $code = 'pingfm_' . $type;\n add_settings_error('pingfm_options', $code, $message, $type);\n\n return $options;\n }", "function handleOptions() {\n\t// Send No Content\n\thttpCode( 204 );\n\t\n\t// Send allowed headers and cache respose\n\tsendAllowHeader();\n\tsetCacheExp( 604800 );\n\t\n\t// Done\n\tshutdown( 'cleanup' );\n\tshutdown();\n}" ]
[ "0.68729573", "0.6333156", "0.6198476", "0.61445576", "0.6143669", "0.5925467", "0.58763146", "0.5852235", "0.5826135", "0.58143145", "0.5810594", "0.5803399", "0.5702496", "0.5697519", "0.5690769", "0.56591874", "0.5653246", "0.56527245", "0.56525767", "0.5652133", "0.5652133", "0.5652133", "0.5651937", "0.5651937", "0.56516814", "0.5607061", "0.5600458", "0.5594318", "0.55086726", "0.5477044", "0.5463724", "0.5454811", "0.5431857", "0.5428701", "0.54199445", "0.54191715", "0.5386828", "0.53747666", "0.5367919", "0.53638756", "0.5363505", "0.53627485", "0.5349377", "0.53373647", "0.53319204", "0.5328815", "0.5314134", "0.53109026", "0.53065085", "0.53048915", "0.5297139", "0.5294598", "0.52804375", "0.5264157", "0.52582675", "0.52398926", "0.523813", "0.52353996", "0.5233995", "0.5216468", "0.521239", "0.520464", "0.52040005", "0.5202538", "0.51864433", "0.5179035", "0.5176489", "0.51599574", "0.51566607", "0.5149671", "0.5136373", "0.5135819", "0.51324713", "0.5116058", "0.51066434", "0.5103284", "0.51032734", "0.5101769", "0.50997764", "0.5097565", "0.5088721", "0.5080841", "0.5076573", "0.5073361", "0.5055715", "0.50498015", "0.5049672", "0.50456715", "0.5045485", "0.5044107", "0.50434244", "0.5041233", "0.50398606", "0.5031736", "0.50281364", "0.5024778", "0.50179297", "0.50093484", "0.5005515", "0.5005098" ]
0.81408536
0