query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
sequencelengths
0
30
negative_scores
sequencelengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
This test checks whether the getDefaultMethod() returns the expected value.
public function testGetDefaultAction() { $this->assertSame(sprintf('%sAction', DispatchAction::DEFAULT_METHOD_NAME), $this->action->getDefaultMethod()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getDefaultMethod() {\n\t\treturn 'getString';\n\t}", "public function testGetNonExistentWithDefault(): void\n {\n self::assertSame('default', $this->class->get('invalid', 'default'));\n }", "final public function testDefaultValuesMethod()\n {\n $obj = $this->createExpression();\n\n /** 1. Getter returns an array */\n $this->assertInternalType('array', $obj->defaultData());\n }", "public function testDefaultMethodCallBehavior()\n {\n $dummy = new DummyClass();\n $dummy->foobar = 10;\n\n // return null for none defined methods\n BaseMock::setDefaultCallBehavior(BaseMock::DEFAULT_BEHAVIOUR_RETURN_NULL);\n $this->assertNull($dummy->someMethod(10));\n $this->assertSame('', $dummy->__toString());\n\n // return self for none defined methods\n BaseMock::setDefaultCallBehavior(BaseMock::DEFAULT_BEHAVIOUR_RETURN_SELF);\n $this->assertSame($dummy, $dummy->someMethod(10));\n $this->assertSame('', $dummy->__toString());\n\n // call handle for none defined methods\n BaseMock::setDefaultCallBehavior(\n function($a) {\n return $this->foobar + $a;\n }\n );\n $this->assertEquals(20, $dummy->someMethod(10));\n\n // throw exception for none defined methods\n BaseMock::setDefaultCallBehavior(BaseMock::DEFAULT_BEHAVIOUR_THROW_EXCEPTION);\n try {\n $dummy->someMethod(10);\n $this->fail(\"Should throw error on invalid method call\");\n }\n catch(\\BadMethodCallException $e) {\n $this->assertEquals(\n 'Method JSiefer\\ClassMocker\\TestClasses\\DummyClass::someMethod() does not exist',\n $e->getMessage()\n );\n }\n\n try {\n BaseMock::setDefaultCallBehavior('Something Invalid');\n $this->fail(\"Should throw error on invalid behavior option\");\n }\n catch(\\InvalidArgumentException $e) {\n $this->assertEquals(\n 'Invalid behavior option (Something Invalid)',\n $e->getMessage()\n );\n }\n\n BaseMock::setDefaultCallBehavior(BaseMock::DEFAULT_BEHAVIOUR_RETURN_NULL);\n }", "public function getDefault();", "public function testGetRequestMethodsDefault(): void\n {\n self::assertSame(\n [\n RequestMethod::GET,\n RequestMethod::HEAD,\n ],\n $this->getRoute()->getMethods()\n );\n }", "public function getDefault(): mixed;", "public function getDefault()\n\t{\n\t}", "public function getDefaultValue();", "public function getDefaultValue();", "public function getDefault()\n {\n return 'foobar';\n }", "public function getDefaultValue() {}", "public function getDefaultValue() {}", "public function isDefault();", "public function isDefault();", "public function isDefault();", "public function testGettingDefaultValue()\n {\n $this->assertEquals('bar', $this->argument->getDefaultValue());\n }", "public function testGetDefaultOptions0()\n{\n\n $actual = $this->connector->getDefaultOptions();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "#[@test]\n public function paramsDefaultValue() {\n $params= XPClass::forName('net.xp_framework.unittest.rest.server.mock.MockArgs')\n ->newInstance()->getClass()->getMethod('methodWithOptionalArguments')->getParameters();\n $restArgs= new RestRoutingArgs($params);\n $this->assertEquals('default', $restArgs->getArgumentDefaultValue('arg2'));\n }", "public function testSetAndGetDefault()\n {\n $value = true;\n\n self::assertEquals(false, $this->fixture->isDefault());\n self::assertEquals($this->fixture, $this->fixture->setDefault($value));\n self::assertEquals($value, $this->fixture->isDefault());\n }", "public function testGetDefaultValueNoDefault()\n {\n $mono = new P4_Spec_MonoMock;\n\n $this->assertSame(\n null,\n $mono->callProtectedFunc('_getDefaultValue', 'TypeMap'),\n 'Expected default typemap value to match'\n );\n }", "public function defaultValue();", "public function getDefaultHttpMethod()\n {\n return $this->defaultHttpMethod;\n }", "public function testGetTargetReturnsCallablePerDefault()\n {\n $this->assertTrue(is_callable($this->joinPoint->getTarget()));\n }", "public function testMethod0()\n{\n\n $actual = $this->request->method();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function getDefault(){ return $this->default; }", "public function testGetFieldDefault()\n {\n $this->uut->setData(self::SOME_DATA);\n $this->assertEquals('foo', $this->uut->getField('void', 'foo'));\n }", "public function test_creating_from_arguments_defaults() {\n\n\t\t$testee = Testee::from_arguments();\n\n\t\t$expected = [\n\t\t\t[\n\t\t\t\t'methods' => Testee::DEFAULT_METHODS,\n\t\t\t],\n\t\t];\n\n\t\t$this->assertEquals( $expected, $testee->to_array() );\n\t}", "abstract public function getMethod(): string;", "public function testGetDynamicDefault(): void\n {\n self::assertFalse($this->getRoute()->isDynamic());\n }" ]
[ "0.6813425", "0.67793494", "0.6729741", "0.6539034", "0.6456219", "0.6447542", "0.64251065", "0.6394724", "0.6200037", "0.6200037", "0.61797607", "0.61745226", "0.61745226", "0.61416835", "0.61416835", "0.61416835", "0.6127069", "0.6081497", "0.60807705", "0.60655254", "0.6061375", "0.60545707", "0.6024824", "0.59207606", "0.5914029", "0.59096044", "0.58817077", "0.58684367", "0.585984", "0.58513546" ]
0.7128358
0
index action redirect to showall page
public function indexAction() { return $this->app->response->redirect("cms/show-all"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex()\n {\n $this->redirect(['show']);\n }", "public function indexAction()\n {\n $this->forward('show');\n }", "function index(){\n\t\tredirect(\"dashboard/listing\", \"location\");\n\t}", "public function actionIndex() {\n\t\t//$this->render('index');\n $this->redirect(array('authitem/frontpage'));\n\t}", "public function indexAction()\n {\n $this->getHelper('viewRenderer')->setNoRender();\n $this->_forward('list');\n }", "public function indexAction() : string\n {\n // Deal with the action and return a response\n return $this->app->response->redirect(\"content/show-all\");\n }", "public function index()\n\t{\n\t\tredirect('admin/file/viewAll');\n\t}", "public function indexAction()\n {\n return $this->redirect()->toRoute('', ['action' => 'list']);\n }", "public function indexSimplificada() {\n\t\t$this->redirect ( array (\n\t\t\t\t'action' => 'index' \n\t\t) );\n\t}", "public function indexAction(){\n $this->_helper->redirector->gotoUrl(\"/mindex/index\");\n \n }", "protected function _list_index()\n {\n $this->request->redirect('');\n }", "public function indexAction()\r\n\t{\r\n\t\t//Class_myConfig::outputLink( $this->_request->getModuleName() , 'menu' , $this->_request->getBaseUrl() );\t\t\r\n\r\n\t\t$this->_forward('viewall','view');\r\n\t}", "function indexAction()\n {\n redirect('/blog/index/show/id/1');\n }", "function index() {\r\n \r\n // The default action is the showall action\r\n $this->browse();\r\n }", "public function indexAction() {\n // nothing to do here, index.tpl will be displayed\n }", "public function indexAction()\n {\n \t$this->_forward('get');\n }", "public function indexAction()\n\t{\n\t\t// redirect to member list?\n\t}", "public function indexAction() \n\t\t{\n\t\t\t$this->lijstAction();\n\t\t}", "public function indexAction()\n {\n $this->_helper->redirector('browse');\n return;\n }", "public function actionIndex()\r\n\t\t{\r\n\t\t\t$this->redirect(['listado-solicitud']);\r\n\t\t}", "public function actionIndex()\n\t{\n $this->showFooterRegister = true;\n $this->menuItem = 'index';\n $this->layout = '//layouts/landing';\n $this->render('index');\n //$this->redirect('user/login');\n }", "public function index() {\n\t\t$this->redirect(array('action' => 'home'));\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->action_list();\r\n\t}", "public function actionIndex()\n {\n return $this->redirect('home');\n }", "public function indexAction() \n\t{\n\t\t$this->_forward('browse');\n\t}", "public function showallAction(){\n $this->setAction('default');\n $this->defaultAction();\n }", "public function indexAction() {\n\t\t$this->_forward('login');\n\t}", "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "public function indexAction();", "public function indexAction();" ]
[ "0.8133164", "0.79760206", "0.7918955", "0.7878451", "0.78726864", "0.7830713", "0.7763934", "0.7727106", "0.7725738", "0.7717193", "0.76982856", "0.76733536", "0.765502", "0.7651529", "0.76471496", "0.7630876", "0.762916", "0.76115596", "0.75977093", "0.7588992", "0.7581441", "0.7569664", "0.75654894", "0.7550196", "0.75357056", "0.75347656", "0.7513469", "0.7489414", "0.74842453", "0.74842453" ]
0.7983827
1
Route to show all content in database.
public function showAllAction() { $title = "Cms"; $this->app->db->connect(); $sql = "SELECT * FROM content;"; $data = [ "resultset" => $this->app->db->executeFetchAll($sql) ]; $this->app->page->add("cms/show-all", $data); return $this->app->page->render([ "title" => $title, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n Detailpage::with('getContent')->get();\n }", "public function actionList()\r\n\t{\r\n\t\t$this->setPageTitle(Yii::t('ciims.controllers.Content', '{{app_name}} | {{label}}', array(\r\n\t\t\t'{{app_name}}' => Cii::getConfig('name', Yii::app()->name),\r\n\t\t\t'{{label}}' => Yii::t('ciims.controllers.Content', 'All Content')\r\n\t\t)));\r\n\r\n\t\t$this->setLayout('default');\r\n\r\n\t\t$pageSize = Cii::getConfig('contentPaginationSize', 10);\r\n\r\n\t\t$criteria = Content::model()\r\n\t\t\t\t\t->getBaseCriteria()\r\n\t\t\t\t\t->addCondition('type_id >= 2')\r\n\t\t\t\t\t->addCondition('password = \"\"');\r\n\r\n\t\t$criteria->order = 'published DESC';\r\n\r\n\t\t$criteria->limit = $pageSize;\r\n\r\n\t\t$itemCount = Content::model()->count($criteria);\r\n\t\t$pages = new CPagination($itemCount);\r\n\t\t$pages->pageSize=$pageSize;\r\n\r\n\t\t$criteria->offset = $criteria->limit*($pages->getCurrentPage());\r\n\t\t$data = Content::model()->findAll($criteria);\r\n\t\t$pages->applyLimit($criteria);\r\n\r\n\t\t$this->render('all', array(\r\n\t\t\t'data'\t\t=> $data,\r\n\t\t\t'itemCount' => $itemCount,\r\n\t\t\t'pages' \t=> $pages\r\n\t\t));\r\n\t}", "public function indexAction()\n {\n $articles = (new ArticleRepository())->find();\n\n $this->renderView(\n '/article/articles.html.twig',\n [\n 'articles' => $articles,\n 'page' => 'article'\n ]\n );\n }", "public function index(){\n\t\t\t$this->list();\n\t\t}", "public function index(){\n $allPosts = App::get('database')->getAll('posts');\n\n view('admin/posts', compact('allPosts'));\n }", "public function showAllContent()\n {\n $sql = \"SELECT * FROM content;\";\n $resultset = $this->db->executeFetchAll($sql);\n return $resultset;\n }", "public function getIndex()\n\t{\n\t\t$all_content = Content::paginate(5);\n\t\treturn View::make('admin.index')->with('all_content', $all_content);\n\t}", "public function indexAction()\n {\n $articles = $this->modelsManager->executeQuery(\"\n SELECT\n Backend\\Models\\Articles._,\n Backend\\Models\\Articles.urlrequest,\n Backend\\Models\\Articles.title,\n Backend\\Models\\Articles.text,\n Backend\\Models\\Articles.date,\n Backend\\Models\\Articles.image,\n Backend\\Models\\ArticleCategories.name as category_name\n\n FROM Backend\\Models\\Articles\n LEFT JOIN Backend\\Models\\ArticleCategories ON Backend\\Models\\Articles.category = Backend\\Models\\ArticleCategories._\n ORDER BY Backend\\Models\\Articles._ DESC\n \");\n $this->view->setVar('articles', $articles);\n $this->view->setVar('categories', ArticleCategories::find() );\n $this->view->setVar('csrf', $this->csrf->token);\n }", "public function index()\n {\n /// Get cars\n $cars = Car::paginate();\n\n // Return collection of articles as a resource\n return CarResource::collection($cars);\n }", "public function actionIndex(){\n $page = Pages::find()->where(['id' => $_GET['p']])->one();\n //$content = $this->getBlocks($page);\n\n //$content = $this->getBlocks($page);\n\n //$con = $this->render('index', ['content' => $content, 'page' => $page]);\n\n Template::get_header($page);\n\n $this->getBlocks($page);\n\n Template::get_footer();\n }", "public function index()\n {\n $content = Content::orderBy('created_at', 'desc')->paginate(self::PAGINATION_SIZE);\n\n return view('admin.content.index', compact('content'));\n }", "public function index() {\n $this->set('posts', $this->Post->find('all'));\n }", "public function index()\n\t{\n\t\t// show *all* of the resource?\n\t\treturn Post::all();\n\t}", "public function index()\n {\n checkPermissionFor('edit_content');\n $records = PageModel::all();\n return view('cms.'.$this->pageUrl.'.index', compact('records'));\n }", "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n // articleとuserテーブルで紐づいているidを取得して変数に保存している\n //紐づけ作業は各Modelで実装済み\n $article = Article::with('user')->orderBy('id', 'desc')->get();\n return view('contents.article',compact('article'));\n\n }", "public function index() {\r\n $this->contents();\r\n }", "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "function index() {\n $this->getList();\n }", "public function index()\n {\n $articles = Article::all();\n\n \treturn view('cms.articles.index')\n \t->with('articles', $articles);\n }", "public function index()\n {\n TypiCMS::setModel($this->repository->getModel());\n\n $page = Input::get('page');\n $itemsPerPage = Config::get('galleries::public.itemsPerPage');\n\n $data = $this->repository->byPage($page, $itemsPerPage, array('translations'));\n\n $models = Paginator::make($data->items, $data->totalItems, $itemsPerPage);\n\n $this->layout->content = View::make('galleries.public.index')->withModels($models);\n }", "public function index()\n\t{\n\t\t//QUERY ALL THE PAGES\n\t\t$data['pages'] \t\t\t= Posts::pages()->orderBy($this->settingsValue('ORDER_BY'), $this->settingsValue('ARRANGE_BY'))->paginate((int)$this->settingsValue('POSTS_PER_PAGE'));\n\n\t\t$this->layout->content \t= View::make('admin.pages.list', $data);\n\t}", "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "public function index() {\n return $this->showAll();\n }", "public function index()\n {\n return ok(Blog::all());\n }", "public function Index()\n\t{\n\t\t$content = new CMContent();\n\t\t$this->views->SetTitle('Content Controller');\n\t\t$authorized = ($this->user->InGroup('admin')||$this->user->InGroup('contentmanager'))?true:false;\n\t\t$this->views->AddView('content/index.tpl.php', array(\n\t\t\t'contents'\t\t=> $content->ListAll(null),\n\t\t\t'authorized'\t=> $authorized,\n\t\t\t'user'\t\t\t=> $this->user, \n\t\t\t),\n\t\t'primary'\n\t\t);\n\t}", "public function actionIndex()\n {\n $query = Content::availableQuery(Yii::$app->user);\n if ($query === null) {\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t('app', 'You do not have enough rights to view this content.'));\n }\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $dataProvider->sort->attributes['type.name'] = [\n 'asc' => [ContentType::tableName() . '.id' => SORT_ASC],\n 'desc' => [ContentType::tableName() . '.id' => SORT_DESC],\n ];\n\n $dataProvider->sort->attributes['flow.name'] = [\n 'asc' => [Flow::tableName() . '.id' => SORT_ASC],\n 'desc' => [Flow::tableName() . '.id' => SORT_DESC],\n ];\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n return view('crm.database.index');\n }", "public function showAll(){\n return view('main');\n }", "public function index()\n {\n return Article::all();\n }" ]
[ "0.7253741", "0.71463317", "0.7052235", "0.7028648", "0.6986521", "0.6977208", "0.6968191", "0.6963773", "0.6899081", "0.68872213", "0.685392", "0.68527806", "0.68397737", "0.6833185", "0.6825573", "0.6811222", "0.6792148", "0.67879564", "0.6777521", "0.67624736", "0.6755075", "0.6752048", "0.67500573", "0.67455775", "0.673849", "0.6730793", "0.67203337", "0.6711968", "0.67099124", "0.6707241" ]
0.81004
0
route to view blog posts
public function blogActionGet() { $title = "View blog"; $this->app->db->connect(); $sql = <<<EOD SELECT *, DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%dT%TZ') AS published_iso8601, DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%d') AS published FROM content WHERE type=? AND (deleted IS NULL OR deleted > NOW()) ORDER BY published DESC ; EOD; $resultset = $this->app->db->executeFetchAll($sql, ["post"]); $data = [ "resultset" => $resultset ]; $this->app->page->add("cms/blog", $data); return $this->app->page->render([ "title" => $title, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blog()\n {\n $this->oTemplator->setVar('type', 'all');\n $this->oTemplator->setVar('js', ['post', 'aside']);\n $this->oTemplator->setVar('id', 0);\n $this->show('/blog/post');\n }", "function view() {\r\n\t\t$sPermalink = $this->get(__FUNCTION__, '');\r\n\t\tif($sPermalink == '') {\r\n\t\t\tthrow new PPI_Exception('Invalid Permalink');\r\n\t\t}\r\n\t\t$oBlog = new App\\Model\\Blog();\r\n\t\t$post = $oBlog->getPostByPermalink($sPermalink);\r\n\t\tif(empty($post)) {\r\n\t\t\tthrow new PPI_Exception('Unable to obtain post information.');\r\n\t\t}\r\n\t\t$this->load('blog/view', compact('post'));\r\n\t}", "public function getIndex()\n\t{\n\t\tif(Auth::check()) {\n\t\t\tLog::info(Auth::user()->username . \" (\" . Auth::user()->id . \") accessed :: Blog\");\n\t\t}else{\n\t\t\tLog::info(getClientIP() . \" accessed :: Blog\");\n\t\t}\n\n\t\t$posts = Post::with('user')->orderBy('id','desc')->paginate(5);\n\t\treturn view ('blog.index')->withPosts($posts);\n\t}", "public function blog(){\n $posts = Post::all();\n return view('blog', compact('posts'));\n }", "public function blogPostListPage()\n\t{\n\t\t$this->checkUserLogin();\n\t\t$loginId=$this->session->userdata('TS_CMS')['USER_ID'];\n\t\t$data['loginUserData']=$this->ADNM->getLoggedinUserDetail($loginId);\n\t\t$data[\"pageName\"]=\"blog/post/list\";\n\t\t$this->load->view($this->_dashboardListingContainerPage,$data);\n\t}", "public function show(blogpost $blogpost)\n {\n //\n }", "public function index()\n\t{\n\t\t$this->postObject = new Post();\n\t\t$posts = $this->postObject->getAllPosts();\n\n\t\t$this->set('title', 'Blog');\n\t\t$this->set('posts', $posts);\n\t}", "public function index()\n {\n $items = $this->BlogRepositories->getAll();\n return view('blog.posts.index', compact('items'));\n }", "public function index()\n {\n $blogPosts = BlogPost::all();\n return view('backend.pages.blog.index', compact('blogPosts'));\n }", "public function index()\n {\n $blogposts = BlogPost::all();\n return view('admin.blogpost.index',compact('blogposts'));\n }", "public function blogAction()\n {\n $entityManager = $this->get('doctrine.orm.default_entity_manager');\n $posts = $entityManager->getRepository('BlogBundle\\Entity\\Post')->findAll();\n\n return $this->render('BlogBundle:Blog:blog.html.twig', array(\n 'posts' => $posts,\n ));\n }", "public function index()\n {\n\n SEOMeta::setTitle('Blog');\n //SEOMeta::setDescription('Download Royalty Free Ableton Live Templates and learn the latest music production techniques.');\n SEOMeta::addKeyword(['techno samples', 'techno soundbank' , 'music samples' , 'sample packs' , 'techno music samples']);\n\n $posts = Post::orderBy('created_at', 'DESC')->get();\n return view('posts.index' , compact('posts'));\n }", "public function index()\n {\n $blogPosts = BlogPost::all();\n return view('Blog.index', compact('blogPosts'));\n }", "public function index()\n {\n $posts = BackPost::orderBy('id','desc')->get();\n return view('front.blog', compact('posts'));\n }", "public function index()\n {\n\n $posts = blogpost::get();\n\n $posts_perpage = blogpost::with(['user', 'blogcategory'])->orderBy('id','desc')->paginate(5);\n \n $cats = blogcategory::all();\n\n return view('admin.blog.index', compact('posts','posts_perpage', 'cats'));\n }", "public function showBlogPage()\n {\n $all_posts = Post::where('status', true ) -> where('trash', false) ->latest() -> paginate(4);\n $all_cats = Category::where('status', true ) ->latest() -> get();\n return view('porto.blog',[\n 'all_posts' => $all_posts,\n 'all_cats' => $all_cats,\n ]);\n }", "public function blog(){\n \treturn view('blog');\n }", "public function index()\n {\n $posts = Blog::orderBy('id', 'desc')->get();\n return view('backend.allpost')->withPosts($posts);\n }", "public function index()\n {\n $posts = post::where('status',1)->orderBy('created_at','DESC')->paginate(3);\n return view('user.blog',compact('posts'));\n\n }", "public function index()\n {\n $posts = Post::orderBy('createdTime', 'desc')->get();\n return view('admin.pages.manageBlogs')->with('posts', $posts);\n }", "function index() {\r\n\t\t$oBlog = new App\\Model\\Blog();\r\n\t\t$posts = $oBlog->getPosts(\"published = 1\");\r\n\t\t$oTag = new APP_Helper_TagCloud();\r\n\t\t$oTag->setQuery('SELECT count(*) as `count` FROM ppi_blog_tag GROUP BY `title` ORDER BY `count` DESC');\r\n\t\t$tags = $oTag->getTagCloud();\r\n\t\t$this->load('blog/index', compact('posts', 'tags'));\r\n\t}", "public function actionPostsByViews() {\n // prepare the view\n $this->setView('blog/postlist');\n $this->pagetitle = 'Most viewed posts';\n $this->content->user = $this->_user;\n $this->content->heading = 'Most viewed posts';\n $this->content->blogposts = BaseDAO::factory('Blogpost')->findByViews();\n }", "public function showBlog(): void {\n\t\t$page = 0;\n\n\t\tif (isset($this->params['page'])) {\n\t\t\t$page = (int) $this->params['page'];\n\t\t}\n\n\t\t$maxPage = (int) ceil((new PostManager)->count() / $this->nbPostPerPage);\n\n\t\t$postDisplay = new PostDisplay();\n\n\t\t$page = $postDisplay->validatePage($page, $this->minPage, $maxPage);\n\n\t\t$post = (new PostManager)->findBy([], [\n\t\t\t'created_at' => \"DESC\", \n\t\t], $this->nbPostPerPage, max(0, ($page - 1) * $this->nbPostPerPage));\n\n\t\t$this->render(\"@client/pages/blog.html.twig\", [\n\t\t\t'post' => $post, \n\t\t\t'firstPage' => max(1, $this->minPage), \n\t\t\t'lastPage' => max(1, $maxPage), \n\t\t\t'previousPage' => max(1, $postDisplay->validatePage($page - 1, $this->minPage, $maxPage)), \n\t\t\t'currentPage' => max(1, $page), \n\t\t\t'nextPage' => max(1, $postDisplay->validatePage($page + 1, $this->minPage, $maxPage)), \n\t\t]);\n\t}", "public function index()\n {\n $posts = Post::latest()->paginate(20, ['*'], 'post');\n return view('admin.blog_articles', ['posts' => $posts]);\n }", "public function index()\n {\n $posts = Post::orderBy('id', 'desc')->paginate(10);\n\n return view('blog.index')->with('posts', $posts);\n }", "public function posts(){\n $this->index();\n }", "public function blog_posts() // Tendoo 1.2\n\t{\n\t\t$this->include_template('blog.posts');\n\t}", "public function index()\n {\n $posts=Post::latest()->paginate(9);\n return view('main.blogs.blogs',compact('posts'));\n }", "public function indexAction()\n {\n $posts = $this->getDoctrine()->getRepository('AppBundle:Blog\\Post')->findAll();\n\n return $this->render('::Blog/index.html.twig', [\n 'posts' => $posts,\n ]);\n }", "public function action_pages(){ \n\t\n\t\t$modelBlog = new Model_Blog();\n\t\t$post = $modelBlog->getPageList();\n\t\t$this->template->content= View::factory('admin/blog/index')\n\t\t->set('post',$post);\n\t\t\n\n}" ]
[ "0.7536274", "0.74575794", "0.73846877", "0.73276305", "0.73026776", "0.7283131", "0.7217219", "0.72073895", "0.7201515", "0.7201474", "0.7167207", "0.71667236", "0.7151632", "0.7131737", "0.7126641", "0.7123293", "0.7109596", "0.71066177", "0.70969206", "0.70895016", "0.7087178", "0.70620686", "0.70539325", "0.70493895", "0.70460874", "0.7040783", "0.7018851", "0.69929326", "0.6991648", "0.6981758" ]
0.75349593
1
Gets a list of recent threads based on data parameters
protected function getThreadList($data) { //limits $start = 0; $max = 25; if(isset($data['start'])){ $start = intval($data['start']); } if(isset($data['limit'])){ $max = intval($data['limit']); } $limit = 'LIMIT '.$start.', '.$max; //posted before / modified since options $andWhen = $this->container->checkBeforeInput($data); //board filters $andFilters = $this->container->checkBoardFilters($data); //# of views filters if(isset($data['min-views'])){ $data['min-views'] = intval($data['min-views']); $andFilters .= ' AND t.views >= '.$data['min-views']; } if(isset($data['max-views'])){ $data['max-views'] = intval($data['max-views']); $andFilters .= ' AND t.views <= '.$data['max-views']; } //toggle sticky/non-sticky posts if(isset($data['stickies'])){ if(intval($data['stickies']) === 1 OR $data['stickies'] == 'true'){ $andFilters .= ' AND t.sticky = 1'; } elseif(intval($data['stickies']) === 0 OR $data['stickies'] == 'false'){ $andFilters .= ' AND t.sticky = 0'; } } //toggle locked/unlocked if(isset($data['locked'])){ if(intval($data['locked']) === 1 OR $data['locked'] == 'true'){ $andFilters .= ' AND t.locked = 1'; } elseif(intval($data['locked']) === 0 OR $data['locked'] == 'false'){ $andFilters .= ' AND t.locked = 0'; } } //user filters $andFilters .= $this->container->checkUserFilters($data); //check for content stripping $andContent = ',t.content'; if(isset($data['no-content']) AND (intval($data['no-content']) === 1 OR $data['no-content'] == 'true')){ $andContent = ''; } //sorting options $sort = 't.lastPost DESC, t.postTime DESC'; if(isset($data['sort'])){ switch($data['sort']){ case 'time-desc': $sort = 't.postTime DESC'; break; case 'time-asc': $sort = 't.postTime ASC'; break; case 'recent': $sort = 't.lastPost DESC, t.postTime DESC'; break; case 'oldest': $sort = 't.lastPost ASC, t.postTime ASC'; break; case 'alph-asc': $sort = 't.title ASC'; break; case 'alph-desc': $sort = 't.title DESC'; break; case 'sticky': $sort = 't.sticky DESC, t.lastPost DESC'; break; } } $sql = 'SELECT t.topicId, t.userId, t.title, t.url'.$andContent.', t.boardId, b.name as boardName, b.slug as boardSlug, b.categoryId, c.name as categoryName, c.slug as categorySlug, t.locked, t.postTime, t.editTime, t.lastPost, t.sticky, t.views, t.lockTime, t.lockedBy, t.editedBy, cnt.total as count FROM forum_topics t LEFT JOIN forum_boards b ON b.boardId = t.boardId LEFT JOIN forum_categories c ON c.categoryId = b.categoryId LEFT JOIN (SELECT count(*) as total, topicId FROM forum_posts WHERE trollPost = 0 AND buried = 0 GROUP BY topicId) cnt ON cnt.topicId = t.topicId WHERE t.trollPost = 0 AND t.buried = 0 AND b.active = 1 '.$andWhen.' '.$andFilters.' ORDER BY '.$sort.' '.$limit; $getThreads = $this->fetchAll($sql); if(count($getThreads) < $max){ $output['next'] = null; } else{ $output['next'] = $start + $max; } $profile = new \App\Profile\User_Model; //check for no-profiles field $noProfiles = false; if(isset($data['no-profiles']) AND (intval($data['no-profiles']) === 1 OR $data['no-profiles'] == 'true')){ $noProfiles = true; } foreach($getThreads as $key => &$thread){ //do TCA checking $checkTCA = $this->container->checkTopicTCA($data['user'], $thread); if(!$checkTCA){ unset($getThreads[$key]); continue; } //reply count $thread['replies'] = $thread['count']; //get profile and recent post info if($andContent != ''){ if(!$noProfiles){ $thread['author'] = $profile->getUserProfile($thread['userId'], $data['site']['siteId'], array('groups' => false)); unset($thread['author']['pubProf']); unset($thread['author']['showEmail']); unset($thread['author']['email']); unset($thread['author']['lastAuth']); if(isset($thread['author']['avatar'])){ if(strpos($thread['author']['avatar'], '://') === false){ $thread['author']['avatar'] = $data['site']['url'].'/files/avatars/'.$thread['author']['avatar']; } } } $thread['mostRecent'] = false; $getRecent = false; if(isset($thread['recent_postId']) AND intval($thread['recent_postId']) > 0){ $getRecent = array('postId' => $thread['recent_postId'], 'content' => $thread['recent_content'], 'userId' => $thread['recent_userId'], 'postTime' => $thread['recent_postTime'], 'editTime' => $thread['recent_editTime']); } else{ $getRecent = $this->fetchSingle('SELECT * FROM forum_posts WHERE topicId = :id AND buried = 0 ORDER BY postId DESC LIMIT 1', array(':id' => $thread['topicId'])); } if($getRecent){ $thread['mostRecent'] = $getRecent; if(!$noProfiles){ $thread['mostRecent']['author'] = $profile->getUserProfile($getRecent['userId'], $data['site']['siteId'], array('groups' => false)); unset($thread['mostRecent']['author']['pubProf']); unset($thread['mostRecent']['author']['showEmail']); unset($thread['mostRecent']['author']['email']); unset($thread['mostRecent']['author']['lastAuth']); if(isset($thread['mostRecent']['author']['avatar'])){ if(strpos($thread['mostRecent']['author']['avatar'], '://') === false){ $thread['mostRecent']['author']['avatar'] = $data['site']['url'].'/files/avatars/'.$thread['mostRecent']['author']['avatar']; } } } } } //HTML stripping if(isset($data['strip-html']) AND (intval($data['strip-html']) === 1 OR $data['strip-html'] == 'true')){ $thread['boardName'] = strip_tags($thread['boardName']); $thread['categoryName'] = strip_tags($thread['categoryName']); $thread['title'] = strip_tags($thread['title']); if(isset($thread['content'])){ $thread['content'] = strip_tags($thread['content']); } if(isset($thread['author']) AND is_array($thread['author'])){ foreach($thread['author']['profile'] as &$profileItem){ foreach($profileItem as &$profileValue){ $profileValue = strip_tags($profileValue); } } } if(isset($thread['mostRecent']) AND $thread['mostRecent'] != null){ $thread['mostRecent']['content'] = strip_tags($thread['mostRecent']['content']); if(is_array($thread['mostRecent']['author']['profile'])){ foreach($thread['mostRecent']['author']['profile'] as &$profileItem){ foreach($profileItem as &$profileValue){ $profileValue = strip_tags($profileValue); } } } } } //markdown parsing if(isset($data['parse-markdown']) AND isset($thread['content']) AND (intval($data['parse-markdown']) === 1 OR $data['parse-markdown'] == 'true')){ $thread['content'] = markdown($thread['content']); if(isset($thread['author']) AND is_array($thread['author']['profile'])){ foreach($thread['author']['profile'] as &$profileItem){ if($profileItem['type'] == 'textarea'){ $profileItem['value'] = markdown($profileItem['value']); } } } if(isset($thread['mostRecent']) AND $thread['mostRecent'] != null){ $thread['mostRecent']['content'] = markdown($thread['mostRecent']['content']); if(isset($thread['mostRecent']['author']) AND is_array($thread['mostRecent']['author']['profile'])){ foreach($thread['mostRecent']['author']['profile'] as &$profileItem){ if($profileItem['type'] == 'textarea'){ $profileItem['value'] = markdown($profileItem['value']); } } } } } } $output['threads'] = $getThreads; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function queryThreads ()\n\t{\n\t\treturn $this->data->queryThreads ();\n\t}", "public static function threads(){\n\t\t\treturn Database::db()->rows_load(CFG::get('DB_PRFX').'crawlers');\n\t\t}", "public function get_thread_data()\n {\n $data = $this->get_tree();\n $depth = array();\n $children = array();\n\n $this->build_thread_data($data, $depth, $children);\n\n return array($depth, $children);\n }", "public function getThreadList()\n\t{\n\t\t$input = Request::all();\n\t\t$limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n\n\t\t$input['current_user_id'] = Auth::id();\n\t\t$threadLists = $this->service->getThreadList($input);\n\n\t\treturn $this->getResponse($threadLists, new MessageThreadTransformer($input), $this->response, $limit);\n\t}", "function getThreadCount() {\n\t\treturn $this->data_array['threads'];\n\t}", "private function _fetch_threads($mailbox)\n {\n if (empty($this->icache['threads'])) {\n // get all threads\n list ($thread_tree, $msg_depth, $has_children) = $this->conn->thread(\n $mailbox, $this->threading, $this->skip_deleted ? 'UNDELETED' : '');\n \n // add to internal (fast) cache\n $this->icache['threads'] = array();\n $this->icache['threads']['tree'] = $thread_tree;\n $this->icache['threads']['depth'] = $msg_depth;\n $this->icache['threads']['has_children'] = $has_children;\n }\n\n return array(\n $this->icache['threads']['tree'],\n $this->icache['threads']['depth'],\n $this->icache['threads']['has_children'],\n );\n }", "public static function GetThreads() {\n\t\t$response = array();\n\t\t$start\t= isset($_POST['start'])\t&& is_numeric($_POST['start'])\t\t\t\t\t\t\t? intval($_POST['start'])\t: 0;\n\t\t$num\t= isset($_POST['num'])\t\t&& is_numeric($_POST['num'])\t\t\t\t\t\t\t? intval($_POST['num'])\t\t: 30;\n\t\t$order\t= isset($_POST['order'])\t&& ($_POST['order'] === 0 | $_POST['order'] === 1)\t\t? intval($_POST['order'])\t: 0;\n\t\t$user\t= isset($_POST['user'])\t\t&& (is_numeric($_POST['user']) | $_POST['user'] == '*')\t? (string)$_POST['user']\t: '*';\n\t\n\t\t$Threads = DB::getThreads($start, $num, $order, $user);\n\t\tif($Threads === 1) {\n\t\t\t$response['code'] = 1;\n\t\t\t$response['error'] = 'No threads found';\n\t\t} else if($Threads === 2) {\n\t\t\t$response['code'] = 2;\n\t\t\t$response['error'] = 'There was an error during threads extraction';\n\t\t} else {\n\t\t\t$response['code'] = 0;\n\t\t\t$response['error'] = '';\n\t\t\t$response['data'] = $Threads;\n\t\t}\n\t\n\t\treturn json_encode($response, JSON_UNESCAPED_UNICODE);\n\t}", "protected function getThreadReplies($thread, $data)\n\t{\n\t\t$output = array();\n\t\t//limits\n\t\t$start = 0;\n\t\t$max = 20;\n\t\tif(isset($data['start'])){\n\t\t\t$start = intval($data['start']);\n\t\t}\n\t\tif(isset($data['limit'])){\n\t\t\t$max = intval($data['limit']);\n\t\t}\n\t\t$limit = 'LIMIT '.$start.', '.$max;\n\t\t$sort = 'postTime ASC';\n\t\tif(isset($data['sort'])){\n\t\t\tswitch($data['sort']){\n\t\t\t\tcase 'asc':\n\t\t\t\t\t$sort = 'postTime ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'desc':\n\t\t\t\t\t$sort = 'postTime DESC';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$sql = 'SELECT postId, userId, content, postTime, editTime, editedBy\n\t\t\t\tFROM forum_posts\n\t\t\t\tWHERE topicId = :topicId\n\t\t\t\tAND buried = 0 AND trollPost = 0\n\t\t\t\tORDER BY '.$sort.'\n\t\t\t\t'.$limit;\n\t\t$getPosts = $this->fetchAll($sql, array(':topicId' => $thread['topicId']));\n\t\t$profile = new \\App\\Profile\\User_Model;\n\t\tforeach($getPosts as &$post){\n\t\t\t//get profile data\n\t\t\tif(!isset($data['no-profiles']) OR ($data['no-profiles'] != 'true' AND intval($data['no-profiles']) !== 1)){\n\t\t\t\t$post['author'] = $profile->getUserProfile($post['userId'], $data['site']['siteId'], array('groups' => false));\n\t\t\t\tunset($post['author']['pubProf']);\n\t\t\t\tunset($post['author']['showEmail']);\n\t\t\t\tunset($post['author']['email']);\n\t\t\t\tunset($post['author']['lastAuth']);\n\t\t\t}\n\t\t\t//HTML stripping\n\t\t\tif(isset($data['strip-html']) AND (intval($data['strip-html']) === 1 OR $data['strip-html'] == 'true')){\n\t\t\t\t$post['content'] = strip_tags($post['content']);\n\t\t\t\tif(isset($post['author'])){\n\t\t\t\t\tforeach($post['author']['profile'] as &$profileItem){\n\t\t\t\t\t\tforeach($profileItem as &$profileValue){\n\t\t\t\t\t\t\t$profileValue = strip_tags($profileValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t//markdown parsing\n\t\t\tif(isset($data['parse-markdown']) AND (intval($data['parse-markdown']) === 1 OR $data['parse-markdown'] == 'true')){\n\t\t\t\t$post['content'] = markdown($post['content']);\n\t\t\t\tif(isset($post['author'])){\n\t\t\t\t\tforeach($post['author']['profile'] as &$profileItem){\n\t\t\t\t\t\tif($profileItem['type'] == 'textarea'){\n\t\t\t\t\t\t\t$profileItem['value'] = markdown($profileItem['value']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$output = $getPosts;\n\t\treturn $output;\n\t}", "private function _getThreadDs()\n {\n return Wekit::load('forum.PwThread');\n }", "function get_updated_threads($forum_id, $since) {\n\t\t$params = array(\n\t\t\t'forum_id'\t\t=> $forum_id,\n\t\t\t'since'\t\t\t=> is_string($since) ? $string : strftime('%Y-%m-%dT%H:%M', $since),\n\t\t);\n\t\t\n\t\treturn $this->call('get_updated_threads', $params);\n\t}", "function mysupport_threadlist_thread()\r\n{\r\n\tglobal $mybb;\r\n\t\r\n\tif($mybb->settings['enablemysupport'] != 1)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tglobal $db, $lang, $templates, $theme, $foruminfo, $thread, $is_mysupport_forum, $mysupport_status, $mysupport_assigned, $mysupport_bestanswer, $priorities, $priority_class;\r\n\t\r\n\t// this function is called for the thread list on the forum display and the list of threads for search results, however the source of the fid is different\r\n\t// if this is the forum display, get it from the info on the forum we're in\r\n\tif(THIS_SCRIPT == \"forumdisplay.php\")\r\n\t{\r\n\t\t$fid = $foruminfo['fid'];\r\n\t}\r\n\t// if this is a list of search results, get it from the array of info about the thread we're looking at\r\n\t// this means that out of all the results, only threads in MySupport forums will show this information\r\n\telseif(THIS_SCRIPT == \"search.php\")\r\n\t{\r\n\t\t$fid = $thread['fid'];\r\n\t}\r\n\t\r\n\t// need to reset these outside of the the check for if it's a MySupport forum, otherwise they don't get unset in search results where the forum of the next thread may not be a MySupport forum\r\n\t$mysupport_status = \"\";\r\n\t$priority_class = \"\";\r\n\t$mysupport_assigned = \"\";\r\n\t$mysupport_bestanswer = \"\";\r\n\t\r\n\tif(mysupport_forum($fid))\r\n\t{\r\n\t\tif($thread['priority'] != 0 && $thread['visible'] == 1)\r\n\t\t{\r\n\t\t\t$priority_class = \" class=\\\"mysupport_priority_\" . htmlspecialchars_uni(str_replace(\" \", \"_\", $priorities[$thread['priority']])) . \"\\\"\";\r\n\t\t}\r\n\t\t\r\n\t\t// the only thing we might want to do with sticky threads is to give them a priority, to highlight them; they're not going to have a status or be assigned to anybody\r\n\t\t// after we've done the priority, we can exit\r\n\t\tif($thread['sticky'] == 1)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$mysupport_status = mysupport_get_display_status($thread['status'], $thread['statustime'], $thread['uid']);\r\n\t\t\r\n\t\tif($thread['assign'] != 0)\r\n\t\t{\r\n\t\t\tif($thread['assign'] == $mybb->user['uid'])\r\n\t\t\t{\r\n\t\t\t\teval(\"\\$mysupport_assigned = \\\"\".$templates->get('mysupport_assigned_toyou').\"\\\";\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\teval(\"\\$mysupport_assigned = \\\"\".$templates->get('mysupport_assigned').\"\\\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($mybb->settings['enablemysupportbestanswer'] == 1)\r\n\t\t{\r\n\t\t\tif($thread['bestanswer'] != 0)\r\n\t\t\t{\r\n\t\t\t\t$post = intval($thread['bestanswer']);\r\n\t\t\t\t$jumpto_bestanswer_url = get_post_link($post, $tid) . \"#pid\" . $post;\r\n\t\t\t\t$bestanswer_image = \"mysupport_bestanswer.gif\";\r\n\t\t\t\teval(\"\\$mysupport_bestanswer = \\\"\".$templates->get('mysupport_jumpto_bestanswer').\"\\\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public static function getThreads\n\t(\n\t\t$forumID\t\t\t\t// <int> The ID of the forum you're retrieving threads from.\n\t,\t$page \t\t\t\t\t// <int> The page that you're viewing.\n\t,\t$show = 20\t\t\t\t// <int> The number of threads to show.\n\t,\t$stickyList = array()\t// <array> List of thread IDs that were stickied.\n\t)\t\t\t\t\t\t\t// RETURNS <int:[str:mixed]> an array of threads.\n\t\n\t// $threads = AppForum::getThreads($forumID, $page, $show = 20);\n\t{\n\t\t$startLimit = max(0, ($page - 1) * $show);\n\t\t\n\t\treturn Database::selectMultiple(\"SELECT t.id, t.forum_id, t.url_slug, t.title, t.posts, t.views, t.author_id, t.last_poster_id, t.date_last_post, t.perm_post, u.role, u.handle, u.display_name FROM threads t INNER JOIN users u ON u.uni_id=t.last_poster_id WHERE t.forum_id=? ORDER BY t.date_last_post DESC LIMIT \" . ($startLimit + 0) . ', ' . (max(1, $show) + 1), array($forumID));\n\t}", "function retrieveSchedulers() {\n\t\t$GLOBALS['log']->info('Gathering Schedulers');\n\t\t$executeJobs = array();\n\t\t$query \t= \"SELECT id \" .\n\t\t\t\t\"FROM schedulers \" .\n\t\t\t\t\"WHERE deleted=0 \" .\n\t\t\t\t\"AND status = 'Active' \" .\n\t\t\t\t\"AND date_time_start < \".db_convert(\"'\".TimeDate::getInstance()->nowDb().\"'\",'datetime').\" \" .\n\t\t\t\t\"AND (date_time_end > \".db_convert(\"'\".TimeDate::getInstance()->nowDb().\"'\",'datetime').\" OR date_time_end IS NULL)\";\n\t\t\t\t\n\t\t$result\t= $this->db->query($query);\n\t\t$rows=0;\n\t\t$executeTimes = array();\n\t\t$executeIds = array();\n\t\t$executeJobTimes = array();\n\t\twhile(($arr = $this->db->fetchByAssoc($result)) != null) {\n\t\t\t$focus = BeanFactory::getBean('Schedulers', $arr['id']);\n\t\t\t$executeTimes[$rows] = $this->deriveDBDateTimes($focus);\n\t\t\tif(count($executeTimes) > 0) {\n\t\t\t\tforeach($executeTimes as $k => $time) {\n\t\t\t\t$executeIds[$rows] = $focus->id;\n\t\t\t\t\t$executeJobTimes[$rows] = $time;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$rows++;\n\t\t}\n\t\t$executeJobs['ids'] = $executeIds;\n\t\t$executeJobs['times'] = $executeJobTimes;\n\t\treturn $executeJobs;\n\t}", "public function process($threads = array(), $orderBy = 'repliedDate_desc', $pager = null)\n {\n $this->loadModel('tree');\n foreach($threads as $key => $thread)\n {\n if(!$this->tree->hasRight($thread->board)) unset($threads[$key]); \n\n /* Hide the thread or not. */\n if(RUN_MODE == 'front' and $thread->hidden and strpos($this->cookie->t, \",$thread->id,\") === false) unset($threads[$thread->id]);\n\n /* Judge the thread is new or not.*/\n $thread->isNew = (time() - strtotime($thread->repliedDate)) < 24 * 60 * 60 * $this->config->thread->newDays;\n }\n\n $idList = array();\n foreach($threads as $thread) $idList[] = $thread->id;\n $threadIDList = $this->dao->select('id')->from(TABLE_THREAD)->where('id')->in($idList)->orderBy($orderBy)->page($pager)->fetchAll('id');\n foreach($threads as $key => $thread)\n {\n if(!isset($threadIDList[$thread->id])) unset($threads[$key]);\n }\n\n return $threads;\n }", "private function _getWorkersToRun()\n {\n $result = [];\n foreach ($this->_queues as $_queue) {\n foreach ($_queue->getWorkers() as $_worker) {\n $result[$_worker->getId()] = $_worker;\n }\n }\n\n return $result;\n }", "public function getWorkersData()\n {\n $data = [];\n\n foreach ($this->servers as $index => $server) {\n if ($this->filterServers && !in_array($index, $this->filterServers)) {\n continue;\n }\n\n try {\n $gmd = new TelnetGmdServer($server['address']);\n $workers = $gmd->workersInfo();\n $gmd->close();\n unset($gmd);\n\n foreach ($workers as $worker) {\n if (\n strlen($this->filterName) == 0 ||\n stripos($worker['ip'], $this->filterName) !== false ||\n stripos(implode('$#!', $worker['job_names']), $this->filterName) !== false\n ) {\n\n if ($worker['job_names']) {\n sort($worker['job_names'], SORT_STRING);\n }\n\n $worker['server'] = $server['name'];\n $data[] = $worker;\n }\n }\n } catch (Exception $e) {\n $this->_addError($e->getMessage());\n }\n }\n\n $data = $this->_sortData($data, $this->_getSortAvailableWorkers());\n\n return $data;\n }", "function get_thread_list($forum_id, $params=array()) {\n\t\t$params['forum_id'] = $forum_id;\n\t\t\n\t\treturn $this->call('get_thread_list', $params);\n\t}", "public function getCurrentlyScheduled() : array\n {\n $now = new DrupalDateTime('now', $this->getTimezone());\n $now = $now->format(DATETIME_STORAGE_FORMAT);\n\n $query = \\Drupal::entityQuery('node')\n ->condition('type', 'scheduled_content_2')\n ->condition('field_schedule_start_time', $now, '<=')\n ->condition('field_schedule_end_time', $now, '>=')\n ->sort('field_schedule_start_time', 'DESC')\n ->accessCheck(false)\n ;\n\n return Node::loadMultiple($query->execute());\n }", "public function get_allowed_concurrent_batches() {\n\t\treturn apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 5 );\n\t}", "public function threads()\n {\n return $this->belongsToMany('App\\Thread')->withTimestamps();\n }", "public function getRunningJobs() {\n $jobs = array();\n // TODO: impelement this function.\n return $jobs;\n }", "private function get_thread_data($mailbox, $mbox_data = array())\n {\n if (empty($mbox_data)) {\n $mbox_data = $this->imap->folder_data($mailbox);\n }\n\n if ($mbox_data['EXISTS']) {\n // get all threads (default sort order)\n return $this->imap->threads_direct($mailbox);\n }\n\n return new rcube_result_thread($mailbox, '* THREAD');\n }", "private static function getRecommendedJobs() {\n\t\t$recommended = self::getLatestJobs();\n\t\tshuffle($recommended);\n\t\t// only show 3 of the shuffled list\n\t\treturn array($recommended[0], $recommended[1], $recommended[2]);\n\t}", "public function getWorkers(): array\n {\n return $this->workers;\n }", "public function refreshWorkers() {\n\t\treturn $this->_getWorkers();\n\t}", "function mysupport_thread_list()\r\n{\r\n\tglobal $mybb;\r\n\t\r\n\tif($mybb->settings['enablemysupport'] != 1)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tglobal $db, $cache, $lang, $theme, $templates, $forum, $headerinclude, $header, $footer, $usercpnav, $modcp_nav, $threads_list, $priorities, $mysupport_priority_classes;\r\n\t\r\n\t$lang->load(\"mysupport\");\r\n\t\r\n\t// checks if we're in the Mod CP, technical threads are enabled, and we're viewing the technical threads list...\r\n\t// ... or we're in the User CP, the ability to view a list of support threads is enabled, and we're viewing that list\r\n\tif((THIS_SCRIPT == \"modcp.php\" && $mybb->settings['enablemysupporttechnical'] == 1 && $mybb->input['action'] == \"technicalthreads\") || (THIS_SCRIPT == \"usercp.php\" && (($mybb->settings['mysupportthreadlist'] == 1 && ($mybb->input['action'] == \"supportthreads\" || !$mybb->input['action'])) || ($mybb->settings['enablemysupportassign'] == 1 && $mybb->input['action'] == \"assignedthreads\"))))\r\n\t{\r\n\t\t// add to navigation\r\n\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t{\r\n\t\t\tadd_breadcrumb($lang->thread_list_title_tech, \"modcp.php?action=technicalthreads\");\r\n\t\t}\r\n\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t{\r\n\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t{\r\n\t\t\t\tadd_breadcrumb($lang->thread_list_title_assign, \"usercp.php?action=assignedthreads\");\r\n\t\t\t}\r\n\t\t\telseif($mybb->input['action'] == \"supportthreads\")\r\n\t\t\t{\r\n\t\t\t\tadd_breadcrumb($lang->thread_list_title_solved, \"usercp.php?action=supportthreads\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// load the priorities and generate the CSS classes\r\n\t\tmysupport_forumdisplay_searchresults();\r\n\t\t\r\n\t\t// if we have a forum in the URL, we're only dealing with threads in that forum\r\n\t\t// set some stuff for this forum that will be used in various places in this function\r\n\t\tif($mybb->input['fid'])\r\n\t\t{\r\n\t\t\t$forum_info = get_forum(intval($mybb->input['fid']));\r\n\t\t\t$list_where_sql = \" AND t.fid = \" . intval($mybb->input['fid']);\r\n\t\t\t$stats_where_sql = \" AND fid = \" . intval($mybb->input['fid']);\r\n\t\t\t// if we're viewing threads from a specific forum, add that to the nav too\r\n\t\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t\t{\r\n\t\t\t\tadd_breadcrumb($lang->sprintf($lang->thread_list_heading_tech_forum, htmlspecialchars_uni($forum_info['name'])), \"modcp.php?action=technicalthreads&fid={$fid}\");\r\n\t\t\t}\r\n\t\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t\t{\r\n\t\t\t\t\tadd_breadcrumb($lang->sprintf($lang->thread_list_heading_assign_forum, htmlspecialchars_uni($forum_info['name'])), \"usercp.php?action=supportthreads&fid={$fid}\");\r\n\t\t\t\t}\r\n\t\t\t\telseif($mybb->input['action'] == \"supportthreads\")\r\n\t\t\t\t{\r\n\t\t\t\t\tadd_breadcrumb($lang->sprintf($lang->thread_list_heading_solved_forum, htmlspecialchars_uni($forum_info['name'])), \"usercp.php?action=supportthreads&fid={$fid}\");\r\n\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$list_where_sql = \"\";\r\n\t\t\t$stats_where_sql = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// what forums is this allowed in??\r\n\t\t$forums = $cache->read(\"forums\");\r\n\t\t$mysupport_forums = array();\r\n\t\tforeach($forums as $forum)\r\n\t\t{\r\n\t\t\tif(mysupport_forum($forum['fid']))\r\n\t\t\t{\r\n\t\t\t\t$mysupport_forums[] = intval($forum['fid']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$allowed_forums = \"\";\r\n\t\t$allowed_forums = implode(\",\", array_map(\"intval\", $mysupport_forums));\r\n\t\t// if this string isn't empty, generate a variable to go in the query\r\n\t\tif(!empty($allowed_forums))\r\n\t\t{\r\n\t\t\t$list_in_sql = \" AND t.fid IN (\" . $db->escape_string($allowed_forums) . \")\";\r\n\t\t\t$stats_in_sql = \" AND fid IN (\" . $db->escape_string($allowed_forums) . \")\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list_in_sql = \" AND t.fid IN (0)\";\r\n\t\t\t$stats_in_sql = \" AND fid IN (0)\";\r\n\t\t}\r\n\t\t\r\n\t\tif($mybb->settings['mysupportstats'] == 1)\r\n\t\t{\r\n\t\t\t// only want to do this if we're viewing the list of support threads or technical threads\r\n\t\t\tif((THIS_SCRIPT == \"usercp.php\" && $mybb->input['action'] == \"supportthreads\") || (THIS_SCRIPT == \"modcp.php\" && $mybb->input['action'] == \"technicalthreads\"))\r\n\t\t\t{\r\n\t\t\t\t// show a small stats section\r\n\t\t\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$query = $db->simple_select(\"threads\", \"status\", \"1=1{$stats_in_sql}{$stats_where_sql}\");\r\n\t\t\t\t\t// 1=1 here because both of these variables could start with AND, so if there's nothing before that, there'll be an SQL error\r\n\t\t\t\t}\r\n\t\t\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$query = $db->simple_select(\"threads\", \"status\", \"uid = '{$mybb->user['uid']}'{$stats_in_sql}{$stats_where_sql}\");\r\n\t\t\t\t}\r\n\t\t\t\tif($db->num_rows($query) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$total_count = $solved_count = $notsolved_count = $technical_count = 0;\r\n\t\t\t\t\twhile($threads = $db->fetch_array($query))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tswitch($threads['status'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\t\t// we have a technical thread, count it\r\n\t\t\t\t\t\t\t\t++$technical_count;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\t\t// we have a solved thread, count it\r\n\t\t\t\t\t\t\t\t++$solved_count;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t// we have an unsolved thread, count it\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t++$notsolved_count;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// count the total\r\n\t\t\t\t\t\t++$total_count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// if the total count is 0, set all the percentages to 0\r\n\t\t\t\t\t// otherwise we'd get 'division by zero' errors as it would try to divide by zero, and dividing by zero would cause the universe to implode\r\n\t\t\t\t\tif($total_count == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$solved_percentage = $notsolved_percentage = $technical_percentage = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// work out the percentages, so we know how big to make each bar\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$solved_percentage = round(($solved_count / $total_count) * 100);\r\n\t\t\t\t\t\tif($solved_percentage > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$solved_row = \"<td class=\\\"mysupport_bar_solved\\\" width=\\\"{$solved_percentage}%\\\"></td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$notsolved_percentage = round(($notsolved_count / $total_count) * 100);\r\n\t\t\t\t\t\tif($notsolved_percentage > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$notsolved_row = \"<td class=\\\"mysupport_bar_notsolved\\\" width=\\\"{$notsolved_percentage}%\\\"></td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$technical_percentage = round(($technical_count / $total_count) * 100);\r\n\t\t\t\t\t\tif($technical_percentage > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$technical_row = \"<td class=\\\"mysupport_bar_technical\\\" width=\\\"{$technical_percentage}%\\\"></td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get the title for the stats table\r\n\t\t\t\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($mybb->input['fid'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$title_text = $lang->sprintf($lang->thread_list_stats_overview_heading_tech_forum, htmlspecialchars_uni($forum_info['name']));\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$title_text = $lang->thread_list_stats_overview_heading_tech;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($mybb->input['fid'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$title_text = $lang->sprintf($lang->thread_list_stats_overview_heading_solved_forum, htmlspecialchars_uni($forum_info['name']));\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$title_text = $lang->thread_list_stats_overview_heading_solved;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fill out the counts of the statuses of threads\r\n\t\t\t\t\t$overview_text = $lang->sprintf($lang->thread_list_stats_overview, $total_count, $solved_count, $notsolved_count, $technical_count);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$query = $db->simple_select(\"threads\", \"COUNT(*) AS newthreads\", \"lastpost > '\" . intval($mybb->user['lastvisit']) . \"' OR statustime > '\" . intval($mybb->user['lastvisit']) . \"'\");\r\n\t\t\t\t\t\t$newthreads = $db->fetch_field($query, \"newthreads\");\r\n\t\t\t\t\t\t// there's 'new' support threads (reply or action since last visit) so show a link to give a list of just those\r\n\t\t\t\t\t\tif($newthreads != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$newthreads_text = $lang->sprintf($lang->thread_list_newthreads, intval($newthreads));\r\n\t\t\t\t\t\t\t$newthreads = \"<tr><td class=\\\"trow1\\\" align=\\\"center\\\"><a href=\\\"{$mybb->settings['bburl']}/usercp.php?action=supportthreads&amp;do=new\\\">{$newthreads_text}</a></td></tr>\";\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$newthreads = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\teval(\"\\$stats = \\\"\".$templates->get('mysupport_threadlist_stats').\"\\\";\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// now get the relevant threads\r\n\t\t// the query for if we're in the Mod CP, getting all technical threads\r\n\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t{\r\n\t\t\t$query = $db->query(\"\r\n\t\t\t\tSELECT t.tid, t.subject, t.fid, t.uid, t.username, t.lastpost, t.lastposter, t.lastposteruid, t.status, t.statusuid, t.statustime, t.priority, f.name\r\n\t\t\t\tFROM \" . TABLE_PREFIX . \"threads t\r\n\t\t\t\tINNER JOIN \" . TABLE_PREFIX . \"forums f\r\n\t\t\t\tON(t.fid = f.fid AND t.status = '2'{$list_in_sql}{$list_where_sql})\r\n\t\t\t\tORDER BY t.lastpost DESC\r\n\t\t\t\");\r\n\t\t}\r\n\t\t// the query for if we're in the User CP, getting all support threads\r\n\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t{\r\n\t\t\t$list_limit_sql = \"\";\r\n\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t{\r\n\t\t\t\t// viewing assigned threads\r\n\t\t\t\t$column = \"t.assign\";\r\n\t\t\t}\r\n\t\t\telseif($mybb->input['action'] == \"supportthreads\")\r\n\t\t\t{\r\n\t\t\t\t// viewing support threads\r\n\t\t\t\t$column = \"t.uid\";\r\n\t\t\t\t$list_where_sql .= \" AND t.visible = '1'\";\r\n\t\t\t\tif($mybb->input['do'] == \"new\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$list_where_sql .= \" AND (t.lastpost > '\" . intval($mybb->user['lastvisit']) . \"' OR t.statustime > '\" . intval($mybb->user['lastvisit']) . \"')\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$column = \"t.uid\";\r\n\t\t\t\t$list_where_sql .= \" AND t.visible = '1'\";\r\n\t\t\t\t$list_limit_sql = \"LIMIT 0, 5\";\r\n\t\t\t}\r\n\t\t\t$query = $db->query(\"\r\n\t\t\t\tSELECT t.tid, t.subject, t.fid, t.uid, t.username, t.lastpost, t.lastposter, t.lastposteruid, t.status, t.statusuid, t.statustime, t.assignuid, t.priority, f.name\r\n\t\t\t\tFROM \" . TABLE_PREFIX . \"threads t\r\n\t\t\t\tINNER JOIN \" . TABLE_PREFIX . \"forums f\r\n\t\t\t\tON(t.fid = f.fid AND {$column} = '{$mybb->user['uid']}'{$list_in_sql}{$list_where_sql})\r\n\t\t\t\tORDER BY t.lastpost DESC\r\n\t\t\t\t{$list_limit_sql}\r\n\t\t\t\");\r\n\t\t}\r\n\t\t\r\n\t\t$threads = \"\";\r\n\t\tif($db->num_rows($query) == 0)\r\n\t\t{\r\n\t\t\t$threads = \"<tr><td class=\\\"trow1\\\" colspan=\\\"4\\\" align=\\\"center\\\">{$lang->thread_list_no_results}</td></tr>\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twhile($thread = $db->fetch_array($query))\r\n\t\t\t{\r\n\t\t\t\t$bgcolor = alt_trow();\r\n\t\t\t\t$priority_class = \"\";\r\n\t\t\t\tif($thread['priority'] != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$priority_class = \" class=\\\"mysupport_priority_\" . strtolower(htmlspecialchars_uni(str_replace(\" \", \"_\", $priorities[$thread['priority']]))) . \"\\\"\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$thread['subject'] = htmlspecialchars_uni($thread['subject']);\r\n\t\t\t\t$thread['threadlink'] = get_thread_link($thread['tid']);\r\n\t\t\t\t$thread['forumlink'] = \"<a href=\\\"\" . get_forum_link($thread['fid']) . \"\\\">\" . htmlspecialchars_uni($thread['name']) . \"</a>\";\r\n\t\t\t\t$thread['profilelink'] = build_profile_link(htmlspecialchars_uni($thread['username']), intval($thread['uid']));\r\n\t\t\t\t\r\n\t\t\t\t$status_time_date = my_date($mybb->settings['dateformat'], intval($thread['statustime']));\r\n\t\t\t\t$status_time_time = my_date($mybb->settings['timeformat'], intval($thread['statustime']));\r\n\t\t\t\t// if we're in the Mod CP we only need the date and time it was marked technical, don't need the status on every line\r\n\t\t\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t\t\t{\r\n\t\t\t\t\tif($mybb->settings['mysupportrelativetime'] == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$status_time = mysupport_relative_time($thread['statustime']);\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$status_time = $status_time_date . \" \" . $status_time_time;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// we're viewing technical threads, show who marked it as technical\r\n\t\t\t\t\t$status_uid = intval($thread['statusuid']);\r\n\t\t\t\t\t$status_user = get_user($status_uid);\r\n\t\t\t\t\t$status_username = $status_user['username'];\r\n\t\t\t\t\t$status_user_link = build_profile_link(htmlspecialchars_uni($status_username), intval($status_uid));\r\n\t\t\t\t\t$status_time .= \", \" . $lang->sprintf($lang->mysupport_by, $status_user_link);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$view_all_forum_text = $lang->sprintf($lang->thread_list_link_tech, htmlspecialchars_uni($thread['name']));\r\n\t\t\t\t\t$view_all_forum_link = \"modcp.php?action=technicalthreads&amp;fid=\" . intval($thread['fid']);\r\n\t\t\t\t}\r\n\t\t\t\t// if we're in the User CP we want to get the status...\r\n\t\t\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$status = mysupport_get_friendly_status(intval($thread['status']));\r\n\t\t\t\t\tswitch($thread['status'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\t$class = \"technical\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\t$class = \"solved\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$class = \"notsolved\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$status = \"<span class=\\\"mysupport_status_{$class}\\\">\" . htmlspecialchars_uni($status) . \"</span>\";\r\n\t\t\t\t\t// ... but we only want to show the time if the status is something other than Not Solved...\r\n\t\t\t\t\tif($thread['status'] != 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($mybb->settings['mysupportrelativetime'] == 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$status_time = $status . \" - \" . mysupport_relative_time($thread['statustime']);\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$status_time = $status . \" - \" . $status_time_date . \" \" . $status_time_time;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// ... otherwise, if it is not solved, just show that\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$status_time = $status;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if(!($mybb->input['action'] == \"supportthreads\" && $thread['status'] == 0))\r\n\t\t\t\t\t// we wouldn't want to do this if a thread was unsolved\r\n\t\t\t\t\tif((($mybb->input['action'] == \"supportthreads\" || !$mybb->input['action']) && $thread['status'] != 0) || $mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($mybb->input['action'] == \"supportthreads\" || !$mybb->input['action'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// we're viewing support threads, show who marked it as solved or technical\r\n\t\t\t\t\t\t\t$status_uid = intval($thread['statusuid']);\r\n\t\t\t\t\t\t\t$by_lang = \"mysupport_by\";\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// we're viewing assigned threads, show who assigned this thread to you\r\n\t\t\t\t\t\t\t$status_uid = intval($thread['assignuid']);\r\n\t\t\t\t\t\t\t$by_lang = \"mysupport_assigned_by\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$status_user = get_user($status_uid);\r\n\t\t\t\t\t\t$status_user_link = build_profile_link(htmlspecialchars_uni($status_user['username']), intval($status_uid));\r\n\t\t\t\t\t\t$status_time .= \", \" . $lang->sprintf($lang->$by_lang, $status_user_link);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$view_all_forum_text = $lang->sprintf($lang->thread_list_link_assign, htmlspecialchars_uni($thread['name']));\r\n\t\t\t\t\t\t$view_all_forum_link = \"usercp.php?action=assignedthreads&amp;fid=\" . intval($thread['fid']);\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$view_all_forum_text = $lang->sprintf($lang->thread_list_link_solved, htmlspecialchars_uni($thread['name']));\r\n\t\t\t\t\t\t$view_all_forum_link = \"usercp.php?action=supportthreads&amp;fid=\" . intval($thread['fid']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, \"lastpost\");\r\n\t\t\t\t$lastpostdate = my_date($mybb->settings['dateformat'], intval($thread['lastpost']));\r\n\t\t\t\t$lastposttime = my_date($mybb->settings['timeformat'], intval($thread['lastpost']));\r\n\t\t\t\t$lastposterlink = build_profile_link(htmlspecialchars_uni($thread['lastposter']), intval($thread['lastposteruid']));\r\n\t\t\t\t\r\n\t\t\t\teval(\"\\$threads .= \\\"\".$templates->get(\"mysupport_threadlist_thread\").\"\\\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if we have a forum in the URL, add a table footer with a link to all the threads\r\n\t\tif($mybb->input['fid'] || (THIS_SCRIPT == \"usercp.php\" && !$mybb->input['action']))\r\n\t\t{\r\n\t\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t\t{\r\n\t\t\t\t$thread_list_heading = $lang->sprintf($lang->thread_list_heading_tech_forum, htmlspecialchars_uni($forum_info['name']));\r\n\t\t\t\t$view_all = $lang->thread_list_view_all_tech;\r\n\t\t\t\t$view_all_url = \"modcp.php?action=technicalthreads\";\r\n\t\t\t}\r\n\t\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$thread_list_heading = $lang->sprintf($lang->thread_list_heading_assign_forum, htmlspecialchars_uni($forum_info['name']));\r\n\t\t\t\t\t$view_all = $lang->thread_list_view_all_assign;\r\n\t\t\t\t\t$view_all_url = \"usercp.php?action=assignedthreads\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif($mybb->input['action'] == \"supportthreads\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$thread_list_heading = $lang->sprintf($lang->thread_list_heading_solved_forum, htmlspecialchars_uni($forum_info['name']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif(!$mybb->input['action'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$thread_list_heading = $lang->thread_list_heading_solved_latest;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$view_all = $lang->thread_list_view_all_solved;\r\n\t\t\t\t\t$view_all_url = \"usercp.php?action=supportthreads\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\teval(\"\\$view_all = \\\"\".$templates->get(\"mysupport_threadlist_footer\").\"\\\";\");\r\n\t\t}\r\n\t\t// if there's no forum in the URL, just get the standard table heading\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t\t{\r\n\t\t\t\t$thread_list_heading = $lang->thread_list_heading_tech;\r\n\t\t\t}\r\n\t\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$thread_list_heading = $lang->thread_list_heading_assign;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif($mybb->input['do'] == \"new\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$thread_list_heading = $lang->thread_list_heading_solved_new;\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$thread_list_heading = $lang->thread_list_heading_solved;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//get the page title, heading for the status of the thread column, and the relevant sidebar navigation\r\n\t\tif(THIS_SCRIPT == \"modcp.php\")\r\n\t\t{\r\n\t\t\t$thread_list_title = $lang->thread_list_title_tech;\r\n\t\t\t$status_heading = $lang->thread_list_time_tech;\r\n\t\t\t$navigation = \"$modcp_nav\";\r\n\t\t}\r\n\t\telseif(THIS_SCRIPT == \"usercp.php\")\r\n\t\t{\r\n\t\t\tif($mybb->input['action'] == \"assignedthreads\")\r\n\t\t\t{\r\n\t\t\t\t$thread_list_title = $lang->thread_list_title_assign;\r\n\t\t\t\t$status_heading = $lang->thread_list_time_solved;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$thread_list_title = $lang->thread_list_title_solved;\r\n\t\t\t\t$status_heading = $lang->thread_list_time_assign;\r\n\t\t\t}\r\n\t\t\t$navigation = \"$usercpnav\";\r\n\t\t}\r\n\t\t\r\n\t\teval(\"\\$threads_list = \\\"\".$templates->get(\"mysupport_threadlist_list\").\"\\\";\");\r\n\t\t// we only want to output the page if we've got an action; i.e. we're not viewing the list on the User CP home page\r\n\t\tif($mybb->input['action'])\r\n\t\t{\r\n\t\t\teval(\"\\$threads_page = \\\"\".$templates->get(\"mysupport_threadlist\").\"\\\";\");\r\n\t\t\toutput_page($threads_page);\r\n\t\t}\r\n\t}\r\n}", "protected function _getSortAvailableWorkers()\n {\n return [\n self::SORT_SERVER,\n self::SORT_IP,\n self::SORT_FD,\n self::SORT_ID\n ];\n }", "public function get_threads($topic_id){\n $sql = \"SELECT threads.*,users.web_name FROM threads INNER JOIN users ON users.id=threads.user_id WHERE topic_id='$topic_id' AND hidden='0' ORDER BY sticky DESC, post_date DESC\";\n $stmt = $this->web_db_connection->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll();\n return $result;\n }", "public static function myThreads($userid) {\n return DB::query(\"\n SELECT p.*, t.name\n FROM participants p\n JOIN threads t ON (p.`threadid` = t.`id`)\n WHERE userid = %i\n AND status != 'LEFT'\", $userid);\n }", "public function delayedJobs()\n {\n return $this->get('current-jobs-delayed', 0);\n }" ]
[ "0.6610281", "0.65968305", "0.63614744", "0.6037692", "0.5883949", "0.5814698", "0.5732083", "0.5697579", "0.5679025", "0.55870783", "0.55438447", "0.5505393", "0.5497145", "0.54514956", "0.54123986", "0.5408171", "0.53855604", "0.5332878", "0.5293852", "0.52730346", "0.5265314", "0.52472174", "0.5227995", "0.52209777", "0.5199038", "0.5161465", "0.5159496", "0.51108557", "0.5053785", "0.50462526" ]
0.6747169
0
Checks for "If Modified Since" and "Posted Before" parameters for query building in getThreadList()
protected function checkBeforeInput($data) { $andWhen = ''; $modifiedSince = false; $modTime = false; if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])){ if(is_int($_SERVER['HTTP_IF_MODIFIED_SINCE'])){ $modTime = intval($_SERVER['HTTP_IF_MODIFIED_SINCE']); } else{ $modTime = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']); } } elseif(isset($data['modified-since']) AND trim($data['modified-since']) != ''){ if(is_int($data['modified-since'])){ $modTime = intval($data['modified-since']); } else{ $modTime = strtotime($data['modified-since']); } } if($modTime !== false){ $modifiedSince = date('Y-m-d H:i:s', $modTime); } if($modifiedSince !== false){ $andWhen .= ' AND (t.editTime >= "'.$modifiedSince.'" OR t.lastPost >= "'.$modifiedSince.'") '; } $postedBefore = false; $beforeTime = false; if(isset($_SERVER['HTTP_IF_POSTED_BEFORE'])){ if(is_numeric($_SERVER['HTTP_IF_POSTED_BEFORE'])){ $beforeTime = intval($_SERVER['HTTP_IF_POSTED_BEFORE']); } else{ $beforeTime = strtotime($_SERVER['HTTP_IF_POSTED_BEFORE']); } } elseif(isset($data['posted-before']) AND trim($data['posted-before']) != ''){ if(is_numeric($data['posted-before'])){ $beforeTime = intval($data['posted-before']); } else{ $beforeTime = strtotime($data['posted-before']); } } if($beforeTime !== false){ $postedBefore = date('Y-m-d H:i:s', $beforeTime); } if($postedBefore !== false){ $andWhen .= ' AND t.postTime <= "'.$postedBefore.'" '; } return $andWhen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getThreadList($data)\n\t{\n\t\t//limits\n\t\t$start = 0;\n\t\t$max = 25;\n\t\tif(isset($data['start'])){\n\t\t\t$start = intval($data['start']);\n\t\t}\n\t\tif(isset($data['limit'])){\n\t\t\t$max = intval($data['limit']);\n\t\t}\n\t\t$limit = 'LIMIT '.$start.', '.$max;\n\t\t//posted before / modified since options\n\t\t$andWhen = $this->container->checkBeforeInput($data);\n\t\t//board filters\n\t\t$andFilters = $this->container->checkBoardFilters($data);\n\t\t//# of views filters\n\t\tif(isset($data['min-views'])){\n\t\t\t$data['min-views'] = intval($data['min-views']);\n\t\t\t$andFilters .= ' AND t.views >= '.$data['min-views'];\n\t\t}\n\t\tif(isset($data['max-views'])){\n\t\t\t$data['max-views'] = intval($data['max-views']);\n\t\t\t$andFilters .= ' AND t.views <= '.$data['max-views'];\n\t\t}\n\t\t//toggle sticky/non-sticky posts\n\t\tif(isset($data['stickies'])){\n\t\t\tif(intval($data['stickies']) === 1 OR $data['stickies'] == 'true'){\n\t\t\t\t$andFilters .= ' AND t.sticky = 1';\n\t\t\t}\n\t\t\telseif(intval($data['stickies']) === 0 OR $data['stickies'] == 'false'){\n\t\t\t\t$andFilters .= ' AND t.sticky = 0';\n\t\t\t}\n\t\t}\n\t\t//toggle locked/unlocked\n\t\tif(isset($data['locked'])){\n\t\t\tif(intval($data['locked']) === 1 OR $data['locked'] == 'true'){\n\t\t\t\t$andFilters .= ' AND t.locked = 1';\n\t\t\t}\n\t\t\telseif(intval($data['locked']) === 0 OR $data['locked'] == 'false'){\n\t\t\t\t$andFilters .= ' AND t.locked = 0';\n\t\t\t}\n\t\t}\n\t\t//user filters\n\t\t$andFilters .= $this->container->checkUserFilters($data);\n\t\t//check for content stripping\n\t\t$andContent = ',t.content';\n\t\tif(isset($data['no-content']) AND (intval($data['no-content']) === 1 OR $data['no-content'] == 'true')){\n\t\t\t$andContent = '';\n\t\t}\n\t\t//sorting options\n\t\t$sort = 't.lastPost DESC, t.postTime DESC';\n\t\tif(isset($data['sort'])){\n\t\t\tswitch($data['sort']){\n\t\t\t\tcase 'time-desc':\n\t\t\t\t\t$sort = 't.postTime DESC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'time-asc':\n\t\t\t\t\t$sort = 't.postTime ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'recent':\n\t\t\t\t\t$sort = 't.lastPost DESC, t.postTime DESC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'oldest':\n\t\t\t\t\t$sort = 't.lastPost ASC, t.postTime ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'alph-asc':\n\t\t\t\t\t$sort = 't.title ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'alph-desc':\n\t\t\t\t\t$sort = 't.title DESC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'sticky':\n\t\t\t\t\t$sort = 't.sticky DESC, t.lastPost DESC';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$sql = 'SELECT t.topicId, t.userId, t.title, t.url'.$andContent.', t.boardId, b.name as boardName,\n\t\t\t\t\tb.slug as boardSlug, b.categoryId, c.name as categoryName, c.slug as categorySlug,\n\t\t\t\t\t t.locked, t.postTime, t.editTime, t.lastPost, t.sticky, t.views, t.lockTime, \n\t\t\t\t\t t.lockedBy, t.editedBy, cnt.total as count\t\t\n\t\t\t\tFROM forum_topics t\n\t\t\t\tLEFT JOIN forum_boards b ON b.boardId = t.boardId\n\t\t\t\tLEFT JOIN forum_categories c ON c.categoryId = b.categoryId\n\t\t\t\tLEFT JOIN (SELECT count(*) as total, topicId FROM forum_posts WHERE trollPost = 0 AND buried = 0 GROUP BY topicId) cnt ON cnt.topicId = t.topicId\n\t\t\t\tWHERE t.trollPost = 0 AND t.buried = 0 AND b.active = 1\n\t\t\t\t'.$andWhen.'\n\t\t\t\t'.$andFilters.'\n\t\t\t\tORDER BY '.$sort.'\n\t\t\t\t'.$limit;\n\t\t$getThreads = $this->fetchAll($sql);\n\n\t\tif(count($getThreads) < $max){\n\t\t\t$output['next'] = null;\n\t\t}\n\t\telse{\n\t\t\t$output['next'] = $start + $max;\n\t\t}\n\t\t$profile = new \\App\\Profile\\User_Model;\n\t\t//check for no-profiles field\n\t\t$noProfiles = false;\n\t\tif(isset($data['no-profiles']) AND (intval($data['no-profiles']) === 1 OR $data['no-profiles'] == 'true')){\n\t\t\t$noProfiles = true;\n\t\t}\n\t\tforeach($getThreads as $key => &$thread){\n\t\t\t//do TCA checking\n\t\t\t$checkTCA = $this->container->checkTopicTCA($data['user'], $thread);\n\t\t\tif(!$checkTCA){\n\t\t\t\tunset($getThreads[$key]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//reply count\n\t\t\t$thread['replies'] = $thread['count'];\n\t\t\t//get profile and recent post info\n\t\t\tif($andContent != ''){\n\t\t\t\tif(!$noProfiles){\n\t\t\t\t\t$thread['author'] = $profile->getUserProfile($thread['userId'], $data['site']['siteId'], array('groups' => false));\n\t\t\t\t\tunset($thread['author']['pubProf']);\n\t\t\t\t\tunset($thread['author']['showEmail']);\n\t\t\t\t\tunset($thread['author']['email']);\n\t\t\t\t\tunset($thread['author']['lastAuth']);\n\t\t\t\t\tif(isset($thread['author']['avatar'])){\n\t\t\t\t\t\tif(strpos($thread['author']['avatar'], '://') === false){\n\t\t\t\t\t\t\t$thread['author']['avatar'] = $data['site']['url'].'/files/avatars/'.$thread['author']['avatar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$thread['mostRecent'] = false;\n\t\t\t\t$getRecent = false;\n\t\t\t\tif(isset($thread['recent_postId']) AND intval($thread['recent_postId']) > 0){\n\t\t\t\t\t$getRecent = array('postId' => $thread['recent_postId'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'content' => $thread['recent_content'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'userId' => $thread['recent_userId'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'postTime' => $thread['recent_postTime'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'editTime' => $thread['recent_editTime']);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$getRecent = $this->fetchSingle('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM forum_posts\n\t\t\t\t\t\t\t\t\t\tWHERE topicId = :id AND buried = 0\n\t\t\t\t\t\t\t\t\t\tORDER BY postId DESC\n\t\t\t\t\t\t\t\t\t\tLIMIT 1', array(':id' => $thread['topicId']));\n\t\t\t\t}\n\n\t\t\t\tif($getRecent){\n\t\t\t\t\t$thread['mostRecent'] = $getRecent;\n\t\t\t\t\tif(!$noProfiles){\n\t\t\t\t\t\t$thread['mostRecent']['author'] = $profile->getUserProfile($getRecent['userId'], $data['site']['siteId'], array('groups' => false));\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['pubProf']);\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['showEmail']);\t\t\t\t\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['email']);\t\t\t\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['lastAuth']);\t\t\t\n\t\t\t\t\t\tif(isset($thread['mostRecent']['author']['avatar'])){\n\t\t\t\t\t\t\tif(strpos($thread['mostRecent']['author']['avatar'], '://') === false){\n\t\t\t\t\t\t\t\t$thread['mostRecent']['author']['avatar'] = $data['site']['url'].'/files/avatars/'.$thread['mostRecent']['author']['avatar'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t//HTML stripping\n\t\t\tif(isset($data['strip-html']) AND (intval($data['strip-html']) === 1 OR $data['strip-html'] == 'true')){\n\t\t\t\t$thread['boardName'] = strip_tags($thread['boardName']);\n\t\t\t\t$thread['categoryName'] = strip_tags($thread['categoryName']);\n\t\t\t\t$thread['title'] = strip_tags($thread['title']);\n\t\t\t\tif(isset($thread['content'])){\n\t\t\t\t\t$thread['content'] = strip_tags($thread['content']);\n\t\t\t\t}\n\t\t\t\tif(isset($thread['author']) AND is_array($thread['author'])){\n\t\t\t\t\tforeach($thread['author']['profile'] as &$profileItem){\n\t\t\t\t\t\tforeach($profileItem as &$profileValue){\n\t\t\t\t\t\t\t$profileValue = strip_tags($profileValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isset($thread['mostRecent']) AND $thread['mostRecent'] != null){\n\t\t\t\t\t$thread['mostRecent']['content'] = strip_tags($thread['mostRecent']['content']);\n\t\t\t\t\tif(is_array($thread['mostRecent']['author']['profile'])){\n\t\t\t\t\t\tforeach($thread['mostRecent']['author']['profile'] as &$profileItem){\n\t\t\t\t\t\t\tforeach($profileItem as &$profileValue){\n\t\t\t\t\t\t\t\t$profileValue = strip_tags($profileValue);\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//markdown parsing\n\t\t\tif(isset($data['parse-markdown']) AND isset($thread['content']) AND (intval($data['parse-markdown']) === 1 OR $data['parse-markdown'] == 'true')){\n\t\t\t\t$thread['content'] = markdown($thread['content']);\n\t\t\t\tif(isset($thread['author']) AND is_array($thread['author']['profile'])){\n\t\t\t\t\tforeach($thread['author']['profile'] as &$profileItem){\n\t\t\t\t\t\tif($profileItem['type'] == 'textarea'){\n\t\t\t\t\t\t\t$profileItem['value'] = markdown($profileItem['value']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isset($thread['mostRecent']) AND $thread['mostRecent'] != null){\n\t\t\t\t\t$thread['mostRecent']['content'] = markdown($thread['mostRecent']['content']);\n\t\t\t\t\tif(isset($thread['mostRecent']['author']) AND is_array($thread['mostRecent']['author']['profile'])){\n\t\t\t\t\t\tforeach($thread['mostRecent']['author']['profile'] as &$profileItem){\n\t\t\t\t\t\t\tif($profileItem['type'] == 'textarea'){\n\t\t\t\t\t\t\t\t$profileItem['value'] = markdown($profileItem['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}\n\t\t\t}\n\t\t}\n\t\t$output['threads'] = $getThreads;\n\t\treturn $output;\n\t}", "function cma_check_updates_since(cm_info $cm, $from, $filter = array()) {\n $updates = course_check_module_updates_since($cm, $from, array('content'), $filter);\n return $updates;\n}", "function get_updated_threads($forum_id, $since) {\n\t\t$params = array(\n\t\t\t'forum_id'\t\t=> $forum_id,\n\t\t\t'since'\t\t\t=> is_string($since) ? $string : strftime('%Y-%m-%dT%H:%M', $since),\n\t\t);\n\t\t\n\t\treturn $this->call('get_updated_threads', $params);\n\t}", "function get_where_plugin() {\r\n\r\n\t$forum = (int) get_forum_id();\r\n\t$where = 'WHERE topic_status = 0';\r\n\tif ( $forum )\r\n\t\t$where .= \" AND forum_id = $forum \";\r\n\tif ( !empty( $exclude ) )\r\n\t\t$where .= \" AND forum_id NOT IN ('$exclude') \";\r\n\tif ( is_front() ) \r\n\t\t$where .= \" AND topic_sticky <> 2 AND SUBDATE(NOW(), INTERVAL 7 DAY) < topic_time \";\r\n\telseif ( is_forum() || is_view() )\r\n\t\t$where .= \" AND topic_sticky = 0 \";\r\n\r\n\t\r\n\treturn $where; \r\n\r\n}", "function PostExpirationWhere($where){\n global $wpdb,$WishListMemberInstance;\n $wpm_current_user=wp_get_current_user();\n $table = $wpdb->prefix.\"posts\";\n $levels = array();\n $utype = \"non_users\";\n $w = $where;\n if ( ! $wpm_current_user->caps['administrator'] ) { // disregard content expiry for admin\n\n //determine the user type\n if ( $wpm_current_user->ID > 0 ) {\n $levels = $this->get_users_level( $wpm_current_user->ID ); // get users membership levels\n //remove payper post membership level\n foreach((array)$levels as $id=>$level){\n if(strpos($level, \"U\") !== false){\n unset($levels[$id]);\n }\n }\n\n if( count( $levels ) > 0 ) {\n $utype = \"members\";\n } else {\n $utype = \"non_members\";\n }\n }\n\n $wlcc_archived_post_visibility = get_option(\"wlcc_archived_post_visibility\");\n $wlcc_archived_post_visibility = is_array( $wlcc_archived_post_visibility ) ? $wlcc_archived_post_visibility : array();\n\n $is_single = is_single() || is_page() ? true:false;\n if ( ! $is_single ) {\n if ( in_array( $utype, $wlcc_archived_post_visibility ) ) {\n $expired_posts = array(); //if post listing and settings allow viewing\n } else {\n $expired_posts = $this->GetExpiredPost();\n }\n } else {\n $expired_posts = $this->GetExpiredPost();\n }\n\n //filter the post thats not to be shown\n if(count($expired_posts)>0){\n $w .= \" AND $table.ID NOT IN (\" .implode(',',$expired_posts) .\")\";\n }\n }\n return $w;\n }", "public function listLastModifiedForums()\n {\n\n //This consult was wery hard to imagine, since I'm not a Wizard of SQL.\n // First, it must select all messages that where posted in a Forum that the user visted\n // Second, it must select the forum that the user visited\n // and, last, it must ignore the messages that the user send, because he alredy nows that this message\n // is new.\n\n $sq1 = new CMQuery('AMForumVisit');\n $sq1->setProjection(\"AMForumVisit::time\");\n $sq1->setFilter(\"AMForumVisit::codeUser=$this->codeUser AND AMForumVisit::codeForum=AMForum::code\");\n\n $sq2 = new CMQuery('AMForumMessage');\n $sq2->setProjection(\"codeForum\");\n $sq2->setFilter(\"codeUser=$this->codeUser\");\n $q1 = new CMQuery('AMForum');\n $q1->setProjection(\"AMForum::*\");\n\n $j = new CMJoin(CMJoin::LEFT);\n $j->setClass('AMForumMessage');\n $j->on(\"AMForum::code=AMForumMessage::codeForum\");\n $j->setFake();\n $q1->addJoin($j,\"fake\");\n $q1->groupby(\"AMForum::code\");\n\n\n $q1->addVariable(\"newMessages\",\"count(AMForumMessage::code)\");\n\n $q1->setFilter(\"AMForumMessage::codeUser<>$this->codeUser AND AMForumMessage::timePost > ALL \",$sq1,\" AND AMForum::code IN \",$sq2);\n\n return $q1->execute();\n }", "function extendedforum_get_unmailed_posts($starttime, $endtime, $now=null) {\n global $CFG;\n\n if (!empty($CFG->extendedforum_enabletimedposts)) {\n if (empty($now)) {\n $now = time();\n }\n $timedsql = \"AND (d.timestart < $now AND (d.timeend = 0 OR d.timeend > $now))\";\n } else {\n $timedsql = \"\";\n }\n \n \n return get_records_sql(\"SELECT p.*, d.course, d.extendedforum\n FROM {$CFG->prefix}extendedforum_posts p\n JOIN {$CFG->prefix}extendedforum_discussions d ON d.id = p.discussion\n WHERE p.mailed = 0\n AND p.created >= $starttime\n AND (p.created < $endtime OR p.mailnow = 1)\n $timedsql\n ORDER BY p.modified ASC\");\n \n \n \n}", "function extendedforum_mark_old_posts_as_mailed($endtime, $now=null) {\n global $CFG;\n if (empty($now)) {\n $now = time();\n }\n\n if (empty($CFG->extendedforum_enabletimedposts)) {\n return execute_sql(\"UPDATE {$CFG->prefix}extendedforum_posts\n SET mailed = '1'\n WHERE (created < $endtime OR mailnow = 1)\n AND mailed = 0\", false);\n\n } else {\n return execute_sql(\"UPDATE {$CFG->prefix}extendedforum_posts\n SET mailed = '1'\n WHERE discussion NOT IN (SELECT d.id\n FROM {$CFG->prefix}extendedforum_discussions d\n WHERE d.timestart > $now)\n AND (created < $endtime OR mailnow = 1)\n AND mailed = 0\", false);\n }\n}", "function method_list(stdClass $filter)\n\t{\n\t\t$entryModel = $this->getEntryModel();\n\t\t$where = array();\n\t\t$parameters = array();\n\t\t$from = null;\n $to = null;\n\n\t\t/*\n\t\t * a specific entry and its comment?\n\t\t */\n\t\tif( $filter->id )\n\t\t{\n \t\t$query = new qcl_data_db_Query(array(\n \t\t 'where'\t\t\t => \"id = :id OR parentEntryId = :id\",\n \t\t 'parameters'\t=> array(\n \t\t ':id'\t=> $filter->id\n \t\t ),\n \t\t\t'orderBy'\t\t => \"created\"\n \t\t) );\n\t\t}\n\n\t\telseif ( is_string( $filter->search ) )\n\t\t{\n\t\t $filter->search = trim( $filter->search );\n \t\t$query = new qcl_data_db_Query( array(\n \t\t 'where' => \"subject LIKE :fragment or text LIKE :fragment\",\n \t\t 'parameters' => array(\n \t\t \":fragment\"\t=> \"%{$filter->search}%\"\n \t\t )\n \t\t) );\n\t\t}\n\n\t\telse\n\t\t{\n \t\t/*\n \t\t * date\n \t\t */\n\n \t\tif( $filter->from || $filter->to )\n \t\t{\n \t\t $from = strtotime( $filter->from );\n \t\t $to = strtotime( $filter->to );\n\n \t\tif ( $filter->from && $filter->to )\n \t\t{\n \t\t if( $from > $to )\n \t\t {\n \t\t throw new InvalidArgumentException(\"Das Enddatum muss nach dem Startdatum liegen!\");\n \t\t }\n \t\t //$where['created'] = array(\n \t\t //\t\"BETWEEN\",\n \t\t // date(\"Y-m-d 00:00:00\", $from ),\n \t\t // date(\"Y-m-d 23:59:59\", $to )\n \t\t //);\n \t\t $where = \"created between :from and :to or dateStart between :from and :to\";\n \t\t $parameters = array(\n \t\t \":from\" => date(\"Y-m-d 00:00:00\", $from ),\n \t\t \":to\"\t\t=> date(\"Y-m-d 23:59:59\", $to )\n \t\t );\n\n \t\t}\n \t\telseif ($filter->from)\n \t\t{\n \t\t //$where['created'] = array( \">=\", date(\"Y-m-d 00:00:00\", $from ) );\n \t\t $where = \"created >= :from or dateStart >= :from\";\n \t\t $parameters = array(\n \t\t \":from\" => date(\"Y-m-d 00:00:00\", $from )\n \t\t );\n \t\t}\n \t\telseif ($filter->to)\n \t\t{\n \t\t //$where['created'] = array( \"<=\", date(\"Y-m-d 23:59:59\", $to ) );\n \t\t $where = \"created <= :to or dateStart <= :to\";\n \t\t $parameters = array(\n \t\t \":to\"\t\t=> date(\"Y-m-d 23:59:59\", $to )\n \t\t );\n \t\t}\n \t\t}\n\n \t\t/*\n \t\t * author\n \t\t */\n \t\tif ( count( $filter->personId ) )\n \t\t{\n \t\t $where['personId'] = array(\"IN\",$filter->personId);\n \t\t}\n\n\n \t\t$query = new qcl_data_db_Query(array(\n \t\t 'where'\t\t\t => $where,\n \t\t\t'orderBy'\t\t => either($filter->orderBy, \"created DESC\"),\n \t\t 'parameters'\t=> $parameters\n \t\t));\n\t\t}\n\n\t\t/*\n\t\t * paging\n\t\t */\n\t\t$paging = false;\n \tif( is_numeric($filter->offset) && is_numeric( $filter->limit ))\n\t\t{\n \t\t$paging = true;\n\t\t}\n\n\t\t/*\n\t\t * execute query\n\t\t */\n\t\t$entryModel->find($query);\n\t\t$result = array();\n\t\t$counter1 = 0;\n\t\t$counter2 = 0;\n\t\t$denied = 0;\n\t\t$skipped = 0;\n\t\twhile( $entryModel->loadNext($query) )\n\t\t{\n\t\t $data = $this->_getEntryData($entryModel, $filter);\n\t\t if ( is_array($data) )\n\t\t {\n\t\t // update from/to\n\t\t $timestampFrom = either( $data['timeStampStart']/1000, strtotime( $data['created'] ) );\n\t\t if ( ! $from or $timestampFrom < $from )\n\t\t {\n\t\t $from = $timestampFrom;\n\t\t }\n\t\t $timestampTo = either( $data['timeStampEnd']/1000, strtotime( $data['created'] ) );\n\t\t if ( ! $to or $timestampTo > $to )\n\t\t {\n\t\t $to = $timestampTo;\n\t\t }\n\n\t\t // paging\n\t\t if( $paging )\n\t\t {\n\t\t if( $counter2 >= $filter->offset and count($result) < $filter->limit )\n\t\t {\n\t\t $result[] = $data;\n\t\t }\n\t\t else\n\t\t {\n\t\t $skipped++;\n\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t $result[] = $data;\n\t\t }\n\t\t $counter2++;\n\t\t }\n\t\t else\n\t {\n\t $denied++;\n\t }\n\t $counter1++;\n\t\t}\n\n\t\tif( $paging )\n\t\t{\n\t\t $available = $counter2;\n\t\t $retrieved = count($result);\n\t\t $nextOffset = $filter->offset + $filter->limit;\n \t\t$remaining = max(array($available - $nextOffset ,0));\n \t\t/*\n\t\t $this->debug( array(\n\t\t 'filter'\t\t=> $filter,\n\t\t 'records' => $counter1,\n\t\t 'denied'\t => $denied,\n\t\t 'retrieved'\t=> $retrieved,\n\t\t 'available'\t=> $available,\n\t\t 'skipped'\t\t=> $skipped,\n\t\t 'remaining'\t=> $remaining,\n\t\t 'nextOffset'=> $nextOffset\n\t\t ), __CLASS__, __LINE__ );*/\n\n \t\tif( $remaining )\n \t\t{\n \t\t $limit = min(array( 10, $remaining ) );\n \t\t $result[] = array( // @todo move this next to from and to\n \t \"offset\"\t => $nextOffset,\n \t\t \"remaining\"\t=> $remaining,\n \t\t \"limit\"\t\t\t=> $limit\n \t\t );\n \t\t}\n\t\t}\n\t\treturn array(\n\t\t \"data\" => $result,\n\t\t \"from\" => $from*1000,\n\t\t \"to\" => $to*1000\n\t\t);\n\t}", "protected function enableToUpdate()\n\t{\n\t\treturn (Carbon::now()->diffInMinutes($this->post->created_at)<5);\n\t}", "function _bbp_has_topics_query($args = array())\n{\n}", "protected function _getListFieldsUpdateQueryConditions() {\n\t\treturn (array)$this->_bindModelCfgQuery;\n\t}", "function process_date_status()\n\t{\n\t\tif ($this->post['messageread'])\n\t\t{\n\t\t\t$this->post['statusicon'] = 'old';\n\t\t\t$this->post['statustitle'] = $vbphrase['old'];\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->post['statusicon'] = 'new';\n\t\t\t$this->post['statustitle'] = $vbphrase['unread_date'];\t\t\t\n\t\t}\t\n\t\t\n\t\t// format date/time\n\t\t$this->post['postdate'] = vbdate($this->registry->options['dateformat'], $this->post['dateline'], true);\n\t\t$this->post['posttime'] = vbdate($this->registry->options['timeformat'], $this->post['dateline']);\t\t\n\t}", "function mysupport_threadlist_thread()\r\n{\r\n\tglobal $mybb;\r\n\t\r\n\tif($mybb->settings['enablemysupport'] != 1)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tglobal $db, $lang, $templates, $theme, $foruminfo, $thread, $is_mysupport_forum, $mysupport_status, $mysupport_assigned, $mysupport_bestanswer, $priorities, $priority_class;\r\n\t\r\n\t// this function is called for the thread list on the forum display and the list of threads for search results, however the source of the fid is different\r\n\t// if this is the forum display, get it from the info on the forum we're in\r\n\tif(THIS_SCRIPT == \"forumdisplay.php\")\r\n\t{\r\n\t\t$fid = $foruminfo['fid'];\r\n\t}\r\n\t// if this is a list of search results, get it from the array of info about the thread we're looking at\r\n\t// this means that out of all the results, only threads in MySupport forums will show this information\r\n\telseif(THIS_SCRIPT == \"search.php\")\r\n\t{\r\n\t\t$fid = $thread['fid'];\r\n\t}\r\n\t\r\n\t// need to reset these outside of the the check for if it's a MySupport forum, otherwise they don't get unset in search results where the forum of the next thread may not be a MySupport forum\r\n\t$mysupport_status = \"\";\r\n\t$priority_class = \"\";\r\n\t$mysupport_assigned = \"\";\r\n\t$mysupport_bestanswer = \"\";\r\n\t\r\n\tif(mysupport_forum($fid))\r\n\t{\r\n\t\tif($thread['priority'] != 0 && $thread['visible'] == 1)\r\n\t\t{\r\n\t\t\t$priority_class = \" class=\\\"mysupport_priority_\" . htmlspecialchars_uni(str_replace(\" \", \"_\", $priorities[$thread['priority']])) . \"\\\"\";\r\n\t\t}\r\n\t\t\r\n\t\t// the only thing we might want to do with sticky threads is to give them a priority, to highlight them; they're not going to have a status or be assigned to anybody\r\n\t\t// after we've done the priority, we can exit\r\n\t\tif($thread['sticky'] == 1)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$mysupport_status = mysupport_get_display_status($thread['status'], $thread['statustime'], $thread['uid']);\r\n\t\t\r\n\t\tif($thread['assign'] != 0)\r\n\t\t{\r\n\t\t\tif($thread['assign'] == $mybb->user['uid'])\r\n\t\t\t{\r\n\t\t\t\teval(\"\\$mysupport_assigned = \\\"\".$templates->get('mysupport_assigned_toyou').\"\\\";\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\teval(\"\\$mysupport_assigned = \\\"\".$templates->get('mysupport_assigned').\"\\\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($mybb->settings['enablemysupportbestanswer'] == 1)\r\n\t\t{\r\n\t\t\tif($thread['bestanswer'] != 0)\r\n\t\t\t{\r\n\t\t\t\t$post = intval($thread['bestanswer']);\r\n\t\t\t\t$jumpto_bestanswer_url = get_post_link($post, $tid) . \"#pid\" . $post;\r\n\t\t\t\t$bestanswer_image = \"mysupport_bestanswer.gif\";\r\n\t\t\t\teval(\"\\$mysupport_bestanswer = \\\"\".$templates->get('mysupport_jumpto_bestanswer').\"\\\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function checkPost($post){\r\n\tglobal $MIN_POST_LENGTH;\r\n\r\n\t// first, check status_type (what type of post)\r\n\tif($post['status_type'] != \"mobile_status_update\" && $post['status_type'] != \"wall_post\")\r\n\t\treturn false;\r\n\t// if the post isn't at least the minimum desired post length\r\n\telseif(strlen($post['message']) < $MIN_POST_LENGTH)\r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n\r\n}", "protected function beforeValidate() {\n \n if ($this->isNewRecord) {\n // set the create date, last updated date, then the user doing the creating\n // $this->created = $this->modified = new CDbExpression('NOW()');\n $created = time();\n $this->created = $this->modified = date('Y-m-d H:i:s', $created);\n if (!$this->added) $this->added = $created;\n $this->created_by = $this->modified_by = Yii::app()->user->id;\n } else {\n //not a new record, so just set the last updated time and last updated user id\n //$this->update_time = new CDbExpression('NOW()');\n $this->modified = date('Y-m-d H:i:s');\n $this->modified_by = Yii::app()->user->id;\n }\n\n return parent::beforeValidate();\n }", "protected function getQueryConditions() {\n\t\t$conds = array();\n\t\tif ( $this->title ) {\n\t\t\t$conds[ 'rev_page' ] = $this->title->getArticleID();\n\t\t} else if ( $this->offset ) {\n\t\t\t\t$conds[] = 'rev_timestamp <= ' . $dbr->addQuotes( $this->offset );\n\t\t}\n\t\treturn $conds;\n\t}", "function learndash_notifications_admin_post_filter_query( $query ) {\n\tglobal $pagenow;\n\t$filters = array( 'course', 'lesson', 'topic', 'quiz' );\n\t$q_vars = $query->query_vars;\n\n\tforeach ( $filters as $f ) {\n\t\tif ( is_admin() AND $pagenow == 'edit.php' AND ! empty( $_GET[ $f . '_id' ] ) AND ( $query->query['post_type'] == 'ld-notification' ) ) {\n\n\t\t\t$query->query_vars['meta_query'][] = array(\n\t\t\t\t'key' => '_ld_notifications_'. $f . '_id',\n\t\t\t\t'value'\t=> $_GET[ $f . '_id' ],\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( is_admin() AND $pagenow == 'edit.php' AND ! empty( $_GET[ 'trigger_id' ] ) AND ( $query->query['post_type'] == 'ld-notification' ) ) {\n\n\t\t$query->query_vars['meta_query'][] = array(\n\t\t\t'key' => '_ld_notifications_trigger',\n\t\t\t'value'\t=> $_GET['trigger_id'],\n\t\t);\n\t}\n}", "function check_mod_since() {\n\t\tif ($this->cache['mod_since']) {\n\t\t\t$http = 'HTTP/1.1 ';\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH'])) {\n\t\t\t\tif ($_SERVER['HTTP_IF_NONE_MATCH'] == $this->outputs['etag']) {\n\t\t\t\t\theader($http . ' 304 Not Modified');\n\t\t\t\t\t$this->gym_master->safe_exit();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {\n\t\t\t\tif (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $this->outputs['last_mod_time']) {\n\t\t\t\t\theader($http . ' 304 Not Modified');\n\t\t\t\t\t$this->gym_master->safe_exit();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public function filter(Request $request )\n \n {\n $filter_1=$request->author_id;\n $filter_2=$request->post_category_id ;\n $filter_3=$request->status;\n $filter_date=$request->updated_at;\n //Put $this $Field->value >>> If Field not Use , fill values='none' ! .\n $field_1='author_id'; \n $field_2='post_category_id';\n $field_3='status';\n $field_date='updated_at';\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])->get()\n :false\n :false;\n \n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_1, '=', $filter_1)\n ->get()\n :false\n :false;\n \n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_2, '=', $filter_2)\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_3, '=', $filter_3)\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3]\n ])\n ->orWhere($field_date, 'like', '%'.$filter_date.'%')\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2]\n \n ])\n ->orWhere([\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->get()\n :false\n :false; \n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_3, '=', $filter_3]\n \n ])\n ->orWhere([\n [$field_2, '=', $filter_2],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_date, 'like', '%'.$filter_date.'%']\n \n ])\n ->orWhere([\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3]\n ])\n ->get()\n :false\n :false;\n\n return view('admin.post.list.postList-filter',['post_list'=>$post_list]);\n }", "function is_waiting_posts($mysqlConnect,$mysqlPrefix,$blog_id){\n $resultSelect = mysql_query(\"SELECT * \n\t\t\t\tFROM \".$mysqlPrefix.\"_\".$blog_id.\"_postmeta \n\t\t\t\tWHERE meta_key = 'queue_status' \n\t\t\t\tAND (meta_value = 'waiting' \n OR meta_value = '')\", \n $mysqlConnect);\n $numWaitingPosts = mysql_num_rows($resultSelect);\n if($numWaitingPosts > 0){\n $array['numWaitingPosts'] = $numWaitingPosts;\n $array['resultSelectWaiting'] = $resultSelect;\n return $array;\n } else {\n return false;\n }\n}", "function preUpdate()\n\t{\n\t\t// Detect undeletion. Reset date deleted if date undeleted is more recent.\n\t\tif($this->getDateDeleted !== null && $this->getDateUndeleted !== null && $this->getDateDeleted < $this->getDateUndeleted) {\n\t\t\t$this->setDateDeleted(null);\n\t\t}\n\t\t$this->setDateUpdated(new DateTime);\n\t\treturn true;\n\t}", "function cfcpt_query_filter() {\n\t\tif(!is_admin()) {\n\t\t\tadd_filter('posts_where_request','cfcpt_parse_query_filter');\n\t\t}\n\t}", "private function addConditionForRange() {\n $this->addWhere('tx_newspaper_article.tstamp>=' . tx_newspaper_UtilMod::calculateTimestamp($this->input['range']));\n }", "function mysupport_get_display_status($status = 0, $statustime, $thread_author)\r\n{\r\n\tglobal $mybb, $lang, $templates, $theme, $mysupport_status;\r\n\t\r\n\t$thread_author = intval($thread_author);\r\n\t\r\n\t// if this user is logged in, we want to override the global setting for display with their own setting\r\n\tif($mybb->user['uid'] != 0 && $mybb->settings['mysupportdisplaytypeuserchange'] == 1)\r\n\t{\r\n\t\tif($mybb->user['mysupportdisplayastext'] == 1)\r\n\t\t{\r\n\t\t\t$mybb->settings['mysupportdisplaytype'] = \"text\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$mybb->settings['mysupportdisplaytype'] = \"image\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// big check to see if either the status is to be show to everybody, only to people who can mark as solved, or to people who can mark as solved or who authored the thread\r\n\tif($mybb->settings['mysupportdisplayto'] == \"all\" || ($mybb->settings['mysupportdisplayto'] == \"canmas\" && mysupport_usergroup(\"canmarksolved\")) || ($mybb->settings['mysupportdisplayto'] == \"canmasauthor\" && (mysupport_usergroup(\"canmarksolved\") || $mybb->user['uid'] == $thread_author)))\r\n\t{\r\n\t\tif($mybb->settings['mysupportdisplaytype'] == \"text\")\r\n\t\t{\r\n\t\t\t// if this user cannot mark a thread as technical and people who can't mark as technical can't see that a technical thread is technical, don't execute this\r\n\t\t\t// I used the word technical 4 times in that sentence didn't I?? sorry about that\r\n\t\t\tif($status == 2 && !($mybb->settings['mysupporthidetechnical'] == 1 && !mysupport_usergroup(\"canmarktechnical\")))\r\n\t\t\t{\r\n\t\t\t\t$status_class = \"technical\";\r\n\t\t\t\t$status_text = $lang->technical;\r\n\t\t\t\tif($mybb->settings['mysupportrelativetime'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_time_technical = mysupport_relative_time($statustime);\r\n\t\t\t\t\t$status_title = htmlspecialchars_uni($lang->sprintf($lang->technical_time, $date_time_technical));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_technical = my_date(intval($mybb->settings['dateformat']), intval($statustime));\r\n\t\t\t\t\t$time_technical = my_date(intval($mybb->settings['timeformat']), intval($statustime));\r\n\t\t\t\t\t$status_title = htmlspecialchars_uni($lang->sprintf($lang->technical_time, $date_technical . \" \" . $time_technical));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif($status == 1)\r\n\t\t\t{\r\n\t\t\t\t$status_class = \"solved\";\r\n\t\t\t\t$status_text = $lang->solved;\r\n\t\t\t\tif($mybb->settings['mysupportrelativetime'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_time_solved = mysupport_relative_time($statustime);\r\n\t\t\t\t\t$status_title = htmlspecialchars_uni($lang->sprintf($lang->solved_time, $date_time_solved));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_solved = my_date(intval($mybb->settings['dateformat']), intval($statustime));\r\n\t\t\t\t\t$time_solved = my_date(intval($mybb->settings['timeformat']), intval($statustime));\r\n\t\t\t\t\t$status_title = htmlspecialchars_uni($lang->sprintf($lang->solved_time, $date_solved . \" \" . $time_solved));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$status_class = \"notsolved\";\r\n\t\t\t\t$status_text = $status_title = $lang->not_solved;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\teval(\"\\$mysupport_status = \\\"\".$templates->get('mysupport_status_text').\"\\\";\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// if this user cannot mark a thread as technical and people who can't mark as technical can't see that a technical thread is technical, don't execute this\r\n\t\t\t// I used the word technical 4 times in that sentence didn't I?? sorry about that\r\n\t\t\tif($status == 2 && !($mybb->settings['mysupporthidetechnical'] == 1 && !mysupport_usergroup(\"canmarktechnical\")))\r\n\t\t\t{\r\n\t\t\t\t$status_img = \"technical\";\r\n\t\t\t\tif($mybb->settings['mysupportrelativetime'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_time_technical = mysupport_relative_time($statustime);\r\n\t\t\t\t\t$status_text = htmlspecialchars_uni($lang->sprintf($lang->technical_time, $date_time_technical));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_technical = my_date(intval($mybb->settings['dateformat']), intval($statustime));\r\n\t\t\t\t\t$time_technical = my_date(intval($mybb->settings['timeformat']), intval($statustime));\r\n\t\t\t\t\t$status_text = htmlspecialchars_uni($lang->sprintf($lang->technical_time, $date_technical . \" \" . $time_technical));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif($status == 1)\r\n\t\t\t{\r\n\t\t\t\t$status_img = \"solved\";\r\n\t\t\t\tif($mybb->settings['mysupportrelativetime'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_time_solved = mysupport_relative_time($statustime);\r\n\t\t\t\t\t$status_text = htmlspecialchars_uni($lang->sprintf($lang->solved_time, $date_time_solved));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$date_solved = my_date(intval($mybb->settings['dateformat']), intval($statustime));\r\n\t\t\t\t\t$time_solved = my_date(intval($mybb->settings['timeformat']), intval($statustime));\r\n\t\t\t\t\t$status_text = htmlspecialchars_uni($lang->sprintf($lang->solved_time, $date_solved . \" \" . $time_solved));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$status_img = \"notsolved\";\r\n\t\t\t\t$status_text = $lang->not_solved;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\teval(\"\\$mysupport_status = \\\"\".$templates->get('mysupport_status_image').\"\\\";\");\r\n\t\t}\r\n\t\t\r\n\t\treturn $mysupport_status;\r\n\t}\r\n}", "function PostExpirationAdjacentWhere($where){\n global $wpdb,$WishListMemberInstance,$post;\n $wpm_current_user=wp_get_current_user();\n $current_post_date = $post->post_date;\n $w = $where;\n if ( ! $wpm_current_user->caps['administrator'] ) { // disregard content expiry for admin\n $expired_posts = $this->GetExpiredPost();\n //filter the post thats not to be shown\n if ( count($expired_posts) > 0 ) {\n $postids = implode(',',$expired_posts) .',' .$post->ID;\n $w .= \" AND p.ID NOT IN (\" .$postids .\") \";\n }\n }\n return $w;\n }", "public function testChangedSinceFilter()\n {\n /** @var MockObject|\\Magemock_Sample_Model_Resource_Vehicle_Collection $collection */\n $collection = new \\Magemock_Sample_Model_Resource_Vehicle_Collection();\n $collection->expects($this->exactly(3))\n ->method('addFieldToFilter')\n ->with($this->equalTo('updated_at'), $this->equalTo(['gt' => '2016-01-01 10:00:00']));\n\n // test with DateTime\n $date = new \\DateTime();\n $date->setDate(2016, 1, 1);\n $date->setTime(10, 0, 0);\n $collection->addChangedSinceFilter($date);\n\n // test with Zend_Date\n $date = new \\Zend_Date('2016-01-01 10:00:00');\n $collection->addChangedSinceFilter($date);\n\n // test with string\n $collection->addChangedSinceFilter('2016-01-01 10:00:00');\n }", "public function check_on_entry_exists()\n {\n //check if the last entry type of this record has the same type as the type of the sent entry\n $this->prevent_same_entry_type();\n\n //prevent incomming entry time to be equal to the current last entry time of the task\n $last_entry = $this->lastEntry;\n if(!date_greater_than($this->request->entry_time, $last_entry->entry_time)) {\n $this->build_error([\n 'message' => \"Please the time of this entry must be greater than the \".\n \"previous entry time({$last_entry->entry_time})\"\n ]);\n }\n\n //check first if the task has ended in case user want to : pause or resume\n if (in_array($this->request->entry_type,['resume','pause'])) {\n if ($last_entry->entry_type == 'end') {\n $this->build_error([\n 'message' => 'You can no longer '.strtoupper($this->request->entry_type).'. '.\n 'this task has been ended'\n ]);\n }\n }\n \n }", "function _bbp_has_forums_query($args = array())\n{\n}", "function p3_alter_widget_comments( $args ) {\n\t$args = array( \n\t\t'number' => 8, \n\t\t'status' => 'approve', \n\t\t'post_status' => 'publish',\n\t\t'type' => 'comment',\n\t\t'meta_query' => array(\n\t\t\t'relation' => 'OR',\n\t\t\tarray( // Select comments that don't have the 'shadow' p3_comment_status meta\n\t\t\t\t'key' => 'p3_comment_status',\n\t\t\t\t'value' => 'shadow',\n\t\t\t\t'compare' => '!='\n\t\t\t),\n\t\t\tarray( // Select comments that don't have the p3_comment_status set\n\t\t\t\t'key' => 'p3_comment_status',\n\t\t\t\t'compare' => 'NOT EXISTS',\n\t\t\t\t'value' => ''\n\t\t\t)\n\t\t)\n\t);\n\treturn $args;\n}" ]
[ "0.5374777", "0.53744656", "0.5262732", "0.52360725", "0.51953614", "0.500626", "0.4975719", "0.49631095", "0.4958077", "0.4886021", "0.48823345", "0.48707962", "0.48666495", "0.4865979", "0.4841374", "0.48411375", "0.48403147", "0.48231748", "0.48159587", "0.4813239", "0.48007333", "0.4798314", "0.47953767", "0.47949442", "0.47943676", "0.4791334", "0.4790767", "0.4786588", "0.47840792", "0.47833556" ]
0.61501926
0
Checks for and processes data for categories, boards, excludecategories and excludeboards parameters
protected function checkBoardFilters($data) { $andFilters = ''; if(isset($data['categories'])){ if(isset($data['boards'])){ $catBoardList = explode(',', $data['boards']); } else{ $catBoardList = array(); } $expCats = explode(',', $data['categories']); foreach($expCats as $ck => &$cat){ $cat = intval($cat); $getCat = $this->get('forum_categories', $cat, array('categoryId')); if(!$getCat){ unset($expCats[$ck]); continue; } $getBoards = $this->getAll('forum_boards', array('categoryId' => $cat, 'active' => 1), array('boardId')); foreach($getBoards as $board){ if(!in_array($board['boardId'], $catBoardList)){ $catBoardList[] = $board['boardId']; } } } $data['boards'] = join(',', $catBoardList); } if(isset($data['exclude-categories'])){ if(isset($data['exclude-boards'])){ $catAntiBoardList = explode(',', $data['exclude-boards']); } else{ $catAntiBoardList = array(); } $expAntiCats = explode(',', $data['exclude-categories']); foreach($expAntiCats as $ck => &$cat){ $cat = intval($cat); $getCat = $this->get('forum_categories', $cat, array('categoryId')); if(!$getCat OR (isset($catBoardList) AND in_array($cat, $catBoardList))){ unset($expAntiCats[$ck]); continue; } $getAntiBoards = $this->getAll('forum_boards', array('categoryId' => $cat, 'active' => 1), array('boardId')); foreach($getAntiBoards as $board){ if(!in_array($board['boardId'], $catAntiBoardList)){ $catAntiBoardList[] = $board['boardId']; } } } $data['exclude-boards'] = join(',', $catAntiBoardList); } if(isset($data['boards'])){ $boardList = explode(',', $data['boards']); foreach($boardList as $bk => &$b){ $b = intval($b); $getBoard = $this->get('forum_boards', $b, array('boardId', 'active')); if(!$getBoard OR $getBoard['active'] == 0){ unset($boardList[$bk]); continue; } } if(count($boardList) > 0){ $andFilters .= ' AND t.boardId IN('.join(',', $boardList).') '; } } if(isset($data['exclude-boards'])){ $antiboardList = explode(',', $data['exclude-boards']); foreach($antiboardList as $bk => &$b){ $b = intval($b); $getBoard = $this->get('forum_boards', $b, array('boardId', 'active')); if(!$getBoard OR $getBoard['active'] == 0 OR (isset($boardList) AND in_array($b, $boardList))){ unset($antiboardList[$bk]); continue; } $andFilters .= ' AND t.boardId != '.$b.' '; } } if(!isset($data['user'])){ $data['user'] = false; } $userFilters = $this->container->getBoardFilters($data['user']); if(count($userFilters['antifilters']) > 0){ foreach($userFilters['antifilters'] as &$filter){ $filter = intval($filter); $andFilters .= ' AND'; $andFilters .= ' t.boardId != '.$filter.' '; } } return $andFilters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_categories()\n {\n }", "public function validateData($mode)\r\n\t{\r\n\t\t$this->data;\r\n\t\tif(!is_array($this->data))\r\n\t\t{\r\n\t\t\t/* Critical Error */\r\n\t\t\tadd_log('critical', 'BIS_LOG_ERROR_FATAL_BOARDCLASS');\r\n\t\t\tglobal $user;\r\n\t\t\ttrigger_error($user->lang['BIS_ERROR_FATAL'], E_USER_WARNING);\r\n\t\t}\r\n\t\t\r\n\t\tglobal $settings, $db, $user;\r\n\t\t\r\n\t\t$settings['required_data'] = array(\r\n\t\t\t'board_name'\t\t\t\t=> true,\r\n\t\t\t'board_category'\t\t\t=> true,\r\n\t\t\t'board_url'\t\t\t\t\t=> true,\r\n\t\t\t'board_slug'\t\t\t\t=> true,\r\n\t\t\t'board_description'\t\t\t=> true,\r\n\t\t\t'board_logo_url'\t\t\t=> true,\r\n\t\t\t'board_software'\t\t\t=> true,\r\n\t\t\t'board_software_version'\t=> true,\r\n\t\t\t'board_status'\t\t\t\t=> true,\r\n\t\t);\r\n\t\t$settings['regex'] = array(\r\n\t\t\t'board_name'\t\t\t\t=> '/^.|\\s{5,50}$/',\r\n\t\t\t'board_slug'\t\t\t\t=> true,\r\n\t\t\t'board_description'\t\t\t=> true,\r\n\t\t\t'board_logo_url'\t\t\t=> true,\r\n\t\t\t'board_software'\t\t\t=> true,\r\n\t\t\t'board_software_version'\t=> true,\r\n\t\t\t'board_status'\t\t\t\t=> true,\r\n\t\t\t'board_total_posts'\t\t\t=> true,\r\n\t\t\t'board_total_topics'\t\t=> true,\r\n\t\t\t'board_total_members'\t\t=> true,\r\n\t\t);\r\n\t\t\r\n\t\tforeach($this->data as $key => $value)\r\n\t\t{\r\n\t\t\t/* Check if required fields arce filled in */\r\n\t\t\tif($settings['required_data'][$key] === true)\r\n\t\t\t{\r\n\t\t\t\t$errors[$key] = 'BIS_BOARD_DATA_ERROR_REQUIRED';\r\n\t\t\t}\r\n\t\t\t/* Check if all fields match their RegEx */\r\n\t\t\telseif($settings['regex'][$key] && !preg_match($settings['regex'][$key], $value)) {\r\n\t\t\t\t$errors[$key] = 'BIS_BOARD_DATA_ERROR_WRONG_FORMAT';\r\n\t\t\t}\r\n\t\t\tif(true)\r\n\t\t\treturn $errors;\r\n\t\t\t/* Check for dates */\r\n\t\t\tif(in_array($field, $settings['dates']))\r\n\t\t\t{\r\n\t\t\t\t$time_array = explode('-', $value);\r\n\t\t\t\tif(!is_numeric($time_array[0]) || !is_numeric($time_array[1]) || !is_numeric($time_array[2]) || sizeof($time_array) != 3)\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_DATE_SYNTAX'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t}\r\n\t\t\t\telseif(!checkdate($time_array[1], $time_array[2], $time_array[0]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_NOT_DATE'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t}\r\n\t\t\t\tunset($time_array);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t/* Check for colours */\r\n\t\t\tif(in_array($field, $settings['colours'])) {\r\n\t\t\t\t$value = str_replace('#', NULL, $value);\r\n\t\t\t\tif((strlen($value) != 6 && strlen($value) != 3) || !ctype_xdigit($value))\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_NOT_COLOUR'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Check for URLs */\r\n\t\t\tif(in_array($field, $settings['urls']))\r\n\t\t\t{\r\n\t\t\t\tif(!filter_var($value, FILTER_VALIDATE_URL))\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_NOT_URL'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Board Software Version */\r\n\t\t\tif($field == 'board_software_version')\r\n\t\t\t{\r\n\t\t\t\tif(isset($settings['software_versions'][$board_data['board_software']]))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!in_array($board_data[$field], $settings['software_versions'][$board_data['board_software']]) || !$board_data[$field])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_SOFTWARE_VERSION'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Numeric Fields */\r\n\t\t\tif(in_array($field, $settings['numbers']) && !is_numeric($value))\r\n\t\t\t{\r\n\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_NOT_NUMERIC'], $user->lang[strtoupper($field)]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Field lenghts */\r\n\t\t\tif($settings['lenghts'][$field])\r\n\t\t\t{\r\n\t\t\t\tif(strlen($value) > $settings['lenghts'][$field])\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_LENGHT'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Users */\r\n\t\t\tif(in_array($field, $settings['users']))\r\n\t\t\t{\r\n\t\t\t\t$sql = \"SELECT user_id\r\n\t\t\t\t\t\tFROM \" . USERS_TABLE . \"\r\n\t\t\t\t\t\tWHERE username_clean = '\" . $db->sql_escape(utf8_clean_string($value)) . \"'\";\r\n\t\t\t\t$result = $db->sql_query($sql);\r\n\t\t\t\t$row = $db->sql_fetchrow($result);\r\n\t\t\t\tif(!$row['user_id'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_USERNAME'], $user->lang[strtoupper($field)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Board Status */\r\n\t\t\tif($field == 'board_status' && !in_array($value, $settings['statuses'])) {\r\n\t\t\t\t$errors[] = sprintf($user->lang['BD_ERROR_STATUS'], $user->lang[strtoupper($field)]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$board_data[$field] = $value;\r\n\t\t}\r\n\t\t\r\n\t\t$this->data = $board_data;\r\n\t\t\r\n\t\t/* Return all occurred errors */\r\n\t\treturn $errors;\r\n\t}", "function _data_collections() {\n session_write_close();\n \n $this->profile('starting dc page');\n #if (!$this->has_arg('visit') &&\n # !($this->has_arg('sid') && $this->arg('prop')) &&\n # !($this->has_arg('pjid') && $this->arg('prop')))\n # $this->_error('No visit, sample, or project specified');\n \n if (!($this->has_arg('visit') || $this->has_arg('prop'))) $this->_error('No visit or proposal specified');\n \n $args = array();\n \n $where = '';\n $where2 = '';\n $where3 = '';\n $where4 = '';\n \n $sess = array();\n \n # Extra joins\n $extj = array('','','','');\n # Extra columns\n $extc = '';\n \n \n # Filter by types\n if ($this->has_arg('t')) {\n $where = ' AND dc.datacollectionid < 0';\n $where2 = ' AND es.energyscanid < 0';\n $where3 = ' AND r.robotactionid < 0';\n $where4 = ' AND xrf.xfefluorescencespectrumid < 0';\n \n if ($this->arg('t') == 'dc' || $this->arg('t') == 'sc' || $this->arg('t') == 'fc' || $this->arg('t') == 'gr') {\n \n $where = '';\n if ($this->arg('t') == 'sc') $where = ' AND dc.overlap != 0';\n else if ($this->arg('t') == 'gr') $where = ' AND dc.axisrange = 0';\n else if ($this->arg('t') == 'fc') $where = ' AND dc.overlap = 0 AND dc.axisrange > 0';\n \n } else if ($this->arg('t') == 'ed') {\n $where2 = '';\n \n } else if ($this->arg('t') == 'fl') {\n $where4 = '';\n \n } else if ($this->arg('t') == 'rb') {\n $where3 = \" AND (r.actiontype LIKE 'LOAD' OR r.actiontype LIKE 'UNLOAD' OR r.actiontype LIKE 'DISPOSE')\";\n \n } else if ($this->arg('t') == 'ac') {\n $where3 = \" AND (r.actiontype NOT LIKE 'LOAD' AND r.actiontype NOT LIKE 'UNLOAD' AND r.actiontype NOT LIKE 'DISPOSE')\";\n \n } else if ($this->arg('t') == 'flag') {\n $where = \" AND dc.comments LIKE '%_FLAG_%'\";\n $where2 = \" AND es.comments LIKE '%_FLAG_%'\";\n $where4 = \" AND xrf.comments LIKE '%_FLAG_%'\";\n \n } else if ($this->arg('t') == 'ap') {\n $where = '';\n $extj[0] .= 'INNER JOIN ispyb4a_db.autoprocintegration ap ON dc.datacollectionid = ap.datacollectionid';\n }\n }\n \n \n # Pagination\n $start = 0;\n $end = 10;\n $pp = $this->has_arg('pp') ? $this->arg('pp') : 15;\n \n if ($this->has_arg('page')) {\n $pg = $this->arg('page') - 1;\n $start = $pg*$pp;\n $end = $pg*$pp+$pp;\n }\n\n \n # Check that whatever we are looking for actually exists\n $info = array();\n # Visits\n if ($this->has_arg('visit')) {\n $info = $this->db->pq(\"SELECT TO_CHAR(s.startdate, 'HH24') as sh, TO_CHAR(s.startdate, 'DDMMYYYY') as dmy, s.sessionid, s.beamlinename as bl FROM ispyb4a_db.blsession s INNER JOIN ispyb4a_db.proposal p ON (p.proposalid = s.proposalid) WHERE p.proposalcode || p.proposalnumber || '-' || s.visit_number LIKE :1\", array($this->arg('visit')));\n \n if (!sizeof($info)) {\n $this->_error('No such visit');\n } else $info = $info[0];\n \n $sess = array('dc.sessionid=:1', 'es.sessionid=:2', 'r.blsessionid=:3', 'xrf.sessionid=:4');\n for ($i = 0; $i < 4; $i++) array_push($args, $info['SESSIONID']);\n \n # Samples\n } else if ($this->has_arg('sid') && $this->has_arg('prop')) {\n $info = $this->db->pq(\"SELECT s.blsampleid FROM ispyb4a_db.blsample s INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = s.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid INNER JOIN ispyb4a_db.proposal p ON p.proposalid = pr.proposalid WHERE s.blsampleid=:1 AND p.proposalcode || p.proposalnumber LIKE :2\", array($this->arg('sid'), $this->arg('prop')));\n \n //$extj[1] .= ' INNER JOIN blsample_has_energyscan be ON be.energyscanid = es.energyscanid';\n //$tables2 = array('dc', 'be', 'r', 'xrf');\n $tables2 = array('dc', 'bes', 'r', 'xrf');\n foreach ($tables2 as $i => $t) $sess[$i] = $t.'.blsampleid=:'.($i+1);\n for ($i = 0; $i < 4; $i++) array_push($args, $this->arg('sid'));\n \n # Projects\n } else if ($this->has_arg('pjid')) {\n $info = $this->db->pq('SELECT p.title FROM ispyb4a_db.project p LEFT OUTER JOIN ispyb4a_db.project_has_user pu ON pu.projectid = p.projectid WHERE p.projectid=:1 AND (p.owner=:2 or pu.username=:3)', array($this->arg('pjid'), phpCAS::getUser(), phpCAS::getUser()));\n \n //$extc = 'bls.name as sample,bls.blsampleid,';\n $tables = array(array('project_has_dcgroup', 'dc', 'datacollectiongroupid'),\n array('project_has_energyscan', 'es', 'energyscanid'),\n array('project_has_session', 'r', 'blsessionid', 'sessionid'),\n array('project_has_xfefspectrum', 'xrf', 'xfefluorescencespectrumid'),\n );\n\n foreach ($tables as $i => $t) {\n $ct = sizeof($t) == 4 ? $t[3] : $t[2];\n \n # Fucking inconsistencies!\n /*$smp = $t[1] == 'es' ? \" LEFT OUTER JOIN blsample_has_energyscan she ON she.energyscanid = es.energyscanid LEFT OUTER JOIN ispyb4a_db.blsample bls ON bls.blsampleid = she.blsampleid\"\n : \" LEFT OUTER JOIN ispyb4a_db.blsample bls ON bls.blsampleid = $t[1].blsampleid\";\n\n $extj[$i] .= \" LEFT OUTER JOIN ispyb4a_db.$t[0] prj ON $t[1].$t[2] = prj.$ct $smp\";*/\n $extj[$i] .= \" LEFT OUTER JOIN ispyb4a_db.$t[0] prj ON $t[1].$t[2] = prj.$ct\";\n $sess[$i] = 'prj.projectid=:'.($i+1);\n \n if ($this->has_arg('imp')) {\n if ($this->arg('imp')) {\n # Extra linker table needed for energy scans :(\n /*$ij = $t[1] == 'es' ? \"LEFT OUTER JOIN ispyb4a_db.blsample_has_energyscan bes ON $t[1].$t[2] = bes.$t[2] LEFT OUTER JOIN ispyb4a_db.blsample smp ON bes.blsampleid = smp.blsampleid\"\n : \"LEFT OUTER JOIN ispyb4a_db.blsample smp ON $t[1].blsampleid = smp.blsampleid\";\n $ij */\n $extj[$i] .= \" LEFT OUTER JOIN ispyb4a_db.crystal cr ON cr.crystalid = smp.crystalid LEFT OUTER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid LEFT OUTER JOIN ispyb4a_db.project_has_protein prj2 ON prj2.proteinid = pr.proteinid LEFT OUTER JOIN ispyb4a_db.project_has_blsample prj3 ON prj3.blsampleid = smp.blsampleid\";\n $sess[$i] = '(prj.projectid=:'.($i*3+1).' OR prj2.projectid=:'.($i*3+2).' OR prj3.projectid=:'.($i*3+3).')';\n }\n }\n }\n \n \n $n = 4;\n if ($this->has_arg('imp'))\n if ($this->arg('imp')) $n = 12;\n for ($i = 0; $i < $n; $i++) array_push($args, $this->arg('pjid'));\n \n \n # Proteins\n } else if ($this->has_arg('pid')) {\n $info = $this->db->pq(\"SELECT proteinid FROM ispyb4a_db.protein p WHERE p.proteinid=:1\", array($this->arg('pid')));\n //$extc = 'smp.name as sample,smp.blsampleid,';\n \n foreach (array('dc', 'es', 'r', 'xrf') as $i => $t) {\n /*if ($t == 'r') {\n $sess[$i] = 'r.robotactionid < 0';\n $extj[$i] = \"INNER JOIN ispyb4a_db.blsample smp ON r.blsampleid = smp.blsampleid\";\n \n } else {\n $ij = $t == 'es' ? \"INNER JOIN ispyb4a_db.blsample_has_energyscan bes ON $t.energyscanid = bes.energyscanid INNER JOIN ispyb4a_db.blsample smp ON bes.blsampleid = smp.blsampleid\"\n : \"INNER JOIN ispyb4a_db.blsample smp ON $t.blsampleid = smp.blsampleid\";\n \n $extj[$i] .= \" $ij INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = smp.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid\";*/\n $extj[$i] .= \" INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = smp.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid\";\n $sess[$i] = 'pr.proteinid=:'.(sizeof($args)+1);\n array_push($args, $this->arg('pid'));\n //}\n }\n \n # Proposal\n } else if ($this->has_arg('prop')) {\n $info = $this->db->pq('SELECT proposalid FROM ispyb4a_db.proposal p WHERE p.proposalcode || p.proposalnumber LIKE :1', array($this->arg('prop')));\n \n for ($i = 0; $i < 4; $i++) {\n $sess[$i] = 'ses.proposalid=:'.($i+1);\n array_push($args, $this->proposalid);\n }\n }\n \n if (!sizeof($info)) $this->_error('The specified visit, sample, or project doesnt exist');\n \n \n # Filter by time for visits\n if (($this->has_arg('h') && ($this->has_arg('visit') || $this->has_arg('dmy'))) || $this->has_arg('dmy')) {\n $where .= \"AND dc.starttime > TO_DATE(:\".(sizeof($args)+1).\", 'HH24:MI:SS DDMMYYYY') AND dc.starttime < TO_DATE(:\".(sizeof($args)+2).\", 'HH24:MI:SS DDMMYYYY')\";\n $where2 .= \"AND es.starttime > TO_DATE(:\".(sizeof($args)+3).\", 'HH24:MI:SS DDMMYYYY') AND es.starttime < TO_DATE(:\".(sizeof($args)+4).\", 'HH24:MI:SS DDMMYYYY')\";\n $where3 .= \"AND r.starttimestamp > TO_DATE(:\".(sizeof($args)+5).\", 'HH24:MI:SS DDMMYYYY') AND r.starttimestamp < TO_DATE(:\".(sizeof($args)+6).\", 'HH24:MI:SS DDMMYYYY')\";\n $where4 .= \"AND xrf.starttime > TO_DATE(:\".(sizeof($args)+7).\", 'HH24:MI:SS DDMMYYYY') AND xrf.starttime < TO_DATE(:\".(sizeof($args)+8).\", 'HH24:MI:SS DDMMYYYY')\";\n \n if ($this->has_arg('dmy')) {\n $my = $this->arg('dmy');\n } else {\n $my = $info['DMY'];\n if ($this->arg('h') < $info['SH']) {\n $sd = mktime(0,0,0,substr($my,2,2), substr($my,0,2), substr($my,4,4))+(3600*24);\n $my = date('dmY', $sd);\n }\n }\n \n \n if ($this->has_arg('h')) {\n $st = $this->arg('h').':00:00 ';\n $en = $this->arg('h').':59:59 ';\n } else {\n $st = '00:00:00';\n $en = '23:59:59 ';\n }\n \n for ($i = 0; $i < 4; $i++) {\n array_push($args, $st.$my);\n array_push($args, $en.$my);\n }\n }\n \n \n # If not staff check they have access to data collection\n if (!$this->has_arg('visit') && !$this->staff) {\n $where .= \" AND u.name=:\".(sizeof($args)+1);\n $where2 .= \" AND u.name=:\".(sizeof($args)+2);\n $where3 .= \" AND u.name=:\".(sizeof($args)+3);\n $where4 .= \" AND u.name=:\".(sizeof($args)+4);\n \n for ($i = 0; $i < 4; $i++) {\n $extj[$i] .= \" INNER JOIN ispyb4a_db.proposal p ON p.proposalid = ses.proposalid INNER JOIN investigation@DICAT_RO i ON lower(i.visit_id) LIKE p.proposalcode||p.proposalnumber||'-'||ses.visit_number INNER JOIN investigationuser@DICAT_RO iu on i.id = iu.investigation_id INNER JOIN user_@DICAT_RO u on u.id = iu.user_id\";\n array_push($args, phpCAS::getUser());\n }\n }\n \n \n \n # View a single data collection\n if ($this->has_arg('id')) {\n $st = sizeof($args)+1;\n $where .= ' AND dc.datacollectionid=:'.$st;\n $where3 .= ' AND r.robotactionid=:'.($st+1);\n $where2 .= ' AND es.energyscanid=:'.($st+2);\n $where4 .= ' AND xrf.xfefluorescencespectrumid=:'.($st+3);\n for ($i = 0; $i < 4; $i++) array_push($args, $this->arg('id'));\n }\n\n \n # Search terms\n if ($this->has_arg('s')) {\n $st = sizeof($args) + 1;\n $where .= \" AND (lower(dc.filetemplate) LIKE lower('%'||:$st||'%') OR lower(dc.imagedirectory) LIKE lower('%'||:\".($st+1).\"||'%') OR lower(smp.name) LIKE lower('%'||:\".($st+2).\"||'%'))\";\n $where2 .= \" AND (lower(es.comments) LIKE lower('%'||:\".($st+3).\"||'%') OR lower(es.element) LIKE lower('%'||:\".($st+4).\"||'%') OR lower(smp.name) LIKE lower('%'||:\".($st+5).\"||'%'))\";\n $where3 .= ' AND r.robotactionid < 0';\n $where4 .= \" AND (lower(xrf.filename) LIKE lower('%'||:\".($st+6).\"||'%') OR lower(smp.name) LIKE lower('%'||:\".($st+7).\"||'%'))\";\n \n for ($i = 0; $i < 8; $i++) array_push($args, $this->arg('s'));\n }\n \n $tot = $this->db->pq(\"SELECT sum(tot) as t FROM (SELECT count(dc.datacollectionid) as tot FROM ispyb4a_db.datacollection dc\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = dc.sessionid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON dc.blsampleid = smp.blsampleid\n $extj[0]\n WHERE $sess[0] $where\n \n UNION SELECT count(es.energyscanid) as tot FROM ispyb4a_db.energyscan es\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = es.sessionid\n LEFT OUTER JOIN ispyb4a_db.blsample_has_energyscan bes ON es.energyscanid = bes.energyscanid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON bes.blsampleid = smp.blsampleid\n $extj[1]\n WHERE $sess[1] $where2\n \n UNION SELECT count(xrf.xfefluorescencespectrumid) as tot from ispyb4a_db.xfefluorescencespectrum xrf\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = xrf.sessionid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON xrf.blsampleid = smp.blsampleid\n $extj[3]\n WHERE $sess[3] $where4\n \n UNION SELECT count(r.robotactionid) as tot FROM ispyb4a_db.robotaction r\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = r.blsessionid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON r.blsampleid = smp.blsampleid\n $extj[2]\n WHERE $sess[2] $where3)\", $args);\n $tot = $tot[0]['T'];\n \n $this->profile('after page count');\n \n $pgs = intval($tot/$pp);\n if ($tot % $pp != 0) $pgs++;\n\n $st = sizeof($args) + 1;\n array_push($args, $start);\n array_push($args, $end);\n\n $q = \"SELECT outer.*\n FROM (SELECT ROWNUM rn, inner.*\n FROM (\n SELECT $extc smp.name as sample,smp.blsampleid, ses.visit_number as vn, dc.kappastart as kappa, dc.phistart as phi, dc.startimagenumber as si, dc.experimenttype as dct, dc.datacollectiongroupid as dcg, dc.runstatus, dc.beamsizeatsamplex as bsx, dc.beamsizeatsampley as bsy, dc.overlap, 1 as flux, 1 as scon, 'a' as spos, 'a' as san, 'data' as type, dc.imageprefix as imp, dc.datacollectionnumber as run, dc.filetemplate, dc.datacollectionid as id, dc.numberofimages as ni, dc.imagedirectory as dir, dc.resolution, dc.exposuretime, dc.axisstart, dc.numberofimages as numimg, TO_CHAR(dc.starttime, 'DD-MM-YYYY HH24:MI:SS') as st, dc.transmission, dc.axisrange, dc.wavelength, dc.comments, 1 as epk, 1 as ein, dc.xtalsnapshotfullpath1 as x1, dc.xtalsnapshotfullpath2 as x2, dc.xtalsnapshotfullpath3 as x3, dc.xtalsnapshotfullpath4 as x4, dc.starttime as sta, dc.detectordistance as det, dc.xbeam, dc.ybeam FROM ispyb4a_db.datacollection dc\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = dc.sessionid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON dc.blsampleid = smp.blsampleid\n $extj[0]\n WHERE $sess[0] $where\n \n UNION\n SELECT $extc smp.name as sample,smp.blsampleid, ses.visit_number as vn, 1,1,1,'A',1,'A',1,1,1, 1, 1 as scon, 'A' as spos, 'A' as sn, 'edge' as type, es.jpegchoochfilefullpath, 1, es.scanfilefullpath, es.energyscanid, 1, es.element, es.peakfprime, es.exposuretime, es.peakfdoubleprime, 1, TO_CHAR(es.starttime, 'DD-MM-YYYY HH24:MI:SS') as st, es.transmissionfactor, es.inflectionfprime, es.inflectionfdoubleprime, es.comments, es.peakenergy, es.inflectionenergy, 'A', 'A', 'A', 'A', es.starttime as sta, 1, 1, 1 FROM ispyb4a_db.energyscan es\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = es.sessionid\n LEFT OUTER JOIN ispyb4a_db.blsample_has_energyscan bes ON es.energyscanid = bes.energyscanid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON bes.blsampleid = smp.blsampleid\n $extj[1]\n WHERE $sess[1] $where2\n \n UNION\n SELECT $extc smp.name as sample,smp.blsampleid, ses.visit_number as vn, 1,1,1,'A',1,'A',1,1,1, 1, 1, 'A', 'A', 'mca' as type, 'A', 1, 'A', xrf.xfefluorescencespectrumid, 1, xrf.filename, 1, xrf.exposuretime, 1, 1, TO_CHAR(xrf.starttime, 'DD-MM-YYYY HH24:MI:SS') as st, xrf.beamtransmission, 1, xrf.energy, xrf.comments, 1, 1, 'A', 'A', 'A', 'A', xrf.starttime as sta, 1, 1, 1 FROM ispyb4a_db.xfefluorescencespectrum xrf\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = xrf.sessionid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON xrf.blsampleid = smp.blsampleid \n $extj[3]\n WHERE $sess[3] $where4\n \n UNION\n SELECT $extc smp.name as sample,smp.blsampleid, ses.visit_number as vn, 1,1,1,'A',1,'A',ROUND((CAST(r.endtimestamp AS DATE)-CAST(r.starttimestamp AS DATE))*86400, 1),1,1, 1, 1, r.status, r.message, 'load' as type, r.actiontype, 1, 'A', r.robotactionid, 1, r.samplebarcode, r.containerlocation, r.dewarlocation, 1, 1, TO_CHAR(r.starttimestamp, 'DD-MM-YYYY HH24:MI:SS') as st, 1, 1, 1, 'A', 1, 1, 'A', 'A', 'A', 'A', r.starttimestamp as sta, 1, 1, 1 FROM ispyb4a_db.robotaction r\n INNER JOIN ispyb4a_db.blsession ses ON ses.sessionid = r.blsessionid\n LEFT OUTER JOIN ispyb4a_db.blsample smp ON r.blsampleid = smp.blsampleid\n $extj[2]\n WHERE $sess[2] $where3\n \n \n ORDER BY sta DESC\n \n ) inner) outer\n WHERE outer.rn > :$st AND outer.rn <= :\".($st+1);\n \n $dcs = $this->db->pq($q, $args);\n $this->profile('main query'); \n \n foreach ($dcs as $i => &$dc) {\n $dc['SN'] = 0;\n $dc['DI'] = 0;\n \n if ($this->has_arg('sid') || $this->has_arg('pjid')) $dc['VIS'] = $this->arg('prop').'-'.$dc['VN'];\n \n \n // Data collections\n if ($dc['TYPE'] == 'data') {\n $nf = array(1 => array('AXISSTART'), 2 => array('RESOLUTION', 'TRANSMISSION', 'AXISRANGE'), 3 => array('EXPOSURETIME'), 4 => array('WAVELENGTH'));\n $dc['DIR'] = preg_replace('/.*\\/\\d\\d\\d\\d\\/\\w\\w\\d+-\\d+\\//', '', $dc['DIR']);\n \n $dc['BSX'] = round($dc['BSX']*1000);\n $dc['BSY'] = round($dc['BSY']*1000);\n \n if (!$dc['DCT']) {\n if ($dc['AXISRANGE'] == 0) $dc['DCT'] = 'Still Image';\n if ($dc['AXISRANGE'] == 0 && $dc['NI'] > 1) $dc['DCT'] = 'Grid Scan';\n if ($dc['OVERLAP'] != 0) $dc['DCT'] = 'Screening';\n if ($dc['AXISRANGE'] > 0 && $dc['OVERLAP'] == 0) $dc['DCT'] = 'Data Collection';\n }\n \n //$this->profile('dc');\n \n // Edge Scans\n } else if ($dc['TYPE'] == 'edge') {\n $dc['EPK'] = floatVal($dc['EPK']);\n $dc['EIN'] = floatVal($dc['EIN']);\n \n # Transmission factor rather than transmission :(\n $dc['TRANSMISSION'] *= 100;\n \n $dc['FILETEMPLATE'] = preg_replace('/.*\\/\\d\\d\\d\\d\\/\\w\\w\\d+-\\d+\\//', '', $dc['FILETEMPLATE']);\n \n $nf = array(2 => array('EXPOSURETIME'), 2 => array('AXISSTART', 'RESOLUTION', 'TRANSMISSION'));\n $this->profile('edge'); \n \n // MCA Scans\n } else if ($dc['TYPE'] == 'mca') {\n # -- Move to ajax\n /*$results = str_replace('.mca', '.results.dat', preg_replace('/(data\\/\\d\\d\\d\\d\\/\\w\\w\\d+-\\d+)/', '\\1/processed/pymca', $dc['DIR']));\n \n $elements = array();\n if (file_exists($results)) {\n $dat = explode(\"\\n\",file_get_contents($results));\n foreach ($dat as $i => $d) {\n if ($i < 5) array_push($elements, $d);\n }\n }\n \n $dc['ELEMENTS'] = $elements;*/\n $nf = array(2 => array('EXPOSURETIME', 'WAVELENGTH', 'TRANSMISSION'));\n \n // Robot loads\n } else if ($dc['TYPE'] == 'load') $nf = array();\n \n \n $dc['AP'] = array(0,0,0,0,0,0,0,0);\n \n foreach ($nf as $nff => $cols) {\n foreach ($cols as $c) {\n $dc[$c] = number_format($dc[$c], $nff);\n }\n }\n \n }\n \n $this->profile('processing');\n if ($this->has_arg('single')) $this->_output($dcs[0]);\n else $this->_output(array($pgs, $dcs));\n }", "public function categoryProcess(&$vars, $request)\n {\n $member = $this->getLoggedInMember();\n if (isset($request[2])) {\n switch ($request[2]) {\n case 'edit':\n if (!$this->isUserBlogCategory($member->id, $request[3])) {\n $vars['errors'] = array('nameinvalid');\n return false;\n }\n if (!isset($vars['n']) || strcmp($vars['n'], '')==0) {\n $vars['errors'] = array('nameempty');\n return false;\n }\n $query = '\nSELECT COUNT(*)\nFROM `blog_categories`\nWHERE IdMember = '.$member->id.' AND `name` = \\''.$this->dao->escape($vars['n']).'\\'\n';\n $s = $this->dao->query($query);\n if (!$s) {\n $vars['errors'] = array('upderror');\n return false;\n }\n if ($s->fetchColumn(0) != 0) {\n $vars['errors'] = array('namedupe');\n return false;\n }\n\n $query = '\n UPDATE `blog_categories`\n SET `name` = \\''.$this->dao->escape($vars['n']).'\\'\n WHERE `blog_category_id` = '.(int)$request[3].'\n ';\n $s = $this->dao->query($query);\n if (!$s) {\n $vars['errors'] = array('upderror');\n return false;\n }\n break;\n\n\n case 'del':\n if (isset($vars['no']))\n {\n return true;\n }\n if (!$this->isUserBlogCategory($member->id, $request[3])) {\n $vars['errors'] = array('invalid');\n return false;\n }\n $query = '\n DELETE FROM `blog_categories`\n WHERE `blog_category_id` = '.(int)$request[3].'\n ';\n $s = $this->dao->query($query);\n if (!$s) {\n $vars['errors'] = array('delerror');\n return false;\n }\n break;\n }\n } else { // !isset($request[2])\n if (!isset($vars['n']) || strcmp($vars['n'], '')==0) {\n $vars['errors'] = array('name');\n return false;\n }\n $query = '\nSELECT COUNT(*)\nFROM `blog_categories`\nWHERE IdMember = '.$member->id.' AND `name` = \\''.$this->dao->escape($vars['n']).'\\'\n';\n $s = $this->dao->query($query);\n if (!$s) {\n $vars['errors'] = array('inserror');\n return false;\n }\n if ($s->fetchColumn(0) != 0) {\n $vars['errors'] = array('namedupe');\n return false;\n }\n\n $query = '\nINSERT INTO `blog_categories`\nSET\n`blog_category_id` = '.$this->dao->nextId('blog_categories').',\n `name` = \\''.$this->dao->escape($vars['n']).'\\',\n IdMember = '.$member->id.'\n ';\n $s = $this->dao->query($query);\n if (!$s) {\n $vars['errors'] = array('inserror');\n return false;\n }\n }\n\n return true;\n }", "private static function _compile_data() {\n\n\t\tself::_set_platform();\n\n\t\tforeach (array('_set_robot', '_set_browser', '_set_mobile') as $function)\n\t\t{\n\t\t\tif (self::$function() === TRUE)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public final function grabBoards()\n {\n global $db;\n \n $result = $db->query('\n SELECT cat_id, name\n FROM {db_prefix}categories\n ORDER BY cat_order ASC');\n \n $categories = array();\n while ($row = $db->fetch_assoc($result))\n {\n $categories[$row['cat_id']] = array(\n \t'id' => $row['cat_id'],\n 'name' => $row['name'],\n 'boards' => array()\n );\n }\n \n $db->free_result($result);\n \n // And for the boards.\n $result = $db->query('\n SELECT board_id, name, description, num_posts, num_topics, category_id, board_order, permissions, last_post\n FROM {db_prefix}boards\n ORDER BY board_order ASC');\n \n $boards = array();\n while ($row = $db->fetch_assoc($result))\n {\n if (!isset($categories[$row['category_id']]))\n continue;\n \n $this->boards[$row['board_id']] = $row;\n \n // If we don't have permissions to view this board, skip it.\n if (!$this->checkBoardPermissions($row['board_id']))\n {\n \tunset($this->boards[$row['board_id']]);\n \tcontinue;\n }\n\t\t\t\n\t\t\t// If there is a last post, grab it.\n\t\t\t$data = $this->grabBoardLastPost($row['last_post'], $row['board_id']);\n \n $categories[$row['category_id']]['boards'][$row['board_order']] = $row;\n\t\t\t$categories[$row['category_id']]['boards'][$row['board_order']]['last_post'] = $data;\n }\n \n $db->free_result($result);\n \n $this->categories = array_filter($categories);\n \n return true;\n }", "function aDBc_prepare_elements_to_clean(){\n\n\t\tglobal $wpdb;\n\n\t\t// Process bulk action if any before preparing feeds to clean\n\t\t$this->process_bulk_action();\n\n\t\tif(function_exists('is_multisite') && is_multisite()){\n\t\t\t$blogs_ids = $wpdb->get_col(\"SELECT blog_id FROM $wpdb->blogs\");\n\t\t\tforeach($blogs_ids as $blog_id){\n\n\t\t\t\tswitch_to_blog($blog_id);\n\n\t\t\t\t$this->aDBc_fill_array_elements_to_clean($blog_id);\n\n\t\t\t\trestore_current_blog();\n\t\t\t}\n\t\t}else{\n\n\t\t\t$this->aDBc_fill_array_elements_to_clean(\"1\");\n\t\t}\n\t\t// Call WP prepare_items function\n\t\t$this->prepare_items();\n\t}", "public function doProcessing()\n\t{\n\t\tglobal $NTvTlevel1,$NTvTlevel2,$NTvTlevel3,$NTvTlevel4,$NTvTlevel5,$NTvTlevel6;\n\n $maxLimit=configVariables::$maxLimit;\n $queryLimit=$maxLimit;\n $loginDtRelax1=configVariables::$loginDtRelax1;\n $loginDtRelax2=configVariables::$loginDtRelax2;\n\t\t$dayOfRelaxation=configVariables::$use60DaysRelaxOnDay;\n\n if($this->receiverObj->getSwitchToDpp()==1)\n {\n $canUseRelaxation=0;\n }\n else\n {\n $relaxlheight=$this->filterBean->getLheightRelax();\n $relaxhheight=$this->filterBean->getHheightRelax();\n $relaxlage=$this->filterBean->getLageRelax();\n $relaxhage=$this->filterBean->getHageRelax();\n $canUseRelaxation=$this->filterBean->getCanUseRelaxation();\n }\n \t$dppCasteVal = $this->filterBean->getCaste();\n\n\t\t$NTvTlevel1++;\n\t\t$this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax1,1,'','','','','','','',$this->communityModelLogic);\n\t\tif($this->profileSetTemp && !$this->communityModelLogic)\n\t\t\t$this->processResults($queryLimit);\n\t\tunset($this->profileSetTemp);\n\n //------\n if(count($this->profileSet)>0)\n {\n $levelCount=count($this->profileSet);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='211';\n\t\t\t\telse\n \t$this->logicLevel[]='21';\n $levelCount--;\n }\n }\n //------\n\n\t\tif($canUseRelaxation && count($this->profileSet) <$maxLimit)//Relaxed forward only 15 days\n\t\t{\n\t\t\t$NTvTlevel5++;\n\t\t\t$queryLimit=$maxLimit-count($this->profileSet);\n \n\t\t\t$this->filterBean->setLheight(intval($this->filterBean->getLheight())-$relaxlheight);\n\t\t\t$this->filterBean->setHheight(intval($this->filterBean->getHheight())+$relaxhheight);\n\t\t\t$this->filterBean->setLage(intval($this->filterBean->getLAge())-$relaxlage);\n\t\t\t$this->filterBean->setHage(intval($this->filterBean->getHAge())+$relaxhage);\n\t\t\t$this->setCasteRelaxation($this->receiverObj->getRecCaste(),$this->filterBean);\n\n\t\t\t$this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax1,1,1,$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);//1,1 was 1,0 PHASE2\n\t\t\tif($this->profileSetTemp)\n\t\t\t\t$this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='221';\n\t\t\t\telse\n \t$this->logicLevel[]='22';\n $levelCount--;\n }\n //------\n\t\t}\n\n\t\tif(count($this->profileSet) <$maxLimit)//Relaxed forward only 60days\n {\n\t\t\t$NTvTlevel6++;\n $queryLimit=$maxLimit-count($this->profileSet);\n $this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax2,1,1,$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);//1,1 was 1,0 PHASE2\n if($this->profileSetTemp)\n $this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='231';\n\t\t\t\telse\n \t$this->logicLevel[]='23';\n $levelCount--;\n }\n //------\n\n }\n\n\t\t$gap=configVariables::getNoOfDays();\n\t\tif($gap%7==$dayOfRelaxation)\n\t\t{\n if(count($this->profileSet) <$maxLimit)//Relaxed forward only + no_login_dt\n {\n $NTvTlevel6++;\n $queryLimit=$maxLimit-count($this->profileSet);\n\n\t\t\t\tif($canUseRelaxation)\n {\n\t\t\t\t\t$this->filterBean->setLheight(intval($this->filterBean->getLheight())-$relaxlheight);\n\t\t\t\t\t$this->filterBean->setHheight(intval($this->filterBean->getHheight())+$relaxhheight);\n\t\t\t\t\t$this->filterBean->setLage(intval($this->filterBean->getLAge())-$relaxlage);\n\t\t\t\t\t$this->filterBean->setHage(intval($this->filterBean->getHAge())+$relaxhage);\n\t\t\t\t\t$this->setCasteRelaxation($this->receiverObj->getRecCaste(),$this->filterBean);\n\t\t\t\t}\n\n $this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,'',1,'',$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);\n if($this->profileSetTemp)\n $this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='241';\n\t\t\t\t\telse\n \t$this->logicLevel[]='24';\n $levelCount--;\n }\n //------\n }\n }\n\n if(count($this->profileSet)<$maxLimit)//NT PROFILEIS NOT SENT\n {\n\t\t\t//NEED TO IMPLEMENT LATER\n }\n if(count($this->profileSet)<$maxLimit)\n {\n\t\t\t//TRACKING CODE\n }\n if(count($this->profileSet))\n $this->logRecords($this->profileSet,$this->receiverObj->getPartnerProfile()->getProfileId(),$this->db,configVariables::$strategyNtVsTLogic,$this->logicLevel,$this->frequency);\n else\n\t\t{\n $gap=configVariables::getNoOfDays();\n $zeropid=$this->receiverObj->getPartnerProfile()->getProfileId();\n $sql_y=\"INSERT INTO matchalerts.ZERONTvT(PROFILEID,DATE) VALUES($zeropid,$gap)\";\n mysql_query($sql_y,$this->db) or logerror1(\"In matchalert_mailer.php\",$sql_y);\n ;// some tarck for 0 res\n\t\t}\n\n\t}", "static function handle_categories(){\n\t\treturn self::check_categories();\n\t}", "public function getOkcsData() {\n $filters = json_decode($this->input->post('filters'), true);\n if (strlen($this->input->post('doc_id')) !== 0) {\n $this->getIMContent();\n }\n else if (strlen($this->input->post('clickThruLink')) !== 0) {\n $this->clickThru();\n }\n else if($filters['isRecommendations']['value'] !== null) {\n $this->browseRecommendations();\n }\n else if($filters['channelRecordID']['value'] !== null || $filters['currentSelectedID']['value'] !== null || strlen($this->input->post('answerListApiVersion')) !== 0) {\n $this->browseArticles();\n }\n else if (strlen($this->input->post('deflected')) !== 0) {\n $this->getContactDeflectionResponse();\n }\n else if (strlen($this->input->post('categoryId')) !== 0) {\n $this->getChildCategories();\n }\n else if (strlen($this->input->post('contentType')) !== 0) {\n $this->getMoreProdCat();\n }\n else if (strlen($this->input->post('surveyRecordID')) !== 0) {\n $this->submitRating();\n }\n else if (strlen($this->input->post('rating')) !== 0) {\n $this->submitSearchRating();\n }\n else if ($this->input->post('action') === 'Unsubscribe') {\n $this->unsubscribeAnswer();\n }\n else if ($this->input->post('action') === 'Subscribe') {\n $this->addSubscription();\n }\n else if ($this->input->post('noOfSuggestions') !== 0) {\n $this->getUpdatedRecentSearches();\n }\n }", "protected function process_data() {\n if (empty($this->loaded->{$this->list_name})) {\n $this->loaded = NULL;\n $this->processed = array();\n return TRUE;\n }\n\n $this->processed = array();\n foreach ($this->loaded->{$this->list_name} as $item) {\n // require the id.\n if (!property_exists($item, 'id') || !is_numeric($item->id)) {\n continue;\n }\n\n // require the catalog id.\n if (!property_exists($item, 'catalog-id') || !is_numeric($item->{'catalog-id'})) {\n continue;\n }\n\n // require the legacy id.\n if (!property_exists($item, 'legacy-id') || !is_numeric($item->{'legacy-id'})) {\n continue;\n }\n\n // require the name string to exist and be non-empty.\n if (empty($item->name) || !is_string($item->name)) {\n continue;\n }\n\n // require the prefix to exist and be non-empty.\n if (empty($item->prefix) || !is_string($item->prefix)) {\n continue;\n }\n\n // require the code to exist and be non-empty.\n if (empty($item->code) || !is_string($item->code)) {\n continue;\n }\n\n // require the url to exist and be non-empty.\n if (empty($item->url) || !is_string($item->url)) {\n continue;\n }\n\n // the status object must exists\n if (!property_exists($item, 'status') || !is_object($item->status)) {\n continue;\n }\n\n // ignore inactive items.\n if (property_exists($item->status, 'active') && !$item->status->active) {\n continue;\n }\n\n $entry = new stdClass();\n $entry->id = (int) $item->id;\n $entry->catalog_id = $item->{'catalog-id'};\n $entry->legacy_id = (int) $item->{'legacy-id'};\n\n $entry->name = $item->name;\n $entry->prefix = substr($item->prefix, 0, 32);\n $entry->code = substr($item->code, 0, 64);\n $entry->url = substr($item->url, 0, 256);\n\n $entry->description = '';\n if (property_exists($item, 'body') && is_string($item->body)) {\n $entry->description = $this->sanitize_markup($item->body, array('hr'));\n $entry->description = $this->cleanup_description($entry->description);\n }\n\n if (!empty($item->created) && is_string($item->created)) {\n $sanitized_date = strtotime($item->created);\n $entry->created = date('r', $sanitized_date);\n unset($sanitized_date);\n }\n\n if (!empty($item->modified) && is_string($item->modified)) {\n $sanitized_date = strtotime($item->modified);\n $entry->modified = date('r', $sanitized_date);\n unset($sanitized_date);\n }\n\n $entry->active = TRUE;\n\n $entry->visible = TRUE;\n if (property_exists($item->status, 'visible') && !$item->status->visible) {\n $entry->visible = FALSE;\n }\n\n $entry->searchable = TRUE;\n if (property_exists($item->status, 'searchable') && !$item->status->searchable) {\n $entry->searchable = FALSE;\n }\n\n if (property_exists($item, 'fields') && is_array($item->fields)) {\n $entry->fields = json_encode($item->fields);\n }\n\n $this->processed[] = $entry;\n unset($entry);\n }\n\n $this->loaded = NULL;\n return TRUE;\n }", "function processData(&$dataIn, $category, &$dataOut ){\n if(isset($dataIn[$category])){\n foreach($dataIn[$category] as $k=>$v){\n // Get Country/world\n if($category == \"GlobalData\"){\n $country = WORLD;\n }\n else{\n $country = $v[\"Pays\"];\n }\n // Convert special characters for country variable\n $country = removeAccents($country);\n // get details\n $time = $v[\"Date\"];\n $cases = $v[\"Infection\"];\n $deaths = $v[\"Deces\"];\n // check if country/world entry exists\n if(!isset($dataOut[$country])){\n $dataOut[$country] = [];\n }\n // Update country/World with date and details \n addEntryOut($dataOut[$country], $time, $cases, $deaths);\n }\n } \n}", "public function compare_category_data(&$p_category_data_values, &$p_object_category_dataset, &$p_used_properties, &$p_comparison, &$p_badness, &$p_mode, &$p_category_id, &$p_unit_key, &$p_category_data_ids, &$p_local_export, &$p_dataset_id_changed, &$p_dataset_id, &$p_logger, &$p_category_name = null, &$p_table = null, &$p_cat_multi = null, &$p_category_type_id = null, &$p_category_ids = null, &$p_object_ids = null, &$p_already_used_data_ids = null)\n {\n $l_title = strtolower($p_category_data_values[isys_import_handler_cmdb::C__PROPERTIES]['title']['value']);\n if (isset($p_category_data_values[isys_import_handler_cmdb::C__PROPERTIES]['memory']['value_converted']))\n {\n $l_memory = round($p_category_data_values[isys_import_handler_cmdb::C__PROPERTIES]['memory']['value_converted'], 0);\n }\n else\n {\n $l_unit = $p_category_data_values[isys_import_handler_cmdb::C__PROPERTIES]['unit']['const'];\n $l_memory = strval(\n round(\n isys_convert::memory(\n $p_category_data_values[isys_import_handler_cmdb::C__PROPERTIES]['memory']['value'],\n $l_unit,\n C__CONVERT_DIRECTION__FORMWARD\n ),\n 0\n )\n );\n }\n\n // Iterate through local data sets:\n foreach ($p_object_category_dataset as $l_dataset_key => $l_dataset)\n {\n $p_dataset_id_changed = false;\n $p_dataset_id = $l_dataset[$p_table . '__id'];\n\n if (isset($p_already_used_data_ids[$p_dataset_id]))\n {\n // Skip it because ID has already been used for another entry\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__DIFFERENT][$l_dataset_key] = $p_dataset_id;\n $p_logger->debug(' Dateset ID \"' . $p_dataset_id . '\" has already been handled. Skipping to next entry.');\n continue;\n }\n\n //$p_logger->debug(sprintf('Handle dataset %s.', $p_dataset_id));\n\n // Test the category data identifier:\n if ($p_category_data_values['data_id'] !== null)\n {\n if ($p_mode === isys_import_handler_cmdb::C__USE_IDS && $p_category_data_values['data_id'] !== $p_dataset_id)\n {\n //$p_logger->debug('Category data identifier is different.');\n $p_badness[$p_dataset_id]++;\n $p_dataset_id_changed = true;\n if ($p_mode === isys_import_handler_cmdb::C__USE_IDS)\n {\n continue;\n } // if\n } // if\n }\n\n $l_dataset_title = strtolower($l_dataset['isys_catg_graphic_list__title']);\n\n if ($l_dataset_title === $l_title && $l_dataset['isys_catg_graphic_list__memory'] === $l_memory)\n {\n // Check properties\n // We found our dataset\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__SAME][$l_dataset_key] = $p_dataset_id;\n\n return;\n }\n elseif ($l_dataset_title === $l_title && $l_dataset['isys_catg_graphic_list__memory'] !== $l_memory)\n {\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__PARTLY][$l_dataset_key] = $p_dataset_id;\n }\n else\n {\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__DIFFERENT][$l_dataset_key] = $p_dataset_id;\n } // if\n } // foreach\n }", "public function run()\n {\n $this->deleteTable();\n\n $data = [\n\n [\n 'packageId' => 1,\n 'name' => 'Supervisor?',\n 'condition' => 'equal',\n 'value' => 'No',\n ],\n [\n 'packageId' => 1,\n 'name' => 'Hierarchy',\n 'condition' => 'contains',\n 'value' => '1',\n ],\n [\n 'packageId' => 1,\n 'name' => \"Level\",\n 'condition' => \"greater than\",\n 'value' => \"2\"\n ],\n [\n 'packageId' => 2,\n 'name' => 'Supervisor?',\n 'condition' => 'equal',\n 'value' => 'No',\n ],\n [\n 'packageId' => 2,\n 'name' => 'Position',\n 'condition' => 'contains',\n 'value' => 'Boss',\n ],\n [\n 'packageId' => 2,\n 'name' => \"Level\",\n 'condition' => \"greater than\",\n 'value' => \"2\"\n ],\n [\n 'packageId' => 3,\n 'name' => 'Supervisor?',\n 'condition' => 'equal',\n 'value' => 'No',\n ],\n [\n 'packageId' => 3,\n 'name' => 'Hierarchy',\n 'condition' => 'contains',\n 'value' => 'Boss',\n ],\n [\n 'packageId' => 3,\n 'name' => \"Level\",\n 'condition' => \"greater than\",\n 'value' => \"2\"\n ],\n [\n 'packageId' => 3,\n 'name' => 'Country',\n 'condition' => 'equal',\n 'value' => 'Europe',\n ],\n [\n 'packageId' => 3,\n 'name' => 'State',\n 'condition' => 'contains',\n 'value' => 'Cat',\n ],\n [\n 'packageId' => 3,\n 'name' => \"City\",\n 'condition' => \"contains\",\n 'value' => \"Bar\"\n ],\n [\n 'packageId' => 3,\n 'name' => 'Cost Center',\n 'condition' => 'equal',\n 'value' => '122',\n ],\n [\n 'packageId' => 3,\n 'name' => 'Division',\n 'condition' => 'contains',\n 'value' => 'div',\n ],\n [\n 'packageId' => 3,\n 'name' => \"Position\",\n 'condition' => \"greater than\",\n 'value' => \"2\"\n ],\n ];\n\n $this->loadTable($data);\n }", "public function run()\n {\n $categories = [\n ['name' =>'DI', 'code' => 'DI', 'description' => 'Director'],\n ['name' =>'RP Junior', 'code' => 'RP', 'description' => 'Responsable de Proyecto'],\n ['name' =>'RP Senior', 'code' => 'RP', 'description' => 'Responsable de Proyecto'],\n ['name' =>'RTP', 'code' => 'RTP', 'description' => 'Responsable Temporal de Proyecto'],\n ['name' =>'RG Junior', 'code' => 'RG', 'description' => 'Responsable de Grupo'],\n ['name' =>'RG Intermediate', 'code' => 'RG', 'description' => 'Responsable de Grupo'],\n ['name' =>'RG Senior', 'code' => 'RG', 'description' => 'Responsable de Grupo'],\n ['name' =>'LT', 'code' => 'LT', 'description' => 'Lider Tecnico'],\n ['name' =>'IP Junior', 'code' => 'IP', 'description' => 'Ingeniero de Proyecto'],\n ['name' =>'IP Intermediate', 'code' => 'IP', 'description' => 'Ingeniero de Proyecto'],\n ['name' =>'IP Senior', 'code' => 'IP', 'description' => 'Ingeniero de Proyecto'],\n ['name' =>'ITP Junior', 'code' => 'ITP', 'description' => 'Ingeniero Tecnico de Proyecto'],\n ['name' =>'ITP Intermediate', 'code' => 'ITP', 'description' => 'Ingeniero Tecnico de Proyecto'],\n ['name' =>'IP Senior', 'code' => 'ITP', 'description' => 'Ingeniero Tecnico de Proyecto'],\n ['name' =>'DS Junior', 'code' => 'DS', 'description' => 'Desarrollador de Software'],\n ['name' =>'DS Experienced', 'code' => 'DS', 'description' => 'Desarrollador de Software'],\n ['name' =>'TP Junior', 'code' => 'TP', 'description' => 'Tecnico de Proyecto'],\n ['name' =>'TP Experienced', 'code' => 'TP', 'description' => 'Tecnico de Proyecto'],\n ['name' =>'AT Junior', 'code' => 'AT', 'description' => 'Auxiliar Tecnico'],\n ['name' =>'TP Experienced', 'code' => 'AT', 'description' => 'Auxiliar Tecnico'],\n ['name' =>'AD Junior', 'code' => 'AD', 'description' => 'Administrativo'],\n ['name' =>'AD Experienced', 'code' => 'AD', 'description' => 'Administrativo'],\n ['name' =>'BC', 'code' => 'BC', 'description' => 'Becario'],\n ];\n\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category['name'],\n 'code' => $category['code'],\n 'description' => $category['description'],\n ]);\n }\n }", "public function getOkcsData() {\n $filters = json_decode($this->input->post('filters'), true);\n if (strlen($this->input->post('doc_id')) !== 0) {\n $this->getIMContent();\n }\n else if (strlen($this->input->post('clickThroughLink')) !== 0) {\n $this->clickThrough();\n }\n else if($filters['channelRecordID']['value'] !== null || $filters['currentSelectedID']['value'] !== null) {\n $this->browseArticles();\n }\n else if (strlen($this->input->post('deflected')) !== 0) {\n $this->getContactDeflectionResponse();\n }\n else if (strlen($this->input->post('categoryId')) !== 0) {\n $this->getChildCategories();\n }\n else if (strlen($this->input->post('surveyRecordID')) !== 0) {\n $this->submitRating();\n }\n else if (strlen($this->input->post('rating')) !== 0) {\n $this->submitSearchRating();\n }\n }", "public function buildLayeredCategories()\n {\n // Get data for all filter templates in the database\n $templates = $this->getDatabase()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'layered_filter ORDER BY date_add DESC');\n\n // We will keep track of pages categories where filter was already set, so we don't have multiple\n // filters for the same category and shop.\n $alreadyAssigned = [];\n\n // Clear cache\n $this->invalidateLayeredFilterBlockCache();\n\n // Remove all previous data from layered_category\n $this->getDatabase()->execute('TRUNCATE ' . _DB_PREFIX_ . 'layered_category');\n\n // If no filter templates are defined, nothing else to do here\n if (!count($templates)) {\n return true;\n }\n\n // We will insert our queries by batches of hundred queries\n $sqlInsertPrefix = 'INSERT INTO ' . _DB_PREFIX_ . 'layered_category (id_category, controller, id_shop, id_value, type, position, filter_show_limit, filter_type) VALUES ';\n $sqlInsert = '';\n $nbSqlValuesToInsert = 0;\n\n // Now we will loop through each filter template\n foreach ($templates as $filterTemplate) {\n // We will get it's data and convert it into array\n $data = Tools::unSerialize($filterTemplate['filters']);\n foreach ($data['shop_list'] as $idShop) {\n if (!isset($alreadyAssigned[$idShop])) {\n $alreadyAssigned[$idShop] = [];\n }\n\n // Now let's generate data for each controller in the template\n foreach ($data['controllers'] as $controller) {\n // If it's a category controller, we will do it for each category\n // Otherwise, we will use just one line with zero\n $categories = ($controller == 'category' ? $data['categories'] : [0]);\n\n foreach ($categories as $idCategory) {\n $n = 0;\n\n // Make unique job name and check if already generated something for this scenario\n // If yes, skip it, otherwise note this info for next time\n $jobName = $controller . '-' . $idCategory;\n if (in_array($jobName, $alreadyAssigned[$idShop])) {\n continue;\n }\n $alreadyAssigned[$idShop][] = $jobName;\n\n foreach ($data as $key => $value) {\n // The template contains some other data than filters, so we clean it up a bit\n // All filters begin with layered_selection\n if (substr($key, 0, 17) != 'layered_selection') {\n continue;\n }\n\n $type = $value['filter_type'];\n $limit = $value['filter_show_limit'];\n ++$n;\n\n if ($key == 'layered_selection_stock') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', NULL,\\'availability\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif ($key == 'layered_selection_subcategories') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', NULL,\\'category\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif ($key == 'layered_selection_condition') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', NULL,\\'condition\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif ($key == 'layered_selection_weight_slider') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', NULL,\\'weight\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif ($key == 'layered_selection_price_slider') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', NULL,\\'price\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif ($key == 'layered_selection_manufacturer') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', NULL,\\'manufacturer\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif (substr($key, 0, 21) == 'layered_selection_ag_') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', ' . (int) str_replace('layered_selection_ag_', '', $key) . ',\n \\'id_attribute_group\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n } elseif (substr($key, 0, 23) == 'layered_selection_feat_') {\n $sqlInsert .= '(' . (int) $idCategory . ', \\'' . $controller . '\\', ' . (int) $idShop . ', ' . (int) str_replace('layered_selection_feat_', '', $key) . ',\n \\'id_feature\\',' . (int) $n . ', ' . (int) $limit . ', ' . (int) $type . '),';\n }\n\n ++$nbSqlValuesToInsert;\n\n // If we reached the limit, we will execute it and flush our \"cache\"\n if ($nbSqlValuesToInsert >= 100) {\n $this->getDatabase()->execute($sqlInsertPrefix . rtrim($sqlInsert, ','));\n $sqlInsert = '';\n $nbSqlValuesToInsert = 0;\n }\n }\n }\n }\n }\n }\n\n // We will execute remaining queries because we almost certainly didn't reach 100 in the batch\n if ($nbSqlValuesToInsert) {\n $this->getDatabase()->execute($sqlInsertPrefix . rtrim($sqlInsert, ','));\n }\n }", "public function run () {\n $categories = \\Illuminate\\Support\\Facades\\DB::table('categories');\n //$categories->truncate();\n foreach ( static::$data_1 as $key => $item ) {\n $categories->insert([\n 'title' => $item,\n 'slug' => $key,\n 'report_type_id' => 1\n ]);\n }\n foreach ( static::$data_2 as $key =>$item ) {\n $categories->insert([\n 'title' => $item,\n 'slug' => $key,\n 'report_type_id' => 2\n ]);\n }\n }", "function process_data($data) {\n // always initialize all arrays\n $queue = array();\n foreach ($data as $varname => $postedvalue) {\n\n $needsupdate = false;\n $note = false; // TODO implement note??\n\n // skip, not a grade nor feedback\n if (strpos($varname, 'grade') === 0) {\n $data_type = 'grade';\n } else if (strpos($varname, 'feedback') === 0) {\n $data_type = 'feedback';\n } else {\n continue;\n }\n\n $gradeinfo = explode(\"_\", $varname);\n $userid = clean_param($gradeinfo[1], PARAM_INT);\n $itemid = clean_param($gradeinfo[2], PARAM_INT);\n\n $oldvalue = $data->{'old'.$varname};\n\n // was change requested?\n if ($oldvalue == $postedvalue) {\n continue;\n }\n\n if (!$grade_item = grade_item::fetch(array('id'=>$itemid, 'courseid'=>$this->courseid))) { // we must verify course id here!\n error('Incorrect grade item id');\n }\n\n // Pre-process grade\n if ($data_type == 'grade') {\n $feedback = false;\n $feedbackformat = false;\n if ($grade_item->gradetype == GRADE_TYPE_SCALE) {\n if ($postedvalue == -1) { // -1 means no grade\n $finalgrade = null;\n } else {\n $finalgrade = $postedvalue;\n }\n } else {\n $trimmed = trim($postedvalue);\n if (empty($trimmed)) { // empty string means no grade\n $finalgrade = null;\n } else {\n $finalgrade = $this->format_grade($postedvalue);\n }\n }\n\n } else if ($data_type == 'feedback') {\n $finalgrade = false;\n $trimmed = trim($postedvalue);\n if (empty($trimmed)) {\n $feedback = NULL;\n } else {\n $feedback = stripslashes($postedvalue);\n }\n }\n\n $grade_item->update_final_grade($userid, $finalgrade, 'gradebook', $note, $feedback);\n }\n\n return true;\n }", "public function compare_category_data(&$p_category_data_values, &$p_object_category_dataset, &$p_used_properties, &$p_comparison, &$p_badness, &$p_mode, &$p_category_id, &$p_unit_key, &$p_category_data_ids, &$p_local_export, &$p_dataset_id_changed, &$p_dataset_id, &$p_logger, &$p_category_name = null, &$p_table = null, &$p_cat_multi = null, &$p_category_type_id = null, &$p_category_ids = null, &$p_object_ids = null, &$p_already_used_data_ids = null)\n {\n $l_title = (!is_numeric(\n $p_category_data_values['properties']['application'][C__DATA__VALUE]\n )) ? $p_category_data_values['properties']['application'][C__DATA__VALUE] : $p_category_data_values['properties']['application']['title'];\n\n $l_version = null;\n\n if (is_numeric($p_category_data_values['properties']['application']['id']))\n {\n $p_category_data_values['properties']['application'][C__DATA__VALUE] = $p_category_data_values['properties']['application']['id'];\n } // if\n\n if (isset($p_category_data_values['properties']['assigned_version']))\n {\n $l_version = $p_category_data_values['properties']['assigned_version']['ref_title'];\n } // if\n\n $l_candidate = $l_candidate2 = new isys_array();\n $l_dataset_id = null;\n\n // Iterate through local data sets:\n foreach ($p_object_category_dataset as $l_dataset_key => $l_dataset)\n {\n $p_dataset_id_changed = false;\n $p_dataset_id = $l_dataset[$p_table . '__id'];\n $l_dataset_id = $l_dataset[$p_table . '__id'];\n\n if (isset($p_already_used_data_ids[$p_dataset_id]))\n {\n // Skip it ID has already been used\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__DIFFERENT][$l_dataset_key] = $p_dataset_id;\n $p_logger->debug(' Dateset ID \"' . $p_dataset_id . '\" has already been handled. Skipping to next entry.');\n continue;\n }\n\n // Test the category data identifier:\n if ($p_mode === isys_import_handler_cmdb::C__USE_IDS && $p_category_data_values['data_id'] !== $p_dataset_id)\n {\n //$p_logger->debug('Category data identifier is different.');\n $p_badness[$p_dataset_id]++;\n $p_dataset_id_changed = true;\n\n if ($p_mode === isys_import_handler_cmdb::C__USE_IDS)\n {\n continue;\n } // if\n } // if\n\n if ($l_dataset['isys_obj__title'] === $l_title && $l_dataset['isys_catg_version_list__title'] === $l_version)\n {\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__SAME][$l_dataset_key] = $p_dataset_id;\n $p_category_data_values['properties']['assigned_version'][C__DATA__VALUE] = $l_dataset['isys_catg_version_list__id'];\n\n return;\n }\n if ($l_dataset['isys_obj__title'] === $l_title && $l_dataset['isys_catg_version_list__title'] !== $l_version)\n {\n // We found our dataset\n //$p_logger->debug('Dataset and category data are the same.');\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__DIFFERENT][$l_dataset_key] = $p_dataset_id;\n $l_candidate[$l_dataset_key] = $l_dataset[$p_table . '__id'];\n $l_candidate2[$l_dataset_key] = $l_dataset_id;\n //return;\n }\n else\n {\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__DIFFERENT][$l_dataset_key] = $p_dataset_id;\n } // if\n } // foreach\n\n if (count($l_candidate) === 1)\n {\n $l_key = key($l_candidate);\n unset($p_comparison[isys_import_handler_cmdb::C__COMPARISON__DIFFERENT][$l_key]);\n $p_comparison[isys_import_handler_cmdb::C__COMPARISON__PARTLY][$l_key] = current($l_candidate);\n } // if\n }", "protected function processData($data = null)\n {\n $rules = $data['rules'] ?: [];\n $config = $data['config'] ?: [];\n\n $this->processor->setData($rules)\n ->setConfig($config)\n ->process();\n }", "public function validateData()\n {\n\t\t// 1%-5% of data lost is orange. greater is red\n\t\t// 1%-5% of the lines rejected is orange. greater is red\n\t\t// no records collected is red\n\t\t// 5 - 10 different node counts is orange, 11+ is red\n\t\t// \n\t\t// any encoding rejects is orange\n\t\t// any short rejects is orange\n\n //setup report array\n $this->_reportStatus = [\n 'green' => [],\n 'orange' => [],\n 'red' => []\n ];\n\n //run tests\n $this->_reportDataLostError();\n $this->_reportNoRecordsCollected();\n $this->_reportVariableNodeCounts();\n $this->_reportUtf8EncodingReject();\n $this->_reportTooShort();\n\n //add raw data report\n $this->_reportStatus['raw'] = [\n\t\t\t'Nummber of records collected' => count($this->_items),\n 'Number of records that included non UTF-8 encoding' => $this->_count_encoding_rejects,\n\t\t\t\"Character count in UTF-8 reject records\" => $this->_reject_char_count,\n 'Number of records with too few columns' => $this->_count_too_short,\n\t\t\t'Character count lost in rejected short records' => $this->_short_char_count,\n 'Number of records that weren\\'t arrays' => $this->_count_not_array,\n 'Number of rejected catalogs' => $this->_reject_catalog,\n\t\t\t'Column counts and how many records had each count' => $this->_count_nodes,\n ];\n }", "public function run()\r\n {\r\n //Attribute\r\n foreach($this->attributes As $id => $attr) {\r\n \r\n //Exclude Price Type, I am (Agency/Owner), I am (Offering/Looking For), I am (Selling/Looking For), Available on Whatsapp\r\n if (!in_array($attr['id'], [3, 10, 11, 12, 65])) {\r\n \r\n $attribute = App\\Models\\Attribute::create([\r\n 'id' => $attr['id'],\r\n 'name' => $attr['name'],\r\n 'slug' => $attr['slug'],\r\n 'type' => $attr['type']\r\n ]);\r\n\r\n $values = explode(\",\", trim($attr['options'], \",\"));\r\n\r\n foreach($values As $i => $value) {\r\n\r\n if (trim($value) !== \"\") {\r\n $attributeValue = App\\Models\\AttributeValue::create([\r\n 'attribute_id' => $attribute->id,\r\n 'value' => $value\r\n ]);\r\n }\r\n }\r\n \r\n }\r\n } \r\n \r\n //AttributeCategories\r\n foreach($this->attribute_categories As $id => $link) {\r\n \r\n //Exclude Price Type, I am (Agency/Owner), I am (Offering/Looking For), I am (Selling/Looking For), Available on Whatsapp\r\n if (!in_array($link['attribute_id'], [3, 10, 11, 12, 65])) {\r\n \r\n $category = Category::where('id', $link['category_id'])->first();\r\n $attribute = Attribute::where('id', $link['attribute_id'])->first();\r\n\r\n $category->addAttribute($attribute);\r\n \r\n }\r\n }\r\n }", "protected function validateCatalog($data)\n {\n if(count(array_filter($data)) != 6){\n $this->_reject_catalog++;\n return false;\n } elseif (!is_numeric($data[5])){\n $this->_reject_catalog++;\n return false;\n } else{\n return true;\n }\n\t}", "function processCategories($product, $data, $storeId)\n {\n //CATEGORIES \n $catCount = 0;\n\n $storeRootCat = Mage::getModel('catalog/category')->load(Mage::app()->getStore($storeId)->getRootCategoryId());\n $storeRootChildrenIds = explode(\",\", $storeRootCat->getChildren());\n\n if($data[3] != \"\")\n {\n $categoryList = explode(\"|\", $data[3]);\n $foundValidCategory = false;\n foreach ($categoryList as $complexCategory)\n {\n $singleCategories = explode(\">\", $complexCategory);\n\n $i = 0;\n if(validTopLevel(trim($singleCategories[0])))\n {\n $foundCorrectCategory = false;\n foreach($singleCategories as $singleCategory) \n {\n if($i == 0) //root category for this complex category\n {\n foreach ($storeRootChildrenIds as $rootChildId)\n {\n $rootChild = Mage::getModel('catalog/category')->load($rootChildId);\n\n if($rootChild->getName() == trim($singleCategory))\n {\n $currentRootCategory = $rootChild;\n\n if($i == (count($singleCategories) - 1))\n {\n $foundCorrectCategory = true;\n $foundValidCategory = true;\n }\n }\n }\n }\n else\n {\n $subChildren = $categories = Mage::getModel('catalog/category')\n ->getCollection()\n ->addFieldToFilter('parent_id', array('eq'=>$currentRootCategory->getId()))\n ->addFieldToFilter('is_active',array('in'=>array('0', '1')))\n ->addAttributeToSelect('*');\n\n foreach ($subChildren as $subChild)\n {\n if($subChild->getName() == trim($singleCategory))\n {\n $currentRootCategory = $subChild;\n\n if($i == (count($singleCategories) - 1))\n {\n $foundCorrectCategory = true;\n $foundValidCategory = true;\n }\n }\n }\n }\n $i++;\n }\n\n //Associate product with Category\n if($foundCorrectCategory == true)\n {\n $productCategoryIds[$catCount] = $currentRootCategory->getId();\n }\n $catCount++; \n }\n }\n\n if($foundValidCategory == true)\n {\n $product->setCategoryIds($productCategoryIds);\n } \n }\n }", "function validateData($products, $prodAPI, $prodGrpAPI){\n $valid = false;\n for($i = 2; $i < count($products)+1; $i++){\n $name = $products[$i][\"A\"];\n $description = $products[$i][\"B\"];\n $unit = $products[$i][\"C\"];\n $price = $products[$i][\"D\"];\n $amount = $products[$i][\"E\"];\n $categories = $products[$i][\"F\"];\n\n //validate name:\n $valid = preg_match(\"/^[a-zA-ZäöüÄÖÜ ]+$/\", $name);\n if(!$valid){ return \"Das Produkt \".$name.\" enth&auml;lt nicht nur Buchstaben\";}\n $valid = (strlen($name) < 50 && strlen($name) > 1);\n if(!$valid){ return \"Das Produkt \".$name.\" erf&uuml;llt nicht die vorgegebene Zeichenl&auml;nge\";}\n $magentoProducts = $prodAPI -> getAllProducts();\n $valid = (!in_array_r($name, $magentoProducts));\n if(!$valid){ return \"Das Produkt \".$name.\" ist bereits vorhanden\";}\n //validate description\n $valid = preg_match(\"/^[a-zA-ZäöüÄÖÜ0-9 .,!?]+$/\", $description);\n if(!$valid){ return \"Die Beschreibung \".$description.\" enth&auml;lt nicht nur Buchstaben und Satzzeichen\";}\n $valid = (strlen($description) < 250);\n if(!$valid){ return \"Die Beschreibung \".$description.\" darf nicht l&auml;ger wie 250 Zeichen lang sein\";}\n //validate unit\n $valid = preg_match(\"/^[a-zA-Z ]+$/\", $unit);\n if(!$valid){ return \"Die Einheit \".$unit.\" enth&auml;lt nicht nur Buchstaben\";}\n $valid = (strlen($name) < 20 && strlen($unit) > 0);\n if(!$valid){ return \"Die Einheit \".$unit.\" ist entweder mehr als 20 Zeichen lang oder leer\";}\n //validate price\n $valid = filter_var($price, FILTER_VALIDATE_FLOAT);\n if(!$valid){ return \"Der Preis \".$price.\" entspricht nicht einer Zahl\";}\n $valid = ($price > 0 && $price < 100000000);\n if(!$valid){ return \"Der Preis \".$price.\" ist nicht gr&ouml;sser als 0 oder nicht kleiner wie 100'000'000\";}\n //validate amount\n $valid = filter_var($amount, FILTER_VALIDATE_FLOAT);\n if(!$valid){ return \"Die Menge \".$amount.\" entspricht nicht einer Zahl\";}\n $valid = ($amount > 0 && $amount < 100000000);\n if(!$valid){ return \"Die Menge \".$amount.\" ist nicht gr&ouml;sser als 0 oder nicht kleiner wie 100'000'000\";}\n //validate categories\n $categories = explode(\",\", $categories);\n $magentoCategories = $prodGrpAPI -> getTree();\n foreach ($categories as $categorie){\n $categorie = trim($categorie);\n $valid = preg_match(\"/^[a-zA-ZäöüÄÖÜ ]+$/\", $categorie);\n if(!$valid){ return \"Die Kategorie \".$categorie.\" enth&auml;lt nicht nur Buchstaben\";}\n $valid = (in_array_r($categorie, $magentoCategories));\n if(!$valid){ return \"Die Kategorie \".$categorie.\" ist nicht vorhanden\";}\n }\n }\n return $valid;\n}", "public function validate_unlimited_access( $input ) {\n $valid = array();\n $args = array(\n 'hide_empty' => false,\n 'taxonomy' => 'category',\n 'parent' => 0,\n );\n\n // get only 1st level categories\n $categories = get_categories( $args );\n\n if ( $input && is_array( $input ) ) {\n foreach ( $input as $role => $data ) {\n // check, if selected categories cover entire blog\n $covered = 1;\n foreach ( $categories as $category ) {\n if ( ! in_array( ( string ) $category->term_id, $data, true ) ) {\n $covered = 0;\n break;\n }\n }\n\n // set option 'all' for this role, if entire blog is covered\n if ( $covered ) {\n $valid[ $role ] = array( 'all' );\n continue;\n }\n\n // filter values, if entire blog is not covered\n if ( in_array( 'all', $data, true ) && in_array( 'none', $data, true ) && count( $data ) === 2 ) {\n // unset option 'all', if option 'all' and option 'none' are selected at the same time\n unset( $data[ array_search( 'all', $data, true ) ] );\n } elseif ( count( $data ) > 1 ) {\n // unset option 'all', if at least one category is selected\n if ( array_search( 'all', $data, true ) !== false ) {\n foreach ( $data as $key => $option ) {\n if ( ! in_array( $option, array( 'none', 'all' ), true ) ) {\n unset( $data[ $key ] );\n }\n }\n }\n\n // unset all categories, if option 'none' is selected\n if ( array_search( 'none', $data, true ) !== false ) {\n foreach ( $data as $key => $option ) {\n if ( ! in_array( $option, array( 'none', 'all' ), true ) ) {\n unset( $data[ $key ] );\n }\n }\n }\n }\n\n $valid[ $role ] = array_values( $data );\n }\n }\n\n return $valid;\n }", "public function init() {\n\n // If there is no data, return.\n if ( empty( $this->data ) ) {\n return;\n }\n\n // Bring the global metaboxes array into scope.\n global $wp_meta_boxes;\n\n // Loop through each post type and start whitelisting metaboxes!\n foreach ( $this->data as $post_type => $data ) {\n // If no contexts or priorities have been specified, do nothing.\n if ( empty( $data['contexts'] ) || empty( $data['priorities'] ) ) {\n continue;\n }\n\n // Now loop through each context that has been assigned to the post type.\n foreach ( (array) $data['contexts'] as $context ) {\n // Now loop through each priority within the context.\n foreach ( (array) $data['priorities'] as $priority ) {\n if ( isset( $wp_meta_boxes[$post_type][$context][$priority] ) ) {\n // Loop through each priority and check the data to determine whether the metabox will stay or go.\n foreach ( (array) $wp_meta_boxes[$post_type][$context][$priority] as $id => $metabox_data ) {\n // If the metabox ID matches one to pass over, whitelist it and allow it to be registered.\n if ( in_array( $id, (array) $data['whitelist'] ) ) {\n unset( $data['whitelist'][$id] );\n continue;\n }\n\n // Otherwise, loop over the IDs to skip and see if there is a relevant match to whitelist.\n foreach ( (array) $data['whitelist'] as $skip ) {\n if ( preg_match( '#^' . $id . '#i', $skip ) ) {\n continue;\n }\n }\n\n // The metabox is not allowed on this screen. Prevent it from being registered.\n unset( $wp_meta_boxes[$post_type][$context][$priority][$id] );\n }\n }\n }\n }\n }\n\n }", "private function __processKPIData2($adwordsData, $args)\n {\n $sortedData = $this->_groupData($adwordsData, $args['group_by']);\n $sortedDataDay = $this->_groupData($adwordsData, 'day');\n\n\n $start_date = $args['date_range']['min'];\n $end_date = $args['date_range']['max'];\n $duration =($end_date-$start_date)/86400;\n $i = 0;\n\n $kpiDataFields = array();\n\n $kpiFields = array();\n if (is_array($args['kpi_fields'])) {\n foreach ($args['kpi_fields'] as $column) {\n $kpiFields[] = $column[1];\n }\n }\n\n $depFields = array();\n\n if (is_array($args['dependent_fields'])) {\n foreach ($args['dependent_fields'] as $column) {\n $depFields[] = $column[1];\n }\n }\n\n $kpiDataFields = array_unique($kpiFields);\n $depFields = array_unique($depFields);\n\n foreach ($sortedDataDay as $key => $data) {\n foreach ($data as $dataEach) {\n for ($i = 0; $i <= (int)$duration; $i++) {\n $day = date('Y-m-d', strtotime(\"+$i day\", $start_date));\n $dataExistsForDate = false;\n # Loop over each campaign data\n foreach ($dataEach as $segmentData) {\n\n //if($day != $segmentData['day'] )\n // continue;\n\n //print_r($segmentData);\n }\n }\n /*\n foreach($args['extra_fields'] as $column){\n $kpiData[$key][$column[1]] = $dataEach[$column[1]];\n }\n\n foreach($kpiDataFields as $field){\n\n\n if($field == 'avgPosition'){\n $kpiData[$key]['sumAvgPos']+= $dataEach[$field] * $dataEach['impressions'];\n $kpiData[$key][$field] += $dataEach[$field];\n } else {\n $kpiData[$key][$field] += $dataEach[$field];\n }\n\n }\n\n foreach($depFields as $field)\n $depData[$key][$field] += $dataEach[$field];\n\n */\n if ($dataEach['currency']) {\n $kpiData[$key]['currency'] = $dataEach['currency'];\n }\n }\n }\n\n //echo '<pre>';\n //\tprint_r($kpiData);\n exit;\n\n\n\n foreach ($kpiData as $key => $data) {\n foreach ($kpiDataFields as $column) {\n $kpiDataTotal[$column] += $data[$column];\n }\n\n if ($data['currency']) {\n $kpiDataTotal['currency'] = $data['currency'];\n }\n\n\n if ($data['searchImprShare']) {\n $searchImpressionShare++;\n }\n\n if ($data['sumAvgPos']) {\n $kpiDataTotal['sumAvgPos'] += $data['sumAvgPos'];\n }\n }\n\n #Calculate the totals of the dependent fields\n if ($depData) {\n foreach ($depData as $key => $data) {\n foreach ($depFields as $column) {\n $depDataTotal[$column] += $data[$column];\n }\n }\n }\n\n\n if ($kpiDataTotal['sumAvgPos']) {\n $kpiDataTotal['avgPosition'] = $kpiDataTotal['sumAvgPos'];\n }\n\n if ($kpiDataTotal['searchImprShare']) {\n $kpiDataTotal['searchImprShare'] = $kpiDataTotal['searchImprShare'] / $searchImpressionShare;\n }\n\n\n\n # Perform Manual Calculations for Certain fields\n # The array is passed as reference\n $this->_applyManualCalculations($kpiDataTotal, $depDataTotal, array('ctr', 'avgCPC', 'cost', 'costAllConv', 'convRate', 'avgPosition'));\n\n foreach ($kpiDataTotal as $key => $value) {\n if ($args['kpi_fields'][$key]) {\n $newValue = $this->getMetricsFormatService()->formatNumber($key, $value);\n\n $kpiDataTotalNew[] = array('value' => string($newValue),'rawValue'=>$value,'caption'=>$args['kpi_fields'][$key][0],'key'=>$args['kpi_fields'][$key][1],'icon'=>$args['kpi_fields'][$key][3]);\n }\n }\n\n $this->currency = $kpiDataTotal['currency'];\n\n //$totals = $this->processKPIGraph($adwordsData,$args);\n\n return $kpiDataTotalNew;\n }", "protected function beforeValidate() {\n if (!empty($this->category) && (is_array($this->category) || is_numeric($this->category))) {\n if (is_numeric($this->category)) $this->category = array($this->category);\n //print_r($this->category);\n //cause we used the refid's value as the dropdown values.\n //$categories = Types::model()->actived()->bytype('category')->findAllByPk(array_values($this->category));\n $categories = Types::model()->actived()->bytype('category')\n ->findAllByAttributes(array('refid' => array_values($this->category)));\n //print_r($categories);\n $data = array();\n if ($categories) {\n //$data = CHtml::listData($categories, 'id', 'typename');\n $data = CHtml::listData($categories, 'refid', 'typename');\n if (!empty($data)) $this->category_str = implode(\", \", array_values($data));\n }\n $this->category = \"|\".implode(\"|\", array_values($this->category)).\"|\";\n }\n\n #################8/21/2012 start ###################\n if (!empty($this->awis_category) && is_numeric($this->awis_category)) {\n $categories = Types::model()->actived()->bytype('awis')\n ->findAllByAttributes(array('refid' => $this->awis_category));\n if ($categories) {\n $this->awis_category_str = $categories->typename;\n }\n }\n\n if (!empty($this->technorati_category) && is_numeric($this->technorati_category)) {\n $categories = Types::model()->actived()->bytype('technorati')\n ->findAllByAttributes(array('refid' => $this->technorati_category));\n if ($categories) {\n $this->technorati_category_str = $categories->typename;\n }\n }\n \n if (empty($this->rootdomain)) {\n Yii::import('application.vendors.*');\n $this->rootdomain = SeoUtils::getDomain($this->domain);\n }\n\n /*\n if (!empty($this->awis_category) && (is_array($this->awis_category) || is_numeric($this->awis_category))) {\n if (is_numeric($this->awis_category)) $this->awis_category = array($this->awis_category);\n $categories = Types::model()->actived()->bytype('awis')\n ->findAllByAttributes(array('refid' => array_values($this->awis_category)));\n //print_r($categories);\n $data = array();\n if ($categories) {\n //$data = CHtml::listData($categories, 'id', 'typename');\n $data = CHtml::listData($categories, 'refid', 'typename');\n if (!empty($data)) $this->awis_category_str = implode(\", \", array_values($data));\n }\n $this->awis_category = \"|\".implode(\"|\", array_values($this->awis_category)).\"|\";\n }\n\n if (!empty($this->technorati_category) && (is_array($this->technorati_category) || is_numeric($this->technorati_category))) {\n if (is_numeric($this->technorati_category)) $this->technorati_category = array($this->technorati_category);\n $categories = Types::model()->actived()->bytype('technorati')\n ->findAllByAttributes(array('refid' => array_values($this->technorati_category)));\n //print_r($categories);\n $data = array();\n if ($categories) {\n //$data = CHtml::listData($categories, 'id', 'typename');\n $data = CHtml::listData($categories, 'refid', 'typename');\n if (!empty($data)) $this->technorati_category_str = implode(\", \", array_values($data));\n }\n $this->technorati_category = \"|\".implode(\"|\", array_values($this->technorati_category)).\"|\";\n }\n */\n #################8/21/2012 end #########################\n\n if ($this->isNewRecord) {\n // set the create date, last updated date, then the user doing the creating\n // $this->created = $this->modified = new CDbExpression('NOW()');\n $this->created = $this->modified = date('Y-m-d H:i:s');\n $this->created_by = $this->modified_by = Yii::app()->user->id;\n //$this->salt = $this->generateSalt();\n } else {\n //not a new record, so just set the last updated time and last updated user id\n //$this->update_time = new CDbExpression('NOW()');\n $this->modified = date('Y-m-d H:i:s');\n $this->modified_by = Yii::app()->user->id;\n //if (empty($this->password)) unset($this->password);\n }\n\n return parent::beforeValidate();\n }" ]
[ "0.57245624", "0.5673635", "0.5398193", "0.53711987", "0.5227669", "0.5226842", "0.52055967", "0.5197432", "0.5148275", "0.5144854", "0.51417613", "0.5124623", "0.5124223", "0.5101983", "0.5091718", "0.5084711", "0.50678754", "0.50638354", "0.50624007", "0.50420594", "0.5029254", "0.50248593", "0.5023226", "0.5022787", "0.5018461", "0.5009977", "0.4983592", "0.49726403", "0.49542254", "0.49477783" ]
0.6829252
0
Checks for and processes data for users and excludeusers parameters
protected function checkUserFilters($data) { $andFilters = ''; if(isset($data['users']) AND is_string($data['users'])){ $userList = explode(',', $data['users']); foreach($userList as $bk => &$b){ $getUser = $this->get('users', $b, array('userId')); if(!$getUser){ $getUser = $this->get('users', $b, array('userId'), 'slug'); if(!$getUser){ unset($userList[$bk]); continue; } } $b = $getUser['userId']; } if(count($userList) > 0){ $andFilters .= ' AND t.userId IN('.join(',', $userList).') '; } } if(isset($data['exclude-users'])){ $antiuserList = explode(',', $data['exclude-users']); foreach($antiuserList as $bk => &$b){ $getUser = $this->get('users', $b, array('userId')); if(!$getUser){ $getUser = $this->get('users', $b, array('userId'), 'slug'); } if(!$getUser OR (isset($userList) AND in_array($b, $userList))){ unset($antiuserList[$bk]); continue; } $andFilters .= ' AND t.userId != '.$getUser['userId'].' '; } } return $andFilters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function os2intra_user_import_disable_users($users_to_disable = NULL) {\n os2intra_user_import_save_log('', 'Start disabling users');\n $user_disable_method = variable_get('os2intra_user_import_user_disable_method', array('termination_date'=>'termination_date'));\n if ($user_disable_method['termination_date']) {\n os2intra_user_import_disable_users_based_on_termination_date();\n }\n if ($user_disable_method['csv_file']) {\n os2intra_user_import_disable_users_based_on_csv_file($users_to_disable);\n }\n os2intra_user_import_save_log('', 'User disabling finished');\n}", "public function getUsersWithFilters($data){\n $SQL = \"SELECT * FROM \".self::TABLE_LABLE.self::WHERE_.self::TABLE_LABLE.\".can_catch_requests = 1 \".self::AND_;\n $sqlWhereConditions = false;\n if($data->cityId)\n {\n $sqlWhereConditions = '';\n $sqlWhereConditions.= self::TABLE_LABLE.\".city_id = '\".$data->cityId.\"'\";\n }\n if($data->levelId)\n {\n if($sqlWhereConditions){\n $sqlWhereConditions.= self::AND_;\n }\n $sqlWhereConditions.= self::TABLE_LABLE.\".level_id = '\".$data->levelId.\"'\";\n\n }\n\n if($data->professionalId)\n {\n if($sqlWhereConditions){\n $sqlWhereConditions.= self::AND_;\n }\n $sqlWhereConditions.= self::TABLE_LABLE.\".professional_id = '\".$data->professionalId.\"'\";\n\n }\n\n if($sqlWhereConditions)\n {\n $SQL.=' ( '.$sqlWhereConditions.' ) ';\n }\n\n $rows = R::getAll($SQL);\n $users = R::convertToBeans('tbluser',$rows);\n if($data->playDays){\n foreach ($users as $key => $user)\n {\n if(!$this->_checkUserPlayingDays($data,$user))\n {\n unset($users[$key]);\n }\n }\n }\n return $users;\n }", "public static function getFilteredUsers()\n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\t$Cur_useData = AjaxController::getCurrentUserAllData();\n\t\t\t\tif ($Cur_useData['grpid'] == 'NA') \n\t\t\t\t{\n\t\t\t\t\t$data1 = DB::table('x08')\n\t\t\t\t\t\t->join('region', 'x08.rgnid', '=', 'region.rgnid')\n\t\t\t\t\t\t->join('x07', 'x08.grpid', '=', 'x07.grp_id')\n\t\t\t\t\t\t->where([['x08.grpid', '<>', 'NA'], ['x08.grpid', '<>', 'C']])\n\t\t\t\t\t\t->get();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data1 = DB::table('x08')\n\t\t\t\t\t\t->join('region', 'x08.rgnid', '=', 'region.rgnid')\n\t\t\t\t\t\t->join('x07', 'x08.grpid', '=', 'x07.grp_id')\n\t\t\t\t\t\t->where([['x08.grpid', '<>', 'NA'], ['x08.grpid', '<>', 'C'], ['region.rgnid', '=', $Cur_useData['rgnid']]])\n\t\t\t\t\t\t->get();\n\t\t\t\t}\n\t\t\t\tif (isset($data1)) {\n\t\t\t\t\t\tfor ($i=0; $i < count($data1); $i++) { \n\t\t\t\t\t\t\tif (isset($data1[$i]->team)) {\n\t\t\t\t\t\t\t\t\t$test = DB::table('team')->where('teamid', '=', $data1[$i]->team)->first();\n\t\t\t\t\t\t\t\t\tif (isset($test)) {\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->teamid = $test->teamid;\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->teamdesc = $test->teamdesc;\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->teamdesc = 'NONE';\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->teamid = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$data1[$i]->teamdesc = 'NONE';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($data1[$i]->def_faci)) {\n\t\t\t\t\t\t\t\t\t$test2 = DB::table('facilitytyp')->where('facid', '=', $data1[$i]->def_faci)->first();\n\t\t\t\t\t\t\t\t\tif (isset($test2)) {\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->facid = $test2->facid;\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->facidesc = $test2->facname;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->facidesc = 'NONE';\n\t\t\t\t\t\t\t\t\t\t$data1[$i]->facid = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data1[$i]->facidesc = 'NONE';\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\treturn $data1;\n\t\t\t} \n\t\t\tcatch (Exception $e) \n\t\t\t{\n\t\t\t\tAjaxController::SystemLogs($e->getMessage);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "function allowUsers()\r\n{\r\n\tglobal $lang;\r\n\t// Get arguments passed\r\n\t$args = func_get_args();\r\n\t// If userid is not defined OR if authentication has been disabled OR if no userid's were provided, then return false with no error warning\r\n\tif (!defined(\"USERID\") || defined(\"NOAUTH\") || empty($args)) return false;\r\n\t// Set flag if the userid does not exist as a parameter\r\n\t$userIdNotFound = true;\r\n\t// Loop through all project_ids as parameter\r\n\tforeach ($args as $item) {\r\n\t\tif (is_array($item)) {\r\n\t\t\tif (empty($item)) return false;\r\n\t\t\tforeach ($item as $userid) {\r\n\t\t\t\tif ($userid == USERID) {\r\n\t\t\t\t\t$userIdNotFound = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($item == USERID) {\r\n\t\t\t\t$userIdNotFound = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Now do a check if the userid was not set as parameter\r\n\tif ($userIdNotFound) \r\n\t{\r\n\t\tprint \"<div style='background-color:#FFE1E1;border:1px solid red;max-width:700px;padding:6px;color:#800000;'>\r\n\t\t\t\t\t<img src='\" . APP_PATH_IMAGES . \"exclamation.png' class='imgfix'> \r\n\t\t\t\t\t<b>{$lang['global_05']}</b> {$lang['config_05']}\r\n\t\t\t\t</div>\";\r\n\t\texit;\r\n\t}\r\n\t// If we made it this far, return true\r\n\treturn true;\r\n}", "function check_for_all_condition($evalue_users,$data,$other_gender)\n{\n\tglobal $SITE_URL;\n\t$prof=implode(\",\",$evalue_users);\n\t$prof_filter=array();\n\tif(!$data['PROFILEID'])\n\t{\n\t\t$reason=\"<span style='font-weight:normal'>To view contact details of this users <a href='$SITE_URL/profile/login.php?SHOW_LOGIN_WINDOW=1' class='thickbox'>Login here</a>.</span>\";\n\t}\n\telse \n\t{\n\t\t$profilechecksum=createChecksumForSearch($data['PROFILEID']);\n\t\t$activated=$data['ACTIVATED'];\n\t\t$incomplete=$data['INCOMPLETE'];\n\n\t\tif($incomplete == \"Y\")\n \t$reason=\"<span style='font-weight:normal'>You need to complete your profile before viewing the user's contact details. Please <a href=\\\"$SITE_URL/profile/viewprofile.php?checksum=&profilechecksum=$profilechecksum&EditWhatNew=incompletProfile\\\">click here</a> to complete your profile.</span>\";\n\t\telseif($activated == \"N\" || $activated == \"U\" || $activated == \"P\")\n \t$reason=\"<span style='font-weight:normal'>You can view the contact details of the user only after your profile is screened.</span>\";\n\t\telseif($data['GENDER']==$other_gender)\n\t\t{\n\t\t\t$reason=\"<span style='font-weight:normal'>You cannot see the contact details of this profile as the profile is of the same gender.</span>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once($_SERVER['DOCUMENT_ROOT'].\"/profile/contact.inc\");\ninclude_once(JsConstants::$docRoot.\"/commonFiles/jpartner_include.inc\");\n\t\t\t$is_spam=is_spam($data['PROFILEID']);\n\t\t $my_parameters=get_my_parameters_for_dpp_match($data['PROFILEID']);\n\t\t\tfor($i=0;$i<count($evalue_users);$i++)\n\t\t\t{\n\t\t\t\t\tif($evalue_users[$i])\n\t\t\t\t\t\t$prof_filter[$evalue_users[$i]]=getFilteredContact($data['PROFILEID'],$evalue_users[$i],$is_spam,$my_parameters,'viewContactDetails');\n\t\t\t}\n\t\t}\n\t}\n\tif($reason)\n\t\treturn $reason;\n\telse\n\t\treturn $prof_filter;\n\n}", "private function processUsers($data)\n {\n foreach ($data as $row) {\n $this->data[$row['id_user']] = array_merge(\n $row,\n [\n 'user_contracts' => [],\n 'api_user_contracts' => [],\n ]\n );\n }\n }", "function os2intra_user_import_disable_users() {\n os2intra_user_import_save_log('', 'Start disabling users');\n $timestamp = strtotime('midnight tomorrow');\n if (variable_get('os2intra_user_import_user_disable_action', 'user_disable') == 'user_delete_reassign') {\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'user');\n $query->fieldCondition('field_os2intra_termination_date', 'value', $timestamp, '<');\n $query->fieldCondition('field_os2intra_termination_date', 'value', 1, '>');\n $result = reset($query->execute());\n\n $method = 'user_cancel_reassign';\n // Delete users\n if (is_array($result)) {\n foreach ($result as $uid => $item) {\n $account = user_load($uid);\n $user_name = $account->field_name_first['und'][0]['value'] . ' ' . $account->field_name_last['und'][0]['value'] . ' (' . $account->mail . ')';\n module_invoke_all('user_cancel', array(), $account, $method);\n user_delete($uid);\n os2intra_user_import_save_log('', 'Delete user: ' . $user_name);\n }\n }\n\n }\n else {\n // Query all users with termination date today.\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'user');\n $query->fieldCondition('field_os2intra_termination_date', 'value', $timestamp, '<');\n $query->fieldCondition('field_os2intra_termination_date', 'value', 1, '>');\n $query->propertyCondition('status', 1);\n $result = reset($query->execute());\n\n // Array holding new status for user\n $disable_array = array('status' => 0);\n\n // Disable users\n if (is_array($result)) {\n foreach ($result as $uid => $item) {\n os2intra_user_import_save_log('', 'Disable uid: ' . $uid);\n user_save(user_load($uid), $disable_array);\n }\n }\n }\n os2intra_user_import_save_log('', 'User disabling finished');\n}", "function os2intra_user_import_check_users(&$users) {\n $update_users = array();\n\n // Check duplicated emails. Drupal users should have unique email.\n $dup_emails = array();\n $user_email = array_column($users, 'email');\n if (!empty($user_email) && count($users) !== count(array_unique($user_email))) {\n $dup_emails = array_unique(array_diff_assoc($user_email, array_unique($user_email)));\n os2intra_user_import_save_log('', 'Duplicate email found in import file: ' . implode(', ', $dup_emails));\n }\n\n // Check duplicated AD id. AD id values should be unique.\n $ad_id = array_column($users, 'ad_id');\n $dup_id = array();\n if (!empty($ad_id) && count($users) !== count(array_unique($ad_id))) {\n $dup_id = array_unique(array_diff_assoc($ad_id, array_unique($ad_id)));\n os2intra_user_import_save_log('', 'Duplicate User AD id found in import file: ' . implode(', ', $dup_id));\n }\n\n $identification_method = variable_get('os2intra_user_import_activate_identification', OS2INTRA_USER_IMPORT_ACTIVATE_IDENTIFICATION);\n // For employee_id activation mode employee_id values should be unique.\n if ($identification_method == 'employee_id') {\n $employee_id = array_column($users, 'employee_id');\n $dup_em_id = array();\n if (!empty($employee_id) && count($users) !== count(array_unique($employee_id))) {\n $dup_em_id = array_unique(array_diff_assoc($employee_id, array_unique($employee_id)));\n os2intra_user_import_save_log('', 'Duplicate employee id found in import file: ' . implode(', ', $dup_em_id));\n }\n }\n\n foreach ($users as $key => $user) {\n if (array_search($user['email'], $dup_emails) !== FALSE) {\n os2intra_user_import_save_log('', 'Duplicate email found: Skip user ' . $user['email']);\n unset($users[$key]);\n continue;\n }\n\n if (array_search($user['ad_id'], $dup_id) !== FALSE) {\n unset($users[$key]);\n os2intra_user_import_save_log('', 'Duplicate user AD found: Skip user ' . $user['ad_id']);\n continue;\n }\n\n if ($identification_method == 'employee_id') {\n if (array_search($user['employee_id'], $dup_em_id) !== FALSE) {\n unset($users[$key]);\n os2intra_user_import_save_log('', 'Duplicate user employee id found: Skip user ' . $user['employee_id']);\n continue;\n }\n }\n\n $result = NULL;\n\n $identification_method = variable_get('os2intra_user_import_activate_identification', OS2INTRA_USER_IMPORT_ACTIVATE_IDENTIFICATION);\n if ($identification_method == 'ad_id') {\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'user');\n $query->propertyCondition('name', $user['ad_id']);\n $result = $query->execute();\n } elseif ($identification_method == 'employee_id') {\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'user');\n $query->fieldCondition('field_os2intra_employee_id', 'value', $user['employee_id']);\n $result = $query->execute();\n }\n\n // Unset users already created\n if ($result) {\n $update_users[key(array_shift($result))] = $user;\n unset($users[$key]);\n }\n }\n\n return $update_users;\n}", "function os2intra_user_import_check_users(&$users, $duplicate_emails, $duplicate_ids) {\n $update_users = array();\n foreach ($users as $key => $user) {\n if (array_search($user['email'], $duplicate_emails) !== false) {\n os2intra_user_import_save_log('', 'Duplicate email found: Skip user ' . $user['email']);\n unset($users[$key]);\n continue;\n }\n\n if (array_search($user['ad_id'], $duplicate_ids) !== false) {\n unset($users[$key]);\n os2intra_user_import_save_log('', 'Duplicate user AD found: Skip user ' . $user['ad_id']);\n continue;\n }\n\n $result = NULL;\n\n $identification_method = variable_get('os2intra_user_import_activate_identification');\n if ($identification_method == 'ad_id') {\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'user');\n $query->propertyCondition('name', $user['ad_id']);\n $result = $query->execute();\n } elseif ($identification_method == 'employee_id') {\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'user');\n $query->fieldCondition('field_os2intra_employee_id', 'value', $user['employee_id']);\n $result = $query->execute();\n }\n\n // Unset users already created\n if ($result) {\n $update_users[key(array_shift($result))] = $user;\n unset($users[$key]);\n }\n }\n\n return $update_users;\n}", "function mfcs_ajax_problems_0_disabled_in_use($user_id) {\n if (!cf_is_integer($user_id)) {\n drupal_json_output(array());\n exit();\n }\n\n $conditions = array();\n $conditions['value_status'] = array(\n 'field' => 'mer.status',\n 'operator' => MFCS_OPERATOR_IS_IN,\n 'search' => array(MFCS_REQUEST_STATUS_LOCKED, MFCS_REQUEST_STATUS_UNLOCKED),\n );\n\n $conditions['value_venue_coordinator'] = array(\n 'field' => 'mer.venue_coordinator',\n 'operator' => MFCS_OPERATOR_EQUAL,\n 'search' => $user_id,\n );\n\n $conditions['value_problem_venue_coordinator_status'] = array(\n 'field' => 'u.status',\n 'operator' => MFCS_OPERATOR_EQUAL,\n 'search' => 0,\n );\n\n\n $options = array();\n $options['extra_fields']['users'] = array(\n 'alias' => 'u',\n 'join' => 'inner',\n 'on' => 'mer.venue_coordinator = u.uid',\n 'columns' => array(\n 'venue_coordinator_status' => 'status',\n ),\n );\n\n mfcs_ajax_management_listing_0($conditions, $options);\n}", "private static function filter_protected_users( array $data, $depth = 0 ){\n // data could be: \n // 1. a status with a user property\n if( isset($data['text']) ){\n if( isset($data['user']) && ! empty($data['user']['protected']) ){\n if( ! $depth ){\n self::fatal( 403, 'Protected Twitter account' );\n }\n $data = array_intersect_key( $data, array('user'=>1,'id'=>1,'id_str'=>1) );\n $data['proxy_removed'] = true;\n }\n }\n // 2. a user with a status property\n else if( isset($data['screen_name']) ){\n if( ! empty($data['protected']) ){\n // protected user must have status removed\n // @todo any other sensitive properties?\n $data['status'] = array( 'proxy_removed' => true );\n }\n }\n // 3. a list of statuses, or users\n else {\n $depth++;\n foreach( $data as $i => $struct ){\n $data[$i] = self::filter_protected_users( $struct, $depth );\n }\n }\n return $data;\n }", "private function filterUsers($users)\n {\n $keywordArray = explode(',', $this->webRequest->keywords);\n if ($keywordArray && count($keywordArray) == 1 && empty($keywordArray[0]))\n {\n $keywordArray = null;\n }\n $filteredUsers = array();\n\n foreach ($users as $user)\n {\n //$filteredUsers[] = $user;\n $addUser = true;\n\n if (!empty($this->webRequest->minimumFriends) && $user->friends_count < $this->webRequest->minimumFriends)\n {\n $addUser = false;\n }\n if ($addUser && !empty($this->webRequest->maximumFriends) && $user->friends_count > $this->webRequest->maximumFriends)\n {\n $addUser = false;\n }\n if (!empty($this->webRequest->minimumFollowers) && $user->followers_count < $this->webRequest->minimumFollowers)\n {\n $addUser = false;\n }\n if ($addUser && !empty($this->webRequest->maximumFollowers) && $user->followers_count > $this->webRequest->maximumFollowers)\n {\n $addUser = false;\n }\n if ($addUser && $this->webRequest->friendToFollowerRatio == FTF_WebRequest::FOLLOWERS_GREATER_THAN_FRIENDS && $user->followers_count < $user->friends_count)\n {\n $addUser = false;\n }\n if ($addUser && $this->webRequest->friendToFollowerRatio == FTF_WebRequest::FRIENDS_GREATER_THAN_FOLLOWERS && $user->followers_count > $user->friends_count)\n {\n $addUser = false;\n }\n\n if (isset($keywordArray) && count($keywordArray) > 0)\n {\n $keywordMatch = false;\n\n foreach ($keywordArray as $keyword)\n {\n $keyword = trim($keyword);\n $position = stripos($user->description, $keyword);\n if ($position !== false)\n {\n $user->description = str_ireplace($keyword, '<strong>' . $keyword . '</strong>', $user->description);\n $keywordMatch = true;\n }\n }\n\n if (!$keywordMatch)\n {\n $addUser = false;\n }\n }\n\n if ($addUser)\n {\n $filteredUsers[] = $user;\n }\n\n }\n\n return $filteredUsers;\n }", "public function collectUserAll()\n\t{\n\t\t/**\n\t\t * Return new data collection\n\t\t *\n\t\t * @var array\n\t\t **/\n\t\t$data \t= [];\n\t\t$range = null;\n\t\t$range \t= $this->getTimeRangeDefault();\n\t\t// if(is_null($this->time_start) AND is_null($this->time_end)) {\n\t\t// } else {\n\t\t// \t$range \t= $this->getTimeRange();\n\t\t// }\n\n\t\t/**\n\t\t * Check if $range is integer or in date format\n\t\t * If its not numeric then coverse into numeric\n\t\t */\n\t\tif(!is_numeric($range['start'])) {\n\t\t\t$range['start'] = strtotime($range['start']);\n\t\t}\n\t\tif(!is_numeric($range['end'])) {\n\t\t\t$range['end'] = strtotime($range['end']);\n\t\t}\n\t\t/**\n\t\t * Add a month so, date now can be included in display\n\t\t */\n\t\t$range['end'] = strtotime('+1 month', $range['end']);\n\t\textract($range);\n\t\t// $start \t= $range['start']; // integer\n\t\t// $end \t= $range['end']; // integer\n\n\t\t$data_user_confirm \t= $this->getUserConfirm();\n\t\t$data_user_all \t\t= $this->getUserAll();\n\t\t$data_meetup \t\t= $this->meetup();\n\t\t$data_event \t\t= $this->event();\n\t\t$data_blogs \t\t= $this->blogs();\n\t\t$data_user_active \t= $this->getUserActive();\n\t\t$data_communities\t= $this->communities();\n\n\t\t$user_confirmed \t= $this->getObjectArray($data_user_confirm);\n\t\t$user_all \t\t\t= $this->getObjectArray($data_user_all);\n\t\t$meetup \t\t\t= $this->getObjectArray($data_meetup);\n\t\t$event \t\t\t\t= $this->getObjectArray($data_event);\n\t\t$blogs \t\t\t\t= $this->getObjectArray($data_blogs);\n\t\t$user_active \t\t= $this->getObjectArray($data_user_active);\n\t\t$communities \t\t= $this->getObjectArray($data_communities);\n\n\n\t\t$total_users \t\t= 0;\n\t\t$total_user_all \t= 0;\n\t\t$total_meetup \t\t= 0;\n\t\t$total_event \t\t= 0;\n\t\t$total_blogs \t\t= 0;\n\t\t$total_user_active\t= 0;\n\t\t$total_communities\t= 0;\n\n\t\twhile($start <= $end)\n\t\t{\n\t\t\t$month = date('Y-m', $start);\n\n\t\t\tif(isset($user_confirmed[$month]))\n\t\t\t{\n\t\t\t\t$data[$month]['month'] \t\t\t\t= $month;\n\t\t\t\t$data[$month]['users'] \t\t\t\t= $user_confirmed[$month];\n\t\t\t\t$data[$month]['total_users']\t\t= ($total_users = $total_users + $user_confirmed[$month]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data[$month]['month'] \t\t\t\t= $month;\n\t\t\t\t$data[$month]['users'] \t\t\t\t= 0;\n\t\t\t\t$data[$month]['total_users'] \t\t= ($total_users);\n\t\t\t}\n\n\t\t\t// Check if meetup month exist\n\t\t\tif(isset($meetup[$month]))\n\t\t\t{\n\t\t\t\t$data[$month]['meetup'] \t\t\t= $meetup[$month];\n\t\t\t\t$data[$month]['total_meetup']\t\t= ($total_meetup = $total_meetup + $meetup[$month]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data[$month]['meetup'] \t\t\t= 0;\n\t\t\t\t$data[$month]['total_meetup']\t\t= ($total_meetup);\n\t\t\t}\n\n\t\t\t// Check if event month exist\n\t\t\tif(isset($event[$month]))\n\t\t\t{\n\t\t\t\t$data[$month]['event'] \t\t\t\t= $event[$month];\n\t\t\t\t$data[$month]['total_event']\t\t= ($total_event = $total_event + $event[$month]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data[$month]['event'] \t\t\t\t= 0;\n\t\t\t\t$data[$month]['total_event']\t\t= ($total_event);\n\t\t\t}\n\n\t\t\t// Check if blogs month exist\n\t\t\tif(isset($blogs[$month]))\n\t\t\t{\n\t\t\t\t$data[$month]['blogs'] \t\t\t\t= $blogs[$month];\n\t\t\t\t$data[$month]['total_blogs']\t\t= ($total_blogs = $total_blogs + $blogs[$month]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data[$month]['blogs'] \t\t\t\t= 0;\n\t\t\t\t$data[$month]['total_blogs']\t\t= ($total_blogs);\n\t\t\t}\n\n\t\t\t// Check month of user_active\n\t\t\t// Then Add User Active Data\n\t\t\tif(isset($user_active[$month]))\n\t\t\t{\n\t\t\t\t$data[$month]['user_active'] \t\t= $user_active[$month];\n\t\t\t\t$data[$month]['total_user_active']\t= ($total_user_active = $total_user_active + $user_active[$month]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data[$month]['user_active'] \t\t= 0;\n\t\t\t\t$data[$month]['total_user_active']\t= ($total_user_active);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Check if data with date as key has been added in variable $data\n\t\t\t * If it exist then increase total numbers,\n\t\t\t * when not add data into variable $data with total data in database table\n\t\t\t */\n\t\t\tif(isset($communities[$month]))\n\t\t\t{\n\t\t\t\t$data[$month]['communities'] \t\t= $communities[$month];\n\t\t\t\t$data[$month]['total_communities']\t= ($total_communities = $total_communities + $communities[$month]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data[$month]['communities'] \t\t= 0;\n\t\t\t\t$data[$month]['total_communities']\t= ($total_communities);\n\t\t\t}\n\n\t\t\t$start = strtotime(\"+1 month\", $start);\n\t\t}\n\n\t\treturn $data;\n\t}", "public function build_exclude_args() {\n\t\t$this->query_vars = wp_parse_args( $this->query_vars, array(\n\t\t\t'group_id' => 0,\n\t\t\t'is_confirmed' => true,\n\t\t) );\n\n\t\t$group_member_ids = $this->get_group_member_ids();\n\n\t\t// We want to get users that are already members of the group\n\t\t$type = 'exclude';\n\n\t\t// We want to get invited users who did not confirmed yet\n\t\tif ( false === $this->query_vars['is_confirmed'] ) {\n\t\t\t$type = 'include';\n\t\t}\n\n\t\tif ( ! empty( $group_member_ids ) ) {\n\t\t\t$this->query_vars[ $type ] = $group_member_ids;\n\t\t}\n\t}", "public function applyuserValidate();", "function scorecardUserCond() {\n //getting all users under this supervisor \n $accessBranchList = $this->_getAccessBranchListArray();\n $accessDeptList = $this->_getAccessDeptListArray();\n $conditions = array();\n\n //$conditions = array();\n if ($accessBranchList != 'all') {\n $branchCndnt = array('User.branch_id' => $accessBranchList);\n $conditions = array_merge($conditions, $branchCndnt);\n }\n\n //$conditions = array();\n if ($accessDeptList != 'all') {\n $deptsCndnt = array('User.department_id' => $accessDeptList);\n $conditions = array_merge($conditions, $deptsCndnt);\n }\n if ($this->Session->read('filterScorecard') != '') {\n\n if ($this->Session->read('filterScorecard.branch_list') != '') {\n $brachCndnt = array('User.branch_id' => $this->Session->read('filterScorecard.branch_list'));\n $conditions = array_merge($conditions, $brachCndnt);\n } else {\n $this->Session->delete('filterData');\n }\n }\n return $conditions;\n }", "static function getNonUsers($params){\n $con = $params['dbconnection'];\n $users = [];\n $where = \"\";\n if($params['search'] != ''){\n $where .= \" AND (`phone` ='{$params['search']}')\";\n }\n if($params['greater_than'] != \"\" && $params['less_than']){\n $where .= \" AND `created_at` > '{$params['greater_than']}' AND `created_at` < '{$params['less_than']}'\";\n $params['index'] = 0;\n $params['index2'] = 100000;\n }\n if($params['start_date'] != \"\" && $params['end_date']){\n $where .= \" AND `created_at` > '{$params['start_date']}' AND `created_at` < '{$params['end_date']}'\";\n }\n if(isset($params['filterby'])){\n if($params['filterby'] == \"premier\"){\n $where .= \" AND `premier_user`='1'\";\n }\n }\n $usersCount = \"\";\n if($usersCount = $con->query(\"SELECT `id` FROM `non_registered_users`\n\tWHERE `id`=`id` \".$where.\"\")\n ){\n $usersCount = $usersCount->num_rows;\n }\n $query = \"SELECT * FROM `non_registered_users`\n\tWHERE `id`=`id` \".$where.\"\n\tORDER BY `id` DESC LIMIT \".$params['index'].\",\".$params['index2'].\" \";\n $result = mysqli_query($con, $query);\n if(mysqli_error($con) != ''){\n return \"mysql_Error:-\".mysqli_error($con);\n }\n if(mysqli_num_rows($result) > 0){\n while($row = mysqli_fetch_assoc($result)){\n $users[] = $row;\n }\n }\n if($usersCount != ''){\n return [\"users\" => $users, \"usersCount\" => $usersCount];\n }\n else{\n return '';\n }\n }", "function processDailyRoutine() {\n\t\t$module = CMS_modulesCatalog::getByCodename('cms_ldap');\n\t\t$parameter = $module->getParameters('CHECK_LDAP_USERS_DAILY');\n\t\tif (sensitiveIO::isPositiveInteger($parameter)) {\n\t\t\t//get all LDAP users ID and DN\n\t\t\t$users = CMS_ldap_userCatalog::getAll(true, false, false);\n\t\t\tif (!$users) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//Load LDAP options\n\t\t\t$options = CMS_module_cms_ldap::getLdapConfig();\n\t\t\tif (!$options) {\n\t\t\t\t$this->raiseError(\"Daily routine error : cannot get LDAP options\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$ldapOptions = $options->ldap->toArray();\n\t\t\t//load delete param\n\t\t\t$deleteParameter = $module->getParameters('DELETE_INVALID_LDAP_USERS');\n\t\t\ttry {\n\t\t\t\t//get user infos according to options\n\t\t\t\t$ldap = new Zend_Ldap($ldapOptions);\n\t\t\t\tif ($ldap) {\n\t\t\t\t\tforeach ($users as $userId => $dn) {\n\t\t\t\t\t\t//check if DN exists\n\t\t\t\t\t\tif (!$ldap->exists($dn)) {\n\t\t\t\t\t\t\t//load invalid user\n\t\t\t\t\t\t\t$invalidUser = CMS_ldap_userCatalog::getByID($userId);\n\t\t\t\t\t\t\tif ($invalidUser) {\n\t\t\t\t\t\t\t\tif (sensitiveIO::isPositiveInteger($deleteParameter)) {\n\t\t\t\t\t\t\t\t\t$invalidUser->setDeleted(true);\n\t\t\t\t\t\t\t\t\t$invalidUser->setActive(false);\n\t\t\t\t\t\t\t\t\t$log = new CMS_log();\n\t\t\t\t\t\t\t\t\t$log->logMiscAction(CMS_log::LOG_ACTION_PROFILE_USER_EDIT, $invalidUser, \"Daily routine : Auto delete invalid LDAP user : \".$invalidUser->getFullName());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$invalidUser->setActive(false);\n\t\t\t\t\t\t\t\t\t$log = new CMS_log();\n\t\t\t\t\t\t\t\t\t$log->logMiscAction(CMS_log::LOG_ACTION_PROFILE_USER_EDIT, $invalidUser, \"Daily routine : Auto desactivate invalid LDAP user : \".$invalidUser->getFullName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$invalidUser->writeToPersistence();\n\t\t\t\t\t\t\t\tunset($invalidUser);\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} catch (Exception $e) {\n\t\t\t\t$this->raiseError(\"Daily routine error : \".$e->getMessage());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "public function test_availableusersexcludesinactivewhenexcludinginactive() {\n $this->load_csv_data();\n $this->assign_track_enrol_permissions();\n set_config('siteguest', '');\n set_config('siteadmins', '');\n\n pm_set_config('legacy_show_inactive_users', 0);\n elis::$config = new elis_config();\n\n $usersrecset = usertrack::get_available_users(1);\n $users = array();\n foreach ($usersrecset as $key => $user) {\n $users[$key] = $user;\n }\n unset($usersrecset);\n\n // Note: this includes the user we are currently using for permissions reasons.\n $this->assertEquals(3, count($users));\n\n // Validate first user.\n $this->assertArrayHasKey(102, $users);\n $user = $users[102];\n $this->assertEquals($user->username, 'unassignedactive');\n\n // Validate second user.\n $this->assertArrayHasKey(103, $users);\n $user = $users[103];\n $this->assertEquals($user->username, 'anotherunassignedactive');\n\n // Validate count.\n $count = usertrack::count_available_users(1);\n $this->assertEquals(3, $count);\n }", "function getUsers($post)\r\n {\r\n $dt = new DataTable();\r\n\r\n $columns = array(\r\n 'Username',\r\n 'LastName',\r\n 'EmailID',\r\n 'r.Title',\r\n 'u.Status'\r\n );\r\n\r\n $cond = '';\r\n\r\n $clauses = $dt->getClauses($columns, $post);\r\n\r\n if (isset($post['UserRole']) && $post['UserRole'] != '') {\r\n $cond .= (($cond == '') ? \" WHERE \" : \" AND \") . \" u.RoleID = \" . $post['UserRole'] . \" \";\r\n }\r\n\r\n if (isset($post['UserStatus']) && $post['UserStatus'] != '') {\r\n $cond .= (($cond == '') ? \" WHERE \" : \" AND \") . \" u.Status = '\" . $post['UserStatus'] . \"' \";\r\n }\r\n\r\n $qry = \"SELECT SQL_CALC_FOUND_ROWS u.*, r.Title Role FROM users u INNER JOIN roles r ON r.RoleID = u.RoleID $cond \";\r\n $qry .= $clauses['clauses'];\r\n $records = $this->getRecords($qry, $clauses['params'], true);\r\n\r\n $data = array();\r\n foreach ($records as $record) {\r\n $disabled = $record['Status'] == 'Deleted' ? 'disabled' : '';\r\n $checked = $record['Status'] == 'Active' ? 'checked' : '';\r\n\r\n $checkbox_column = \"<div class='checkbox checkbox-info'><input type='checkbox' name='UserIDs[]' class='UserID' role='$record[RoleID]' id='U$record[UserID]' value='$record[UserID]' $disabled /><label for='U$record[UserID]'>&nbsp;</label></div>\";\r\n $toggle_column = \"<label class='switch'><input type='checkbox' id='toggle\" . $record['UserID'] . \"' class='status-switch user-toggle' data-user-id='\" . $record['UserID'] . \"' data-last-name='\" . $record['LastName'] . \"' $checked ><span class='slider round'></span></label>\";\r\n if ($record['Status'] == 'Deleted') {\r\n $checkbox_column = \"\";\r\n $toggle_column = \"\";\r\n }\r\n\r\n $data[] = array(\r\n $checkbox_column,\r\n $record['Username'],\r\n $record['LastName'],\r\n $record['EmailID'],\r\n $record['Role'],\r\n $record['Status'],\r\n $toggle_column\r\n );\r\n }\r\n $total_records = $this->getOne('SELECT FOUND_ROWS()');\r\n return array(\r\n \"draw\" => intval($post['draw']),\r\n \"recordsTotal\" => $total_records,\r\n \"recordsFiltered\" => $total_records,\r\n \"data\" => $data\r\n );\r\n }", "public function userStatistics(){\n\n\t\t//\tFetch form filters\n\t\t$date = date('Y-m-d');\n\t\t$from = Input::get('start');\n\t\tif(!$from) $from = date('Y-m-01');\n\n\t\t$to = Input::get('end');\n\t\tif(!$to) $to = $date;\n\t\t\n\t\t$selectedUser = Input::get('user');\n\t\tif(!$selectedUser)$selectedUser = \"\";\n\t\telse $selectedUser = \" USER: \".User::find($selectedUser)->name;\n\n\t\t$reportTypes = array('Summary', 'Patient Registry', 'Specimen Registry', 'Tests Registry', 'Tests Performed');\n\n\t\t$selectedReport = Input::get('report_type');\n\t\tif(!$selectedReport)$selectedReport = 0;\n\n\t\tswitch ($selectedReport) {\n\t\t\tcase '1':\n\t\t\t\t$reportData = User::getPatientsRegistered($from, $to.' 23:59:59', Input::get('user'));\n\t\t\t\t$reportTitle = Lang::choice('messages.user-statistics-patients-register-report-title',1);\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t$reportData = User::getSpecimensRegistered($from, $to.' 23:59:59', Input::get('user'));\n\t\t\t\t$reportTitle = Lang::choice('messages.user-statistics-specimens-register-report-title',1);\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\t$reportData = User::getTestsRegistered($from, $to.' 23:59:59', Input::get('user'));\n\t\t\t\t$reportTitle = Lang::choice('messages.user-statistics-tests-register-report-title',1);\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t$reportData = User::getTestsPerformed($from, $to.' 23:59:59', Input::get('user'));\n\t\t\t\t$reportTitle = Lang::choice('messages.user-statistics-tests-performed-report-title',1);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$reportData = User::getSummaryUserStatistics($from, $to.' 23:59:59', Input::get('user'));\n\t\t\t\t$reportTitle = Lang::choice('messages.user-statistics-summary-report-title',1);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$reportTitle = str_replace(\"[FROM]\", $from, $reportTitle);\n\t\t$reportTitle = str_replace(\"[TO]\", $to, $reportTitle);\n\t\t$reportTitle = str_replace(\"[USER]\", $selectedUser, $reportTitle);\n\t\t\n\t\treturn View::make('reports.userstatistics.index')\n\t\t\t\t\t->with('reportTypes', $reportTypes)\n\t\t\t\t\t->with('reportData', $reportData)\n\t\t\t\t\t->with('reportTitle', $reportTitle)\n\t\t\t\t\t->with('selectedReport', $selectedReport)\n\t\t\t\t\t->withInput(Input::all());\n\t}", "function collectCourseUserInforamtion($courseUserID, $courseUserLogData, $courseActionItem, $courseStandardArray, &$userPass) {\n $userPass = true;\n $courseUserTableForm = array();\n \n //compare time or score\n $courseTime = calculateInteTime($courseUserLogData);\n $courseTimeStandard = (($courseStandardArray['course']['timeCheck']==\"0\")?'':\n (($courseStandardArray['course']['time']==\"0\")?'':\n $courseStandardArray['course']['time']));\n $courseTimePass = (($courseTime >= $courseTimeStandard) ?true :false);\n $courseScore = 0;\n $courseScoreStandard = 0;\n $courseScorePass = (($courseScore >= $courseScoreStandard) ?true :false);\n \n //course\n $courseUserTableForm['course'] = array('time'=>$courseTime,\n 'score'=>$courseScore,\n 'timeStandard'=>$courseTimeStandard,\n 'scoreStandard'=>$courseScoreStandard,\n 'timePass'=>$courseTimePass,\n 'scorePass'=>$courseScorePass\n );\n //user pass array edit\n if ( !($courseUserTableForm['course']['timePass'] AND\n $courseUserTableForm['course']['scorePass']) ) {\n $userPass = false;\n }\n \n //action item\n foreach($courseActionItem as $courseActionItemOne) {\n \n\n //insert switch action item\n if ( !$courseActionItemOne = courseActionItemCheck($courseActionItemOne) ) {\n //if not need action item break the count\n break; //once error all not count (nerro error capical\n }\n //setup action time\n $courseActionTime = 0;\n switch ($courseActionItemOne->itemmodule) {\n case 'lesson': //單元課程\n $courseActionTime = 0; //setup action time\n $lessonID = $courseActionItemOne->iteminstance;\n if ( $lessonTime = caculateLessonTime($userID, $courseID, $lessonID) ) {\n $courseActionTime = $lessonTime;\n }\n break;\n case 'assignment': //作業\n $courseActionTime = 0; //setup action time\n break;\n case 'quiz': //考試\n $courseActionTime = 0; //setup action time\n $quizID = $courseActionItemOne->iteminstance;\n if ( $quizTime = caculateQuizTime($userID, $courseID, $quizID) ) {\n $courseActionTime = $quizTime;\n }\n break;\n case 'hotpot': //hot potato test\n $courseActionTime = 0; //setup action time\n $hotpotID = $courseActionItemOne->iteminstance;\n if ( $hotpotTime = caculateHotPotTime($userID, $courseID, $hotpotID) ) {\n $courseActionTime = $hotpotTime;\n }\n break;\n case 'scorm': //SCORM/AICC 課程包\n $courseActionTime = 0; //setup action time\n $scormID = $courseActionItemOne->iteminstance;\n if ( $quizTime = caculateScormTime($userID, $courseID, $scormID) ) {\n $courseActionTime = $quizTime;\n }\n break;\n }\n\n $courseActionScore = getCourseActionScore($courseActionItemOne->id, $courseUserID);\n $courseActionScore = round($courseActionScore->finalgrade, 1);\n //read action time standard\n $courseActionTimeStandard = (($courseStandardArray[$courseActionItemOne->id]['timeCheck']==\"0\")?'':\n (($courseStandardArray[$courseActionItemOne->id]['time']==\"0\")?'':\n $courseStandardArray[$courseActionItemOne->id]['time']));\n \n $courseActionScoreStandard = (($courseStandardArray[$courseActionItemOne->id]['scoreCheck']==\"0\")?'':\n (($courseStandardArray[$courseActionItemOne->id]['score']==\"0\")?'':\n $courseStandardArray[$courseActionItemOne->id]['score']));\n \n $courseActionTimePass = ($courseActionTime >= $courseActionTimeStandard) ?true :false;\n $courseActionScorePass = ($courseActionScore >= $courseActionScoreStandard) ?true :false;\n \n $courseUserTableForm[$courseActionItemOne->itemname] = array('time'=>$courseActionTime,\n 'score'=> $courseActionScore,\n 'timeStandard'=>$courseActionTimeStandard,\n 'scoreStandard'=>$courseActionScoreStandard,\n 'timePass'=>$courseActionTimePass,\n 'scorePass'=>$courseActionScorePass\n );\n //user pass array edit\n if ( !($courseUserTableForm[$courseActionItemOne->itemname]['timePass'] AND\n $courseUserTableForm[$courseActionItemOne->itemname]['scorePass']) ) {\n $userPass = false;\n }\n }\n //var_dump($courseUserTableForm);\n return $courseUserTableForm;\n}", "function produceCourseUserArray($userID, $courseID, $courseUserLogData, &$userPass) {\n global $DB;\n\n //relating function produceUserCourseLog\n //use produceUserCourseLog's return as input $courseUserLogData\n\n if( !$user = $DB->get_record('user', array('id'=>$userID)) ) {\n return false;\n //error('不正確的學員名稱!');\n }\n\n if( !$courseusers = get_course_students($courseID) ) {\n return false;\n //error('這門課程目前沒有學生參加!');\n }\n\n if ( !$courseActionItem = getCourseActionItem($courseID) ) {\n return false;\n //error('課程未有活動!');\n }\n\n if ( !$courseStandardArray = getReportModuleConfig($courseID) ) {\n return false;\n //error('課程尚未設定!');\n }\n\n //set user pass is true, if has any false it will false\n $userPass = true;\n\n //compare time or score\n //compare course action course\n if ($courseStandardArray['course']['timeCheck']) {\n //compare time\n $timeEnable = true;\n $courseTime = calculateInteTime($courseUserLogData);\n $courseTimeStandard = ($courseStandardArray['course']['time'])\n ?$courseStandardArray['course']['time']\n :\"0\";\n $courseFirstDate = calculateFirstDate($courseUserLogData, $courseTimeStandard);\n $courseTimePass = ( ($courseTime >= $courseTimeStandard) ?true :false );\n //compare score\n $scoreEnable = false;\n $courseScore = 0;\n $courseScoreStandard = 0;\n $courseScorePass = true;\n } else {\n //compare time\n $timeEnable = false;\n $courseTime = 0;\n $courseTimeStandard = 0;\n $courseFirstDate = '';\n $courseTimePass = true;\n //compare score\n $scoreEnable = false;\n $courseScore = 0;\n $courseScoreStandard = 0;\n $courseScorePass = true;\n }\n\n //include course action data\n $courseUserArray = array();\n //$courseUserArray['course' or 'modID']['timeCheck' or 'score' ...]\n $courseUserArray['course'] = array( 'timeEnable'=>$timeEnable,\n 'time'=>$courseTime,\n 'date'=>$courseFirstDate,\n 'timeStandard'=>$courseTimeStandard,\n 'timePass'=>$courseTimePass,\n 'scoreEnable'=>$scoreEnable,\n 'score'=>$courseScore,\n 'scoreStandard'=>$courseScoreStandard,\n 'scorePass'=>$courseScorePass\n );\n //user pass array edit\n if ( !($courseUserArray['course']['timePass'] AND\n $courseUserArray['course']['scorePass']) ) {\n $userPass = false;\n }\n\n //compare action item\n foreach($courseActionItem as $courseActionItemOne) {\n //switch action item\n if ( !$courseActionItemOne = courseActionItemCheck($courseActionItemOne) ) {\n //if not need action item break the count\n break;\n }\n\n $courseActionDate = '';\n\n //setup action time\n switch ($courseActionItemOne->itemmodule) {\n case 'lesson': //單元課程\n //compare mod time action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['timeCheck']) {\n //compare time\n $timeEnable = true;\n $courseActionTime = 0; //setup action time\n $lessonID = $courseActionItemOne->iteminstance;\n if ( $lessonTime = caculateLessonTime($userID, $courseID, $lessonID) ) {\n $courseActionTime = $lessonTime;\n }\n //read action time standard\n $courseActionTimeStandard = ($courseStandardArray[$courseActionItemOne->id]['time'])\n ?$courseStandardArray[$courseActionItemOne->id]['time']\n :\"0\";\n $courseActionTimePass = ( ($courseActionTime >= $courseActionTimeStandard) ?true :false );\n } else {\n //compare time\n $timeEnable = false;\n $courseActionTime = 0;\n $courseActionTimeStandard = 0;\n $courseActionTimePass = true;\n }\n //compare mod score action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['scoreCheck']) {\n //compare score\n $scoreEnable = true;\n $courseActionScore = 0;\n $courseActionScore = getCourseActionScore($courseActionItemOne->id, $userID);\n $courseActionScore = round($courseActionScore->finalgrade, 2);\n //read action score standard\n $courseActionScoreStandard = ($courseStandardArray[$courseActionItemOne->id]['score'])\n ?$courseStandardArray[$courseActionItemOne->id]['score']\n :\"0\";\n $courseActionScorePass = ( $courseActionScore >= $courseActionScoreStandard ) ?true :false;\n } else {\n //compare score\n $scoreEnable = false;\n $courseActionScore = 0;\n $courseActionScoreStandard = 0;\n $courseActionScorePass = true;\n }\n break;\n case 'assignment': //作業\n //compare mod time action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['timeCheck']) {\n //compare time\n $timeEnable = true;\n $courseActionTime = 0; //setup action time\n $courseActionTimeStandard = 0;\n $courseActionTimePass = true;\n } else {\n //compare time\n $timeEnable = false;\n $courseActionTime = 0;\n $courseActionTimeStandard = 0;\n $courseActionTimePass = true;\n }\n //compare mod score action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['scoreCheck']) {\n //compare score\n $scoreEnable = true;\n $courseActionScore = 0;\n $courseActionScore = getCourseActionScore($courseActionItemOne->id, $userID);\n $courseActionScore = round($courseActionScore->finalgrade, 2);\n //read action score standard\n $courseActionScoreStandard = ($courseStandardArray[$courseActionItemOne->id]['score'])\n ?$courseStandardArray[$courseActionItemOne->id]['score']\n :\"0\";\n $courseActionScorePass = ( $courseActionScore >= $courseActionScoreStandard ) ?true :false;\n } else {\n //compare score\n $scoreEnable = false;\n $courseActionScore = 0;\n $courseActionScoreStandard = 0;\n $courseActionScorePass = true;\n }\n break;\n case 'quiz': //考試\n //compare mod time action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['timeCheck']) {\n //compare time\n $timeEnable = true;\n $courseActionTime = 0; //setup action time\n $quizID = $courseActionItemOne->iteminstance;\n if ( $quizTime = caculateQuizTime($userID, $courseID, $quizID) ) {\n $courseActionTime = $quizTime;\n }\n //read action time standard\n $courseActionTimeStandard = ($courseStandardArray[$courseActionItemOne->id]['time'])\n ?$courseStandardArray[$courseActionItemOne->id]['time']\n :\"0\";\n $courseActionTimePass = ( ($courseActionTime >= $courseActionTimeStandard) ?true :false );\n } else {\n //compare time\n $timeEnable = false;\n $courseActionTime = 0;\n $courseActionTimeStandard = 0;\n $courseActionTimePass = true;\n }\n //compare mod score action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['scoreCheck']) {\n //compare score\n $scoreEnable = true;\n $courseActionScore = 0;\n if($courseActionScore = getCourseActionScore($courseActionItemOne->id, $userID))\n $courseActionScore = round($courseActionScore->finalgrade, 2);\n //read action score standard\n $courseActionScoreStandard = ($courseStandardArray[$courseActionItemOne->id]['score'])\n ?$courseStandardArray[$courseActionItemOne->id]['score']\n :\"0\";\n $courseActionScorePass = ( $courseActionScore >= $courseActionScoreStandard ) ?true :false;\n $quizID = $courseActionItemOne->iteminstance;\n if ( $quizDate = caculateQuizDate($userID, $courseID, $quizID) ) {\n $courseActionDate = $quizDate;\n }\n } else {\n //compare score\n $scoreEnable = false;\n $courseActionScore = 0;\n $courseActionScoreStandard = 0;\n $courseActionScorePass = true;\n }\n break;\n case 'hotpot': //hot potato test\n //compare mod time action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['timeCheck']) {\n //compare time\n $timeEnable = true;\n $courseActionTime = 0; //setup action time\n $hotpotID = $courseActionItemOne->iteminstance;\n if ( $hotpotTime = caculateHotPotTime($userID, $courseID, $hotpotID) ) {\n $courseActionTime = $hotpotTime;\n }\n //read action time standard\n $courseActionTimeStandard = ($courseStandardArray[$courseActionItemOne->id]['time'])\n ?$courseStandardArray[$courseActionItemOne->id]['time']\n :\"0\";\n $courseActionTimePass = ( ($courseActionTime >= $courseActionTimeStandard) ?true :false );\n } else {\n //compare time\n $timeEnable = false;\n $courseActionTime = 0;\n $courseActionTimeStandard = 0;\n $courseActionTimePass = true;\n }\n //compare mod score action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['scoreCheck']) {\n //compare score\n $scoreEnable = true;\n $courseActionScore = 0;\n $courseActionScore = getCourseActionScore($courseActionItemOne->id, $userID);\n $courseActionScore = round($courseActionScore->finalgrade, 2);\n //read action score standard\n $courseActionScoreStandard = ($courseStandardArray[$courseActionItemOne->id]['score'])\n ?$courseStandardArray[$courseActionItemOne->id]['score']\n :\"0\";\n $courseActionScorePass = ( $courseActionScore >= $courseActionScoreStandard ) ?true :false;\n } else {\n //compare score\n $scoreEnable = false;\n $courseActionScore = 0;\n $courseActionScoreStandard = 0;\n $courseActionScorePass = true;\n }\n break;\n case 'scorm':\n //compare mod time action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['timeCheck']) {\n //compare time\n $timeEnable = true;\n $courseActionTime = 0; //setup action time\n $scormID = $courseActionItemOne->iteminstance;\n if ( $scormTime = caculateScormTime($userID, $courseID, $scormID) ) {\n $courseActionTime = $scormTime;\n }\n //read action time standard\n $courseActionTimeStandard = ($courseStandardArray[$courseActionItemOne->id]['time'])\n ?$courseStandardArray[$courseActionItemOne->id]['time']\n :\"0\";\n $courseActionTimePass = ( ($courseActionTime >= $courseActionTimeStandard) ?true :false );\n } else {\n //compare time\n $timeEnable = false;\n $courseActionTime = 0;\n $courseActionTimeStandard = 0;\n $courseActionTimePass = true;\n }\n //compare mod score action mod id\n if ($courseStandardArray[$courseActionItemOne->id]['scoreCheck']) {\n //compare score\n $scoreEnable = true;\n $courseActionScore = 0;\n $courseActionScoreStandard = 0;\n $courseActionScorePass = true;\n } else {\n //compare score\n $scoreEnable = false;\n $courseActionScore = 0;\n $courseActionScoreStandard = 0;\n $courseActionScorePass = true;\n }\n break;\n }\n\n $courseUserArray[$courseActionItemOne->id] = array(\n 'itemmodule'=>$courseActionItemOne->itemmodule,\n 'timeEnable'=>$timeEnable,\n 'time'=>$courseActionTime,\n 'timeStandard'=>$courseActionTimeStandard,\n 'timePass'=>$courseActionTimePass,\n 'scoreEnable'=>$scoreEnable,\n 'score'=>$courseActionScore,\n 'scoreStandard'=>$courseActionScoreStandard,\n 'scorePass'=>$courseActionScorePass,\n 'scoreDate'=>$courseActionDate\n );\n //user pass array edit\n if ( !($courseUserArray[$courseActionItemOne->id]['timePass'] AND\n $courseUserArray[$courseActionItemOne->id]['scorePass']) ) {\n $userPass = false;\n }\n }\n return $courseUserArray;\n}", "function application_denied($denied) {\n global $DB;\n foreach($denied as $userid) {\n $applicant_user = $DB->get_record('user', array('id' => $userid, 'auth' => 'manual'));\n if($applicant_user !== null) {\n profile_load_data($applicant_user);\n if(convert_progressstring_to_progressnum($applicant_user->profile_field_applicationprogress) > '1') {\n $applicant_user->profile_field_applicationdenied = '1';\n $applicant_user->profile_field_applicationprogress = convert_progressnum_to_progressstring('1');\n profile_save_data($applicant_user);\n\n email_user_accept_reject($applicant_user, \"denied\");\n $applicant_user->suspended = 1;\n $DB->update_record('user', $applicant_user);\n }\n }\n }\n}", "public function searchUserCon() {\n $data = [ 'users' => '', 'errorMess'=> ''];\n if($_SERVER['REQUEST_METHOD'] === 'GET') { \n if(\n empty($_GET['inputEmail']) && \n empty($_GET['inputDay']) && \n empty($_GET['inputDay']) && \n empty($_GET['inputYear']) &&\n empty($_GET['inputName'])\n ) {\n $data['users'] = $this->userModel->getUsersModel();\n if($data['users'] === false || empty($data['users'])) {\n $data['errorMess'] = 'There are no users found.';\n $data['users'] = '';\n }\n }\n \n if(\n !empty($_GET['inputDay']) && \n !empty($_GET['inputDay']) && \n !empty($_GET['inputYear']) \n ) {\n $tempMonth = str_pad($_GET['inputMonth'], 2, \"0\", STR_PAD_LEFT);\n $tempDay = str_pad($_GET['inputDay'], 2, \"0\", STR_PAD_LEFT);\n $tempDate = $_GET['inputYear'] . '-' . $tempMonth . '-' . $tempDay;\n $tempDate = filterString($tempDate);\n if($tempDate === false) {\n $data['errorMess'] = \"Please enter a valid date.\";\n } else {\n $data['users'] = $this->userModel->searchUserRegistrationModel($tempDate);\n if($data['users'] === false || empty($data['users'])) {\n $data['errorMess'] = 'There are no users found.';\n $data['users'] = '';\n }\n }\n }\n if(\n !empty($_GET['inputName']) &&\n empty($_GET['inputDay']) && \n empty($_GET['inputDay']) && \n empty($_GET['inputYear']) &&\n empty($_GET['inputEmail'])\n ) {\n $tempName = $_GET['inputName'];\n $tempName = filterString($tempName);\n if($tempName === false) {\n $data['errorMess'] = \"Please enter a valid name.\";\n } else {\n $data['users'] = $this->userModel->searchUserNameModel($tempName);\n if($data['users'] === false || empty($data['users'])) {\n $data['errorMess'] = 'There are no users found.';\n $data['users'] = '';\n }\n }\n }\n if(\n !empty($_GET['inputEmail']) && \n empty($_GET['inputDay']) && \n empty($_GET['inputDay']) && \n empty($_GET['inputYear']) &&\n empty($_GET['inputName'])\n ) {\n $tempEmail = $_GET['inputEmail'];\n $tempEmail = filterString($tempEmail);\n if($tempEmail === false) {\n $data['errorMess'] = \"Please enter a valid Email.\";\n } else {\n $data['users'] = $this->userModel->searchUserEmailModel($tempEmail);\n if($data['users'] === false || empty($data['users'])) {\n $data['errorMess'] = 'There are no users found.';\n $data['users'] = '';\n }\n }\n } \n }\n $this->view('/pages/users', $data);\n }", "public function validateUser(){\n // $users = array_keys($rv);\n // $admin_user = getModel('AdminUser');\n // $admin_user->query(\"SELECT admin_user_id, admin_user_name FROM admin_user\");\n // $admin_user->execute();\n // $admin_users = $admin_user->resultset();\n // $admin_user_map = array_merge(...array_map(function($au){\n // return [$au['admin_user_name'] => $au['admin_user_id']];\n // }, $admin_users));\n \n // array_intersect_key($admin_user_map, array_flip($users));\n }", "function exportcondition() {\n //Get the User's access Branch list\n $accessBranchList = $this->_getAccessBranchListArray();\n $accessDeptList = $this->_getAccessDeptListArray();\n $conditions = array();\n\n //$conditions = array();\n if ($accessBranchList != 'all') {\n $branchCndnt = array('User.branch_id' => $accessBranchList);\n $conditions = array_merge($conditions, $branchCndnt);\n }\n\n //$conditions = array();\n if ($accessDeptList != 'all') {\n $deptsCndnt = array('User.department_id' => $accessDeptList);\n $conditions = array_merge($conditions, $deptsCndnt);\n }\n\n\n //pr($conditions);\n //if($this->Session->read('Search.users.filterData')!=''){\n if ($this->Session->read('filterData') != '') {\n //$this->Session->write('filterData',$this->Session->read('Search.vendors.filterData'));\n\n if ($this->Session->read('filterData.branch_list') != '') {\n $brachCndnt = array('User.branch_id' => $this->Session->read('filterData.branch_list'));\n $conditions = array_merge($conditions, $brachCndnt);\n }\n\n if ($this->Session->read('filterData.status_list') != '') {\n $statusCndnt = array('User.user_status' => $this->Session->read('filterData.status_list'));\n $conditions = array_merge($conditions, $statusCndnt);\n }\n\n\n $this->User->bindModel(array('belongsTo' => array(\n 'Branch' => array(\n 'foreignKey' => false,\n 'conditions' => array('User.branch_id = Branch.id')),\n 'Department' => array(\n 'foreignKey' => false,\n 'conditions' => array('User.department_id = Department.id')\n ),\n 'UserType' => array(\n 'foreignKey' => false,\n 'conditions' => array('User.user_level = UserType.id')\n )\n ),\n ), false);\n if (trim($this->Session->read('filterData.searchkeyword')) != 'Search Employee' && trim($this->Session->read('filterData.searchkeyword')) != '') {\n $searchKeywordArr = explode(' ', trim($this->Session->read('filterData.searchkeyword')));\n $OriginalSearchArr = array($this->Session->read('filterData.searchkeyword'));\n $searchKeywordArr = array_merge($searchKeywordArr, $OriginalSearchArr);\n $completeSearchArr = $this->__getSearchCritiera($searchKeywordArr, array('User', 'Branch', 'Department', 'UserType'));\n $keywordCndnt = array('OR ' => $completeSearchArr);\n $conditions = array_merge($conditions, $keywordCndnt);\n }\n }\n return $conditions;\n }", "public function doProcessing()\n\t{\n\t\tglobal $NTvTlevel1,$NTvTlevel2,$NTvTlevel3,$NTvTlevel4,$NTvTlevel5,$NTvTlevel6;\n\n $maxLimit=configVariables::$maxLimit;\n $queryLimit=$maxLimit;\n $loginDtRelax1=configVariables::$loginDtRelax1;\n $loginDtRelax2=configVariables::$loginDtRelax2;\n\t\t$dayOfRelaxation=configVariables::$use60DaysRelaxOnDay;\n\n if($this->receiverObj->getSwitchToDpp()==1)\n {\n $canUseRelaxation=0;\n }\n else\n {\n $relaxlheight=$this->filterBean->getLheightRelax();\n $relaxhheight=$this->filterBean->getHheightRelax();\n $relaxlage=$this->filterBean->getLageRelax();\n $relaxhage=$this->filterBean->getHageRelax();\n $canUseRelaxation=$this->filterBean->getCanUseRelaxation();\n }\n \t$dppCasteVal = $this->filterBean->getCaste();\n\n\t\t$NTvTlevel1++;\n\t\t$this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax1,1,'','','','','','','',$this->communityModelLogic);\n\t\tif($this->profileSetTemp && !$this->communityModelLogic)\n\t\t\t$this->processResults($queryLimit);\n\t\tunset($this->profileSetTemp);\n\n //------\n if(count($this->profileSet)>0)\n {\n $levelCount=count($this->profileSet);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='211';\n\t\t\t\telse\n \t$this->logicLevel[]='21';\n $levelCount--;\n }\n }\n //------\n\n\t\tif($canUseRelaxation && count($this->profileSet) <$maxLimit)//Relaxed forward only 15 days\n\t\t{\n\t\t\t$NTvTlevel5++;\n\t\t\t$queryLimit=$maxLimit-count($this->profileSet);\n \n\t\t\t$this->filterBean->setLheight(intval($this->filterBean->getLheight())-$relaxlheight);\n\t\t\t$this->filterBean->setHheight(intval($this->filterBean->getHheight())+$relaxhheight);\n\t\t\t$this->filterBean->setLage(intval($this->filterBean->getLAge())-$relaxlage);\n\t\t\t$this->filterBean->setHage(intval($this->filterBean->getHAge())+$relaxhage);\n\t\t\t$this->setCasteRelaxation($this->receiverObj->getRecCaste(),$this->filterBean);\n\n\t\t\t$this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax1,1,1,$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);//1,1 was 1,0 PHASE2\n\t\t\tif($this->profileSetTemp)\n\t\t\t\t$this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='221';\n\t\t\t\telse\n \t$this->logicLevel[]='22';\n $levelCount--;\n }\n //------\n\t\t}\n\n\t\tif(count($this->profileSet) <$maxLimit)//Relaxed forward only 60days\n {\n\t\t\t$NTvTlevel6++;\n $queryLimit=$maxLimit-count($this->profileSet);\n $this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,$loginDtRelax2,1,1,$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);//1,1 was 1,0 PHASE2\n if($this->profileSetTemp)\n $this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='231';\n\t\t\t\telse\n \t$this->logicLevel[]='23';\n $levelCount--;\n }\n //------\n\n }\n\n\t\t$gap=configVariables::getNoOfDays();\n\t\tif($gap%7==$dayOfRelaxation)\n\t\t{\n if(count($this->profileSet) <$maxLimit)//Relaxed forward only + no_login_dt\n {\n $NTvTlevel6++;\n $queryLimit=$maxLimit-count($this->profileSet);\n\n\t\t\t\tif($canUseRelaxation)\n {\n\t\t\t\t\t$this->filterBean->setLheight(intval($this->filterBean->getLheight())-$relaxlheight);\n\t\t\t\t\t$this->filterBean->setHheight(intval($this->filterBean->getHheight())+$relaxhheight);\n\t\t\t\t\t$this->filterBean->setLage(intval($this->filterBean->getLAge())-$relaxlage);\n\t\t\t\t\t$this->filterBean->setHage(intval($this->filterBean->getHAge())+$relaxhage);\n\t\t\t\t\t$this->setCasteRelaxation($this->receiverObj->getRecCaste(),$this->filterBean);\n\t\t\t\t}\n\n $this->profileSetTemp=$this->runDBQuery($this->receiverObj,$this->filterBean,$this->profileSet,$this->db,$this->isMatchesTrending,'',1,'',$queryLimit,'LAST_LOGIN_DT DESC','','','','',$this->communityModelLogic);\n if($this->profileSetTemp)\n $this->profileSet=array_merge($this->profileSet,$this->profileSetTemp);\n //------\n $levelCount=count($this->profileSet)-count($this->logicLevel);\n while($levelCount>0)\n {\n\t\t\t\t\tif($this->communityModelLogic)\n \t$this->logicLevel[]='241';\n\t\t\t\t\telse\n \t$this->logicLevel[]='24';\n $levelCount--;\n }\n //------\n }\n }\n\n if(count($this->profileSet)<$maxLimit)//NT PROFILEIS NOT SENT\n {\n\t\t\t//NEED TO IMPLEMENT LATER\n }\n if(count($this->profileSet)<$maxLimit)\n {\n\t\t\t//TRACKING CODE\n }\n if(count($this->profileSet))\n $this->logRecords($this->profileSet,$this->receiverObj->getPartnerProfile()->getProfileId(),$this->db,configVariables::$strategyNtVsTLogic,$this->logicLevel,$this->frequency);\n else\n\t\t{\n $gap=configVariables::getNoOfDays();\n $zeropid=$this->receiverObj->getPartnerProfile()->getProfileId();\n $sql_y=\"INSERT INTO matchalerts.ZERONTvT(PROFILEID,DATE) VALUES($zeropid,$gap)\";\n mysql_query($sql_y,$this->db) or logerror1(\"In matchalert_mailer.php\",$sql_y);\n ;// some tarck for 0 res\n\t\t}\n\n\t}", "function request_delete_before ($data)\n{\n\tforeach ($data as $d) {\n\t\t$ug_id = $d[\"id\"];\n\n\t\t$q = \"\n\t\t\tselect\tcount(PA._user_id) as n\n\t\t\tfrom\t_profile_admin\tPA\n\t\t\t,\t\t_user_group\t\tUG\n\t\t\twhere\tPA._user_id\t\t= UG._user_id\n\t\t\tand\t\tUG.id\t\t\t= $ug_id\n\t\t\t\";\n\n\t\t$rs = Jaring::db_execute ($q, null);\n\n\t\tif ((int) $rs[0][\"n\"] > 0) {\n\t\t\tthrow new Exception (Jaring::$MSG_ADMIN_PROFILE);\n\t\t}\n\t}\n}", "function getUsers($data){\n\tif(count($data) > 0){\n\t\t//f\t\tunciones para traer usuarios\n\t\tswitch ($data['action']) {\n\t\t\tcase 'login':\n\t\t\tlogin($data);\n\t\t\tbreak;\n\t\t\tcase 'getUserById':\n\t\t\tgetUserById($data);\n\t\t\tbreak;\n\t\t\tcase 'getUserBySskey':\n\t\t\tgetUserBySskey($data);\n\t\t\tbreak;\n\t\t\tcase 'getAll':\n\t\t\tgetAllUsers($data);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\tprint_r($errors);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\telse{\n\t\tgetAllUsers($data);\n\t}\n}" ]
[ "0.62800366", "0.6097327", "0.5944596", "0.58961034", "0.58956957", "0.58252895", "0.5803892", "0.5775779", "0.5714853", "0.5657078", "0.5546633", "0.54405427", "0.54296106", "0.5420913", "0.5404726", "0.5396868", "0.53926724", "0.53406906", "0.53305477", "0.5312344", "0.53062224", "0.530366", "0.5282832", "0.5248866", "0.52357763", "0.5232741", "0.52289474", "0.5221263", "0.52203286", "0.52165973" ]
0.6114536
1
Grabs list of replies for getThreadData() function
protected function getThreadReplies($thread, $data) { $output = array(); //limits $start = 0; $max = 20; if(isset($data['start'])){ $start = intval($data['start']); } if(isset($data['limit'])){ $max = intval($data['limit']); } $limit = 'LIMIT '.$start.', '.$max; $sort = 'postTime ASC'; if(isset($data['sort'])){ switch($data['sort']){ case 'asc': $sort = 'postTime ASC'; break; case 'desc': $sort = 'postTime DESC'; break; } } $sql = 'SELECT postId, userId, content, postTime, editTime, editedBy FROM forum_posts WHERE topicId = :topicId AND buried = 0 AND trollPost = 0 ORDER BY '.$sort.' '.$limit; $getPosts = $this->fetchAll($sql, array(':topicId' => $thread['topicId'])); $profile = new \App\Profile\User_Model; foreach($getPosts as &$post){ //get profile data if(!isset($data['no-profiles']) OR ($data['no-profiles'] != 'true' AND intval($data['no-profiles']) !== 1)){ $post['author'] = $profile->getUserProfile($post['userId'], $data['site']['siteId'], array('groups' => false)); unset($post['author']['pubProf']); unset($post['author']['showEmail']); unset($post['author']['email']); unset($post['author']['lastAuth']); } //HTML stripping if(isset($data['strip-html']) AND (intval($data['strip-html']) === 1 OR $data['strip-html'] == 'true')){ $post['content'] = strip_tags($post['content']); if(isset($post['author'])){ foreach($post['author']['profile'] as &$profileItem){ foreach($profileItem as &$profileValue){ $profileValue = strip_tags($profileValue); } } } } //markdown parsing if(isset($data['parse-markdown']) AND (intval($data['parse-markdown']) === 1 OR $data['parse-markdown'] == 'true')){ $post['content'] = markdown($post['content']); if(isset($post['author'])){ foreach($post['author']['profile'] as &$profileItem){ if($profileItem['type'] == 'textarea'){ $profileItem['value'] = markdown($profileItem['value']); } } } } } $output = $getPosts; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bbp_thread_replies()\n{\n}", "function bbp_replies()\n{\n}", "public function get_thread_data()\n {\n $data = $this->get_tree();\n $depth = array();\n $children = array();\n\n $this->build_thread_data($data, $depth, $children);\n\n return array($depth, $children);\n }", "public function getThreadList()\n\t{\n\t\t$input = Request::all();\n\t\t$limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n\n\t\t$input['current_user_id'] = Auth::id();\n\t\t$threadLists = $this->service->getThreadList($input);\n\n\t\treturn $this->getResponse($threadLists, new MessageThreadTransformer($input), $this->response, $limit);\n\t}", "function get_ticket_replies($tid)\r\n{\r\n//Get the ticket information and the userlevel and name of the creator of each reply.\r\n$statement = $this->\r\nmysqli->\r\nprepare(\"SELECT rid, reply.uid, message, UNIX_TIMESTAMP(tstamp) AS tstamp, user.userlevel, userdata.name FROM reply INNER JOIN user ON reply.uid = user.uid INNER JOIN userdata ON reply.uid = userdata.uid WHERE tid=?;\");\r\n$statement->\r\nbind_param(\"s\", $tid);\r\n$statement->\r\nexecute();\r\n$statement->\r\nstore_result();\r\n$numrows = $statement->\r\nnum_rows;\r\n\r\n//Check for errors.\r\nif($numrows \r\n< 1) {\r\n$this->\r\nerror = \"No replies\";\r\n$statement->\r\nclose();\r\nreturn false;\r\n} elseif($this->\r\nmysqli->\r\nerror) {\r\n$this->\r\nerror = \"Database error, user not added.\";\r\n$statement->\r\nclose();\r\nreturn false;\r\n} else {\r\n//Bind the results and store them in a multidimensional array. \r\n$statement->\r\nbind_result($rid, $uid, $message, $tstamp, $userlevel, $name);\r\n\r\nfor ($i=0; $i \r\n< $numrows; $i++) { \r\n$statement->\r\nfetch();\r\n$row = array('rid' =>\r\n$rid, 'uid' =>\r\n$uid, 'message' =>\r\n$message, 'tstamp' =>\r\n$tstamp, 'userlevel' =>\r\n$userlevel, 'name' =>\r\n$name);\r\n$rows[] = $row;\r\n}\r\n$statement->\r\nclose();\r\n\r\nreturn $rows;\r\n}\r\n}", "public function replies()\n {\n // return $this->hasMany(Reply::class, 'thread_id', 'id')\n // ->withCount('favorites')\n // ->with('owner');\n return $this->hasMany(Reply::class, 'thread_id', 'id'); // 预加载已经在Reply进行了\n }", "public function sitewideforum_get_topic_replies() {\n $this->init('forums');\n\n $oReturn = new stdClass();\n\n $mForumExists = $this->sitewideforum_check_topic_existence();\n\n if ($mForumExists !== true)\n return $this->error('forums', $mForumExists);\n foreach ($this->topicid as $iId) {\n global $wpdb;\n $aReplies = $wpdb->get_results($wpdb->prepare(\n \"SELECT ID, post_parent, post_author, post_title, post_date, post_modified, post_content\n FROM $wpdb->posts\n WHERE post_type='reply'\n AND post_parent='\" . $iId . \"'\"\n ));\n\n if (empty($aReplies)) {\n $oReturn->topics[$iId]->replies = \"\";\n $oReturn->topics[$iId]->count = 0;\n continue;\n }\n foreach ($aReplies as $oReply) {\n $oUser = get_user_by('id', (int) $oReply->post_author);\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->author[(int) $oReply->post_author]->username = $oUser->data->user_login;\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->author[(int) $oReply->post_author]->mail = $oUser->data->user_email;\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->author[(int) $oReply->post_author]->display_name = $oUser->data->display_name;\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->date = $oReply->post_date;\n if ($this->display_content !== false)\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->content = $oReply->post_content;\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->last_changes = $oReply->post_modified;\n $oReturn->topics[$iId]->replies[(int) $oReply->ID]->title = $oReply->post_title;\n }\n $oReturn->topics[$iId]->count = count($aReplies);\n }\n\n return $oReturn;\n }", "public function queryThreads ()\n\t{\n\t\treturn $this->data->queryThreads ();\n\t}", "public function get_thread_replies($thread_id, $options = array())\n {\n $sql = \"\n SELECT p.*,\n a.username author_name,\n a.id author_id,\n a.title author_title,\n a.experience author_experience,\n a.guild author_guild,\n a.avatar author_avatar,\n a.class author_class,\n a.signature author_signature,\n s.score,\n ws.score window_score,\n v.score user_vote\n\n FROM forum_posts p\n LEFT JOIN cms_accounts a ON p.author_id = a.id\n\n LEFT JOIN votes v ON v.entity_type = 'forum_posts' AND v.entity_id = p.id AND v.account_id = :account_id\n\n LEFT JOIN (\n SELECT entity_id, \n SUM(score) AS score\n FROM votes\n WHERE entity_type = 'forum_posts'\n GROUP BY entity_id\n ) s ON p.id = s.entity_id\n\n LEFT JOIN (\n SELECT entity_id, \n SUM(score) AS score\n FROM votes\n WHERE entity_type = 'forum_posts'\n AND date_created >= :score_window\n GROUP BY entity_id\n ) ws ON p.id = ws.entity_id\n\n WHERE p.thread_id = :thread_id\n ORDER BY p.date_created ASC\n \";\n $results = $this->db->query_all($sql, array(\n ':thread_id' => $thread_id, \n ':score_window' => date('Y-m-d H:i:s', FORUM_SCORE_WINDOW_DATE),\n ':account_id' => $this->auth->get_user_id()\n ));\n return $results;\n }", "function getMessageThread($mgsid)\n {\n $varID = 'fkSupportID =' . $mgsid;\n $varOrderBy = 'ReplyDateAdded ASC ';\n $arrClms = array(\n 'ReplySubject', 'ReplyMessage', 'pkReplyID', 'fkFromID', 'fkToID', 'fkSupportID', 'ReplyDateAdded'\n );\n $varTable = TABLE_SUPPORT_REPLY;\n $arrRow = $this->select($varTable, $arrClms, $varID, $varOrderBy);\n return $arrRow;\n }", "function bbp_get_reply_content($reply_id = 0)\n{\n}", "private function _getThreadDs()\n {\n return Wekit::load('forum.PwThread');\n }", "public function getReplies($thread_id, $returnSelect = false)\r\n {\r\n \t$select = $this->select()->setIntegrityCheck(false)\r\n \t\t\t\t\t->from(array(\"r\" => \"gruppen_thread_replies\"), array(\"*\"))\r\n\t\t\t\t\t\t->join(array(\"u\" => \"users\"), \"u.user_id = r.writer_id\", array(\"firstname\", \"lastname\", \"nickname\", \"image_id_m\", \"image_id_s\")) \r\n \t\t\t\t\t->where(\"r.thread_id = ?\", $thread_id)\r\n \t\t\t\t\t->order(\"r.date_add DESC\");\r\n \tif($returnSelect)\r\n \t\treturn $select;\r\n \treturn $this->fetchAll($select);\r\n }", "function bbp_member_forums_screen_replies()\n{\n}", "protected function getThreadData($thread, $data)\n\t{\n\t\t$output = array();\n\t\t//unset some uneccessary data\n\t\tunset($thread['trollPost']);\n\t\tunset($thread['buried']);\n\t\tunset($thread['buriedBy']);\n\t\tunset($thread['buryTime']);\n\t\t//get category and board data\n\t\t$getBoard = $this->get('forum_boards', $thread['boardId']);\n\t\t$thread['boardName'] = $getBoard['name'];\n\t\t$thread['boardSlug'] = $getBoard['slug'];\n\t\t$getCat = $this->get('forum_categories', $getBoard['categoryId']);\n\t\t$thread['categoryId'] = $getBoard['categoryId'];\n\t\t$thread['categoryName'] = $getCat['name'];\n\t\t$thread['categorySlug'] = $getCat['slug'];\n\t\t//reply count\n\t\t$countReplies = $this->fetchSingle('SELECT count(*) as total FROM forum_posts WHERE topicId = :topicId AND buried = 0 AND trollPost = 0',\n\t\t\t\t\t\t\t\t\t\t array(':topicId' => $thread['topicId']));\n\t\t$thread['replies'] = $countReplies['total'];\t\t\t\t\n\t\t//get OP profile\n\t\tif(!isset($data['no-profiles']) OR ($data['no-profiles'] != 'true' AND intval($data['no-profiles']) !== 1)){\n\t\t\t$profile = new \\App\\Profile\\User_Model;\n\t\t\t$thread['author'] = $profile->getUserProfile($thread['userId'], $data['site']['siteId'], array('groups' => false));\n\t\t\tunset($thread['author']['pubProb']);\n\t\t\tunset($thread['author']['showEmail']);\n\t\t\tunset($thread['author']['email']);\n\t\t\tunset($thread['author']['lastAuth']);\n\t\t}\n\t\t//HTML stripping\n\t\tif(isset($data['strip-html']) AND (intval($data['strip-html']) === 1 OR $data['strip-html'] == 'true')){\n\t\t\t$thread['content'] = strip_tags($thread['content']);\n\t\t\t$thread['title'] = strip_tags($thread['title']);\n\t\t\t$thread['boardName'] = strip_tags($thread['boardName']);\n\t\t\t$thread['categoryName'] = strip_tags($thread['categoryName']);\n\t\t\tif(isset($thread['author'])){\n\t\t\t\tforeach($thread['author']['profile'] as &$profileItem){\n\t\t\t\t\tforeach($profileItem as &$profileValue){\n\t\t\t\t\t\t$profileValue = strip_tags($profileValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//markdown parsing\n\t\tif(isset($data['parse-markdown']) AND (intval($data['parse-markdown']) === 1 OR $data['parse-markdown'] == 'true')){\n\t\t\t$thread['content'] = markdown($thread['content']);\n\t\t\tif(isset($thread['author'])){\n\t\t\t\tforeach($thread['author']['profile'] as &$profileItem){\n\t\t\t\t\tif($profileItem['type'] == 'textarea'){\n\t\t\t\t\t\t$profileItem['value'] = markdown($profileItem['value']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//setup output\n\t\tif(!isset($data['replies-only']) OR (isset($data['replies-only']) AND ($data['replies-only'] != 'true' AND $data['replies-only'] != '1'))){\n\t\t\t$output['thread'] = $thread;\n\t\t}\n\t\tif(!isset($data['thread-only']) OR (isset($data['thread-only']) AND ($data['thread-only'] != 'true' AND $data['thread-only'] != '1'))){\n\t\t\t$output['replies'] = $this->container->getThreadReplies($thread, $data);\n\t\t}\n\t\treturn $output;\n\t}", "public static function MessagesData()\n {\n $return = array();\n if(MessageCollection::hasMessages())\n {\n foreach(MessageCollection::Messages() as $message)\n {\n $return[] = $message->GET();\n }\n }\n return $return;\n\n }", "function bbp_allow_threaded_replies($default = 0)\n{\n}", "protected function getThreadList($data)\n\t{\n\t\t//limits\n\t\t$start = 0;\n\t\t$max = 25;\n\t\tif(isset($data['start'])){\n\t\t\t$start = intval($data['start']);\n\t\t}\n\t\tif(isset($data['limit'])){\n\t\t\t$max = intval($data['limit']);\n\t\t}\n\t\t$limit = 'LIMIT '.$start.', '.$max;\n\t\t//posted before / modified since options\n\t\t$andWhen = $this->container->checkBeforeInput($data);\n\t\t//board filters\n\t\t$andFilters = $this->container->checkBoardFilters($data);\n\t\t//# of views filters\n\t\tif(isset($data['min-views'])){\n\t\t\t$data['min-views'] = intval($data['min-views']);\n\t\t\t$andFilters .= ' AND t.views >= '.$data['min-views'];\n\t\t}\n\t\tif(isset($data['max-views'])){\n\t\t\t$data['max-views'] = intval($data['max-views']);\n\t\t\t$andFilters .= ' AND t.views <= '.$data['max-views'];\n\t\t}\n\t\t//toggle sticky/non-sticky posts\n\t\tif(isset($data['stickies'])){\n\t\t\tif(intval($data['stickies']) === 1 OR $data['stickies'] == 'true'){\n\t\t\t\t$andFilters .= ' AND t.sticky = 1';\n\t\t\t}\n\t\t\telseif(intval($data['stickies']) === 0 OR $data['stickies'] == 'false'){\n\t\t\t\t$andFilters .= ' AND t.sticky = 0';\n\t\t\t}\n\t\t}\n\t\t//toggle locked/unlocked\n\t\tif(isset($data['locked'])){\n\t\t\tif(intval($data['locked']) === 1 OR $data['locked'] == 'true'){\n\t\t\t\t$andFilters .= ' AND t.locked = 1';\n\t\t\t}\n\t\t\telseif(intval($data['locked']) === 0 OR $data['locked'] == 'false'){\n\t\t\t\t$andFilters .= ' AND t.locked = 0';\n\t\t\t}\n\t\t}\n\t\t//user filters\n\t\t$andFilters .= $this->container->checkUserFilters($data);\n\t\t//check for content stripping\n\t\t$andContent = ',t.content';\n\t\tif(isset($data['no-content']) AND (intval($data['no-content']) === 1 OR $data['no-content'] == 'true')){\n\t\t\t$andContent = '';\n\t\t}\n\t\t//sorting options\n\t\t$sort = 't.lastPost DESC, t.postTime DESC';\n\t\tif(isset($data['sort'])){\n\t\t\tswitch($data['sort']){\n\t\t\t\tcase 'time-desc':\n\t\t\t\t\t$sort = 't.postTime DESC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'time-asc':\n\t\t\t\t\t$sort = 't.postTime ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'recent':\n\t\t\t\t\t$sort = 't.lastPost DESC, t.postTime DESC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'oldest':\n\t\t\t\t\t$sort = 't.lastPost ASC, t.postTime ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'alph-asc':\n\t\t\t\t\t$sort = 't.title ASC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'alph-desc':\n\t\t\t\t\t$sort = 't.title DESC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'sticky':\n\t\t\t\t\t$sort = 't.sticky DESC, t.lastPost DESC';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$sql = 'SELECT t.topicId, t.userId, t.title, t.url'.$andContent.', t.boardId, b.name as boardName,\n\t\t\t\t\tb.slug as boardSlug, b.categoryId, c.name as categoryName, c.slug as categorySlug,\n\t\t\t\t\t t.locked, t.postTime, t.editTime, t.lastPost, t.sticky, t.views, t.lockTime, \n\t\t\t\t\t t.lockedBy, t.editedBy, cnt.total as count\t\t\n\t\t\t\tFROM forum_topics t\n\t\t\t\tLEFT JOIN forum_boards b ON b.boardId = t.boardId\n\t\t\t\tLEFT JOIN forum_categories c ON c.categoryId = b.categoryId\n\t\t\t\tLEFT JOIN (SELECT count(*) as total, topicId FROM forum_posts WHERE trollPost = 0 AND buried = 0 GROUP BY topicId) cnt ON cnt.topicId = t.topicId\n\t\t\t\tWHERE t.trollPost = 0 AND t.buried = 0 AND b.active = 1\n\t\t\t\t'.$andWhen.'\n\t\t\t\t'.$andFilters.'\n\t\t\t\tORDER BY '.$sort.'\n\t\t\t\t'.$limit;\n\t\t$getThreads = $this->fetchAll($sql);\n\n\t\tif(count($getThreads) < $max){\n\t\t\t$output['next'] = null;\n\t\t}\n\t\telse{\n\t\t\t$output['next'] = $start + $max;\n\t\t}\n\t\t$profile = new \\App\\Profile\\User_Model;\n\t\t//check for no-profiles field\n\t\t$noProfiles = false;\n\t\tif(isset($data['no-profiles']) AND (intval($data['no-profiles']) === 1 OR $data['no-profiles'] == 'true')){\n\t\t\t$noProfiles = true;\n\t\t}\n\t\tforeach($getThreads as $key => &$thread){\n\t\t\t//do TCA checking\n\t\t\t$checkTCA = $this->container->checkTopicTCA($data['user'], $thread);\n\t\t\tif(!$checkTCA){\n\t\t\t\tunset($getThreads[$key]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//reply count\n\t\t\t$thread['replies'] = $thread['count'];\n\t\t\t//get profile and recent post info\n\t\t\tif($andContent != ''){\n\t\t\t\tif(!$noProfiles){\n\t\t\t\t\t$thread['author'] = $profile->getUserProfile($thread['userId'], $data['site']['siteId'], array('groups' => false));\n\t\t\t\t\tunset($thread['author']['pubProf']);\n\t\t\t\t\tunset($thread['author']['showEmail']);\n\t\t\t\t\tunset($thread['author']['email']);\n\t\t\t\t\tunset($thread['author']['lastAuth']);\n\t\t\t\t\tif(isset($thread['author']['avatar'])){\n\t\t\t\t\t\tif(strpos($thread['author']['avatar'], '://') === false){\n\t\t\t\t\t\t\t$thread['author']['avatar'] = $data['site']['url'].'/files/avatars/'.$thread['author']['avatar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$thread['mostRecent'] = false;\n\t\t\t\t$getRecent = false;\n\t\t\t\tif(isset($thread['recent_postId']) AND intval($thread['recent_postId']) > 0){\n\t\t\t\t\t$getRecent = array('postId' => $thread['recent_postId'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'content' => $thread['recent_content'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'userId' => $thread['recent_userId'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'postTime' => $thread['recent_postTime'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'editTime' => $thread['recent_editTime']);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$getRecent = $this->fetchSingle('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM forum_posts\n\t\t\t\t\t\t\t\t\t\tWHERE topicId = :id AND buried = 0\n\t\t\t\t\t\t\t\t\t\tORDER BY postId DESC\n\t\t\t\t\t\t\t\t\t\tLIMIT 1', array(':id' => $thread['topicId']));\n\t\t\t\t}\n\n\t\t\t\tif($getRecent){\n\t\t\t\t\t$thread['mostRecent'] = $getRecent;\n\t\t\t\t\tif(!$noProfiles){\n\t\t\t\t\t\t$thread['mostRecent']['author'] = $profile->getUserProfile($getRecent['userId'], $data['site']['siteId'], array('groups' => false));\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['pubProf']);\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['showEmail']);\t\t\t\t\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['email']);\t\t\t\n\t\t\t\t\t\tunset($thread['mostRecent']['author']['lastAuth']);\t\t\t\n\t\t\t\t\t\tif(isset($thread['mostRecent']['author']['avatar'])){\n\t\t\t\t\t\t\tif(strpos($thread['mostRecent']['author']['avatar'], '://') === false){\n\t\t\t\t\t\t\t\t$thread['mostRecent']['author']['avatar'] = $data['site']['url'].'/files/avatars/'.$thread['mostRecent']['author']['avatar'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t//HTML stripping\n\t\t\tif(isset($data['strip-html']) AND (intval($data['strip-html']) === 1 OR $data['strip-html'] == 'true')){\n\t\t\t\t$thread['boardName'] = strip_tags($thread['boardName']);\n\t\t\t\t$thread['categoryName'] = strip_tags($thread['categoryName']);\n\t\t\t\t$thread['title'] = strip_tags($thread['title']);\n\t\t\t\tif(isset($thread['content'])){\n\t\t\t\t\t$thread['content'] = strip_tags($thread['content']);\n\t\t\t\t}\n\t\t\t\tif(isset($thread['author']) AND is_array($thread['author'])){\n\t\t\t\t\tforeach($thread['author']['profile'] as &$profileItem){\n\t\t\t\t\t\tforeach($profileItem as &$profileValue){\n\t\t\t\t\t\t\t$profileValue = strip_tags($profileValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isset($thread['mostRecent']) AND $thread['mostRecent'] != null){\n\t\t\t\t\t$thread['mostRecent']['content'] = strip_tags($thread['mostRecent']['content']);\n\t\t\t\t\tif(is_array($thread['mostRecent']['author']['profile'])){\n\t\t\t\t\t\tforeach($thread['mostRecent']['author']['profile'] as &$profileItem){\n\t\t\t\t\t\t\tforeach($profileItem as &$profileValue){\n\t\t\t\t\t\t\t\t$profileValue = strip_tags($profileValue);\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//markdown parsing\n\t\t\tif(isset($data['parse-markdown']) AND isset($thread['content']) AND (intval($data['parse-markdown']) === 1 OR $data['parse-markdown'] == 'true')){\n\t\t\t\t$thread['content'] = markdown($thread['content']);\n\t\t\t\tif(isset($thread['author']) AND is_array($thread['author']['profile'])){\n\t\t\t\t\tforeach($thread['author']['profile'] as &$profileItem){\n\t\t\t\t\t\tif($profileItem['type'] == 'textarea'){\n\t\t\t\t\t\t\t$profileItem['value'] = markdown($profileItem['value']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(isset($thread['mostRecent']) AND $thread['mostRecent'] != null){\n\t\t\t\t\t$thread['mostRecent']['content'] = markdown($thread['mostRecent']['content']);\n\t\t\t\t\tif(isset($thread['mostRecent']['author']) AND is_array($thread['mostRecent']['author']['profile'])){\n\t\t\t\t\t\tforeach($thread['mostRecent']['author']['profile'] as &$profileItem){\n\t\t\t\t\t\t\tif($profileItem['type'] == 'textarea'){\n\t\t\t\t\t\t\t\t$profileItem['value'] = markdown($profileItem['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}\n\t\t\t}\n\t\t}\n\t\t$output['threads'] = $getThreads;\n\t\treturn $output;\n\t}", "function shd_load_canned_replies()\n{\n\tglobal $context, $smcFunc, $user_info;\n\n\tif ($context['user']['is_admin'] || shd_allowed_to('admin_helpdesk', $context['shd_department']))\n\t\t$visible = '';\n\telseif (shd_allowed_to('shd_staff', $context['shd_department']))\n\t\t$visible = '\n\t\t\tAND hdcr.vis_staff = 1';\n\telse\n\t\t$visible = '\n\t\t\tAND hdcr.vis_user = 1';\n\n\t$context['canned_replies'] = array();\n\n\t$query = $smcFunc['db_query']('', '\n\t\tSELECT hdcr.id_reply, hdcr.title, hdcrc.id_cat, hdcrc.cat_name\n\t\tFROM {db_prefix}helpdesk_cannedreplies AS hdcr\n\t\t\tINNER JOIN {db_prefix}helpdesk_cannedreplies_cats AS hdcrc ON (hdcr.id_cat = hdcrc.id_cat)\n\t\t\tINNER JOIN {db_prefix}helpdesk_cannedreplies_depts AS hdcrd ON (hdcrd.id_reply = hdcr.id_reply)\n\t\tWHERE hdcrd.id_dept = {int:dept}\n\t\t\tAND hdcr.active = 1' . $visible . '\n\t\tORDER BY hdcrc.cat_order, hdcr.reply_order',\n\t\tarray(\n\t\t\t'dept' => $context['shd_department'],\n\t\t)\n\t);\n\twhile ($row = $smcFunc['db_fetch_assoc']($query))\n\t{\n\t\tif (!isset($context['canned_replies'][$row['id_cat']]))\n\t\t\t$context['canned_replies'][$row['id_cat']] = array(\n\t\t\t\t'name' => $row['cat_name'],\n\t\t\t\t'replies' => array(),\n\t\t\t);\n\t\t$context['canned_replies'][$row['id_cat']]['replies'][$row['id_reply']] = $row['title'];\n\t}\n}", "function bbp_member_forums_replies_content()\n{\n}", "function getThread($limit=-1, $start=-1) {\n\n\t\t$topicId = intval($this->getPostId());\n\t\t$query =' thread_id='.$topicId.' and thread_id IS NOT NULL ORDER BY is_sticky DESC, post_datetime ASC';\n\t\tif ($limit > -1) {\n\t\t\t$query .= ' LIMIT '.$start.', '.$limit;\n\t\t}\n\t\t$list = ClassForumPostPeer::doSelect($query);\n\n\t\tforeach ($list as $k=>$v) {\n\t\t\t$x = new ClassForum_Posts();\n\t\t\t$x->_dao = $v;\n\t\t\t$this->replies[] = $x;\n\t\t}\n\t\t$this->threadLoaded = true;\n\t\treturn $this->replies;\n\t}", "public function getReplies()\n {\n return $this->hasMany(Reply::className(), ['executor_id' => 'id']);\n }", "private function _renderThreadReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0, $current_prefix = '')\n {\n if ($depth > 0) {\n if (false != $this->_useIcons) {\n $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('icon')) . '&nbsp;' . $thread[$key]['obj']->getVar('title');\n } else {\n $title = $thread[$key]['obj']->getVar('title');\n }\n $title = (false != $admin_view) ? $title . ' ' . $this->_statusText[$thread[$key]['obj']->getVar('status')] : $title;\n $replies[] = array(\n 'id' => $key,\n 'prefix' => $current_prefix,\n 'date_posted' => XoopsLocale::formatTimestamp($thread[$key]['obj']->getVar('created'), 'm'),\n 'title' => $title,\n 'root_id' => $thread[$key]['obj']->getVar('rootid'),\n 'status' => $this->_statusText[$thread[$key]['obj']->getVar('status')],\n 'poster' => $this->_getPosterName($thread[$key]['obj']->getVar('uid'))\n );\n $current_prefix .= $prefix;\n }\n if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) {\n ++$depth;\n foreach ($thread[$key]['child'] as $childkey) {\n if (!$admin_view && $thread[$childkey]['obj']->getVar('status') != COMMENTS_ACTIVE) {\n // skip this comment if it is not active and continue on processing its child comments instead\n if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) {\n foreach ($thread[$childkey]['child'] as $childchildkey) {\n $this->_renderThreadReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth);\n }\n }\n } else {\n $this->_renderThreadReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth, $current_prefix);\n }\n }\n }\n }", "function bbp_get_user_replies_created($args = array())\n{\n}", "function bbp_get_reply_to($reply_id = 0)\n{\n}", "function bbp_admin_replies($current_screen)\n{\n}", "function bbp_get_reply_statuses($reply_id = 0)\n{\n}", "function listComments($threadID)\n{\n\tglobal $threadQueryByThread, $commentQueryByThread;\n\n\t$parsedThread = intval($threadID);\n\t$amount = 3;\n\t$threadQueryByThread->bind_param(\"i\", $threadID);\n\t$threadQueryByThread->execute();\n\t$thread = $threadQueryByThread->get_result();\n\n\tif ($thread->num_rows == 0) {\n\t\theader(\"Location: main.php\");\n\t\tdie();\n\t} else {\n\t\t$threadTitle = $thread->fetch_row()[3];\n\t}\n\n\t$commentQueryByThread->bind_param(\"ii\", $parsedThread, $amount);\n\t$commentQueryByThread->execute();\n\t$comments = $commentQueryByThread->get_result();\n\n\techo \"<h2>$threadTitle</h2>\";\n\n\twhile ($commentsRow = $comments->fetch_row()) {\n\n\t\t$posterID = $commentsRow[1];\n\t\t$commentId = $commentsRow[0];\n\t\t$commentPosterId = $commentsRow[1];\n\t\t$commentTime = $commentsRow[3];\n\t\t$commentData = $commentsRow[4];\n\n\t\t$poster = getUserByID($commentPosterId);\n\t\t$username = $poster[1];\n\n\t\techo \"<br>\";\n\t\techo \"<fieldset class='comment'>\";\n\t\techo \"<a href=\\\"profile.php?id=$posterID\\\"><img class=\\\"profile-pic\\\" src=\\\"img/profile_$posterID.png\\\"></a>\";\n\t\techo \"<br>\";\n\t\tdisplayLikeBar($commentId);\n\t\techo \"<br>\";\n\n\t\techo \"<legend>[$username at $commentTime]</legend>\";\n\t\techo \"<p>$commentData</p>\";\n\t\techo \"</fieldset>\";\n\t}\n\n\tif (isset($_SESSION['userid'])) {\n\n\t\t$requestURI = $_SERVER['REQUEST_URI'];\n\n\t\techo \"<div class=\\\"content-row\\\">\";\n\t\techo \"<form action=\\\"reply.php\\\" method=\\\"POST\\\">\";\n\t\techo \"<textarea id=\\\"replytext\\\" name=\\\"replytext\\\" rows=\\\"4\\\" cols=\\\"40\\\"></textarea>\";\n\t\techo \"<input type=\\\"submit\\\" class=\\\"reply\\\" value=\\\"Reply\\\">\";\n\t\techo \"<input type=\\\"hidden\\\" id=\\\"threadid\\\" name=\\\"threadid\\\" value=\\\"$threadID\\\">\";\n\t\techo \"<input type=\\\"hidden\\\" id=\\\"redirect\\\" name=\\\"redirect\\\" value=\\\"$requestURI\\\">\";\n\t\techo \"</form>\";\n\t\techo \"</div>\";\n\t}\n\n\t$comments->close();\n}", "private function _fetch_threads($mailbox)\n {\n if (empty($this->icache['threads'])) {\n // get all threads\n list ($thread_tree, $msg_depth, $has_children) = $this->conn->thread(\n $mailbox, $this->threading, $this->skip_deleted ? 'UNDELETED' : '');\n \n // add to internal (fast) cache\n $this->icache['threads'] = array();\n $this->icache['threads']['tree'] = $thread_tree;\n $this->icache['threads']['depth'] = $msg_depth;\n $this->icache['threads']['has_children'] = $has_children;\n }\n\n return array(\n $this->icache['threads']['tree'],\n $this->icache['threads']['depth'],\n $this->icache['threads']['has_children'],\n );\n }", "public function getReplies(): ?array {\n $val = $this->getBackingStore()->get('replies');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ChatMessage::class);\n /** @var array<ChatMessage>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'replies'\");\n }" ]
[ "0.73489594", "0.62417716", "0.61817515", "0.6025998", "0.6024403", "0.6005041", "0.591494", "0.5900773", "0.58883715", "0.5883583", "0.58689106", "0.5791112", "0.5756875", "0.57167274", "0.5715812", "0.5712072", "0.5690791", "0.56732076", "0.5661043", "0.56501853", "0.56322694", "0.5627714", "0.5482043", "0.5473066", "0.54605067", "0.5460063", "0.543831", "0.5423778", "0.54118717", "0.5388912" ]
0.68228304
1
Posts a reply to a thread, passing data into main postReply method
protected function postReply($data) { $postModel = new \App\Forum\Post_Model; $meta = new \App\Meta_Model; if(!isset($data['content'])){ throw new \Exception('content required'); } $useData = array(); $useData['topicId'] = $data['thread']['topicId']; $useData['userId'] = $data['user']['userId']; $useData['content'] = $data['content']; $appData = array(); $appData['user'] = $data['user']; $appData['site'] = $data['site']; $appData['app'] = $this->get('apps', 'forum', array(), 'slug'); $appData['app']['meta'] = $meta->appMeta($appData['app']['appId']); $appData['module'] = $this->get('modules', 'forum-post', array(), 'slug'); $appData['perms'] = $data['user']['perms']; $appData['topic'] = $data['thread']; $post = $postModel->postReply($useData, $appData); if(isset($data['parse-markdown']) AND ($data['parse-markdown'] == 'true' OR intval($data['parse-markdown']) === 1)){ $post['content'] = markdown($post['content']); } if(isset($post['trollPost'])){ unset($post['trollPost']); } return $post; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bbp_thread_replies()\n{\n}", "function reply($postnum = 0, $switch = \"\") {\n if($postnum == 0) //not a specified postnum\n redirect('/'.$this->forum_url);\n \n $this->data['pagebody'] = 'reply';\n \n //get original post\n $title = \"Make a Reply\";\n $origpost = $this->forum_model->get_post($postnum);\n \n //'actions' consists of a link to reply, quote ... according to each post.\n //append each of these to each of $posts.\n $origpost['actions'] = \"<a href=\\\"/\".$this->forum_url.\"/reply/\".$origpost['postnum'].\"\\\">Reply</a> | \"\n . \"<a href=\\\"/\".$this->forum_url.\"/quote/\".$origpost['postnum'].\"\\\">Quote</a>\";\n \n //set the title, username, message, and original post data\n $this->data['title'] = $title;\n $this->data['given_username'] = \"Anonymous\"; //was lost from prior commit as well\n $this->data['messagebox'] = \"\";\n $this->data['submiturl'] = \"/\".$this->forum_url.\"/submitreply/\".$postnum.\"/\".$switch; //was missing the initial backslash, which led to an error.\n $this->data = array_merge($this->data, $origpost);\n $this->render();\n }", "public function postReply(Request $request) {\n $post = new Post();\n $settings = Settings::first();\n $text = $request->input('text');\n $threadId = $request->input('thread');\n if($settings->thread_post_length < strlen($text)) {\n return false;\n }\n if(Thread::find($threadId) == null) {\n return false;\n }\n $post->thread = $threadId;\n $post->user = Auth::user()->id;\n $post->contents = $text;\n $post->save();\n }", "public function addReply($reply)\n {\n // this create and associates the reply with the thread\n $this->replies()->create($reply);\n }", "public function a_thread_can_add_reply()\n {\n \t$this->thread->addReplay([\n \t\t'body' => 'Foobar',\n \t\t'user_id' => '5'\n \t]);\n \t$this->assertCount(1, $this->thread->replies);\n }", "public function post_reply_action()\n\t{\n\n\t\tif (isset($_REQUEST['ticketid']) && is_numeric($_REQUEST['ticketid']) && isset($_REQUEST['post_contents']) && !empty($_REQUEST['post_contents'])) {\n\t\t\t$ticketID = $_REQUEST['ticketid'];\n\t\t\t$post_contents = $_REQUEST['post_contents'];\n\t\t}\n\t\t$current_userID = $this->get_current_UserID();\n\t\t$createReply = $this->kayakoAPI->CreateTicketPost($ticketID, $post_contents, $current_userID);\n\n\t\tif ($createReply['errorReceived'] || $createReply['errorMessage']) {\n\t\t\t$response = array('status' => 401, 'statusMessage' => \"Bad Request\");\n\t\t} else {\n\t\t\t$response = array('status' => 200, 'statusMessage' => $createReply);\n\t\t}\n\t\t// Return the response JSON\n\t\techo json_encode($response);\n\t\tdie();\n\t}", "public function reply_update($reply_id, $post)\n {\n }", "public function add_thread_reply($data)\n {\n $sql = \"\n INSERT INTO forum_posts (date_created, date_updated, author_id, title, url, body, forum_id, thread_id, ip)\n VALUES (:date, :date, :author_id, :title, :url, :body, :forum_id, :thread_id, :ip)\n \";\n $values = array(\n ':date' => date('Y-m-d H:i:s'),\n ':author_id' => $data->author_id,\n ':title' => $data->title,\n ':url' => $data->url,\n ':body' => $data->body,\n ':forum_id' => $data->forum_id,\n ':thread_id' => $data->thread_id,\n ':ip' => $data->ip\n );\n if ($this->db->query($sql, $values))\n {\n return $this->db->get_insert_id();\n }\n return FALSE;\n }", "private function post_reply(){\n $comment_post_ID = (int)$_POST['comment_post_ID'];\n if( !current_user_can( 'edit_post', $comment_post_ID ) ){\n $this->base->ks_die( __( 'You are not allowed to edit comments on this post.' ) );\n }\n global $wpdb;\n $status = $wpdb->get_var( $wpdb->prepare( \"SELECT post_status FROM $wpdb->posts WHERE ID = %d\", $comment_post_ID ) );\n\n if( empty( $status ) ){\n $this->base->ks_die( __( 'No target for your post.', 'ktai_style' ) );\n exit;\n } elseif( in_array( $status, array( 'draft', 'pending' ) ) ){\n $this->base->ks_die( __( 'Error: you are replying to a comment on a draft post.', 'ktai_style' ) );\n exit;\n }\n $user = wp_get_current_user();\n if( $user->ID ){\n $comment_author = $wpdb->escape( $user->display_name );\n $comment_author_email = $wpdb->escape( $user->user_email );\n $comment_author_url = $wpdb->escape( $user->user_url );\n $comment_content = trim( $_POST['content'] );\n if( current_user_can( 'unfiltered_html' ) ){\n if( wp_create_nonce( 'unfiltered-html-comment_' . $comment_post_ID ) != $_POST['_wp_unfiltered_html_comment'] ){\n kses_remove_filters(); // start with a clean slate\n kses_init_filters(); // set up the filters\n }\n }\n } else{\n $this->base->ks_die( __( 'Sorry, you must be logged in to reply to a comment.' ) );\n }\n\n $charset = $this->base->detect_encoding( isset( $_POST['charset_detect'] ) ? $_POST['charset_detect'] : '' );\n\n if( $this->base->similar_encoding( $charset, $this->base->get( 'charset' ) ) ){\n $comment_content = $this->base->ktai->pickup_pics( stripslashes( $comment_content ) );\n if( !$this->base->get_option( 'ks_allow_pictograms' ) ){\n $comment_content = preg_replace( '!<img localsrc=\"[^\"]*\" />!', '', $comment_content );\n }\n $comment_content = $wpdb->escape( $comment_content );\n }\n if( function_exists( 'mb_convert_encoding' ) ){\n $comment_content = mb_convert_encoding( $comment_content, get_bloginfo( 'charset' ), $charset );\n }\n\n $comment_content = trim( $comment_content );\n $errors = array();\n if( '' == $comment_content ){\n $errors[] = __( 'Error: please type a comment.' );\n }\n if( $errors ){\n $this->show_form( $errors );\n exit;\n }\n\n $comment_type = '';\n $comment_parent = abs( intval( $_POST['comment_parent'] ) );\n $user_ID = $user->ID;\n $commentdata = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID' );\n\n $comment_id = wp_new_comment( $commentdata );\n $comment = get_comment( $comment_id );\n if( empty( $_POST['redirect_to'] ) ){\n $location = 'edit-comments.php';\n } else{\n $location = stripslashes( $_POST['redirect_to'] );\n }\n $location = apply_filters( 'comment_post_redirect', $location, $comment );\n $this->admin->redirect( $location );\n exit;\n }", "public function reply_create($reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $reply_author_id = 0)\n {\n }", "function bbp_insert_reply($reply_data = array(), $reply_meta = array())\n{\n}", "function bbp_update_reply_to_id($post_id = 0, $reply_id = 0)\n{\n}", "public function admin_mail_reply_message($data) {\n \n }", "public function postreplyAction()\n {\n if ($this->getRequest()->isPost())\n {\n $text = $_POST['replyText'];\n $discussionId = $_POST['originalQuestionId'];\n $itemId = $_POST['documentId'];\n $userId = $_SESSION['Incite']['USER_DATA']['id'];\n\n $comment = new InciteComment;\n $comment->user_id = $userId;\n $comment->discussion_id = $discussionId;\n $comment->is_active = 1;\n $comment->comment_text = $text;\n $comment->save();\n return true;\n }\n }", "public function process_reply() {\n\t\tif ( ! isset( $_POST['edd_reviews_reply_nonce'] ) && ! wp_verify_nonce( $_POST['edd_reviews_reply_nonce'], 'edd_reviews_reply_nonce' ) ) {\n\t\t\twp_die( __( 'Nonce verification has failed', 'edd-reviews' ), __( 'Error', 'edd-reviews' ), array( 'response' => 403 ) );\n\t\t}\n\n\t\t$comment_post_ID = isset( $_POST['edd-reviews-review-post-ID'] ) ? (int) $_POST['edd-reviews-review-post-ID'] : 0;\n\t\t$comment_parent = isset( $_POST['comment_parent'] ) ? (int) $_POST['comment_parent'] : '';\n\t\t$post = get_post( $comment_post_ID );\n\n\t\tif ( empty( $post->comment_status ) ) {\n\t\t\tdo_action( 'comment_id_not_found', $comment_post_ID );\n\t\t\texit;\n\t\t}\n\n\t\t$status = get_post_status( $post );\n\t\t$status_obj = get_post_status_object( $status );\n\n\t\tif ( 'trash' == $status ) {\n\t\t\tdo_action( 'comment_on_trash', $comment_post_ID );\n\t\t\texit;\n\t\t} elseif ( ! $status_obj->public && ! $status_obj->private ) {\n\t\t\tdo_action( 'comment_on_draft', $comment_post_ID );\n\t\t\texit;\n\t\t} elseif ( post_password_required( $comment_post_ID ) ) {\n\t\t\tdo_action( 'comment_on_password_protected', $comment_post_ID );\n\t\t\texit;\n\t\t} else {\n\t\t\tdo_action( 'pre_comment_on_post', $comment_post_ID );\n\t\t}\n\n\t\t$reply_content = ( isset( $_POST['edd-reviews-reply'] ) ) ? trim( $_POST['edd-reviews-reply'] ) : null;\n\n\t\t$user = wp_get_current_user();\n\t\tif ( $user->exists() ) {\n\t\t\tif ( empty( $user->display_name ) ) {\n\t\t\t\t$user->display_name = $user->user_login;\n\t\t\t}\n\n\t\t\t$review_author = wp_slash( $user->display_name );\n\t\t\t$review_author_email = wp_slash( $user->user_email );\n\t\t\t$review_author_url = wp_slash( $user->user_url );\n\n\t\t\tif ( current_user_can( 'unfiltered_html' ) ) {\n\t\t\t\tif ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) || ! wp_verify_nonce( $_POST['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID ) ) {\n\t\t\t\t\tkses_remove_filters();\n\t\t\t\t\tkses_init_filters();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ( get_option( 'comment_registration' ) || 'private' == $status ) {\n\t\t\t\twp_die( __( 'Sorry, you must be logged in to post a review.', 'edd-reviews' ), 403 );\n\t\t\t}\n\t\t}\n\n\t\t$comment_type = 'edd_review';\n\n\t\tif ( '' == $reply_content ) {\n\t\t\twp_die( __( '<strong>ERROR</strong>: please type a reply.', 'edd-reviews' ), 200 );\n\t\t}\n\n\t\t$comment_author_ip = $_SERVER['REMOTE_ADDR'];\n\t\t$comment_author_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $comment_author_ip );\n\n\t\t$args = apply_filters( 'edd_reviews_insert_reply_args', array(\n\t\t\t'comment_post_ID' => $comment_post_ID,\n\t\t\t'comment_author' => $review_author,\n\t\t\t'comment_author_email' => $review_author_email,\n\t\t\t'comment_author_url' => $review_author_url,\n\t\t\t'comment_content' => $reply_content,\n\t\t\t'comment_type' => $comment_type,\n\t\t\t'comment_parent' => $comment_parent,\n\t\t\t'comment_author_IP' => $comment_author_ip,\n\t\t\t'comment_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 ) : '',\n\t\t\t'user_id' => $user->ID,\n\t\t\t'comment_date' => current_time( 'mysql' ),\n\t\t\t'comment_date_gmt' => current_time( 'mysql', 1 ),\n\t\t\t'comment_approved' => 1\n\t\t) );\n\n\t\t$comment_allowed = wp_allow_comment( $args );\n\n\t\t$args = apply_filters( 'preprocess_comment', $args );\n\n\t\t$review_id = wp_insert_comment( wp_filter_comment( $args ) );\n\n\t\tadd_comment_meta( $review_id, 'edd_review_reply', 1 );\n\t\tadd_comment_meta( $review_id, 'edd_review_approved', $comment_allowed );\n\t}", "public function reply($threadId)\n {\n $input = Input::only('reply');\n\n // Create the Validator instance.\n $this->validateInput($input, array(\n 'reply' => 'required|min:3|max:1000',\n ), array(\n 'required' => __d('messages', 'You must type a reply first!')\n ));\n\n // Find the status that we need to reply to.\n try {\n $thread = Message::notReply()->findOrFail($threadId);\n }\n catch (ModelNotFoundException $e) {\n return Redirect::to('admin/dashboard');\n }\n\n $authUser = Auth::user();\n\n if ($authUser->id !== $thread->sender->id) {\n $user = $thread->sender;\n } else {\n $user = $thread->receiver;\n }\n\n // associate() works from the belongsTo side of the relationship\n // a particular reply is associated with the user who made that\n $reply = Message::create(array(\n 'body' => $input['reply'],\n ));\n\n $reply->sender()->associate($authUser);\n\n $reply->receiver()->associate($user);\n\n $thread->replies()->save($reply);\n\n $thread->touch();\n\n return Redirect::back();\n }", "public function createReply();", "function bbp_update_reply_id($post_id = 0, $reply_id = 0)\n{\n}", "protected function postThread($data)\n\t{\n\t\t$appData = array();\n\t\t$appData['user'] = $data['user'];\n\t\t$appData['site'] = $data['site'];\n\t\t$appData['app'] = get_app('forum');\n\t\t$appData['module'] = get_app('forum.forum-board');\n\t\t$appData['perms'] = $data['user']['perms'];\n\t\t$useData = $data;\n\t\t$useData['userId'] = $data['user']['userId'];\n\t\t$post = $this->container->postTopic($useData, $appData);\n\t\tif(isset($data['parse-markdown']) AND ($data['parse-markdown'] == 'true' OR intval($data['parse-markdown']) === 1)){\n\t\t\t$post['content'] = markdown($post['content']);\n\t\t}\n\t\treturn $post;\n\t}", "public function addReply($reply)\n {\n $reply = $this->replies()->create($reply);\n\n event(new ThreadReceivedNewReply($reply));\n\n return $reply;\n }", "public function testAuthenticatedUserCanReplyToAThread()\n {\n $this->signIn();\n\n $reply = make('App\\Models\\Reply');\n\n $this->post($this->thread->path() .'/replies', $reply->toArray());\n \n $this->assertDatabaseHas('replies', ['body' => $reply->body]);\n $this->assertEquals(1, $this->thread->fresh()->replies_count);\n }", "function post_reply(Ticket $ticket, $admin_reply, Staff $robot = null)\n\t{\n\t\t\t// We need to override this for the notifications\n\t\tglobal $thisstaff;\n\n\t\tif ($robot) {\n\t\t\t$assignee = $robot;\n\t\t} else {\n\t\t\t$assignee = $ticket->getAssignee();\n\t\t\tif (!$assignee instanceof Staff) {\n // Nobody, or a Team was assigned, and we haven't been told to use a Robot account.\n\t\t\t\t$ticket->logNote(\n\t\t\t\t\t__('AutoAssign Error'),\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Unable to send reply, no assigned Agent on ticket, and no Robot account specified in config.'\n\t\t\t\t\t),\n\t\t\t\t\tself::PLUGIN_NAME,\n\t\t\t\t\tFALSE\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\t// This actually bypasses any authentication/validation checks..\n\t\t$thisstaff = $assignee;\n\n // Use the Ticket objects own replaceVars method, which replace\n // any other Ticket variables.\n\t\t$custom_reply = $this->updateVars($ticket, $admin_reply);\n\n\t\t\t// Build an array of values to send to the ticket's postReply function\n\t\t\t// don't send notification to all collaborators.\n\t\t$vars = [\n\t\t\t'response' => $custom_reply\n\t\t];\n\t\t$errors = array();\n\n\t\tif (!$sent = $ticket->postReply($vars, $errors, 5, FALSE)) {\n\t\t\t$ticket->LogNote(__('Error Notification'), __('We were unable to post a reply to the ticket creator.'), self::PLUGIN_NAME, FALSE);\n\t\t}\n}", "function bbp_the_reply()\n{\n}", "public function actionNewReply($id)\r\n {\r\n $thread = Thread::model()->findByPk($id);\r\n if(null == $thread)\r\n throw new CHttpException(404, 'Thread not found.');\r\n if(!Yii::app()->user->isAdmin && $thread->is_locked)\r\n throw new CHttpException(403, 'Thread is locked.');\r\n\r\n $model=new PostForm;\r\n if(isset($_POST['PostForm']))\r\n {\r\n $model->attributes=$_POST['PostForm'];\r\n if($model->validate())\r\n {\r\n $post = new Post();\r\n $post->author_id = Yii::app()->user->forumuser_id;\r\n $post->thread_id = $thread->id;\r\n $post->content = $model->content;\r\n $post->save(false);\r\n\r\n if(Yii::app()->user->isAdmin && $thread->is_locked != $model->lockthread)\r\n {\r\n $thread->is_locked = $model->lockthread;\r\n $thread->save(false);\r\n }\r\n\r\n $this->redirect($thread->url);\r\n }\r\n }\r\n $this->render('postform', array(\r\n 'thread'=>$thread,\r\n 'model'=>$model,\r\n ));\r\n }", "function bbp_toggle_reply($args = array())\n{\n}", "public function reply($thread)\n {\n if ( ! is_object($thread)) {\n $threadClass = $this->threadClass;\n $thread = $threadClass::whereId($thread)->firstOrFail();\n }\n\n $thread->activateAllParticipants();\n\n $message = $thread->messages()->create([\n 'user_id' => $this->id,\n 'body' => $this->message\n ]);\n\n // Add replier as a participant\n $participantClass = $this->participantClass;\n $participant = $participantClass::firstOrCreate([\n 'thread_id' => $thread->id,\n 'user_id' => $this->id\n ]);\n\n $participant->seen_at = Carbon::now();\n $participant->save();\n\n $thread->updated_at = Carbon::now();\n $thread->save();\n\n event(new NewReplyDispatched($thread, $message));\n\n return $message;\n }", "public function reviews_reply_link( $args = array() ) {\n\t\tglobal $comment, $post;\n\n\t\t$defaults = array(\n\t\t\t'add_below' => 'edd-review',\n\t\t\t'respond_id' => 'edd-reviews-reply',\n\t\t\t'login_text' => __( 'Login to reply', 'edd-reviews' ),\n\t\t\t'reply_text' => __( 'Leave a reply', 'edd-reviews' ),\n\t\t\t'reply_to_text' => __( 'Reply to %s', 'edd-reviews' ),\n\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t'after' => '</div>',\n\t\t\t'depth' => 0,\n\t\t);\n\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\tif ( 0 === $args['depth'] || $args['max_depth'] <= $args['depth'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! is_user_logged_in() && edd_get_option( 'edd_reviews_enable_guest_reviews', false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$review = get_comment( $comment );\n\n\t\tif ( empty( $post ) ) {\n\t\t\t$post = $review->comment_post_ID;\n\t\t}\n\n\t\t$post_object = get_post( $post );\n\n\t\t$args = apply_filters( 'comment_reply_link_args', $args, $review, $post_object );\n\n\t\t$link = null;\n\n\t\tif ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {\n\t\t\t$link = sprintf( '<a rel=\"nofollow\" class=\"comment-reply-login\" href=\"%s\">%s</a>',\n\t\t\t\tesc_url( wp_login_url( get_permalink() ) ),\n\t\t\t\t$args['login_text']\n\t\t\t);\n\t\t} elseif ( is_user_logged_in() ) {\n\t\t\t$onclick = sprintf( 'return addComment.moveForm( \"%1$s-%2$s\", \"%2$s\", \"%3$s\", \"%4$s\" )',\n\t\t\t\t$args['add_below'], $review->comment_ID, $args['respond_id'], $post_object->ID\n\t\t\t);\n\n\t\t\t$link = sprintf( \"<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>\",\n\t\t\t\tesc_url( add_query_arg( 'replytocom', $review->comment_ID, get_permalink( $post_object->ID ) ) ) . \"#\" . $args['respond_id'],\n\t\t\t\t$onclick,\n\t\t\t\tesc_attr( sprintf( $args['reply_to_text'], $review->comment_author ) ),\n\t\t\t\t$args['reply_text']\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Filters the comment reply link.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param string $link The HTML markup for the comment reply link.\n\t\t * @param array $args An array of arguments overriding the defaults.\n\t\t * @param object $comment The object of the comment being replied.\n\t\t * @param WP_Post $post The WP_Post object.\n\t\t */\n\t\techo apply_filters( 'comment_reply_link', $args['before'] . $link . $args['after'], $args, $comment, $post );\n\t}", "public function a_user_can_read_replies_that_are_associated_with_a_thread()\n {\n \t\t$reply = factory('App\\Reply')->create(['thread_id' => $this->thread->id]);\n \t\t$response = $this->get(route('threads.show', [$this->channel->id, $this->thread->id]));\n \t\t$response->assertSee($reply->body);\n }", "public function ai_reply( $object_id ) {\n\n switch ( get_post_type( $object_id ) ) {\n\n case 'message':\n $this->parse_message( $object_id );\n break;\n\n default:\n # code...\n break;\n }\n\n }", "function hook_user_message_create_answer($m, $answer) {\r\n $answer->subject = 'Reply to: ' . $m->subject;\r\n}" ]
[ "0.6943966", "0.677812", "0.6738929", "0.6664106", "0.65737927", "0.6573044", "0.6545311", "0.65386796", "0.6502978", "0.64433485", "0.64330226", "0.6424762", "0.6424242", "0.6381777", "0.63738966", "0.6372501", "0.6356337", "0.62521267", "0.62487924", "0.62009543", "0.61753136", "0.6130237", "0.6125005", "0.612279", "0.61032945", "0.61003447", "0.6054579", "0.60337704", "0.60220927", "0.5992107" ]
0.68119234
1
Moves a forum thread into a different board
protected function moveThread($data) { if(!$data['user']){ http_response_code(401); throw new \Exception('Not authorized'); } $req = array('from-type', 'from-id', 'to-type', 'to-id'); foreach($req as $required){ if(!isset($data[$required]) OR trim($data[$required]) == ''){ http_response_code(400); throw new \Exception($required.' required'); } } $validFrom = array('topic', 'thread'); $validTo = array('board'); if(!in_array($data['from-type'], $validFrom)){ http_response_code(400); throw new \Exception('Invalid from-type'); } if(!in_array($data['to-type'], $validTo)){ http_response_code(400); throw new \Exception('Invalid to-type'); } $getItem = false; $getItem2 = false; switch($data['from-type']){ case 'topic': case 'thread': $getItem = $this->get('forum_topics', $data['from-id']); break; } switch($data['to-type']){ case 'board': $getItem2 = $this->get('forum_boards', $data['to-id']); if($getItem2){ if($getItem AND isset($getItem['boardId']) AND $getItem['boardId'] == $getItem2['boardId']){ http_response_code(400); throw new \Exception('Item already exists in this board'); } $boardModule = get_app('forum.forum-board'); $tca = new \App\Tokenly\TCA_Model; $checkCat = $tca->checkItemAccess($data['user'], $boardModule['moduleId'], $getItem2['categoryId'], 'category'); $checkBoard = $tca->checkItemAccess($data['user'], $boardModule['moduleId'], $getItem2['boardId'], 'board'); if(!$checkCat OR !$checkBoard){ http_response_code(403); throw new \Exception('You do not have permission to move into that board'); } } break; } if(!$getItem){ http_response_code(400); throw new \Exception($data['from-type'].' not found'); } if(!$getItem2){ http_response_code(400); throw new \Exception($data['to-type'].' not found'); } if((($getItem['userId'] != $data['user']['userId'] AND !$data['perms']['canMoveOther']) OR ($getItem['userId'] == $data['user']['userId'] AND !$data['perms']['canMoveSelf']))){ http_response_code(403); throw new \Exception('You do not have permission for this'); } $edit = false; switch($data['from-type']){ case 'topic': case 'thread': switch($data['to-type']){ case 'board': $edit = $this->edit('forum_topics', $getItem['topicId'], array('boardId' => $getItem2['boardId'])); break; } break; } if(!$edit){ http_response_code(400); throw new \Exception('Error moving '.$data['from-type']); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveTo($board_id) {\n\n\t\t// start transaction\n\t\t$this->StartTrans();\n\n\t\t// create a new comment letting people know it has beem moved\n\t\t$lcom = new LibertyComment();\n\t\t$lcom_hash['edit']=\"The comments from: {$this->mInfo['title']} ({$this->mRootId}) have been is_moved to $board_id\";\n\t\t$lcom_hash['title']=$this->mInfo['title'];\n\t\t$lcom_hash['parent_id']=$this->mInfo['th_root_id'];\n\t\t$lcom_hash['root_id']=$this->mInfo['th_root_id'];\n\t\t$lcom_hash['created']=$this->mInfo['flc_created'];\n\t\t$lcom_hash['last_modified']=$this->mInfo['flc_last_modified'];\n\t\t$lcom->storeComment($lcom_hash);\n\n\t\t// map the move to the topic table\n\t\t$data = array();\n\t\t$data['parent_id']=$lcom->mContentId;\n\t\t$data['is_moved']=$this->mRootId;\n\t\t$this->mDb->associateInsert( BIT_DB_PREFIX.\"boards_topics\", $data );\n\n\t\t// move the comment we want to move to the target board\n\t\t$query = \"UPDATE `\".BIT_DB_PREFIX.\"liberty_comments` SET `root_id` = ?, `parent_id` = ?\n\t\t\t\t WHERE `thread_forward_sequence` LIKE '\".sprintf(\"%09d.\", $this->mRootId).\"%' AND `root_id`=`parent_id`\";\n\t\t$result = $this->mDb->query( $query, array( $board_id, $board_id ) );\n\n\t\t$query = \"UPDATE `\".BIT_DB_PREFIX.\"liberty_comments` SET `root_id` = ?\n\t\t\t\t WHERE `thread_forward_sequence` LIKE '\".sprintf(\"%09d.\", $this->mRootId).\"%'\";\n\t\t$result = $this->mDb->query( $query, array( $board_id ) );\n\n\t\t// end transaction\n\t\t$this->CompleteTrans();\n\n\t\treturn TRUE;\n\t}", "public function actionMovethread($id)\n {\n // check user permissions\n if (!App::$User->isAuth() || !App::$User->identity()->getRole()->can('forum/delete')) {\n throw new ForbiddenException(__('You have no permissions to move thread'));\n }\n\n $record = ForumThread::find($id);\n if ($record === null) {\n throw new NotFoundException(__('Thread is not found'));\n }\n $forum = $record->getForumRelated();\n\n // initialize move model & process submit\n $model = new FormMoveThread($record, $forum, App::$Request->getLanguage());\n if ($model->send() && $model->validate()) {\n $model->make();\n App::$Session->getFlashBag()->add('success', __('Thread are successful moved to new forum'));\n App::$Response->redirect(Url::to('forum/viewthread', $model->id), true);\n }\n\n return $this->view->render('forum/move_thread', [\n 'model' => $model,\n 'forumRecord' => $forum\n ], $this->tplDir);\n }", "function bbp_move_topic_handler($topic_id, $old_forum_id, $new_forum_id)\n{\n}", "function board_nav( $boardid, $threadid, $nav_path )\n {\n global $TBoard, $pref;\n\t \n // thread --\n $r_thread = db_query(\"SELECT\n thread_id,\n\t thread_topic\n FROM \".$pref.\"thread WHERE thread_id='$threadid' AND board_id='$boardid'\");\n if( db_rows( $r_thread ) != 1 )\n message ( 'Sorry! Fehlerhafter Link.', 'Fehler', 0 );\n else\n $thread = db_result( $r_thread );\n // board --\n $r_board = db_query(\"SELECT \n\t board_id,\n\t\t board_name,\n\t\t category\n\t FROM \".$pref.\"board WHERE board_id='$boardid'\");\n\t $board = db_result( $r_board );\n\t // category --\n\t $r_category = db_query(\"SELECT\n\t category_id,\n\t\t category_name\n\t FROM \".$pref.\"category WHERE category_id='$board[category]'\");\n\t $category = db_result( $r_category );\n $nav_path .= '&nbsp;&gt;&gt;&nbsp;<a href=\"category.php?catid='.$category['category_id'].'\" \n class=\"bg\">'.( strlen($category['category_name']) > 30 ? substr ( $category['category_name'], 0, 27).'...' : $category['category_name'] ).'</a>';\n $nav_path .= '&nbsp;&gt;&gt;&nbsp;<a href=\"board.php?boardid='.$board['board_id'].'\" \n class=\"bg\">'.( strlen($board['board_name']) > 50 ? substr ( $board['board_name'], 0, 47).'...' : $board['board_name'] ).'</a>';\n $nav_path .= '&nbsp;&gt;&gt;&nbsp;<a href=\"showtopic.php?boardid='.$board['board_id'].'&threadid='.$thread['thread_id'].'\" \n class=\"bg\">'.$thread['thread_topic'].'</a>';\n\t \n\t mysql_free_result( $r_thread );\n\t mysql_free_result( $r_board );\n\t mysql_free_result( $r_category );\n\t \n\t return $nav_path;\n }", "function extendedforum_move_post_sameextendedforum($post, $targetpostid, $source_extendedforum, $cm)\n{\n global $CFG;\n if (! $targetpost = get_record('extendedforum_posts', 'id', $targetpostid)) {\n error(\"destination post does not exist\");\n }\n \n if(! $target_discussion = get_record('extendedforum_discussions' , 'id' , $targetpost->discussion) ){\n error (\"destination post's discussion does not exist\");\n }\n \n if(!$target_extendedforum = get_record('extendedforum', 'id', $target_discussion->extendedforum) ){\n error(\"destination post's extendedforum does not exist\") ;\n }\n \n set_field('extendedforum_posts', 'parent', $targetpostid, 'id', $post->id);\n \n extendedforum_change_discussionid($post->id, $target_discussion->id) ;\n require_once($CFG->libdir.'/rsslib.php');\n require_once('rsslib.php');\n // Delete the RSS files for the 2 extendedforums because we want to force\n // the regeneration of the feeds since the post have been\n // moved.\n if (!extendedforum_rss_delete_file($source_extendedforum) || !extendedforum_rss_delete_file($target_extendedforum)) {\n error('Could not purge the cached RSS feeds for the source and/or'.\n 'destination extendedforum(s) - check your file permissionsextendedforums', 0);\n }\n add_to_log($target_discussion->course, \"extendedforum\", \"move post to a discussion same extendedforum\",\n \"discuss.php?d=$target_discussion->id\", \"$post->id\", $cm->id);\n\n}", "function move_post($post, $from_extendedforum, $from_discussion, $target_extendedforum, $return, $cm) \n {\n global $CFG;\n \n if ($post->parent) { //create a new discussion for this post\n $newdiscussion = new object();\n $newdiscussion->course = addslashes ($from_discussion->course) ;\n $newdiscussion->extendedforum = $from_discussion->extendedforum;\n $newdiscussion->name = addslashes($post->subject) ;\n $newdiscussion->firstpost = $post->id;\n $newdiscussion->userid = $from_discussion->userid;\n $newdiscussion->groupid = $from_discussion->groupid;\n $newdiscussion->assessed = $from_discussion->assessed;\n $newdiscussion->usermodified = $post->userid;\n $newdiscussion->timestart = $from_discussion->timestart;\n $newdiscussion->timeend = $from_discussion->timeend;\n \n if (!$discussionid = insert_record('extendedforum_discussions', $newdiscussion)) {\n error('Could not create new discussion');\n }\n $newdiscussion->id = $discussionid ;\n $newpost = new object();\n $newpost->id = $post->id;\n $newpost->parent = 0;\n $newpost->subject = addslashes($post->subject) ; \n\n if (!update_record(\"extendedforum_posts\", $newpost)) {\n error('Could not update the original post');\n }\n extendedforum_change_discussionid($post->id, $discussionid);\n extendedforum_discussion_update_last_post($from_discussion->id); //previous discussion\n extendedforum_discussion_update_last_post($discussionid); //current discussion\n \n extendedforum_change_read_discussionid($post->id, $discussionid) ;\n \n }\n else { //move the whole discussion\n $discussionid = $post->parent;\n $newdiscussion = $from_discussion;\n \n set_field('extendedforum_read', 'extendedforumid', $target_extendedforum->id, 'discussionid', $from_discussion->id);\n } \n //now move the discussion\n if (!extendedforum_move_attachments($newdiscussion, $target_extendedforum->id)) {\n notify(\"Errors occurred while moving attachment directories - check your file permissions\");\n }\n //update the extendedforum id for the discussion\n set_field('extendedforum_discussions', 'extendedforum', $target_extendedforum->id, 'id', $newdiscussion->id);\n \n \n require_once($CFG->libdir.'/rsslib.php');\n require_once('rsslib.php');\n // Delete the RSS files for the 2 extendedforums because we want to force\n // the regeneration of the feeds since the discussions have been\n // moved.\n if (!extendedforum_rss_delete_file($from_extendedforum) || !extendedforum_rss_delete_file($target_extendedforum)) {\n error('Could not purge the cached RSS feeds for the source and/or'.\n 'destination extendedforum(s) - check your file permissionsextendedforums', $return);\n }\n add_to_log($from_discussion->course, \"extendedforum\", \"move post\",\n \"discuss.php?d=$discussionid\", \"$post->id\", $cm->id);\n \n }", "public function forward2Forum($articleID)\n {\n if(!commonModel::isAvailable('forum')) return false;\n $article = $this->getByID($articleID);\n $category = current($article->categories);\n $address = $this->loadModel('common')->getSysURL() . $this->createPreviewLink($articleID);\n\n $thread = $this->dao->select('*')->from(TABLE_ARTICLE)->where('alias')->eq($articleID)->fetch();\n if(!$thread) $thread = $this->dao->select('title, content')->from(TABLE_ARTICLE)->where('id')->eq($articleID)->fetch();\n\n if(!$thread) return false;\n \n $thread->board = $this->post->board;\n $thread->author = $this->app->user->realname;\n $thread->content .= \"<br><br><div style='text-align: right'>\" . $this->lang->article->forwardFrom . ' ' . html::a($address, $address) . '</div>';\n $thread->addedDate = $this->post->addedDate ? $this->post->addedDate : helper::now();\n $thread->editedDate = $thread->addedDate;\n $thread->repliedDate = $thread->addedDate;\n\n $this->dao->insert(TABLE_THREAD)->data($thread)->autoCheck()->batchCheck($this->config->article->require->forward2Forum, 'notempty')->exec();\n \n $threadID = $this->dao->lastInsertID();\n $thread = $this->loadModel('thread')->getByID($threadID);\n if(dao::isError()) return false;\n\n $files = $this->dao->select('*')->from(TABLE_FILE)->where('objectID')->eq($articleID)->andWhere('objectType')->eq('article')->fetchAll();\n foreach($files as $file)\n {\n $file->objectType = 'thread';\n $file->objectID = $threadID;\n $this->dao->insert(TABLE_FILE)->data($file, $skip='id')->autoCheck()->exec();\n }\n if(dao::isError()) return false;\n\n $this->loadModel('search')->save('thread', $thread);\n\n return !dao::isError(); \n }", "public function toggle_forum()\n {\n }", "function moveThread($group_forum_id,$thread_id,$old_forum_id = false) {\n\t\t$res = db_query_params('UPDATE forum SET group_forum_id=$1 WHERE thread_id=$2',\n\t\t\t\t\tarray($group_forum_id, $thread_id));\n\t\tif (!$res) {\n\t\t\t$this->setError(db_error());\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$msg_count = db_affected_rows($res);\n\t\t\tif ($msg_count < 1) {\n\t\t\t\t$this->setError(_(\"Thread not found\"));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif ($old_forum_id !== false) {\n\t\t\t// Update forum_agg_msg_count table\n\t\t\t// Note: if error(s) are raised it's certainly because forum_agg_msg_count\n\t\t\t//\t\tis no longer used and updated. So, error(s) are not catched\n\t\t\t// Update row of old forum id\n\t\t\t$res = db_query_params('SELECT count FROM forum_agg_msg_count WHERE group_forum_id=$1',\n\t\t\t\t\t\tarray($old_forum_id));\n\t\t\tif ($res && db_numrows($res)) {\n\t\t\t\t// Update row\n\t\t\t\t$count = db_result($res, 0, 'count');\n\t\t\t\t$count -= $msg_count;\n\t\t\t\tif ($count < 0) $count = 0;\n\t\t\t\t$res = db_query_params('UPDATE forum_agg_msg_count SET count=$1 WHERE group_forum_id=$2',\n\t\t\t\t\t\t\tarray($count, $old_forum_id));\n\t\t\t} else {\n\t\t\t\t// Error because row doesn't exist... insert it\n\t\t\t\t$res = db_query_params('SELECT COUNT(*) AS count FROM forum WHERE group_forum_id=$1',\n\t\t\t\t\t\t\tarray($old_forum_id));\n\t\t\t\tif ($res && db_numrows($res)) {\n\t\t\t\t\t$count = db_result($res, 0, 'count');\n\t\t\t\t\t$res = db_query_params('INSERT INTO forum_agg_msg_count (group_forum_id, count) VALUES ($1,$2)',\n\t\t\t\t\t\t\t\tarray($old_forum_id, $count));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update row of new forum id\n\t\t\t$res = db_query_params('SELECT count FROM forum_agg_msg_count WHERE group_forum_id=$1',\n\t\t\t\t\t\tarray($group_forum_id));\n\t\t\tif ($res && db_numrows($res)) {\n\t\t\t\t// Update row\n\t\t\t\t$count = db_result($res, 0, 'count');\n\t\t\t\t$count += $msg_count;\n\t\t\t\t$res = db_query_params('UPDATE forum_agg_msg_count SET count=$1 WHERE group_forum_id=$2',\n\t\t\t\t\t\t\tarray($count, $group_forum_id));\n\t\t\t} else {\n\t\t\t\t// Insert row\n\t\t\t\t$res = db_query_params('INSERT INTO forum_agg_msg_count (group_forum_id, count) VALUES ($1,$2)',\n\t\t\t\t\t\t\tarray($group_forum_id, $msg_count));\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function quickMod_move($topic_data, $boards_can)\n{\n\tif (!in_array(0, $boards_can['move_any']))\n\t{\n\t\tforeach ($topic_data as $topic => $this_topic)\n\t\t{\n\t\t\tif (!in_array($this_topic['id_board'], $boards_can['move_any']))\n\t\t\t{\n\t\t\t\t// So they can't just (un)lock *any* topic. That makes things more complicated. It needs to be their topic and they have to have permission\n\t\t\t\tif ($this_topic['id_member_started'] != MID || !in_array($this_topic['id_board'], $boards_can['move_own']))\n\t\t\t\t\tunset($topic_data[$topic]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Sanitize the destination.\n\t$_REQUEST['move_to'] = isset($_REQUEST['move_to']) ? (int) $_REQUEST['move_to'] : 0;\n\tif (empty($_REQUEST['move_to']) || empty($topic_data))\n\t\treturn;\n\n\t// We need to figure out the boards that count posts. And get some other stuff about the topic while we're there.\n\t$request = wesql::query('\n\t\tSELECT t.id_topic, t.id_board, m.id_msg, t.id_member_started, m.subject, b.count_posts\n\t\tFROM {db_prefix}topics AS t\n\t\t\tLEFT JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)\n\t\t\tINNER JOIN {db_prefix}messages AS m ON (t.id_first_msg = m.id_msg)\n\t\tWHERE t.id_topic IN ({array_int:move_topic_ids})\n\t\tLIMIT ' . count($topic_data),\n\t\tarray(\n\t\t\t'move_topic_ids' => array_keys($topic_data),\n\t\t)\n\t);\n\n\t$boardMoves = array();\n\t$countPosts = array();\n\t$moveCache = array();\n\t$notifications = array();\n\t$to = $_REQUEST['move_to'];\n\n\twhile ($row = wesql::fetch_assoc($request))\n\t{\n\t\t// Does this topic's board count the posts or not?\n\t\t$countPosts[$row['id_topic']] = empty($row['count_posts']);\n\n\t\t// For reporting...\n\t\t$moveCache[] = array($row['id_topic'], $row['id_board'], $_REQUEST['move_to']);\n\t\tif ($row['id_member_started'] != 0 && $row['id_member_started'] != MID)\n\t\t\t$notifications[] = $row;\n\t}\n\twesql::free_result($request);\n\n\tloadSource('MoveTopic');\n\n\t// Do the actual moves...\n\tforeach ($topic_data as $topic => $this_topic)\n\t\tmoveTopics($topic, $_REQUEST['move_to']);\n\n\t// Does the user post counts need to be updated?\n\t$topicRecounts = array();\n\t$request = wesql::query('\n\t\tSELECT id_board, count_posts, name\n\t\tFROM {db_prefix}boards\n\t\tWHERE id_board = {int:move_board}',\n\t\tarray(\n\t\t\t'move_board' => $_REQUEST['move_to'],\n\t\t)\n\t);\n\n\twhile ($row = wesql::fetch_assoc($request))\n\t{\n\t\t$cp = empty($row['count_posts']);\n\t\t$board_name = $row['name'];\n\n\t\t// Go through all the topics that are being moved to this board.\n\t\tforeach ($topic_data as $topic => $this_topic)\n\t\t{\n\t\t\t// If both boards have the same value for post counting then no adjustment needs to be made.\n\t\t\tif ($countPosts[$topic] != $cp)\n\t\t\t{\n\t\t\t\t// If the board being moved to does count the posts then the other one doesn't so add to their post count.\n\t\t\t\t$topicRecounts[$topic] = $cp ? '+' : '-';\n\t\t\t}\n\t\t}\n\t}\n\twesql::free_result($request);\n\n\tif (!empty($board_name) && !empty($notifications))\n\t\tforeach ($notifications as $notif)\n\t\t\tNotification::issue('move', $notif['id_member_started'], $notif['id_topic'], array('member' => array('name' => we::$user['name'], 'id' => MID), 'id_msg' => $notif['id_msg'], 'subject' => $notif['subject'], 'id_board' => $_REQUEST['move_to'], 'board' => $board_name));\n\n\tif (!empty($topicRecounts))\n\t{\n\t\t$members = array();\n\n\t\t// Get all the members who have posted in the moved topics.\n\t\t$request = wesql::query('\n\t\t\tSELECT id_member, id_topic\n\t\t\tFROM {db_prefix}messages\n\t\t\tWHERE id_topic IN ({array_int:moved_topic_ids})',\n\t\t\tarray(\n\t\t\t\t'moved_topic_ids' => array_keys($topicRecounts),\n\t\t\t)\n\t\t);\n\n\t\twhile ($row = wesql::fetch_assoc($request))\n\t\t{\n\t\t\tif (!isset($members[$row['id_member']]))\n\t\t\t\t$members[$row['id_member']] = 0;\n\n\t\t\t$members[$row['id_member']] += ($topicRecounts[$row['id_topic']] === '+') ? 1 : -1;\n\t\t}\n\n\t\twesql::free_result($request);\n\n\t\t// And now update them member's post counts\n\t\tforeach ($members as $id_member => $post_adj)\n\t\t\tupdateMemberData($id_member, array('posts' => 'posts + ' . $post_adj));\n\t}\n\n\tforeach ($moveCache as $topic)\n\t{\n\t\tlogAction('move', array('topic' => $topic[0], 'board_from' => $topic[1], 'board_to' => $topic[2]));\n\t\tsendNotifications($topic[0], 'move');\n\t}\n}", "public static function moveTask($taskId, $taskCol) {\n //move board item\n\n DatabaseConnector::query('UPDATE board_items SET board_column=:board_column WHERE ID=:taskid', array(':taskid'=>$taskId,':board_column'=>$taskCol));\n\n}", "function cns_move_posts($from_topic_id, $to_topic_id, $posts, $reason, $to_forum_id = null, $delete_if_empty = false, $title = null)\n{\n // Info about source\n $from_info = $GLOBALS['FORUM_DB']->query_select('f_topics', array('t_forum_id'), array('id' => $from_topic_id));\n if (!array_key_exists(0, $from_info)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'topic'));\n }\n $from_forum_id = $from_info[0]['t_forum_id'];\n\n // Useful for queries\n $or_list = '';\n foreach ($posts as $post) {\n if ($or_list != '') {\n $or_list .= ' OR ';\n }\n $or_list .= 'id=' . strval($post);\n }\n\n // Check access\n if (!cns_may_moderate_forum($from_forum_id)) {\n access_denied('I_ERROR');\n }\n $_postdetails = $GLOBALS['FORUM_DB']->query('SELECT p_cache_forum_id,p_intended_solely_for,p_validated FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_posts WHERE ' . $or_list, null, null, false, true);\n $num_posts_counted = 0;\n foreach ($_postdetails as $post) {\n if ((is_null($post['p_intended_solely_for'])) && ($post['p_validated'] == 1)) {\n $num_posts_counted++;\n }\n if ($post['p_cache_forum_id'] != $from_forum_id) {\n fatal_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n }\n\n // Is it a support ticket move?\n if (addon_installed('tickets')) {\n require_code('tickets');\n $is_support_ticket = (is_ticket_forum($from_forum_id)) && (is_ticket_forum($to_forum_id));\n } else {\n $is_support_ticket = false;\n }\n\n // Create topic, if this is a split\n if (is_null($to_topic_id)) {\n if (is_null($to_forum_id)) {\n fatal_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n\n if ($is_support_ticket) {\n // For support tickets, we need to make the spacer post\n require_code('tickets2');\n $member = get_member();\n foreach ($posts as $post) {\n $member = $GLOBALS['FORUM_DB']->query_select_value('f_posts', 'p_poster', array('id' => $posts[0]));\n if ($member != get_member()) {\n break;\n }\n }\n $ticket_id = strval($member) . '_' . uniqid('', true);\n $ticket_type = $GLOBALS['SITE_DB']->query_select_value('tickets', 'ticket_type', array('topic_id' => $from_topic_id));\n if (is_null($title)) {\n $title = $GLOBALS['FORUM_DB']->query_select_value('f_posts', 'p_title', array('id' => $posts[0]));\n }\n $_ticket_url = build_url(array('page' => 'tickets', 'type' => 'ticket', 'id' => $ticket_id, 'redirect' => null), get_module_zone('tickets'), null, false, true, true);\n $ticket_url = $_ticket_url->evaluate();\n ticket_add_post($member, $ticket_id, $ticket_type, $title, '', $ticket_url);\n $to_topic_id = $GLOBALS['LAST_TOPIC_ID'];\n $GLOBALS['FORUM_DB']->query('UPDATE ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_posts SET p_time=' . strval(time()) . ' WHERE ' . $or_list, null, null, false, true);\n } else {\n require_code('cns_topics_action');\n $to_topic_id = cns_make_topic($to_forum_id);\n }\n\n if ((!is_null($title)) && (count($posts) != 0)) {\n $GLOBALS['FORUM_DB']->query_update('f_posts', array('p_title' => $title), array('id' => $posts[0]), '', 1);\n }\n }\n\n // Info about destination\n $to_info = $GLOBALS['FORUM_DB']->query_select('f_topics', array('t_forum_id'), array('id' => $to_topic_id));\n if (!array_key_exists(0, $to_info)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'topic'));\n }\n $to_forum_id = $to_info[0]['t_forum_id'];\n\n // Do move\n $GLOBALS['FORUM_DB']->query('UPDATE ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_posts SET p_cache_forum_id=' . strval($to_forum_id) . ', p_topic_id=' . strval($to_topic_id) . ' WHERE ' . $or_list, null, null, false, true);\n\n // Update caching\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase();\n foreach ($posts as $post) {\n $revision_engine->recategorise_old_revisions('post', strval($post), strval($to_topic_id));\n }\n }\n require_code('cns_posts_action2');\n cns_force_update_topic_caching($from_topic_id, -$num_posts_counted, true, true);\n cns_force_update_topic_caching($to_topic_id, $num_posts_counted, true, true);\n if ((!is_null($from_forum_id)) && (!is_null($to_topic_id)) && ($from_forum_id != $to_topic_id)) {\n if ($from_forum_id != $to_forum_id) {\n require_code('cns_forums_action2');\n cns_force_update_forum_caching($from_forum_id, 0, -$num_posts_counted);\n cns_force_update_forum_caching($to_forum_id, 0, $num_posts_counted);\n\n // Update member post counts if we've switched between post-count countable forums\n $post_count_info = $GLOBALS['FORUM_DB']->query('SELECT id,f_post_count_increment FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_forums WHERE id=' . strval($from_forum_id) . ' OR id=' . strval($to_forum_id), 2);\n if ($post_count_info[0]['id'] == $from_forum_id) {\n $from = $post_count_info[0]['f_post_count_increment'];\n $to = $post_count_info[1]['f_post_count_increment'];\n } else {\n $from = $post_count_info[1]['f_post_count_increment'];\n $to = $post_count_info[0]['f_post_count_increment'];\n }\n if ($from != $to) {\n $sql = 'SELECT p_poster FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_posts WHERE (' . $or_list . ')';\n if (addon_installed('unvalidated')) {\n $sql .= ' AND p_validated=1';\n }\n $_member_post_counts = collapse_1d_complexity('p_poster', $GLOBALS['FORUM_DB']->query($sql, null, null, false, true));\n $member_post_counts = array_count_values($_member_post_counts);\n\n foreach ($member_post_counts as $member_id => $member_post_count) {\n if ($to == 0) {\n $member_post_count = -$member_post_count;\n }\n cns_force_update_member_post_count($member_id, $member_post_count);\n }\n }\n }\n }\n\n // Delete if needed\n $test = $delete_if_empty ? $GLOBALS['FORUM_DB']->query_select_value('f_posts', 'COUNT(*)', array('p_topic_id' => $from_topic_id)) : 1;\n if ($test == 0) {\n $num_view_count = 0;\n $num_view_count += $GLOBALS['FORUM_DB']->query_select_value('f_topics', 't_num_views', array('id' => $from_topic_id));\n $num_view_count += $GLOBALS['FORUM_DB']->query_select_value('f_topics', 't_num_views', array('id' => $to_topic_id));\n $GLOBALS['FORUM_DB']->query_update('f_topics', array('t_num_views' => $num_view_count), array('id' => $to_topic_id), '', 1);\n\n require_code('cns_topics_action');\n require_code('cns_topics_action2');\n cns_delete_topic($from_topic_id, do_lang('MOVE_POSTS'));\n return true;\n } else {\n // Make informative post\n $topic_title = $GLOBALS['FORUM_DB']->query_select_value('f_topics', 't_cache_first_title', array('id' => $to_topic_id));\n if ($is_support_ticket) {\n $to_link = '[page=\"' . get_module_zone('tickets') . ':tickets:ticket:' . $ticket_id . '\"]' . str_replace('\"', '\\\"', str_replace('[', '\\\\[', $topic_title)) . '[/page]';\n } else {\n $to_link = '[page=\"' . get_module_zone('topicview') . ':topicview:browse:' . strval($to_topic_id) . '\"]' . str_replace('\"', '\\\"', str_replace('[', '\\\\[', $topic_title)) . '[/page]';\n }\n $me_link = '[page=\"' . get_module_zone('members') . ':members:view:' . strval(get_member()) . '\"]' . $GLOBALS['CNS_DRIVER']->get_username(get_member(), true) . '[/page]';\n $lang = do_lang('INLINE_POSTS_MOVED_MESSAGE', $me_link, integer_format(count($posts)), array($to_link, get_timezoned_date(time())));\n require_code('cns_posts_action');\n cns_make_post($from_topic_id, '', $lang, 0, false, 1, 1, null, null, $GLOBALS['FORUM_DB']->query_select_value('f_posts', 'p_time', array('id' => $posts[0])) + 1, null, null, null, null, false);\n\n require_code('cns_general_action2');\n cns_mod_log_it('MOVE_POSTS', strval($to_topic_id), strval(count($posts)), $reason);\n\n if (!is_null($from_forum_id)) {\n cns_decache_cms_blocks($from_forum_id);\n }\n if (!is_null($to_forum_id)) {\n cns_decache_cms_blocks($to_forum_id);\n }\n\n return false;\n }\n}", "private function _move()\n\t{\n\t\t// Login check\n\t\tif (User::isGuest())\n\t\t{\n\t\t\treturn $this->_login();\n\t\t}\n\n\t\t// Authorization check\n\t\tif (!$this->params->get('access-edit-item'))\n\t\t{\n\t\t\t$this->setError(Lang::txt('PLG_MEMBERS_' . strtoupper($this->_name) . '_NOT_AUTHORIZED'));\n\t\t\treturn $this->_collections();\n\t\t}\n\n\t\t// Incoming\n\t\t$post = \\Components\\Collections\\Models\\Post::getInstance(Request::getInt('post', 0));\n\n\t\tif (!$post->move(Request::getInt('board', 0)))\n\t\t{\n\t\t\t$this->setError($post->getError());\n\t\t}\n\n\t\t$route = Route::url($this->member->link() . '&active=' . $this->_name);\n\n\t\tif (Request::getInt('no_html', 0))\n\t\t{\n\t\t\techo $route;\n\t\t\texit;\n\t\t}\n\n\t\tApp::redirect($route);\n\t}", "function insertThread($posterID, $forumID, $title, $content)\n{\n\n\tglobal $threadInsert, $commentInsert, $forumUpdateTime;\n\n\t// Some modest input sanitation\n\t$title = strip_tags($title);\n\t$content = strip_tags($content);\n\t$content = str_replace(\"\\n\", \"<br>\", $content);\n\n\t$threadInsert->bind_param(\"is\", $forumID, $title);\n\t$threadInsert->execute();\n\n\t$threadID = $threadInsert->insert_id;\n\n\t$commentInsert->bind_param(\"iis\", $posterID, $threadID, $content);\n\t$commentInsert->execute();\n\n\t$forumUpdateTime->bind_param(\"i\", $forumID);\n\t$forumUpdateTime->execute();\n}", "public function changeThread($from, $to) {\n\t\t/** @var TicketThread $old_thread */\n\t\t$old_thread = $this->xpdo->getObject('TicketThread', $from);\n\t\t/** @var TicketThread $new_thread */\n\t\t$new_thread = $this->xpdo->getObject('TicketThread', $to);\n\n\t\tif ($new_thread && $old_thread) {\n\t\t\t$this->set('thread', $to);\n\t\t\t$this->save();\n\n\t\t\t$children = $this->getMany('Children');\n\t\t\t/** @var TicketComment $child */\n\t\t\tforeach ($children as $child) {\n\t\t\t\t$child->set('parent', $to);\n\t\t\t\t$child->save();\n\t\t\t}\n\n\t\t\t$old_thread->updateLastComment();\n\t\t\t/** @var modResource|Ticket $ticket */\n\t\t\tif ($ticket = $this->xpdo->getObject('modResource', $old_thread->get('resource'))) {\n\t\t\t\tif (method_exists($ticket, 'clearCache')) {\n\t\t\t\t\t$ticket->clearCache();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$new_thread->updateLastComment();\n\t\t\t/** @var modResource|Ticket $ticket */\n\t\t\tif ($ticket = $this->xpdo->getObject('modResource', $new_thread->get('resource'))) {\n\t\t\t\tif (method_exists($ticket, 'clearCache')) {\n\t\t\t\t\t$ticket->clearCache();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function topic_move_ren_all($old_forum_id, $new_forum_id, $title_label = '')\n\t{\n\t\tglobal $db, $cache, $lang;\n\n\t\t$old_forum_id = $this->fix_forum_id($old_forum_id);\n\t\t$new_forum_id = $this->fix_forum_id($new_forum_id);\n\t\tif (($old_forum_id <= 0) || ($new_forum_id <= 0))\n\t\t{\n\t\t\tif (!defined('STATUS_404')) define('STATUS_404', true);\n\t\t\tmessage_die(GENERAL_MESSAGE, 'NO_FORUM');\n\t\t}\n\n\t\tif($new_forum_id != $old_forum_id)\n\t\t{\n\t\t\t$db->sql_transaction('begin');\n\n\t\t\t$sql = \"UPDATE \" . TOPICS_TABLE . \"\n\t\t\t\tSET forum_id = \" . $new_forum_id . \"\n\t\t\t\t\" . (!empty($title_label) ? \", topic_title = CONCAT(\\\"\" . $db->sql_escape($title_label) . \" \\\", topic_title)\" : \"\") . \"\n\t\t\t\tWHERE forum_id = \" . $old_forum_id;\n\t\t\t$db->sql_query($sql);\n\n\t\t\t$sql = \"UPDATE \" . POSTS_TABLE . \"\n\t\t\t\tSET forum_id = \" . $new_forum_id . \"\n\t\t\t\tWHERE forum_id = \" . $old_forum_id;\n\t\t\t$db->sql_query($sql);\n\n\t\t\t// UPI2DB - BEGIN\n\t\t\t$sql = \"UPDATE \" . UPI2DB_LAST_POSTS_TABLE . \"\n\t\t\t\tSET forum_id = \" . $new_forum_id . \"\n\t\t\t\tWHERE forum_id = \" . $old_forum_id;\n\t\t\t$db->sql_query($sql);\n\n\t\t\t$sql = \"UPDATE \" . UPI2DB_UNREAD_POSTS_TABLE . \"\n\t\t\t\tSET forum_id = \" . $new_forum_id . \"\n\t\t\t\tWHERE forum_id = \" . $old_forum_id;\n\t\t\t$db->sql_query($sql);\n\t\t\t// UPI2DB - END\n\n\t\t\t$sql = \"UPDATE \" . TOPICS_WATCH_TABLE . \"\n\t\t\t\tSET forum_id = \" . $new_forum_id . \"\n\t\t\t\tWHERE forum_id = \" . $old_forum_id;\n\t\t\t$db->sql_query($sql);\n\n\t\t\t// TAGS - BEGIN\n\t\t\t$sql = \"UPDATE \" . TOPICS_TAGS_MATCH_TABLE . \"\n\t\t\t\tSET forum_id = \" . $new_forum_id . \"\n\t\t\t\tWHERE forum_id = \" . $old_forum_id;\n\t\t\t$db->sql_query($sql);\n\t\t\t// TAGS - END\n\n\t\t\t$db->sql_transaction('commit');\n\n\t\t\t$this->sync_cache(array($new_forum_id, $old_forum_id), 0);\n\t\t\t$this->sync_topic_details(0, 0, true, false);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function unTrashThread() {\n\t\t$this->getTrashThread();\n\t\t$oldThreadId = $this->getThreadId();\n\t\t//take off the topic starter, which is included in the list of replies\n\t\t$oldTopic = array_shift($this->replies);\n\t\t$newThreadId = $oldTopic->unTrash();\n\t\tforeach ($this->replies as $x=>$v) {\n\t\t\t$v->unTrash();\n\t\t}\n\t\t//the post itself is included in the replies array\n\t\t//get thread is the entire thread\n\n\t\t//update all the old posts to the new thread id\n\t\t//fix reply_id where it is not null\n\t\t//then match the thread_id to the new pkey\n\t\t$db = DB::getHandle();\n\t\t$db->query(\n\t\t\tClassForum_Queries::getQuery('updateReplyId',\n\t\t\t\tarray($newThreadId,$oldThreadId)\n\t\t\t));\n\t\t$db->query(\n\t\t\tClassForum_Queries::getQuery('updateThreadId',\n\t\t\t\tarray($newThreadId,$oldThreadId)\n\t\t\t));\n\t}", "function loadBoard()\n{\n\tglobal $txt, $scripturl, $context, $modSettings, $board_info, $board, $topic;\n\n\t$db = database();\n\t$cache = Cache::instance();\n\n\t// Assume they are not a moderator.\n\tUser::$info->is_mod = false;\n\t// @since 1.0.5 - is_mod takes into account only local (board) moderators,\n\t// and not global moderators, is_moderator is meant to take into account both.\n\tUser::$info->is_moderator = false;\n\n\t// Start the linktree off empty..\n\t$context['linktree'] = array();\n\n\t// Have they by chance specified a message id but nothing else?\n\tif (empty($_REQUEST['action']) && empty($topic) && empty($board) && !empty($_REQUEST['msg']))\n\t{\n\t\t// Make sure the message id is really an int.\n\t\t$_REQUEST['msg'] = (int) $_REQUEST['msg'];\n\n\t\t// Looking through the message table can be slow, so try using the cache first.\n\t\tif (!$cache->getVar($topic, 'msg_topic-' . $_REQUEST['msg'], 120))\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Messages.subs.php');\n\t\t\t$topic = associatedTopic($_REQUEST['msg']);\n\n\t\t\t// So did it find anything?\n\t\t\tif ($topic !== false)\n\t\t\t{\n\t\t\t\t// Save save save.\n\t\t\t\t$cache->put('msg_topic-' . $_REQUEST['msg'], $topic, 120);\n\t\t\t}\n\t\t}\n\n\t\t// Remember redirection is the key to avoiding fallout from your bosses.\n\t\tif (!empty($topic))\n\t\t{\n\t\t\tredirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg'] . '#msg' . $_REQUEST['msg']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tloadPermissions();\n\t\t\tnew ElkArte\\Themes\\ThemeLoader();\n\t\t\tif (!empty(User::$info->possibly_robot))\n\t\t\t{\n\t\t\t\tHeaders::instance()\n\t\t\t\t\t->removeHeader('all')\n\t\t\t\t\t->headerSpecial('HTTP/1.1 410 Gone')\n\t\t\t\t\t->sendHeaders();\n\t\t\t}\n\n\t\t\tthrow new \\ElkArte\\Exceptions\\Exception('topic_gone', false);\n\t\t}\n\t}\n\n\t// Load this board only if it is specified.\n\tif (empty($board) && empty($topic))\n\t{\n\t\t$board_info = array('moderators' => array());\n\n\t\treturn;\n\t}\n\n\tif ($cache->isEnabled() && (empty($topic) || $cache->levelHigherThan(2)))\n\t{\n\t\t// @todo SLOW?\n\t\tif (!empty($topic))\n\t\t{\n\t\t\t$temp = $cache->get('topic_board-' . $topic, 120);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$temp = $cache->get('board-' . $board, 120);\n\t\t}\n\n\t\tif (!empty($temp))\n\t\t{\n\t\t\t$board_info = $temp;\n\t\t\t$board = (int) $board_info['id'];\n\t\t}\n\t}\n\n\tif (empty($temp))\n\t{\n\t\t$select_columns = array();\n\t\t$select_tables = array();\n\t\t// Wanna grab something more from the boards table or another table at all?\n\t\tcall_integration_hook('integrate_load_board_query', array(&$select_columns, &$select_tables));\n\n\t\t$request = $db->query('', '\n\t\t\tSELECT\n\t\t\t\tc.id_cat, b.name AS bname, b.description, b.num_topics, b.member_groups, b.deny_member_groups,\n\t\t\t\tb.id_parent, c.name AS cname, COALESCE(mem.id_member, 0) AS id_moderator,\n\t\t\t\tmem.real_name' . (!empty($topic) ? ', b.id_board' : '') . ', b.child_level,\n\t\t\t\tb.id_theme, b.override_theme, b.count_posts, b.id_profile, b.redirect,\n\t\t\t\tb.unapproved_topics, b.unapproved_posts' . (!empty($topic) ? ', t.approved, t.id_member_started' : '') . (!empty($select_columns) ? ', ' . implode(', ', $select_columns) : '') . '\n\t\t\tFROM {db_prefix}boards AS b' . (!empty($topic) ? '\n\t\t\t\tINNER JOIN {db_prefix}topics AS t ON (t.id_topic = {int:current_topic})' : '') . (!empty($select_tables) ? '\n\t\t\t\t' . implode(\"\\n\\t\\t\\t\\t\", $select_tables) : '') . '\n\t\t\t\tLEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)\n\t\t\t\tLEFT JOIN {db_prefix}moderators AS mods ON (mods.id_board = {raw:board_link})\n\t\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = mods.id_member)\n\t\t\tWHERE b.id_board = {raw:board_link}',\n\t\t\tarray(\n\t\t\t\t'current_topic' => $topic,\n\t\t\t\t'board_link' => empty($topic) ? $db->quote('{int:current_board}', array('current_board' => $board)) : 't.id_board',\n\t\t\t)\n\t\t);\n\t\t// If there aren't any, skip.\n\t\tif ($request->num_rows() > 0)\n\t\t{\n\t\t\t$row = $request->fetch_assoc();\n\n\t\t\t// Set the current board.\n\t\t\tif (!empty($row['id_board']))\n\t\t\t{\n\t\t\t\t$board = (int) $row['id_board'];\n\t\t\t}\n\n\t\t\t// Basic operating information. (globals... :/)\n\t\t\t$board_info = array(\n\t\t\t\t'id' => $board,\n\t\t\t\t'moderators' => array(),\n\t\t\t\t'cat' => array(\n\t\t\t\t\t'id' => $row['id_cat'],\n\t\t\t\t\t'name' => $row['cname']\n\t\t\t\t),\n\t\t\t\t'name' => $row['bname'],\n\t\t\t\t'raw_description' => $row['description'],\n\t\t\t\t'description' => $row['description'],\n\t\t\t\t'num_topics' => $row['num_topics'],\n\t\t\t\t'unapproved_topics' => $row['unapproved_topics'],\n\t\t\t\t'unapproved_posts' => $row['unapproved_posts'],\n\t\t\t\t'unapproved_user_topics' => 0,\n\t\t\t\t'parent_boards' => getBoardParents($row['id_parent']),\n\t\t\t\t'parent' => $row['id_parent'],\n\t\t\t\t'child_level' => $row['child_level'],\n\t\t\t\t'theme' => $row['id_theme'],\n\t\t\t\t'override_theme' => !empty($row['override_theme']),\n\t\t\t\t'profile' => $row['id_profile'],\n\t\t\t\t'redirect' => $row['redirect'],\n\t\t\t\t'posts_count' => empty($row['count_posts']),\n\t\t\t\t'cur_topic_approved' => empty($topic) || $row['approved'],\n\t\t\t\t'cur_topic_starter' => empty($topic) ? 0 : $row['id_member_started'],\n\t\t\t);\n\n\t\t\t// Load the membergroups allowed, and check permissions.\n\t\t\t$board_info['groups'] = $row['member_groups'] == '' ? array() : explode(',', $row['member_groups']);\n\t\t\t$board_info['deny_groups'] = $row['deny_member_groups'] == '' ? array() : explode(',', $row['deny_member_groups']);\n\n\t\t\tcall_integration_hook('integrate_loaded_board', array(&$board_info, &$row));\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\tif (!empty($row['id_moderator']))\n\t\t\t\t{\n\t\t\t\t\t$board_info['moderators'][$row['id_moderator']] = array(\n\t\t\t\t\t\t'id' => $row['id_moderator'],\n\t\t\t\t\t\t'name' => $row['real_name'],\n\t\t\t\t\t\t'href' => getUrl('profile', ['action' => 'profile', 'u' => $row['id_moderator']]),\n\t\t\t\t\t\t'link' => '<a href=\"' . getUrl('profile', ['action' => 'profile', 'u' => $row['id_moderator']]) . '\">' . $row['real_name'] . '</a>'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} while (($row = $request->fetch_assoc()));\n\n\t\t\t// If the board only contains unapproved posts and the user can't approve then they can't see any topics.\n\t\t\t// If that is the case do an additional check to see if they have any topics waiting to be approved.\n\t\t\tif ($board_info['num_topics'] == 0 && $modSettings['postmod_active'] && !allowedTo('approve_posts'))\n\t\t\t{\n\t\t\t\t// Free the previous result\n\t\t\t\t$request->free_result();\n\n\t\t\t\t// @todo why is this using id_topic?\n\t\t\t\t// @todo Can this get cached?\n\t\t\t\t$request = $db->query('', '\n\t\t\t\t\tSELECT COUNT(id_topic)\n\t\t\t\t\tFROM {db_prefix}topics\n\t\t\t\t\tWHERE id_member_started={int:id_member}\n\t\t\t\t\t\tAND approved = {int:unapproved}\n\t\t\t\t\t\tAND id_board = {int:board}',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id_member' => User::$info->id,\n\t\t\t\t\t\t'unapproved' => 0,\n\t\t\t\t\t\t'board' => $board,\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tlist ($board_info['unapproved_user_topics']) = $request->fetch_row();\n\t\t\t}\n\n\t\t\tif ($cache->isEnabled() && (empty($topic) || $cache->levelHigherThan(2)))\n\t\t\t{\n\t\t\t\t// @todo SLOW?\n\t\t\t\tif (!empty($topic))\n\t\t\t\t{\n\t\t\t\t\t$cache->put('topic_board-' . $topic, $board_info, 120);\n\t\t\t\t}\n\n\t\t\t\t$cache->put('board-' . $board, $board_info, 120);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Otherwise the topic is invalid, there are no moderators, etc.\n\t\t\t$board_info = array(\n\t\t\t\t'moderators' => array(),\n\t\t\t\t'error' => 'exist'\n\t\t\t);\n\t\t\t$topic = null;\n\t\t\t$board = 0;\n\t\t}\n\t\t$request->free_result();\n\t}\n\n\tif (!empty($topic))\n\t{\n\t\t$_GET['board'] = (int) $board;\n\t}\n\n\tif (!empty($board))\n\t{\n\t\t// Now check if the user is a moderator.\n\t\tUser::$info->is_mod = isset($board_info['moderators'][User::$info->id]);\n\n\t\tif (count(array_intersect(User::$info->groups, $board_info['groups'])) == 0 && User::$info->is_admin === false)\n\t\t{\n\t\t\t$board_info['error'] = 'access';\n\t\t}\n\t\tif (!empty($modSettings['deny_boards_access']) && count(array_intersect(User::$info->groups, $board_info['deny_groups'])) != 0 && User::$info->is_admin === false)\n\t\t{\n\t\t\t$board_info['error'] = 'access';\n\t\t}\n\n\t\t// Build up the linktree.\n\t\t$context['linktree'] = array_merge(\n\t\t\t$context['linktree'],\n\t\t\tarray(array(\n\t\t\t\t\t 'url' => getUrl('action', $modSettings['default_forum_action']) . '#c' . $board_info['cat']['id'],\n\t\t\t\t\t 'name' => $board_info['cat']['name']\n\t\t\t\t )\n\t\t\t),\n\t\t\tarray_reverse($board_info['parent_boards']),\n\t\t\tarray(array(\n\t\t\t\t\t 'url' => getUrl('board', ['board' => $board, 'start' => '0', 'name' => $board_info['name']]),\n\t\t\t\t\t 'name' => $board_info['name']\n\t\t\t\t )\n\t\t\t)\n\t\t);\n\t}\n\n\t// Set the template contextual information.\n\t$context['user']['is_mod'] = (bool) User::$info->is_mod;\n\t$context['user']['is_moderator'] = (bool) User::$info->is_moderator;\n\t$context['current_topic'] = $topic;\n\t$context['current_board'] = $board;\n\n\t// Hacker... you can't see this topic, I'll tell you that. (but moderators can!)\n\tif (!empty($board_info['error']) && (!empty($modSettings['deny_boards_access']) || $board_info['error'] != 'access' || User::$info->is_moderator === false))\n\t{\n\t\t// The permissions and theme need loading, just to make sure everything goes smoothly.\n\t\tloadPermissions();\n\t\tnew ElkArte\\Themes\\ThemeLoader();\n\n\t\t$_GET['board'] = '';\n\t\t$_GET['topic'] = '';\n\n\t\t// The linktree should not give the game away mate!\n\t\t$context['linktree'] = array(\n\t\t\tarray(\n\t\t\t\t'url' => $scripturl,\n\t\t\t\t'name' => $context['forum_name_html_safe']\n\t\t\t)\n\t\t);\n\n\t\t// If it's a prefetching agent, stop it\n\t\tstop_prefetching();\n\n\t\t// If we're requesting an attachment.\n\t\tif (!empty($_REQUEST['action']) && $_REQUEST['action'] === 'dlattach')\n\t\t{\n\t\t\tob_end_clean();\n\t\t\tHeaders::instance()\n\t\t\t\t->removeHeader('all')\n\t\t\t\t->headerSpecial('HTTP/1.1 403 Forbidden')\n\t\t\t\t->sendHeaders();\n\t\t\texit;\n\t\t}\n\t\telseif (User::$info->is_guest)\n\t\t{\n\t\t\tTxt::load('Errors');\n\t\t\tis_not_guest($txt['topic_gone']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!empty(User::$info->possibly_robot))\n\t\t\t{\n\t\t\t\tHeaders::instance()\n\t\t\t\t\t->removeHeader('all')\n\t\t\t\t\t->headerSpecial('HTTP/1.1 410 Gone')\n\t\t\t\t\t->sendHeaders();\n\t\t\t}\n\n\t\t\tthrow new \\ElkArte\\Exceptions\\Exception('topic_gone', false);\n\t\t}\n\t}\n\n\tif (User::$info->is_mod)\n\t{\n\t\tUser::$info->groups = array_merge(User::$info->groups, [3]);\n\t}\n}", "public function transfer($threadID, $oldBoard, $targetBoard)\n {\n $this->dao->update(TABLE_THREAD)->set('board')->eq($targetBoard)->where('id')->eq($threadID)->exec();\n\n if(dao::isError()) return false;\n\n $this->loadModel('forum', 'team')->updateBoardStats($oldBoard);\n $this->forum->updateBoardStats($targetBoard);\n return true;\n }", "function listThreads($forumID)\n{\n\n\tglobal $threadQueryByForum, $commentQueryByThread;\n\n\t$threadQueryByForum->bind_param(\"i\", $forumID);\n\t$threadQueryByForum->execute();\n\t$threads = $threadQueryByForum->get_result();\n\n\t$amount = 1;\n\t$commentQueryByThread->bind_param(\"ii\", $threadID, $amount);\n\n\techo \"<h2>Threads</h2>\";\n\n\twhile ($threadRow = $threads->fetch_row()) {\n\n\t\t$threadID = $threadRow[0];\n\t\t$threadTitle = $threadRow[3];\n\n\n\t\techo \"<div class=\\\"content-row\\\">\";\n\t\techo \"<div class=\\\"post-title\\\">\";\n\t\techo \"<h4><a href=\\\"thread.php?id=$threadID\\\">$threadTitle</a></h4>\";\n\t\techo \"</div>\";\n\t\techo \"</div>\";\n\t}\n\n\t$threads->close();\n\n\tif (isset($_SESSION['userid'])) {\n\n\t\t$requestURI = $_SERVER['REQUEST_URI'];\n\n\t\techo \"<div class=\\\"content-row\\\">\";\n\t\techo \"<form action=\\\"post.php\\\" method=\\\"POST\\\">\";\n\t\techo \"<div class=\\\"label\\\">\";\n\t\techo \"<h2>New Thread</h2>\";\n\t\techo \"<label for=\\\"title\\\">Title: </label>\";\n\t\techo \"<input type=\\\"text\\\" class=\\\"title\\\" id=\\\"title\\\" name=\\\"title\\\">\";\n\t\techo \"</div>\";\n\t\techo \"<label>Content</label>\";\n\t\techo \"<textarea id=\\\"replytext\\\" name=\\\"replytext\\\" rows=\\\"4\\\" cols=\\\"40\\\"></textarea>\";\n\t\techo \"<input type=\\\"submit\\\" class=\\\"reply\\\" value=\\\"Post\\\">\";\n\t\techo \"<input type=\\\"hidden\\\" id=\\\"forumid\\\" name=\\\"forumid\\\" value=\\\"$forumID\\\">\";\n\t\techo \"<input type=\\\"hidden\\\" id=\\\"redirect\\\" name=\\\"redirect\\\" value=\\\"$requestURI\\\">\";\n\t\techo \"</form>\";\n\t\techo \"</div>\";\n\t}\n}", "function move_topics($topic_ids, $forum_id, $auto_sync = true)\n{\n\tglobal $_CLASS;\n\n\tif (empty($topic_ids))\r\n\t{\r\n\t\treturn;\r\n\t}\n\n\t$_CLASS['core_db']->transaction();\n\n\t$forum_ids = array($forum_id);\n\t$sql_where = is_array($topic_ids) ? 'IN (' . implode(', ', $topic_ids) . ')' : '= ' . $topic_ids;\n\n\t$sql = 'DELETE FROM ' . FORUMS_TOPICS_TABLE . \"\n\t\tWHERE topic_moved_id $sql_where\n\t\t\tAND forum_id = \" . $forum_id;\n\t$_CLASS['core_db']->query($sql);\n\n\tif ($auto_sync)\n\t{\n\t\t$sql = 'SELECT DISTINCT forum_id\n\t\t\tFROM ' . FORUMS_TOPICS_TABLE . '\n\t\t\tWHERE topic_id ' . $sql_where;\n\t\t$result = $_CLASS['core_db']->query($sql);\n\n\t\twhile ($row = $_CLASS['core_db']->fetch_row_assoc($result))\n\t\t{\n\t\t\t$forum_ids[] = $row['forum_id'];\n\t\t}\n\t\t$_CLASS['core_db']->free_result($result);\n\t}\n\n\t$table_ary = array(FORUMS_TOPICS_TABLE, FORUMS_POSTS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, FORUMS_LOG_TABLE, FORUMS_DRAFTS_TABLE);\n\n\tforeach ($table_ary as $table)\n\t{\n\t\t$sql = \"UPDATE $table\n\t\t\tSET forum_id = $forum_id\n\t\t\tWHERE topic_id \" . $sql_where;\n\t\t$_CLASS['core_db']->query($sql);\n\t}\n\tunset($table_ary);\n\n\t$_CLASS['core_db']->transaction('commit');\n\n\tif ($auto_sync)\n\t{\n\t\tsync('forum', 'forum_id', $forum_ids, true);\n\t}\n\tunset($forum_ids);\n}", "function execute()\n\t{\n\t\tif (!$this->perms->auth('board_view')) {\n\t\t\t$this->lang->board();\n\t\t\treturn $this->message(\n\t\t\t\tsprintf($this->lang->board_message, $this->sets['forum_name']),\n\t\t\t\t($this->perms->is_guest) ? sprintf($this->lang->board_regfirst, $this->self) : $this->lang->board_noview\n\t\t\t);\n\t\t}\n\n\t\t// No forum need be specified\n\n\t\tif (isset($this->get['num'])) {\n\t\t\t$n = intval($this->get['num']);\n\t\t} elseif ($this->user['user_topics_page'] != 0) {\n\t\t\t$n = $this->user['user_topics_page'];\n\t\t} else {\n\t\t\t$n = $this->sets['topics_per_page'];\n\t\t}\n\n\t\tif ($this->user['user_posts_page'] != 0) {\n\t\t\t$m = $this->user['user_posts_page'];\n\t\t} else {\n\t\t\t$m = $this->sets['posts_per_page'];\n\t\t}\n\n\t\t$min = isset($this->get['min']) ? intval($this->get['min']) : 0;\n\n\t\t$this->set_title($this->lang->recent_active);\n \t$this->tree($this->lang->recent_active);\n\n\t\t$forums_str = $this->readmarker->create_forum_permissions_string();\n\n\t\t// Handle the unlikely case where the user cannot view ANY forums\n\t\tif ($forums_str == \"\") {\n\t\t\theader('HTTP/1.0 404 Not Found');\n\t\t\treturn $this->message($this->lang->recent_forum, $this->lang->recent_noexist);\n\t\t}\n \n\t\t$topicCount = $this->countTopics($forums_str);\n\n\t\t$pagelinks = $this->htmlwidgets->get_pages($topicCount, 'a=recent', $min, $n);\n\n\t\t$forumjump = $this->htmlwidgets->select_forums(0, 0, null, true);\n\n\t\t$topics = $this->getTopics($forums_str, $min, $n, $m);\n\n\t\tif (!$topics) {\n\t\t\t$topics = eval($this->template('RECENT_NO_TOPICS'));\n\t\t}\n\n\t\treturn eval($this->template('RECENT_MAIN'));\n\t}", "function bbp_update_topic_forum_id($topic_id = 0, $forum_id = 0)\n{\n}", "function joinForum($link, $name, $id, $status){\r\n\t\t$query = \"INSERT INTO {$name}_forum\";\r\n\t\t$query = \" ({$id}, {$status})\";\r\n\r\n\t\t$result = mysqli_query($link, $query);\r\n\t\thandleError($link, $result, \"Could not join {$name}_forum.\");\r\n\t}", "function bbp_update_reply_forum_id($reply_id = 0, $forum_id = 0)\n{\n}", "function bbp_admin_forums($current_screen)\n{\n}", "private function move_onto($a, $b) {\r\n\t\t\tlist($a_position, $b_position) = $this->get_initial_positions($a, $b);\r\n\t\t\t\r\n\t\t\t// Send all blocks on top of $a and $b to original positions\r\n\t\t\t$this->reset_positions($a, $a_position);\r\n\t\t\t$this->reset_positions($b, $b_position);\r\n\t\t\t\r\n\t\t\t// Move $a onto $b\r\n\t\t\t$this->setup->blocks[$a_position] = array_diff($this->setup->blocks[$a_position], array($a));\r\n\t\t\t$this->setup->blocks[$b_position] = array_merge($this->setup->blocks[$b_position], array($a));\r\n\t\t}", "function endMoving($tid)\n{\n\t$sql = 'DELETE FROM dw_troops_move WHERE tid = '.\\util\\mysql\\sqlval($tid);\n\t\\util\\mysql\\query($sql);\n}", "function bbp_update_forum_id($post_id = 0, $forum_id = 0)\n{\n}", "function _fix_links_callback_forum($m)\n\t{\n\t\treturn 'index.php?board='.strval(import_id_remap_get('forum',strval($m[2]),true));\n\t}" ]
[ "0.6687623", "0.6508574", "0.63064194", "0.6219729", "0.6194511", "0.6021548", "0.5987178", "0.5881788", "0.58469146", "0.5838295", "0.5699785", "0.56782305", "0.5567268", "0.5528206", "0.5524373", "0.54282916", "0.5339822", "0.5286115", "0.5234105", "0.5208037", "0.5206233", "0.52056897", "0.5187806", "0.5185368", "0.51797116", "0.5174955", "0.5173039", "0.51525384", "0.51461947", "0.5140598" ]
0.66723883
1
Sets the "lock" state on a forum thread
protected function lockThread($data, $state = 1) { if(!$data['user']){ http_response_code(401); throw new \Exception('Not authorized'); } if(!isset($data['id'])){ http_response_code(400); throw new \Exception('id required'); } $validStates = array(0, 1); if(!in_array($state, $validStates)){ http_response_code(400); throw new \Exception('Invalid state'); } $getItem = $this->get('forum_topics', $data['id']); if(!$getItem){ http_response_code(400); throw new \Exception('Thread not found'); } if((($getItem['userId'] != $data['user']['userId'] AND !$data['perms']['canLockOther']) OR ($getItem['userId'] == $data['user']['userId'] AND !$data['perms']['canLockSelf']))){ http_response_code(403); throw new \Exception('You do not have permission for this'); } $stateMessage = ''; $responseMessage = ''; $lockStamp = null; $lockBy = 0; switch($state){ case 0: $stateMessage = 'unlocked'; $responseMessage = 'unlocking'; break; case 1: $stateMessage = 'locked'; $responseMessage = 'locking'; $lockStamp = timestamp(); $lockBy = $data['user']['userId']; break; } if($getItem['locked'] == $state){ http_response_code(400); throw new \Exception('Thread already '.$stateMessage); } $lock = $this->edit('forum_topics', $getItem['topicId'], array('locked' => $state, 'lockTime' => $lockStamp, 'lockedBy' => $lockBy)); if(!$lock){ http_response_code(400); throw new \Exception('Error '.$responseMessage.' thread'); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bbp_set_post_lock($post_id = 0)\n{\n}", "public function lockThread(Request $request) {\n $id = $request->id;\n $thread = Thread::find($id);\n if($thread != null) {\n $thread->locked = !$thread->locked;\n $thread->save();\n }\n }", "public function lock()\n\t{\n\t\t$this->lockState = true;\n\t}", "function test_admin_can_lock_threads(){\n $this->signIn(factory('App\\User')->state('administrator')->create());\n\n $thread = create('App\\Thread', ['user_id' => auth()->id()]);\n\n $this->post(route('locked-threads.store', $thread));\n \n $this->assertTrue(!! $thread->fresh()->locked);\n\n }", "private function set_lock()\n\t\t{\n\t\t\t$this->connection_lock\t=\ttrue;\n\t\t}", "function lock($state) {\n\t\tglobal $gBitSystem;\n\t\t$ret = FALSE;\n\t\tif ($state==null || !is_numeric($state) || $state > 1 || $state<0) {\n\t\t\t$this->mErrors[]=(\"Invalid current state\");\n\t\t} else {\n\t\t\t$state = (($state+1)%2);\n\t\t\t$query_sel = \"SELECT * FROM `\".BIT_DB_PREFIX.\"boards_topics` WHERE `parent_id` = ?\";\n\t\t\t$result = $this->mDb->query( $query_sel, array( $this->mCommentContentId ) );\n\t\t\tif($result->RowCount()==0) {\n\t\t\t\t$query_ins = \"INSERT INTO `\".BIT_DB_PREFIX.\"boards_topics` (`parent_id`,`is_locked`) VALUES ( ?, ?)\";\n\t\t\t\t$result = $this->mDb->query( $query_ins, array( $this->mCommentContentId, $state ) );\n\t\t\t} else {\n\t\t\t\t$query_up = \"UPDATE `\".BIT_DB_PREFIX.\"boards_topics` SET `is_locked` = ? WHERE `parent_id` = ?\";\n\t\t\t\t$result = $this->mDb->query( $query_up, array( $state, $this->mCommentContentId ) );\n\t\t\t}\n\t\t\t$ret = true;\n\t\t}\n\t\treturn $ret;\n\t}", "function bbp_edit_lock($default = 5)\n{\n}", "private function lock()\n {\n $method = $this->_backend . 'Lock';\n $this->$method();\n $this->_locked = time();\n }", "public function setLocked($boolean)\r\n {\r\n }", "public function test_a_thread_can_be_locked()\n {\n $thread = create(Thread::class);\n\n // So long as the thread is not locked, new replies can be added\n $reply = create(Reply::class, ['thread_id' => $thread->id]);\n\n // We should have one thread\n $this->assertEquals(1, $thread->replies->count());\n\n // When we lock the thread\n $thread->lock();\n\n // The thread should not be \"open\"\n $this->assertFalse($thread->open);\n }", "public function set_locked($locked) {\n $this->locked = $locked;\n }", "public function toggle_forum()\n {\n }", "function set_current_user_thread_status( $thread_id, $action, $user_id ) {\n\n\t// use a short expiry because this will be updated every 15 seconds when the page is active.\n\twp_cache_set( $user_id, $action, \"thread-status-{$thread_id}\", 60 );\n}", "function wp_set_post_lock( $post_id ) {\n\t$post = get_post( $post_id );\n\tif ( ! $post ) {\n\t\treturn false;\n\t}\n\n\t$user_id = get_current_user_id();\n\tif ( 0 == $user_id ) {\n\t\treturn false;\n\t}\n\n\t$now = time();\n\t$lock = \"$now:$user_id\";\n\n\tupdate_post_meta( $post->ID, '_edit_lock', $lock );\n\n\treturn array( $now, $user_id );\n}", "function bbp_check_post_lock($post_id = 0)\n{\n}", "public static function post_lock() {\n\n\t\tif ( ! isset( $_POST['post_ID'] ) || empty( $_POST['post_ID'] ) ) {\n\n\t\t\twp_send_json_error( 'Post ID is required.' );\n\t\t}\n\n\t\t$post_ID = absint( $_POST['post_ID'] );\n\n\t\t$result = check_ajax_referer( 'gf_post_lock', 'nonce', false );\n\n\t\tif ( false === $result ) {\n\n\t\t\twp_send_json_error( 'Check AJAX referer failed.' );\n\t\t}\n\n\t\t$result = wp_set_post_lock( $post_ID );\n\n\t\twp_send_json_success( $result );\n\t}", "protected function stickyThread($data, $state = 1)\n\t{\n\t\tif(!$data['user']){\n\t\t\thttp_response_code(401);\n\t\t\tthrow new \\Exception('Not authorized');\n\t\t}\n\t\tif(!isset($data['id'])){\n\t\t\thttp_response_code(400);\n\t\t\tthrow new \\Exception('id required');\n\t\t}\n\t\t$validStates = array(0, 1);\n\t\tif(!in_array($state, $validStates)){\n\t\t\thttp_response_code(400);\n\t\t\tthrow new \\Exception('Invalid state');\n\t\t}\n\t\t$getItem = $this->get('forum_topics', $data['id']);\n\t\tif(!$getItem){\n\t\t\thttp_response_code(400);\n\t\t\tthrow new \\Exception('Thread not found');\n\t\t}\n\t\tif((($getItem['userId'] != $data['user']['userId'] AND !$data['perms']['canStickyOther'])\n\t\t\tOR ($getItem['userId'] == $data['user']['userId'] AND !$data['perms']['canStickySelf']))){\n\t\t\thttp_response_code(403);\n\t\t\tthrow new \\Exception('You do not have permission for this');\n\t\t}\n\t\t$stateMessage = '';\n\t\t$responseMessage = '';\n\t\tswitch($state){\n\t\t\tcase 0:\n\t\t\t\t$stateMessage = 'unstickied';\n\t\t\t\t$responseMessage = 'Error removing sticky status from thread';\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$stateMessage = 'stickied';\n\t\t\t\t$responseMessage = 'Error setting sticky status on thread';\n\t\t\t\tbreak;\n\t\t}\n\t\tif($getItem['sticky'] == $state){\n\t\t\thttp_response_code(400);\n\t\t\tthrow new \\Exception('Thread already '.$stateMessage);\n\t\t}\n\t\t$lock = $this->edit('forum_topics', $getItem['topicId'], array('sticky' => $state));\t\n\t\tif(!$lock){\n\t\t\thttp_response_code(400);\n\t\t\tthrow new \\Exception($responseMessage);\n\t\t}\n\t\treturn true;\n\t}", "public function lock(): void\n {\n $this->isLocked = true;\n }", "public function lock(): void\n {\n $this->locked = array_merge($this->locked, $this->selected);\n }", "function bbp_admin_setting_callback_editlock()\n{\n}", "public function lock_post( $post_id ) {\n\t\tif ( ! function_exists( 'wp_set_post_lock' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/post.php';\n\t\t}\n\n\t\twp_set_post_lock( $post_id );\n\t}", "function bbp_forum_enforce_blocked()\n{\n}", "function setPiLockStatus($_PiID,$lockstat){\n\t\t$this->pquery(\"UPDATE TABLE PI SET PendLock= :ls WHERE PiID=:piid\",array('ls'=>$lockstat,'piid'=>$_PiID));\n\t}", "public function lock() {\n \n }", "public function lockAction() {\n\t\ttry{\n\t\t\t/*$refurl1=$_SERVER['HTTP_REFERER'];\n\t\t\t$refurl=explode(\"/\", $refurl1);\n\t\t\tif($refurl[4]!='usermanagement' && $refurl[5]!='user' && $refurl[6]!='list' ){\n\t\t\t\t\t$this->_redirect(\"/default/error/accessdenied\");\n\t\t\t}else{*/\n\t\t\t\n\t\t\t$params = $this->_getAllParams();\n\t\t\t$this->attributesgroups->lock($params);\n\t\t\t$this->_redirect($_SERVER['HTTP_REFERER']);\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 set_thread($authorization, $success_message, $set_key=false)\n {\n $forum = $this->get_forum();\n if (!$forum->userCan('phpwsbb', $authorization))\n return dgettext('phpwsbb', \"You're not allowed to do this!\");\n $result = $this->commit();\n if ($result == true) {\n if ($set_key)\n $this->setKey();\n return $success_message;\n }\n else\n return $result;\n }", "public function lock()\n {\n fhread_mutex_lock($this->mutex);\n }", "function mysupport_newthread()\r\n{\r\n\tglobal $mybb;\r\n\t\r\n\tif($mybb->settings['enablemysupport'] != 1)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tglobal $db, $cache, $lang, $forum;\r\n\t\r\n\t// this is a MySupport forum and this user has been denied support\r\n\tif(mysupport_forum($forum['fid']) && $mybb->user['deniedsupport'] == 1)\r\n\t{\r\n\t\t// start the standard error message to show\r\n\t\t$deniedsupport_message = $lang->deniedsupport;\r\n\t\t// if a reason has been set for this user\r\n\t\tif($mybb->user['deniedsupportreason'] != 0)\r\n\t\t{\r\n\t\t\t$query = $db->simple_select(\"mysupport\", \"name\", \"mid = '\" . intval($mybb->user['deniedsupportreason']) . \"'\");\r\n\t\t\t$deniedsupportreason = $db->fetch_field($query, \"name\");\r\n\t\t\t$deniedsupport_message .= \"<br /><br />\" . $lang->sprintf($lang->deniedsupport_reason, htmlspecialchars_uni($deniedsupportreason));\r\n\t\t}\r\n\t\terror($deniedsupport_message);\r\n\t}\r\n}", "function quickMod_lock($topic_data, $boards_can)\n{\n\tif (!in_array(0, $boards_can['lock_any']))\n\t{\n\t\tforeach ($topic_data as $topic => $this_topic)\n\t\t{\n\t\t\tif (!in_array($this_topic['id_board'], $boards_can['lock_any']))\n\t\t\t{\n\t\t\t\t// So they can't just (un)lock *any* topic. That makes things more complicated. It needs to be their topic, not locked by a moderator and they have to have permission\n\t\t\t\tif ($this_topic['id_member_started'] != MID || $this_topic['locked'] == 1 || !in_array($this_topic['id_board'], $boards_can['lock_own']))\n\t\t\t\t\tunset($topic_data[$topic]);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (empty($topic_data))\n\t\treturn;\n\n\t// Alternate the locked value.\n\twesql::query('\n\t\tUPDATE {db_prefix}topics\n\t\tSET locked = CASE WHEN locked = {int:is_locked} THEN ' . (!empty($boards_can['lock_any']) ? '1' : '2') . ' ELSE 0 END\n\t\tWHERE id_topic IN ({array_int:locked_topic_ids})',\n\t\tarray(\n\t\t\t'locked_topic_ids' => array_keys($topic_data),\n\t\t\t'is_locked' => 0,\n\t\t)\n\t);\n\n\tforeach ($topic_data as $topic => $this_topic)\n\t{\n\t\tlogAction($this_topic['locked'] ? 'lock' : 'unlock', array('topic' => $topic, 'board' => $this_topic['id_board']));\n\t\tsendNotifications($topic, $this_topic['locked'] ? 'lock' : 'unlock');\n\t}\n}", "public function lockToNormal()\n {\n $this->lockToNormal = 1;\n $this->current = 'normal';\n }" ]
[ "0.7047061", "0.67947704", "0.65969855", "0.65290445", "0.6450094", "0.63765174", "0.6169678", "0.6152287", "0.61308837", "0.61166126", "0.61010015", "0.61009663", "0.6067185", "0.6062619", "0.5924935", "0.59093016", "0.58975554", "0.58929634", "0.58676225", "0.58393747", "0.58315593", "0.5806787", "0.57542896", "0.57214123", "0.571654", "0.5689933", "0.56476235", "0.5627057", "0.56017894", "0.55516946" ]
0.7207248
0
Sets the "sticky" state on a forum thread
protected function stickyThread($data, $state = 1) { if(!$data['user']){ http_response_code(401); throw new \Exception('Not authorized'); } if(!isset($data['id'])){ http_response_code(400); throw new \Exception('id required'); } $validStates = array(0, 1); if(!in_array($state, $validStates)){ http_response_code(400); throw new \Exception('Invalid state'); } $getItem = $this->get('forum_topics', $data['id']); if(!$getItem){ http_response_code(400); throw new \Exception('Thread not found'); } if((($getItem['userId'] != $data['user']['userId'] AND !$data['perms']['canStickyOther']) OR ($getItem['userId'] == $data['user']['userId'] AND !$data['perms']['canStickySelf']))){ http_response_code(403); throw new \Exception('You do not have permission for this'); } $stateMessage = ''; $responseMessage = ''; switch($state){ case 0: $stateMessage = 'unstickied'; $responseMessage = 'Error removing sticky status from thread'; break; case 1: $stateMessage = 'stickied'; $responseMessage = 'Error setting sticky status on thread'; break; } if($getItem['sticky'] == $state){ http_response_code(400); throw new \Exception('Thread already '.$stateMessage); } $lock = $this->edit('forum_topics', $getItem['topicId'], array('sticky' => $state)); if(!$lock){ http_response_code(400); throw new \Exception($responseMessage); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSticky($sticky) {\n\t\t$this->sticky = (boolean)$sticky;\n\t}", "public function setSticky($sticky) {\n\t\t$this->sticky = (boolean) $sticky;\n\t}", "function sticky($state) {\n\t\tglobal $gBitSystem;\n\t\t$ret = FALSE;\n\t\tif ($state==null || !is_numeric($state) || $state > 1 || $state<0) {\n\t\t\t$this->mErrors[]=(\"Invalid current state\");\n\t\t} else {\n\t\t\t$state = (($state+1)%2);\n\t\t\t$query_sel = \"SELECT * FROM `\".BIT_DB_PREFIX.\"boards_topics` WHERE `parent_id` = ?\";\n\t\t\t$result = $this->mDb->query( $query_sel, array( $this->mCommentContentId ) );\n\t\t\tif($result->RowCount()==0) {\n\t\t\t\t$query_ins = \"INSERT INTO `\".BIT_DB_PREFIX.\"boards_topics` (`parent_id`,`is_sticky`) VALUES ( ?, ? )\";\n\t\t\t\t$result = $this->mDb->query( $query_ins, array( $this->mCommentContentId, $state ) );\n\t\t\t} else {\n\t\t\t\t$query_up = \"UPDATE `\".BIT_DB_PREFIX.\"boards_topics` SET `is_sticky` = ? WHERE `parent_id` = ?\";\n\t\t\t\t$result = $this->mDb->query( $query_up, array( $state, $this->mCommentContentId) );\n\t\t\t}\n\t\t\t$ret = TRUE;\n\t\t}\n\t\treturn $ret;\n\t}", "public function stickyAction() {\n\n //TOPIC SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('sitereview_topic')->isValid())\n return;\n\n //GET LISTING TYPE ID\n $listingtype_id = $this->_listingType->listingtype_id;\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams('sitereview_listing', null, \"edit_listtype_$listingtype_id\")->isValid())\n return;\n\n //GET TOPIC SUBJECT\n $topic = Engine_Api::_()->core()->getSubject();\n\n //GET TOPIC TABLE\n $table = Engine_Api::_()->getDbTable('topics', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n try {\n $topic = Engine_Api::_()->core()->getSubject();\n $topic->sticky = ( null == $this->_getParam('sticky') ? !$topic->sticky : (bool) $this->_getParam('sticky') );\n $topic->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_redirectCustom($topic);\n }", "public function makesticky() {\n global $DB;\n\n // Ensure that post exists and get the right courseid.\n $postid = required_param('postid', PARAM_INT);\n if (!$post = $DB->get_record('format_mypdchat_posts', array('id' => $postid))) {\n print_error('invalidpostid', 'format_mypdchat');\n }\n\n // ... check capability.\n $coursecontext = \\context_course::instance($post->courseid);\n if (!has_capability('format/mypdchat:makesticky', $coursecontext)) {\n print_error('missingcapmakesticky', 'format_mypdchat');\n }\n\n $sticky = optional_param('sticky', '0', PARAM_INT);\n\n if ($post->sticky != $sticky) {\n\n $post->sticky = $sticky;\n $post->timemodified = time();\n $DB->update_record('format_mypdchat_posts', $post);\n }\n return array('error' => '0', 'message' => 'postsaved', 'postid' => $post->id, 'sticky' => \"{$post->sticky}\");\n }", "private function setStickyPosts()\n\t{\n\t\t$this->sticky_posts = get_option('sticky_posts');\n\t\tif ( !$this->sticky_posts ) $this->sticky_posts = [];\n\t}", "function bbp_is_topic_sticky($topic_id = 0, $check_super = \\true)\n{\n}", "public function toggle_forum()\n {\n }", "function bbp_is_topic_super_sticky($topic_id = 0)\n{\n}", "function sticky() {\n\t\treturn is_sticky( $this->_post->ID );\n\t}", "function mb_is_topic_sticky( $topic_id = 0 ) {\n\t$topic_id = mb_get_topic_id( $topic_id );\n\t$super_stickies = get_option( 'mb_super_sticky_topics', array() );\n\t$topic_stickies = get_option( 'mb_sticky_topics', array() );\n\t$stickies = array_merge( $super_stickies, $topic_stickies );\n\n\treturn in_array( $topic_id, $stickies ) ? true : false;\n}", "public function isSticky() {\n\t\treturn $this->sticky;\n\t}", "public function isSticky() {\n\t\treturn $this->sticky;\n\t}", "public function setStickyParams($stickyParams)\n {\n $this->stickyParams = $stickyParams;\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }", "public function callback_sticky_status($status = 0)\n {\n }" ]
[ "0.7173143", "0.7123228", "0.7034409", "0.697823", "0.6813977", "0.6756371", "0.6619688", "0.640509", "0.6347924", "0.63391995", "0.6123943", "0.60566014", "0.60566014", "0.58946866", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355", "0.5827355" ]
0.7299954
0
path of current script (before any url rewriting)
public function getScriptPath() { return $this->getUrlBase().$this->getPathFromString($_SERVER['SCRIPT_NAME']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_script_location() {\n\t\t\treturn __FILE__;\n\t\t}", "function currentRequestedFilePath() //The script the user request landed to. In required files you get the \"landed to\" file.\n\t{\n\t\treturn $_SERVER['SCRIPT_FILENAME'];\n\t}", "protected function getScriptPath(): string\n {\n return realpath($_SERVER['SCRIPT_FILENAME']);\n }", "function url_for($script_path) { //check this function out on e.g. staff_header\n // add the leading '/' if not present\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function ScriptPath($URL=\"\"){\r\n\t $SP=$URL;\r\n\t if($SP==\"\")$SP=$_SERVER[\"SCRIPT_NAME\"];\r\n\t if(substr($SP, 0, 7)==\"http://\")$SP=substr($SP, 7 + strlen($_SERVER[\"HTTP_HOST\"]));\r\n\t if(substr($SP, 0, 7)==\"https://\")$SP=substr($SP, 8 + strlen($_SERVER[\"HTTP_HOST\"]));\r\n\r\n\t return substr($SP, 0, strlen($SP)-strlen(ScriptFileName($URL)));\r\n\t}", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "public function get_scriptPath() {\n\t\treturn $this->scriptPath;\n\t}", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "public function getScriptAbsPath()\n {\n return $this->getScheme() . '://' . $this->getHttpHost() . $this->getScriptRelativePath();\n }", "function url_for($script_path) {\n\t// adds the leading '/', if not present\n\tif($script_path[0] != '/') {\n\t\t$script_path = \"/\" . $script_path;\n\t}\n\treturn WWW_ROOT . $script_path;\n\t// calling code will still need to do the 'echo' part afterwards\n}", "public function getBasePath()\r\n {\r\n return dirname($_SERVER[\"SCRIPT_FILENAME\"]);\r\n }", "function url_for($script_path) {\n // add the leading '/' if not present\n\n if(strlen($script_path) == 0 || $script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "public function _old_getBase()\n {\n $filename = basename($_SERVER['SCRIPT_FILENAME']);\n $base = $_SERVER['SCRIPT_NAME'];\n if (strpos($_SERVER['REQUEST_URI'], $filename) === false)\n {\n // Default of '' for cases when SCRIPT_NAME doesn't contain a filename (ZF-205)\n $base = (strpos($base, $filename) !== false) ? dirname($base) : '';\n }\n return rtrim($base, '/');\n }", "function getBasePath()\n{\n\t$request=Yii::app()->getRequest();\n\treturn dirname($request->getScriptFile());\n}", "public static function getWebLocation() {\n\t\t\t// Horrible...\n\t\t\t$path = dirname($_SERVER['SCRIPT_FILENAME']) . '/';\n\t\t\t$path = preg_replace('#^' . preg_quote($_SERVER['DOCUMENT_ROOT']) . '#', '/', $path);\n\t\t\t$path = preg_replace('#^/+#', '/', $path);\n\t\t\treturn $path;\n\t\t}", "public function getScriptRelativePath()\n {\n if (array_key_exists('rel_path', $this->_cache))\n {\n return $this->_cache['rel_path'];\n }\n\n $filename = (isset($this->_server['SCRIPT_FILENAME']))\n ? basename($this->_server['SCRIPT_FILENAME'])\n : '';\n\n $baseUrl = $this->getScriptRelativeUrl();\n if (empty($baseUrl))\n {\n return ($this->_cache['rel_path'] = '');\n }\n\n if (basename($baseUrl) === $filename)\n {\n $basePath = dirname($baseUrl);\n }\n else\n {\n $basePath = $baseUrl;\n }\n\n if (substr(PHP_OS, 0, 3) === 'WIN')\n {\n $basePath = str_replace('\\\\', '/', $basePath);\n }\n\n return ($this->_cache['rel_path'] = rtrim($basePath, '/'));\n }", "public function getScriptPath () {\n\t$data = $this->scriptPath;\n\t return $data;\n}", "public static function path() {\n\t\tif(array_key_exists(\"REQUEST_URI\",$_SERVER)) {\n\t\t\t$parsed = parse_url($_SERVER[\"REQUEST_URI\"]);\n\t\t\t$path = $parsed[\"path\"];\n\t\t\tif(Registry::get(\"base.path\") != \"/\" && Registry::get(\"base.path\") != \"\") {\n\t\t\t\t$path = str_replace(Registry::get(\"base.path\"),\"\",$path);\n\t\t\t}\n\t\t\treturn str_replace(\"index.php/\",\"\",$path);\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "function get_script() {\n $script_array = explode(\"/\", $_SERVER['SCRIPT_FILENAME']);\n $script1 = array_pop($script_array);\n $script2 = array_pop($script_array);\n return $script2 =='home' ? $script1 : \"/$script2/$script1\";\n}", "public function getPrepath()\n {\n //define('DIR_WWW_ROOT',dirname(__DIR__));\n $docRoot = str_replace($this->server['SCRIPT_NAME'], '', $this->server['SCRIPT_FILENAME']);\n return str_replace($docRoot, '', DIR_WWW_ROOT);\n }", "public function getScriptRelativeUrl()\n {\n if (array_key_exists('rel_script', $this->_cache))\n {\n return $this->_cache['rel_script'];\n }\n\n $filename = (isset($this->_server['SCRIPT_FILENAME'])) ? basename($this->_server['SCRIPT_FILENAME']) : '';\n $baseUrl = '';\n\n if (isset($this->_server['SCRIPT_NAME']) && basename($this->_server['SCRIPT_NAME']) === $filename)\n {\n $baseUrl = $this->_server['SCRIPT_NAME'];\n }\n else if (isset($this->_server['PHP_SELF']) && basename($this->_server['PHP_SELF']) === $filename)\n {\n $baseUrl = $this->_server['PHP_SELF'];\n }\n else\n {\n // Backtrack up the script_filename to find the portion matching\n // php_self\n $path = isset($this->_server['PHP_SELF']) ? $this->_server['PHP_SELF'] : '';\n $file = isset($this->_server['SCRIPT_FILENAME']) ? $this->_server['SCRIPT_FILENAME'] : '';\n $segs = explode('/', trim($file, '/'));\n $segs = array_reverse($segs);\n $index = 0;\n $last = count($segs);\n\n // @codingStandardsIgnoreStart\n do {\n $seg = $segs[$index];\n $baseUrl = '/' . $seg . $baseUrl;\n ++$index;\n $pos = strpos($path, $baseUrl);\n } while (($last > $index) && (false !== $pos) && (0 != $pos));\n // @codingStandardsIgnoreEnd\n }\n\n return ($this->_cache['rel_script'] = rtrim($baseUrl, '/'));\n }", "function getCurrentDir(){\r\n $thisdir = dirname($_SERVER['SCRIPT_NAME']);\r\n return ($thisdir == '/')? '': $thisdir;\r\n}", "public function determineBaseUrl()\n {\n // why this works at all :)\n return dirname($_SERVER['SCRIPT_NAME']);\n }", "function magic_current_url() \n{\n\nglobal $spro_curr_file_url;\n\n// url to inspect\n$spro_curr_file_url = \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n\n\nreturn $spro_curr_file_url;\n\n}", "public function getScript() {\n $url = \"{$this->getScheme()}://{$this->host}\";\n if ($this->port) { $url.= \":{$this->port}\"; }\n $url.= $this->path;\n return $url;\n\t}", "function get_current_filename(){\n return basename($_SERVER['PHP_SELF']);// Return the URL with a trailing slash\n}", "function usu5_base_filename() {\n // Probably won't get past SCRIPT_NAME unless this is reporting cgi location\n $base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF', 'REQUEST_URI', 'ORIG_PATH_INFO', 'HTTP_X_ORIGINAL_URL', 'HTTP_X_REWRITE_URL' ) );\n while ( $base->valid() ) {\n if ( array_key_exists( $base->current(), $_SERVER ) && !empty( $_SERVER[$base->current()] ) ) {\n if ( false !== strpos( $_SERVER[$base->current()], '.php' ) ) {\n preg_match( '@[a-z0-9_]+\\.php@i', $_SERVER[$base->current()], $matches );\n if ( is_array( $matches ) && ( array_key_exists( 0, $matches ) )\n && ( substr( $matches[0], -4, 4 ) == '.php' )\n && ( is_readable( $matches[0] ) ) ) {\n return $matches[0];\n } \n } \n }\n $base->next();\n }\n // Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php\n if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) || ( $_SERVER['PHP_SELF'] == '/' ) ) {\n return 'index.php';\n }\n // Return the standard RC3 code \n return ( ( ( strlen( ini_get( 'cgi.fix_pathinfo' ) ) > 0) && ( (bool)ini_get( 'cgi.fix_pathinfo' ) == false ) ) || !isset( $_SERVER['SCRIPT_NAME'] ) ) ? basename( $_SERVER['PHP_SELF'] ) : basename( $_SERVER['SCRIPT_NAME'] );\n }" ]
[ "0.79314065", "0.77790433", "0.7715423", "0.7560849", "0.7481425", "0.7461131", "0.7379552", "0.7379552", "0.724528", "0.72386754", "0.72386754", "0.7220836", "0.720841", "0.7177001", "0.71684855", "0.7107858", "0.70915747", "0.7087959", "0.7021221", "0.70205843", "0.69977564", "0.6954415", "0.6941114", "0.6934554", "0.6917917", "0.686853", "0.68577254", "0.6836513", "0.68184054", "0.6801002" ]
0.8095672
0
Form javascript builder creates javascript validation info from a form's ID.
public function buildFormJS( $formid ) { $build = "\n<script type=\"text/javascript\">\n"; $build .= "//<![CDATA[\n"; $build .= "$$('td.field input').invoke('observe', 'focus', function(event) {\n"; $build .= "var ele = Event.element(event);\n"; $build .= "ele = $('helper_' + ele.id);\n"; $build .= "if(ele && validated == \"no\") {\n"; $build .= "Effect.Appear(ele, {duration: 0.2, from: 0, to: 1});\n"; $build .= "}\n});\n\n"; $build .= "$$('td.field input').invoke('observe', 'blur', function(event) {\n"; $build .= "var ele = Event.element(event);\n"; $build .= "ele = $('helper_' + ele.id);\n"; $build .= "if(ele && validated == \"no\") {\n"; $build .= "Effect.Fade(ele, {duration: 0.2});\n"; $build .= "}\n});\n\n"; $build .= "new Validation('{$formid}');\n"; $build .= "//]]>\n"; $build .= "</script>\n"; return $build; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_validation_js()\n\t{\n\t\t$this->_generate_rules();\n\t\t$options = array_diff_assoc($this->_options, $this->_get_default_options());\n\t\t$options = $this->_parse_options($options);\n\t\t$options = implode(','.PHP_EOL, $options);\n\n\t\t$form_id = '#'.$this->form()->attribute('id');\n\t\treturn<<<EOJS\nvar validator;\n$(window).load(function(){\n\t$('{$form_id}').find('label.error').each(function(){\n\t\t$(this).attr('generated', true);\n\t});\n\tvalidator = $('{$form_id}').validate({\n{$options}\n\t});\n{$this->_get_methods()}\n});\nEOJS;\n\t}", "function CreateJavascript($formid=0) {\n\t\tif (!$this->IsLoaded()) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (!$this->IsRequired()) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$formid = (int)$formid;\n\n\t\t$alert = sprintf(GetLang('Form_Javascript_Field'), $this->GetFieldName());\n\n\t\t$javascript = '\n\t\t\tvar fname = \"CustomFields_' . $this->fieldid;\n\t\t\tif ($formid > 0) {\n\t\t\t\t$javascript .= '_' . $formid;\n\t\t\t}\n\t\t\t$javascript .= '\";\n\t\t\tvar fld = document.getElementById(fname);\n\t\t\tif (fld.value == \"\") {\n\t\t\t\talert(\"' . $alert . '\");\n\t\t\t\tfld.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t';\n\t\treturn $javascript;\n\t}", "function javascript() {\n\t\tforeach($this->form->Fields() as $field){\n\t\t\t//if the field type has some special specific specification for validation of itself\n\t\t\t$valid = $field->jsValidation();\n\t\t\tif($valid){\n\t\t\t\t$code .= $valid;\n\t\t\t}\n\t\t}\n\t\tif($this->required){\n\t\t\tforeach($this->required[0] as $field) {\n\n\t\t\t\tif(is_array($field)){\n\n\t\t\t\t\t$special = \"\\n\t\t\t\t\t\tclearValidationErrorCache();\\n\";\n\t\t\t\t\t$special .= \"\t\t\t\t\t\terrors = false;\\n\";\n\t\t\t\t\n\t\t\t\t\t\tforeach($field as $compareset){\n\t\n\t\t\t\t\t\t\t$special .= \"\\n\t\t\t\t\t\terrors = errors || (\";\n\t\t\t\t\t\t\t\tforeach($compareset as $required){\n\t\t\t\t\t\t\t\t\t$special .= \"\\n\t\t\t\t\t\t\trequire('$required',true) && \";\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$special = substr($special,0,-4);\n\t\t\t\t\t\t\t$special .= \");\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$special .= \"\\n\t\t\t\t\t\tif(!errors) showCachedValidationErrors();\\n\";\n\t\t\t\t\t\t$code .= $special;\n\n\n\t\t\t\t}else{\n\t\t\t\t\t$code .= \"\t\t\t\t\t\trequire('$field');\\n\";\n\t\t\t\t\t//Tabs for output tabbing :-)\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $code;\n\t}", "function init_validation($idform){\n return <<<EOT\n $(document).ready(function(){\n $(\"#$idform\").validationEngine();\n });\nEOT;\n }", "public function addJsValidation() {\r\n\t\treturn $this->Minify->js('/CORE/CmsFormHelper/validation.js', false);\t\t// false returns rather than echoes\r\n\t}", "function CreateJavascript($formid=0) {\n\t\tif (!$this->IsLoaded()) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (!$this->IsRequired()) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$formid = (int)$formid;\n\n\t\t$alert = sprintf(GetLang('Form_Javascript_Field_Choose_Multiple'), $this->GetFieldName());\n\n\t\t$javascript = '\n\t\t\tvar fldcheck = CheckMultiple' . $formid . '(f, \"CustomFields[' . $this->fieldid;\n\t\t\tif ($formid > 0) {\n\t\t\t\t$javascript .= '_' . $formid;\n\t\t\t}\n\t\t\t$javascript .= ']\");\n\t\t\tif (!fldcheck) {\n\t\t\t\talert(\"' . $alert . '\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t';\n\t\treturn $javascript;\n\t}", "function GetJS($id = null)\r\n\t{\r\n\t\t$ret = null;\r\n\t\tif (!empty($this->validators))\r\n\t\tforeach ($this->validators as $v)\r\n\t\t\t$ret .= $v->GetJS($id);\r\n\t\t$ret .= \"\\t\\tfunction {$id}_{$this->field}_check(validate) \\n\\t\\t{\r\n\t\t\tret = true;\r\n\t\t\tchk_{$this->field} = document.getElementById('{$id}_{$this->field}');\r\n\t\t\tspn_{$id}_{$this->field} = document.getElementById('span_{$id}_{$this->field}');\r\n\t\t\tif (!validate) { spn_{$id}_{$this->field}.innerHTML = ''; return ret; }\";\r\n\t\tif (is_array($this->check))\r\n\t\t{\r\n\t\t\t$ret .= \"\\n\\t\\t\\tix = 0;\";\r\n\t\t\tforeach ($this->check[0] as $ix => $opt)\r\n\t\t\t{\r\n\t\t\t\t$ret .= \"\\n\\t\\t\\tif (document.getElementById('{$this->field}_{$ix}').checked == true) ix++;\";\r\n\t\t\t}\r\n\t\t\t$ret .= \"\\n\\t\\t\\tif (ix < {$this->check[1]})\r\n\t\t\t{\r\n\t\t\t\tspn_{$id}_{$this->field}.innerHTML = '{$this->error}';\r\n\t\t\t\treturn false;\r\n\t\t\t}\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$ret .= \"\\n\\t\\t\\tif (!/^{$this->check}$/.test(chk_{$this->field}.value))\r\n\t\t\t{\r\n\t\t\t\tspn_{$id}_{$this->field}.innerHTML = '{$this->error}';\r\n\t\t\t\tchk_{$this->field}.focus();\r\n\t\t\t\tret = false;\\n\";\r\n\t\t\t\tforeach ($this->validators as $reg => $v)\r\n\t\t\t\t\t$ret .= \"\\t\\t\\t\\t{$id}_{$v->field}_check(0);\\n\";\r\n\t\t\t$ret .= \"\\t\\t\\t\\treturn false;\r\n\t\t\t}\";\r\n\t\t}\r\n\t\t$ret .= \"\\n\\t\\t\\telse\r\n\t\t\t{\\n\";\r\n\t\t\t\tforeach ($this->validators as $reg => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$ret .= \"\\t\\t\\t\\t{$id}_{$v->field}_check(0);\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t$ret .= \"\\t\\t\\t\\tspn_{$id}_{$this->field}.innerHTML = '';\\n\";\r\n\t\t\t\tforeach ($this->validators as $reg => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$ret .= \"\\t\\t\\t\\tret = {$id}_{$v->field}_check(/^$reg$/.test(chk_{$this->field}.value));\\n\";\r\n\t\t\t\t\t$ret .= \"\\t\\t\\t\\tif (!ret) return false\\n\";\r\n\t\t\t\t}\r\n\t\t\t$ret .= \"\\t\\t\\t}\r\n\t\t\treturn ret;\r\n\t\t}\\n\";\r\n\t\treturn $ret;\r\n\t}", "function FormSubmit($id, $value, $form) {\n $output = sprintf('<input type=\"submit\" id=\"%s\" name=\"%s\" value=\"%s\" />', $id, $id, $value);\n\n $jscriptoutput = sprintf('var fv%s=new FormValidator($(\\'%s\\'),{onElementPass:ValidateElementPass,onElementFail:ValidateElementFail});', $form, $form);\n $output .= JsBlock($jscriptoutput, true);\n\n return $output;\n}", "public function renderValidationJS()\n {\n // render custom validation code if any\n if (!empty($this->customValidationCode)) {\n return implode(\"\\n\", $this->customValidationCode);\n // generate validation code if required\n } elseif ($this->isRequired()) {\n $eltname = $this->getName();\n $eltcaption = $this->getCaption();\n $eltmsg = empty($eltcaption)\n ? sprintf(\\XoopsLocale::F_ENTER, $eltname)\n : sprintf(\\XoopsLocale::F_ENTER, $eltcaption);\n $eltmsg = str_replace('\"', '\\\"', stripslashes($eltmsg));\n return \"\\nvar hasSelected = false; var selectBox = myform.{$eltname};\"\n . \"for (i = 0; i < selectBox.options.length; i++ ) { \"\n . \"if (selectBox.options[i].selected == true && selectBox.options[i].value != '') \"\n . \"{ hasSelected = true; break; } }\" . \"if (!hasSelected) \"\n . \"{ window.alert(\\\"{$eltmsg}\\\"); selectBox.focus(); return false; }\";\n }\n return '';\n }", "static public function forms_js() {\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(function($) {\n\t\t\t\t// when widgets are added or updated\n\t\t\t\t$(document).on('widget-added widget-updated', function(ev, widget) {\n\t\t\t\t\tif (typeof wpFormsApi === 'undefined') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twpFormsApi.setup(widget);\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "public function buildForm();", "protected function loadValidationScript(Form &$form)\n\t{\n\t\t$message = $form->getView()->escape(\\JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));\n\n\t\t$js = <<<JS\nJoomla.submitbutton = function(task)\n{\n\tif (task == 'cancel' || document.formvalidator.isValid(document.id('adminForm')))\n\t{\n\t\tJoomla.submitform(task, document.getElementById('adminForm'));\n\t}\n\telse {\n\t\talert('$message');\n\t}\n};\nJS;\n\n\t\t$platform = $this->container->platform;\n\t\t$document = $platform->getDocument();\n\n\t\tif ($document instanceof \\JDocument)\n\t\t{\n\t\t\t$document->addScriptDeclaration($js);\n\t\t}\n\t}", "public function getValidationScript($colName) {\r\n if ($this->mailToOther=='1') {\r\n self::$_fieldsAttributes['otherMail']='';\r\n } else {\r\n self::$_fieldsAttributes['otherMail']='invisible';\r\n } \r\n \r\n $colScript = parent::getValidationScript($colName);\r\n\r\n if ($colName==\"mailToOther\") { \r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' var fld = dijit.byId(\"otherMail\").domNode;';\r\n $colScript .= ' if (this.checked) { ';\r\n $colScript .= ' dojo.style(fld, {visibility:\"visible\"});';\r\n $colScript .= ' } else {';\r\n $colScript .= ' dojo.style(fld, {visibility:\"hidden\"});';\r\n $colScript .= ' fld.set(\"value\",\"\");';\r\n $colScript .= ' } '; \r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>';\r\n } else if ($colName==\"idStatus\") { \r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' if (this.value!=\" \") { ';\r\n $colScript .= ' dijit.byId(\"idEvent\").set(\"value\",\" \");';\r\n $colScript .= ' } '; \r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>';\r\n } else if ($colName==\"idEvent\") { \r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' if (this.value!=\" \") { ';\r\n $colScript .= ' dijit.byId(\"idStatus\").set(\"value\",\" \");';\r\n $colScript .= ' } '; \r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>';\r\n } else if ($colName==\"mailToAssigned\") {\r\n \t$colScript .= '<script type=\"dojo/connect\" event=\"onClick\" >';\r\n \t$colScript .= ' mailable=dijit.byId(\"idMailable\");';\r\n \t//$colScript .= ' alert(mailable.get(\"value\")+\" => \"+mailable.get(\"displayedValue\"));';\r\n \t$colScript .= ' mVal=mailable.get(\"displayedValue\");';\r\n \t$colScript .= ' if (this.checked && mVal!=i18n(\"Activity\") && mVal!=i18n(\"Meeting\") && mVal!=i18n(\"TestSesion\")) { ';\r\n \t$colScript .= ' showAlert(i18n(\"msgIncorrectReceiver\"));';\r\n \t$colScript .= ' this.checked=false;';\r\n \t$colScript .= ' }'; \r\n \t$colScript .= '</script>';\r\n } else if ($colName=='idMailable') { \r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" args=\"evt\">';\r\n $colScript .= ' dijit.byId(\"idType\").set(\"value\",null);';\r\n $colScript .= ' refreshList(\"idType\",\"scope\", mailableArray[this.value]);';\r\n $colScript .= '</script>';\r\n }\r\n return $colScript;\r\n }", "function fb_get_form_validation_custom_error_handler_js()\n{\n\tglobal $LANG;\n\n $js =<<< END\n\nfunction fb_validate(f, error_info) {\n if (!error_info.length) {\n return true;\n }\n var first_el = null;\n var error_str = \"<ul>\";\n for (var i=0; i<error_info.length; i++) {\n error_str += \"<li>\" + error_info[i][1] + \"</li>\";\n if (first_el == null) {\n first_el = error_info[i][0];\n }\n }\n error_str += \"</ul>\";\n\n ft.create_dialog({\n title: \"{$LANG[\"phrase_validation_error\"]}\",\n popup_type: \"error\",\n width: 450,\n content: error_str,\n buttons: [{\n text: \"{$LANG[\"word_close\"]}\",\n click: function() {\n $(this).dialog(\"close\");\n $(first_el).focus().select();\n }\n }]\n })\n\n return false;\n}\nEND;\n\n return $js;\n}", "public function onValidateForm(Form $form) {\n\t\t$values = $form->getValues();\n\n\t\t$this->compiledEvents['onEvent'] = $values['onEventRaw'] ? $this->compileJavaScript('onEvent', $values['onEventRaw']) : NULL;\n\t\t$this->compiledEvents['onStart'] = $values['onStartRaw'] ? $this->compileJavaScript('onStart', $values['onStartRaw']) : NULL;\n\t}", "public function createForm($id)\n {\n //...@TODO\n }", "function validate_my_forms() {\n\t}", "public function formValidation($aFormName) {\n\t\t/**/\n\t\t//this is for using the Microsoft ajax jquery validator\n\t\t$validationMethod = 'validate_'.$aFormName;\n\t\tif (!$this->me->hasMethod($validationMethod))\n\t\t\treturn '';\n\t\t$validate_input_info = $this->$validationMethod();\n\t\t$validate_input_info['debug'] = false;\n\t\t$validate_input_info['submitHandler'] = 'function(form) {$.post(\\''.REQUEST_URL.'\\', '.\n\t\t\t\t\t'$(\"#'.$aFormName.'\").serialize(), function(data) {$(\\'#validation_results\\').html(data);});}';\n\t\t\n\t\t$s = '<script type=\"text/javascript\">$(document).ready(function(){ $(\"#'.$aFormName.'\").validate('.\"\\n\";\n\t\t$s .= Strings::phpArray2jsArray($validate_input_info);\n\t\t$s .= '); }); </script>'.\"\\n\";\n\t\t$s .= '<style>label.error {width: 250px; display: inline; color: red;}</style>'.\"\\n\";\n\t\t/*\n\t\t//jquery-validation engine\n\t\t$s = '<script type=\"text/javascript\">jQuery(document).ready(function(){jQuery(\"#'.$aFormName.'\").validationEngine();});'.\"\\n\";\n\t\t$validationMethod = 'validate_functions_'.$aFormName;\n\t\tif ($this->me->hasMethod($validationMethod))\n\t\t\t$s .= $this->$validationMethod();\n\t\t$s .= \"</script>\\n\";\n\t\t*/\n\t\treturn $s;\n\t}", "public function validateForm();", "function formJavascriptClass()\n\t{\n\t\tFabrikHelperHTML::script('javascript.js', 'components/com_fabrik/plugins/element/fabrikaccess/', false);\n\t}", "public function appendJSvalidator($validator);", "public function getSystemHtmlFormFields($form_id);", "function formJavascriptClass()\n\t{\n\t\tFabrikHelperHTML::script( 'javascript.js', 'components/com_fabrik/plugins/element/fabrikdate/', false );\n\t}", "function impression_create_form() {\n $frm = new DbForm();\n return $frm->build(\"impression_create_form\");\n}", "protected function form($id = null)\n {\n $form = new Form(new CoilObject());\n\n $form->footer(function ($footer) {\n\n $footer->disableReset();\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n });\n\n $form->tools(function (Form\\Tools $tools) {\n // Disable `Veiw` btn.\n $tools->disableView();\n });\n\n $form->tab('Основная информация', function($form) {\n $form->switch('status', 'Отображение');\n $form->switch('is_verified', 'Информация проверена');\n $form->text('title', 'Название предприятия');\n $form->text('owner', 'Владелец');\n// $form->html(function() {\n// return '<p>Ссылка должна </p>';\n// });\n// $form->text('site', 'Сайт')->rules('regex:/(|^http.:\\/\\/)/', [\n// 'regex' => 'Сайт должен начинатся с http/https',\n// ]);\n $form->text('site', 'Сайт');\n// $form->text('site', 'Сайт');\n $form->select('type_id', 'Тип')->options(CoilObjectType::all()->pluck('name', 'id'));\n $form->text('rate', 'Расход угля');\n $form->text('coal_type', 'Марка');\n $form->textarea('comment', 'Комментарий');\n\n })->tab('Географическое положение', function($form) {\n $form->html(function() {\n return \"<div>Получить координаты можно <a href='https://www.mapcoordinates.net/' target='_blank'>здесь</a></div>\";\n });\n $form->text('latitude', 'Широта');\n $form->text('longitude', 'Долгота');\n $form->text('address', 'Адрес');\n $form->select('region_id', 'Область')->options(Region::all()->pluck('name', 'id'));\n $form->select('railways', 'Железные дороги')->options([0 => 'Отсутствует', 1 => 'Собственные ж/д пути', 2 => 'Ж/Д пути находятся поблизости']);\n })->tab('Контакты', function($form) {\n $form->text('person', 'Контактное лицо');\n $form->text('person_subtitle', 'Должность');\n $form->list('phones', 'Телефоны');\n })->tab('Транспортировка', function($form) use($id) {\n\n// $form->html(function() {\n// $html = \"<h3>Ближайшее расстояние до шахты</h3>\";\n// $distance = $this->mineDistances;\n// $mineValue = $distance->mine->id ?? null;\n// $dist = $distance->distance ?? null;\n// $options = '';\n// $mines = Mine::all()->pluck('title', 'id');\n// if (!empty($mines)) {\n// foreach($mines as $key => $mine) {\n// if ($mineValue == $key) {\n// $options.=\"<option value=\\\"$key\\\" selected=\\\"selected\\\">$mine</option>\";\n// } else {\n// $options.=\"<option value=\\\"$key\\\">$mine</option>\";\n// }\n// }\n// }\n// $html = \"<div class=\\\"form-group \\\">\n// <label for=\\\"mineDistances_distance\\\" class=\\\"col-sm-2 control-label\\\">Расстояние</label>\n// <div class=\\\"col-sm-8\\\">\n// <div class=\\\"input-group\\\">\n// <span class=\\\"input-group-addon\\\"><i class=\\\"fa fa-pencil fa-fw\\\"></i></span>\n// <select class=\\\"form-control mineDistances_mine_id_ \\\" style=\\\"width: 100%;\\\" name=\\\"mineDistances[mine_id]\\\" data-value=\\\"\\\" tabindex=\\\"-1\\\" aria-hidden=\\\"true\\\">\n// $options\n// </select>\n// </div>\n// </div>\n// </div>\";\n// $html .= \"\n// <div class=\\\"form-group \\\">\n// <label for=\\\"mineDistances_distance\\\" class=\\\"col-sm-2 control-label\\\">Расстояние</label>\n// <div class=\\\"col-sm-8\\\">\n// <div class=\\\"input-group\\\">\n// <span class=\\\"input-group-addon\\\"><i class=\\\"fa fa-pencil fa-fw\\\"></i></span>\n// <input type=\\\"text\\\" id=\\\"mineDistances_distance\\\" name=\\\"mineDistances[distance]\\\" value=\\\"$dist\\\" class=\\\"form-control mineDistances_distance_\\\" placeholder=\\\"Ввод Расстояние\\\">\n// </div>\n// </div>\n// </div>\";\n// return $html;\n// });\n\n $form->select('mineDistances.mine_id', 'Шахта')->options(Mine::all()->pluck('title', 'id'))->default(function($form) {\n $comd = CoilObjectMineDistance::where('coil_object_id', $form->model()->id)->first()->mine_id ?? null;\n return $comd;\n });\n $form->text('mineDistances.distance', 'Расстояние')->default(function($form) {\n $comd = CoilObjectMineDistance::where('coil_object_id', $form->model()->id)->first()->distance ?? null;\n return $comd;\n });\n $form->hasMany('distances', 'Дистанции', function (Form\\NestedForm $form) {\n $form->select('destination_id', 'Пункт назначения')->options(Destination::all()->pluck('name', 'id'));\n $form->text('distance', 'Дистанция');\n });\n });\n//->tab('Шахты', function($form) {\n// $form->html(function() {\n// $distances = $this->mineDistances;\n// if (!empty($distances)) {\n// $html = '';\n//// echo '<pre>';\n//// print_r($distances);\n//// echo '</pre>';\n// foreach ($distances as $distance) {\n// $title = $distance->mine->title;\n// $dis = $distance->distance;\n// $deleteBtn = route('deleteMineDistance', ['id' => $distance->id]);\n// $html .= \"<div class=\\\"form-group\\\">\n// <label for=\\\"latitude\\\" class=\\\"col-sm-2 control-label\\\">$title</label>\n// <div class=\\\"col-sm-8\\\">\n// <div class=\\\"input-group\\\">\n// <span class=\\\"input-group-addon\\\"><i class=\\\"fa fa-pencil fa-fw\\\"></i></span>\n// <input type=\\\"text\\\" id=\\\"distance\\\" name=\\\"distance\\\" value=\\\"$dis\\\" disabled=\\\"disabled\\\" class=\\\"form-control\\\"></div>\n// <a href=\\\"$deleteBtn\\\" class='btn btn-danger'>Удалить</a>\n// </div>\n// </div>\";\n// }\n// return $html;\n// }\n// });\n// $form->hasMany('mineDistances', 'Дистанции', function (Form\\NestedForm $form) {\n// $form->select('mine_id', 'Пункт назначения')->options(Mine::all()->pluck('title', 'id'));\n// $form->text('distance', 'Дистанция');\n// });\n// });\n return $form;\n }", "static function showForForm(PluginFormvalidationForm $form) {\r\n global $DB, $CFG_GLPI;\r\n\r\n $ID = $form->getID();\r\n if (!PluginFormvalidationField::canView()\r\n || !$form->can($ID, READ)) {\r\n return;\r\n }\r\n\r\n // Have right to manage members\r\n $canedit = self::canUpdate();\r\n $rand = mt_rand();\r\n $field = new PluginFormvalidationField();\r\n $used = [];\r\n $ids = [];\r\n\r\n // Retrieve member list\r\n self::getDataForForm($form, $used, $ids);\r\n\r\n $number = count($used);\r\n\r\n $start = 0;\r\n\r\n // Display results\r\n if ($number) {\r\n echo \"<form name='formfield_form$rand' id='formfield_form$rand' method='post'\r\n action='\".Toolbox::getItemTypeFormURL(__CLASS__).\"'>\";\r\n\r\n echo \"<div class='spaced'>\";\r\n\r\n Session::initNavigateListItems('PluginFormvalidationField',\r\n //TRANS : %1$s is the itemtype name,\r\n // %2$s is the name of the item (used for headings of a list)\r\n sprintf(__('%1$s = %2$s'),\r\n PluginFormvalidationForm::getTypeName(1), $form->getName()));\r\n\r\n echo \"<table class='tab_cadre_fixehov'>\";\r\n\r\n $header_begin = \"<tr>\";\r\n $header_top = '';\r\n $header_bottom = '';\r\n $header_end = '';\r\n\r\n $header_end .= \"<th>\".__('ID').\"</th>\";\r\n $header_end .= \"<th>\".PluginFormvalidationField::getTypeName(1).__(' / CSS selector', 'formvalidation').\"</th>\";\r\n $header_end .= \"<th>\".__('Active').\"</th>\";\r\n $header_end .= \"<th>\".__(\"Validation formula\", 'formvalidation').\"</th>\";\r\n $header_end .= \"<th>\".__('Force mand. sign', 'formvalidation').\"</th>\";\r\n $header_end .= \"<th>\".__(\"Mandatory sign formula\", 'formvalidation').\"</th></tr>\";\r\n echo $header_begin.$header_top.$header_end;\r\n\r\n for ($i=$start, $j=0; ($i < $number); $i++, $j++) {\r\n $data = $used[$i];\r\n $field->getFromDB($data[\"id\"]);\r\n if (!isset($field->fields['name']) || $field->fields['name'] == \"\") {\r\n $field->fields['name'] = $field->fields['css_selector_value'];\r\n }\r\n Session::addToNavigateListItems('PluginFormvalidationField', $data[\"id\"]);\r\n\r\n echo \"\\n<tr class='tab_bg_1'>\";\r\n\r\n echo \"<td class='center'>\";\r\n echo $data['id'];\r\n\r\n echo \"</td><td width='10%'>\".$field->getLink();\r\n\r\n echo \"</td><td class='center'>\";\r\n Html::showCheckbox(['name' => 'is_active_'.$data['id'],\r\n 'checked' => $data['is_active']\r\n ]);\r\n\r\n echo \"</td><td class='center' width='40%'>\";\r\n echo \"<input type='text' size='60' maxlength=1000 name='formula_\".$data['id'].\"' value='\".htmlentities($data['formula'], ENT_QUOTES).\"'>\";\r\n\r\n echo \"</td><td class='center'>\";\r\n Html::showCheckbox(['name' => 'show_mandatory_'.$data['id'],\r\n 'checked' => $data['show_mandatory']\r\n ]);\r\n echo \"</td><td class='center' width='40%'>\";\r\n echo \"<input type='text' size='40' maxlength=1000 name='show_mandatory_if_\".$data['id'].\"' value='\".htmlentities($data['show_mandatory_if'], ENT_QUOTES).\"'>\";\r\n echo \"</td></tr>\";\r\n }\r\n echo $header_begin.$header_bottom.$header_end;\r\n echo \"</table>\";\r\n\r\n if ($canedit) {\r\n echo \"<br>\";\r\n echo Html::submit(_x('button', 'Save'), ['name' => 'update']);\r\n }\r\n\r\n echo \"</div>\";\r\n Html::closeForm();\r\n echo \"<div>\";\r\n echo \"<table class='tab_cadre_fixe'>\";\r\n echo \"<tr>\";\r\n echo \"<th>\".__('Formula guidelines', 'formvalidation').\"</th>\";\r\n echo \"</tr>\";\r\n echo \"<tr><td>\";\r\n echo \"<a href='https://github.com/tomolimo/formvalidation/wiki/Formulas' target='_new'>formvalidation/wiki/Formulas</a>\";\r\n echo \"</td></tr>\";\r\n echo \"</table>\";\r\n echo \"</div>\";\r\n } else {\r\n echo \"<p class='center b'>\".__('No item found').\"</p>\";\r\n }\r\n }", "function opcion__validar_js()\n\t{\n\t\t$param = $this->get_parametros();\t\t\n\t\t$patron_incl = null;\n\t\t$patron_excl = null;\n\t\tif ( isset($param['-a']) && (trim($param['-a']) != '') ) {\n\t\t\t$patron_incl = $param['-a'];\n\t\t}\n\t\tif ( isset($param['-b']) && (trim($param['-b']) != '') ) {\n\t\t\t$patron_excl = $param['-b'];\n\t\t}\n\t\t\n\t\t//Tomo la referencia a la instancia\n\t\t$this->get_nucleo()->validar_js($patron_incl, $patron_excl);\n\t}", "public function getValidationJavascript()\r\n\t{\r\n\r\n\t\t$this->Message->InnerHTML = DIescape($this->_validationMessage);\r\n\r\n\t\tif ($this->IsValidated)\r\n\t\t{\r\n\t\t\t$returnValue = $this->ValidationSuccessJavascript;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$returnValue = $this->ValidationFailureJavascript;\r\n\t\t}\r\n\r\n\t\treturn $returnValue;\r\n\t}", "function javascript_validation() {\n if ($this->in_special_checkout() || $this->enableDirectPayment == false) {\n // if we are in express-checkout flow or if DirectPayment is disabled (ie: just mark flow) then no JS validation req'd\n return false;\n }\n\n return ' if (payment_value == \"' . $this->code . '\") {' . \"\\n\" .\n ' var cc_firstname = document.checkout_payment.paypalec_cc_firstname.value;' . \"\\n\" .\n ' var cc_lastname = document.checkout_payment.paypalec_cc_lastname.value;' . \"\\n\" .\n ' var cc_number = document.checkout_payment.paypalec_cc_number.value;' . \"\\n\" .\n ' var cc_checkcode = document.checkout_payment.paypalwpp_cc_checkcode.value;' . \"\\n\" .\n ' if (cc_firstname == \"\" || cc_lastname == \"\" || eval(cc_firstname.length) + eval(cc_lastname.length) < ' . CC_OWNER_MIN_LENGTH . ') {' . \"\\n\" .\n ' error_message = error_message + \"' . MODULE_PAYMENT_PAYPALWPP_TEXT_JS_CC_OWNER . '\";' . \"\\n\" .\n ' error = 1;' . \"\\n\" .\n ' }' . \"\\n\" .\n ' if (cc_number == \"\" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . \"\\n\" .\n ' error_message = error_message + \"' . MODULE_PAYMENT_PAYPALWPP_TEXT_JS_CC_NUMBER . '\";' . \"\\n\" .\n ' error = 1;' . \"\\n\" .\n ' }' . \"\\n\" .\n ' }' . \"\\n\";\n }", "public function getFormId() {\n\t\treturn 'amazee_assessment_example_simple_form';\n\t}" ]
[ "0.7220364", "0.7080196", "0.68829244", "0.6676272", "0.65637237", "0.6552003", "0.6369166", "0.60689867", "0.6061196", "0.6035482", "0.600111", "0.59962523", "0.59776264", "0.5961166", "0.5942231", "0.593762", "0.59255546", "0.58867353", "0.58460975", "0.5840353", "0.5833783", "0.5815964", "0.5805397", "0.5786246", "0.5782668", "0.5763697", "0.5742542", "0.57151794", "0.5713064", "0.56727374" ]
0.7781419
0
Returns the fetcher cache key for a given feed.
protected function getCacheKey(FeedInterface $feed) { return $feed->id() . ':parser:' . hash('sha256', $feed->getSource()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getCacheKey(FeedInterface $feed) {\n return $feed->id() . ':' . hash('sha256', $feed->getSource());\n }", "public static function getCacheIdentifier();", "public function getCacheKey()\n {\n return md5($this->getURL());\n }", "public function getCacheKey()\n {\n if( ! $this->_cacheKey) {\n $this->_cacheKey = implode('_', array(\n 'DIEHARD',\n $this->_name,\n // Mage::app()->getStore()->getId(), // Can't be used before init\n Mage::app()->getRequest()->getScheme(),\n Mage::app()->getRequest()->getHttpHost(FALSE),\n Mage::app()->getRequest()->getRequestUri(),\n Mage::app()->getRequest()->getCookie(Cm_Diehard_Helper_Data::COOKIE_CACHE_KEY_DATA, '')\n // Design?\n ));\n }\n return $this->_cacheKey;\n }", "public function cacheKey() {\n if ($this->token) {\n return parent::cacheKey();\n } \n \n return null;\n }", "public function getCacheKey() {\r\n $key = $this->getUrl();\r\n\r\n if (isset($this->accessKey)) {\r\n $key .= $this->accessKey;\r\n }\r\n\r\n if (isset($this->requestHeaders['authorization'])) {\r\n $key .= $this->requestHeaders['authorization'];\r\n }\r\n\r\n return md5($key);\r\n }", "private function cacheKey() {\n\t\treturn 'cache_' . md5(\n\t\t\t$this->requestMethod . ':' .\n\t\t\t( !empty($this->options['base_url']) ? $this->options['base_url'] : '' ) .\n\t\t\t$this->url . '-' .\n\t\t\tserialize($this->parameters) .\n\t\t\t(!empty($this->options['username']) ? '-' . $this->options['username'] : '')\n\t\t);\n\t}", "public function get_cache_name() {\n return md5($this->url->getURL() . $this->config['cache_seed']);\n }", "private function getCacheKey(PackageInterface $package, string $url): string\n {\n $getCacheKey = Closure::bind(\n function (PackageInterface $package, $processedUrl) {\n return $this->getCacheKey($package, $processedUrl);\n },\n $this->fileDownloader,\n FileDownloader::class\n );\n\n return $getCacheKey($package, $url);\n }", "public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }", "public function getCacheKey()\n {\n //user-is-online-user1681987\n return sprintf('%s-%s', \"user-is-online\", $this->slug);\n }", "private function cacheKey()\r\n {\r\n return 'server-' . $this->id;\r\n }", "protected function get_cache_id() {\n\t\treturn wponion_hash_string( $this->get_id() . '_' . $this->module() . '_' . $this->unique() );\n\t}", "abstract public function cacheKey(): string;", "public static function getCacheKey()\n {\n return self::CACHE_KEY. date('yW', time());\n }", "public function getCacheId();", "protected function getCacheKey()\n {\n return dechex(crc32(json_encode($this->config)));\n }", "public function getCacheKey($key);", "protected function getUrlRouteCacheKey()\n {\n return $this->getCacheKey('cms-url-list');\n }", "protected function getDiscoverCacheKey($identifier)\n {\n return md5(OpenID::normalizeIdentifier($identifier));\n }", "public function getCacheKey()\n {\n return 'http-repository-cache';\n }", "protected function getCacheKey() {\n return md5($this->getLastModification() . '|' . get_class($this));\n }", "public function CacheKey() {\n\t\t$key = $_SERVER['REQUEST_URI'];\n\t\t$key = str_replace(array('?', '&', '=', '//'), '/', $key);\n\n\t\t// When force update cache, ignore 'cache=0' in url\n\t\tif ('0' == GetGet('cache')) {\n\t\t\t// Can't unset($_GET['cache']);\n\t\t\t// Because it's used later\n\t\t\t$key = str_replace('/cache/0', '', $key);\n\t\t}\n\n\t\t// Remove tailing '/'\n\t\tif ('/' == substr($key, -1))\n\t\t\t$key = substr($key, 0, strlen($key) - 1);\n\n\t\treturn $key;\n\t}", "public function getCacheEntryIdentifier(): string\n {\n return md5(json_encode($this->getParametersArray()));\n }", "public function getCacheKeyAttribute()\n {\n return 'comment-'.$this->id.'-'.$this->updated_at->timestamp;\n }", "public function getCacheKey()\n {\n return md5($this->getQuery() . implode(!empty($this->params) ? $this->params : array()));\n }", "private function getMetadataKey(Request $request)\n {\n if (isset($this->_keyCache[$request])) {\n return $this->_keyCache[$request];\n }\n $this->_keyCache[$request] = $this->_metadataKeyPrefix . '::' . sha1(\n $request->getSchemeAndHttpHost().$request->getRequestUri()\n );\n\n return $this->_keyCache[$request];\n\n }", "public function getCacheKey(): string\n {\n return hash(\n algo: 'xxh128',\n data: \"CompleteStatus.{$this->getShipment()?->getBarcode()}\",\n );\n }", "protected function generateCacheKey(): string\n {\n $serializer = Ioc::make(Serializer::class);\n\n return sprintf(\n '%s:%s:%s',\n $this->command,\n $this->collection->getNamespace(),\n md5($serializer->serialize($this->params))\n );\n }", "protected function getCacheKey()\n {\n $categories = $this->findCategories();\n\n // Sort categories so cache key is always the same\n sort($categories);\n\n return md5(\n 'productlist=' . $this->id . ':'\n . 'where=' . $this->iso_list_where . ':'\n . 'isorc=' . (int) Input::get('isorc') . ':'\n . implode(',', $categories)\n );\n }" ]
[ "0.77826935", "0.62462205", "0.61977214", "0.6154524", "0.607219", "0.60638976", "0.6020516", "0.60105824", "0.6009599", "0.6002395", "0.5977875", "0.59552807", "0.5942219", "0.5938649", "0.59351796", "0.5919729", "0.5913027", "0.57024944", "0.5678583", "0.56707406", "0.5665638", "0.56568855", "0.5638348", "0.5618173", "0.55849195", "0.558033", "0.5575129", "0.55266017", "0.5517116", "0.55092883" ]
0.77090526
1
Shift project task date from current date to delta
public function shiftTaskDate($old_project_dt_start) { global $user, $langs, $conf; $error=0; $taskstatic = new Task($this->db); // Security check $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $tasksarray=$taskstatic->getTasksArray(0, 0, $this->id, $socid, 0); foreach ($tasksarray as $tasktoshiftdate) { $to_update=false; // Fetch only if update of date will be made if ((!empty($tasktoshiftdate->date_start)) || (!empty($tasktoshiftdate->date_end))) { //dol_syslog(get_class($this)."::shiftTaskDate to_update", LOG_DEBUG); $to_update=true; $task = new Task($this->db); $result = $task->fetch($tasktoshiftdate->id); if (!$result) { $error++; $this->error.=$task->error; } } //print "$this->date_start + $tasktoshiftdate->date_start - $old_project_dt_start";exit; //Calcultate new task start date with difference between old proj start date and origin task start date if (!empty($tasktoshiftdate->date_start)) { $task->date_start = $this->date_start + ($tasktoshiftdate->date_start - $old_project_dt_start); } //Calcultate new task end date with difference between origin proj end date and origin task end date if (!empty($tasktoshiftdate->date_end)) { $task->date_end = $this->date_start + ($tasktoshiftdate->date_end - $old_project_dt_start); } if ($to_update) { $result = $task->update($user); if (!$result) { $error++; $this->error.=$task->error; } } } if ($error!=0) { return -1; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function incrementDate() {\n\t\t$this->pl->incrementDate();\n $this->pl->clearWorkspace();\n\t\t$this->pl->setBlankWorkingEntry();\n\t}", "function decrementDate() {\n\t\t$this->pl->decrementDate();\n $this->pl->clearWorkspace();\n\t\t$this->pl->setBlankWorkingEntry();\n\t}", "function GanttSave() {\n\t\t$projectid = Request::get('projectid', Request::R_INT);\n\n\t\tif ($this->User->HasUserItemAccess('projects',$projectid,CU_ACCESS_WRITE)) {\n\n\t\t\tif (Request::get('projectDateStart') && Request::get('projectDateEnd')) {\n\t\t\t\t// move project\n\n\t\t\t\t// get the current project start/ end dates\n\t\t\t\t$projectSQL = sprintf(SQL_GET_PROJECT_NAME_DATES_COLOUR,$projectid);\n\t\t\t\t$project = $this->DB->QuerySingle($projectSQL);\n\t\t\t\t$project['StartDate'] = strtotime($project['StartDate']);\n\t\t\t\t$project['EndDate'] = strtotime($project['EndDate']);\n\n\t\t\t\t// get the relativie number of days the project has been moved\n\t\t\t\t$newProjectStartDate = strtotime(Request::get('projectDateStart'));\n\t\t\t\t$newProjectEndDate = strtotime(Request::get('projectDateEnd'));\n\t\t\t\t$daysDifference = round(($newProjectStartDate - $project['StartDate']) / 60 / 60 / 24);\n\n\t\t\t\t// get a list of all the projects tasks and start/ end dates\n\t\t\t\t$projectsTaskDatesSQL = sprintf(SQL_GET_PROJECTS_TASKS_START_END_DATE,$projectid);\n\t\t\t\t$projectsTaskDates = $this->DB->Query($projectsTaskDatesSQL);\n\n\t\t\t\t// move all of the tasks\n\t\t\t\tfor ($i = 0; $i < count($projectsTaskDates); $i++) {\n\n\t\t\t\t\t$projectsTaskDates[$i]['StartDate'] = strtotime($projectsTaskDates[$i]['StartDate']);\n\t\t\t\t\t$newTaskStartDate = date('Y-m-d',mktime(0,0,0,date('m',$projectsTaskDates[$i]['StartDate']),date('d',$projectsTaskDates[$i]['StartDate']) + $daysDifference,date('Y',$projectsTaskDates[$i]['StartDate'])));\n\n\t\t\t\t\t// milestones dont have a end date set\n\t\t\t\t\tif ($projectsTaskDates[$i]['EndDate'] != '0000-00-00') {\n\t\t\t\t\t\t$projectsTaskDates[$i]['EndDate'] = strtotime($projectsTaskDates[$i]['EndDate']);\n\t\t\t\t\t\t$newTaskEndDate = date('Y-m-d',mktime(0,0,0,date('m',$projectsTaskDates[$i]['EndDate']),date('d',$projectsTaskDates[$i]['EndDate']) + $daysDifference,date('Y',$projectsTaskDates[$i]['EndDate'])));\n\t\t\t\t\t}\n\t\t\t\t\telse $newTaskEndDate = '0000-00-00';\n\n\t\t\t\t\t$updateTaskDatesSQL = sprintf(SQL_UPDATE_TASK_DATES,$newTaskStartDate,$newTaskEndDate,$projectsTaskDates[$i]['ID']);\n\t\t\t\t\t$this->DB->Execute($updateTaskDatesSQL);\n\t\t\t\t}\n\t\t\t\t// update the start/ end dates of the project\n\t\t\t\t$updateTaskDatesSQL = sprintf(SQL_UPDATE_PROJECT_DATES,Request::get('projectDateStart'),Request::get('projectDateEnd'),$projectid);\n\t\t\t\t$this->DB->Execute($updateTaskDatesSQL);\n\n\t\t\t\t// tell flash to reload\n\t\t\t\techo 'reloadDataNeeded=YES&';\n\t\t\t}\n\t\t\telse if (Request::get('projectDateEnd')) {\n\t\t\t\t// change project length\n\t\t\t\t$SQL = sprintf(SQL_GANTT_PROJECT_ENDDATE_SAVE,$projectid,Request::get('projectDateEnd'));\n\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\n\t\t\tif (Request::get('newTask') == 1) {\t// new task\n\t\t\t\t// create the new task (ProjectID, Name, StartDate, EndDate, Duration, Sequence)\n\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_CREATE,$projectid,Request::get('taskName'),Request::get('taskDateStart'),Request::get('taskDateEnd'),Request::get('taskDuration'),Request::get('taskSequence'));\n\t\t\t\t$this->DB->Execute($SQL);\n\n\t\t\t\t// get the task ID\n\t\t\t\t$taskID = $this->DB->ExecuteScalar(SQL_LAST_INSERT);\n\t\t\t\techo 'taskCreateID='.$taskID.'&';\n\t\t\t}\n\n\t\t\tif (Request::get('taskID', Request::R_INT) && Request::get('taskName')) {\n\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_NAME_SAVE,Request::get('taskID', Request::R_INT),Request::get('taskName'));\n\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\n\t\t\tif (Request::get('taskID', Request::R_INT) && Request::get('taskDateStart')) {\n\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_STARTDATE_SAVE,Request::get('taskID', Request::R_INT),Request::get('taskDateStart'));\n\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\n\t\t\tif (Request::get('taskID', Request::R_INT) && Request::get('taskDateEnd')) {\n\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_ENDDATE_SAVE,Request::get('taskID', Request::R_INT),Request::get('taskDateEnd'));\n\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\n\t\t\tif (Request::get('taskID', Request::R_INT) && (Request::get('taskDateStart') || Request::get('taskDateEnd'))) {\n\t\t\t\t// new code for resources 11/2006\n\n\t\t\t\t// get the new duration of this task that was just saved\n\t\t\t\t$taskSQL = sprintf(GET_TASK_DATES,Request::get('taskID', Request::R_INT));\n\t\t\t\t$task = $this->DB->QuerySingle($taskSQL);\n\n\t\t\t\t// get the day ids for the start and end epoch dates\n\t\t\t\t$taskDaysSQL = sprintf(SQL_GET_DAYID,strtotime($task['StartDate']),strtotime($task['EndDate']));\n\t\t\t\t$taskDays = $this->DB->Query($taskDaysSQL);\n\n\t\t\t\t// delete any task resource days not in the new task day range that have no HoursCompleted\n\t\t\t\t$deleteTaskResourceDaysSQL = sprintf(SQL_DELETE_TASK_RESOURCE_DAY,Request::get('taskID', Request::R_INT),$taskDays[0]['ID'],$taskDays[count($taskDays) - 1]['ID']);\n\t\t\t\t$this->DB->Execute($deleteTaskResourceDaysSQL);\n\t\t\t}\n\n\t\t\tif (Request::get('taskID', Request::R_INT) && Request::get('taskDuration')) {\n\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_DURATION_SAVE,Request::get('taskID', Request::R_INT),Request::get('taskDuration'));\n\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\n\t\t\t// *** begin new code added 2006-03 for improvements to Gantt chart\n\t\t\tif (Request::get('taskID', Request::R_INT) && Request::get('taskDependencyID', Request::R_INT) && Request::get('taskDependencyType')) {\n\t\t\t\t\t$SQL = sprintf(SQL_PROJECT_TASK_DEPENDENCY_ADD,Request::get('taskID', Request::R_INT),Request::get('taskDependencyID', Request::R_INT),Request::get('taskDependencyType'));\n\t\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\n\t\t\tif (Request::get('taskID', Request::R_INT) && Request::get('taskDestinationID', Request::R_INT)) {\n\t\t\t\t\t// get the sequence of the source task\n\t\t\t\t\t$SQL = sprintf(SQL_PROJECT_TASK_GET_SEQUENCE_BY_TASK, Request::get('taskID', Request::R_INT));\n\n\t\t\t\t\t$taskSourceSequence = $this->DB->QuerySingle($SQL);\n\t\t\t\t\t$taskSourceSequence = intval($taskSourceSequence[0]);\n\n\t\t\t\t\t// get the sequence of the destination task\n\t\t\t\t\tif (Request::get('taskDestinationID', Request::R_INT) == -1) $taskDestinationSequence = 1;\n\t\t\t\t\telse {\n\t\t\t\t\t\t\t$SQL = sprintf(SQL_PROJECT_TASK_GET_SEQUENCE_BY_TASK, Request::get('taskDestinationID', Request::R_INT));\n\n\t\t\t\t\t\t\t$taskDestinationSequence = $this->DB->QuerySingle($SQL);\n\t\t\t\t\t\t\t$taskDestinationSequence = intval($taskDestinationSequence[0]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// reorder up or down depending on the source and destination order\n\t\t\t\t\tif ($taskSourceSequence > $taskDestinationSequence) {\n\t\t\t\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_REORDER_UP,$taskSourceSequence,$taskDestinationSequence);\n\t\t\t\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_REORDER_DOWN,$taskSourceSequence,$taskDestinationSequence);\n\t\t\t\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t\t\t}\n\t\t\t\t\t// set source task order to destination task order\n\t\t\t\t\t$SQL = sprintf(SQL_GANTT_TASK_REORDER_SET,Request::get('taskID', Request::R_INT),$taskDestinationSequence);\n\t\t\t\t\t$this->DB->Execute($SQL);\n\t\t\t}\n\t\t\t// *** end new code added 2006-03\n\n\t\t\techo 'taskEditSaveStatus=OK';\n\t\t}\n\t\telse {\n\t\t\techo 'taskEditSaveStatus=ERROR&error=Access+Denied';\n\t\t}\n\t}", "function update_dependency(&$bean, $event, $arguments)\n {\n $Task = BeanFactory::getBean('ProjectTask');\n $tasks = $Task->get_full_list(\"\", \"project_task.project_id = '\" . $bean->project_id . \"' AND project_task.predecessors = '\" . $bean->project_task_id . \"'\");\n\n if ($bean->date_finish != $bean->fetched_row['date_finish']) { //if the end date of a current task is changed\n\n $diff = $this->count_days($bean->date_finish, $bean->fetched_row['date_finish']); //Gets the difference in days\n\n foreach ($tasks as $task) { //loop through all dependant tasks\n\n $rel_type = $task->relationship_type; //Determine their dependency type\n\n if ($rel_type == 'FS') { //if its a Finish to start\n //Modify the task's start and end date dependant on the difference in days\n $start = new DateTime($task->date_start);\n $start = $start->modify($diff);\n $startdate = $start->format('Y-m-d');\n\n $duration = $task->duration - 1; //take one off to maintain correct gantt bar length\n\n $enddate = $start->modify('+' . $duration . ' days');\n $enddate = $enddate->format('Y-m-d');\n\n $task->date_start = $startdate;\n $task->date_finish = $enddate;\n $task->save();\n\n } else if ($rel_type == 'SS') { //if its a start to start\n //check if the tasks duration has not been changed so that it does not update when the parent tasks duration is changed\n if ($bean->fetched_row['duration'] == $bean->duration) {\n\n $start = new DateTime($task->date_start);\n $start = $start->modify($diff);\n $startdate = $start->format('Y-m-d');\n\n $duration = $task->duration - 1;\n\n $enddate = $start->modify('+' . $duration . ' days');\n $enddate = $enddate->format('Y-m-d');\n\n $task->date_start = $startdate;\n $task->date_finish = $enddate;\n $task->save();\n\n }\n\n }\n\n }\n\n }\n }", "function addTaskDueDate() {\n if (!Session::has('adminid')) {\n return Redirect::to('/admin/login');\n }\n\n $taskId = 0;\n\n $input = Input::all();\n\n //dd($input); exit;\n if (!empty($input)) {\n $dt = $input['due_date_dt'];\n $tm = $input['due_date_tm'];\n $taskId = $input['task_id'];\n $boardId = $input['board_id'];\n } else {\n return Redirect::to('/');\n }\n\n $dt_formatted = date(\"Y-m-d\", strtotime($dt));\n $tm_formatted = date(\"H:i:s\", strtotime($tm));\n $due_date = $dt_formatted . \" \" . $tm_formatted;\n\n $saveList = array(\n 'due_date' => $due_date,\n 'modified' => date('Y-m-d H:i:s')\n );\n\n\n $boards = DB::table('admintasks')\n ->where('id', $taskId)\n ->update($saveList);\n\n $due_date_text = date(\"M d \\a\\\\t H:i A\", strtotime($due_date));\n\n echo \"<div class='due-dttt'> <span class='due_head'>Due Date </span>\n <span class='due-date_text'>\" . $due_date_text . \"</span>\n </div>\";\n exit;\n }", "public function removeScheduledChangeDate();", "function update(&$bean, $event, $arguments)\n {\n\n if (!$this->IsNullOrEmptyString($bean->project_id)) {\n\n if ($this->IsNullOrEmptyString($bean->set_project_end_date)) {\n global $current_user;\n $dateformat = $current_user->getPreference('datef');\n $project = new Project();\n $project->retrieve($bean->project_id);\n $projectend = DateTime::createFromFormat($dateformat, $project->estimated_end_date);\n $projectend = $projectend->format('Y-m-d');\n $taskend = $bean->date_finish;\n //if the task end date is after the projects end date, extend the project to fit the new task end date.\n if (strtotime($taskend) > strtotime($projectend)) {\n $project->estimated_end_date = $taskend;\n $project->save();\n }\n\n }\n }\n }", "function BringUptoDate($oldversion) {\n \n \n \n}", "function increaseProjectTimeline($projectId,$newNumDays,$isCallInternal)\n{\n\t\n}", "function removeTaskDueDate() {\n if (!Session::has('adminid')) {\n return Redirect::to('/admin/login');\n }\n\n $taskId = 0;\n\n $input = Input::all();\n\n //dd($input); exit;\n if (!empty($input)) {\n $taskId = $input['task_id'];\n $boardId = $input['board_id'];\n } else {\n return Redirect::to('/');\n }\n\n\n\n $saveList = array(\n 'due_date' => null,\n 'modified' => date('Y-m-d H:i:s')\n );\n\n\n $boards = DB::table('admintasks')\n ->where('id', $taskId)\n ->update($saveList);\n\n echo \"1\";\n exit;\n }", "public function actionMove()\n {\n if (!Yii::app()->user->hasState('calUserId'))\n Yii::app()->end();\n\n $delta = $_POST['delta'];\n $allDay = ($_POST['allDay'] == 'true') ? 1 : 0;\n $eventId = $_POST['eventId'];\n if ((Yii::app()->request->isAjaxRequest) and !empty($eventId))\n {\n $event = Event::model()->findByPk($eventId);\n $event->start += $delta;\n $event->end += $delta;\n $event->allDay = $allDay;\n $event->save();\n Yii::app()->end();\n }\n }", "private function getPrevDate($num){\n return Carbon::now()->subMonths($num)->toDateTimeString();\n }", "function stampDateToArchive() {\n\t\treturn $this->setDateToArchive(Core::getCurrentDate());\n\t}", "function shiftDays()\n {\n if (isset ($this->children[0])) {\n array_unshift($this->children, null);\n unset($this->children[0]);\n }\n }", "public function run($_delta);", "function move($e){\n\t\tif ($e['dayDelta'] !== 0){\n\t\t\t$this->db\n\t\t\t\t->set(\"start_date\", \"start_date + INTERVAL {$e['dayDelta']} DAY\", false)\n\t\t\t\t->set(\"end_date\", \"end_date + INTERVAL {$e['dayDelta']} DAY\", false);\n\t\t}\n\t\tif ($e['minuteDelta'] !== 0){\n\t\t\t$this->db\n\t\t\t\t->set(\"start_time\", \"TIME(DATE_ADD(CONCAT('1985-11-08 ', start_time),\n\t\t\t\t\t\tINTERVAL {$e['minuteDelta']} MINUTE))\", false)\n\t\t\t\t->set(\"end_time\", \"TIME(DATE_ADD(CONCAT('1985-11-08 ', end_time),\n\t\t\t\t\t\tINTERVAL {$e['minuteDelta']} MINUTE))\", false);\n\t\t}\n\n\t\treturn $this->db\n\t\t\t->set('event_id', $e['event_id'])//in case none of the above gets executed\n\t\t\t->where('event_id', $e['event_id'])\n\t\t\t->update('events');\n\t}", "public function test_isPast()\n {\n $task = new Task();\n $task->due_date = \"2021-10-11\";\n\n\n }", "public function previousDay(): DateTime {\n return $this->modify('- 1 day');\n }", "function devshop_environment_save_last_task($environment) {\n\n db_update('hosting_devshop_project_environment')\n ->fields(array(\n 'last_task' => $environment->last_task,\n ))\n ->condition('name', $environment->name)\n ->condition('project_nid', $environment->project_nid)\n ->execute();\n}", "function prev_working_day($preserveHours = false) {\n\t\tglobal $AppUI;\n\t\t$do = $this;\n\t\t$end = intval ( dPgetConfig ( 'cal_day_end' ) );\n\t\t$start = intval ( dPgetConfig ( 'cal_day_start' ) );\n\t\twhile ( ! $this->isWorkingDay () || ($this->getHour () < $start) || ($this->getHour () == $start && $this->getMinute () == '0') ) {\n\t\t\t$this->addDays ( - 1 );\n\t\t\t$this->setTime ( $end, '0', '0' );\n\t\t}\n\t\tif ($preserveHours)\n\t\t\t$this->setTime ( $do->getHour (), '0', '0' );\n\t\t\n\t\treturn $this;\n\t}", "public function setting()\n {\n $this->checkAuth();\n $dt = $this->request->getQuery('dt');\n if (isset($dt)) {\n // if (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $dt)) {\n if (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $dt)) {\n $date = Date('Y/m/d', strtotime('first day of this month', strtotime($dt)));\n $this->set('currentTime', $date);\n $currentDate = Date('Y/m/d', strtotime($dt));\n $initsdate = Date('Y/m/d', strtotime('first day of this month', strtotime($date)));\n $initedate = Date('Y/m/d', strtotime('last day of this month', strtotime($date)));\n } else {\n $now = new \\DateTime();\n $this->set('currentTime', $now->format('Y-m-d'));\n $currentDate = $now->format('Y-m-d');\n $initsdate = Date('Y/m/d', strtotime('first day of this month', strtotime($now->format('Y-m-d'))));\n $initedate = Date('Y/m/d', strtotime('last day of this month', strtotime($now->format('Y-m-d'))));\n }\n } else {\n $now = new \\DateTime();\n $this->set('currentTime', $now->format('Y-m-d'));\n $initsdate = Date('Y/m/d', strtotime('first day of this month', strtotime($now->format('Y-m-d'))));\n $initedate = Date('Y/m/d', strtotime('last day of this month', strtotime($now->format('Y-m-d'))));\n $currentDate = $now->format('Y-m-d');\n }\n $NurseryScheduleTable = TableRegistry::get('NurserySchedule');\n if ($this->request->is('post')) {\n $data = $this->request->data;\n $queryManage = $NurseryScheduleTable->find();\n $nurseryschedule = $queryManage->select(['id' => 'NurserySchedule.id', 'rid' => 'NurseryReserves.id', 'reserve_date' => 'NurserySchedule.reserve_date', 'approval' => 'NurseryReserves.approval' ])\n ->join(['NurseryReserves' => ['table' => 'nursery_reserves', 'type' => 'LEFT',\n 'conditions' => 'NurseryReserves.reserve_date= NurserySchedule.reserve_date']])\n ->where([\n 'NurserySchedule.reserve_date >=' => $initsdate,\n 'NurserySchedule.reserve_date <= ' => $initedate\n ])\n ->order(['NurserySchedule.reserve_date' => 'DESC']);\n\n $arrayNS = [];\n foreach ($nurseryschedule as $item) {\n if (!isset($arrayNS[$item->id])) {\n $arrayNS[$item->id] = $item;\n }\n }\n\n $validate = true;\n for ($i = 1; $i <= 31; $i++) {\n $day_ = $i < 10?'0' . $i:$i;\n if (isset($data['s_flg_' . $day_]) && $data['s_flg_' . $day_] == 0) {\n if (!isset($data['day_' . $day_])) {\n $validate = false;\n break;\n }\n }\n }\n\n if (!$validate) {\n $this->Flash->error(Configure::read('MESSAGE_NOTIFICATION.MSG_060'));\n } else {\n $updateTransaction = $NurseryScheduleTable->getConnection()->transactional(function () use ($data, $arrayNS, $NurseryScheduleTable, $nurseryschedule, $initsdate) {\n\n try {\n foreach ($nurseryschedule as $item) {\n if (!$item->rid || ($item->rid > 0 && ($item->appvoral != 1 || $item->appvoral != 0 ) )) {\n $day_ = Date('d', strtotime($item->reserve_date));\n if (!isset($data['day_' . $day_])) {\n if (isset($arrayNS[$item->id])) {\n $entity = $NurseryScheduleTable->get($item->id);\n if (isset($entity)) {\n if (!$NurseryScheduleTable->delete($entity, ['atomic' => false])) {\n $NurseryScheduleTable->getConnection()->rollback();\n\n return false;\n } else {\n unset($arrayNS[$item->id]);\n }\n }\n }\n }\n }\n }\n for ($i = 1; $i <= 31; $i++) {\n $day_ = $i < 10 ? '0' . $i : $i;\n if (isset($data['day_' . $day_]) && $data['day_' . $day_] == 0) {\n $entity = $NurseryScheduleTable->newEntity();\n $entity->reserve_date = Date('Y-m', strtotime($initsdate)) . '-' . $day_;\n $limit_date = '';\n $shorttime_flg = 0;\n $Day_Of_Week = date(\"w\", strtotime($entity->reserve_date));\n //$cancel_limit_date = Date('Y-m-d', strtotime('-2 day', strtotime($entity->reserve_date)));\n if ($Day_Of_Week == 1) {\n // 指定されたカレンダーの曜日が月の場合\n $limit_date = Date('Y-m-d', strtotime('-10 day', strtotime($entity->reserve_date)));\n } elseif ($Day_Of_Week > 0) {\n // 指定されたカレンダーの曜日が火・水・木・金・土の場合\n $limit_date = Date('Y-m-d', strtotime('-8 day', strtotime($entity->reserve_date)));\n } else {\n // 指定されたカレンダーの曜日が日の場合\n $limit_date = Date('Y-m-d', strtotime('-9 day', strtotime($entity->reserve_date)));\n }\n if (isset($data['s_flg_' . $day_]) && $data['s_flg_' . $day_] == 0) {\n $shorttime_flg = 1;\n }\n if ($Day_Of_Week == 0) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-4 day', strtotime($entity->reserve_date)));\n } elseif (in_array($Day_Of_Week, [1, 2, 3])) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-5 day', strtotime($entity->reserve_date)));\n } elseif (in_array($Day_Of_Week, [4, 5, 6])) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-3 day', strtotime($entity->reserve_date)));\n }\n\n $entity->limit_date = $limit_date;\n $entity->shorttime_flg = $shorttime_flg;\n $entity->cancel_limit_date = $cancel_limit_date;\n $entity->created_id = $this->LOGINID;\n $entity->created_date = date('Y-m-d H:i:s');\n $entity->modified_id = $this->LOGINID;\n $entity->modified_date = date('Y-m-d H:i:s');\n if (!$NurseryScheduleTable->save($entity, ['atomic' => false])) {\n $NurseryScheduleTable->getConnection()->rollback();\n\n return false;\n }\n } elseif (isset($data['day_' . $day_]) && $data['day_' . $day_] > 0) {\n if (isset($data['s_flg_' . $day_]) && $data['s_flg_' . $day_] == 0) {\n $entity = $NurseryScheduleTable->get($data['day_' . $day_]);\n $cancel_limit_date = $entity->reserve_date;\n $Day_Of_Week = date(\"w\", strtotime($entity->reserve_date));\n if ($Day_Of_Week == 0) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-4 day', strtotime($entity->reserve_date)));\n } elseif (in_array($Day_Of_Week, [1, 2, 3])) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-5 day', strtotime($entity->reserve_date)));\n } elseif (in_array($Day_Of_Week, [4, 5, 6])) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-3 day', strtotime($entity->reserve_date)));\n }\n if (isset($entity)) {\n $entity->shorttime_flg = 1;\n $entity->cancel_limit_date = $cancel_limit_date;\n $entity->modified_id = $this->LOGINID;\n $entity->modified_date = date('Y-m-d H:i:s');\n if (!$NurseryScheduleTable->save($entity, ['atomic' => false])) {\n $NurseryScheduleTable->getConnection()->rollback();\n\n return false;\n }\n }\n } elseif (!isset($data['s_flg_' . $day_])) {\n $entity = $NurseryScheduleTable->get($data['day_' . $day_]);\n $Day_Of_Week = date(\"w\", strtotime($entity->reserve_date));\n if ($Day_Of_Week == 0) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-4 day', strtotime($entity->reserve_date)));\n } elseif (in_array($Day_Of_Week, [1, 2, 3])) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-5 day', strtotime($entity->reserve_date)));\n } elseif (in_array($Day_Of_Week, [4, 5, 6])) {\n $cancel_limit_date = Date('Y-m-d', strtotime('-3 day', strtotime($entity->reserve_date)));\n }\n if (isset($entity)) {\n $entity->shorttime_flg = 0;\n $entity->cancel_limit_date = $cancel_limit_date;\n $entity->modified_id = $this->LOGINID;\n $entity->modified_date = date('Y-m-d H:i:s');\n if (!$NurseryScheduleTable->save($entity, ['atomic' => false])) {\n $NurseryScheduleTable->getConnection()->rollback();\n\n return false;\n }\n }\n }\n }\n }\n } catch (RecordNotFoundException $e) {\n $NurseryScheduleTable->getConnection()->rollback();\n\n return false;\n }\n\n return true;\n });\n if ($updateTransaction) {\n $this->Flash->success(Configure::read('MESSAGE_NOTIFICATION.MSG_028'));\n } else {\n $this->Flash->error(Configure::read('MESSAGE_NOTIFICATION.MSG_031'));\n }\n }\n }\n $queryManage = $NurseryScheduleTable->find();\n $nurseryschedule = $queryManage->select(['id' => 'NurserySchedule.id', 'rid' => 'NurseryReserves.id',\n 'cancel_limit_date' => 'NurserySchedule.cancel_limit_date', 'shorttime_flg' => 'NurserySchedule.shorttime_flg',\n 'reserve_date' => 'NurserySchedule.reserve_date', 'approval' => 'NurseryReserves.approval' ])\n ->join(['NurseryReserves' => ['table' => 'nursery_reserves', 'type' => 'LEFT',\n 'conditions' => 'NurseryReserves.reserve_date = NurserySchedule.reserve_date']])\n ->where([\n 'NurserySchedule.reserve_date >=' => $initsdate,\n 'NurserySchedule.reserve_date <= ' => $initedate])\n\n ->order(['NurserySchedule.reserve_date' => 'DESC']);\n $this->set(compact([ 'nurseryschedule']));\n $this->set(['currentDate', $currentDate]);\n }", "public function saveMyProjectAction()\n {\n \t$params = $this->getRequest()->getParams();\n \t$temp = array();\n \t$temp[\"project_name\"] = $params[\"project_name\"];\n \t$temp[\"occupation\"] = $params[\"occupation\"];\n \t$temp[\"from_date\"] = $params[\"from_date\"];\n \t$temp[\"to_date\"] = $params[\"to_date\"]; \t\n \t$temp[\"project_url\"] = $params[\"project_url\"];\n \t$temp[\"user_id\"] = Auth_UserAdapter::getIdentity()->getId();\n \t$temp[\"project_desc\"] = $params[\"project_desc\"];\n \t$id = 0;\n \t\n \t\n \t$days = intVal( DateTime::createFromFormat( \"d-m-Y H:i:s\", $params ['from_date'].\" 00:00:00\" )->diff( DateTime::createFromFormat(\"d-m-Y H:i:s\", $params['to_date'].\" 00:00:00\" ) )->d );\n \t$months = intVal( DateTime::createFromFormat( \"d-m-Y H:i:s\", $params['from_date'].\" 00:00:00\" )->diff( DateTime::createFromFormat(\"d-m-Y H:i:s\", $params['to_date'].\" 00:00:00\" ) )->m );\n \t$years = intVal( DateTime::createFromFormat( \"d-m-Y H:i:s\", $params['from_date'].\" 00:00:00\" )->diff( DateTime::createFromFormat(\"d-m-Y H:i:s\", $params['to_date'].\" 00:00:00\" ) )->y );\n \t// for years, months and days\n \tif($months == 0 && $years == 0 && $days >= 1)\n \t$diff = $days. ' day(s)';\n \telseif($months == 0 && $years >= 1 && $days == 0)\n \t$diff = $years.' year(s)';\n \telseif($months == 0 && $years >= 1 && $days >= 1)\n \t$diff = $years.' year(s) '. $days.' day(s)';\n \telseif($months >= 1 && $years == 0 && $days == 0)\n \t$diff = $months.' month(s)';\n \telseif($months >= 1 && $years == 0 && $days >= 1)\n \t$diff = $months.' month(s) '.$days.' day(s)';\n \telseif($months >= 1 && $years >= 1 && $days == 0)\n \t$diff = $years. ' year(s) '.$months.' month(s) ';\n \telseif($months >= 1 && $years >= 1 && $days >= 1)\n \t$diff = $years.' year(s) '.$months.' month(s) '.$days.' day(s)';\n \telse\n \t{\n \t\t$diff = $years.' year(s) '.$months.' month(s) ';\n \t}\n \t\n \t$temp[\"date_diff\"] = $diff;\n \t\n \tif( !$params['identity'] )\n \t{\n \t\t$temp[\"new_record\"] = 1;\n \t\t$id = Extended\\project::addOrEditProject($temp);\n \t}\n \telse\n \t{\n \t\t$temp[\"new_record\"] = 0;\n \t\t$id = Extended\\project::addOrEditProject($temp, $params['identity']);\n \t}\n \t\n \tif( $id )\n \t{\n \t\t$temp[\"id\"] = $id;\n \t\techo Zend_Json::encode( $temp );\n \t}\n \telse\n \t{\n \t\techo Zend_Json::encode( $temp );\n \t}\n \tdie;\n \t\n }", "protected function resetDateTimes()\r\n {\r\n if (!$this->scheduling)\r\n return;\r\n\r\n // calculate duration between start and end\r\n $newStart = $this->getStartDateTime();\r\n $interval = $newStart->diff($this->getEndDateTime());\r\n\r\n $newStart->setDate(date(\"Y\"), date(\"m\"), date(\"d\"));\r\n\r\n $temp = clone $newStart;\r\n $newEnd = $temp->add($interval);\r\n unset($temp);\r\n\r\n $dateFormat = 'php:Y-m-d H:i:s';\r\n\r\n self::updateAttributes([\r\n 'start_datetime' => Yii::$app->formatter->asDateTime($newStart, $dateFormat),\r\n 'end_datetime' => Yii::$app->formatter->asDateTime($newEnd, $dateFormat),\r\n ]);\r\n }", "private function setCurrentPoint() {\r\n $last = $this->interval == OPT_TREND_DAY ? explode(' ', $this->end) : array($this->end);\r\n $first = new DateTime($last[0]);\r\n $first->sub(new DateInterval($this->datesub));\r\n $this->currentpoint = $first->format('Y-m-d H:i:s');\r\n }", "public function adjust() {\n print Kohana::debug(date::adjust(7,'PM'));\n }", "function prev_working_day($preserveHours = false)\n {\n global $AppUI;\n $do = $this;\n $end = intval(CGAF::getConfig('date.cal_day_end'));\n $start = intval(CGAF::getConfig('date.cal_day_start'));\n while (!$this->isWorkingDay() || ($this->getHour() < $start) || ($this->getHour() == $start && $this->getMinute() == '0')) {\n $this->addDays(-1);\n $this->setTime($end, '0', '0');\n }\n if ($preserveHours)\n $this->setTime($do->getHour(), '0', '0');\n return $this;\n }", "public function startNewContestSameAsLast() {\n $stamp = strtotime(\"next Monday\");\n // die($date);\n $date = date('Y-m-d', $stamp);\n $this->setStartdatum($date);\n $this->commit();\n }", "public function resetTaskLastExecTime()\n\t{\n\t\t$now = time();\n\t\t$schedule = $this->getScheduler();\n\t\t$nextTriggerTime = $schedule->getNextTriggerTime($now);\n\t\t$this->_lastexectime = ($nextTriggerTime === null) ? null :\n\t\t\t(($schedule->getNextTriggerTime(0) == $nextTriggerTime) ? null : $now);\n\t}", "public function moveToAnotherProject($project_id, array $task)\n {\n $values = array();\n\n // Clear values (categories are different for each project)\n $values['category_id'] = 0;\n $values['owner_id'] = 0;\n\n // Check if the assigned user is allowed for the new project\n if ($task['owner_id'] && $this->project->isUserAllowed($project_id, $task['owner_id'])) {\n $values['owner_id'] = $task['owner_id'];\n }\n\n // We use the first column of the new project\n $values['column_id'] = $this->board->getFirstColumn($project_id);\n $values['position'] = $this->countByColumnId($project_id, $values['column_id']) + 1;\n $values['project_id'] = $project_id;\n\n if ($this->db->table(self::TABLE)->eq('id', $task['id'])->update($values)) {\n return $task['id'];\n }\n\n return false;\n }", "function tomorrow() {\treturn $this->anotherDate(\"1\");\t}" ]
[ "0.63053846", "0.62863785", "0.6175582", "0.5883533", "0.5655261", "0.5616401", "0.5610953", "0.5556023", "0.5391203", "0.53227925", "0.5225116", "0.5100737", "0.5036582", "0.50275934", "0.50150996", "0.48941976", "0.48752227", "0.48736203", "0.4863567", "0.48577595", "0.48502454", "0.4806272", "0.48049068", "0.48018533", "0.47759387", "0.47758868", "0.47566986", "0.47529748", "0.47490928", "0.47240725" ]
0.74293905
0
Load time spent into this>weekWorkLoad and this>weekWorkLoadPerTask for all day of a week of project. Note: array weekWorkLoad and weekWorkLoadPerTask are reset and filled at each call.
public function loadTimeSpent($datestart, $taskid = 0, $userid = 0) { $error=0; $this->weekWorkLoad=array(); $this->weekWorkLoadPerTask=array(); if (empty($datestart)) dol_print_error('', 'Error datestart parameter is empty'); $sql = "SELECT ptt.rowid as taskid, ptt.task_duration, ptt.task_date, ptt.task_datehour, ptt.fk_task"; $sql.= " FROM ".MAIN_DB_PREFIX."projet_task_time AS ptt, ".MAIN_DB_PREFIX."projet_task as pt"; $sql.= " WHERE ptt.fk_task = pt.rowid"; $sql.= " AND pt.fk_projet = ".$this->id; $sql.= " AND (ptt.task_date >= '".$this->db->idate($datestart)."' "; $sql.= " AND ptt.task_date <= '".$this->db->idate(dol_time_plus_duree($datestart, 1, 'w') - 1)."')"; if ($taskid) $sql.= " AND ptt.fk_task=".$taskid; if (is_numeric($userid)) $sql.= " AND ptt.fk_user=".$userid; //print $sql; $resql=$this->db->query($sql); if ($resql) { $daylareadyfound=array(); $num = $this->db->num_rows($resql); $i = 0; // Loop on each record found, so each couple (project id, task id) while ($i < $num) { $obj=$this->db->fetch_object($resql); $day=$this->db->jdate($obj->task_date); // task_date is date without hours if (empty($daylareadyfound[$day])) { $this->weekWorkLoad[$day] = $obj->task_duration; $this->weekWorkLoadPerTask[$day][$obj->fk_task] = $obj->task_duration; } else { $this->weekWorkLoad[$day] += $obj->task_duration; $this->weekWorkLoadPerTask[$day][$obj->fk_task] += $obj->task_duration; } $daylareadyfound[$day]=1; $i++; } $this->db->free($resql); return 1; } else { $this->error="Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_week_shifts()\n\t{\n\t\t$this->session->set_userdata('view_whole_week', true);\n\n\t\t$job_id = $this->input->post('job_id');\n\t\t$job = $this->job_model->get_job($job_id);\n\n\t\t$date = $this->input->post('monday');\n\t\t# Once get the date, get the monday\n\t\t$timestamp = strtotime($date);\n\t\t$week_day = date('N', $timestamp);\n\n\t\tif ($week_day == 1) # Monday\n\t\t{\n\t\t\t$week_start = date('Y-m-d', strtotime('this monday', $timestamp));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$week_start = date('Y-m-d', strtotime('this week last monday', $timestamp));\n\t\t}\n\t\t$date = $week_start;\n\n\t\t$job_dates = array();\n\t\t$week_total_shifts = 0;\n\t\t$job_shifts = array();\n\t\tfor($i=0; $i < 7; $i++) {\n\t\t\t$x['job_date'] = date('Y-m-d', strtotime($date) + $i*24*60*60);\n\t\t\t$job_dates[] = $x;\n\t\t\t$week_total_shifts += $this->job_shift_model->count_job_shifts($job_id, $x['job_date']);\n\t\t\t$day_shifts = $this->job_shift_model->get_job_shifts($job_id, $x['job_date'],\n\t\t\t\t\t\t$this->session->userdata('shift_status_filter'),\n\t\t\t\t\t\t$this->session->userdata('shifts_sort_key'),\n\t\t\t\t\t\t$this->session->userdata('shifts_sort_value'));\n\t\t\t$job_shifts = array_merge($job_shifts, $day_shifts);\n\t\t}\n\n\t\t$data['job_dates'] = $job_dates;\n\t\t$data['total_date'] = count($job_dates);\n\t\t$data['date'] = $date;\n\t\t$data['job_shifts'] = $job_shifts;\n\t\t$data['total_shifts'] = count($job_shifts);\n\t\t$data['week_total_shifts'] = $week_total_shifts;\n\n\n\t\t$data['job_id'] = $job_id;\n\t\t$data['job'] = $job;\n\t\t$data['is_client'] = $this->is_client;\n\t\t$this->load->view('shifts_day_view', isset($data) ? $data : NULL);\n\t}", "private function processTaskAllocation()\n\t{\n\t\t$this->projectless_tasks = array();\n\t\t\n\t\tif (isset($this->options['holiday_projects'])) {\n\t\t\t$this->bank_holidays['total_allocated'] = 0;\n\t\t\t$this->holidays['total_allocated'] = 0;\n\t\t}\n\n\t\tforeach ($this->getTasks() as $task) {\n\t\t\t//tasks with no dates are ignored\n\t\t\tif (empty($task['start_date']) && empty($task['end_date'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//store tasks without a project separately\n\t\t\tif (!isset($task['project'])) {\n\t\t\t\t$this->projectless_tasks[] = array(\n\t\t\t\t\t\t'start_date' => $task['start_date'],\n\t\t\t\t\t\t'end_date' => $task['end_date'],\n\t\t\t\t\t\t'comment' => $task['comment'],\n\t\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//project we don't know about yet\n\t\t\t$project_id = $task['project']['id'];\n\t\t\tif (!isset($this->project_table_data[$project_id])) {\n\t\t\t\t$this->project_table_data[$project_id] = $this->getEmptyWeeklyAllocationAndRequirements();\n\t\t\t}\n\n\t\t\t//calculate the time (in days) that was allocated to this task.\n\t\t\t$start_date = $task['start_date'];\n\t\t\t$end_date = $task['end_date'];\n\t\t\tif ($start_date < $this->controller->getScheduleStartingDay()) {\n\t\t\t\t$start_date = $this->controller->getScheduleStartingDay();\n\t\t\t}\n\t\t\t$days = round(abs(strtotime($end_date) - strtotime($start_date)) / 86400) + 1; //number of days\n\n\t\t\t//for each of the days count which week they belong to\n\t\t\tfor ($i = 0; $i < $days; $i++) {\n\t\t\t\t$day_of_week = date('l', strtotime($start_date . \"+$i days\"));\n\n\t\t\t\t//non work days (e.g. weekends) are not included\n\t\t\t\tif (!in_array($day_of_week, $this->options['non_work_days'])) {\n\t\t\t\t\t$date = date('Y-m-d', strtotime($start_date . \"+$i days\"));\n\n\t\t\t\t\t//count the date if it fits into the week\n\t\t\t\t\tforeach ($this->controller->getWeekDates() as $week) {\n\t\t\t\t\t\tif ($date >= $week['start'] && $date <= $week['end']) {\n\t\t\t\t\t\t\t//each day gets the equal amount allocated based on the daily length\n\t\t\t\t\t\t\t$this->project_table_data[$project_id][$week['start']]['allocated'] += 1 * $this->getTaskLengthPerDay($task);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//calculate holidays here to make sure non_work_days are excluded\n\t\t\t\t\tif (isset($this->options['holiday_projects'])) {\n\t\t\t\t\t\tif ($task['project']['name'] == $this->bank_holidays['project_name']) {\n\t\t\t\t\t\t\t$this->bank_holidays['total_allocated']++;\n\t\t\t\t\t\t} elseif ($task['project']['name'] == $this->holidays['project_name']) {\n\t\t\t\t\t\t\t$this->holidays['total_allocated']++;\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\t//cache the tasks without the projects and the holidays allocation\n\t\t$this->cacheData('projectless_tasks', $this->projectless_tasks);\n\t\t$this->cacheData('bank_holidays_allocated', $this->bank_holidays['total_allocated']);\n\t\t$this->cacheData('holidays_allocated', $this->holidays['total_allocated']);\n\t}", "public function visitor_week()\n {\n $myConfig = $this->getConfig();\n $oDb = oxDb::getDb();\n\n $aDataX = array();\n $aDataX2 = array();\n $aDataX3 = array();\n $aDataX4 = array();\n $aDataX5 = array();\n $aDataX6 = array();\n $aDataY = array();\n\n $sTimeTo = $oDb->quote(date(\"Y-m-d H:i:s\", strtotime(oxRegistry::getConfig()->getRequestParameter(\"time_to\"))));\n $sTimeFrom = $oDb->quote(date(\"Y-m-d H:i:s\", strtotime(oxRegistry::getConfig()->getRequestParameter(\"time_from\"))));\n\n $sSQL = \"select oxtime, count(*) as nrof from oxlogs where oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxsessid order by oxtime\";\n\n $aTemp = array();\n $rs = $oDb->execute($sSQL);\n\n if ($rs != false && $rs->recordCount() > 0) {\n while (!$rs->EOF) {\n $aTemp[oxRegistry::get(\"oxUtilsDate\")->getWeekNumber($myConfig->getConfigParam('iFirstWeekDay'), strtotime($rs->fields[0]))]++;\n $rs->moveNext();\n }\n }\n\n // initializing\n list($iFrom, $iTo) = $this->getWeekRange();\n for ($i = $iFrom; $i < $iTo; $i++) {\n $aDataX[$i] = 0;\n $aDataX2[$i] = 0;\n $aDataX3[$i] = 0;\n $aDataX4[$i] = 0;\n $aDataX5[$i] = 0;\n $aDataX6[$i] = 0;\n $aDataY[] = \"KW \" . $i;\n }\n\n foreach ($aTemp as $key => $value) {\n $aDataX[$key] = $value;\n $aDataX2[$key] = 0;\n $aDataX3[$key] = 0;\n $aDataX4[$key] = 0;\n $aDataX5[$key] = 0;\n $aDataX6[$key] = 0;\n $aDataY[] = \"KW \" . $key;\n }\n\n // collects sessions what executed 'order' function\n $sQ = \"select oxtime, oxsessid FROM `oxlogs` where oxclass = 'order' and oxfnc = 'execute' and oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxsessid\";\n $aTempOrder = $this->_collectSessions($sQ);\n\n // collects sessions what executed order class\n $sQ = \"select oxtime, oxsessid from `oxlogs` where oxclass = 'order' and oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxsessid\";\n $aTempExecOrdersSessions = $this->_collectOrderSessions($sQ, $aTempOrder, $aDataX6, false);\n\n // collects sessions what executed payment class\n $sQ = \"select oxtime, oxsessid from `oxlogs` where oxclass = 'payment' and oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxsessid\";\n $aTempPaymentSessions = $this->_collectPaymentSessions($sQ, $aTempOrder, $aTempExecOrdersSessions, $aDataX2, false);\n\n // collects sessions what executed 'user' class\n $sQ = \"select oxtime, oxsessid from `oxlogs` where oxclass = 'user' and oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxsessid\";\n $aTempUserSessions = $this->_collectUserSessionsForVisitorMonth($sQ, $aTempOrder, $aTempExecOrdersSessions, $aTempPaymentSessions, $aDataX2, false);\n\n // collects sessions what executed 'tobasket' function\n $sQ = \"select oxtime, oxsessid from `oxlogs` where oxclass = 'basket' and oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxsessid\";\n $this->_collectToBasketSessions($sQ, $aTempOrder, $aTempExecOrdersSessions, $aTempPaymentSessions, $aTempUserSessions, $aDataX4, false);\n\n // orders made\n $sQ = \"select oxorderdate from oxorder where oxorderdate >= $sTimeFrom and oxorderdate <= $sTimeTo order by oxorderdate\";\n $this->_collectOrdersMade($sQ, $aDataX5, false);\n\n header(\"Content-type: image/png\");\n\n // New graph with a drop shadow\n $graph = $this->getGraph(max(800, count($aDataX) * 80), 600);\n\n // Description\n $graph->xaxis->setTickLabels($aDataY);\n\n // Set title and subtitle\n $graph->title->set(\"Woche\");\n\n // Create the bar plot\n $bplot2 = new BarPlot(array_values($aDataX2));\n $bplot2->setFillColor(\"#9966cc\");\n $bplot2->setLegend(\"Best.Abbr. in Bezahlmethoden\");\n\n // Create the bar plot\n $bplot3 = new BarPlot(array_values($aDataX3));\n $bplot3->setFillColor(\"#ffcc00\");\n $bplot3->setLegend(\"Best.Abbr. in Benutzer\");\n\n // Create the bar plot\n $bplot4 = new BarPlot(array_values($aDataX4));\n $bplot4->setFillColor(\"#6699ff\");\n $bplot4->setLegend(\"Best.Abbr. in Warenkorb\");\n\n // Create the bar plot\n $bplot6 = new BarPlot(array_values($aDataX6));\n $bplot6->setFillColor(\"#ff0099\");\n $bplot6->setLegend(\"Best.Abbr. in Bestellbestaetigung\");\n\n // Create the bar plot\n $bplot5 = new BarPlot(array_values($aDataX5));\n $bplot5->setFillColor(\"silver\");\n $bplot5->setLegend(\"Bestellungen\");\n\n // Create the grouped bar plot\n $gbplot = new groupBarPlot(array($bplot4, $bplot3, $bplot2, $bplot6, $bplot5));\n $graph->add($gbplot);\n\n // Finally output the image\n $graph->stroke();\n }", "public function prepareWeekRanges() {\r\n\t\t$countWeek = array();\r\n\t\r\n\t\t$prePromoFrom \t\t= $_REQUEST['prePromoFrom'];\r\n\t\t$prePromoTo \t\t\t= $_REQUEST['prePromoTo'];\r\n\t\t$prePromoFrom = array_search($prePromoFrom, $this->allDates);\r\n\t\t$prePromoTo = array_search($prePromoTo, $this->allDates);\r\n\t\t$this->totalPrePromoWeek = $countWeek['PRE_PROMO'] = $prePromoFrom - $prePromoTo;\r\n\t\tfilters\\timeFilter::fetchPeriodWithinRange($prePromoFrom, (int)$countWeek['PRE_PROMO'], $this->settingVars);\r\n\t\t$this->prePromoTyWeekRange = filters\\timeFilter::$mydateRange;\r\n\t\t\r\n\t\t$promoFrom \t\t\t\t= $_REQUEST['promoFrom'];\r\n\t\t$promoTo \t\t\t\t= $_REQUEST['promoTo'];\r\n\t\t$promoFrom = array_search($promoFrom, $this->allDates);\r\n\t\t$promoTo = array_search($promoTo, $this->allDates);\r\n\t\t$this->totalPromoWeek = $countWeek['PROMO'] = $promoFrom - $promoTo;\r\n\t\tfilters\\timeFilter::fetchPeriodWithinRange($promoFrom, $countWeek['PROMO'], $this->settingVars);\r\n\t\t$this->promoTyWeekRange = filters\\timeFilter::$mydateRange;\r\n\t\t\r\n\t\t$postPromoFrom \t\t\t= $_REQUEST['postPromoFrom'];\r\n\t\t$postPromoTo \t\t\t= $_REQUEST['postPromoTo'];\r\n\t\t$postPromoFrom = array_search($postPromoFrom, $this->allDates);\r\n\t\t$postPromoTo = array_search($postPromoTo, $this->allDates);\r\n\t\t$this->totalPostPromoWeek = $countWeek['POST_PROMO'] = $postPromoFrom - $postPromoTo;\t\t\t\r\n\t\tfilters\\timeFilter::fetchPeriodWithinRange($postPromoFrom, $countWeek['POST_PROMO'], $this->settingVars);\t\r\n\t\t$this->postPromoTyWeekRange = filters\\timeFilter::$mydateRange;\r\n\t\t\r\n\t\t$this->jsonOutput['CountWeek'] \t= $countWeek;\r\n\t}", "protected function compileWeeks()\n {\n $intDaysInMonth = date('t', $this->Date->monthBegin);\n $intFirstDayOffset = date('w', $this->Date->monthBegin) - $this->cal_startDay;\n\n if ($intFirstDayOffset < 0) {\n $intFirstDayOffset += 7;\n }\n\n $intColumnCount = -1;\n $intNumberOfRows = ceil(($intDaysInMonth + $intFirstDayOffset) / 7);\n $arrAllEvents = $this->getAllEventsExt($this->cal_calendar, $this->Date->monthBegin, $this->Date->monthEnd, array($this->cal_holiday));\n $arrDays = array();\n\n // Compile days\n for ($i = 1; $i <= ($intNumberOfRows * 7); $i++) {\n $intWeek = floor(++$intColumnCount / 7);\n $intDay = $i - $intFirstDayOffset;\n $intCurrentDay = ($i + $this->cal_startDay) % 7;\n\n $strWeekClass = 'week_' . $intWeek;\n $strWeekClass .= ($intWeek === 0) ? ' first' : '';\n $strWeekClass .= ($intWeek === ($intNumberOfRows - 1)) ? ' last' : '';\n\n $strClass = ($intCurrentDay < 2) ? ' weekend' : '';\n $strClass .= ($i === 1 || $i === 8 || $i === 15 || $i === 22 || $i === 29 || $i === 36) ? ' col_first' : '';\n $strClass .= ($i === 7 || $i === 14 || $i === 21 || $i === 28 || $i === 35 || $i === 42) ? ' col_last' : '';\n\n // Empty cell\n if ($intDay < 1 || $intDay > $intDaysInMonth) {\n $arrDays[$strWeekClass][$i]['label'] = '&nbsp;';\n $arrDays[$strWeekClass][$i]['class'] = 'days empty' . $strClass;\n $arrDays[$strWeekClass][$i]['events'] = array();\n\n continue;\n }\n\n $intKey = date('Ym', $this->Date->tstamp) . ((strlen($intDay) < 2) ? '0' . $intDay : $intDay);\n $strClass .= ((int)$intKey === (int)date('Ymd')) ? ' today' : '';\n $strClass .= ((int)$intKey < (int)date('Ymd')) ? ' bygone' : '';\n $strClass .= ((int)$intKey > (int)date('Ymd')) ? ' upcomming' : '';\n\n // Mark the selected day (see #1784)\n if ($intKey === \\Input::get('day')) {\n $strClass .= ' selected';\n }\n\n // Inactive days\n if (empty($intKey) || !isset($arrAllEvents[$intKey])) {\n $arrDays[$strWeekClass][$i]['label'] = $intDay;\n $arrDays[$strWeekClass][$i]['class'] = 'days' . $strClass;\n $arrDays[$strWeekClass][$i]['events'] = array();\n\n continue;\n }\n\n $arrEvents = array();\n\n // Get all events of a day\n foreach ($arrAllEvents[$intKey] as $v) {\n foreach ($v as $vv) {\n $vv['calendar_title'] = $this->calConf[$vv['pid']]['calendar'];\n\n if ($this->calConf[$vv['pid']]['background']) {\n $vv['bgstyle'] = $this->calConf[$vv['pid']]['background'];\n }\n if ($this->calConf[$vv['pid']]['foreground']) {\n $vv['fgstyle'] = $this->calConf[$vv['pid']]['foreground'];\n }\n $arrEvents[] = $vv;\n }\n }\n\n $arrDays[$strWeekClass][$i]['label'] = $intDay;\n $arrDays[$strWeekClass][$i]['class'] = 'days active' . $strClass;\n if (count($arrEvents) > 0) {\n $arrDays[$strWeekClass][$i]['href'] = $this->strLink . (\\Config::get('disableAlias') ? '&amp;' : '?') . 'day=' . $intKey;\n $arrDays[$strWeekClass][$i]['title'] = sprintf(specialchars($GLOBALS['TL_LANG']['MSC']['cal_events']), count($arrEvents));\n $arrDays[$strWeekClass][$i]['events'] = $arrEvents;\n }\n }\n\n return $arrDays;\n }", "public function setupWeeklyAllocationAndRequirements()\n\t{\n\t\tforeach (array_keys($this->getProjectMetadata()) as $project_id) {\n\t\t\tif (!isset($this->project_table_data[$project_id])) {\n\t\t\t\t$this->project_table_data[$project_id] = $this->getEmptyWeeklyAllocationAndRequirements();\n\t\t\t}\n\t\t}\n\t}", "public function loadWeeks() {\n $connector = new PgConnection();\n $conn = $connector->connect();\n\n\n $res = $connector->query(\"SELECT week\n FROM MainActivity\n WHERE mtype = 'planned activity'\n GROUP BY week\");\n\n if(!$res) return null;\n\n $json_string = \"[\";\n while($row = pg_fetch_row($res)) {\n $json_string = $json_string . \"{\\n\" .'\"week\":' . $row[0] . \"\\n}\". \",\\n\";\n }\n if(strlen($json_string) > 1) {\n $json_string = substr($json_string, 0, strlen($json_string) - 2);\n $json_string = $json_string . \"]\";\n } else $json_string = null;\n pg_close($conn);\n\n return $json_string;\n }", "public function getMondayStartTimes () {\n \t$val = $this->cacheGetPlain('MondayStartTimes');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('MondayStartTimes', $this->getOffering()->getMondayStartTimes());\n \telse\n \t\treturn $val;\n\t}", "public function getThursdayStartTimes () {\n \t$val = $this->cacheGetPlain('ThursdayStartTimes');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('ThursdayStartTimes', $this->getOffering()->getThursdayStartTimes());\n \telse\n \t\treturn $val;\n\t}", "function run()\n\t{\n\t\tif (!$this->readyToRun)\n\t\t\treturn array();\n\n\t\t$this->adjustDates();\n\n\t\t$d = Day::create_from_iso8601($this->startDate);\n\t\t$startDayID = $d->ID;\n\t\t$d = Day::create_from_iso8601($this->endDate);\n\t\t$endDayID = $d->ID;\n\n\t\t$sql = $this->getProjectSQL();\n\n\t\t$projects = $this->DB->Query( $sql );\n\t\tif (!is_array($projects)) $projects = array(); // Need iterator.\n\t\tforeach ( $projects as $project )\n\t\t{\n\t\t\t// About the project.\n\t\t\t$project['ProjectID'] = ( empty( $project['ProjectID'] ) ? \"(none)\" : $project['ProjectID'] );\n\t\t\t$status = $this->statusList[$project['Status']];\n\t\t\t$targetBudget = Format::money( $project['TargetBudget'] );\n\n\t\t\t// Estimated project duration.\n\t\t\t$sql = \"SELECT SUM(Duration) AS Duration FROM tblTasks WHERE ProjectID = '{$project['ID']}'\";\n\t\t\t$row = $this->DB->QuerySingle( $sql );\n\t\t\t$duration = Format::hours( $row['Duration'] );\n\n\n\t\t\t// Hours committed to project.\n\t\t\t// We ignore HoursCompleted as it is not being populated, but might be one day.\n\t\t\t$sql = \"SELECT SUM(HoursCommitted) AS Committed, SUM(HoursCompleted) AS Completed \"\n\t\t\t\t.\"FROM tblTasks \"\n\t\t\t\t.\"LEFT JOIN tblTaskResourceDay ON tblTasks.ID = tblTaskResourceDay.TaskID \"\n\t\t\t\t.\"WHERE tblTasks.ProjectID = '{$project['ID']}' \"\n\t\t\t\t.\"AND tblTaskResourceDay.DayID BETWEEN $startDayID AND $endDayID\";\n\n\t\t\t$row = $this->DB->QuerySingle( $sql );\n\t\t\t$hoursCommitted = Format::hours( $row['Committed'] );\n\n\t\t\t$sql = \"SELECT SUM(HoursWorked) AS HoursWorked, SUM(Charge) AS Charge \"\n\t\t\t\t.\"FROM vwTaskComments \"\n\t\t\t\t.\"WHERE ProjectID = '{$project['ID']}' AND Date BETWEEN '$this->startDate 00:00:00' AND '$this->endDate 23:59:59'\";\n\n\t\t\t$row = $this->DB->QuerySingle( $sql );\n\t\t\t$actualBudget = Format::money( $row['Charge'] );\n\t\t\t$hoursWorked = Format::hours( $row['HoursWorked'] );\n\n\t\t\t$this->data[] = array(\n\t\t\t\t'type' => 'project',\n\t\t\t\t'clientid' => $project['ClientID'],\n\t\t\t\t'clientname' => $project['ClientName'],\n\t\t\t\t'projectid' => $project['ID'], \n\t\t\t\t'projectname' => $project['Name'],\n\t\t\t\t'projectlabel' => $project['ProjectID'],\n\t\t\t\t'status' => $status, \n\t\t\t\t'duration' => $duration, \n\t\t\t\t'hourscommitted' => $hoursCommitted, \n\t\t\t\t'hoursworked' => $hoursWorked, \n\t\t\t\t'targetbudget' => $targetBudget,\n\t\t\t\t'actualbudget' => $actualBudget,\n\t\t\t);\n\n\t\t\tif ( $this->details > 0 )\n\t\t\t{\n\t\t\t\t$sql = \"SELECT ID, Name, Duration, Status, TargetBudget FROM tblTasks \"\n\t\t\t\t\t.\"WHERE ProjectID = '{$project['ID']}' ORDER BY Name ASC\";\n\t\t\t\t$tasks = $this->DB->Query( $sql );\n\t\t\t\tif (!is_array($tasks)) $tasks = array(); // Need iterator.\n\t\t\t\tforeach ( $tasks as $task )\n\t\t\t\t{\n\t\t\t\t\t$duration = Format::hours( $task['Duration'] );\n\t\t\t\t\t$status = $this->statusList[$task['Status']];\n\t\t\t\t\t$targetBudget = Format::money( $task['TargetBudget'] );\n\n\t\t\t\t\t$sql = \"SELECT SUM(HoursCommitted) AS HoursCommitted, SUM(HoursCompleted) AS HoursCompleted \"\n\t\t\t\t\t\t.\"FROM tblTaskResourceDay \"\n\t\t\t\t\t\t.\"WHERE TaskID = '{$task['ID']}' AND DayID BETWEEN $startDayID AND $endDayID\";\n\t\t\t\t\t$row = $this->DB->QuerySingle( $sql );\n\t\t\t\t\t$hoursCommitted = Format::hours( $row['HoursCommitted'] );\n\n\t\t\t\t\t$sql = \"SELECT SUM(HoursWorked) AS HoursWorked, SUM(Charge) AS Charge \"\n\t\t\t\t\t\t.\"FROM vwTaskComments \"\n\t\t\t\t\t\t.\"WHERE TaskID = '{$task['ID']}' AND Date BETWEEN '$this->startDate 00:00:00' AND '$this->endDate 23:59:59' \";\n\t\t\t\t\t$row = $this->DB->QuerySingle( $sql );\n\t\t\t\t\t$actualBudget = Format::money( $row['Charge'] );\n\t\t\t\t\t$hoursWorked = Format::hours( $row['HoursWorked'] );\n\n\t\t\t\t\t$this->data[] = array(\n\t\t\t\t\t\t'type' => 'task',\n\t\t\t\t\t\t'clientid' => $project['ClientID'],\n\t\t\t\t\t\t'clientname' => $project['ClientName'],\n\t\t\t\t\t\t'projectid' => $project['ID'], \n\t\t\t\t\t\t'projectname' => $project['Name'],\n\t\t\t\t\t\t'taskid' => $task['ID'], \n\t\t\t\t\t\t'taskname' => $task['Name'], \n\t\t\t\t\t\t'status' => $status, \n\t\t\t\t\t\t'duration' => $duration, \n\t\t\t\t\t\t'hourscommitted' => $hoursCommitted, \n\t\t\t\t\t\t'hoursworked' => $hoursWorked, \n\t\t\t\t\t\t'targetbudget' => $targetBudget,\n\t\t\t\t\t\t'actualbudget' => $actualBudget,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->data;\n\t}", "public function run()\n {\n $campaignReports = RepoYssCampaignReportCost::all();\n foreach ($campaignReports as $campaignReport) {\n $ammountOfCampaign = rand(\n self::MIN_NUMBER_OF_DAYOFWEEK,\n self::MAX_NUMBER_OF_DAYOFWEEK\n );\n for ($i=0; $i < $ammountOfCampaign; $i++) {\n $dayOfWeek = new RepoYssDayofweekReport;\n $dayOfWeek->exeDate = $campaignReport->exeDate;\n $dayOfWeek->startDate = $campaignReport->startDate;\n $dayOfWeek->endDate = $campaignReport->endDate;\n $dayOfWeek->accountid = $campaignReport->accountid;\n $dayOfWeek->account_id = $campaignReport->account_id;\n $dayOfWeek->campaign_id = $campaignReport->campaign_id;\n $dayOfWeek->campaignID = $campaignReport->campaignID;\n $dayOfWeek->campaignName = $campaignReport->campaignName;\n $dayOfWeek->cost = mt_rand(\n self::MIN_COST,\n self::MAX_COST\n );\n $dayOfWeek->impressions = mt_rand(\n self::MIN_IMPRESSIONS,\n $campaignReport->impressions\n );\n $dayOfWeek->clicks = mt_rand(\n self::MIN_CLICKS,\n $dayOfWeek->impressions\n );\n\n if ($dayOfWeek->impressions === 0) {\n $dayOfWeek->ctr = 0;\n } else {\n $dayOfWeek->ctr = ($dayOfWeek->clicks / $dayOfWeek->impressions) * 100;\n }\n\n if ($dayOfWeek->clicks === 0) {\n $dayOfWeek->averageCpc = 0;\n } else {\n $dayOfWeek->averageCpc = $dayOfWeek->cost / $dayOfWeek->clicks;\n }\n\n $dayOfWeek->averagePosition = mt_rand(\n self::MIN_AVERAGE_POSITION * 100000,\n self::MAX_AVERAGE_POSITION * 100000\n ) / 100000;\n\n $dayOfWeek->bidAdjustment = mt_rand(\n self::MIN_BIDADJUSTMENT,\n self::MAX_BIDADJUSTMENT\n );\n $dayOfWeek->targetScheduleID = $i + 1;\n $dayOfWeek->targetSchedule = self::TARGET_SCHEDULE[mt_rand(0, count(self::TARGET_SCHEDULE) - 1)];\n\n $dayOfWeek->conversions = mt_rand(\n self::MIN_CONVERSIONS,\n $dayOfWeek->clicks\n );\n\n if ($dayOfWeek->clicks === 0) {\n $dayOfWeek->convRate = 0;\n } else {\n $dayOfWeek->convRate = ($dayOfWeek->conversions / $dayOfWeek->clicks) * 100;\n }\n\n $dayOfWeek->convValue = mt_rand(\n self::MIN_CONV_VALUE,\n self::MAX_CONV_VALUE\n ) / mt_getrandmax();\n $dayOfWeek->costPerConv = mt_rand(\n self::MIN_COST_PER_CONV,\n self::MAX_COST_PER_CONV\n ) / mt_getrandmax();\n $dayOfWeek->valuePerConv = mt_rand(\n self::MIN_VALUE_PER_CONV,\n self::MAX_VALUE_PER_CONV\n ) / mt_getrandmax();\n $dayOfWeek->allConv = mt_rand(\n self::MIN_ALL_CONV,\n self::MAX_ALL_CONV\n ) / mt_getrandmax();\n $dayOfWeek->allConvRate = mt_rand(\n self::MIN_ALL_CONV_RATE,\n self::MAX_ALL_CONV_RATE\n ) / mt_getrandmax();\n $dayOfWeek->allConvValue = mt_rand(\n self::MIN_ALL_CONV_VALUE,\n self::MAX_ALL_CONV_VALUE\n ) / mt_getrandmax();\n $dayOfWeek->costPerAllConv = mt_rand(\n self::MIN_COST_PER_ALL_CONV,\n self::MAX_COST_PER_ALL_CONV\n ) / mt_getrandmax();\n $dayOfWeek->valuePerAllConv = mt_rand(\n self::MIN_VALUE_PER_ALL_CONV,\n self::MAX_VALUE_PER_ALL_CONV\n ) / mt_getrandmax();\n $dayOfWeek->day = $campaignReport->day;\n $dayOfWeek->quarter = $campaignReport->quarter;\n $dayOfWeek->month = $campaignReport->month;\n $dayOfWeek->week = $campaignReport->week;\n $dayOfWeek->saveOrFail();\n }\n }\n }", "public function weekly(): self;", "public function emptimesheetweeklyAction(){\n\n\t\t$storage = new Zend_Auth_Storage_Session();\n\t\t$data = $storage->read();\n\t\t$now = new DateTime();\n\t\t$selDay = \"\";\n\t\t$selYrMon = $this->_getParam('selYrMon');\n\t\t$user_id = $this->_getParam('user_id');\n\t\t$manager_id = $this->_getParam('manager_id');\n\t\t$week = $this->_getParam('hideweek');\n\t\t$emplistflag = $this->_getParam('emplistflag');\n\t\t$project_ids = \"\";\n\n\t\tif($this->_getParam('day')){\n\t\t\t$selDay = $this->_getParam('day');\n\t\t}\n\t\t\t\n\t\tif($this->_getParam('project_ids')){\n\t\t\t$project_ids = $this->_getParam('project_ids');\n\t\t}\n\n\n\t\t$usersModel = new Timemanagement_Model_Users();\n\t\t$empDoj = $usersModel->getEmployeeDoj($user_id);\n\t\t$dateEmpDoj = date('Y-m',strtotime($empDoj['date_of_joining']));\n\n\t\t$approvedAlert = $usersModel->getEmpApprovalStatusDteails($user_id);\n\t\t\t\n\t\t$selYrMon = ($selYrMon != '')?$selYrMon:$now->format('Y-m');\n\t\t$yrMon = explode('-', $selYrMon);\n\t\t$year = $yrMon[0];\n\t\t$month = $yrMon[1];\n\t\t\t\n\t\t$lastday = date(\"t\", mktime(0, 0, 0, $month, 1, $year));\n\t\t$firstCalWeek = strftime('%U',strtotime($year.'-'.$month.'-01'));\n\t\t$lastCalWeek = strftime('%U',strtotime($selYrMon.'-'.$lastday));\n\n\t\t$calenderWeek = array();\n\t\t$calenderWeeksArray = range($firstCalWeek, $lastCalWeek);\n\t\t$calWeek = $calenderWeeksArray[$week-1];\n\n\t\tif($calWeek == null || $calWeek == '') {\n\t\t\t$calWeek = strftime('%U',strtotime($selYrMon.'-01'));\n\t\t}\n\n\t\t$myTsModel = new Timemanagement_Model_MyTimesheet();\n\t\t$empTSModel = new Timemanagement_Model_Emptimesheets();\n\n\t\t$myTsWeekData = $empTSModel->getWeeklyTimesheetData($user_id,$yrMon[0],$yrMon[1],$week,$project_ids);\n\t\t$empHolidaysWeekendsData = $usersModel->getEmployeeHolidaysNWeekends($user_id, $yrMon[0],$yrMon[1],$calWeek);\n\n\t\t$startDate = date(\"Y-m-d\", strtotime(\"{$yrMon[0]}-W{$calWeek}-7\"));\n\t\t//$startDate = date(\"Y-m-d\",strtotime('last sunday', strtotime($yrMon[0].'W'.str_pad($calWeek+1, 2, 0, STR_PAD_LEFT))));\n\t\t$endDate = date(\"Y-m-d\",strtotime('next saturday',strtotime($startDate)));\n\t\t\t\n\t\t$empLeavesData = $usersModel->getEmpLeaves($user_id,$startDate,$endDate,'all');\n\n\t\t$weekNotes = $myTsModel->getWeekNotes($user_id,$yrMon[0],$yrMon[1],$week);\n\t\t$weekDaysStatus = $myTsModel->getWeekDaysStatus($user_id,$yrMon[0],$yrMon[1],$week,$emplistflag,$project_ids);\n\t\t\t\n\t\t$empData = $empTSModel->getEmployeeTimsheetDetails($yrMon[0],$yrMon[1],$week,$user_id,$project_ids,$emplistflag);\n\n\t\t$this->view->empDoj=$empDoj['date_of_joining'];\n\t\t$this->view->selYrMon = $selYrMon;\n\t\t$this->view->user_id = $user_id;\n\t\t$this->view->manager_id = $manager_id;\n\t\t$this->view->hideweek = $week;\n\t\t$this->view->selWeek = $week;\n\t\t$this->view->type = \"week\";\n\t\t$this->view->myTsWeekData = $myTsWeekData;\n\t\t$this->view->weekNotesData = $weekNotes;\n\t\t$this->view->empHolidaysWeekends = $empHolidaysWeekendsData[0];\n\t\t$this->view->leavesData = $empLeavesData;\n\t\t$this->view->approvedAlert = $approvedAlert;\n\t\t$this->view->weekDaysStatus = $weekDaysStatus;\n\t\t$this->view->empData = $empData;\n\t\t$this->view->emplistflag = $emplistflag;\n\t\tif($selDay != '') {\n\t\t\t$selDay= date(\"D\",strtotime($selYrMon.'-'.$selDay));\n\t\t}\n\t\t$this->view->selDay = $selDay;\n\t\t$this->view->project_ids = $project_ids;\n\n\t}", "public function process()\n {\n\n $time_start = $this->getStart();\n $time_end = $this->getEnd();\n\n $break = false;\n $i = 0;\n\n $weekDays = array();\n $monthWeeks = array();\n $monthDays = array();\n $weekMonths = array();\n\n while ($break == false) {\n $week_str = $time_end->format('Y') . \"-\" . $time_end->format('W');\n $month_str = $time_end->format('Y') . \"-\" . $time_end->format('m');\n\n if (false == isset($weekDays[$week_str])) {\n\n $weekDays[$week_str] = array();\n }\n\n if (false == isset($monthDays[$month_str])) {\n\n $monthDays[$month_str] = array();\n }\n\n if (false == isset($monthWeeks[$month_str])) {\n\n $monthWeeks[$month_str] = array();\n }\n\n if (false == isset($weekMonths[$week_str])) {\n\n $weekMonths[$week_str] = array();\n }\n\n $weekDays[$week_str][(int) $time_end->format('d')] = clone $time_end;\n $monthDays[$month_str][(int) $time_end->format('d')] = clone $time_end;\n\n if (false == in_array($week_str, $monthWeeks[$month_str])) {\n\n $monthWeeks[$month_str][] = $week_str;\n }\n\n if (false == in_array($month_str, $weekMonths[$week_str])) {\n\n $weekMonths[$week_str][] = $month_str;\n }\n\n if ($time_end->format('Y-m-d') == $time_start->format('Y-m-d')) {\n\n break;\n }\n\n $time_end->sub(DateInterval::createFromDateString('1 day'));\n }\n\n\n // on vérifie pour chaque mois\n $_months = array_keys($monthDays);\n foreach ($_months as $month_str) {\n list($year, $month) = explode('-', $month_str);\n\n if (cal_days_in_month(CAL_GREGORIAN, $month, $year) == count($monthDays[$month_str])) {\n\n $this->addMonth($year, $month);\n\n // on vérifie pour chaque semaine si elle est présente sur\n // plusieurs mois : si oui on supprime que les jours du mois en\n // en cours, si non on supprime tous les jours de la semaine\n foreach ($monthWeeks[$month_str] as $week) {\n if (1 < count($weekMonths[$week])) {\n\n foreach($weekDays[$week] as $key => $currentWeekDay) {\n\n if ($currentWeekDay->format('m') == $time_end->format('m')) {\n\n unset($weekDays[$week][$key]);\n }\n }\n } else {\n\n unset($weekDays[$week]);\n }\n }\n\n unset($monthWeeks[$month_str]);\n } \n }\n\n // On vérifie pour chaque semaine identifiée si on a bien tous les jours\n // du calendrier grégorien\n foreach ($weekDays as $weekId => $days) {\n\n list($year, $week) = explode('-', $weekId);\n $gregorianDays = $this->getGregorianDays($year, $week);\n\n if (count($gregorianDays) == count($days)) {\n\n $this->addWeek($year, $week);\n } else {\n $this->addDays($weekDays[$weekId]);\n }\n }\n }", "public function run()\n {\n $teams = Team::inRandomOrder()->get();\n\n foreach ($teams as $team)\n {\n echo $team->name.\"<br/>\";\n }\n\n $weeks = array(\n array('host_team_id'=>$teams[0]->id,'guest_team_id'=>$teams[1]->id,'week'=>1),\n array('host_team_id'=>$teams[2]->id,'guest_team_id'=>$teams[3]->id,'week'=>1),\n array('host_team_id'=>$teams[0]->id,'guest_team_id'=>$teams[3]->id,'week'=>2),\n array('host_team_id'=>$teams[2]->id,'guest_team_id'=>$teams[1]->id,'week'=>2),\n array('host_team_id'=>$teams[0]->id,'guest_team_id'=>$teams[2]->id,'week'=>3),\n array('host_team_id'=>$teams[3]->id,'guest_team_id'=>$teams[1]->id,'week'=>3),\n #SECOND PART\n array('host_team_id'=>$teams[1]->id,'guest_team_id'=>$teams[0]->id,'week'=>4),\n array('host_team_id'=>$teams[3]->id,'guest_team_id'=>$teams[2]->id,'week'=>4),\n array('host_team_id'=>$teams[3]->id,'guest_team_id'=>$teams[0]->id,'week'=>5),\n array('host_team_id'=>$teams[1]->id,'guest_team_id'=>$teams[2]->id,'week'=>5),\n array('host_team_id'=>$teams[2]->id,'guest_team_id'=>$teams[0]->id,'week'=>6),\n array('host_team_id'=>$teams[1]->id,'guest_team_id'=>$teams[3]->id,'week'=>6),\n );\n//\n \\App\\Models\\Match::insert($weeks);\n }", "public static function calculateStartWeekly($task, $data)\n { $weekDayStartDate = $task->start_date->format('N');\n \n $start_date_time = $task->start_date->format('H:i:s');\n $start_time = $data->REPEATING_CREATED_ON_TIME . ':00';\n \n if ($weekDayStartDate == $data->REPEATING_WEEKLY_WEEKDAYS) {\n // the same week day\n // clarify time\n if ($start_date_time > $start_time) {\n $new_date_string = $task->start_date->add(new DateInterval('P' . 7 . 'D'))->format('Y-m-d') . ' ' . $start_time;\n $new_date = new DateTime($new_date_string);\n \n return $new_date;\n } elseif ($start_date_time == $start_time) {\n return $task->start_date;\n } else {\n $new_date_string = $task->start_date->format('Y-m-d') . ' ' . $start_time;\n $new_date = new DateTime($new_date_string);\n \n return $new_date;\n }\n }\n \n // other week day\n $daysArray = [\n '1' => 'monday',\n '2' => 'tuesday',\n '3' => 'wednesday',\n '4' => 'thursday',\n '5' => 'friday',\n '6' => 'saturday',\n '7' => 'sunday',\n ];\n \n $weekDayString = 'next ' . $daysArray[$data->REPEATING_WEEKLY_WEEKDAYS];\n $new_date_string = $task->start_date->modify($weekDayString)->format('Y-m-d') . ' ' . $start_time;;\n $new_date = new DateTime($new_date_string);\n \n return $new_date;\n }", "private function calculateTotalsAndUtilisation()\n\t{\n\t\tforeach ($this->project_table_data as $project_id => $weekly_data) {\n\t\t\t$allocated = 0;\n\t\t\t$required = 0;\n\t\t\tforeach ($weekly_data as $week => $data) {\n\t\t\t\tif ($week != \"totals\") {\n\t\t\t\t\t$allocated += $data['allocated'];\n\t\t\t\t\t$required += $data['required'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$utilisation = 0;\n\t\t\tif ($required == 0) {\n\t\t\t\t$utilisation = \"N/A\";\n\t\t\t} else {\n\t\t\t\t$utilisation = round($allocated/$required * 100, 1); //this represents a percentage value\n\t\t\t}\n\t\t\t$this->project_table_data[$project_id]['totals'] = array(\n\t\t\t\t\t'allocated' => $allocated,\n\t\t\t\t\t'required' => $required,\n\t\t\t\t\t'utilisation' => $utilisation\n\t\t\t\t);\n\t\t\t\n\t\t\t$this->total_allocated += $allocated;\n\t\t}\n\n\t\t$this->calculateTotalAvailable();\n\t\t$this->calculateTotalUtilisation();\n\t}", "public function get_weigh_in_by_week($week){\n $weigh_in_week = 'Week '.$week;\n $sql = \"SELECT * FROM `\".$this->table_name.\"` WHERE weigh_in_week='$weigh_in_week';\";\n // prewrap($sql);\n $result = mysqli_query($this->connection, $sql);\n if($result){\n return $this->get_data($result);\n }\n }", "public function initWorkWeek($user, $date) {\n\n\t\t// get db connection (for TX operations, it is best practice to specify connection explicitly)\n\t\t$con = \\Propel::getConnection(\\RegularEntryPeer::DATABASE_NAME);\n\t\t\n\t\t// start TX\n\t\t$con->beginTransaction();\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// get refs to managers needed\n\t\t\t$tagManager = $this->getCtx()->getTagManager();\n\t\t\t$workplanManager = $this->getCtx()->getWorkplanManager();\n\t\t\t\n\t\t\t// we proceed only if week is not yet initialized\n\t\t\tif ( ! $tagManager->weekHasTag($date, \\Tag::TYPE_WEEK_INITIALIZED, $user) ) {\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// loop over every weekday, and mark \"off-days\" as indicated by user profile\n\t\t\t\t// note: in the case of weeks straddling workplans, we're not guaranteed that all days in the week exist.\n\t\t\t\t//\t\t accordingly, we test for existence when retrieving the Day instances and skip ahead if we come up empty\n\t\t\t\t//\t\t\t\n\t\t\t\t\n\t\t\t\t// determine start of week (monday) date for passed date\n\t\t\t\t$startOfWeekDate = DateTimeHelper::getStartofWeek($date);\n\t\t\t\t\n\t\t\t\tfor ( $weekDayNumber = 0; $weekDayNumber <= 6; $weekDayNumber++ ) {\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// attempt to retrieve the current weekday\n\t\t\t\t\t\t$curDay = $workplanManager->getDayForDate(DateTimeHelper::addDaysToDateTime($startOfWeekDate, $weekDayNumber));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $user->getDayOffValueForWeekDayNumber($weekDayNumber + 1) == \"full\" ) {\n\t\t\t\t\t\t\t$tagManager->createDayTag($curDay, \\Tag::TYPE_DAY_DAY_OFF_FULL, $user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( $user->getDayOffValueForWeekDayNumber($weekDayNumber + 1) == \"half-am\" ) {\n\t\t\t\t\t\t\t$tagManager->createDayTag($curDay, \\Tag::TYPE_DAY_HALF_DAY_OFF_AM, $user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( $user->getDayOffValueForWeekDayNumber($weekDayNumber + 1) == \"half-pm\" ) {\n\t\t\t\t\t\t\t$tagManager->createDayTag($curDay, \\Tag::TYPE_DAY_HALF_DAY_OFF_PM, $user);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (DayDoesNotExistException $ex) {\n\t\t\t\t\t\t// NOOP\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// finally, mark week as initialized\n\t\t\t\t$tagManager->createWeekTag($date, \\Tag::TYPE_WEEK_INITIALIZED, $user);\n\t\t\t}\n\t\t\t\n\t\t\t// commit tx\n\t\t\t$con->commit();\n\t\t\t\n\t\t}\n\t\tcatch (\\PropelException $ex) {\n\t\t\t// rollback TX\n\t\t\t$con->rollback();\n\t\t\t// rethrow\n\t\t\tthrow new MomoException(\"EntryManager:initWorkWeek() - a database error has occurred while while attempting to initialize the work week for: \" . DateTimeHelper::formatDateTimeToPrettyDateFormat($date), 0, $ex);\n\t\t}\t\t\n\t\t\n\t}", "protected function fillArray() {\r\n\t\t$counter = 0;\r\n\t\tfor($j=0;$j<$this->weeksInMonth;$j++) {\r\n\t\t\tfor($i=0;$i<7;$i++) {\r\n\t\t\t\t$counter++;\r\n\t\t\t\t$this->week[$j][$i] = $counter; \r\n\t\t\t\t// offset the days\r\n\t\t\t\t$this->week[$j][$i] -= $this->firstDay;\r\n\t\t\t\tif (($this->week[$j][$i] < 1) || ($this->week[$j][$i] > $this->daysInMonth)) {\t\r\n\t\t\t\t\t$this->week[$j][$i] = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function fillArray() {\r\n\t\t$counter = 0;\r\n\t\tfor($j=0;$j<$this->weeksInMonth;$j++) {\r\n\t\t\tfor($i=0;$i<7;$i++) {\r\n\t\t\t\t$counter++;\r\n\t\t\t\t$this->week[$j][$i] = $counter; \r\n\t\t\t\t// offset the days\r\n\t\t\t\t$this->week[$j][$i] -= $this->firstDay;\r\n\t\t\t\tif (($this->week[$j][$i] < 1) || ($this->week[$j][$i] > $this->daysInMonth)) {\t\r\n\t\t\t\t\t$this->week[$j][$i] = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function weekbenchmark()\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t $today = getdate();\n\t\t\t \t$day=$today[\"weekday\"];\n\t\t\t\t\t switch($day)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t case 'Monday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-0,date(\"Y\"));\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'Tuesday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-1,date(\"Y\"));\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'Wednesday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-2,date(\"Y\"));\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'Thursday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-3,date(\"Y\"));\n\t\t\t\t\t\t \n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'Friday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-4,date(\"Y\"));\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'Saturday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-5,date(\"Y\"));\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'Sunday':\n\t\t\t\t\t\t $monday_thisweek= mktime(0,0,0,date(\"m\"),date(\"j\")-6,date(\"Y\"));\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t} // switch is over\n\t\t\t\t\t \n\t\t\t\t\t\t\t $week_benchmark=date(\"Y-m-d\", $monday_thisweek);\n\t\t\t\t\t\t\t return $week_benchmark;\n\t\t\t\t\t\t\t //////////// the bench mark is the day when every week paymnet report should be generated ...this time it is alway monday. If \n\t\t\t\t\t\t\t /////////// we ask for the report say on thursday....we will get the report of last week the bench mark being near last monday\t\t\t\t\n //////////// the moday has been identified\n\t\t\t\t\t }", "function _calcWeeks()\r\n\t{\r\n\t\tif ($this->_spandir==1) // start is before stop (positive span)\r\n\t\t{\r\n\t\t\t$dtStart = new DateClass($this->StartDate);\r\n\t\t\t$dtStart = $dtStart->BOW();\r\n\t\t\t$dtStop = $this->StopDate;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$dtStart = new DateClass($this->StopDate);\r\n\t\t\t$dtStart = $dtStart->BOW();\r\n\t\t\t$dtStop = $this->StartDate;\r\n\t\t}\r\n\t\t\r\n\t\t//--------------------------------------------------\r\n\t\t//\tcount times crossing period boundries\r\n\t\t//--------------------------------------------------\r\n\t\t$counter=0;\r\n\t\twhile ($dtStart->TimeStamp() < $dtStop->TimeStamp())\r\n\t\t{\r\n\t\t\t$counter++;\t\t\t\r\n\t\t\t$dtStart->Add(\"day\",7);\r\n\t\t}\r\n\t\t$this->_weeks = $counter-1;\r\n\t\t$this->_weeks *= $this->_spandir;\r\n\t\t\r\n\t\treturn ($this->_weeks);\r\n\r\n\t}", "public function handle()\n {\n $weeklyWorkingTime = 45;\n $users = UserModel::all();\n\n foreach ($users as $user) {\n $levelUser[$user->level][] = $user->id;\n }\n\n $lastWeek = date(\"W\");\n\n $tasks = TaskModel::select(\"tasks.*\")\n ->leftJoin(\"task_has_user\",\"task_has_user.task_id\",\"=\",\"tasks.id\")\n ->whereNull(\"task_has_user.task_id\")\n ->orderBy(\"level\",\"DESC\")\n ->orderBy(\"id\",\"ASC\")\n ->get();\n\n foreach ($tasks as $task) {\n //Leveldeki personelleri bul hangisinde daha az iş var ise ona ata\n //Eğer süre olarak var olan levelden büyüklerin işleri daha önce bitiyorsa onlara aktar\n\n $week = 53;\n $year = 0;\n $lastDuration = $weeklyWorkingTime;\n foreach ($levelUser[$task->level] as $user_id) {\n $hasUser = TaskHasUserModel::where([\"user_id\"=>$user_id])\n ->orderBy(\"year\",\"DESC\")\n ->orderBy(\"week\",\"DESC\")\n ->first();\n\n if($hasUser){\n $duration = TaskHasUserModel::where([\"year\"=>$hasUser->year,\"week\"=>$hasUser->week,\"user_id\"=>$user_id])\n ->groupBy('user_id')\n ->sum('estimated_duration');\n if($week > $hasUser->week){\n $taskUser = $user_id;\n $week = $hasUser->week;\n $year = $hasUser->year;\n $lastDuration = $duration;\n }\n elseif($week == $hasUser->week){\n if($lastDuration>$duration){\n $taskUser = $user_id;\n $week = $hasUser->week;\n $year = $hasUser->year;\n $lastDuration = $duration;\n }\n }\n }\n else{\n $week = (int)date(\"W\");\n $year = date(\"Y\");\n $taskUser = $user_id;\n break;\n }\n }\n $weekTotalDuration = TaskHasUserModel::where([\"year\"=>$year,\"week\"=>$week,\"user_id\"=>$taskUser])\n ->groupBy('user_id')\n ->sum('estimated_duration');\n\n $usersAbove = UserModel::where(\"level\",\">\",$task->level)->get();\n foreach ($usersAbove as $item) {\n $aboveDuration = TaskHasUserModel::where([\"year\"=>$year,\"week\"=>$week,\"user_id\"=>$item->id])\n ->groupBy('user_id')\n ->sum('estimated_duration');\n if($aboveDuration<$weekTotalDuration){\n $taskUser = $item->id;\n }\n }\n\n\n $RemainingTime = $weeklyWorkingTime-($weekTotalDuration+$task->estimated_duration);\n $estimatedDurationRemaining = 0;\n if($RemainingTime>=0){\n $estimatedDuration = $task->estimated_duration;\n }\n else{\n $estimatedDuration = $task->estimated_duration+$RemainingTime;\n $estimatedDurationRemaining = $task->estimated_duration-$estimatedDuration;\n }\n\n if($estimatedDuration>0){\n $taskHasUser = new TaskHasUserModel();\n $taskHasUser->task_id = $task->id;\n $taskHasUser->user_id = $taskUser;\n $taskHasUser->year = $year;\n $taskHasUser->week = $week;\n $taskHasUser->estimated_duration= $estimatedDuration;\n $taskHasUser->save();\n }\n\n if($estimatedDurationRemaining>0){\n\n $dto = new Carbon();\n $dto->setISODate( $year,$week);\n $dto->modify('+1 week');\n\n $taskHasUser = new TaskHasUserModel();\n $taskHasUser->task_id = $task->id;\n $taskHasUser->user_id = $taskUser;\n $taskHasUser->year = $dto->format(\"Y\");\n $taskHasUser->week = $dto->format(\"W\");\n $taskHasUser->estimated_duration= $estimatedDurationRemaining;\n $taskHasUser->save();\n }\n\n }\n }", "private function load() {\n\t\t\n\t\t// Get current status of task\n\t\t$sql = 'SELECT t.cell, c.name AS cellName, c.name_ko AS cellNameKO, t.status, s.text AS statusText, t.issue, t.user AS lastUser, t.timestamp AS lastUpdated ';\n\t\t$sql .= 'FROM tasks t ';\n\t\t$sql .= 'LEFT JOIN cells c ON (t.cell = c.id) ';\n\t\t$sql .= 'LEFT JOIN status s ON (t.status = s.status) ';\n\t\t$sql .= 'WHERE t.id = \"' . $this->db->real_escape_string($this->id) . '\"';\n\n\t\t$res1 = $this->db->query($sql);\n\n\t\tif ($res1 !== false) {\n\t\t\tif ($res1->num_rows > 0) {\n\t\t\t\t$row = $res1->fetch_assoc();\n\t\t\t\n\t\t\t\t$this->cell = $row['cell'];\n\t\t\t\t$this->cellName = $row['cellName'];\n\t\t\t\t$this->cellNameKO = $row['cellNameKO'];\n\t\t\t\t$this->status = $row['status'];\n\t\t\t\t$this->statusText = $row['statusText'];\n\t\t\t\t$this->issue = $row['issue'];\n\t\t\t\t$this->lastUser = $row['lastUser'];\n\t\t\t\t$this->lastUpdated = $row['lastUpdated'];\n\t\t\t}\n\t\t}\n\n\t\t// Get actions for task\n\t\t$this->actions = array();\n\n\t\t$sql = 'SELECT a.id, a.status, s.text as statusText, a.issue, a.user, a.reaped, a.notes, a.image, a.timestamp ';\n\t\t$sql .= 'FROM actions a LEFT JOIN status s ON (a.status = s.status) ';\n\t\t$sql .= 'WHERE a.task = \"' . $this->db->real_escape_string($this->id) . '\" ';\n\t\t$sql .= 'ORDER BY a.id ASC';\n\n\t\t$res2 = $this->db->query($sql);\n\n\t\tif ($res2 !== false) {\n\t\t\tif ($res2->num_rows > 0) {\n\t\t\t\twhile ($row = $res2->fetch_assoc()) {\n\t\t\t\t\t$this->actions[] = $row;\n\t\n\t\t\t\t\t$this->lastUser = $row['user'];\n\t\t\t\t\t$this->lastUpdated = $row['timestamp'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check for cell ID mismatched\n\t\t$res3 = $this->db->query('SELECT COUNT(DISTINCT cell) AS cell_count FROM actions WHERE task = \"' . $this->db->real_escape_string($this->id) . '\"');\n\n\t\tif ($res3 !== false) {\n\t\t\t$row = $res3->fetch_assoc();\n\n\t\t\tif ($row['cell_count'] > 1) {\n\t\t\t\t$this->mismatched = true;\n\t\t\t}\n\t\t}\n\t}", "public function __construct($week, $year)\n {\n global $mysqli;\n global $events;\n $events = new Events; // try passing this by reference to the constructor?\n $overallRecords = get_overall_records($year, $week);\n foreach ($events as $eventId => $eventName) {\n if (!is_active_event($eventId, $week, $year)) {\n continue;\n }\n $solveCount = get_solve_count($eventId, $year);\n $currentRank = 1;\n $userPlace = 0;\n $prevAverage = 0;\n $prevBest = 0;\n $prevUser = 0;\n $ties = 0;\n $tieCorrections = array(); // temporary array indicating amount for each user to correct for tie\n $query = $mysqli->query(\"SELECT userId, result, comment, solve1, solve2, solve3, solve4, solve5, multiBLD, average, best FROM weeklyResults WHERE eventId='$eventId' AND weekId='$week' AND yearId='$year' ORDER BY \".get_order_by_string($eventId, $year));\n $numResults = $query->num_rows;\n while ($resultRow = $query->fetch_array()) {\n $cubesMBLD = 0;\n $finishedSolves = 0;\n $result = 0;\n $userId = $resultRow['userId'];\n $multiBLD = $resultRow['multiBLD'];\n if (!isset($this->userIds[$userId])) {\n $this->userIds[$userId] = $userId;\n $this->totalScores[$userId] = 0;\n $this->kinchScores[$userId] = 0;\n $this->kinchScoresWca[$userId] = 0;\n $this->partials[$userId][0] = 0;\n $this->partialsWca[$userId] = 0;\n $this->completeds[$userId][0] = 0;\n }\n for ($i = 1; $i <= $solveCount; ++$i) {\n $solves[$i] = $resultRow['solve'.$i];\n }\n $best = $resultRow['best'];\n $average = $resultRow['average'];\n\n if (are_results_equal($average, $prevAverage, $solveCount, $best, $prevBest)) {\n // tie; store previous user so tie points can be added later\n $tieCorrections[$ties] = $prevUser;\n $ties++;\n } else {\n // fix all the scores with ties and clear the tieCorrections array\n if ($ties > 0) {\n $tieCorrections[$ties] = $prevUser;\n for ($k = 0; $k <= $ties; $k++) {\n $this->scores[$eventId][$tieCorrections[$k]] -= floor($ties / 2);\n $this->totalScores[$tieCorrections[$k]] -= floor($ties / 2);\n }\n }\n unset($tieCorrections);\n $ties = 0;\n }\n $prevAverage = $average;\n $prevBest = $best;\n\n $userPlace = $currentRank - $ties;\n $currentRank++;\n\n if ($eventId !== 13) { // regular event\n for($i = 1; $i <= $solveCount; $i++){\n $finishedSolves += ($resultRow['solve'.$i] != 0 && $resultRow['solve'.$i] != 9999) ? 1 : 0;\n }\n } elseif ($eventId === 13) { // multiBLD\n $rezult = number_to_MBLD($resultRow['multiBLD']);\n if ($rezult[0] !== 'DNF') {\n $cubesMBLD = $rezult[3];\n }\n }\n if (is_movecount_scored($eventId) && $solveCount > 1) {\n $result = get_FMC_average_output($resultRow['result']);\n } else {\n $result = get_single_output($eventId, $eventId == 13 ? $resultRow['multiBLD'] : $resultRow['result']);\n } \n $this->solveDetails[$eventId][$userId] = get_solve_details($eventId, $solveCount, $solves, $result, $multiBLD, true);\n\n // Set BLD scoring flags\n $bldComplete = $result ? 1 : 0;\n $bldSuccess = false;\n if (is_BLD($eventId)) {\n if ($result == \"DNF\" && $finishedSolves < $solveCount) {\n $bldComplete = false;\n } else if ($result != \"DNF\") {\n $bldSuccess = true;\n }\n }\n\n // Calculate score and update total\n if ($result) {\n $score = calculate_points($eventId, $numResults - $userPlace + 1, 0, $cubesMBLD, $bldComplete, $bldSuccess, $week, $year);\n $this->totalScores[$userId] += $score;\n if (is_valid_score($result)) {\n $kinchResult = ($eventId == 13) ? $multiBLD : ugly_number($result);\n $this->kinchScores[$userId] += calculate_kinch_event_score($overallRecords[$eventId], $kinchResult, $eventId, false);\n if (is_wca_event($eventId)) {\n $this->kinchScoresWca[$userId] += calculate_kinch_event_score($overallRecords[$eventId], $kinchResult, $eventId, false);\n }\n }\n }\n\n $prevUser = $userId;\n\n // Figure out how done we are on this event\n $partials[$userId][$eventId] = false;\n $completeds[$userId][$eventId] = false;\n if ($result || ($this->solveDetails[$eventId][$userId] !== \"\" && $eventId === 13)) {\n $this->partials[$userId][$eventId] = true;\n ++$this->partials[$userId][0];\n if (is_wca_event($eventId)) {\n ++$this->partialsWca[$userId];\n }\n if ($eventId == 13 || $finishedSolves == $solveCount) {\n $this->completeds[$userId][$eventId] = true;\n ++$this->completeds[$userId][0];\n }\n }\n\n $this->results[$eventId][$userId] = $result;\n $this->bests[$eventId][$userId] = $best;\n $this->averages[$eventId][$userId] = $average;\n $this->userPlaces[$eventId][$userId] = $userPlace;\n $this->scores[$eventId][$userId] = $score;\n $this->comments[$eventId][$userId] = $resultRow['comment'];\n }\n // Make the following a subroutine (also happens above)\n if ($ties > 0) {\n $tieCorrections[$ties] = $prevUser;\n for ($k = 0; $k <= $ties; $k++) {\n $this->scores[$eventId][$tieCorrections[$k]] -= floor($ties / 2);\n $this->totalScores[$tieCorrections[$k]] -= floor($ties / 2);\n }\n }\n unset($tieCorrections);\n $ties = 0;\n\n if ($numResults > 0) {\n arsort($this->scores[$eventId]);\n asort($this->userPlaces[$eventId]);\n }\n }\n \n foreach ($this->userIds as $userId) {\n $this->kinchScores[$userId] /= active_event_count($week, $year);\n $this->kinchScoresWca[$userId] /= wca_event_count();\n }\n unset($this->totalScores[0]);\n unset($this->totalScores['']);\n arsort($this->totalScores);\n arsort($this->kinchScores);\n arsort($this->kinchScoresWca);\n }", "function fillArray() {\n\t\tfor($j=0;$j<$this->weeksInMonth;$j++) {\n\t\t\tfor($i=0;$i<7;$i++) {\n\t\t\t\t$counter++;\n\t\t\t\t$this->week[$j][$i] = $counter; \n\t\t\t\t// offset the days\n\t\t\t\t$this->week[$j][$i] -= $this->firstDay;\n\t\t\t\tif (($this->week[$j][$i] < 1) || ($this->week[$j][$i] > $this->daysInMonth)) {\t\n\t\t\t\t\t$this->week[$j][$i] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function displayWeekTable($showAllWeeks = false) {\r\n\t\tif ($this->year != date(\"Y\") && !$showAllWeeks)\r\n\t\t\treturn;\r\n\r\n\t\t$Dataset = new Dataset();\r\n\r\n\t\tif ($this->config['compare_weeks']['var'])\r\n\t\t\t$Dataset->activateKilometerComparison();\r\n\r\n\t\techo '<table class=\"r fullwidth zebra-style\">';\r\n\t\techo '<thead><tr><th colspan=\"'.($Dataset->cols()+1).'\">'.($showAllWeeks?__('All'):__('Last').' 10').' '.__('training weeks').'</th></tr></thead>';\r\n\t\techo '<tbody>';\r\n\r\n\t\tif (!$showAllWeeks) {\r\n\t\t\t$starttime = time();\r\n\t\t\t$maxW = 9;\r\n\t\t} else {\r\n\t\t\t$starttime = ($this->year == date(\"Y\")) ? time() : mktime(1, 0, 0, 12, 31, $this->year);\r\n\t\t\t$maxW = ($starttime - mktime(1, 0, 0, 12, 31, $this->year-1))/(7*DAY_IN_S);\r\n\t\t}\r\n\r\n\t\t$CompleteData = array();\r\n\t\t$CurrentWeekEnd = Time::Weekend($starttime);\r\n\t\t$CompleteResult = $Dataset->getGroupOfTrainingsForTimerange($this->sportid, 7*DAY_IN_S, $CurrentWeekEnd - ($maxW+2)*7*DAY_IN_S, $CurrentWeekEnd);\r\n\r\n\t\tforeach ($CompleteResult as $Data) {\r\n\t\t\t$CompleteData[$Data['timerange']] = $Data;\r\n\t\t}\r\n\r\n\t\tfor ($w = 0; $w <= $maxW; $w++) {\r\n\t\t\t$time = $starttime - $w*7*DAY_IN_S;\r\n\t\t\t$start = Time::Weekstart($time);\r\n\t\t\t$end = Time::Weekend($time);\r\n\t\t\t$week = Icon::$CALENDAR.' '.__('Week').' '.date('W', $time);\r\n\r\n\t\t\techo '<tr><td class=\"l\"><span class=\"b\">'.DataBrowserLinker::link($week, $start, $end, '').'</span>&nbsp;&nbsp;&nbsp;<span class=\"small\">'.date('d.m',$start).\" - \".date('d.m',$end).'</span></td>';\r\n\r\n\t\t\tif (isset($CompleteData[$w]) && $Dataset->setGroupOfTrainings($CompleteData[$w])) {\r\n\t\t\t\tif (isset($CompleteData[$w+1]))\r\n\t\t\t\t\t$Dataset->setKilometerToCompareTo($CompleteData[$w+1]['distance']);\r\n\r\n\t\t\t\t$Dataset->displayTableColumns();\r\n\t\t\t} else\r\n\t\t\t\techo HTML::emptyTD($Dataset->cols(), '<em>'.__('No activities').'</em>', 'c small');\r\n\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\r\n\t\techo '</tbody>';\r\n\t\techo '</table>';\r\n\t}", "public function weeklyAny() {\n $weekTime = 7 * 24 * 60 * 60;\n $this->trigger(null, 'call', $weekTime);\n }", "public function getSundayStartTimes () {\n \t$val = $this->cacheGetPlain('SundayStartTimes');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('SundayStartTimes', $this->getOffering()->getSundayStartTimes());\n \telse\n \t\treturn $val;\n\t}" ]
[ "0.6030108", "0.5934485", "0.56707114", "0.56536376", "0.54327434", "0.5216867", "0.5192631", "0.51883405", "0.51577955", "0.5154582", "0.51041424", "0.5078287", "0.5054052", "0.50491744", "0.50426424", "0.5006951", "0.49740154", "0.49657694", "0.49575478", "0.4954219", "0.4954219", "0.49392107", "0.4929105", "0.4928334", "0.4900339", "0.48813224", "0.4869988", "0.48388162", "0.48306602", "0.48229402" ]
0.6375584
0
Add a category to array category
public function addCategory($category){ if(!in_array($category, $this->Category)){ array_push($this->Category, $category); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function category(array $category);", "function addCategoryArray($categories) \n\t{\n\t\t$this->categories = array_merge($this->categories, $categories);\n\t}", "public function addCategory($category_name, array $section_info);", "function addCategory($categoryname, $other = 0, $neutral = 0, $label = null, $scale = null) \n\t{\n\t\tarray_push($this->categories, new ilSurveyCategory($categoryname, $other, $neutral, $label, $scale));\n\t}", "public function addCategory($array = null) {\n if (!Helper::isArrayEmpty($array)) {\n return $this->Db->insert($this->tableCategories, [\n 'name' => $array['name'],\n 'identity' => $array['identity'],\n 'meta_title' => $array['meta_title'],\n 'meta_description' => $array['meta_description']\n ]);\n }\n return false;\n }", "protected function addCategory($cat = '')\n\t{\n\t\t$cats = array();\n\t\tif(!empty($cat))\n\t\t\t$cats = explode('/',$cat);\n\t\t\n\t\t$word_cat = $this->word_cat;\n\t\t$word_cat = array_merge($word_cat,$cats);\n\t\t\n\t\tif(empty($word_cat))\n\t\t\t$word_cat = array('Other');\n\t\t\n\t\treturn $word_cat;\n\t}", "protected function add_category_from_array($category_name, $array, $reporting_data)\n {\n foreach ($array as $header => $value)\n {\n $reporting_data->add_data_category_row($header, $category_name, $value);\n }\n }", "function add_cat($name)\n{\n $tab = get_tab(\"cat\");\n array_push($tab, $name);\n save_tab(\"cat\", $tab);\n return;\n}", "function category($id) {\n\t\t$this->categories[] = intval($id);\n\t}", "function addCategories($cat) {\n //print \"Looking at categories:$cat<br/>\";\n\t$list = split(' ', $cat);\n\tforeach ($list as $item) {\n //print \"Looking at: $item<br/>\";\n\t if ($key = $this->containsValue($this->bases, $item)) {\n\t\t$this->currentRecipe['base_type_id'] = $key;\n //print \"Got Base Type ID: \" . $this->bases[$key] . \"<br/>\";\n\t } else if ($key = $this->containsValue($this->courses, $item)) {\n\t\t$this->currentRecipe['course_id'] = $key;\n //print \"Got course ID: \" . $this->courses[$key] . \"<br/>\";\n\t } else if ($key = $this->containsValue($this->ethnicities, $item)) {\n\t\t$this->currentRecipe['ethnicity_id'] = $key;\n //print \"Got ethnic ID: \" . $this->ethnicities[$key] . \"<br/>\";\n\t }\n\t}\n }", "function addCategoryAtPosition($categoryname, $position, $other = 0, $neutral = 0, $label = null) \n\t{\n\t\tif (array_key_exists($position, $this->categories))\n\t\t{\n\t\t\t$head = array_slice($this->categories, 0, $position);\n\t\t\t$tail = array_slice($this->categories, $position);\n\t\t\t$this->categories = array_merge($head, array(new ilSurveyCategory($categoryname, $other, $neutral, $label)), $tail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarray_push($this->categories, new ilSurveyCategory($categoryname, $other, $neutral, $label));\n\t\t}\n\t}", "protected function add_category( )\n {\n if(!empty($this->name_entity)) {\n \n if($this->model->create($this->name_entity)) \n array_push($this->messages, array('info', 'Categoría insertada correctamente!'));\n else \n array_push($this->messages, array('error', 'Error al insertar la categoría'));\n }\n \n $this->list_category();\n }", "public function add_category($data)\n {\n $item = array(\n 'name' => $data['name'],\n 'icon' => $data['icon']\n );\n $this->db->insert('category', $item);\n }", "public function setCategory($category) {\n $ret = array();\n $dom = $this->dom;\n $this->verifyHeaderElements(array('category'));\n $head = $dom->getElementsByTagName('head')->item(0);\n $cnode = $dom->getElementsByTagNameNS($this->xmlns, 'category')->item(0);\n $node = $dom->createElementNS($this->xmlns, 'category', htmlspecialchars($category));\n $head->replaceChild($node, $cnode);\n }", "public function createCategory();", "public function addCategories($categories){\n $this->categories()->attach($categories); // categories array[]\n }", "function create_category($name)\n{\n\t$categories = get_table('categories');\n\t$temp = array();\n\t$temp['name'] = $name;\n\t$categories[] = $temp;\n\tput_table('categories', $categories);\n}", "public function addCategory(BlogCategory $category);", "function add_category($column, $value, $table=false){\n\t\t$this->select_table($table);\n\t\tif(isset($this->table_config[\"filter_columns\"][$column])){\n\t\t\tif(is_array($value)){\n\t\t\t\t$value = $value;\n\t\t\t} else if($this->table_config[\"filter_columns\"][$column][\"filter_type\"]==\"multiple\"){\n\t\t\t\t$value = str_replace(\"\\\\;\",\"<<semicolon>>\",$value); // temporarily replace any escaped semicolons\n\t\t\t\t$value = explode(\";\", $value);\n\t\t\t} else {\n\t\t\t\t$value = array($value);\n\t\t\t}\n\t\t\tforeach($value as $val){\n\t\t\t\tif($val!=\"\"){\n\t\t\t\t\t$val = str_replace(\"<<semicolon>>\",\";\",$val); // put back the escaped semicolon\n\t\t\t\t\t$val_slug = drk_sluggify($val);\n\t\t\t\t\tif(isset($this->table_config[\"filter_columns\"][$column][\"categories\"][$val_slug])){\n\t\t\t\t\t\t$this->table_config[\"filter_columns\"][$column][\"categories\"][$val_slug][\"records\"]++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->table_config[\"filter_columns\"][$column][\"categories\"][$val_slug] = array( \"records\"=>1, \"name\"=>$val );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->sort_categories();\n\t\t\tupdate_option(\"od_table_\" . $this->table_config[\"name\"], $this->table_config);\n\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function setCategoryName()\n {\n $object = new HtCategoryCar(\"*\");\n $result = $object->getResultSet();\n while ($row = $result->fetch_assoc()) {\n $catArray[] = $row;\n }\n $this->categoryNameArray = $catArray;\n }", "public function addCategory($options);", "function createCategories()\n {\n $currentCategories = $this->loadCategories();\n\n foreach ($this->categories as $category)\n {\n // Skip adding category if it already exists\n if (in_array($category, $currentCategories))\n {\n continue;\n }\n\n // Create a copy of the template array for category properties\n $data = array_merge($this->categoryTemplate);\n\n // Set the category description from the translation key in en-GB.com_cajobboard.sys.ini\n // remove any spaces from the category title when building the translation key\n $data['title'] = Text::_('COM_CAJOBBOARD_CATEGORY_TITLE_' . strtoupper(str_replace(' ', '', $category)));\n $data['description'] = $data['title'];\n\n // Initialize a new category\n $category = Table::getInstance('Category');\n\n // Bind passed category parameters to Category model\n $category->bind($data);\n\n // setLocation(integer $referenceId, string $position = 'after')\n $category->setLocation($category->getRootId(), 'last-child');\n\n // Check to make sure our data is valid. check() will auto generate alias if not set above.\n if (!$category->check())\n {\n throw new Error($category->getError(), 500);\n\n return false;\n }\n\n // Store the category\n if (!$category->store(true))\n {\n throw new Error($category->getError(), 500);\n\n return false;\n }\n\n // Build the path for our category and set it in the database\n $category->rebuildPath($category->id);\n }\n\n Table::getInstance('Category')->rebuild();\n }", "public function addCategorie(GmthBridgeCategorie $categorie)\n\t{\n\t\t$this->_categories[] = $categorie->getDataCategorie();\n\t}", "private function _addCategory($cat_names) {\n foreach ($cat_names as $cat_name) {\n $cat_desc=$this->_getCategoryDescription($cat_name['name']);\n $cat_data=array('category_description'=>$cat_desc,'image'=>'',\n 'status'=>1,'column'=>1,'parent_id'=>0,'sort_order'=>'',\n 'keyword'=>'','metal_price'=>$cat_name['market_price']);\n $this->_saveCategory($cat_data);\n $this->_assignCategories($cat_name['option_value_id'],$cat_name['name']);\n }\n }", "private function _createUpdateCategories() {\n $cat_by_ids = (array) $this->_getOptionValuesById();\n $cat_by_name = (array) $this->_getOptionValuesByName();\n $cat_names = array_merge($cat_by_name,$cat_by_ids);\n $filtered_cats = $this->_filterCats($cat_names);\n if(isset($filtered_cats['new'])) {\n $this->_addCategory($filtered_cats['new']);\n }\n if(isset($filtered_cats['old'])) {\n $this->_updateCategory($filtered_cats['old']);\n }\n }", "function category_create($category) {\n\tif (!category_exists($category)) {\n\t\t$_ENV['dbi']->insert('categories',array('category'=>trim($category)),1);\n\t}\n}", "public function add_new_category()\n {\n $cat = array($this->input->post());\n $this->admin_model->addCategory($cat);\n\n redirect('admin/addCategory');\n }", "abstract public function category();", "public function addCategory($data) {\n $category = $this->model->where('category', Helpers::toSnakecase($data['category']))->first();\n if ($category) {\n throw new SeException(\"category already exist \", 422, 4220704);\n }\n $data = [\n 'code' => $this->generateCategoryCode(),\n 'category' => Helpers::toSnakecase($data['category']),\n 'description' => isset($data['description']) ? $data['description'] : '',\n 'classification_code' => isset($data['classificationCode']) ? $data['classificationCode'] : NULL,\n ];\n return $this->create($data);\n }", "function functionAddCategorySubcategory($postedArray){\n\t\tglobal $db;\n\t\textract($postedArray);\n\t\t$category_name\t= (isset($category_name))?trim(addslashes($category_name)):'';\n\t $parent_id\t = (isset($parent_id))?trim($parent_id):'0';\n\t $description = (isset($description))?trim(addslashes($description)):'';\n\t\t$is_active\t = (isset($is_active))?trim($is_active):'0';\n\t\t$sql\t= \"insert into `category` SET `category_name`='\".mysql_real_escape_string($category_name).\"', `description`='\".mysql_real_escape_string($description).\"', `parent_id`='\".$parent_id.\"', `is_active`='\".$is_active.\"', `date`='\".CURRENT_DATE.\"' \";\n\t\treturn $insertResult = $db->insert($sql, $db->conn);\n\t}" ]
[ "0.7111982", "0.69689953", "0.69284993", "0.6866833", "0.6681719", "0.66747075", "0.66727674", "0.6497411", "0.64520544", "0.64196146", "0.6416692", "0.6395526", "0.63348716", "0.63324505", "0.628426", "0.62650716", "0.62524056", "0.62426203", "0.6212214", "0.61977434", "0.6156235", "0.6095111", "0.6078633", "0.6075606", "0.6059372", "0.6056279", "0.60343635", "0.6031382", "0.6026944", "0.60255826" ]
0.72386694
0
Add a type to array type
public function addType($type){ if(!in_array($type, $this->Type)){ array_push($this->Type, $type); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addArray($type, $parent) {\n\t\t$cc = $this->addElement(\"xsd:complexContent\", $parent);\n\t\t$rs = $this->addElement(\"xsd:restriction\", $cc);\n\t\t$rs->setAttribute(\"base\", \"SOAP-ENC:Array\");\n\n\t\t$type = (substr($type,-2) == '[]') ? substr($type, 0, (strlen($type)-2)) : substr($type, 6, (strlen($type)-7));\n\t\t$el = $this->addElement(\"xsd:attribute\", $rs);\n\t\t$el->setAttribute(\"ref\", \"SOAP-ENC:arrayType\");\n\n\t\t//check if XML Schema datatype\n\t\tif($t = $this->checkSchemaType(strtolower($type)))\n\t\t\t\t$el->setAttribute(\"wsdl:arrayType\", \"xsd:\".$t.\"[]\");\n\t\telse{//no XML Schema datatype\n\t\t\t//if valueType==Array, then create anonymouse inline complexType (within element tag without type attribute)\n\t\t\tif(substr($type,-2) == '[]'){\n\t\t\t\t$this->addComplexType($type, false, $el);\n\t\t\t}else{//else, new complextype, outline (element with 'ref' attrib)\n\t\t\t\t$el->setAttribute(\"wsdl:arrayType\", \"tns:\".$type.\"[]\");\n\t\t\t\t$this->addComplexType($type, $type);\n\t\t\t}\n\t\t}\n\t\treturn $el;\n\t}", "public function addType(array $type)\n {\n if (isset($type['name'])) {\n $this->types[$type['name']] = new ElementType($type);\n }\n\n return $this;\n }", "public function add($array);", "function mycustomtype($array){\n$array[]='products';\nreturn $array;\n}", "protected function get_type() {\n\t\treturn 'array';\n\t}", "function addType($type,$class,$file=NULL) {\r\n $GLOBALS['_JPSPAN_SERIALIZER_MAP'][strtolower($type)] =\r\n array (\r\n 'class'=>$class,\r\n 'file'=>$file,\r\n );\r\n }", "public function addTypes(array $types);", "public function addType($type)\n {\n if (!is_array($type))\n $type = [$type];\n\n $this->types = array_merge($this->types, $type);\n\n return $this;\n }", "function Set_Data_Type($type_arr){\n $this->tb_data_type = $type_arr;\n }", "public function getType()\n\t{\n\t\treturn 'array';\n\t}", "public static function typeAlias($type)\n {\n if (is_array($type)) {\n if ($type[0] == 'a') {\n $type[0] = 'array';\n }\n }\n\n // type aliases\n switch ($type) {\n case 'a':\n $type = 'array';\n break;\n case 'a1Dbu':\n case 'arr1D_bool_uint':\n // var ......TYPE...DEFAULT..VALUES..INDEX\n $type = ['a', false, 'b', 'u',];\n break;\n case 'a1Dss':\n case 'arr1D_str_str':\n $type = ['a', null, 's', 's',];\n break;\n case 'a1Dsu':\n $type = ['a', false, 's', 'u'];\n break;\n case 'a2Dbu':\n case 'arr2D_bool_uint':\n $type = ['a', [], ['a', false, 'b', 'u',], 'u',];\n break;\n case 'a2Dbs':\n $type = ['a', [], ['a', false, 'b', 's',], 's',];\n break;\n case 'a2Dss':\n case 'arr2D_str_str':\n $type = ['a', [], ['a', null, 's', 's',], 's',];\n break;\n case 'b':\n $type = 'bool';\n break;\n case 'd':\n $type = 'double';\n break;\n case 'f':\n $type = 'float';\n break;\n case 'i':\n $type = 'int';\n break;\n case 's':\n case 'str':\n $type = 'string';\n break;\n case 'u':\n $type = 'u_int';\n break;\n default:\n // do nothing;\n }//end switch\n\n /*\n Added true multi-dim functionality\n Types Must be specified in the following manner (variable_name => type)\n //variable name with type\n 'testuint'=>'u_int'\n\n //variable name with type and default\n 'testuint'=>array('u_int',1337)\n\n //one dimensional array with default for base layer and type\n 'testarray2'=>array('array',null,'int'),\n 'testarray2a'=>array('array',13,'int'),\n\n //one dimensional array with default for base layer and type and type for array keys\n 'testarray2'=>array('array',null,'int','u_int'),\n 'testarray2a'=>array('array',13,'int','int'),\n\n //one dimensional array with default for base layer and type with default for array elements\n 'testarray2b'=>array('array',null,array('int',136)),\n\n //two dimensoinal array with default bool for top layer, and key validation for both layers\n 'countries'=>array('array', false, array('array', false, 'bool', 'u_int'), 'u_int')\n\n //two dimensional array with default for base layer\n //and second layer and type for array elements WITHOUT default for array elements\n 'testarray3'=>array('array',null,array('array',3,'int')),\n //two dimensional array with default for base layer\n //and second layer and type for array elements with default for array elements\n 'testarray3b'=>array('array',null,array('array',3,array('int',136))),\n\n //these can be extended to further dimensions as following (a four dimensional array in this case)\n 'testarray4'=>array('array',null,array('array',null,array('array',null,array('array',3,'int'))))\n */\n return $type;\n }", "function Set_Data_Type($type_arr){\r\n\t$this->tb_data_type = $type_arr;\r\n}", "public function addType($type)\n {\n $this->type[] = $type;\n return $this;\n }", "public function addTypeExtensions(array $typeExtensions);", "public function add(array $input);", "function as_array_of(string $type): string\n {\n return sprintf('%s[]', $type);\n }", "private function addGeneric($type, $toAdd, $alias = null)\n {\n if (is_array($toAdd)) {\n foreach ($toAdd as $key => $value) {\n $this->addGeneric($type, $value, $key);\n }\n } else {\n if ($alias !== null && !is_int($alias)) {\n $toAdd .= \" AS $alias\";\n }\n\n $this->parts[$type][] = $toAdd;\n }\n }", "public function addType($robot)\n {\n $class_bool = false;\n\n if (!empty($this->robot_type_array)) {\n foreach ($this->robot_type_array as $type_item) {\n if (get_class($type_item) == get_class($robot)) {\n $class_bool = true;\n break;\n }\n }\n\n if ($class_bool == false) {\n $this->robot_type_array[] = $robot;\n }\n } else {\n $this->robot_type_array[] = $robot;\n }\n }", "public function __construct($type = null, array $array = array()) {\n\t\tif (null == $this->type) {\n\t\t\tparent::__construct($array);\n\t\t} else {\n\t\t\tparent::__construct(array());\n\t\t\t\n\t\t\t$this->setType($type);\n\t\t\t\n\t\t\tforeach ($array as $object) {\n\t\t\t\t$this->add($object);\n\t\t\t}\n\t\t}\n\t}", "function set_type($data, $type_tag) {\n switch($type_tag) {\n case \"i\":\n $this->typetags .= \"i\";\n return (int)$data;\n case \"f\";\n $this->typetags .= \"f\";\n return (double)$data;\n case \"d\";\n $this->typetags .= \"d\";\n return (double)$data;\n case \"s\":\n case \"c\":\n $this->typetags .= \"s\";\n return (string)$data;\n case \"T\":\n $this->typetags .= \"T\";\n return TRUE;\n case \"F\":\n $this->typetags .= \"F\";\n return FALSE;\n case \"N\":\n $this->typetags .= \"N\";\n return NULL;\n case \"I\":\n $this->typetags .= \"I\";\n return $data;\n case \"t\":\n $this->typetags .= \"t\";\n return $data;\n case \"b\":\n $this->typetags .= \"b\";\n return $data;\n case \"A\":\n // Array is now expanded...\n $this->typetags .= \"[\";\n $data = (array)$data;\n for($i = 0; $i < count($data); $i++) {\n $type_tag = $this->get_type($data[$i]);\n $data[$i] = array($this->set_type($data[$i], $type_tag), $type_tag);\n }\n $this->typetags .= \"]\";\n return $data;\n default:\n trigger_error(\"Unrecognized type tag, '$type_tag'\", E_USER_ERROR);\n }\n }", "function add($q, $field /* value, value, value */) {\n $a = func_get_args();\n $T = @$this->type[$a[1]];\n if (is_array($T) && $T[0]=='array') {\n $T = $T[1]; // array of type\n foreach($a as $k => &$_)\n if ($k > 1) // $a[2], ... are fields\n $_ = M_Type::apply($_, $T);\n }\n call_user_func_array('parent::add', $a);\n }", "public function addFieldType($field)\n {\n $this->types[$field['type']] = $field['class'];\n }", "public function setDataType($type);", "function add(array $data) : ?array;", "public static function addType($index, $name, $sql, $filter)\n {\n self::$types[$index] = array(\n 'name' => $name,\n 'sql' => $sql,\n 'filter' => $filter);\n }", "public function appendValue($data, $type, $element)\n {\n foreach ($data as $key => & $item) {\n $item[$element] = $type;\n }\n return $data; \n }", "public function checkAndSetTypeHint()\n {\n $this->typeHint = ezcTemplateAstNode::TYPE_ARRAY;\n }", "public function addType(string $type): BreweryImportItem {\n if (!in_array($type, $this->values['types'])) {\n $this->values['types'][] = $type;\n }\n return $this;\n }", "function zg_ai_is_type_type(array $arr, string $type) {\n return (is_array($arr) && array_key_exists('#type', $arr) && $arr['#type'] === $type);\n}", "private function appendValue($data, $type, $element)\n\t{\n\t foreach ($data as $key => & $item) {\n\t $item[$element] = $type;\n\t }\n\t return $data; \n\t}" ]
[ "0.6711815", "0.6569546", "0.654596", "0.6512083", "0.6498302", "0.6420879", "0.6416763", "0.64125824", "0.6193169", "0.61572844", "0.61188793", "0.60539734", "0.5973205", "0.5964991", "0.59410846", "0.5919553", "0.5903413", "0.58500034", "0.5819095", "0.58161163", "0.5758334", "0.5739917", "0.56893164", "0.5675787", "0.56623566", "0.56586945", "0.56447417", "0.56404305", "0.5599556", "0.5568105" ]
0.69460136
0
CUSTOMER ENTITY CREATION return a customer entity from a stripe customer
public function generateCustomer(\Stripe\Customer $stripeCustomer) { $customerObj = new Customer(); $customerObj->setStripeId($stripeCustomer->id); $customerObj->setEmail($stripeCustomer->email); return $customerObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $instance = self::createCustomer($this);\n $this->setId($instance->getId());\n return $instance;\n }", "private function createCustomer(array $ecster_customer)\n {\n $customer = new Customer();\n $customer->firstname = $this->splitNames($ecster_customer, 'firstname');\n $customer->lastname = $this->splitNames($ecster_customer, 'lastname');\n $customer->email = $ecster_customer['email'];\n $customer->passwd = Tools::passwdGen(8, 'ALPHANUMERIC');\n $customer->is_guest = 1;\n $customer->id_default_group = (int)Configuration::get('PS_GUEST_GROUP', null, $this->ecsterCart->id_shop);\n $customer->newsletter = 0;\n $customer->optin = 0;\n $customer->active = 1;\n $customer->id_gender = 0;\n\n $customer->add();\n return $customer;\n }", "public abstract function createCustomer(\\PHPBook\\Payment\\Customer $customer);", "public function createCustomer()\n {\n\t\t$contact = $this;\n\t\t$customer = $this->service->instance->customers()->create();\n\t\t$customer->responsible_user_id = $this->responsible_user_id;\n\t\t$customer->attachContact($this);\n\n\t\t$customer->onCreate(function(&$model) use (&$contact) {\n\t\t\t$contact->attachCustomer($model);\n\t\t});\n\t\treturn $customer;\n\t}", "public function customer () {\n\t\treturn new Customer ($this->customer);\n\t}", "public function createCustomer($data)\n {\n\n $customer = new $this->Customer;\n $customer = $data;\n return $this->Customer::create($customer);\n\n /*\n $customer->name = $data['name'];\n $customer->email = $data['email'];\n $customer->phone_number = $data['phone_number'];\n $customer->born_at = $data['born_at'];\n $customer->state_id = $data['state_id'];\n $customer->city_id = $data['city_id'];\n dd($customer);\n */\n }", "public static function createCustomer($post)\n {\n $username = $post['username'];\n $firstname = $post['firstname'];\n $lastname = $post['lastname'];\n $address = $post['address'];\n $postcode = $post['postcode'];\n $city = $post['city'];\n $telephone = $post['telephone'];\n $status = (isset($post['active_status'])) ? (boolean)$post['active_status'] : false;\n \n //validate values\n if (ValidationService::validateCustomer($firstname, $lastname, $address, $postcode, $city, $telephone)) {\n //create customer\n CustomerDAO::create($firstname, $lastname, $address, $postcode, $city, $telephone, $status, $username);\n }\n }", "public function createCustomer()\n {\n //Data\n $userData = $this->loadData('generic_customer_account', null, 'email');\n $addressData = $this->loadData('all_fields_address');\n //Steps\n $this->navigate('manage_customers');\n $this->customerHelper()->createCustomer($userData, $addressData);\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_customer');\n\n return $userData['email'];\n }", "public function createCustomer($customerExtId);", "public function createSimpleCustomer($customerId)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn Braintree_Customer::create(array('id' => $customerId));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->_log('Customer creation exception: ' . $e);\n\n\t\t\treturn NULL;\n\t\t}\t\t\n\t}", "protected function createBagCustomer($customer){\n\t\t$res = new Customer();\n\t\t$res->appCustomerId = $customer->getId();\n\t\t$res->email = $customer->getEmail();\n $res->twitterId = Mage::helper('connectedstore/ICSTwitterHelper')->getTwitterId($customer);\n\t\treturn $res;\n\t}", "public function getCustomerCreateRequest($customer) {\n $data = null;\n if ($customer) {\n // create customer using token of a just-verified card\n if ($this->cardToken) {\n $data = array(\n \"token\" => $this->cardToken,\n \"name\" => $customer->getFirstName() . \" \" . $customer->getLastName(),\n \"email\" => $customer->getEmail(),\n \"reference\" => $customer->getId()\n );\n }\n // create customer using raw card data\n else if ($this->cardNumber) {\n $data = array(\n \"name\" => $customer->getFirstName() . \" \" . $customer->getLastName(),\n \"email\" => $customer->getEmail(),\n \"reference\" => $customer->getId(),\n \"card\" => array(\n \"expYear\" => $this->expirationYear,\n \"expMonth\" => $this->expirationMonth, \n \"cvc\" => $this->cvc,\n \"number\" => $this->cardNumber\n )\n );\n if ($this->billing) {\n $data[\"name\"] = $this->billing->getName();\n $data[\"card\"][\"name\"] = $this->billing->getName();\n $data[\"card\"][\"addressCity\"] = $this->billing->getCity();\n $data[\"card\"][\"addressLine1\"] = $this->billing->getStreetLine(1);\n $data[\"card\"][\"addressLine2\"] = $this->billing->getStreetLine(2);\n $data[\"card\"][\"addressZip\"] = $this->billing->getPostcode();\n $data[\"card\"][\"addressState\"] = $this->billing->getRegion();\n $data[\"card\"][\"addressCountry\"] = $this->billing->getCountryId();\n }\n } \n }\n return $data;\n }", "function create_customer ($CustomerRef, $customer_data) {\n $customer_data['CustomerRef'] = $this->testing ? COMMERCE_PAYMENT_EWAY_TOKEN_TEST_CUSTOMER_REF : $CustomerRef;\n $response = $this->soap_call('CreateCustomer', $customer_data);\n\n if ($response['txStatus'] && isset ($response['CreateCustomerResult'])) {\n $this->ManagedCustomerId = $response['CreateCustomerResult'];\n // Only insert record if we don't have it, eway can return same\n // token in case it is the same user.\n $uid = db_select ('commerce_eway_token', 't')->fields ('t', array ('uid'))->condition ('uid', $CustomerRef)->execute()->fetchField();\n if (!$uid) {\n db_insert ('commerce_eway_token')->fields (array ('uid' => $CustomerRef, 'eway_id' => $this->ManagedCustomerId))->execute();\n }\n // Save the customer data so the cardonfile can be created if needed.\n $this->unsaved_customer_data = $customer_data;\n if ($this->log_to_watchdog) {\n watchdog('commerce_payment_eway', 'User %uid setup for token billing', array('%uid' => $CustomerRef));\n }\n }\n\n $this->last_response = $response;\n return $response['txStatus'];\n }", "public function createStripeCustomer($token)\n {\n \\Stripe\\Stripe::setApiKey(env('STRIPE_SECRET'));\n \n $customer = \\Stripe\\Customer::create(array(\n \"description\" => Auth::user()->email,\n \"source\" => $token\n ));\n \n Auth::user()->stripe_id = $customer->id;\n Auth::user()->save();\n \n return $customer;\n }", "public function createCustomerAccount(){\n // needs disclaimer about password being saved as plaintext\n $name = $this->request->getParameter('reg-name');\n $username = $this->request->getParameter('reg-username');\n $password = $this->request->getParameter('reg-password');\n $credit = $this->request->getParameter('reg-creditCard');\n $accType = $this->request->getParameter('reg-acc-type');\n\n if (is_null($name) || strlen($name) == 0 ||\n is_null($username) || strlen($username) == 0 ||\n is_null($password) || strlen($password) == 0) {\n throw new InvalidArgumentException(\"Required form input missing. Either name, username, or password.\");\n }\n $usernameQueryStr_c = \"SELECT * FROM Customers WHERE Customer_Login = '$username'\";\n $usernameQueryResult = $this->dbProvider->selectQuery($usernameQueryStr_c);\n\n if (empty($usernameQueryResult)) {\n throw new EntityExistsException(\"User exists with username $username\");\n }\n\n $registerQueryStr_c = \"INSERT INTO Customers \" .\n \"(CreditCard, Customer_Login, Customer_Password, FirstName) \" .\n \"VALUE \" .\n \"('$credit', '$username', '$password', '$name') \";\n\n $created = $this->dbProvider->insertQuery($registerQueryStr_c);\n\n if (!$created) {\n throw new SQLException(\"Failed to create User with $name, $username, $password\");\n }\n }", "protected function generateCustomer(ObjectManager $manager, int $i): Customer\n {\n $firstName = $this->faker->firstName();\n $lastName = $this->faker->lastName();\n $email = $this->faker->email();\n $username = $this->faker->userName();\n\n if (0 === $i % 50 && $this->hasReference('customer-johndoe')) {\n return $this->getReference('customer-johndoe');\n }\n\n // Customer\n $customer = new Customer();\n $customer->setTitle(array_rand([BaseCustomer::TITLE_MLLE, BaseCustomer::TITLE_MME, BaseCustomer::TITLE_MR]));\n $customer->setFirstname($firstName);\n $customer->setLastname($lastName);\n $customer->setEmail($email);\n $customer->setBirthDate($this->faker->datetime());\n $customer->getBirthPlace($this->faker->city());\n $customer->setPhoneNumber($this->faker->phoneNumber());\n $customer->setMobileNumber($this->faker->phoneNumber());\n $customer->setFaxNumber($this->faker->phoneNumber());\n $customer->setLocale('fr');\n $customer->setIsFake(true);\n\n // Customer billing address\n $customerBillingAddress = new Address();\n $customerBillingAddress->setType(BaseAddress::TYPE_BILLING);\n $customerBillingAddress->setCustomer($customer);\n $customerBillingAddress->setCurrent(true);\n $customerBillingAddress->setName('My billing address');\n $customerBillingAddress->setFirstname($customer->getFirstname());\n $customerBillingAddress->setLastname($customer->getLastname());\n $customerBillingAddress->setAddress1($this->faker->address());\n $customerBillingAddress->setPostcode($this->faker->postcode());\n $customerBillingAddress->setCity($this->faker->city());\n $customerBillingAddress->setCountryCode(0 === $i % 50 ? 'FR' : $this->faker->countryCode());\n $customerBillingAddress->setPhone($this->faker->phoneNumber());\n\n // Customer contact address\n $customerContactAddress = new Address();\n $customerContactAddress->setType(BaseAddress::TYPE_CONTACT);\n $customerContactAddress->setCustomer($customer);\n $customerContactAddress->setCurrent(true);\n $customerContactAddress->setName('My contact address');\n $customerContactAddress->setFirstname($customer->getFirstname());\n $customerContactAddress->setLastname($customer->getLastname());\n $customerContactAddress->setAddress1($this->faker->address());\n $customerContactAddress->setPostcode($this->faker->postcode());\n $customerContactAddress->setCity($this->faker->city());\n $customerContactAddress->setCountryCode(0 === $i % 50 ? 'FR' : $this->faker->countryCode());\n $customerContactAddress->setPhone($customer->getPhoneNumber());\n\n // Customer delivery address\n $customerDeliveryAddress = new Address();\n $customerDeliveryAddress->setType(BaseAddress::TYPE_DELIVERY);\n $customerDeliveryAddress->setCustomer($customer);\n $customerDeliveryAddress->setCurrent(true);\n $customerDeliveryAddress->setName('My delivery address');\n $customerDeliveryAddress->setFirstname($customer->getFirstname());\n $customerDeliveryAddress->setLastname($customer->getLastname());\n $customerDeliveryAddress->setAddress1($this->faker->address());\n $customerDeliveryAddress->setPostcode($this->faker->postcode());\n $customerDeliveryAddress->setCity($this->faker->city());\n $customerDeliveryAddress->setCountryCode(0 === $i % 50 ? 'FR' : $this->faker->countryCode());\n $customerDeliveryAddress->setPhone($this->faker->phoneNumber());\n\n $customer->addAddress($customerBillingAddress);\n $customer->addAddress($customerContactAddress);\n $customer->addAddress($customerDeliveryAddress);\n\n // User\n if (0 === $i % 10) {\n $user = $this->getReference('user-johndoe');\n $this->setReference('customer-johndoe', $customer);\n } else {\n /** @var \\Sonata\\UserBundle\\Model\\User $user */\n $user = new User();\n $user->setUsername($i.'-'.$username);\n $user->setUsernameCanonical($i.'-'.$username);\n $user->setEmail($i.'_'.$email);\n $user->setEmailCanonical($email);\n $user->setPlainPassword('customer');\n }\n\n $customer->setUser($user);\n\n $manager->persist($customerBillingAddress);\n $manager->persist($customerContactAddress);\n $manager->persist($customerDeliveryAddress);\n $manager->persist($user);\n $manager->persist($customer);\n\n return $customer;\n }", "public function createCustomer()\n {\n if (is_null($this->network)) {\n throw new Exception(\"Network Type is required\", 1);\n }\n\n $res = $this->call('/customers/' . $this->network . '/create', 'POST');\n return Utils::jsonDecode($res->getBody());\n }", "public function create($customerId, $token)\n {\n $customer = $this->customer->get($customerId);\n $customer->update( ['card' => $token ]);\n\n $cards = $customer->cards([\n 'limit' => 1,\n 'order' => 'reverse_chronological'\n ]);\n\n return $cards['data'][0]; // card ID\n }", "public function getCustomer();", "public function getCustomer();", "public function getCustomer();", "public function getCustomer();", "public function getCustomer();", "public function create(IsChargable $customer);", "public function create() {\n $entity = new stdClass();\n $entity->type = 'canned_email';\n $entity->ceid = 0;\n $entity->name = '';\n $entity->email_subject = '';\n $entity->email_body = '';\n return $entity;\n }", "public function init()\n {\n return new Customer();\n }", "public function asStripeCustomer()\n {\n return StripeCustomer::retrieve($this->stripe_id, $this->getStripeKey());\n }", "public function newCustomer($action='new',$post, $array=false){\n\t\t$account_id = $this->account_id;\n\t\t$api_key = $this->api_key;\n\t\t$user_id = $this->user_id;\n\t\t\n\t\t$fields = array(\n\t\t\t'type'\t\t\t\t=> 'record_customer',\n\t\t\t'customer_action'\t=> $action,\n\t\t\t'user_id'\t\t\t=> $user_id,\n\t\t\t'user_password'\t\t=> $api_key,\n\t\t\t'account_id'\t\t=> $account_id\n\t\t);\n\t\tif(!empty($post['campaign_id'])) $fields['campaign_id'] = $post['campaign_id'];\n\t\tif(!empty($post['card_number'])) $fields['card_number'] = $post['card_number'];\n\t\tif(!empty($post['card_number_generate \t'])) $fields['card_number_generate \t'] = $post['card_number_generate \t'];\n\t\tif(!empty($post['code'])) $fields['code'] = $post['code'];\n\t\tif(!empty($post['first_name'])) $fields['first_name'] = $post['first_name'];\n\t\tif(!empty($post['last_name'])) $fields['last_name'] = $post['last_name'];\n\t\tif(!empty($post['phone'])) $fields['phone'] = $post['phone'];\n\t\tif(!empty($post['email'])) $fields['email'] = $post['email'];\n\t\tif(!empty($post['street1'])) $fields['street1'] = $post['street1'];\n\t\tif(!empty($post['street2'])) $fields['street2'] = $post['street2'];\n\t\tif(!empty($post['city'])) $fields['city'] = $post['city'];\n\t\tif(!empty($post['state'])) $fields['state'] = $post['state'];\n\t\tif(!empty($post['postal_code'])) $fields['postal_code'] = $post['postal_code'];\n\t\tif(!empty($post['country'])) $fields['country'] = $post['country'];\n\t\tif(!empty($post['customer_username'])) $fields['customer_username'] = $post['customer_username'];\n\t\tif(!empty($post['customer_password'])) $fields['customer_password'] = $post['customer_password'];\n\t\tif(!empty($post['customer_PIN'])) $fields['customer_PIN'] = $post['customer_PIN'];\n\t\tif(!empty($post['custom_field'])) $fields['custom_field'] = $post['custom_field'];\n\t\tif(!empty($post['custom_date'])) $fields['custom_date'] = date(\"Y-m-d\",strtotime($post['custom_date']));\n\t\tif(!empty($post['auto_add'])) $fields['auto_add'] = $post['auto_add'];\t\t\n\t\tif(!empty($post['send_no_email'])) $fields['send_no_email'] = $post['send_no_email'];\n\t\tif(!empty($post['custom_field_1'])) $fields['custom_field_1'] = $post['custom_field_1'];\n\t\tif(!empty($post['custom_field_2'])) $fields['custom_field_2'] = $post['custom_field_2'];\n\t\tif(!empty($post['custom_field_3'])) $fields['custom_field_3'] = $post['custom_field_3'];\n\t\tif(!empty($post['custom_field_4'])) $fields['custom_field_4'] = $post['custom_field_4'];\n\t\tif(!empty($post['custom_field_5'])) $fields['custom_field_5'] = $post['custom_field_5'];\n\t\tif(!empty($post['custom_field_6'])) $fields['custom_field_6'] = $post['custom_field_6'];\n\t\tif(!empty($post['custom_field_7'])) $fields['custom_field_7'] = $post['custom_field_7'];\n\t\tif(!empty($post['custom_field_8'])) $fields['custom_field_8'] = $post['custom_field_8'];\n\t\tif(!empty($post['custom_field_9'])) $fields['custom_field_9'] = $post['custom_field_9'];\n\t\tif(!empty($post['custom_field_10'])) $fields['custom_field_10'] = $post['custom_field_10'];\n\t\tif(!empty($post['custom_field_11'])) $fields['custom_field_11'] = $post['custom_field_11'];\n\t\tif(!empty($post['custom_field_12'])) $fields['custom_field_12'] = $post['custom_field_12'];\n\t\tif(!empty($post['custom_field_13'])) $fields['custom_field_13'] = $post['custom_field_13'];\n\t\tif(!empty($post['custom_field_14'])) $fields['custom_field_14'] = $post['custom_field_14'];\n\t\tif(!empty($post['custom_field_15'])) $fields['custom_field_15'] = $post['custom_field_15'];\n\t\tif(!empty($post['custom_field_16'])) $fields['custom_field_16'] = $post['custom_field_16'];\n\t\tif(!empty($post['custom_field_17'])) $fields['custom_field_17'] = $post['custom_field_17'];\n\t\tif(!empty($post['custom_field_18'])) $fields['custom_field_18'] = $post['custom_field_18'];\n\t\tif(!empty($post['custom_field_19'])) $fields['custom_field_19'] = $post['custom_field_19'];\n\t\tif(!empty($post['custom_field_20'])) $fields['custom_field_20'] = $post['custom_field_20'];\n\t\treturn $this->sendData($fields, $array);\n\t}", "public function getCustomerById($customer_id) {\n $sql = \"SElECT * FROM Customer WHERE CustomerNumber = :customer_id\";\n $stmt = $this->db->prepare($sql);\n $result = $stmt->execute([\"customer_id\" => $customer_id]);\n if($result) {\n return new CustomerEntity($stmt->fetch());\n }\n }", "public function create(CreateCustomer $request)\n {\n try{\n $customer = parent::create($request);\n return ['customerId'=>$customer];\n }catch (\\Exception $e){\n return response('Unspecified query error. Create is failed', 500);\n }\n\n }" ]
[ "0.6886373", "0.67268646", "0.6722692", "0.66463476", "0.6511998", "0.64800805", "0.6465181", "0.6453258", "0.6441092", "0.6408507", "0.6355243", "0.6333885", "0.6257776", "0.62542456", "0.6210157", "0.6184316", "0.6153257", "0.6123626", "0.6093799", "0.6093799", "0.6093799", "0.6093799", "0.6093799", "0.60687083", "0.6026929", "0.6014152", "0.60094404", "0.60079694", "0.5998109", "0.5982076" ]
0.6907941
0
Lists all flowers entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $flowers = $em->getRepository('AppBundle:flowers')->findAll(); return $this->render('flowers/index.html.twig', array( 'flowers' => $flowers, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('AcmeFmpsBundle:EnfantTiteur')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SsSsBundle:Orderer')->findAll();\n\n return $this->render('SsSsBundle:Orderer:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listEntities()\n {\n return $this->service->call(array(\n 'method' => 'glpi.listEntities'\n ));\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('CMSBundle:OurPartner')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getAll() {\n try {\n return $this->choferDao->getAll();\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('questionnaireQuestionnaireBundle:Caller')->findAll();\n\n return $this->render('questionnaireQuestionnaireBundle:Caller:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getEntityManager();\n $entities = $em->getRepository('EphpGestoriBundle:Gestore')->findAll();\n\n return array('entities' => $entities);\n }", "public function getAllAction()\n {\n $persistance = $this->get('persistance');\n try {\n $entities = $persistance->findTaskList();\n } \n catch (\\Google_Service_Exception $e)\n {\n return $this->redirect($this->generateUrl('connection_oauth'));\n }\n catch (\\Google_Auth_Exception $e)\n {\n return $this->redirect($this->generateUrl('connection_oauth'));\n }\n return $this->render('DidYouDoItBundle:TaskList:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listEntities(): array\n {\n return $this->entities;\n }", "public function getEntities() {\n $entities = $this->get('entities');\n return $entities;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $utilisateur = $this->container->get ( 'security.context' )->getToken ()->getUser();\n \n // $entities = $em->getRepository('JourEtMenuBundle:platDuJour')->findAll();\n $entities = $em->getRepository('JourEtMenuBundle:platDuJour')->byRestaurant($utilisateur);\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getHostelListings() {\n\n $hostels = Hostel::lists('name', 'id');\n $hostellistings = Hostel::paginate(10);\n\n $this->layout->title = 'Hostel Listings';\n $this->layout->main = View::make('pages.hostels')->with(array('hostels' => $hostels, 'hostellistings' => $hostellistings));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ProductBundle:Fries')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $auth_checker = $this->get('security.authorization_checker');\n $em = $this->getDoctrine()->getManager();\n\n if ($auth_checker->isGranted('ROLE_SUPER_ADMIN'))\n {\n $entities = $this->getDoctrine()->getRepository('BackendBundle:FeastStage')->findAll();\n } else {\n $token = $this->get('security.token_storage')->getToken();\n $user = $token->getUser();\n\n $entities = $this->getDoctrine()->getRepository('BackendBundle:FeastStage')->findInFestival($user->getFeast()->getId());\n }\n return $this->render('BackendBundle:FeastStage:index.html.twig', array(\"entities\" => $entities));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KCHotelBundle:Offer')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function entities(){\n }", "public function index() {\n $this->Entity->recursive = 1;\n\n $this->setSearch('Entity', array(\n 'nome' => 'Entity.name',\n 'email' => 'Entity.email',\n 'telefone' => 'Entity.phone',\n 'celular' => 'Entity.cellphone',\n 'endereço' => 'Entity.address',\n 'contact' => 'Entity.contact'\n ));\n\n $this->set('title', 'Módulos > Entidades');\n $this->set('entities', $this->paginate('Entity'));\n }", "public static function all()\n {\n return GetEntity::all( self::getTableName() );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $paginator = $this->get('knp_paginator');\n $page = $this->get('request')->query->get('page', 1);\n \n $entities = $em->getRepository('BirrolsBeerBundle:Beers')\n ->findAllViewByPage( $paginator, $page, 10, array(\n 'categoryIds' => array( 1, 2 ),\n 'abvMin' => 4,\n ) );\n \n $form = $this->createForm(new BeersSearchType());\n\n return $this->render('BirrolsBeerBundle:Beers:index.html.twig', array(\n 'entities' => $entities,\n 'form' => $form->createView(),\n// 'entities' => $entities->getItems(),\n// 'entities' => compact('pagination'),\n ));\n }", "public function allAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('TireBundle:Record')->findAll();\n\n return array(\n 'entities' => $entities,\n 'all' => 1\n );\n }", "public function getEntityList();", "public function getFlows()\n {\n return $this->flows;\n }", "public function index()\n {\n return FighterResource::collection(Fighter::all());\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DistrifilCuentaBundle:Cheque')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KermesseBundle:Sales')->findAll();\n\n return $this->render('KermesseBundle:Sales:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n \t$criteria = array();\n \t\n \t// TODO besser mit route /my filtern\n if (!$this->allowModification()) {\n \t$criteria['host'] = $this->getUser();\n }\n \n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('FogsInsightBundle:Offer')->findBy($criteria);\n \n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MinsalshcpBundle:ShcpInsCtlEnfermedad')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getEntities()\n {\n return $this->entities;\n }", "public function index()\n {\n $festivals = Festival::paginate(2);\n\n return FestivalResource::collection($festivals);\n }", "public function indexAction()\n {\n $transfers = $this->_helper->db->getTable('SharedShelfTransferRecord')->findAllTransfers();\n $this->view->transfers = $transfers;\n }" ]
[ "0.5662093", "0.56455666", "0.5631768", "0.5555523", "0.5547513", "0.55174077", "0.5505048", "0.54614496", "0.5459862", "0.54334724", "0.54160434", "0.54012686", "0.5389783", "0.5367288", "0.53634727", "0.5357305", "0.5353264", "0.5325458", "0.5298903", "0.5291203", "0.5285981", "0.5280586", "0.5277028", "0.5254138", "0.5238692", "0.5236237", "0.5223376", "0.52228767", "0.5221073", "0.52141464" ]
0.7092475
0
Creates a form to delete a flowers entity.
private function createDeleteForm(flowers $flower) { return $this->createFormBuilder() ->setAction($this->generateUrl('flowers_delete', array('id' => $flower->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm()\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('turnossede_delete', array('id' => '__obj_id__')))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm()\n {\n return $this->factory->createBuilder()\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(DayFeriee $dayFeriee)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dayferiee_delete', array('id' => $dayFeriee->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(FrigaEdital $frigaedital)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('edital_remover', array('uuid' => $frigaedital->getUuid())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Gestionstatus $gestionstatus)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gestionstatus_delete', array('id' => $gestionstatus->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function delete( Entity $form ) {\n\t}", "private function createDeleteForm(Transfert $transfert)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('transfert_delete', array('id' => $transfert->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ForfaitHorsFrais $forfaitHorsFrai)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('forfaithorsfrais_delete', array('id' => $forfaitHorsFrai->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Passager_Personnel $passager_Personnel)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_delete', array('id' => $passager_Personnel->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('presenters_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить представителя', 'attr' => array('class' => 'btn btn-default btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Ventes $vente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_ventes_delete', array('id' => $vente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Forest $forest)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('forest_delete', array('id' => $forest->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Policeofficer $policeofficer)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('policeofficer_delete', array('id' => $policeofficer->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Fournisseur $fournisseur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tontine_fournisseur_delete', array('id' => $fournisseur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(EfektMinisterialny $efektMinisterialny)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('efektministerialny_delete', array('id' => $efektMinisterialny->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Travail $travail)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fiche_chantier_delete', array('id' => $travail->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Revues $revue)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_revues_delete', array('id' => $revue->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ge_estudiante_delete', array('id' => $id)))\n ->setMethod('POST')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('slider_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'SUPPRIMER ',\n 'attr' => array('class' => 'btn btn-danger'),\n ))\n ->getForm()\n ;\n }", "private function createDeleteForm(Firmadet $firmadet)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('erantzunak_delete', array('id' => $firmadet->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caller_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr'=>array('class'=>'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Vestigingen $vestigingen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vestigingen_delete', array('id' => $vestigingen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "protected function createComponentDeleteForm() {\r\n $form = new Form;\r\n $form->addSubmit('cancel', 'Zrušit');\r\n $form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n $form->onSubmit[] = callback($this, 'deleteFormSubmitted');\r\n $form->addProtection('Odešlete prosím formulář znovu (bezpečnostní token vypršel).');\r\n return $form;\r\n }", "private function createDeleteForm(Vendeur $vendeur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vendeur_delete', array('id' => $vendeur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(RefN4ds $refN4ds) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('refn4ds_delete', array('idN4ds' => $refN4ds->getIdN4ds())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_estatservei_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Chef $chef)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('chef_delete', array('id' => $chef->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm(Deia $deium)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('deia_delete', array('id' => $deium->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }" ]
[ "0.7324832", "0.69200444", "0.682839", "0.6652479", "0.65787464", "0.65730524", "0.6572669", "0.65544605", "0.6552479", "0.65466994", "0.65432185", "0.64940274", "0.64251286", "0.63654536", "0.63561666", "0.635259", "0.6348642", "0.63467354", "0.6346554", "0.6333716", "0.6324209", "0.629678", "0.6295825", "0.62952197", "0.6288851", "0.6274576", "0.62718904", "0.62705886", "0.62566346", "0.6254572" ]
0.82528454
0
IDs of the contents to restore.
public function getContentIds() : array { return $this->contentIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bulk_restore() {\n\t\t\tglobal $wpsmush_db, $wpsmush_backup;\n\t\t\t$smushed_attachments = ! empty( $this->smushed_attachments ) ? $this->smushed_attachments : $wpsmush_db->smushed_count( true );\n\t\t\tforeach ( $smushed_attachments as $attachment ) {\n\t\t\t\t$wpsmush_backup->restore_image( $attachment->attachment_id, false );\n\t\t\t}\n\t\t}", "public function getMenuId()\n {\n return [$this->getResourceName()];\n }", "function &getIdentifierIds()\n\t{\n\t\tinclude_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';\n\n\t\treturn ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');\n\t}", "abstract public function restore();", "public function restoreValues()\n {\n return $this->setItemValues($this->getStorage()->get());\n }", "public function ids()\n\t{\n\t\treturn $this->_ids;\n\t\t\n\t}", "public function restore($id);", "function restore();", "public function getIds()\n {\n return $this->Ids;\n }", "public function getIdentifiers(): array\n {\n\n return array_keys( $this->_data );\n\n }", "private function get_undeclared_parent_ids()\n { $ids = array();\n $url = CONTENT_RESOURCE_LOCAL_PATH . \"26_files/\" . $this->resource_id . \"_undefined_parent_ids_archive.txt\";\n if(file_exists($url)) {\n foreach(new FileIterator($url) as $line_number => $id) $ids[$id] = '';\n }\n return array_keys($ids);\n }", "public function getIds()\n {\n return $this->ids;\n }", "public function getIds()\n {\n return $this->ids;\n }", "public function getIds()\n {\n return $this->ids;\n }", "public function getIds()\n {\n return $this->ids;\n }", "public function isIdSaved()\n {\n // set up an empty array\n $idList = array();\n\n if (! $this->_item)\n {\n $this->_getItem();\n }\n\n $savedIds = json_decode($this->_item->eventbrite_ids);\n\n if ($savedIds)\n {\n // update array\n $idList = $savedIds;\n }\n\n return $idList;\n }", "public function getObjectIdentifiers(): array;", "public function ids()\n {\n return array_keys($this->urls());\n }", "public function getIds();", "function readIds() \n\t{\n\t\t$count = count($_POST);//how many post objects?\n\t\t$ids = array(); \n\t\t//echo $count.'<br>';\n\t\tfor ($i = 0; $i < $count; $i++) \n\t\t{\n\t\t\tarray_push($ids,$_POST[\"identifiers\".$i]);\n\t\t}\n\t\treturn $ids;\n\t}", "public function getImagesId()\n {\n $ids = array();\n foreach ($this->images as $image) {\n $ids[] = $image->getId();\n }\n return $ids;\n }", "public function getIdentifiers()\n {\n return $this->identifiers;\n }", "public function getIds(): array\n {\n return $this->ids;\n }", "public function getIdentifiers() {\n return $this->identifiers;\n }", "public function getIdentifiers() {\n return $this->identifiers;\n }", "public function getIdentifiers() {\n return $this->identifiers;\n }", "function getId()\n {\n return $this->_reaktorfile->getId();\n }", "public function ids(): array;", "public function getObjectsIds(): array\n {\n return $this->objectsIds;\n }", "public function getIds(): array;" ]
[ "0.56817", "0.554982", "0.55264133", "0.5493606", "0.54819643", "0.54697895", "0.5428067", "0.54194057", "0.53679407", "0.5343744", "0.53185576", "0.53087294", "0.53087294", "0.53087294", "0.53087294", "0.53036", "0.52867436", "0.5286714", "0.52854884", "0.5239302", "0.5225434", "0.5219912", "0.52129745", "0.5201199", "0.5201199", "0.5201199", "0.5162431", "0.5111872", "0.5101097", "0.50898784" ]
0.58385295
0
Store a newly created Division in storage.
public function store(CreateDivisionRequest $request) { $input = $request->all(); $division = $this->divisionRepository->create($input); Flash::success('Division saved successfully.'); return redirect(route('divisions.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n try {\n $division = Division::create($request->all());\n return $this->respondCreated($division);\n } catch (QueryException $e) {\n if ($e->errorInfo[1] === 1062) {\n $message = 'A division with that name already exists.';\n $meta = [\n 'action' => 'DivisionController@store',\n 'info' => 'Creating division named: ' . $request->input('name')\n ];\n $this->logger->log('info', $e->getMessage(), ['exception' => $e, 'meta' => $meta]);\n return $this->respondDuplicateEntry($message);\n }\n } catch (Throwable $t) {\n $meta = ['action' => 'DivisionController@store'];\n $this->logger->log('critical', $t->getMessage(), ['exception' => $t, 'meta' => $meta]);\n return $this->respondWithError();\n }\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|unique:divisions,name',\n 'priority' => 'required',\n ]);\n \n $divisions = new Division();\n $divisions->name = $request->name;\n $divisions->priority = $request->priority;\n $divisions->save();\n return redirect()->route('divisions.create')->with('toast_success', 'A New Division Added Successfully');\n }", "public function store(Request $request)\n {\n $validasi = Validator::make($request->all(), Division::validasi());\n if ($validasi->fails()) return back()\n ->withInput()\n ->withErrors($validasi);\n // if valid\n Division::create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'is_active' => $request->is_active\n ]);\n\n return redirect('/division');\n }", "public function store(Request $request)\n {\n $division = request()->validate([\n 'gender_id' => 'required|integer',\n 'level_id' => 'required|integer',\n 'name' => 'nullable|string',\n ]);\n\n $division = Division::create($division);\n\n return $division->load('gender', 'level');\n }", "public function store(CreateSubdivisionRequest $request)\n {\n $input = $request->all();\n\n $subdivision = $this->subdivisionRepository->create($input);\n\n Flash::success('Subdivision saved successfully.');\n\n return redirect(route('subdivisions.index'));\n }", "public function store(Request $request)\n {\n $departement = new Division; \n $departement->div_description = $request->div_description;\n $departement->div_initial = $request->div_initial;\n\n $departement->save();\n\n return redirect('admin/divisions')->with('status', 'Employee added!');\n \n }", "public function store(Request $request)\n {\n $inputs = $request->all();\n\n $validator = \\Validator::make($inputs, array('NAME'=>'required'));\n\n if ($validator -> fails()) {\n return Redirect() -> back() -> withErrors($validator) -> withInput();\n }\n\n $division = new Division();\n $division->fill($inputs)->save();\n\n return Redirect() -> to('division') -> with('msg_success', 'Division Successfully Created');\n }", "public function store()\n {\n $this->storage->set($this);\n\n }", "public function store(Request $request)\n {\n $divide = $request->isMethod('put') ? Divide::findOrFail \n ($request->id) : new Divide;\n\n $divide->id = $request->input('id');\n $divide->name = $request->input('name');\n\n if($request->hasFile('image')) {\n if($divide->img){ \n File::delete(public_path('image/') . $divide->img); \n }\n\n $image = $request->file('image');\n\n $filename = $divide->name . '-' . time() . '.' . $image->getClientOriginalExtension();\n \n $image_path = public_path('image/'.$filename);\n \n Image::make($image)->resize(325, 250)->save($image_path); \n\n $divide->img = $filename;\n }\n\n if($divide->save()) {\n return new DivideResource($divide);\n }\n }", "public function store()\n {\n // store the object itself\n parent::store();\n \n // delete the related EnqueteMorador objects\n $criteria = new TCriteria;\n $criteria->add(new TFilter('enquete_id', '=', $this->id));\n $repository = new TRepository('EnqueteMorador');\n $repository->delete($criteria);\n // store the related EnqueteMorador objects\n if ($this->moradors)\n {\n foreach ($this->moradors as $morador)\n {\n $enquete_morador = new EnqueteMorador;\n $enquete_morador->morador_id = $morador->id;\n $enquete_morador->enquete_id = $this->id;\n $enquete_morador->store();\n }\n }\n }", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n {\n $validator = Validator::make($data = Input::all(), OrganizationUnit::$rules['store']);\n if (!OrganizationUnit::canCreate()) {\n return $this->_access_denied();\n }\n if ($validator->fails()) {\n return $this->_validation_error($validator->messages());\n }\n $organizationunit = OrganizationUnit::create($data);\n if (!isset($organizationunit->id)) {\n return $this->_create_error();\n }\n $parent = OrganizationUnit::findOrFail($data['parent_id']);\n $organizationunit->makeChildOf($parent);\n $parent->touch();\n if (Request::ajax()) {\n return Response::json($organizationunit->toJson(), 201);\n }\n return Redirect::route('organizationunits.index')\n ->with('notification:success', $this->created_message);\n }", "public function store()\n\t{\n\t\t// \n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.67471176", "0.663556", "0.6466313", "0.6451681", "0.63819766", "0.6326075", "0.6088097", "0.60589767", "0.60099185", "0.58327955", "0.57413214", "0.5711762", "0.56886226", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009", "0.5683009" ]
0.74102575
0
Parses the entry's contents.
private function parseContentsFromEntry() { $this->content = Splunk_AtomFeed::parseValueInside($this->entry->content); $this->loaded = TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parseContent() {\n\t\t$this->convertBibSpecialChars();\n\t\t$this->normalizeContent();\n\n\t\t// get entries\n\t\t$objects = preg_split(\"/\\\\@([\\\\w]*)/uix\", $this->getFileContent(), null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n\t\tif (in_array($objects[0], self::$ignored_keywords)) {\n\t\t\t$objects = array_splice($objects, 2);\n\t\t}\n\t\t// some files lead to a empty first entry in the array with the fist bib-entry, we have to trow them away...\n\t\tif (strlen($objects[0]) <= 3) {\n\t\t\t$objects = array_splice($objects, 1);\n\t\t}\n\n\t\t$entries = array();\n\t\tforeach ($objects as $key => $object) {\n\t\t\tif ((int)$key % 2 == 0 || (int)$key == 0) {\n\t\t\t\t$entry = array();\n\t\t\t\t$entry['entryType'] = strtolower($object);\n\t\t\t} else {\n\t\t\t\t// Citation\n\t\t\t\tpreg_match(\"/^{(?<cite>.*),\\\\n/um\", $object, $cite_matches);\n\t\t\t\tif ($cite_matches['cite']) {\n\t\t\t\t\t$entry['cite'] = $cite_matches['cite'];\n\t\t\t\t}\n\n\t\t\t\t// Edit at regex101.com: (?<attr>[\\w]*)\\s*=\\s*[{\"]*(?<content>(.*?))\\s*[}\"]*?\\s*[,]*?\\s*\\n\n\t\t\t\t$re = \"/(?<attr>[\\\\w]*)\\\\s*=\\\\s*[{\\\"]*(?<content>(.*?))\\\\s*[}\\\"]*?\\\\s*[,]*?\\\\s*\\\\n/\";\n\n\t\t\t\tpreg_match_all($re, $object, $matches, PREG_SET_ORDER);\n\n\t\t\t\tforeach ($matches as $match) {\n\t\t\t\t\t$clean = $match['content'];\n\t\t\t\t\t$clean = preg_replace(\"/[\\\", \\\\t\\\\s]*\\\\n/u\", \"\\n\", $clean);\n\n\t\t\t\t\t$entry[strtolower($match['attr'])] = $clean;\n\t\t\t\t}\n\n\t\t\t\t$entries[] = $entry;\n\t\t\t}\n\t\t}\n\n\t\treturn $entries;\n\t}", "protected function parseEntry()\n {\n $this->host = $this->parseHost();\n $this->user = $this->parseUser();\n $this->queryTime = $this->parseQueryTime();\n $this->lockTime = $this->parseLockTime();\n $this->rowsSent = $this->parseRowsSent();\n $this->rowsExamined = $this->parseRowsExamined();\n\n //fourth line time stamp\n $this->datetimestemp = $this->parseTimestamp();\n $this->time = $this->parseTime();\n\n //final line - the query itself\n $this->query = $this->parseQuery();\n $this->FileCall = $this->parseFile();\n }", "protected function setEntries(): void\n {\n $entries = (new Parser)->parse($this->content);\n $this->entries = [];\n foreach ($entries as $entry) {\n $this->entries[$entry->getName()] = $entry->getValue()->get()->getChars();\n }\n }", "function parse(&$contents)\r\n\t{\r\n\t\t$this->nocache = 0;\r\n\t\t$pieces = preg_split('/'.$this->delim.'/',$contents);\r\n\t\t$maxidx = sizeof($pieces);\r\n\r\n\t\tfor ($idx = 0;$idx<$maxidx;$idx++) {\r\n\t\t\techo $pieces[$idx];\r\n\t\t\t$idx++;\r\n\t\t\t$this->doAction($pieces[$idx]);\r\n\t\t}\r\n\t}", "public function extractFromString($contents);", "function get_entries( $process_comment_func= NULL ) {\n\t\t\tset_magic_quotes_runtime(0);\n\t\n\t\t\t$doing_entry = false;\n\t\t\t$is_echo_file = false;\n\t\n\t\t\t$fp = $this->fopen($this->file, 'r');\n\t\t\tif ($fp) {\n\t\t\t\twhile ( !$this->feof($fp) ) {\n\t\t\t\t\t$importline = rtrim($this->fgets($fp));\n\t\n\t\t\t\t\t// this doesn't check that the file is perfectly valid but will at least confirm that it's not the wrong format altogether\n\t\t\t\t\tif ( !$is_echo_file && strpos( $importline , 'jskit:attribute' ) )\n\t\t\t\t\t\t$is_echo_file = true;\n\t\n\t\t\t\t\t// Are we starting a new item?\n\t\t\t\t\tif ( false !== strpos($importline, '<item>') ) {\n\t\t\t\t\t\t$this->post = '';\n\t\t\t\t\t\t$doing_entry = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Are we closing the current item\n\t\t\t\t\tif ( false !== strpos($importline, '</item>') ) {\n\t\t\t\t\t\t$doing_entry = false;\n\t\t\t\t\t\t// Count or process the comment\n\t\t\t\t\t\tif ( $process_comment_func )\n\t\t\t\t\t\t\tcall_user_func( $process_comment_func, $this->post );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If we're in the middle of a post\n\t\t\t\t\tif ( $doing_entry ) {\n\t\t\t\t\t\t$this->post .= $importline . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t$this->fclose($fp);\n\t\t\t}\n\t\n\t\t\treturn $is_echo_file;\n\t\n\t\t}", "protected function parseContents(array $contents)\n {\n }", "public function parse($contents)\n {\n $contents = $this->parsePreProcess($contents);\n $contents = parse_ini_string($contents, true);\n $contents = $this->parsePostProcess($contents);\n return $contents;\n }", "function parse() {\n\n\t\t$first_lele = strpos($this->data, $this->LE.$this->LE);\n\t\t$header_block = trim(substr($this->data, 0, $first_lele));\n\t\t$body_block = trim(substr($this->data, $first_lele));\n\n\t\t$this->readHeaders($header_block);\n\t\t$this->readBody($body_block);\n\t}", "public function read()\n {\n // traverse through all items\n foreach ($this->xml->entry as $item) {\n $this->data[] = array(\n 'title' => (string)$item->title,\n 'description' => (string)$item->summary,\n 'category' => $this->get_categories($item),\n 'guid' => $this->get_guid($item),\n // No images in atom feeds, but search in content\n 'image' => $this->get_image($item),\n 'link' => $this->get_link($item),\n 'date' => $this->get_date($item),\n 'content' => (string)$item->content\n );\n }\n }", "function parseProjectFile($url)\n {\n $handle = fopen($url, 'r');\n if (!$handle) { return null; }\n\n $entries = array();\n\n $entry = new Entry();\n $n_entries = 0;\n while ($line = fgets($handle))\n {\n if ($line == \"\\n\")\n {\n $entries[$n_entries] = $entry;\n $n_entries++;\n $entry = new Entry();\n } else {\n $parts = explode(\": \", rtrim($line));\n\n switch($parts[0])\n {\n case \"name\":\n $entry->name = $parts[1];\n break;\n\n case \"big\":\n $entry->big = $parts[1]==\"true\"?True:False;\n break;\n\n case \"screenshots\":\n $entry->screenshots = explode(\", \", $parts[1]);\n break;\n\n case \"video\":\n $entry->videos = explode(\", \", $parts[1]);\n break;\n\n case \"description\":\n case \"description:\":\n case \"description: \":\n $desc = \"\";\n\n while (($subline = rtrim(fgets($handle))) != \"!description_end\" && $subline != \"\")\n {\n $desc = $desc . $subline;\n }\n\n $entry->description = $desc;\n break;\n\n case \"link\":\n $link_parts = explode(\" \", $parts[1], 2);\n $link = new LinkEntry();\n $link->href = $link_parts[0];\n $link->description = $link_parts[1];\n $entry->links[count($entry->links)] = $link;\n break;\n\n case \"id\":\n $entry->id = $parts[1];\n break;\n\n case \"thumbnail\":\n $entry->thumbnail = $parts[1];\n break;\n }\n }\n }\n\n if ($entry->id != \"\")\n {\n $entries[$n_entries] = $entry; \n }\n\n fclose($handle);\n return $entries;\n }", "public function parse();", "public function parse();", "public function parse();", "public function parse();", "public function parseResults() {\n\t\t\tif ($this->response) {\n\t\t\t\t$entries = array();\n\t\t\t\t$requiredRegex = !empty($this->requiredTerms) ? implode('|', $this->requiredTerms) : false;\n\t\t\t\t$rejectRegex = !empty($this->rejectTerms) ? implode('|', $this->rejectTerms) : false;\n\t\t\t\t$paths = $this->paths;\n\t\t\t\tunset($paths['entry']);\n\t\t\t\tforeach ($this->response->{$this->paths['entry']} as $entry) {\n\t\t\t\t\t$currentEntry = array();\n\t\t\t\t\tforeach ($paths as $element => $path) {\n\t\t\t\t\t\tif ($path) {\n\t\t\t\t\t\t\t$node = $entry;\n\t\t\t\t\t\t\t$nodes = explode('->', $path);\n\t\t\t\t\t\t\tforeach ($nodes as $location) {\n\t\t\t\t\t\t\t\t$node = $node->{$location};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$currentEntry[$element] = (string) $node;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$currentEntry[$element] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$allContent = implode(' ', $currentEntry);\n\t\t\t\t\tif ($requiredRegex) {\n\t\t\t\t\t\tpreg_match('/'.$requiredRegex.'/i', $allContent, $require);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$require = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($rejectRegex) {\n\t\t\t\t\t\tpreg_match('/'.$rejectRegex.'/i', $allContent, $reject);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$reject = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($require) && empty($reject)) {\n\t\t\t\t\t\t$currentEntry['postTitle'] = substr($currentEntry['postTitle'], 0, 255);\n\t\t\t\t\t\t$currentEntry['description'] = substr($currentEntry['description'], 0, 255);\n\t\t\t\t\t\t$entries[] = $currentEntry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $entries;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "function parseContent()\n{\n global $app;\n\n for($i = 0; $i < count($this->items); $i++) {\n if ($this->items[$i]['visible']) {\n $this->items[$i]['TextList'] = $app->parseChunk($this->items[$i]['TextList']);\n }\n if ($this->items[$i]['showit']) {\n $this->items[$i]['TextChunk'] = $app->parseChunk($this->items[$i]['TextChunk']);\n $this->items[$i]['TextFooter'] = $app->parseChunk($this->items[$i]['TextFooter']);\n // Set the main variable for this item since we're showing it.\n $this->dispItem = $this->items[$i];\n }\n }\n // Now, get the children of the displayed item, if any.\n for($i = 0; $i < count($this->items); $i++) {\n if ($this->items[$i]['ParentID'] == $this->dispItem['CatConID']) {\n array_push($this->dispChildren, $this->items[$i]);\n }\n }\n}", "public function testParsesEntryFile() {\n\t\t$this->assertEquals(2,\n\t\t\t$this->program->files[$this->file]->getStatementCount());\n\t}", "function getEntry() {\n \n $titles = $this->_getDecodedTitles();\n\n if (! isset($titles[$this->uriRequest])) {\n $this->_printError('The URI does not correspond to an item in the TOC file');\n return false;\n }\n\n $blog = new stdClass; \n $blog->filename = $this->uriRequest;\n\n foreach ($titles[$this->uriRequest] as $key => $val) {\n $blog->$key = $val;\n }\n\n $blog->body = file_get_contents($this->_getRequestPath());\n return $blog;\n }", "public function getEntry();", "public function getEntry();", "protected function parseEntry($entry)\n {\n if (!get_property($entry, 'url')) {\n throw new \\InvalidArgumentException('Url is missing or not accessible.');\n }\n $url = get_property($entry, 'url');\n $lastmod = get_property($entry, 'lastmod');\n $changefreq = get_property($entry, 'changefreq');\n $priority = get_property($entry, 'priority');\n\n return [$url, $lastmod, $changefreq, $priority];\n }", "protected function parse()\n {\n $this->parseNote(['usage_period_note', 'usage_area_note', 'note']);\n }", "protected function parseContent()\n {\n $data = [];\n if ($this->IsFormEncoded()) {\n parse_str($this->getContent(), $data);\n }\n\n if ($this->isJson()) {\n $data = json_decode($this->getContent(), true);\n }\n\n return $data;\n }", "function parse() {}", "abstract public function parse();", "protected function parseTree() {\n $this->fileId = Reader::unpackLong( substr( $this->deserialized, $this->ReaderOffset, 8 ) );\n $this->ReaderOffset += 8;\n\n $this->pageIndex = Reader::unpackLong( substr( $this->deserialized, $this->ReaderOffset, 8 ) );\n $this->ReaderOffset += 8;\n\n $this->pageOffset = Reader::unpackInt( substr( $this->deserialized, $this->ReaderOffset, 4 ) );\n $this->ReaderOffset += 4;\n\n $this->size = Reader::unpackInt( substr( $this->deserialized, $this->ReaderOffset, 4 ) );\n $this->ReaderOffset += 4;\n\n $this->changeSize = Reader::unpackInt( substr( $this->deserialized, $this->ReaderOffset, 4 ) );\n $this->ReaderOffset += 4;\n }", "function parse()\n {\n $lines = explode(\"\\n\", $this->wiki->source);\n\n $this->wiki->source = '';\n\n foreach ($lines as $line) {\n $this->wiki->source .= $this->process($line) . \"\\n\";\n }\n $this->wiki->source = substr($this->wiki->source, 0, -1);\n }", "public function parseContent()\n {\n if (!empty($this->content)) {\n if (strpos($this->content, '[') !== false || strpos($this->content, '{') !== false) {\n return DoxterShortcodeParser::instance()->parse($this->content);\n }\n\n return $this->content;\n }\n }", "private function parse(){\n\t\t$patterns = [\n\t\t\t\"title\"\t \t=> '_<!\\[LOG\\[(.*)\\]LOG\\]!>_',\n\t\t\t\"time\"\t \t=> '_time=\"([^\"]*)\"_',\n\t\t\t\"date\"\t \t=> '_date=\"([^\"]*)\"_',\n\t\t\t\"component\"\t=> '_component=\"([^\"]*)\"_',\n\t\t\t\"context\"\t=> '_context=\"([^\"]*)\"_',\n\t\t\t\"type\"\t \t=> '_type=\"([^\"]*)\"_',\n\t\t\t\"thread\"\t=> '_thread=\"([^\"]*)\"_',\n\t\t\t\"file\"\t \t=> '_file=\"([^\"]*)\">_'\n\t\t];\n\t\tforeach($patterns as $name => $pattern){\n\t\t\t$matches = [];\n\t\t\tpreg_match($pattern, $this->line, $matches);\n\t\t\tif(isset($matches[1])){\n\t\t\t\t$this->properties->{$name} = $matches[1];\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7079738", "0.69268316", "0.59644544", "0.5962179", "0.59155786", "0.5856553", "0.5781771", "0.567778", "0.5677239", "0.5607316", "0.56065077", "0.5535262", "0.5535262", "0.5535262", "0.5535262", "0.5461952", "0.54268014", "0.54097694", "0.54022753", "0.53552043", "0.53552043", "0.5337991", "0.53292584", "0.53035265", "0.52835524", "0.5259827", "0.52572066", "0.5221534", "0.5203139", "0.5156222" ]
0.8526478
0
Gets the nonwildcarded namespace in which this entity resides.
public function getNamespace() { // If this is an entity reference with an exact namespace, return it. if (!$this->loaded) { $effectiveNamespace = $this->namespace; if ($effectiveNamespace === NULL) $effectiveNamespace = $this->service->getNamespace(); if ($effectiveNamespace->isExact()) return $effectiveNamespace; } // Extract the namespace from this entity's content. $acl = $this['eai:acl']; return Splunk_Namespace::createExact( $acl['owner'], $acl['app'], $acl['sharing']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNamespace()\n {\n return trim($this->namespace, \"\\\\\");\n }", "public function get_namespace() {\r\n\t\treturn $this->namespace;\r\n\t}", "public function getNamespace(): string\n {\n return $this->_namespace;\n }", "public function getNamespace()\n {\n return $this->namespaces ? implode('\\\\', $this->namespaces) : null;\n }", "public function getNamespace() : string {\n return $this->ns;\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return '';\n }", "public function getContainerNamespace();", "public function getNamespace()\n {\n return $this->getAttribute('metadata.namespace', static::$defaultNamespace);\n }", "public function getNamespaceName()\n {\n if ( ( $pos = strrpos( $this->_name, '\\\\' ) ) === false )\n {\n return '';\n }\n return substr( $this->_name, 0, $pos );\n }", "public function getNamespace(): ?string\n {\n return $this->namespaceURI;\n }", "protected function getGroupNamespace()\n\t{\n\t\treturn Arr::get($this->currentGroup(), 'namespace', '');\n\t}", "public function getNamespace()\n {\n return implode('\\\\', array_slice(explode('\\\\', get_class($this)), 0, -1));\n }", "public function getNamespaceName()\n {\n return $this->_namespace;\n }", "public function getNamespaceName()\n {\n return $this->_namespace;\n }", "protected function getNamespace()\n\t{\n\t\treturn $this->nameSpace;\t\t\n\t}", "protected function _getNamespace()\n {\n return $this->getSession()->getNamespace();\n }", "public function getNamespace()\n {\n return $this->_namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace() {\n return $this->namespace;\n }", "public function getNamespace(): ?string\n {\n return $this->namespace ?? null;\n }", "public static function getNamespace()\n {\n return static::$namespace;\n }", "public function getNamespace(): string\n {\n return '';\n }", "public function getNamespace(): string\n {\n return '';\n }" ]
[ "0.70502883", "0.69738054", "0.6912357", "0.6909458", "0.6899215", "0.6870902", "0.68543345", "0.6811992", "0.680614", "0.6803906", "0.6802745", "0.68025655", "0.68017435", "0.679418", "0.679418", "0.6769153", "0.67609274", "0.6752766", "0.6732762", "0.6732762", "0.6732762", "0.6732762", "0.6732762", "0.6732762", "0.6732762", "0.6725301", "0.6720176", "0.6711582", "0.6707341", "0.6707341" ]
0.7365772
0
/ check the vals if there is save id it add save_id to end of url by get to make it accessible outside plugin by key if there is save_id dont add again it work for first and other steps
function sst_send_save_id_to_next_page($action,$vals=NULL,$save_id=NULL){//used only for post method if(!isset($_GET['save_id'])){ $has_action_get = count(explode('?',$action)); if($has_action_get<=1){ $has_action_get=false; }else{ $has_action_get=true; } if($vals['save_id']){ if(!empty($action)){ if($has_action_get){ $action = $action.'&save_id='.$vals['save_id']; }else{ $action = $action.'?save_id='.$vals['save_id']; } } }elseif($save_id){ if(!empty($action)){ if($has_action_get){ $action = $action.'&save_id='.$save_id; }else{ $action = $action.'?save_id='.$save_id; } } } } return $action; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveUrl()\n {\n //Get All the job urls for Gaijinpot\n $this->_getJobURL($this->sGaijinpotURL,$this->sGjURL,$this->sContainer,$this->sPgContainer,$this->nWebsitePk);\n return true;\n }", "function save_process_post(){\n\t\t/**\n\t\t * new is true for insert operation , false for update operation\n\t\t * @var boolean\n\t\t */\n\t\t$nuevo = $this->post('new');\n\t\t/**\n\t\t * agenda id selected in agenda dropdown\n\t\t * @var integer\n\t\t */\n\t\t$agenda = $this->post('agenda_id');\n\t\t/**\n\t\t * code for procedure\n\t\t * @var string\n\t\t */\n\t\t$codigo = $this->post('codigo');\n\t\t/**\n\t\t * procedure name \n\t\t * @var string\n\t\t */\n\t\t$nombre = $this->post('name_of_the_procedure');\n\t\t/**\n\t\t * [mediagenda].[MUTUAS] id is fetched here not [mediagenda].[ORIGEN_MUTUAS]\n\t\t * @var integer\n\t\t */\n\t\t$mutua = $this->post('mutual_id');\n\t\t/**\n\t\t * Privado is true if no insurance company value is selected but insurance is required \n\t\t * @var boolean\n\t\t */\n\t\t$privat = $this->post('private');\n\t\t/**\n\t\t * by default it sets to true\n\t\t * @var boolean\n\t\t */\n\t\t$qx = $this->post('qx');\n\t\t/**\n\t\t * rate of procedure\n\t\t * @var [type]\n\t\t */\n\t\t$tarifa = $this->post('rate');\n\t\t/**\n\t\t * it is by default false\n\t\t * @var boolean\n\t\t */\n\t\t$cma = $this->post('cma');\n\t\t/**\n\t\t * it is by default false\n\t\t * @var boolean\n\t\t */\n\t\t$ucias = $this->post('ucias');\n\t\t/**\n\t\t * assistant value is from scheduled patient assistant dropdown , default 0\n\t\t * @var integer\n\t\t */\n\t\t$ayudante = ($this->post('ayudante')!='')?$this->post('ayudante'):'0';\n\t\n\t\t/**\n\t\t * value of ayudante if ayudante checkbox is check, this is availabel only in scheduled patient section in clinical history\n\t\t * @var float\n\t\t */\n\t\t$perayuda = $this->post('perayuda');\n\t\t/**\n\t\t * default value is null\n\t\t * @var null\n\t\t */\n\t\t$id = 0;\n\t\tif($this->post('id')){\n\t\t\t$new = false; $id = $this->post('id');\n\t\t}\n\t\t$params = array('nuevo'=>$nuevo,'agenda'=>$agenda, 'codigo'=> $codigo,'nombre'\t=> $nombre, 'mutua' => $mutua, 'privat' => $privat, 'qx' => $qx, 'tarifa' => $tarifa, 'cma' => $cma, 'ucias' => $ucias, 'ayudante' => $ayudante, 'perayuda' => $perayuda,'id'=>$id\n\t\t\t);\n\t\t$success = $this->Common_model->execute_sp(\n\t\t\tarray(\n\t\t\t\t'sp_name'=>'mediagenda.actos_grabar_qx',\n\t\t\t\t'params' => $params,'db_name' =>'default','return_type' => 'row-array'));\t\t\n\t\tif(!isset($success['code'])){\n\t\t\t$message = \"Process saved sucessfully\";\n\t\t\t//$return_data_array['actos'] = $this->list_process_post(true);\n\t\t\techo returnJsonResponse($message,true);\n\t\t}else{\n\t\t\t$message = $success['message'];\n\n\t\t\techo returnJsonResponse($message,false);\n\t\t}\n\t\t\n\t\t\n\t}", "public final function onBeforeSave()\r\n {\r\n if ($this->getName_En() !== false) {\r\n\t\t\t$this->setUrlKey(\\Core\\Net\\Url::makeUrlFriendlytext($this->getName_En()));\r\n }\r\n }", "protected function _getSaveAndContinueUrl()\n {\n return $this->getUrl('lofhelpdesk/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '{{tab_id}}']);\n }", "function saveParams($data=1) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->data_source)) {\n $p[\"data_source\"]=$this->data_source;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function save_custom_url( $post_id ) {\n global $post; \n\n if( $_POST ) {\n update_post_meta( $post->ID, 'urllink', $_POST['siteurl'] );\n update_post_meta( $post->ID, 'urldesc', $_POST['urldesc'] );\n }\n}", "function action_save()\n\t{\n\t\tif (isset($_POST['id']) && $_POST['id']>0){\n\t\t\t$data = $this->postCURL('/'.$_POST['id'].'/update', $_POST, 'POST');\n\t\t}\n\t\telse {\n\t\t\t$data = $this->postCURL('', $_POST, 'POST');\n\t\t}\n\t\t$data = json_decode($data, true);\n\t\tif (isset($data['post_result']) && ($data['post_result'] == 'error_add' || $data['post_result'] == 'error_edit')){\n\t\t\t$this->view->generate('add_view.php', 'template_view.php', $data);\n\t\t}\n\t\telse\n\t\t\theader('Location:/');\n\t}", "function saveParams($data=1) {\r\n $data=array();\r\n if (IsSet($this->id)) {\r\n $data[\"id\"]=$this->id;\r\n }\r\n if (IsSet($this->view_mode)) {\r\n $data[\"view_mode\"]=$this->view_mode;\r\n }\r\n if (IsSet($this->edit_mode)) {\r\n $data[\"edit_mode\"]=$this->edit_mode;\r\n }\r\n if (IsSet($this->tab)) {\r\n $data[\"tab\"]=$this->tab;\r\n }\r\n return parent::saveParams($data);\r\n}", "public function saveAfterRegister(){\n $status = (isset($_GET['status']) ? $_GET['status'] : '');\n $license_key = (isset($_GET['key']) ? $_GET['key'] : '');\n $instance_arr = (isset($_GET['iid']) ? $_GET['iid'] : '');\n \n $iid = $instance_arr['iid'];\n $iname = $instance_arr['name'];\n $ilocked = $instance_arr['locked'];\n \n $config = \\Drupal::service('config.factory')->getEditable('siteattention.settings');\n $config->set('siteattention.SA_KEY', $license_key);\n $config->set('siteattention.SA_INAME', $iname);\n $config->set('siteattention.SA_IID', $iid);\n $config->set('siteattention.SA_ILOCKED', $ilocked);\n $config->save();\n $response_array = array(\n 'success'=> 1,\n 'data' => 'Settings value saved'\n );\n return new JsonResponse($response_array);\n }", "function yab_shop_prefs_save()\n{\n\t$post = doSlash(stripPost());\n\t$prefnames = safe_column(\"name\", \"yab_shop_prefs\", \"type = 1\");\n\n\tforeach($prefnames as $prefname)\n\t{\n\t\tif (isset($post[$prefname]))\n\t\t{\n\t\t\tsafe_update(\n\t\t\t\t\"yab_shop_prefs\",\n\t\t\t\t\"val = '\".$post[$prefname].\"'\",\n\t\t\t\t\"name = '\".doSlash($prefname).\"'\"\n\t\t\t);\n\t\t}\n }\n\treturn gTxt('yab_shop_prefs_updated');\n}", "function saveParams($data=0) {\r\n $p=array();\r\n if (IsSet($this->id)) {\r\n $p[\"id\"]=$this->id;\r\n }\r\n if (IsSet($this->view_mode)) {\r\n $p[\"view_mode\"]=$this->view_mode;\r\n }\r\n if (IsSet($this->edit_mode)) {\r\n $p[\"edit_mode\"]=$this->edit_mode;\r\n }\r\n if (IsSet($this->tab)) {\r\n $p[\"tab\"]=$this->tab;\r\n }\r\n return parent::saveParams($p);\r\n}", "public function save($key = null, $urlVar = 'a_id')\n\t{\n\t\t// Load the backend helper for filtering.\n\t\trequire_once JPATH_ADMINISTRATOR.'/components/com_jdownloads/helpers/jdownloadshelper.php';\n\n\t\t$result = parent::save($key, $urlVar);\n\n\t\t// If ok, redirect to the return page.\n\t\tif ($result) {\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\n\t\treturn $result;\n\t}", "function saveParams($data=0) {\n $p=array();\n if (IsSet($this->id)) {\n $p[\"id\"]=$this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"]=$this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"]=$this->edit_mode;\n }\n if (IsSet($this->data_source)) {\n $p[\"data_source\"]=$this->data_source;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"]=$this->tab;\n }\n return parent::saveParams($p);\n}", "function saveParams($data=0) {\r\n $p=array();\r\n if (IsSet($this->id)) {\r\n $p[\"id\"]=$this->id;\r\n }\r\n if (IsSet($this->view_mode)) {\r\n $p[\"view_mode\"]=$this->view_mode;\r\n }\r\n if (IsSet($this->edit_mode)) {\r\n $p[\"edit_mode\"]=$this->edit_mode;\r\n }\r\n if (IsSet($this->data_source)) {\r\n $p[\"data_source\"]=$this->data_source;\r\n }\r\n if (IsSet($this->tab)) {\r\n $p[\"tab\"]=$this->tab;\r\n }\r\n return parent::saveParams($p);\r\n}", "function saveParams($data=0) {\r\n $p=array();\r\n if (IsSet($this->id)) {\r\n $p[\"id\"]=$this->id;\r\n }\r\n if (IsSet($this->view_mode)) {\r\n $p[\"view_mode\"]=$this->view_mode;\r\n }\r\n if (IsSet($this->edit_mode)) {\r\n $p[\"edit_mode\"]=$this->edit_mode;\r\n }\r\n if (IsSet($this->data_source)) {\r\n $p[\"data_source\"]=$this->data_source;\r\n }\r\n if (IsSet($this->tab)) {\r\n $p[\"tab\"]=$this->tab;\r\n }\r\n return parent::saveParams($p);\r\n}", "function vw_dentist_pro_posttype_ex_bn_metadesig_save( $post_id ) {\n\n \n if( isset( $_POST[ 'meta-doctors-email' ] ) ) {\n update_post_meta( $post_id, 'meta-doctors-email', esc_html($_POST[ 'meta-doctors-email' ]) );\n }\n if( isset( $_POST[ 'meta-doctors-phone' ] ) ) {\n update_post_meta( $post_id, 'meta-doctors-phone', esc_html($_POST[ 'meta-doctors-phone' ]) );\n }\n \n // Save facebookurl\n if( isset( $_POST[ 'meta-tfacebookurl' ] ) ) {\n update_post_meta( $post_id, 'meta-tfacebookurl', esc_url($_POST[ 'meta-tfacebookurl' ]) );\n }\n // Save linkdenurl\n if( isset( $_POST[ 'meta-tlinkdenurl' ] ) ) {\n update_post_meta( $post_id, 'meta-tlinkdenurl', esc_url($_POST[ 'meta-tlinkdenurl' ]) );\n }\n if( isset( $_POST[ 'meta-ttwitterurl' ] ) ) {\n update_post_meta( $post_id, 'meta-ttwitterurl', esc_url($_POST[ 'meta-ttwitterurl' ]) );\n }\n // Save googleplusurl\n if( isset( $_POST[ 'meta-tgoogleplusurl' ] ) ) {\n update_post_meta( $post_id, 'meta-tgoogleplusurl', esc_url($_POST[ 'meta-tgoogleplusurl' ]) );\n }\n\n // Save Instagram\n if( isset( $_POST[ 'meta-tinstagram' ] ) ) {\n update_post_meta( $post_id, 'meta-tinstagram', esc_url($_POST[ 'meta-tinstagram' ]) );\n }\n\n // Save Pinterest\n if( isset( $_POST[ 'meta-pinterest' ] ) ) {\n update_post_meta( $post_id, 'meta-pinterest', esc_url($_POST[ 'meta-pinterest' ]) );\n }\n // Save designation\n if( isset( $_POST[ 'meta-designation' ] ) ) {\n update_post_meta( $post_id, 'meta-designation', esc_html($_POST[ 'meta-designation' ]) );\n }\n // Save speciality\n if( isset( $_POST[ 'meta-doctor-speciality' ] ) ) {\n update_post_meta( $post_id, 'meta-doctor-speciality', esc_html($_POST[ 'meta-doctor-speciality' ]) );\n }\n // Save Percentage\n if( isset( $_POST[ 'meta-speciality-per' ] ) ) {\n update_post_meta( $post_id, 'meta-speciality-per', esc_html($_POST[ 'meta-speciality-per' ]) );\n }\n}", "protected function _getSaveAndContinueUrl()\n {\n return $this->getUrl('banner/*/save', [\n '_current' => true,\n 'back' => 'edit',\n 'active_tab' => '{{tab_id}}'\n ]);\n }", "protected function _getSaveAndContinueUrl()\n {\n return $this->getUrl('*/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '']);\n }", "public function saveKeysAction()\r\n { \r\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('seaocore_admin_main', array(), 'seaocore_admin_plugin_keys');\r\n $installedModuleArray = array();\r\n if(Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitelogin')) {\r\n $installedModuleArray[] = 'sitelogin';\r\n }\r\n $this->view->form = $form = new Seaocore_Form_Admin_ConfigureKeys(array('installedModules' => $installedModuleArray));\r\n\r\n if (!$this->getRequest()->isPost()) {\r\n return;\r\n }\r\n if (!$form->isValid($this->getRequest()->getPost())) {\r\n return;\r\n }\r\n $keys = $_POST;\r\n $form->populate($keys);\r\n \r\n if(!empty($keys['seaocore_google_map_key'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('seaocore.google.map.key', $keys['seaocore_google_map_key']);\r\n }\r\n\r\n if(!empty($keys['video_youtube_apikey'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('video.youtube.apikey', $keys['video_youtube_apikey']);\r\n if(Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitevideo')) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitevide.youtube.apikey', $keys['video_youtube_apikey']);\r\n }\r\n } \r\n\r\n if(!empty($keys['recaptchapublic']) && !empty($keys['recaptchaprivate'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.spam.recaptchapublic', $keys['recaptchapublic']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.spam.recaptchaprivate', $keys['recaptchaprivate']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.spam.recaptchaenabled', 1);\r\n }\r\n\r\n if(!empty($keys['core_facebook_appid']) && !empty($keys['core_facebook_secret'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.facebook.appid', $keys['core_facebook_appid']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.facebook.secret', $keys['core_facebook_secret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.facebook.enable', 1);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('facebook.enable', 1);\r\n }\r\n\r\n if(!empty($keys['core_twitter_key']) && !empty($keys['core_twitter_secret'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.twitter.key', $keys['core_twitter_key']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.twitter.secret', $keys['core_twitter_secret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.twitter.enable', 1);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('twitter.enable', 1);\r\n }\r\n\r\n if(!empty($keys['core_janrain_domain']) && !empty($keys['core_janrain_key']) && !empty($keys['core_janrain_id'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.janrain.domain', $keys['core_janrain_domain']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.janrain.key', $keys['core_janrain_key']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('core.janrain.id', $keys['core_janrain_id']); \r\n }\r\n\r\n if(!empty($keys['windowlive_apikey']) && !empty($keys['windowlive_secretkey']) && !empty($keys['windowlive_policyurl'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('windowlive.apikey', $keys['windowlive_apikey']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('windowlive.secretkey', $keys['windowlive_secretkey']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('windowlive.policyurl', $keys['windowlive_policyurl']); \r\n }\r\n\r\n if(!empty($keys['yahoo_clientId']) && !empty($keys['yahoo_clientSecret'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('yahoo.secretkey', $keys['yahoo_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('yahoo.apikey', $keys['yahoo_clientId']);\r\n }\r\n if(!empty($keys['linkedIn_clientSecret']) && !empty($keys['linkedIn_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('linkedin.secretkey', $keys['linkedIn_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('linkedin.apikey', $keys['linkedIn_clientId']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('linkedin.enable', 1);\r\n }\r\n if(!empty($keys['instagram_clientSecret']) && !empty($keys['instagram_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('instagram.secretkey', $keys['instagram_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('instagram.apikey', $keys['instagram_clientId']);\r\n }\r\n if(!empty($keys['google_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('google.apikey', $keys['google_clientId']);\r\n }\r\n\r\n if(Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitelogin')) {\r\n if(!empty($keys['yahoo_clientId']) && !empty($keys['yahoo_clientSecret'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.yahoo.clientSecret', $keys['yahoo_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.yahoo.clientId', $keys['yahoo_clientId']);\r\n } \r\n if(!empty($keys['vk_clientSecret']) && !empty($keys['vk_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.vk.clientSecret', $keys['vk_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.vk.clientId', $keys['vk_clientId']);\r\n }\r\n if(!empty($keys['outlook_clientSecret']) && !empty($keys['outlook_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.outlook.clientSecret', $keys['outlook_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.outlook.clientId', $keys['outlook_clientId']);\r\n }\r\n if(!empty($keys['pinterest_clientId']) && !empty($keys['pinterest_clientSecret'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.pinterest.clientId', $keys['pinterest_clientId']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.pinterest.clientSecret', $keys['pinterest_clientSecret']);\r\n }\r\n if(!empty($keys['linkedIn_clientSecret']) && !empty($keys['linkedIn_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.linkedin.clientSecret', $keys['linkedIn_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.linkedin.clientId', $keys['linkedIn_clientId']);\r\n } \r\n if(!empty($keys['instagram_clientSecret']) && !empty($keys['instagram_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.instagram.clientSecret', $keys['instagram_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.instagram.clientId', $keys['instagram_clientId']);\r\n } \r\n if(!empty($keys['flickr_Secret']) && !empty($keys['flickr_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.flickr.clientSecret', $keys['flickr_Secret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.flickr.clientId', $keys['flickr_clientId']);\r\n } \r\n if(!empty($keys['bitly_secretkey']) && !empty($keys['bitly_apikey'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('bitly.secretkey', $keys['bitly_secretkey']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('bitly.apikey', $keys['bitly_apikey']);\r\n }\r\n if(!empty($keys['google_clientSecret']) && !empty($keys['google_clientId'])) {\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.google.clientSecret', $keys['google_clientSecret']);\r\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitelogin.google.clientId', $keys['google_clientId']);\r\n }\r\n } \r\n\r\n $form->addNotice('Your changes have been saved.');\r\n\r\n }", "function save_referensi() {\n\n\t\tswitch ($_POST['mode']) {\n\t\t\t\n\t\t\tcase 'add':\n\t\t\t\n\t\t\t\tif($this->_validate_post_data($this->data_object->referensi, 'add') != FALSE) {\n\t\t\t\t\t$data = array_intersect_key($_POST, $this->data_object->referensi);\n\t\t\t\t\t$data['created_id'] = get_user_id();\n\t\t\t\t\t$data['organization_id'] = get_user_data('organization_id');\n\t\t\t\t\t$data['created_time'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$data['jabatan'] =\"-\";\n\t\t\t\t\t$this->db->insert('_ref_instansi_eksternal', $data);\n\t\t\t\t\t$id = $this->db->insert_id();\n\t\t\t\t\t\t\n\t\t\t\t\tset_success_message('Referensi berhasil ditambahkan.');\n\t\t\t\t\tredirect('global/admin/referensi/' . $id);\n\t\t\t\t\texit;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tset_error_message('Validation Error');\n\t\t\t\t\tredirect('global/admin/referensi/' . $id);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\tif($this->_validate_post_data($this->data_object->referensi, 'edit') != FALSE) {\n\t\t\t\t\t$id = $_POST['entry_id'];\n\t\t\t\t\tunset($_POST['entry_id']);\n\t\t\t\t\t\n\t\t\t\t\tif(!isset($_POST['status'])) {\n\t\t\t\t\t\t$_POST['status'] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data = array_intersect_key($_POST, $this->data_object->referensi);\n\t\t\t\t\t$this->db->update('_ref_instansi_eksternal', $data, array('entry_id' => $id));\n\t\t\t\t\t\t\n\t\t\t\t\tset_success_message('Referensi berhasil diperbaharui.');\n\t\t\t\t\tredirect('global/admin/referensi/' . $id);\n\t\t\t\t\texit;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tset_error_message(validation_errors());\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "protected function _getSaveAndContinueUrl()\r\n {\r\n return $this->getUrl(\r\n 'tab/*/save',\r\n [\r\n '_current' => true,\r\n 'back' => 'edit',\r\n 'active_tab' => '{{id}}'\r\n ]\r\n );\r\n }", "function ivrpro_save_dir_details($vals){\n\tglobal $db, $amp_conf;\n\t//dbug('ivrpro_save_dir_details called with ', $vals);\n\tforeach($vals as $key => $value) {\n\t\t$vals[$key] = $db->escapeSimple($value);\n\t}\n\n\t$sql\t= 'REPLACE INTO ivrpro_details (id, speech_enabled, pro_directdial, pro_timeout_time, pro_announcement,\n\t\t\t\tpro_invalid_repeat_loops, pro_invalid_repeat_recording,\n\t\t\t\tpro_invalid_recording, pro_invalid_destination, pro_timeout_repeat_loops,\n\t\t\t\tpro_timeout_repeat_recording, pro_timeout_recording, pro_timeout_destination,\n\t\t\t\tpro_retivr)\n\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';\n\t$foo\t= $db->query($sql,$vals);\n\tif(DB::IsError($foo)) {\n\t\tdie_freepbx(print_r($vals,true).' '.$foo->getDebugInfo());\n\t}\n\treturn $vals['id'];\n}", "function sud_thumb_save_postdata( $post_id ) {\r\n\tif ( !wp_verify_nonce( $_POST['sud_thumb_noncename'], plugin_basename(__FILE__) )) {\r\n\t\treturn $post_id;\r\n\t}\r\n\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything\r\n\t// if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $post_id;\r\n\t// Check permissions\r\n\tif ( 'page' == $_POST['post_type'] ) {\r\n\t\tif ( !current_user_can( 'edit_page', $post_id ) )\r\n\t\t\treturn $post_id;\r\n\t} else {\r\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\r\n\t\t\treturn $post_id;\r\n\t}\r\n\t// OK, we're authenticated: we need to find and save the data\r\n\t$defimgdr = get_option('Default_ImgDir');\r\n\t$thumburl = trim($_POST['sud_thumb_new_field']);\r\n\t$defimgdr = str_replace(\"http://\", \"\", $defimgdr);\t\r\n\t$thumburl = str_replace(\"http://\", \"\", $thumburl);\r\n\tif( $thumburl!=\"\" && $defimgdr!=$thumburl ) {\r\n\t\tupdate_option('sud_thumb_url_'.$post_id, $thumburl);\r\n\t\t// add_post_meta() update_post_meta()\r\n\t}\r\n\treturn $thumburl;\r\n}", "public function save()\n {\n $soxId = $this->getEditObjectId();\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n // checkbox handling\n if (!isset($aParams['oxlinks__oxactive'])) {\n $aParams['oxlinks__oxactive'] = 0;\n }\n\n // adds space to the end of URL description to keep new added links visible\n // if URL description left empty\n if (isset($aParams['oxlinks__oxurldesc']) && strlen($aParams['oxlinks__oxurldesc']) == 0) {\n $aParams['oxlinks__oxurldesc'] .= \" \";\n }\n\n if (!$aParams['oxlinks__oxinsert']) {\n // sets default (?) date format to output\n // else if possible - changes date format to system compatible\n $sDate = date(oxRegistry::getLang()->translateString(\"simpleDateFormat\"));\n if ($sDate == \"simpleDateFormat\") {\n $aParams['oxlinks__oxinsert'] = date(\"Y-m-d\");\n } else {\n $aParams['oxlinks__oxinsert'] = $sDate;\n }\n }\n\n $iEditLanguage = oxRegistry::getConfig()->getRequestParameter(\"editlanguage\");\n $oLinks = oxNew(\"oxlinks\", getViewName('oxlinks'));\n\n if ($soxId != \"-1\") {\n //$oLinks->load( $soxId );\n $oLinks->loadInLang($iEditLanguage, $soxId);\n\n } else {\n $aParams['oxlinks__oxid'] = null;\n }\n\n //$aParams = $oLinks->ConvertNameArray2Idx( $aParams);\n\n $oLinks->setLanguage(0);\n $oLinks->assign($aParams);\n $oLinks->setLanguage($iEditLanguage);\n $oLinks->save();\n\n parent::save();\n\n // set oxid if inserted\n $this->setEditObjectId($oLinks->getId());\n }", "function saveParams($data = 1)\n {\n $p = array();\n if (IsSet($this->id)) {\n $p[\"id\"] = $this->id;\n }\n if (IsSet($this->view_mode)) {\n $p[\"view_mode\"] = $this->view_mode;\n }\n if (IsSet($this->edit_mode)) {\n $p[\"edit_mode\"] = $this->edit_mode;\n }\n if (IsSet($this->tab)) {\n $p[\"tab\"] = $this->tab;\n }\n return parent::saveParams($p);\n }" ]
[ "0.6001284", "0.58098555", "0.57825625", "0.57138395", "0.5667394", "0.5659275", "0.5659275", "0.5659275", "0.5659275", "0.5659275", "0.5651243", "0.564836", "0.56419426", "0.56325006", "0.56049955", "0.5599741", "0.55967903", "0.55965793", "0.5549468", "0.5549468", "0.5547798", "0.55475163", "0.5527716", "0.551693", "0.5508872", "0.54536366", "0.54496515", "0.5426175", "0.5426039", "0.54192966" ]
0.6570346
0
Attempt to create the requested block.
public function create(string $block, ?array $config = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blockCreate()\n {\n //$template = file_get_contents(Root . '/binary/giiapp/block.php');\n if (file_exists($this->pathBlocks .'/'. $this->blocksType->name . '/azk/' . $this->blocks->sample . '.php'))\n $sample = file_get_contents($this->pathBlocks .'/'. $this->blocksType->name . '/azk/' . $this->blocks->sample . '.php');\n else\n $sample = file_get_contents(Root . '/binary/giiapp/block.php');\n\n if (!ZArrayHelper::getValue(Az::$app->params, 'is_clone'))\n $this->blocks->name = $this->blocksType->name . '/' . App . '/' . $this->blocks->input;\n \n //path and files which should be created\n $blockFile = ZFileHelper::normalizePath($this->pathBlocks . $this->blocks->name . '.php');\n\n if ($this->old_content == '') {\n if (ZArrayHelper::getValue(Az::$app->params, 'is_clone'))\n {\n //vdd($this->pathBlocks . $this->blocks->name . '.php');\n $parent_content = file_get_contents($this->pathBlocks . $this->blocks->name . '.php');\n $blockContent = $this->replace_between($parent_content, \"action->title = Azl . '\", \"')\", $this->blocks->title;\n $blockContent = $this->replace_between($blockContent, \"this->icon = '\", \"'\", $this->blocks->icon);\n $this->blocks->input .= '_' . $this->blocks->id;\n $this->blocks->name = $this->blocks->name. \"_\".$this->blocks->id;\n $blockFile = ZFileHelper::normalizePath($this->pathBlocks . $this->blocks->name . '.php');\n }else\n {\n $blockContent = strtr($sample, [\n '{title}' => $this->blocks->title,\n '{icon}' => $this->blocks->icon,\n ]);\n }\n\n } else {\n $blockFile = ZFileHelper::normalizePath($this->pathBlocks . $this->blocks->name . '.php');\n $blockContent = $this->replace_between($this->old_content, \"action->title = Azl . '\", \"')\", $this->blocks->title;\n $blockContent = $this->replace_between($blockContent, \"this->icon = '\", \"'\", $this->blocks->icon);\n if(file_exists(ZFileHelper::normLinux($this->pathBlocks . \"/\" . $this->old_name . '.php')))\n unlink(ZFileHelper::normLinux($this->pathBlocks . \"/\" . $this->old_name . '.php'));\n\n }\n\n $file = file_put_contents($blockFile, $blockContent);\n\n if (is_file($blockFile) && $file !== false) {\n Az::debug($blockFile, 'Block file created');\n } else\n Az::error($blockFile, 'Cannot create block file');\n }", "private function internalCreateBlock(\n APIBlockCreateStruct $blockCreateStruct,\n PersistenceBlock $targetBlock,\n string $placeholder,\n ?int $position = null\n ): Block {\n $persistenceLayout = $this->layoutHandler->loadLayout($targetBlock->layoutId, Value::STATUS_DRAFT);\n\n $createdBlock = $this->transaction(\n function () use ($blockCreateStruct, $persistenceLayout, $targetBlock, $placeholder, $position): PersistenceBlock {\n $blockDefinition = $blockCreateStruct->getDefinition();\n\n $createdBlock = $this->blockHandler->createBlock(\n BlockCreateStruct::fromArray(\n [\n 'status' => $targetBlock->status,\n 'position' => $position,\n 'definitionIdentifier' => $blockDefinition->getIdentifier(),\n 'viewType' => $blockCreateStruct->viewType,\n 'itemViewType' => $blockCreateStruct->itemViewType,\n 'name' => $blockCreateStruct->name,\n 'alwaysAvailable' => $blockCreateStruct->alwaysAvailable,\n 'isTranslatable' => $blockCreateStruct->isTranslatable,\n 'parameters' => iterator_to_array(\n $this->parameterMapper->serializeValues(\n $blockDefinition,\n $blockCreateStruct->getParameterValues()\n )\n ),\n 'config' => iterator_to_array(\n $this->configMapper->serializeValues(\n $blockCreateStruct->getConfigStructs(),\n $blockDefinition->getConfigDefinitions()\n )\n ),\n ]\n ),\n $persistenceLayout,\n $targetBlock,\n $placeholder\n );\n\n $collectionCreateStructs = $blockCreateStruct->getCollectionCreateStructs();\n if (!empty($collectionCreateStructs)) {\n foreach ($collectionCreateStructs as $identifier => $collectionCreateStruct) {\n $createdCollection = $this->collectionHandler->createCollection(\n CollectionCreateStruct::fromArray(\n [\n 'status' => Value::STATUS_DRAFT,\n 'offset' => $collectionCreateStruct->offset,\n 'limit' => $collectionCreateStruct->limit,\n 'alwaysAvailable' => $blockCreateStruct->alwaysAvailable,\n 'isTranslatable' => $blockCreateStruct->isTranslatable,\n 'mainLocale' => $persistenceLayout->mainLocale,\n ]\n )\n );\n\n if ($collectionCreateStruct->queryCreateStruct instanceof APIQueryCreateStruct) {\n $queryType = $collectionCreateStruct->queryCreateStruct->getQueryType();\n $this->collectionHandler->createQuery(\n $createdCollection,\n QueryCreateStruct::fromArray(\n [\n 'type' => $queryType->getType(),\n 'parameters' => iterator_to_array(\n $this->parameterMapper->serializeValues(\n $queryType,\n $collectionCreateStruct->queryCreateStruct->getParameterValues()\n )\n ),\n ]\n )\n );\n }\n\n if ($blockCreateStruct->isTranslatable) {\n foreach ($persistenceLayout->availableLocales as $locale) {\n if ($locale !== $persistenceLayout->mainLocale) {\n $createdCollection = $this->collectionHandler->createCollectionTranslation(\n $createdCollection,\n $locale,\n $createdCollection->mainLocale\n );\n }\n }\n }\n\n $this->blockHandler->createCollectionReference(\n $createdBlock,\n $createdCollection,\n $identifier\n );\n }\n }\n\n return $createdBlock;\n }\n );\n\n return $this->mapper->mapBlock($createdBlock);\n }", "static function processCreateForm($request, $block);", "private function checkCreateBlocks() {\n if(count($this->blocks)) {\n $pkg = Package::getByHandle($this->pkgHandle);\n foreach($this->blocks as $block) {\n $blockType = BlockType::getByHandle($block, $pkg);\n if(!is_object($blockType)) {\n BlockType::installBlockType($block, $pkg);\n }\n }\n }\n }", "public function create()\n {\n return view('pages.block.create');\n }", "private function _create() {\n $this->db->insert(XCMS_Tables::TABLE_ARTICLES_BLOCKS, $this->getArray());\n }", "public function create()\n {\n $block = new Block;\n $topics = Topic::pluck(\"topicname\", \"id\");\n $page = \"Добавить новый блок\";\n return view(\"block.create\", array(\"block\"=>$block, \"page\"=>$page, \"topics\"=>$topics));\n }", "public function getBlockFactory();", "public function testCreateBlock(): void\n {\n $block = $this->createStub(PageBlockInterface::class);\n $this->blockInteractor->method('createNewContainer')->willReturn($block);\n\n $page = new Page();\n $this->pageManager->method('findBy')->with(['templateCode' => 'foo'])->willReturn([$page]);\n $this->pageManager->method('save')->with($page)->willReturn($page);\n\n $command = new CreateBlockContainerCommand();\n $command->setContainer($this->container);\n\n $input = $this->createStub(InputInterface::class);\n $input->method('getArgument')->willReturnMap([\n ['templateCode', 'foo'],\n ['blockCode', 'content_bar'],\n ['blockName', 'Baz!'],\n ]);\n\n $output = $this->createStub(OutputInterface::class);\n\n $method = new \\ReflectionMethod($command, 'execute');\n $method->setAccessible(true);\n $method->invoke($command, $input, $output);\n\n static::assertSame($page->getBlocks(), [$block]);\n }", "public function create()\n {\n return view('blocks.create');\n }", "public function createYandexDefaultBlock(CustomBlockRequest $request)\n {\n $arr = parse_url($_SERVER['HTTP_REFERER']);\n $url = $arr[\"scheme\"] . \"://\" . $arr[\"host\"].'/settings/blocks/retail_crm';\n $url = str_replace($_ENV['app.admin_domain'], $_ENV['app.secure_domain'], $url);\n\n if (!$this->blockRepository->getAll($data,$company_id)->exists()){\n $blocks = $this->blockRepository->createYandexDefaultBlock($url);\n }\n return $this->sendResponse('block_id:'.$block_id, 'Yandex Block created successfully.');\n }", "abstract protected function _blockStart();", "private function _new_block($name) {\n\t\t$this->block = $name;\n\t\t$this->subblock = '';\n\t\t$this->treePos =& $this->data;\n\t\t\n\t\t$this->_new_block_generic($name);\n\t}", "public function store(BlockRequest $request)\n {\n\n //dd($request->all());\n $block = $this->blocks->create($request->except(['_token', '_method', '_create']));\n if ($request->input('_create') == 1) {\n $redirect = redirect()->route('admin.blocks.create')->with('success', trans('site::block.created'));\n } else {\n $redirect = redirect()->route('admin.blocks.index')->with('success', trans('site::block.created'));\n }\n\n return $redirect;\n }", "private function create()\r\n {\r\n \r\n }", "public function createBlockAction(Request $request, $type, $typeId, $ownerId)\n {\n $this->getDoctrine()->getManager()->getFilters()->disable('draftversion');\n\n /** @var BlockManager $manager */\n $manager = $this->get('opifer.content.block_manager');\n $response = new JsonResponse;\n\n $sort = $request->request->get('sort');\n $parentId = $request->request->get('parent');\n $className = $request->request->get('className');\n $placeholder = (int) $request->request->get('placeholder');\n $data = $request->request->get('data');\n $data = json_decode($data, true);\n\n try {\n $block = $manager->createBlock($ownerId, $className, $parentId, $placeholder, $sort, $data);\n\n $response = new JsonResponse(['state' => 'created', 'id' => $block->getId()]);\n $response->setStatusCode(201);\n $response->headers->add(['Location' => $this->generateUrl('opifer_content_api_contenteditor_view_block', ['type' => $type, 'typeId' => $typeId, 'id' => $block->getId()])]);\n\n } catch (\\Exception $e) {\n $response->setStatusCode(500);\n $response->setData(['error' => $e->getMessage()]);\n }\n\n return $response;\n }", "public function actionCreate()\n\t{\n\t\t$model=new MainBlock;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['MainBlock']))\n\t\t{\n\t\t\t$model->attributes=$_POST['MainBlock'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "private function createConfirmationBlock(){\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n\n $block_name = 'sparo_charity_confirmation_block';\n if( !$this->getBlockId($block_name) ){\n\n $content = <<<HTML\n <div style=\"display:{{config path=\"sparoconfig/sparoconfig_settings/sparo_activated\"}}\" id=\"sparo-mount\"></div>\n <script id=\"SPARO-lib\" data-thank-you=\"true\" data-size=\"large\" data-merchant=\"{{config path=\"sparoconfig/sparoconfig_account_detail/sparo_merchantid\"}}\" src=\"https://scripts.sparo.com/sparo.min.js\"></script>\nHTML;\n\n $scriptBlock = array(\n 'title' => 'Sparo Charity Confirmation Block',\n 'identifier' => $block_name,\n 'content' => $content,\n 'is_active' => 1,\n 'stores' => array(0),\n );\n\n Mage::getModel('cms/block')->setData($scriptBlock)->save();\n\n }\n }", "public function run()\n {\n $data = [\n \t[\n \t\t'name' => 'primary',\n \t\t'description' => 'Esse é o primeiro bloco da sequência.'\n \t],\n \t[\n \t\t'name' => 'normal',\n \t\t'description' => 'Bloco normal de sequência.'\n \t]\n ];\n foreach ($data as $key => $value) {\n \tBlockType::create($value);\n }\n \n }", "private function createSelectionBlock(){\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n\n $block_name = 'sparo_charity_selection_block';\n if( !$this->getBlockId($block_name) ){\n\n $content = <<<HTML\n <div style=\"display:{{config path=\"sparoconfig/sparoconfig_settings/sparo_activated\"}}\" id=\"sparo-mount\"></div>\n <script type=\"text/javascript\" id=\"SPARO-lib\" data-transaction-type=\"{{config path=\"sparoconfig/sparoconfig_settings/sparo_productionmode\"}}\" data-merchant=\"{{config path=\"sparoconfig/sparoconfig_account_detail/sparo_merchantid\"}}\" src=\"https://scripts.sparo.com/sparo.min.js\"></script>\nHTML;\n\n $scriptBlock = array(\n 'title' => 'Sparo Charity Selection Block',\n 'identifier' => $block_name,\n 'content' => $content,\n 'is_active' => 1,\n 'stores' => array(0),\n );\n\n Mage::getModel('cms/block')->setData($scriptBlock)->save();\n\n }\n }", "abstract public function do_create();", "public function create()\n\t{\n\t\t//\n\t\t\n\t}", "public function testNewBlock()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function createRetailCrmBlock(CustomBlockRequest $request)\n {\n $arr = parse_url($_SERVER['HTTP_REFERER']);\n $url = $arr[\"scheme\"] . \"://\" . $arr[\"host\"].'/settings/blocks/retail_crm';\n $url = str_replace($_ENV['app.admin_domain'], $_ENV['app.secure_domain'], $url);\n //'%/blocks/retail_crm%'\n if (!$this->blockRepository->getAll($data,$company_id)->exists()){\n $blocks = $this->blockRepository->createRetailCrmBlock($url);\n }\n return $this->sendResponse('block_id:'.$block_id, 'Retail Crm Block created successfully.');\n }", "public function create() {\n\t\t\t//\n\t\t}", "public function add(Block $blocktype);", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}" ]
[ "0.7032944", "0.6436936", "0.6285542", "0.6202502", "0.6100567", "0.60918957", "0.606067", "0.6023781", "0.59881926", "0.5969766", "0.5964055", "0.5957349", "0.58905655", "0.5828662", "0.57563287", "0.5737807", "0.56996197", "0.5663545", "0.56604755", "0.5642692", "0.56294906", "0.56135315", "0.5600677", "0.5595118", "0.5584315", "0.5573459", "0.55438423", "0.55438423", "0.55438423", "0.55438423" ]
0.71214813
0
Send wechat corp message to helpdesk app.
private function sendWechatCpMessage($client, $helpdeskId, $content) { $helpdesk = HelpDesk::getById(new \MongoId($helpdeskId)); $token = Token::getLastestByUserId(new \MongoId($helpdeskId)); LogUtil::info(['message' => 'Check helpdesk app on-state', 'helpdeskId' => $helpdeskId, 'tokenId' => (string) $token->_id], 'wechatcp'); // if token's isOnline is false and then send wechat corp message. if ($token->isOnline === false) { $badge = $helpdesk->badge; $helpDeskSetting = HelpDeskSetting::getInstance($client['accountId']); $corpId = $helpDeskSetting->wechatcp['corpId']; $agentId = $helpDeskSetting->wechatcp['agentId']; if (empty($corpId) || empty($agentId)) { throw new BadRequestHttpException("Parameters missing"); } $message = [ 'touser' => $badge, 'msgtype' => 'text', 'agentid' => $agentId, 'text' => ['content' => $content] ]; LogUtil::info(['message' => 'Start to send wechatcp message', 'corpId' => $corpId, 'data' => $message], 'wechatcp'); Yii::$app->weConnect->sendWechatCpMessage($corpId, $message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendWelcome()\n {\n $d1 = UserDetail::get();\n foreach($d1 as $d)\n {\n \t$mobile = $d->user_mobile;\n\n \t$message =\"Welcome to Vidhvaa\";\n\n \t$this->send_new_message($message, $mobile);\n\n }\n \n }", "public function action_send()\n\t{\n\t\tglobal $txt, $modSettings, $context;\n\n\t\t// Load in some text and template dependencies\n\t\tTxt::load('PersonalMessage');\n\t\ttheme()->getTemplates()->load('PersonalMessage');\n\n\t\t// Set the template we will use\n\t\t$context['sub_template'] = 'send';\n\n\t\t// Extract out the spam settings - cause it's neat.\n\t\tlist ($modSettings['max_pm_recipients'], $modSettings['pm_posts_verification'], $modSettings['pm_posts_per_hour']) = explode(',', $modSettings['pm_spam_settings']);\n\n\t\t// Set up some items for the template\n\t\t$context['page_title'] = $txt['send_message'];\n\t\t$context['reply'] = isset($this->_req->query->pmsg) || isset($this->_req->query->quote);\n\n\t\t// Check whether we've gone over the limit of messages we can send per hour.\n\t\tif (!empty($modSettings['pm_posts_per_hour']) && !allowedTo(array('admin_forum', 'moderate_forum', 'send_mail')) && $this->user->mod_cache['bq'] === '0=1' && $this->user->mod_cache['gq'] === '0=1')\n\t\t{\n\t\t\t// How many messages have they sent this last hour?\n\t\t\t$pmCount = pmCount($this->user->id, 3600);\n\n\t\t\tif (!empty($pmCount) && $pmCount >= $modSettings['pm_posts_per_hour'])\n\t\t\t{\n\t\t\t\tthrow new Exception('pm_too_many_per_hour', true, array($modSettings['pm_posts_per_hour']));\n\t\t\t}\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t$this->_events->trigger('before_set_context', array('pmsg' => $this->_req->query->pmsg ?? ($this->_req->query->quote ?? 0)));\n\t\t}\n\t\tcatch (PmErrorException $e)\n\t\t{\n\t\t\t$this->messagePostError($e->namedRecipientList, $e->recipientList, $e->msgOptions);\n\t\t\treturn;\n\t\t}\n\n\t\t// Quoting / Replying to a message?\n\t\tif (!empty($this->_req->query->pmsg))\n\t\t{\n\t\t\t$pmsg = $this->_req->getQuery('pmsg', 'intval');\n\n\t\t\t// Make sure this is accessible (not deleted)\n\t\t\tif (!isAccessiblePM($pmsg))\n\t\t\t{\n\t\t\t\tthrow new Exception('no_access', false);\n\t\t\t}\n\n\t\t\t// Validate that this is one has been received?\n\t\t\t$isReceived = checkPMReceived($pmsg);\n\n\t\t\t// Get the quoted message (and make sure you're allowed to see this quote!).\n\t\t\t$row_quoted = loadPMQuote($pmsg, $isReceived);\n\t\t\tif ($row_quoted === false)\n\t\t\t{\n\t\t\t\tthrow new Exception('pm_not_yours', false);\n\t\t\t}\n\n\t\t\t// Censor the message.\n\t\t\t$row_quoted['subject'] = censor($row_quoted['subject']);\n\t\t\t$row_quoted['body'] = censor($row_quoted['body']);\n\n\t\t\t// Lets make sure we mark this one as read\n\t\t\tmarkMessages($pmsg);\n\n\t\t\t// Figure out which flavor or 'Re: ' to use\n\t\t\t$context['response_prefix'] = response_prefix();\n\n\t\t\t$form_subject = $row_quoted['subject'];\n\n\t\t\t// Add 'Re: ' to it....\n\t\t\tif ($context['reply'] && trim($context['response_prefix']) !== '' && Util::strpos($form_subject, trim($context['response_prefix'])) !== 0)\n\t\t\t{\n\t\t\t\t$form_subject = $context['response_prefix'] . $form_subject;\n\t\t\t}\n\n\t\t\t// If quoting, lets clean up some things and set the quote header for the pm body\n\t\t\tif (isset($this->_req->query->quote))\n\t\t\t{\n\t\t\t\t// Remove any nested quotes and <br />...\n\t\t\t\t$form_message = preg_replace('~<br ?/?' . '>~i', \"\\n\", $row_quoted['body']);\n\t\t\t\t$form_message = removeNestedQuotes($form_message);\n\n\t\t\t\tif (empty($row_quoted['id_member']))\n\t\t\t\t{\n\t\t\t\t\t$form_message = '[quote author=&quot;' . $row_quoted['real_name'] . '&quot;]' . \"\\n\" . $form_message . \"\\n\" . '[/quote]';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$form_message = '[quote author=' . $row_quoted['real_name'] . ' link=action=profile;u=' . $row_quoted['id_member'] . ' date=' . $row_quoted['msgtime'] . ']' . \"\\n\" . $form_message . \"\\n\" . '[/quote]';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$form_message = '';\n\t\t\t}\n\n\t\t\t// Do the BBC thang on the message.\n\t\t\t$bbc_parser = ParserWrapper::instance();\n\t\t\t$row_quoted['body'] = $bbc_parser->parsePM($row_quoted['body']);\n\n\t\t\t// Set up the quoted message array.\n\t\t\t$context['quoted_message'] = array(\n\t\t\t\t'id' => $row_quoted['id_pm'],\n\t\t\t\t'pm_head' => $row_quoted['pm_head'],\n\t\t\t\t'member' => array(\n\t\t\t\t\t'name' => $row_quoted['real_name'],\n\t\t\t\t\t'username' => $row_quoted['member_name'],\n\t\t\t\t\t'id' => $row_quoted['id_member'],\n\t\t\t\t\t'href' => !empty($row_quoted['id_member']) ? getUrl('profile', ['action' => 'profile', 'u' => $row_quoted['id_member']]) : '',\n\t\t\t\t\t'link' => !empty($row_quoted['id_member']) ? '<a href=\"' . getUrl('profile', ['action' => 'profile', 'u' => $row_quoted['id_member']]) . '\">' . $row_quoted['real_name'] . '</a>' : $row_quoted['real_name'],\n\t\t\t\t),\n\t\t\t\t'subject' => $row_quoted['subject'],\n\t\t\t\t'time' => standardTime($row_quoted['msgtime']),\n\t\t\t\t'html_time' => htmlTime($row_quoted['msgtime']),\n\t\t\t\t'timestamp' => forum_time(true, $row_quoted['msgtime']),\n\t\t\t\t'body' => $row_quoted['body']\n\t\t\t);\n\t\t}\n\t\t// A new message it is then\n\t\telse\n\t\t{\n\t\t\t$context['quoted_message'] = false;\n\t\t\t$form_subject = '';\n\t\t\t$form_message = '';\n\t\t}\n\n\t\t// Start of like we don't know where this is going\n\t\t$context['recipients'] = array(\n\t\t\t'to' => array(),\n\t\t\t'bcc' => array(),\n\t\t);\n\n\t\t// Sending by ID? Replying to all? Fetch the real_name(s).\n\t\tif (isset($this->_req->query->u))\n\t\t{\n\t\t\t// If the user is replying to all, get all the other members this was sent to..\n\t\t\tif ($this->_req->query->u === 'all' && isset($row_quoted))\n\t\t\t{\n\t\t\t\t// Firstly, to reply to all we clearly already have $row_quoted - so have the original member from.\n\t\t\t\tif ($row_quoted['id_member'] != $this->user->id)\n\t\t\t\t{\n\t\t\t\t\t$context['recipients']['to'][] = array(\n\t\t\t\t\t\t'id' => $row_quoted['id_member'],\n\t\t\t\t\t\t'name' => htmlspecialchars($row_quoted['real_name'], ENT_COMPAT),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Now to get all the others.\n\t\t\t\t$context['recipients']['to'] = array_merge($context['recipients']['to'], isset($pmsg) ? loadPMRecipientsAll($pmsg) : array());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$users = array_map('intval', explode(',', $this->_req->query->u));\n\t\t\t\t$users = array_unique($users);\n\n\t\t\t\t// For all the member's this is going to, get their display name.\n\t\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\t\t$result = getBasicMemberData($users);\n\n\t\t\t\tforeach ($result as $row)\n\t\t\t\t{\n\t\t\t\t\t$context['recipients']['to'][] = array(\n\t\t\t\t\t\t'id' => $row['id_member'],\n\t\t\t\t\t\t'name' => $row['real_name'],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get a literal name list in case the user has JavaScript disabled.\n\t\t\t$names = array();\n\t\t\tforeach ($context['recipients']['to'] as $to)\n\t\t\t{\n\t\t\t\t$names[] = $to['name'];\n\t\t\t}\n\t\t\t$context['to_value'] = empty($names) ? '' : '&quot;' . implode('&quot;, &quot;', $names) . '&quot;';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context['to_value'] = '';\n\t\t}\n\n\t\t// Set the defaults...\n\t\t$context['subject'] = $form_subject;\n\t\t$context['message'] = str_replace(array('\"', '<', '>', '&nbsp;'), array('&quot;', '&lt;', '&gt;', ' '), $form_message);\n\n\t\t// And build the link tree.\n\t\t$context['linktree'][] = array(\n\t\t\t'url' => getUrl('action', ['action' => 'pm', 'sa' => 'send']),\n\t\t\t'name' => $txt['new_message']\n\t\t);\n\n\t\t// Needed for the editor.\n\t\trequire_once(SUBSDIR . '/Editor.subs.php');\n\n\t\t// Now create the editor.\n\t\t$editorOptions = array(\n\t\t\t'id' => 'message',\n\t\t\t'value' => $context['message'],\n\t\t\t'height' => '250px',\n\t\t\t'width' => '100%',\n\t\t\t'labels' => array(\n\t\t\t\t'post_button' => $txt['send_message'],\n\t\t\t),\n\t\t\t'preview_type' => 2,\n\t\t);\n\n\t\t// Trigger the prepare_send_context PM event\n\t\t$this->_events->trigger('prepare_send_context', array('editorOptions' => &$editorOptions));\n\n\t\tcreate_control_richedit($editorOptions);\n\n\t\t// No one is bcc'ed just yet\n\t\t$context['bcc_value'] = '';\n\n\t\t// Register this form and get a sequence number in $context.\n\t\tcheckSubmitOnce('register');\n\t}", "function contact_us(){ // This can be used for \"OTHERS\" option\n // Report Quote's errors like: mispelled words, mispelled names...\n // $msg: User's comment to help solve the problem\n if(isset($_SESSION['uID']) && !empty($_SESSION['uID']))\n return $this->obj->save('reports','quoteID,reason,description',\"'\".$this->id.\"','You have a new message:','\".$this->msg.\"'\");\n else return false;\n //return sendMail('[email protected]',\"You have a new message\",$this->msg);\n //pass: kEktx#g!##O!\n }", "private function send_whatsapp($from, $to, $body) {\n }", "public function sendMessage()\n {\n $this->processData($this->orderModel);\n $this->getTemplate(\"订单支付成功通知\");\n $this->getBackMember();\n if (empty($this->temp_open)) {\n $back['message'] = \"消息通知未开启\";\n \\Log::debug($back['message']);\n }\n\n $this->organizeData();\n\n $result = (new AppletMessageNotice($this->temp_id,0,$this->data,$this->minOpenIds,2))->sendMessage();\n\n if ($result['status'] == 0) {\n \\Log::debug($result['message']);\n }\n }", "function toHelpdesk();", "function Support()\r\n\t\t{\r\n\t\t\tif (HTTPContext::IsPostBack())\r\n\t\t\t{\r\n\t\t\t\tif (Gmail::Send(array\r\n\t\t\t\t(\r\n\t\t\t\t\t'subject' => HTTPContext::$post['support_question'],\r\n\t\t\t\t\t'text' => HTTPContext::$post['support_details'],\r\n\t\t\t\t\t'from' => HTTPContext::$post['support_email'],\r\n\t\t\t\t\t'fromName' => HTTPContext::$post['support_name'],\r\n\t\t\t\t\t'recipients' => array('[email protected]')\r\n\t\t\t\t)) === true)\r\n\t\t\t\t{\r\n\t\t\t\t\techo \": \".Language::Get('Support sent');\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\techo \": \".Language::Get('Support error');\r\n\t\t\t\t}\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}", "public function sendMessagetoTelegam($setting,$msg){\r\n\r\n// \"boot_token\" => $setting['pushtelegram_boot_token'],\r\n// \"chat_ids\" => $setting['pushtelegram_chat_ids'],\r\n\r\n $botToken = $setting['pushtelegram_boot_token'];\r\n $website = \"https://api.telegram.org/bot\".$botToken;\r\n $chatIds = $setting['pushtelegram_chat_ids']; //Receiver Chat Id\r\n\r\n if (is_array($chatIds)){\r\n\r\n\r\n foreach ($chatIds as $val ){\r\n $this->initMessage($botToken,$val,$msg);\r\n }\r\n\r\n }\r\n else {\r\n $this->initMessage($botToken,$chatIds,$msg);\r\n\r\n }\r\n\r\n\r\n }", "function ciniki_musicfestivals_messageSend(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'message_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\n 'send'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Send Message'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'checkAccess');\n $rc = ciniki_musicfestivals_checkAccess($ciniki, $args['tnid'], 'ciniki.musicfestivals.messageGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'dateFormat');\n $date_format = ciniki_users_dateFormat($ciniki, 'php');\n\n //\n // Load the message\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'messageLoad');\n $rc = ciniki_musicfestivals_messageLoad($ciniki, $args['tnid'], array(\n 'message_id' => $args['message_id'],\n 'emails' => 'yes',\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.492', 'msg'=>'Unable to load message', 'err'=>$rc['err']));\n }\n if( !isset($rc['message']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.493', 'msg'=>'No message found', 'err'=>$rc['err']));\n }\n $message = isset($rc['message']) ? $rc['message'] : array();\n\n //\n // Make sure the message has the correct status\n //\n if( $message['status'] != 10 ) {\n if( $message['status'] == 30 ) {\n return array('stat'=>'warn', 'err'=>array('code'=>'ciniki.musicfestivals.527', 'msg'=>'Email has already been scheduled'));\n } \n return array('stat'=>'warn', 'err'=>array('code'=>'ciniki.musicfestivals.494', 'msg'=>'Email has already been sent'));\n }\n\n $args['message'] = $message;\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'messageQueue');\n return ciniki_musicfestivals_messageQueue($ciniki, $args['tnid'], $args);\n}", "public function sendMessage()\n\t{\n if ($this->request->is('ajax')) {\n $data = $this->request->getData();\n $client = $this->Client->get($data['clientId']);\n $item = $this->Item->get($data['itemId']);\n $input = [\n 'itemId' => $item->id,\n 'shopId' => $item->shop,\n 'clientId' => $client->id,\n 'roomId' => $data['roomId'],\n 'message' => h($data['message']),\n 'messageFrom' => $data['messageFrom'],\n 'readed' => ($data['messageFrom'] == 'shop') ? 1 : 0\n ];\n $this->Chat->insert($input);\n // Update message of room chat\n $this->getMessage();\n }\n\t}", "private function sendChatMessage($client, $helpdeskId, $content)\n {\n //trigger send message event\n $data = [\n 'accountId' => (string) $client['accountId'],\n 'source' => $client['source'],\n 'nick' => $client['nick'],\n 'channelId' => $client['channelId'],\n 'avatar' => $client['avatar'],\n 'isHelpdesk' => false\n ];\n Yii::$app->tuisongbao->sendChatMessage($client['openId'], $helpdeskId, $content, $data);\n\n // Send wechatcp message if this helpdesk is away from WeiXin broswer.\n $this->sendWechatCpMessage($client, $helpdeskId, $content);\n }", "function sent()\n {\n //TODO: Ensure the user is logged in\n Modules::run('login/is_logged_in');\n //TODO: if the user survives this, he/she has been cleared\n $data['page_title'] = 'Messaging';\n $data['module'] = 'message';\n $data['view_file'] = 'sent_messages_view';\n echo Modules::run('templates/main_site', $data);\n }", "public function sendsms_users(){\n\t\t$this->load->helper('sendsms_helper');\n\t\t$envoie = sendsms('0970524665', 'Hello world, this is a test message');\n\t}", "public function actionMessage()\n{\n //header('location:index.php');\n echo $this->model_api->mailerMessage($_POST['title'], $_POST['message'], $_POST['apitoken']); //apitoken\t\n}", "function enviar_mensagem_whatsapp_texto_api($sender,$telefone,$msgCompleta, $urlApi){\n \n \n\t$dominio = str_replace(array('http://','https://'), '', get_site_url());\n\n $data1 = array('sender'=> $sender, 'idc' => $dominio, 'number' => '+55' . $telefone, 'message' => $msgCompleta);\n // use key 'http' even if you send the request to https://...\n $options = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n 'method' => 'POST',\n 'content' => http_build_query($data1),\n 'timeout' => 10,\n ),\n );\n // Montando a requisição\n $context = stream_context_create($options);\n // Enviando a requisição\n $result = file_get_contents($urlApi, false, $context);\n\n $resultado = json_decode($result);\n\n $status_resultado = $resultado->status;\n\n if($status_resultado == 1){\n $r = array('status' => 'sucesso');\n }else{\n $r = array('status'=> 'Houve um erro ao tentar enviar sua mensagem');\n }\n\n return $r;\n \n}", "function invite_answer_message_send($data)\n\t{\n\t\t$message_data = $this->invite_answer_message_data();\n\t\t$base = $this->config->item('base_url');\n\t\t$q_link = $base.'question/'.$data['nId'];\n\t\tforeach($data['f_uId_arr'] as $f_uId)\n\t\t{\n\t\t\t$send_data = array('subject'=>$message_data['subject']);\n\t\t\t$f_username = $this->User_data->get_username(array('uId'=>$f_uId));\n\t\t\t$send_data['message_content'] = sprintf($message_data['content'],$f_username,$data['username'],$q_link,$data['q_text']);\n\t\t\t$send_data['from_user_id'] = 0;// system admin\n\t\t\t$send_data['to_user_id'] = $f_uId;\n\t\t\t$send_data['sendType'] = ONLINE;\n\t\t\t$send_data['message_type'] = USER_MESSAGE;\n\t\t\t$this->message_insert($send_data);\n\t\t}\n\t}", "function send() {\n return $this->slack->send($this);\n }", "public function actionMail()\r\n {\r\n \\Yii::$app->mailer->compose()\r\n ->setFrom([\\Yii::$app->params['supportEmail'] => 'Orion test mail'])\r\n ->setTo('[email protected]')\r\n ->setSubject('Verifica fnzionamento mail')\r\n ->setTextBody('Plain text content')\r\n ->setHtmlBody('<b>HTML content</b>')\r\n ->send();\r\n\r\n return $this->actionLog();\r\n }", "public function action_send2()\n\t{\n\t\tglobal $txt, $context, $modSettings;\n\n\t\t// All the helpers we need\n\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\t\trequire_once(SUBSDIR . '/Post.subs.php');\n\n\t\tTxt::load('PersonalMessage', false);\n\n\t\t// Extract out the spam settings - it saves database space!\n\t\tlist ($modSettings['max_pm_recipients'], $modSettings['pm_posts_verification'], $modSettings['pm_posts_per_hour']) = explode(',', $modSettings['pm_spam_settings']);\n\n\t\t// Initialize the errors we're about to make.\n\t\t$post_errors = ErrorContext::context('pm', 1);\n\n\t\t// Check whether we've gone over the limit of messages we can send per hour - fatal error if fails!\n\t\tif (!empty($modSettings['pm_posts_per_hour'])\n\t\t\t&& !allowedTo(array('admin_forum', 'moderate_forum', 'send_mail'))\n\t\t\t&& $this->user->mod_cache['bq'] === '0=1'\n\t\t\t&& $this->user->mod_cache['gq'] === '0=1'\n\t\t)\n\t\t{\n\t\t\t// How many have they sent this last hour?\n\t\t\t$pmCount = pmCount($this->user->id, 3600);\n\n\t\t\tif (!empty($pmCount) && $pmCount >= $modSettings['pm_posts_per_hour'])\n\t\t\t{\n\t\t\t\tif ($this->getApi() === false)\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('pm_too_many_per_hour', true, array($modSettings['pm_posts_per_hour']));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$post_errors->addError('pm_too_many_per_hour');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If your session timed out, show an error, but do allow to re-submit.\n\t\tif ($this->getApi() === false && checkSession('post', '', false) !== '')\n\t\t{\n\t\t\t$post_errors->addError('session_timeout');\n\t\t}\n\n\t\t$this->_req->post->subject = isset($this->_req->post->subject) ? strtr(Util::htmltrim($this->_req->post->subject), array(\"\\r\" => '', \"\\n\" => '', \"\\t\" => '')) : '';\n\t\t$this->_req->post->to = $this->_req->getPost('to', 'trim', empty($this->_req->query->to) ? '' : $this->_req->query->to);\n\t\t$this->_req->post->bcc = $this->_req->getPost('bcc', 'trim', empty($this->_req->query->bcc) ? '' : $this->_req->query->bcc);\n\n\t\t// Route the input from the 'u' parameter to the 'to'-list.\n\t\tif (!empty($this->_req->post->u))\n\t\t{\n\t\t\t$this->_req->post->recipient_to = explode(',', $this->_req->post->u);\n\t\t}\n\n\t\t$bbc_parser = ParserWrapper::instance();\n\n\t\t// Construct the list of recipients.\n\t\t$recipientList = array();\n\t\t$namedRecipientList = array();\n\t\t$namesNotFound = array();\n\t\tforeach (array('to', 'bcc') as $recipientType)\n\t\t{\n\t\t\t// First, let's see if there's user ID's given.\n\t\t\t$recipientList[$recipientType] = array();\n\t\t\t$type = 'recipient_' . $recipientType;\n\t\t\tif (!empty($this->_req->post->{$type}) && is_array($this->_req->post->{$type}))\n\t\t\t{\n\t\t\t\t$recipientList[$recipientType] = array_map('intval', $this->_req->post->{$type});\n\t\t\t}\n\n\t\t\t// Are there also literal names set?\n\t\t\tif (!empty($this->_req->post->{$recipientType}))\n\t\t\t{\n\t\t\t\t// We're going to take out the \"s anyway ;).\n\t\t\t\t$recipientString = strtr($this->_req->post->{$recipientType}, array('\\\\\"' => '\"'));\n\n\t\t\t\tpreg_match_all('~\"([^\"]+)\"~', $recipientString, $matches);\n\t\t\t\t$namedRecipientList[$recipientType] = array_unique(array_merge($matches[1], explode(',', preg_replace('~\"[^\"]+\"~', '', $recipientString))));\n\n\t\t\t\t// Clean any literal names entered\n\t\t\t\tforeach ($namedRecipientList[$recipientType] as $index => $recipient)\n\t\t\t\t{\n\t\t\t\t\tif (trim($recipient) !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$namedRecipientList[$recipientType][$index] = Util::htmlspecialchars(Util::strtolower(trim($recipient)));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($namedRecipientList[$recipientType][$index]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Now see if we can resolve the entered name to an actual user\n\t\t\t\tif (!empty($namedRecipientList[$recipientType]))\n\t\t\t\t{\n\t\t\t\t\t$foundMembers = findMembers($namedRecipientList[$recipientType]);\n\n\t\t\t\t\t// Assume all are not found, until proven otherwise.\n\t\t\t\t\t$namesNotFound[$recipientType] = $namedRecipientList[$recipientType];\n\n\t\t\t\t\t// Make sure we only have each member listed once, in case they did not use the select list\n\t\t\t\t\tforeach ($foundMembers as $member)\n\t\t\t\t\t{\n\t\t\t\t\t\t$testNames = array(\n\t\t\t\t\t\t\tUtil::strtolower($member['username']),\n\t\t\t\t\t\t\tUtil::strtolower($member['name']),\n\t\t\t\t\t\t\tUtil::strtolower($member['email']),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (count(array_intersect($testNames, $namedRecipientList[$recipientType])) !== 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$recipientList[$recipientType][] = $member['id'];\n\n\t\t\t\t\t\t\t// Get rid of this username, since we found it.\n\t\t\t\t\t\t\t$namesNotFound[$recipientType] = array_diff($namesNotFound[$recipientType], $testNames);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Selected a recipient to be deleted? Remove them now.\n\t\t\tif (!empty($this->_req->post->delete_recipient))\n\t\t\t{\n\t\t\t\t$recipientList[$recipientType] = array_diff($recipientList[$recipientType], array((int) $this->_req->post->delete_recipient));\n\t\t\t}\n\n\t\t\t// Make sure we don't include the same name twice\n\t\t\t$recipientList[$recipientType] = array_unique($recipientList[$recipientType]);\n\t\t}\n\n\t\t// Are we changing the recipients some how?\n\t\t$is_recipient_change = !empty($this->_req->post->delete_recipient) || !empty($this->_req->post->to_submit) || !empty($this->_req->post->bcc_submit);\n\n\t\t// Check if there's at least one recipient.\n\t\tif (empty($recipientList['to']) && empty($recipientList['bcc']))\n\t\t{\n\t\t\t$post_errors->addError('no_to');\n\t\t}\n\n\t\t// Make sure that we remove the members who did get it from the screen.\n\t\tif (!$is_recipient_change)\n\t\t{\n\t\t\tforeach (array_keys($recipientList) as $recipientType)\n\t\t\t{\n\t\t\t\tif (!empty($namesNotFound[$recipientType]))\n\t\t\t\t{\n\t\t\t\t\t$post_errors->addError('bad_' . $recipientType);\n\n\t\t\t\t\t// Since we already have a post error, remove the previous one.\n\t\t\t\t\t$post_errors->removeError('no_to');\n\n\t\t\t\t\tforeach ($namesNotFound[$recipientType] as $name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$context['send_log']['failed'][] = sprintf($txt['pm_error_user_not_found'], $name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Did they make any mistakes like no subject or message?\n\t\tif ($this->_req->post->subject === '')\n\t\t{\n\t\t\t$post_errors->addError('no_subject');\n\t\t}\n\n\t\tif ($this->_req->getPost('message', 'trim', '') === '')\n\t\t{\n\t\t\t$post_errors->addError('no_message');\n\t\t}\n\t\telseif (!empty($modSettings['max_messageLength']) && Util::strlen($this->_req->post->message) > $modSettings['max_messageLength'])\n\t\t{\n\t\t\t$post_errors->addError('long_message');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Preparse the message.\n\t\t\t$message = $this->_req->getPost('message', 'trim', '');\n\t\t\tpreparsecode($message);\n\n\t\t\t// Make sure there's still some content left without the tags.\n\t\t\tif (Util::htmltrim(strip_tags($bbc_parser->parsePM(Util::htmlspecialchars($message, ENT_QUOTES)), '<img>')) === '' && (!allowedTo('admin_forum') || strpos($message, '[html]') === false))\n\t\t\t{\n\t\t\t\t$post_errors->addError('no_message');\n\t\t\t}\n\t\t}\n\n\t\t// If they made any errors, give them a chance to make amends.\n\t\tif ($post_errors->hasErrors() && !$is_recipient_change && !$this->_req->isSet('preview') && $this->getApi() === false)\n\t\t{\n\t\t\t$this->messagePostError($namedRecipientList, $recipientList);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Want to take a second glance before you send?\n\t\tif ($this->_req->isSet('preview'))\n\t\t{\n\t\t\t// Set everything up to be displayed.\n\t\t\t$context['preview_subject'] = Util::htmlspecialchars($this->_req->post->subject);\n\t\t\t$context['preview_message'] = Util::htmlspecialchars($this->_req->post->message, ENT_QUOTES, 'UTF-8', true);\n\t\t\tpreparsecode($context['preview_message'], true);\n\n\t\t\t// Parse out the BBC if it is enabled.\n\t\t\t$context['preview_message'] = $bbc_parser->parsePM($context['preview_message']);\n\n\t\t\t// Censor, as always.\n\t\t\t$context['preview_subject'] = censor($context['preview_subject']);\n\t\t\t$context['preview_message'] = censor($context['preview_message']);\n\n\t\t\t// Set a descriptive title.\n\t\t\t$context['page_title'] = $txt['preview'] . ' - ' . $context['preview_subject'];\n\n\t\t\t// Pretend they messed up but don't ignore if they really did :P.\n\t\t\t$this->messagePostError($namedRecipientList, $recipientList);\n\n\t\t\treturn false;\n\t\t}\n\t\t// Adding a recipient cause javascript ain't working?\n\t\telseif ($is_recipient_change)\n\t\t{\n\t\t\t// Maybe we couldn't find one?\n\t\t\tforeach ($namesNotFound as $recipientType => $names)\n\t\t\t{\n\t\t\t\t$post_errors->addError('bad_' . $recipientType);\n\t\t\t\tforeach ($names as $name)\n\t\t\t\t{\n\t\t\t\t\t$context['send_log']['failed'][] = sprintf($txt['pm_error_user_not_found'], $name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->messagePostError($namedRecipientList, $recipientList);\n\n\t\t\treturn true;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t$this->_events->trigger('before_sending', array('namedRecipientList' => $namedRecipientList, 'recipientList' => $recipientList, 'namesNotFound' => $namesNotFound, 'post_errors' => $post_errors));\n\t\t}\n\t\tcatch (ControllerRedirectException $e)\n\t\t{\n\t\t\t$this->messagePostError($namedRecipientList, $recipientList);\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// Safety net, it may be a module may just add to the list of errors without actually throw the error\n\t\tif ($post_errors->hasErrors() && !$this->_req->isSet('preview') && $this->getApi() === false)\n\t\t{\n\t\t\t$this->messagePostError($namedRecipientList, $recipientList);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Before we send the PM, let's make sure we don't have an abuse of numbers.\n\t\tif (!empty($modSettings['max_pm_recipients']) && count($recipientList['to']) + count($recipientList['bcc']) > $modSettings['max_pm_recipients'] && !allowedTo(array('moderate_forum', 'send_mail', 'admin_forum')))\n\t\t{\n\t\t\t$context['send_log'] = array(\n\t\t\t\t'sent' => array(),\n\t\t\t\t'failed' => array(sprintf($txt['pm_too_many_recipients'], $modSettings['max_pm_recipients'])),\n\t\t\t);\n\n\t\t\t$this->messagePostError($namedRecipientList, $recipientList);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Protect from message spamming.\n\t\tspamProtection('pm');\n\n\t\t// Prevent double submission of this form.\n\t\tcheckSubmitOnce('check');\n\n\t\t// Finally do the actual sending of the PM.\n\t\tif (!empty($recipientList['to']) || !empty($recipientList['bcc']))\n\t\t{\n\t\t\t$context['send_log'] = sendpm($recipientList, $this->_req->post->subject, $this->_req->post->message, true, null, !empty($this->_req->post->pm_head) ? (int) $this->_req->post->pm_head : 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context['send_log'] = array(\n\t\t\t\t'sent' => array(),\n\t\t\t\t'failed' => array()\n\t\t\t);\n\t\t}\n\n\t\t// Mark the message as \"replied to\".\n\t\t$replied_to = $this->_req->getPost('replied_to', 'intval', 0);\n\t\t$box = $this->_req->getPost('f', 'trim', '');\n\t\tif (!empty($context['send_log']['sent']) && !empty($replied_to) && $box === 'inbox')\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/PersonalMessage.subs.php');\n\t\t\tsetPMRepliedStatus($this->user->id, $replied_to);\n\t\t}\n\n\t\t$failed = !empty($context['send_log']['failed']);\n\t\t$this->_events->trigger('message_sent', array('failed' => $failed));\n\n\t\t// If one or more of the recipients were invalid, go back to the post screen with the failed usernames.\n\t\tif ($failed)\n\t\t{\n\t\t\t$this->messagePostError($namesNotFound, array(\n\t\t\t\t'to' => array_intersect($recipientList['to'], $context['send_log']['failed']),\n\t\t\t\t'bcc' => array_intersect($recipientList['bcc'], $context['send_log']['failed'])\n\t\t\t));\n\n\t\t\treturn false;\n\t\t}\n\t\t// Message sent successfully?\n\t\telse\n\t\t{\n\t\t\t$context['current_label_redirect'] .= ';done=sent';\n\t\t}\n\n\t\t// Go back to the where they sent from, if possible...\n\t\tredirectexit($context['current_label_redirect']);\n\n\t\treturn true;\n\t}", "function sendTelegram($chat_id, $token, $text) {\n\t$disable_web_page_preview = null;\n\t$reply_to_message_id = null;\n\t$reply_markup = null;\n\n\t$data = array(\n\t\t\t\t\t'chat_id' => $chat_id,\n\t\t\t\t\t'text' => $text,\n\t\t\t\t\t'parse_mode' => 'HTML',\n\t\t\t\t\t'disable_web_page_preview' => urlencode($disable_web_page_preview),\n\t\t\t\t\t'reply_to_message_id' => urlencode($reply_to_message_id),\n\t\t\t\t\t'reply_markup' => urlencode($reply_markup)\n\t\t\t);\n\n\t$url = \"https://api.telegram.org/bot\".$token.\"/sendMessage\";\n\n\t// open connection\n\t$ch = curl_init();\n\t// set the url\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// number of POST vars\n\tcurl_setopt($ch, CURLOPT_POST, count($data));\n\t// POST data\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t// To display result of curl\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t// execute post\n\t$result = curl_exec($ch);\n\techo $result;\n\t// close connection\n\tcurl_close($ch);\n}", "private function sendSmsNotification()\n {\n // TODO: Not yet implemented since we have no transport/Gateway for SMS in Netric\n }", "public function send_msg_lhc($from_phone,$from_name,$msg) {\n \n $chat_id = $this->get_chat_data($from_phone)[\"id\"];\n $chat_hash = $this->get_chat_data($from_phone)[\"hash\"];\n \n if($chat_id > 0) $this->send_msg_user($chat_id,$chat_hash,$msg);\n else {\n $chat_id = $this->start_new_chat($from_phone,$from_name,$msg);\n \n }\n \n }", "public function AdminSendMessage(){\n\t\t$send_team=MakeItemString(DispFunc::X1Clean($_POST['sendteam']));\n\t\t$receive_team=MakeItemString(DispFunc::X1Clean($_POST['receiveteam']));\n\t\t\n\t\tModifySql(\"insert into\", X1_DB_messages, \"(randid,messid,message,hasread,steam_id,sender,rteam_id,tstamp) \n\t\tvalues (\".MakeItemString(DispFunc::X1Clean($_POST['randid'])).\", \n\t\t\".MakeItemString(DispFunc::X1Clean($_POST['messagecount'])).\", \n\t\t\".MakeItemString(DispFunc::X1Clean($_POST['x1_hometext'],$cleantype=3)).\", \n\t\t0,\n\t\t\".$send_team.\", \n\t\t\".MakeItemString(DispFunc::X1Clean($_POST['sender'])).\", \n\t\t\".$receive_team.\", \n\t\t\".time().\")\");\n\t\t\n\t\tModifySql(\"update\", X1_DB_teams, \"set totalnmessag=totalnmessag+1 where team_id = \".$receive_team.\" or team_id = \".$send_team);\n\t}", "public function send()\n {\n if ($this->to) {\n $client = new Client($this->sid, $this->auth_token);\n $client->messages->create($this->to, [\n 'from' => $this->sms_from,\n 'body' => $this->message\n ]);\n }\n }", "public function sendNotify()\r\n {\r\n return \\Yii::$app->mailer->compose('/order-window/mail', [\r\n 'model' => $this,\r\n ])\r\n ->setFrom('[email protected]')\r\n ->setTo(\\Yii::$app->params['adminEmail'])\r\n ->setSubject('Order window') \r\n ->send();\r\n }", "function Send($number,$text)\n {\n $this->store[]=\">|~\".$number.\"|~\".urlencode($text).\"\\n\";\n\t\t$phone_number = \"+\".\"$number\";\n\t\t$message = \"$text\";\n\t\t$deviceID = 94618;\n\n\t\t$options = [];\n\n\t\t$smsGateway = new SmsGateway(\"yoursmsGatewaytoken\");\n\t\t$result = $smsGateway->sendMessageToNumber($phone_number, $message, $deviceID, $options);\n }", "static function getWelcomeMsg($postObj){\n $contentStr = \"哈喽,欢迎来到快递鼠。我是鼠小萌。在这里你可以选购大学周边商家的任何商品哦,快递鼠会在45分钟内送到贵府上,而且是免费的哦嘘。目前我们开通了晚上9点到11点的配送,9点前订购的商品我们会在9点统一送出,9点到11点订购的商品,45分钟内送到。之后会开展全天配送以及外卖45分钟免费送上宿舍服务。希望大家支持鼠小萌哦。http://www.kuaidishu.com/\";\n return WeChatCallbackMsgMaker::getTextMsg($postObj, $contentStr);\n }", "public function sendPoll()\n {\n $clients = Client::all();\n\n foreach ($clients as $client) {\n\n //send poll\n Telegram::sendText($client->id_telegram, \"<b>\". $this->title . \"</b>\" . \"\\n\" . $this->description);\n\n //send questions\n foreach ($this->questions as $question) {\n\n $responses = [];\n foreach ($question->responses as $response) {\n $responses['{\"question_id\": \"'. $question->id .'\", \"id\": \"'. $response->id .'\"}'] = $response->text;\n }\n\n if ($question->type == 'multiple') {\n $responses['{\"question_id\": \"'. $question->id .'\", \"command\": \"finish\"}'] = trans('polls::messages.finish question');\n }\n else if ($question->type == 'text') {\n $responses['{\"question_id\": \"'. $question->id .'\", \"command\": \"answer\"}'] = trans('polls::messages.answer the question');\n }\n\n Telegram::sendInlineButtons($client->id_telegram, $responses, $question->text);\n }\n }\n }", "static function sendMessage($chatID, $messaggio, $token, $html = false) {\n\n\n $url = \"https://api.telegram.org/\" . $token . \"/sendMessage?chat_id=\" . $chatID;\n $url = $url . \"&text=\" . urlencode(utf8_encode( $messaggio) );\n \n if ( $html ){\n $url .= \"&parse_mode=HTML\";\n }\n \n $minha_curl = curl_init();\n\n curl_setopt($minha_curl , CURLOPT_URL, $url);\n curl_setopt ($minha_curl, CURLOPT_HEADER, 0);\n\n curl_setopt($minha_curl,CURLOPT_TIMEOUT, (9*60*60 ) );\n curl_setopt($minha_curl,CURLOPT_CONNECTTIMEOUT, 0 );\n curl_setopt($minha_curl, CURLOPT_FOLLOWLOCATION, 1);// allow redirects\n curl_setopt($minha_curl, CURLOPT_RETURNTRANSFER,1);\n curl_setopt($minha_curl, CURLOPT_FRESH_CONNECT,1);\n curl_setopt($minha_curl, CURLOPT_SSL_VERIFYPEER,0 );\n \n \n /* \n $optArray = array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true\n );\n curl_setopt_array($ch, $optArray);\n * \n */\n $result = curl_exec($minha_curl);\n curl_close($minha_curl);\n\n if ( Util::request(\"debug\") == \"1\"){\n echo(\"<br>\". $url . \" <br> Final: \" . $result );\n }\n }", "function handleMessageText($sender_psid,$text) {\n $response = \n [\n \"text\" => $text \n ];\n callSendAPI($sender_psid, $response);\n }" ]
[ "0.5862283", "0.5785913", "0.5775614", "0.5773614", "0.56479365", "0.5639527", "0.56319785", "0.5608547", "0.55953115", "0.5564486", "0.5545675", "0.55411017", "0.55100965", "0.54947746", "0.548206", "0.54176587", "0.54149806", "0.54130536", "0.5409517", "0.5399508", "0.53968644", "0.5392081", "0.5389654", "0.53868216", "0.53810763", "0.53643245", "0.535002", "0.5349487", "0.5338199", "0.5327257" ]
0.6501176
0
returns rule type to validation method map
protected function getRuleTypesMethodMap(): array { return [ //text validator 'text' => 'validateText', // date validator 'date' => 'validateDate', //integer validation methods 'int' => 'validateInteger', 'pint' => 'validatePInteger', 'nint' => 'validateNInteger', //number validation methods 'float' => 'validateFloat', 'pfloat' => 'validatePFloat', 'nfloat' => 'validateNFloat', //boolean validation 'bool' => '', //email validation 'email' => 'validateEmail', //url validation 'url' => 'validateURL', //choice validation 'choice' => 'validateChoice', //range validation 'range' => 'validateRange', //file validation 'file' => 'validateFile', //image file validation 'image' => 'validateImage', //audio file validation 'audio' => 'validateAudio', //video file validation 'video' => 'validateVideo', //media file validation 'media' => 'validateMedia', //document file validation 'document' => 'validateDocument', 'archive' => 'validateArchive', //password validation 'password' => 'validatePassword' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidationRules()\n {\n $rules = [];\n\n foreach (get_class_methods(get_called_class()) as $method) {\n if (preg_match('/^get[A-Za-z]+ValidationRule$/', $method)) {\n $rules = array_merge($rules, call_user_func([$this, $method]));\n }\n }\n\n return $rules;\n }", "function getRuleHandler($rule) {\n if ($rule === \"email\") {\n return array(\"isEmail\",array()); \n }\n elseif ($rule === \"number\") {\n return array(\"isNumber\",array());\n }\n elseif ($rule === \"url\") {\n return array(\"isUrl\",array());\n }\n elseif ($rule === \"required\") {\n return array(\"isProvided\", array());\n }\n elseif (substr($rule, 0, 3) === \"max\") {\n $num = explode(\"[\", substr($rule, 0 , -1));\n return array(\"isMaxLength\",array($num[1]));\n }\n elseif (substr($rule, 0, 3) === \"min\") {\n $num = explode(\"[\", substr($rule, 0 , -1));\n return array(\"isMinLength\", array($num[1]));\n }\n else {\n return ;\n }\n}", "public function rules()\n {\n return $this->{$this->getCallableValidationMethod()}();\n }", "public function getValidationRules();", "public function getValidationRules()\n {\n return [\n 'name' => 'required',\n 'type' => 'required',\n ];\n }", "abstract public function getValidationRules(): array;", "public function rules()\n {\n $actionMethod = $this->route()->getActionMethod();\n switch ($actionMethod) {\n case \"login\":\n return [\n 'phone' => 'required',\n 'code' => 'required',\n 'key' => 'required',\n ];\n break;\n case \"refreshToken\":\n return [\n 'refresh_token' => 'required',\n ];\n break;\n case \"sendSmsCode\":\n return [\n 'phone' => 'required',\n ];\n break;\n case \"resetPassword\":\n $rules = [\n 'step' => 'required|integer|in:1,2,3',\n\n ];\n switch ($this->input('step')) {\n case 1:\n $rules['phone'] = 'required|string';\n break;\n case 2:\n $rules['code'] = 'required|string';\n $rules['key'] = 'required|string';\n break;\n case 3:\n $rules['key'] = 'required|string';\n $rules['password'] = 'required|string';\n break;\n }\n return $rules;\n break;\n\n }\n }", "public function validationRules(): array\n {\n return [\n 'required' => ['message', 'type'],\n ];\n }", "public function rules()\n {\n if (request()->isMethod(\"post\")) {\n return [\n \"type_create_name_en\" => config(\"rules.name_en\").\"|unique:types,name_en\",\n \"type_create_name_ar\" => config(\"rules.name_ar\").\"|unique:types,name_ar\",\n \"type_create_description_en\" => config(\"rules.edit_description_en\"),\n \"type_create_description_ar\" => config(\"rules.edit_description_ar\"),\n ];\n } elseif (request()->isMethod(\"patch\")) {\n return [\n \"type_edit_name_en\" => config(\"rules.edit_name_en\").\"|unique:types,name_en,\".request(\"type\"),\n \"type_edit_name_ar\" => config(\"rules.edit_name_ar\").\"|unique:types,name_ar,\".request(\"type\"),\n \"type_edit_description_en\" => config(\"rules.edit_description_en\"),\n \"type_edit_description_ar\" => config(\"rules.edit_description_ar\"),\n ];\n } elseif (request()->isMethod(\"delete\")) {\n return [\n\n ];\n }\n }", "public function validationRules(): array;", "private function getRules($type = \"rules\") {\n if($type == \"rules\") {\n return array(\n 'date' => 'required'\n );\n\n } else {\n return array(\n 'date.required' => \"date es requerido\"\n );\n }\n }", "public function rules()\n {\n $rules = [\n 'code' => 'required|max:255',\n 'symbol' => 'required|max:255',\n 'rate' => 'required|numeric'\n ];\n return RuleHelper::get_rules($this->method(), $rules);\n }", "public function getFieldValidationRules();", "public static function getRules()\n {\n $rules = [\n 'relason' => 'required',\n 'lift_date' => 'required'\n ];\n return $rules;\n }", "public function rules()\n {\n $rule = [\n 'value' => 'bail|required|boolean',\n ];\n\n if($this->getMethod() == 'POST'){\n $rule += ['type' => 'bail|required'];\n }\n\n return $rule;\n }", "public function rules()\n {\n $requestType = $this->get('update_type', 'base_info');\n $type = [\n 'update_type' => 'required'\n ];\n if (!in_array($this->get('update_type'), array_keys($this->rules))) {\n return $type;\n }\n return array_merge($type, $this->rules[$requestType]);\n }", "public function rules()\n {\n $rules = [\n 'annotation' => 'required',\n 'approve_status' => 'required',\n ];\n\n if ($this->input('type') == 'wr3'){\n $rules = array_add($rules, 'incentive_id', 'required');\n }\n\n return $rules;\n }", "protected function getValidateType($key, $rule)\n {\n // Determine the verification type\n if (!is_numeric($key)) {\n return [$key, $rule, $key];\n }\n\n if (strpos($rule, ':')) {\n list($type, $rule) = explode(':', $rule, 2);\n if (isset($this->alias[$type])) {\n // Judge alias\n $type = $this->alias[$type];\n }\n $info = $type;\n } elseif (method_exists($this, $rule)) {\n $type = $rule;\n $info = $rule;\n $rule = '';\n } else {\n $type = 'is';\n $info = $rule;\n }\n\n return [$type, $rule, $info];\n }", "public function rules()\n {\n $named = $this->route()->getName();\n switch ($named) {\n case 'business.auth.link':\n return [\n 'type' => 'required'\n ];\n case 'business.invite.link':\n return [\n 'type' => 'required'\n ];\n case 'business.invite.auth':\n return [\n 'signature' => 'required|size:72'\n ];\n default:\n return [];\n }\n }", "public static function loadRuleTypes()\n\t{\n\t\t$ruletypes=array('0'=> 'The Twitter Username', '1'=>'The Twitter Message');\n\t\treturn $ruletypes;\n\t}", "public function get_validation_rules($type = 'update')\n {\n if ($type != 'update') {\n return parent::get_validation_rules($type);\n }\n\n // When updating, add the role_name update rule.\n $validationRules = parent::get_validation_rules($type);\n $validationRules = array_merge($validationRules, $this->updateValidationRules);\n\n return $validationRules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'name' => 'required',\n // 'account_name' => 'required',\n 'email' => 'required|string|email',\n 'password' => ['required', 'string', 'min:8','max:16', new PasswordValidateRule()],\n 'password_confirm' => 'required|string|same:password',\n // 'departments' => 'sometimes|required|string',\n // 'roles' => 'sometimes|required|string',\n 'mobile' => ['required', new PhoneNumberValidate()]\n ];\n case \"PUT\":\n return [\n 'name' => 'required',\n // 'account_name' => 'required',\n 'email' => 'required|string|email',\n // 'password' => ['required', 'string', 'min:8','max:16', new PasswordValidateRule()],\n // 'password_confirm' => 'required|string|same:password',\n // 'departments' => 'sometimes|required|string',\n // 'roles' => 'sometimes|required|string',\n 'mobile' => ['required', new PhoneNumberValidate()]\n ];\n default:\n break;\n }\n\n }", "public static function getValidatorRules()\n\t{\n\t $rules = array('username' => 'required|max:100|unique:users',\n\t 'email_address' => 'required|email|max:255|unique:users|confirmed',\n\t 'email_address_confirmation' => 'required|email|max:255|',\n\t 'password' => 'required|min:5|max:100|confirmed',\n\t 'password_confirmation' => 'required|min:5|max:100',\n\t 'birthday' => 'required|date',\n\t 'gender' => 'required|in:male,female');\n return $rules;\n\t}", "public function getValidationRules(): array\n {\n return [\n new ParameterValidationRule(\n // Tried to use the Respect 'in' rule here, but it automatically typecast integer values, so I had\n // to use a callback function instead.\n new Callback(function ($value) {\n return isset(static::BOOLEAN_MAP[(string) $value]);\n }),\n sprintf('must be one of: %s', implode(', ', array_keys(static::BOOLEAN_MAP)))\n )\n ];\n }", "public function getRules()\n {\n $arguments = func_get_args();\n\n $rules = call_user_func_array([$this, 'rules'], $arguments);\n $argsRules = [];\n foreach ($this->inputFields() as $name => $arg) {\n if (isset($arg['rules'])) {\n if (is_callable($arg['rules'])) {\n $argsRules[$name] = call_user_func_array($arg['rules'], $arguments);\n } else {\n $argsRules[$name] = $arg['rules'];\n }\n }\n }\n\n return array_merge($argsRules, $rules);\n }", "protected function getRules() {\n \n return [\n 'email' => ['email', 'string', 'nullable'],\n 'name' => ['string', 'nullable'],\n ];\n }", "public function rules()\n {\n $rules = [];\n switch($this->method())\n {\n case 'POST':\n {\n $rules = [\n 'name' => 'required|min:5|max:20|',\n 'email' => 'required|email|unique:branches,email',\n 'mobile' => 'required|string|min:9|max:20|unique:branches,mobile',\n 'hotline' => 'required|string|min:4|max:20|unique:branches,land_line',\n 'user_id' => 'required',\n \"address\" => \"required|string\",\n \"lng\" => \"required\",\n \"lat\" => \"required\",\n ];\n }\n break;\n case 'PATCH':\n {\n $rules = [\n 'name' => 'required|min:5|max:20|',\n 'email' => 'required|email',\n 'mobile' => 'required|string|min:9|max:20',\n 'hotline' => 'required|string|min:4|max:20',\n 'user_id' => 'required',\n \"address\" => \"required|string\",\n ];\n }\n break;\n default:\n break;\n }\n return $rules;\n\n }", "private function getRules()\n {\n return array(\n 'department' => 'required|regex:/^[\\w -=@]+$/',\n 'class' => 'required|regex:/^[\\w -=@]+$/',\n 'code' => 'required|regex:/^[\\w -=@]+$/',\n 'year level' => 'required|numeric|min:3|max:12',\n 'number of students' => 'required|numeric',\n 'teacher' => 'required',\n 'role' => 'required|regex:/^[a-z\\d\\-_\\s]+$/i|in:Teacher,Department Head,Department head',\n 'email' => 'required|email'\n );\n }", "public function rules()\n {\n if (static::getPathInfo() == '/api/signup') {\n return [\n 'phone' => $this->getPhoneRule(),\n 'geetest_challenge' => 'required|geetest',\n ];\n }else if (static::getPathInfo() == '/api/smscode') {\n return [\n 'phone' => $this->getPhoneRule(),\n ];\n } else {\n return [\n 'smscode' => [\n 'bail',\n 'required',\n 'regex: /^[0-9]{6}$/',\n 'smsexist', // 在服务容器中注册的Validator extend 扩展的规则\n 'smserror',\n ],\n 'username' => [\n 'bail',\n 'required',\n 'unique:users',\n 'regex: /^[1][0-9]{1}-[\\x{4e00}-\\x{9fa5}]{2,4}-[\\x{4e00}-\\x{9fa5}]{2,4}$/u',\n ],\n 'password' => [\n 'bail',\n 'required',\n 'regex: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/',\n ],\n ];\n }\n }", "abstract public function getRules();" ]
[ "0.67571396", "0.670435", "0.66957974", "0.66940296", "0.66409975", "0.6547517", "0.6539882", "0.6539358", "0.65139544", "0.6489963", "0.647053", "0.6457505", "0.6420326", "0.636994", "0.6358212", "0.63094115", "0.6302862", "0.6290631", "0.6271786", "0.625875", "0.62144536", "0.62031054", "0.61938316", "0.61888146", "0.61758953", "0.61689895", "0.61571854", "0.6156228", "0.6147449", "0.61392874" ]
0.790235
0
tests if a value is falsy
protected function valueIsFalsy($value) { $value = strval($value); if (preg_match('/^(false|off|0|nil|null|no|undefined)$/i', $value) || $value === '') return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function to_be_falsy() {\n $this->report(! $this->value, 'to be falsy');\n }", "public function isFalsy($value)\n {\n return $value === false || $value === null || $value === '' || $value === 0 || $value === [];\n }", "function not($value) {\n return !$value;\n}", "public function isTruthy($value)\n {\n return !$this->isFalsy($value);\n }", "public final function IsFalse($value)\n\t{\n\t\treturn (strtolower($value) === 'false' || $value === '0' || $value === 0 || $value === false || $value === '');\n\t}", "public static function func_not( $value ) {\n\t\treturn (int) ! (bool) $value;\n\t}", "public static function not($value): bool\n {\n return \\phln\\logic\\not($value);\n }", "protected final function assertFalse($value) {\n\t\t$this->assertTrue(!(bool) $value);\n\t}", "public function isEmptyValue()\n\t{\n\t\treturn $this->value === null;\n\t}", "protected function _isEmpty($value)\r\n {\r\n return (empty($value) && ($value !== 0 || $value !== \"0\"));\r\n }", "public function isempty( $value ) {\n\t\treturn null === $value || '' === $value || false === $value;\n\t}", "public function notNull($value): bool\n {\n return !is_null($value);\n }", "function perform_logic_negation ($value) {\n return ($value) ? false : true;\n }", "public static function notBlank($value) {\n\t\treturn $value === 0 || $value === 0.0 || $value === '0' || !empty($value);\n\t}", "public function isEmptyValue($value)\n {\n return ($value == null || $value == '' || $value == \"''\");\n }", "function has_presence($value)\n\t\t {\n\t\t return isset($value)&& $value !==\"\";\n\t\t }", "function has_presence($value) {\n return !is_blank($value);\n }", "function has_presence($value)\n {\n return !is_blank($value);\n }", "public function isTruthy(): bool {\n\t\treturn (bool) $this->value->getVariables();\n\t}", "public function to_be_false() {\n $this->report($this->value === false, 'to be false');\n }", "public function to_be_truthy() {\n $this->report($this->value, 'to be truthy');\n }", "public static function isFalsey( $value, $options ) {\n\n $result = false;\n\n $keywords = [\n 'nada',\n 'nil',\n 'nay',\n 'nah',\n 'negative',\n 'no',\n 'none',\n 'nope',\n 'null',\n 'nix',\n 'nyet',\n 'uh-oh',\n 'veto',\n 'zero',\n 'false',\n '0'\n ];\n\n if( is_null($value) ) $result = true;\n if( $value === false ) $result = true;\n if( $value === 0 ) $result = true;\n if( in_array((string) $value, $keywords) ) $result = true;\n\n if( $result ) return (isset($options['fn']) ? $options['fn']() : true);\n\n return (isset($options['inverse']) ? $options['inverse']() : false);\n\n }", "public static function notNullValue()\n {\n return Hamcrest_Core_IsNull::notNullValue();\n }", "function notEmpty($val) {\n\treturn !empty($val);\n}", "final public function null(): bool {\n\t\treturn !$this->optionBool(self::OPTION_NOT_NULL);\n\t}", "function notEmpty($val) {\n return !empty($val);\n}", "function none($str) {\n return ($str == \"\");\n }", "public function isNegated(): bool;", "public static function isTruthy( $value, $options ) {\n\n $result = true;\n\n $keywords = [\n 'nada',\n 'nil',\n 'nay',\n 'nah',\n 'negative',\n 'no',\n 'none',\n 'nope',\n 'null',\n 'nix',\n 'nyet',\n 'uh-oh',\n 'veto',\n 'zero',\n 'false',\n '0'\n ];\n\n if( is_null($value) ) $result = false;\n if( $value === false ) $result = false;\n if( $value === 0 ) $result = false;\n if( in_array((string) $value, $keywords) ) $result = false;\n\n if( $result ) return (isset($options['fn']) ? $options['fn']() : true);\n\n return (isset($options['inverse']) ? $options['inverse']() : false);\n\n }", "function is_not_empty( $value, $key = '', array $data = array() ) {\n\treturn ! empty( $value );\n}" ]
[ "0.8423208", "0.7959246", "0.734555", "0.7203569", "0.7203141", "0.70231557", "0.70087874", "0.69602174", "0.6936901", "0.693382", "0.6929911", "0.68974596", "0.68422025", "0.68120855", "0.6800547", "0.67589587", "0.67435175", "0.66583455", "0.6649016", "0.6598859", "0.6578169", "0.6574511", "0.6551014", "0.6542201", "0.65292835", "0.6502425", "0.6499975", "0.64947754", "0.646267", "0.6461898" ]
0.82371765
1
returns true if the field type is a file type
protected function isFileField(string $field) { switch($this->_rule_options[$field]['type']) { case 'file': case 'media': return true; default: return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFile()\n {\n return $this->inType(FieldTypeCollection::getFileTypes());\n }", "public function isFile ()\n {\n return $this->type == EntryType::FILE;\n }", "public function isFile()\n {\n return $this['kind'] === 'FILE';\n }", "function imagefield_file_is_image($file) {\r\n $file = (object)$file;\r\n return in_array($file->filemime, array('image/jpg', 'image/pjpeg', 'image/jpeg', 'image/png', 'image/gif'));\r\n}", "function isFile($name){\n\t\treturn is_a($this->get($name), 'PostedFile');\n\t}", "public function isFile(): bool;", "function is_allowed_filetype()\n\t{\n\t\tif (count($this->allowed_types) == 0 OR ! is_array($this->allowed_types))\n\t\t{\n\t\t\t$this->set_error('upload_no_file_types');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tforeach ($this->allowed_types as $val)\n\t\t{\n\t\t\tif($val == strtolower(trim($this->file_ext, \".\"))){\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t}\n\t\t/*\t \t\n\t\tforeach ($this->allowed_types as $val)\n\t\t{\n\t\t\t$mime = $this->mimes_types(strtolower($val));\n\t\t\n\t\t\tif (is_array($mime))\n\t\t\t{\n\t\t\t\tif (in_array($this->file_type, $mime, TRUE))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($mime == $this->file_type)\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\t\n\t\t\t}\t\t\n\t\t}\n\t\t*/\n\t\treturn FALSE;\n\t}", "protected function _types() {\n return $this->_cond(\n !in_array($_FILES[$this->_name]['type'], $this->_types),\n 'el tipo de archivo no es válido'\n );\n }", "public static function is_file($value)\n\t{\n\t\treturn $value instanceof AgaviUploadedFile;\n\t}", "public function hasFile()\n {\n foreach ($this->fields() as $field) {\n if ($field instanceof UploadField) {\n return true;\n }\n }\n\n return false;\n }", "function is_valid_type($file)\t{\n\t $valid_types = array(\"image/jpg\", \"image/jpeg\", \"image/bmp\", \"image/gif\");\n\n\t if (in_array($file['type'], $valid_types))\n\t return 1;\n\t return 0;\n\t}", "public function isFile(): bool\n {\n return $this->filename !== null;\n }", "public function getIsFile() : bool {\n return $this->isFilename;\n }", "function rules_condition_file_is_type(&$file, $settings) {\n static $regexps;\n\n if (!isset($regexps[$settings['filemime']])) {\n $regexps[$settings['filemime']] = '/^('. preg_replace(array('/(\\r\\n?|\\n)/', '/\\\\\\\\\\*/'), array('|', '.*'), preg_quote($settings['filemime'], '/')) .')$/';\n }\n return (preg_match($regexps[$settings['filemime']], $file->filemime) > 0) ? TRUE : FALSE;\n}", "public function isFile()\n {\n if(!$this->isValid())\n return false;\n\n return $this->file->isFile;\n }", "public function isFile()\n {\n return in_array($this->messageEvent,\n [\n Events::AUDIO,\n Events::DOCUMENT,\n Events::PHOTO,\n Events::STICKER,\n Events::VIDEO,\n ]);\n }", "public function canConvert(FieldItemInterface $value) : bool\n {\n return $value instanceof FileItem;\n }", "public function getType() {\n\t\treturn 'file';\n\t}", "function filetype ($filename) {}", "function isSupportedFileType($filetype)\n\t{\n\t\t$allowFileTypes = array(\n\t\t\t'text/csv' => 'csv',\n\t\t\t'text/x-csv' => 'csv',\n\t\t\t'text/comma-separated-values' => 'csv',\n\t\t\t'application/csv' => 'csv',\n\t\t\t'application/excel' => 'csv',\n\t\t\t'application/vnd.ms-excel' => 'csv',\n\t\t\t'application/vnd.msexcel' => 'csv',\n\t\t\t'text/anytext' => 'csv',\n\t\t\t'text/x-vcard' => 'vcf',\n\t\t\t'application/vcard' => 'vcf',\n\t\t\t'text/anytext' => 'vcf',\n\t\t\t'text/directory' => 'vcf',\n\t\t\t'text/x-vcalendar' => 'vcf',\n\t\t\t'application/x-versit' => 'vcf',\n\t\t\t'text/x-versit' => 'vcf',\n\t\t\t'application/octet-stream' => 'ldif',\n\t\t);\n\n\t\treturn array_key_exists($filetype, $allowFileTypes);\n\t}", "protected function _validatesTypes()\n {\n // Verifica que sea un archivo de imagen\n if (!$this->_imgInfo) return FALSE;\n\n foreach ($this->_types as $type) {\n if ($this->_imgInfo['mime'] == \"image/$type\") return TRUE;\n }\n\n return FALSE;\n }", "function mime_content_type($filename): string|false {}", "function validateMimeType(&$Model, $fieldData) {\n extract($this->settings[$Model->alias]);\n \n if ($allowedMimes == '*' || in_array($fieldData[$fileField]['type'], $allowedMimes)) {\n return true;\n } \n \n return false;\n\t}", "public function getFileType()\n\t{\n\t\treturn $this->file_type;\n\t}", "static function check_mime_types ($data, $args) {\n $field = $args[\"field\"];\n $arr_file = $data[$field];\n $allowedMimeTypes = $args[\"allowedMimeTypes\"];\n \n \n \tif ($allowedMimeTypes AND $arr_file[\"type\"]) { \t\t\n \tif (!in_array($arr_file[\"type\"],$allowedMimeTypes)) {\n \t\treturn false;\n \t} \n }\n return true;\t \n }", "public function getType()\n {\n return 'file';\n }", "public function getType()\n {\n return 'file';\n }", "public function isFile() {\n return is_file($this->__full_path);\n }", "public static function is_type_file($path) {\n\t\t//--\n\t\t$path = (string) $path;\n\t\t//--\n\t\tif((string)trim((string)$path) == '') {\n\t\t\tself::log_warning(__METHOD__.'() // Skip: Empty Path');\n\t\t\treturn false;\n\t\t} //end if\n\t\t//--\n\t\tclearstatcache(true, $path);\n\t\t//--\n\t\treturn (bool) is_file($path);\n\t\t//--\n\t}", "public function filetypes()\n\t{\n\t}" ]
[ "0.83074707", "0.760364", "0.7388128", "0.7264779", "0.7176498", "0.71460646", "0.70643854", "0.70384973", "0.70218223", "0.6992324", "0.6850097", "0.6825379", "0.68141824", "0.67321616", "0.67298216", "0.67039275", "0.6668989", "0.664786", "0.66287714", "0.6623827", "0.65983665", "0.6595401", "0.6569339", "0.6554753", "0.65231824", "0.6522911", "0.6522911", "0.6484821", "0.64580184", "0.64535886" ]
0.76886475
1
resolve db checks 'check' rule, replace all doesnot, doesnt with not, replace exists with exist
public function resolveDBChecks(array $db_check): array { $if = Util::value('if', $db_check, null); if (!is_null($if)) { $db_check['if'] = preg_replace( [ '/(doesnot|doesnt)/', '/exists/' ], [ 'not', 'exist' ], strtolower($if) ); } return $db_check; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_check() {\n // Find strings in locales_source that have no data in i18n_string\n $query = db_select('locales_source', 'l')\n ->fields('l')\n ->condition('l.textgroup', $this->textgroup);\n $alias = $query->leftJoin('i18n_string', 's', 'l.lid = s.lid');\n $query->isNull('s.lid');\n foreach ($query->execute()->fetchAll() as $string) {\n $i18nstring = $this->build_string($string->context, $string->source);\n $this->save_string($i18nstring);\n }\n }", "public function checkIntegrity($check)\n\t{\n\t\tforeach ($this->importers as &$importer) {\n\t\t\t$importer->db->createCommand()->checkIntegrity($check)->execute();\n\t\t}\n\t}", "protected function _prepare_exists() {\n\t\treturn $this->_prepare_missing('exists') ;\n\t}", "public function forceCheck();", "public static function check(): void\n {\n self::checkDatabase();\n self::checkTable();\n }", "protected function checkDB() {\n }", "abstract public function check();", "abstract public function check();", "abstract public function check();", "public abstract function check();", "abstract protected function doCheck();", "public function check_dbase($fix=false) {\n\t\t\n\t\tif ($this->dbase_has_been_checked) return false;\n\n\t\t$db= $this->db;\n\t\t$errors= array();\n\t\t\n\t\t//iterate each module\n\t\tforeach ($this->modules as $mod=>$module) {\n\t\t\tif (!$module->get_setting('store_in_db')) continue;\n\t\t\t\n\t\t\t$table= $module->get_setting('store_db_table');\n\t\t\t$daytable=$module->get_setting('store_db_table_day');\n\t\t\t\n\t\t\t//check table - periodic\n\t\t\t$query= \"show tables like ':table' \";\t\t\n\t\t\t$params= array('table'=>$table);\n\t\t\t$result= $db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\tif (!$db->num_rows($result)) {\n\t\t\t\tif ($fix) {\n\t\t\t\t\t$query= \"\n\t\t\t\t\t\tcreate table `:table` (\n\t\t\t\t\t\t\tid int unsigned primary key auto_increment,\n\t\t\t\t\t\t\tcode tinyint unsigned,\n\t\t\t\t\t\t\tdate_created datetime,\n\t\t\t\t\t\t\tindex date (date_created)\n\t\t\t\t\t\t);\n\t\t\t\t\t\";\n\t\t\t\t\t$params= array('table'=>$table);\n\t\t\t\t\t$db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\t\t}\n\t\t\t\telse $errors[]= \"Table: $table missing\";\n\t\t\t}\n\t\t\t\n\t\t\t//check table - day\n\t\t\t$query= \"show tables like ':daytable' \";\t\t\n\t\t\t$params= array('daytable'=>$daytable);\n\t\t\t$result= $db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\tif (!$db->num_rows($result)) {\n\t\t\t\tif ($fix) {\n\t\t\t\t\t$query= \"\n\t\t\t\t\t\tcreate table `:daytable` (\n\t\t\t\t\t\t\tid int unsigned primary key auto_increment,\n\t\t\t\t\t\t\tcode tinyint unsigned,\n\t\t\t\t\t\t\tdate_created date,\n\t\t\t\t\t\t\tindex date (date_created)\n\t\t\t\t\t\t);\n\t\t\t\t\t\";\n\t\t\t\t\t$params= array('daytable'=>$daytable);\n\t\t\t\t\t$db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\t\t}\n\t\t\t\telse $errors[]= \"Table: $daytable missing\";\n\t\t\t}\n\n\t\t\t//check columns - periodic\n\t\t\t$query= \"\n\t\t\t\tselect column_name from information_schema.columns \n\t\t\t\twhere table_name= ':table' \n\t\t\t\";\t\t\n\t\t\t$params= array('table'=>$table);\n\t\t\t$result= $db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\t$done= array();\n\t\t\twhile ($row= $db->fetch_row($result)) {\n\t\t\t\t$done[$row['column_name']]= true;\n\t\t\t}\n\t\t\tforeach ($module->datapoints as $label=>$datapoint) {\n\t\t\t\tif (!$datapoint->store) continue;\n\t\t\t\tif ($datapoint->interval<>'periodic') continue;\n\t\t\t\tif (!isset($done[$label])) {\n\t\t\t\t\tif ($fix) {\n\t\t\t\t\t\t$query= \"alter table `:table` add `:label` varchar(12)\";\t\t\n\t\t\t\t\t\t$params= array('table'=>$table,'label'=>$label);\n\t\t\t\t\t\t$db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\t\t\t}\n\t\t\t\t\telse $errors[]= \"Column: $label ($table) missing\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//check columns - day\n\t\t\t$query= \"\n\t\t\t\tselect column_name from information_schema.columns \n\t\t\t\twhere table_name= ':table' \n\t\t\t\";\t\t\n\t\t\t$params= array('table'=>$daytable);\n\t\t\t$result= $db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\t$done= array();\n\t\t\twhile ($row= $db->fetch_row($result)) {\n\t\t\t\t$done[$row['column_name']]= true;\n\t\t\t}\n\t\t\tforeach ($module->datapoints as $label=>$datapoint) {\n\t\t\t\tif (!$datapoint->store) continue;\n\t\t\t\tif ($datapoint->interval<>'day') continue;\n\t\t\t\tif (!isset($done[$label])) {\n\t\t\t\t\tif ($fix) {\n\t\t\t\t\t\t$query= \"alter table `:table` add `:label` varchar(12)\";\t\t\n\t\t\t\t\t\t$params= array('table'=>$daytable,'label'=>$label);\n\t\t\t\t\t\t$db->query($query,$params) or codeerror('DB error',__FILE__,__LINE__);\n\t\t\t\t\t}\n\t\t\t\t\telse $errors[]= \"Column: $label ($daytable) missing\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//done\n\t\tif ($errors) return $errors;\n\t\telse {\n\t\t\t$this->dbase_has_been_checked= true;\n\t\t\treturn false;\n\t\t}\n\t}", "private static function checkSchema(){\n global $adb;\n $result = $adb->pquery(\"show columns from ms_duplicatecheck like ?\", array('save_blocker_status'));\n if (!($adb->num_rows($result))) {\n $adb->pquery(\"ALTER TABLE `ms_duplicatecheck` ADD `save_blocker_status` TINYINT( 1 ) NOT NULL DEFAULT '0'\", array());\n }\n }", "public function checkIntegrity(string $schema = '', string $table = '', bool $check = true): string\n {\n return 'PRAGMA foreign_keys=' . (int) $check;\n }", "function sql_check($query)\n\t{\n\t\tsql_connect();\n\t\tglobal $defaultdb;\n\t\t$return = $defaultdb->check($query);\n\t\treturn $return;\n\t}", "public function check();", "public function check();", "public function check();", "public function check();", "public function check();", "public function check();", "function ForceLinkChecks($forcechecks=false)\n\t{\n\t\t$this->forcechecks = (bool)$forcechecks;\n\t}", "public function check(){}", "public function checkDB() {\n global $CFG, $db;\n \n $sqlfile = \"{$CFG->dirroot}/search/db/$CFG->dbtype.sql\";\n $ret = false;\n if ($this->checkTableExists()) {\n execute_sql('drop table '.$CFG->prefix.SEARCH_DATABASE_TABLE, false);\n }\n\n //turn output buffering on - to hide modify_database() output\n ob_start(); \n $ret = modify_database($sqlfile, '', false);\n\n //chuck the buffer and resume normal operation\n ob_end_clean(); \n return $ret;\n }", "public function checkIfExists(){\n $query = \"SELECT * \";\n $query .= \" FROM sources \";\n $query .= \" WHERE title= '\" . $this->title . \"'\";\n $query .= \" AND srcId = '\" . $this->srcId . \"'\";\n $query .= \" AND srcType = 'b'\"; \n $total = self::findBySqlCount($query);\n if($total > 0){\n return true;\n }\n return false;\n }", "public function testDNSResolution($check_context, $manual_checks = false, $automatic_repair = false, $use_test_data_for_pass = null)\n {\n if ($check_context == CHECK_CONTEXT__INSTALL) {\n return;\n }\n\n if ($this->is_localhost_domain()) {\n return;\n }\n\n if (php_function_allowed('checkdnsrr')) {\n $domains = $this->get_domains();\n\n foreach ($domains as $domain) {\n $this->assert_true(@checkdnsrr($domain, 'A'), 'DNS does not seem to be set up properly for [tt]' . $domain . '[/tt]');\n }\n } else {\n $this->state_check_skipped('PHP checkdnsrr function not available');\n }\n }", "function checkChange(&$change)\n{\n\tglobal $db_type, $databases, $db_connection;\n\tstatic $database_version, $where_field_support;\n\n\t$db = load_database();\n\n\t// Attempt to find a database_version.\n\tif (empty($database_version))\n\t{\n\t\t$database_version = $db->version_check();\n\t\t$where_field_support = $db_type == 'mysql' && version_compare('5.0', $database_version, '<=');\n\t}\n\n\t// Not a column we need to check on?\n\tif (!in_array($change['name'], array('memberGroups', 'passwordSalt')))\n\t{\n\t\treturn;\n\t}\n\n\t// Break it up you (six|seven).\n\t$temp = explode(' ', str_replace('NOT NULL', 'NOT_NULL', $change['text']));\n\n\t// Can we support a shortcut method?\n\tif ($where_field_support)\n\t{\n\t\t// Get the details about this change.\n\t\t$request = $db->query('', '\n\t\t\tSHOW FIELDS\n\t\t\tFROM {db_prefix}{raw:table}\n\t\t\tWHERE Field = {string:old_name} OR Field = {string:new_name}',\n\t\t\tarray(\n\t\t\t\t'table' => $change['table'],\n\t\t\t\t'old_name' => $temp[1],\n\t\t\t\t'new_name' => $temp[2],\n\t\t\t));\n\t\tif ($request->num_rows() != 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tlist (, $current_type) = $request->fetch_assoc();\n\t\t$request->free_result();\n\t}\n\telse\n\t{\n\t\t// Do this the old fashion, sure method way.\n\t\t$request = $db->query('', '\n\t\t\tSHOW FIELDS\n\t\t\tFROM {db_prefix}{raw:table}',\n\t\t\tarray(\n\t\t\t\t'table' => $change['table'],\n\t\t\t)\n\t\t);\n\t\t// Mayday!\n\t\tif ($request->num_rows() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t// Oh where, oh where has my little field gone. Oh where can it be...\n\t\twhile ($row = $request->fetch_assoc())\n\t\t{\n\t\t\tif ($row['Field'] == $temp[1] || $row['Field'] == $temp[2])\n\t\t\t{\n\t\t\t\t$current_type = $row['Type'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// If this doesn't match, the column may of been altered for a reason.\n\tif (trim($current_type) != trim($temp[3]))\n\t{\n\t\t$temp[3] = $current_type;\n\t}\n\n\t// Piece this back together.\n\t$change['text'] = str_replace('NOT_NULL', 'NOT NULL', implode(' ', $temp));\n}", "function CheckIfAlreadyExist($db, $data_check, $data_send){\r\n\r\n\t\t\t$req=$db->prepare('SELECT '.$data_check.' FROM members where '.$data_check.' =:'.$data_check.'');\r\n\t\t\t$req->execute(array(\r\n\t\t\t$data_check=>$data_send\r\n\t\t\t));\r\n\r\n\t\t\t$result=$req->fetch();\r\n\t\t\t$req->closeCursor();\t\r\n\t\t\treturn $result;\r\n\t}", "private function check()\n\t{\n\t\tif (!file_exists($this->database))\n\t\t{\n\t\t\t$this->data = $this->populate();\n\t\t\tfile_put_contents($this->database, PHPPREFIX.base64_encode(gzdeflate(serialize($this->data))).PHPSUFFIX);\n\t\t}\n\t}", "function reality_check ($activity, $check) {\n\n\t$legal = array (1 => 'BCFG','BLDU','BLSA','BLSN','BLPY','DRDU',\n\t\t\t\t\t\t'DRSA','DRSN','FZDZ','FZFG','FZRA','MIFG',\n\t\t\t\t\t\t'PRFG','SHGR','SHGS','SHPL','SHRA','SHSN',\n\t\t\t\t\t\t'TSGR','TSGS','TSPL','TSRA','TSSN');\n\t\n\t$legal_count = count ($legal);\n\t\n\tswitch ($check) {\n\t\tcase 'precip':\n\t\t\t$combo = $activity['descriptor'] . $activity['precipitation'];\n\t\t\t\n\t\t\tfor ($i = 0; $i < $legal_count; $i++) {\n\t\t\t\tif ($combo == $legal[$i]) {\n\t\t\t\t\treturn $activity;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'obscur':\n\t\t\t$combo = $activity['descriptor'] . $activity['obscuration'];\n\t\t\t\n\t\t\tfor ($i = 0; $i < $legal_count; $i++) {\n\t\t\t\tif ($combo == $legal[$i]) {\n\t\t\t\t\treturn $activity;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\n\t\tcase 'other':\n\t\t\t$combo = $activity['descriptor'] . $activity['other'];\n\t\t\t\n\t\t\tfor ($i = 0; $i < $legal_count; $i++) {\n\t\t\t\tif ($combo == $legal[$i]) {\n\t\t\t\t\treturn $activity;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn '';\n}" ]
[ "0.5910612", "0.5841103", "0.5479854", "0.5304891", "0.5242471", "0.51994723", "0.5195976", "0.5195976", "0.5195976", "0.51780623", "0.5173949", "0.51648843", "0.5082657", "0.49726197", "0.49508178", "0.49506646", "0.49506646", "0.49506646", "0.49506646", "0.49506646", "0.49506646", "0.4891541", "0.48287317", "0.4824579", "0.48174706", "0.47944897", "0.47735035", "0.47656864", "0.47586906", "0.4752309" ]
0.6926293
0
returns db checks array for the given field throws KeyNotFoundException
public function getDBChecks(string $key) { if (array_key_exists($key, $this->_db_checks)) return $this->_db_checks[$key]; else throw new KeyNotFoundException('field with given key: ' . $key . ' not set'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function existsField($key){ return array_key_exists($key,$this->field_map); }", "public function existsField($key){ return array_key_exists($key,$this->field_map); }", "private static function check_field(array $_fields, $_field) {\n\n\t\tif(!count(array_filter($_fields, function($_item) use ($_field) {\n\t\t\treturn $_item->field==$_field;\n\t\t}))) {\n\t\t\tthrow new db_query_exception(\"El modelo no contiene el campo de busqueda '$_field'\");\n\t\t}\n\t}", "static function checkField($field){\n\t\tif (self::$legalField[$field]) {\n\t\t\treturn self::$legalField[$field];\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "abstract protected function getLookupFields();", "abstract function getIndexableFields();", "function fieldExists($field);", "abstract public function getKeyField();", "public function checkForField( $field, $table );", "public function dexists($key, $field)\n {\n $model = $this->getModel();\n foreach ($model[$key] as $currentField=>$value) {\n if ($currentField === $field) {\n return true;\n }\n }\n return false;\n }", "function validateField($conexion, $query)\r\n{\r\n $execute = mysqli_query($conexion, $query) or die('Error');\r\n \r\n $result = mysqli_num_rows($execute);\r\n \r\n $array = [\r\n 'bool' => true,\r\n 'executeQuery' => $execute,\r\n ]; \r\n \r\n if ($result == 1) //Es primary key \r\n {\r\n return $array;\r\n }\r\n else\r\n {\r\n $array['bool'] = false;\r\n $array['executeQuery'] = null;\r\n return $array;\r\n } \r\n}", "public static function findField($info, $field, $idx = \"all\") {\n\t if (!isset($info['count'])) {\n\t return [];\n }\n\t\t$separator = \";\";\n\t\t$values = [];\n\t\tfor ($i = 0; $i < $info['count']; $i++) {\n\t\t\t$line = $info[$i];\n\t\t\t$value = \"\";\n\t\t\tforeach ($line as $var => $results) {\n\t\t\t\tif ($var == $field) {\n\t\t\t\t\tif (isset($results['count'])) {\n\t\t\t\t\t\t$r = array();\n\t\t\t\t\t\tfor ($j = 0; $j < $results['count']; $j++) {\n\t\t\t\t\t\t\tarray_push($r, $results[$j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value = implode($separator, $r);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($values, $value);\n\t\t}\n\t\tif (isset($_GET['test'])) {\n\t\t echo \"findField values: \".json_encode($values).\"<br>\\n\";\n\t\t echo \"findField idx: $idx<br>\\n\";\n }\n\t\tif ($idx === \"all\") {\n if (isset($_GET['test'])) {\n echo \"findField return all $idx<br>\\n\";\n }\n return $values;\n } else if (isset($values[$idx])) {\n if (isset($_GET['test'])) {\n echo \"findField return index $idx: \".json_encode($values[$idx]).\"<br>\\n\";\n }\n return $values[$idx];\n } else {\n\t\t throw new \\Exception(\"Could not find index $idx for uid $field\");\n }\n\t}", "private function getCheckableFields()\n {\n return array('index', 'city', 'countryIso', 'text', 'region');\n }", "protected function get($field) {\n\t\treturn $this->userData->get($field, 'field_not_found');\n\t}", "protected abstract function getDbFields();", "public function fields($fieldName)\n {\n $return = array();\n if (count($entityIDs = $this->findEntityIDs())) {\n // Check if our entity has this field\n $fieldID = &static::$fieldNames[$fieldName];\n if (isset($fieldID)) {\n $return = $this->query\n ->entity(\\samsoncms\\api\\MaterialField::ENTITY)\n ->where(Material::F_PRIMARY, $entityIDs)\n ->where(Field::F_PRIMARY, $fieldID)\n ->where(\\samsoncms\\api\\MaterialField::F_DELETION, true)\n ->fields(static::$virtualFieldValueColumns[$fieldID]);\n } elseif (property_exists(static::$identifier, $fieldName)) {\n // TODO: Generalize real and virtual entity fields and manipulations with them\n // Set filtered entity identifiers\n $this->where(Material::F_PRIMARY, $entityIDs);\n // If this is parent field\n return parent::fields($fieldName);\n } else {\n throw new EntityFieldNotFound($fieldName);\n }\n }\n\n //elapsed('Finish SamsonCMS '.static::$identifier.' query');\n\n return $return;\n }", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in CrawlerTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in CrawlerTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "function fk_check ($keyfield, $value) {\n\tglobal $RELATIONS, $DB;\n\n\tforeach ( $RELATIONS as $table => $keys ) {\n\t\tforeach ( $keys as $key => $foreign ) {\n\t\t\tif ( $foreign == $keyfield ) {\n\t\t\t\t$c = $DB->q(\"VALUE SELECT count(*) FROM $table WHERE $key = %s\",\n\t\t\t\t\t$value);\n\t\t\t\tif ( $c > 0 ) return $table;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}", "function validate_user_exists(string $field_value, array &$field): bool\n{\n if (!App::$db->getRowWhere('users', ['email' => $field_value])) {\n $field['error'] = \"This user doesn't exist\";\n\n return false;\n }\n\n return true;\n}", "public function offsetExists($field) {\n return isset($this->values[$field]) || isset($this->factories[$field]);\n }", "public function getFieldByKey($fieldKey) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[$fieldKey])) return $this->_result[$fieldKey];\n\t\t\telse parent::throwGetColException('CrawlerTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('CrawlerTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getFieldFromInfo( string $field ) {\n $indexInfo = $this->getInfo();\n if ( empty( $indexInfo) || !is_array( $indexInfo ) ) {\n return FALSE;\n }\n\n return $indexInfo['index_definition'][ $field ];\n }", "public function findByField($field, $value, $cls)\n {\n $table = $this->getDbTable();\n $select = $table->select();\n $result = array();\n\n $rows = $table->fetchAll($select->where(\"{$field} = ?\", $value));\n foreach ($rows as $row) {\n $cls=new Default_Model_Bugs();\n $result[]=$cls;\n $cls->setBugId($row->bug_id)\n\t\t->setBugDescription($row->bug_description)\n\t\t->setBugStatus($row->bug_status)\n\t\t->setReportedBy($row->reported_by)\n\t\t->setAssignedTo($row->assigned_to)\n\t\t->setVerifiedBy($row->verified_by);\n }\n return $result;\n }", "private function _checkKey($key, $array){\n return array_key_exists($key, $array) ? $array[$key] : NULL;\n }", "abstract public function getFieldsSearchable(): array;", "function fieldSelect($table,$fields){\n\tglobal $db;\n\t$return_fields=array(); \n\t$sql=\"SHOW COLUMNS FROM {$table}\";\n\t$res=$db->query($sql);\n\t\twhile ($row=$db->fetch_row($res)){\t\t\t\n\t\t\t$existing_fields[]=$row['Field'];\n\t\t}\n\t#$existing_fields=$db->GetFields($table);\n\t#print__r($existing_fields);\n\t\tif(!is_array($existing_fields)) return false;\n\t\tforeach((array)$fields as $field=>$value){\t\t\t\n\t\t\tif (in_array($field,$existing_fields)){\n\t\t\t\t$return_fields[$field]=$value;\n\t\t\t}\n\t\t}\n\treturn $return_fields;\n}", "public function getFields(string $field): array\n {\n $keys = \\explode('.', $field);\n $field = \\array_pop($keys);\n $parentKeys = $keys;\n\n $searchIn = $this;\n foreach ($parentKeys as $key) {\n $searchIn = $searchIn->$key ?? new self();\n }\n\n $searchInKeys = \\array_keys($searchIn->toArray());\n\n $matchingFields = \\preg_grep('/(^|\\|)' . \\preg_quote($field, '/') . '(_c)?$/', $searchInKeys);\n\n $foundFields = [];\n foreach ($matchingFields as $matchingField) {\n $fieldKeys = \\array_merge($parentKeys, [$matchingField]);\n $foundFields[\\implode('.', $fieldKeys)] = $searchIn->$matchingField;\n }\n\n return $foundFields;\n }", "function is_key($field_spec_array)\n {\n $primary_key=false;\n //echo_array($field_spec_array);\n if (array_key_exists('key',$field_spec_array))\n {\n\n if ($field_spec_array['key']=='PRI'){\n $primary_key=array('name'=>$field_spec_array['name'],\n 'auto_increment'=>NULL\n );\n }\n else\n {\n $primary_key=false;\n }\n if ((isset($primary_key))&& ($field_spec_array['extra']=='auto_increment'))\n {\n $auto_increment=true;\n $primary_key['auto_increment']=true;\n }\n else\n {\n $auto_increment=false;\n return false;\n }\n\n }\n return $primary_key;\n }", "public function fieldExistsInDB($field) {\n $result = db_select('visualscience_search_config', 'c')\n ->fields('c', array('name'))\n ->condition('name', $field['name'])\n ->range(0, 1)\n ->execute()\n ->rowCount();\n\n if ($result) {\n return TRUE;\n }\n return FALSE;\n }", "function get_query_field( $items, $field ) {\r\n $result = array();\r\n foreach ( $items as $a ) {\r\n $result[] = $a[$field];\r\n }\r\n return $result;\r\n\r\n}" ]
[ "0.6223558", "0.6223558", "0.5892606", "0.5782882", "0.5700629", "0.56923944", "0.5675006", "0.5656462", "0.56558174", "0.5589347", "0.55893403", "0.5508076", "0.54873705", "0.54819804", "0.5467535", "0.5400206", "0.53969234", "0.5385567", "0.53640723", "0.53597677", "0.5357253", "0.5343242", "0.53276193", "0.53127456", "0.5312469", "0.52768564", "0.5259325", "0.5244709", "0.52445585", "0.5243329" ]
0.71124643
0
defines a field that should be skipped while mapping to a model
public function modelSkipField(string $field) { if (!in_array($field, $this->_model_skip_fields)) array_push($this->_model_skip_fields, $field); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ignore()\n {\n $this->definition->setIgnored(true);\n }", "public function ignoreUnmappedProperties()\n {\n $this->verifyAllPropertiesMapped = false;\n }", "public function modelSkipFields(array $fields)\n {\n array_walk($fields, [$this, 'modelSkipField']);\n return $this;\n }", "public function skipField($field)\n {\n $this->fields[$field] = 0;\n return $this;\n }", "public function getIgnoreEnableFields() {\n\t\treturn TRUE;\n\t}", "abstract public function fieldSetNoDefault(&$ret, $table, $field);", "public function skip_validation()\n {\n $this->_skip_validation = TRUE;\n\n return $this;\n }", "function getModelFields() {\n $fields = parent::getModelFields();\n foreach ($fields as $key => &$field) {\n switch ($key){\n case false:break;//needed\n case 'field10':\n case 'field11':\n case 'field12':\n case 'field13':\n case 'field14':\n case 'field15':\n case 'field16':\n case 'field17':\n case 'field18':\n $field['type'] = 'boolean';\n unset($field['useNull']);\n break;\n }\n }\n \n $fields['created'] = array(\n 'name' => 'created',\n 'type' => 'date', \n 'dateFormat' => 'Y-m-d H:i:s',\n 'persist' => 1,\n );\n \n return $fields;\n }", "public function get_skip_validation()\n {\n return $this->skip_validation;\n }", "public function noModified()\n\t{\n\t\t$this->_input->setAttribute('readonly');\n\t\t$this->_input->setAttribute('class', 'bn-nomodified');\n\t}", "public function skip_validation()\n {\n $this->skip_validation = TRUE;\n return $this;\n }", "public function resetFallback($strField);", "public static function ignoreAnnotations() {}", "protected function _getIgnored_fields()\n\t{\n\t\t$core_ignore = array(\n\t\t\t'fields',\n\t\t\t'service',\n\t\t\t'model',\n\t\t\t'table',\n\t\t\t'ignored',\n\t\t\t'loaded',\n\t\t\t'primary_key',\n\t\t);\n\t\treturn Arr::merge($this->_ignored, $core_ignore);\n\t}", "public function testAddNotIndexedField()\n {\n $mapping = new Mapping('FooBar');\n $this->assertFalse($mapping->hasProperty('field1'));\n\n // add field1, no copyTo\n $mapping->addNotIndexedField('field1');\n $this->assertTrue($mapping->hasProperty('field1'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'no',\n 'include_in_all' => false,\n ),\n ), $mapping->compile());\n\n // add same field again, with one copyTo\n $mapping->addNotIndexedField('field1', array('field1_copy1'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'no',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field1_copy1',\n )\n ),\n ), $mapping->compile());\n\n // add new field, with one copyTo\n $mapping->addNotIndexedField('field2', array('field2_copy1'));\n $this->assertTrue($mapping->hasProperty('field2'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'no',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field1_copy1',\n )\n ),\n 'field2' => array(\n 'type' => 'string',\n 'index' => 'no',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field2_copy1',\n )\n ),\n ), $mapping->compile());\n\n // add field1 again, with one more copyTo\n $mapping->addNotIndexedField('field1', array('field1_copy2'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'no',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field1_copy1',\n 'field1_copy2',\n )\n ),\n 'field2' => array(\n 'type' => 'string',\n 'index' => 'no',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field2_copy1',\n )\n ),\n ), $mapping->compile());\n }", "public function not($fieldName, $modelTableData = [], $sqlLogical = Query_Builder::SQL_LOGICAL_AND)\n {\n return $this->eq([$fieldName => 0], $modelTableData, $sqlLogical);\n }", "public function testAddNotAnalyzedField()\n {\n $mapping = new Mapping('FooBar');\n $this->assertFalse($mapping->hasProperty('field1'));\n\n // add field1, no copyTo\n $mapping->addNotAnalyzedField('field1');\n $this->assertTrue($mapping->hasProperty('field1'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'not_analyzed',\n 'include_in_all' => false,\n ),\n ), $mapping->compile());\n\n // add same field again, with one copyTo\n $mapping->addNotAnalyzedField('field1', array('field1_copy1'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'not_analyzed',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field1_copy1',\n )\n ),\n ), $mapping->compile());\n\n // add new field, with one copyTo\n $mapping->addNotAnalyzedField('field2', array('field2_copy1'));\n $this->assertTrue($mapping->hasProperty('field2'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'not_analyzed',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field1_copy1',\n )\n ),\n 'field2' => array(\n 'type' => 'string',\n 'index' => 'not_analyzed',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field2_copy1',\n )\n ),\n ), $mapping->compile());\n\n // add field1 again, with one more copyTo\n $mapping->addNotAnalyzedField('field1', array('field1_copy2'));\n $this->assertSame(array(\n 'field1' => array(\n 'type' => 'string',\n 'index' => 'not_analyzed',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field1_copy1',\n 'field1_copy2',\n )\n ),\n 'field2' => array(\n 'type' => 'string',\n 'index' => 'not_analyzed',\n 'include_in_all' => false,\n 'copy_to' => array(\n 'field2_copy1',\n )\n ),\n ), $mapping->compile());\n }", "public function fieldMapping() : string {\n return $this->configGet('field_mapping', '');\n }", "public function filterExclude($excludedFields = [])\n {\n array_push($excludedFields, 'primary_key_id_name');\n array_push($excludedFields, 'pk');\n array_push($excludedFields, 'session');\n array_push($excludedFields, 'database');\n\n foreach ($this as $field => $value) {\n if (in_array($field, $excludedFields)) {\n unset($this->$field);\n }\n }\n\n// $this->removeStaticFields();\n }", "public function onGenerateFormField($field){\n\t\treturn;\n\t}", "public function setNonFields($defs)\n {\n foreach ($defs as $field => $def) {\n $field = strtolower($field);\n if (!isset($this->_fielddefs[$field]) || (isset($def['usage']) && $def['usage'] == 'query_only')) {\n $this->nonFields[$field] = $def;\n }\n }\n }", "abstract protected function field_default();", "function excludeFields(array $fields) {\n\t\t$this->fields = array_diff($this->fields, $fields);\n\t}", "#[GQL\\Field(name: 'anotherName')]\n public function getStaticStringField(): string\n {\n return 'This field is not mapped but I can select it';\n }", "public function setExcludeNone()\n {\n $this->setExclusionPolicy(EntityConfig::EXCLUSION_POLICY_NONE);\n }", "protected function excludeField($fieldName)\n {\n $this->excludedFields[] = $fieldName;\n }", "public function defindFields()\n {\n return $this->belongsTo('Modules\\Dynamicfield\\Entities\\Field', 'field_id', 'id');\n }", "protected function hideFieldsForAddEdit()\n {\n }", "public function bootstrapIgnore($field) {\n\t\t$this->ignores[$field] = true;\n\n\t\treturn $this->owner;\n\t}", "protected function onUpdateMandatoryFieldMissing($fieldname)\n\t{\n\t\treturn false;\n\t}" ]
[ "0.6134157", "0.5941213", "0.5895277", "0.57944787", "0.5707481", "0.56616664", "0.56017596", "0.55717117", "0.5570494", "0.556884", "0.5549525", "0.554594", "0.5542531", "0.5538821", "0.5534817", "0.5496239", "0.54256856", "0.54154074", "0.5412046", "0.5410963", "0.5368223", "0.535619", "0.534142", "0.53374827", "0.533304", "0.53197527", "0.5284218", "0.52767134", "0.5212109", "0.5207704" ]
0.6237943
0
defines array of fields that should be skipped while mapping to a model
public function modelSkipFields(array $fields) { array_walk($fields, [$this, 'modelSkipField']); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getIgnored_fields()\n\t{\n\t\t$core_ignore = array(\n\t\t\t'fields',\n\t\t\t'service',\n\t\t\t'model',\n\t\t\t'table',\n\t\t\t'ignored',\n\t\t\t'loaded',\n\t\t\t'primary_key',\n\t\t);\n\t\treturn Arr::merge($this->_ignored, $core_ignore);\n\t}", "function getModelFields() {\n $fields = parent::getModelFields();\n foreach ($fields as $key => &$field) {\n switch ($key){\n case false:break;//needed\n case 'field10':\n case 'field11':\n case 'field12':\n case 'field13':\n case 'field14':\n case 'field15':\n case 'field16':\n case 'field17':\n case 'field18':\n $field['type'] = 'boolean';\n unset($field['useNull']);\n break;\n }\n }\n \n $fields['created'] = array(\n 'name' => 'created',\n 'type' => 'date', \n 'dateFormat' => 'Y-m-d H:i:s',\n 'persist' => 1,\n );\n \n return $fields;\n }", "public function filterExclude($excludedFields = [])\n {\n array_push($excludedFields, 'primary_key_id_name');\n array_push($excludedFields, 'pk');\n array_push($excludedFields, 'session');\n array_push($excludedFields, 'database');\n\n foreach ($this as $field => $value) {\n if (in_array($field, $excludedFields)) {\n unset($this->$field);\n }\n }\n\n// $this->removeStaticFields();\n }", "function excludeFields(array $fields) {\n\t\t$this->fields = array_diff($this->fields, $fields);\n\t}", "public function getIgnoredFields() {\r\n\t\t$list = array('item_id', 'lang_id', 'fran_id', 'item_status');\r\n\t\treturn $list; //array\r\n\t}", "public function ignoreUnmappedProperties()\n {\n $this->verifyAllPropertiesMapped = false;\n }", "private function getNotSetFields() : array\n {\n $notSet = [];\n foreach ($this->getData() as $fieldName => $value) {\n if (!isset($_POST[$fieldName])) {\n $notSet[] = $fieldName;\n }\n }\n return $notSet;\n }", "protected function prepareDataForMapping()\n {\n $data = $this->getRequestData();\n\n // Remove fields in the $excludedFields list from the data for mapping\n if (!empty($this->excludedFields)) {\n foreach ($data as $key => $value) {\n if (in_array($key, $this->excludedFields)) {\n unset($data[$key]);\n }\n }\n }\n\n return $data;\n }", "static function getNoRegFields()\n\t{\n\t\t$fields = array(\n\t\t\t\t'name',\n\t\t\t\t'first_name',\n\t\t\t\t'last_name',\n\t\t\t\t'email',\n\t\t\t\t'address1',\n\t\t\t\t'address2',\n\t\t\t\t'city',\n\t\t\t\t'region',\n\t\t\t\t'region_name',\n\t\t\t\t'country',\n\t\t\t\t'postal_code',\n\t\t\t\t'vat_number',\n\t\t\t\t'phone',\n\t\t\t\t'mobile',\n\t\t\t\t'tos',\n\t\t\t\t'shipping_first_name',\n\t\t\t\t'shipping_last_name',\n\t\t\t\t'shipping_add_address',\n\t\t\t\t'shipping_address1',\n\t\t\t\t'shipping_address2',\n\t\t\t\t'shipping_city',\n\t\t\t\t'shipping_region',\n\t\t\t\t'shipping_region_name',\n\t\t\t\t'shipping_country',\n\t\t\t\t'shipping_postal_code'\n\t\t);\n\n\t\t\n\t\treturn $fields;\n\t}", "protected function __getFieldsModel()\n {\n }", "public function skipFields(array $fields)\n {\n $this->fields = array_fill_keys($fields, 0);\n return $this;\n }", "public static function getUnUsedFields(){\n\t\treturn array('divider', 'end_divider', 'file');\n\t}", "public function setNonFields($defs)\n {\n foreach ($defs as $field => $def) {\n $field = strtolower($field);\n if (!isset($this->_fielddefs[$field]) || (isset($def['usage']) && $def['usage'] == 'query_only')) {\n $this->nonFields[$field] = $def;\n }\n }\n }", "public function getMappingFields()\n {\n if ($this->_importFields !== NULL) {\n return $this->_importFields;\n }\n\n $importFields = array(\n 'order_info' => array(\n 'label' => '-- Order Information -- ',\n 'disabled' => true\n ),\n 'order_number' => array(\n 'label' => 'Order Number *',\n 'default_value_disabled' => true\n ),\n 'tracking_number' => array('label' => 'Tracking Number'),\n 'carrier_code' => array(\n 'label' => 'Shipping Carrier Code',\n 'default_values' => $this->getDefaultValues('shipping_carriers')\n ),\n 'carrier_name' => array('label' => 'Shipping Carrier Name'),\n 'order_status' => array(\n 'label' => 'Order Status',\n 'default_values' => $this->getDefaultValues('order_status')\n ),\n 'order_status_history_comment' => array('label' => 'Order History Comment'),\n //'custom1' => array('label' => 'Custom Data 1'),\n //'custom2' => array('label' => 'Custom Data 2'),\n 'item_info' => array(\n 'label' => '-- Item Information -- ',\n 'disabled' => true\n ),\n 'sku' => array(\n 'label' => 'SKU',\n 'default_value_disabled' => true\n ),\n 'qty' => array('label' => 'Quantity'),\n );\n\n $this->_importFields = $importFields;\n\n return $this->_importFields;\n }", "private function getExcludedFields()\n {\n //List of all the section names to be excluded\n return [\"Theme\", \"Storage\", \"Core\", \"Logs\", \"Hidden\", \"Memcached\", \"Redis\", \"AWS\", \"Pusher\", \"Mix Pusher\", \"HiddenDb\", \"Mail\", \"Stripe\"];\n }", "protected function getDefaultFields(): array\n {\n return [\n 'banana',\n 'address'\n ];\n }", "public function getIgnoreEnableFields() {\n\t\treturn TRUE;\n\t}", "public function prepareFields()\n { \n return collect($this->fields)->map(function($field) {\n return array_merge(['field' => $field['layout']], $field['attributes']);\n });\n }", "public function getSafeFields(){\n //$safe= array_intersect($this->primaryKey();\n $safe=[];\n foreach($this->attributes as $nombre=>$valor){\n if($this->isAttributeSafe($nombre)){\n $safe[]=$nombre; \n }\n }\n \n return $safe; \n \n }", "public function skip()\n {\n $fields = func_get_args();\n\n if (is_array($fields)) {\n $fields = array_flatten($fields);\n }\n\n if (count($fields) == 1 && is_string($fields[0])) {\n $fields = (array) $fields[0];\n }\n\n $this->skips = $fields;\n\n return $this;\n }", "protected function getExcludeFields()\n {\n $languageService = $this->getLanguageService();\n $finalExcludeArray = [];\n\n // Fetch translations for table names\n $tableToTranslation = [];\n // All TCA keys\n foreach ($GLOBALS['TCA'] as $table => $conf) {\n $tableToTranslation[$table] = $languageService->sL($conf['ctrl']['title']);\n }\n // Sort by translations\n asort($tableToTranslation);\n foreach ($tableToTranslation as $table => $translatedTable) {\n $excludeArrayTable = [];\n\n // All field names configured and not restricted to admins\n if (is_array($GLOBALS['TCA'][$table]['columns'])\n && empty($GLOBALS['TCA'][$table]['ctrl']['adminOnly'])\n && (empty($GLOBALS['TCA'][$table]['ctrl']['rootLevel']) || !empty($GLOBALS['TCA'][$table]['ctrl']['security']['ignoreRootLevelRestriction']))\n ) {\n foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $_) {\n if ($GLOBALS['TCA'][$table]['columns'][$field]['exclude']) {\n // Get human readable names of fields\n $translatedField = $languageService->sL($GLOBALS['TCA'][$table]['columns'][$field]['label']);\n // Add entry, key 'labels' needed for sorting\n $excludeArrayTable[] = [\n 'labels' => $translatedTable . ':' . $translatedField,\n 'sectionHeader' => $translatedTable,\n 'table' => $table,\n 'tableField' => $field,\n 'fieldName' => $field,\n 'fullField' => $field,\n 'fieldLabel' => $translatedField,\n 'origin' => 'tca',\n ];\n }\n }\n }\n // All FlexForm fields\n $flexFormArray = $this->getRegisteredFlexForms($table);\n foreach ($flexFormArray as $tableField => $flexForms) {\n // Prefix for field label, e.g. \"Plugin Options:\"\n $labelPrefix = '';\n if (!empty($GLOBALS['TCA'][$table]['columns'][$tableField]['label'])) {\n $labelPrefix = $languageService->sL($GLOBALS['TCA'][$table]['columns'][$tableField]['label']);\n }\n // Get all sheets\n foreach ($flexForms as $extIdent => $extConf) {\n // Get all fields in sheet\n foreach ($extConf['sheets'] as $sheetName => $sheet) {\n if (empty($sheet['ROOT']['el']) || !is_array($sheet['ROOT']['el'])) {\n continue;\n }\n foreach ($sheet['ROOT']['el'] as $pluginFieldName => $field) {\n // Use only fields that have exclude flag set\n if (empty($field['TCEforms']['exclude'])) {\n continue;\n }\n $fieldLabel = !empty($field['TCEforms']['label'])\n ? $languageService->sL($field['TCEforms']['label'])\n : $pluginFieldName;\n $excludeArrayTable[] = [\n 'labels' => trim($translatedTable . ' ' . $labelPrefix . ' ' . $extIdent, ': ') . ':' . $fieldLabel,\n 'sectionHeader' => trim(($translatedTable . ' ' . $labelPrefix . ' ' . $extIdent), ':'),\n 'table' => $table,\n 'tableField' => $tableField,\n 'extIdent' => $extIdent,\n 'fieldName' => $pluginFieldName,\n 'fullField' => $tableField . ';' . $extIdent . ';' . $sheetName . ';' . $pluginFieldName,\n 'fieldLabel' => $fieldLabel,\n 'origin' => 'flexForm',\n ];\n }\n }\n }\n }\n // Sort fields by the translated value\n if (!empty($excludeArrayTable)) {\n usort($excludeArrayTable, function (array $array1, array $array2) {\n $array1 = reset($array1);\n $array2 = reset($array2);\n if (is_string($array1) && is_string($array2)) {\n return strcasecmp($array1, $array2);\n }\n return 0;\n });\n $finalExcludeArray = array_merge($finalExcludeArray, $excludeArrayTable);\n }\n }\n\n return $finalExcludeArray;\n }", "public function testKeepWithFieldsOnModelWithoutAccessors()\n {\n $fakeObjectWithAppends = new FakeObjectWithoutAppends([\n 'firstname' => 'joe',\n 'lastname' => 'doe'\n ]);\n\n $result = $fakeObjectWithAppends->lighter()->keep(['firstname', 'fullname'])->toArray();\n\n if(array_key_exists('firstname', $result)){\n $this->assertTrue(true);\n }else{\n $this->assertTrue(false);\n }\n }", "public function modelSkipField(string $field)\n {\n if (!in_array($field, $this->_model_skip_fields))\n array_push($this->_model_skip_fields, $field);\n\n return $this;\n }", "private function get_uninherited_attributes()\n {\n $attributes = array();\n foreach (self::$uninherited_db_fields as $field) {\n if (property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "private function _find_fields() {\n\t\t$result = $this->db->fields($this->_table);\n\t\t$this->_fields = array_diff($result, array('id'));\n\t}", "public function removeAllFields() {\n\t\t$this->_fields = [];\n\t}", "public function getUnsetFields(): array\n {\n return ['build_id'];\n }", "public function fillable() : array\n {\n return array_values(array_diff($this->fields->pluck('field')->toArray(), $this->defaultGuarded));\n }", "public function setIgnoredMappings(array $ignoredMappings): self;", "public function ignore($fields)\n {\n $this->ignored = array_merge($this->ignored, (array) $fields);\n\n return $this;\n }" ]
[ "0.6701118", "0.6691858", "0.66611713", "0.6494589", "0.646675", "0.6170655", "0.6158139", "0.61010283", "0.60824525", "0.59981817", "0.59391034", "0.5918811", "0.5881924", "0.58741814", "0.58702075", "0.586376", "0.58194226", "0.577702", "0.57088155", "0.56996167", "0.5671518", "0.5666768", "0.5662753", "0.564217", "0.56413466", "0.56412464", "0.56220716", "0.5616078", "0.5601428", "0.55759495" ]
0.689039
0
Get current timestamp string with format Y/m/d H:i:s.
public function getCurrentTimestampString() { $cm = new \DateTime(); return $cm->format('Y/m/d H:i:s'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getCurrentTimeStamp(): string\n {\n return date('D M j Y H:i:s \\G\\M\\TO', time());\n }", "public static function getCurrentTimestamp()\n {\n $dt = new DateTime('now', new DateTimeZone('UTC'));\n\n return $dt->format(static::DATE_FORMAT);\n }", "public function dateTimeNow(): string\n {\n return date('d-m-Y H:i:s');\n }", "public static function get_time_stamp() {\n return gmdate(\"Y-m-d\\TH:i:sP\");\n }", "protected function getCurrentTimestamp()\n\t{\n\t\treturn time();\n\t}", "private function getNow() {\n\t\treturn date('D M d Y H:i:s');\n\t}", "protected static function getTimestamp() {\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\n }", "function GetCurrentTime()\n{\n\treturn date('Y-m-d H:i:s');\n}", "public function get_current_date(){\n\t\treturn date('Y-m-d H:i:s');\n\t}", "private function getTimeStamp()\n {\n return date('r');\n }", "protected function now() {\n return date( 'Y-m-d H:i:s' );\n }", "function get_current_date_time() {\n\treturn date(\"Y-m-d H:i\");\n}", "public function get_time_stamp() {\n $timeformat = get_string('strftimedatetime', 'core_langconfig');\n return userdate(time(), $timeformat);\n }", "public function getTimestamp()\r\n {\r\n return gmdate('Y/m/d H:i:s', $this->timestamp);\r\n }", "public static function getTimeStamp()\n {\n return gmdate(\"Y-m-d\\TH:i:s\\Z\");\n }", "public static function getCurrentTimestamp() {\n\t\t$timestamp=mktime(date('h'), date('i'), date('s'), self::getCurrentMonth() , self::getCurrentDay(), self::getCurrentYear());\n\treturn $timestamp;\n}", "function timestamp() {\r\n return date('Y-m-d H:i:s') . '.' . self::msecond();\r\n }", "protected function getNow()\n\t{\n\t\treturn date('Y-m-d');\n\t}", "public function dateNow()\n {\n return date('Y-m-d H:i:s');\n }", "public static function getDateTimeNow(){\n return date('Y-m-d H:i:s',time());\n }", "function dateTimeStamp()\n\t\t{\n\t\t\treturn date(\"m/d/y h:i:s\",$this->time);\n\t\t}", "protected function getCurrentTime()\n {\n $seconds = time() - $this->time;\n return gmdate('H:i:s', $seconds);\n }", "public function getCurrentTime ()\n {\n return self::_getFormattedTime();\n }", "function getNowDate()\n {\n $nowDate = @strftime('%Y-%m-%d %H:%M', time());\n\n return $nowDate;\n }", "function getNowDate()\n {\n $nowDate = @strftime('%Y-%m-%d %H:%M', time());\n\n return $nowDate;\n }", "public static function getTimestampValue()\n {\n return date('Y-m-d H:i:s');\n }", "function Now(): string {\n $d = new DateTime();\n return $d->format('Y-m-d H:i:s');\n}", "public static function getTimestamp(){\n\n $currentTime = new \\DateTime();\n $lastmodified = $currentTime->format('Y-m-d H:i:s');\n return $lastmodified;\n }", "function getNowDate() {\n\t\t$nowDate = @strftime('%Y-%m-%d %H:%M', time());\n\t\treturn $nowDate;\n\t}", "function dateStamp()\n\t\t{\n\t\t\treturn date(\"m/d/y\",$this->time);\n\t\t}" ]
[ "0.85911363", "0.7975269", "0.7734432", "0.76417357", "0.7614609", "0.7610226", "0.7585829", "0.75603354", "0.75485474", "0.75478816", "0.74838823", "0.7482481", "0.7464086", "0.7434639", "0.7351925", "0.73252994", "0.7304932", "0.7276803", "0.7272999", "0.72623485", "0.72546524", "0.7200429", "0.7176071", "0.71739185", "0.71739185", "0.7160432", "0.7159631", "0.7153644", "0.71448076", "0.71237725" ]
0.8821578
0
Get category field by passing a field id.
public function get_category_field($field_id, $select = array('*')) { return $this->get_category_fields($select, array('field_id' => $field_id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_field_by_id($field_id) {\n\t \t$field = $this->ci->fields->get_field_by_id($field_id);\n\t\tif($field) {\n\t\t\treturn $field;\n\t\t}\n\t \treturn NULL;\n\t }", "public function get_field( $id ){\n\t\treturn $this->find_field_by_id( $id );\n\t}", "public function getField($fieldId);", "public function getField($fieldId) {\n foreach($this->all() as $item) {\n\n $temp = $item->find($fieldId);\n if (!is_null($temp)) return $temp;\n\n }\n return null;\n }", "protected function find_field_by_id( $field_id ){\n\t\t$key = $this->find_field_index( $field_id );\n\t\tif( ! is_null( $key ) ){\n\t\t\treturn $this->fields[ $key ];\n\t\t}\n\n\t\treturn null;\n\t}", "public function getFieldById($fieldId) {\n foreach($this->all() as $item) {\n\n $temp = $item->findById($fieldId);\n if (!is_null($temp)) return $temp;\n\n }\n return null;\n }", "function _acf_get_field_by_id( $post_id = 0, $db_only = false ) {\n\t\n\t// get post\n\t$post = get_post( $post_id );\n\t\n\t\n\t// bail early if no post, or is not a field\n\tif( empty($post) || $post->post_type != 'acf-field' ) return false;\n\t\n\t\n\t// unserialize\n\t$field = maybe_unserialize( $post->post_content );\n\t\n\t\n\t// update attributes\n\t$field['ID'] = $post->ID;\n\t$field['key'] = $post->post_name;\n\t$field['label'] = $post->post_title;\n\t$field['name'] = $post->post_excerpt;\n\t$field['menu_order'] = $post->menu_order;\n\t$field['parent'] = $post->post_parent;\n\n\n\t// override with JSON\n\tif( !$db_only && acf_is_local_field($field['key']) ) {\n\t\t\n\t\t// load JSON field\n\t\t$local = acf_get_local_field( $field['key'] );\n\t\t\n\t\t\n\t\t// override IDs\n\t\t$local['ID'] = $field['ID'];\n\t\t$local['parent'] = $field['parent'];\n\t\t\n\t\t\n\t\t// return\n\t\treturn $local;\n\t\t\n\t}\n\t\n\t\n\t// return\n\treturn $field;\n\t\n}", "public function getFieldByName($fieldId) {\n foreach($this->all() as $item) {\n\n $temp = $item->findByName($fieldId);\n if (!is_null($temp)) return $temp;\n\n }\n return null;\n }", "public function getField($fieldId){\n\t\tif($this->hasField($fieldId)){\n\t\t\treturn $this->fields[$fieldId];\n\t\t}\n\t}", "public function getField($id)\r\n {\r\n $fields = $this->getFields();\r\n\r\n return isset($fields[$id]) ? $fields[$id] : null;\r\n }", "public static function field($field, $id = null)\n {\n if (! function_exists('acf')) {\n return;\n }\n\n if (! empty(get_field($field, $id))) {\n return get_field($field, $id);\n }\n\n if (! empty(get_sub_field($field))) {\n return get_sub_field($field);\n }\n\n if (! empty(get_field($field, 'option'))) {\n return get_field($field, 'option');\n }\n\n return false;\n }", "public function get_field($field_id, $select = array('*'))\n\t{\n\t\treturn $this->get_channel_field($field_id, $select);\n\t}", "public function get(string $id): FieldInterface\n {\n $field = array_filter($this->fields, function (FieldInterface $item) use ($id) {\n return $item->get_id() === $id;\n });\n\n return ! empty($field) && is_array($field) && array_key_exists(array_keys($field)[0], $field) ? $field[array_keys($field)[0]] : null;\n }", "public function field($fieldid) {\n $field = Wi3::inst()->model->factory(\"site_field\")->set(\"id\", $fieldid)->load();\n if ($field->loaded() == false) {\n return null;\n } else {\n return $field;\n }\n }", "function get_category_fields($category_id)\n {\n //Returns a dictionary object containing all fields for a given feature.\n\n $db_obj = new DB();\n\n if (strlen($category_id) != 0)\n {\n $category_detail_query = \"SELECT * FROM category WHERE category_id=\" . $category_id;\n $resultset = $db_obj->query($category_detail_query);\n $category = array_pop($resultset);\n return $category;\n } else\n {\n return 1;\n }\n }", "function category($id) {\n\treturn $_ENV['dbi']->getfield('categoriess','category','cid',$id);\n}", "public function getField($field);", "public function get_channel_field($field_id, $select = array('*'))\n\t{\n\t\treturn $this->get_channel_fields($select, array('field_id' => $field_id));\n\t}", "public function load($id, $field = null)\n {\n if ($field === 'name_path') {\n return $this->loadByNamePath($id);\n }\n return Mage::getModel('catalog/category')->loadByAttribute($field, $id);\n }", "private function getFCfieldname($id)\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('name');\n\t\t$query->from($db->quoteName('#__flexicontent_fields'));\n\t\t$query->where($db->quoteName('id') . \" = \" . $db->quote($id));\n\t\t$db->setQuery($query);\n\t\t$fieldname = $db->loadResult();\n\n\t\treturn $fieldname;\n\t}", "function get_grupo_field_by_id($grupo_field_id) {\n\t \t$grupo_field = $this->ci->grupos_fields->get_grupo_field_by_id($grupo_field_id);\n\t\tif($grupo_field) {\n\t\t\treturn $grupo_field->grupos_fields_nombre;\n\t\t}\n\t \treturn NULL;\n\t }", "function getField($id, $table, $field){\n\t$q = mysql_query(\"SELECT `$field` FROM `$table` WHERE `id`='$id'\");\n\t$qd = mysql_fetch_assoc($q);\n\treturn f($qd[$field]);\n}", "public function getField(Request $request, $field_id)\n {\n return $this->field->form->findField($field_id)\n ?: abort(404, debug(\"Coulnd't find field [$field_id]\"));\n }", "function hGetCountryFieldById($field, $id)\n\t{\n\t\t$CI = get_instance();\n\t\t$CI->load->model('Function_model');\n\t\t$data = $CI->Function_model->getCountryFieldById($field,$id);\n\t\treturn $data;\n\t}", "public function getField()\n\t{\n\t\tif ($this->fieldId)\n\t\t{\n\t\t\treturn craft()->fields->getFieldById($this->fieldId);\n\t\t}\n\t}", "public function getField()\n\t{\n\t\tif ($this->fieldId)\n\t\t{\n\t\t\treturn craft()->fields->getFieldById($this->fieldId);\n\t\t}\n\t}", "function column_field($id) {\n return $this->column_fields[$id];\n }", "public function loadFieldById($id){\n\t\treturn CrugeFactory::get()->getICrugeFieldLoadModel($id);\n\t}", "public function get_custom_field($field_id, $select = array('*'))\n\t{\n\t\treturn $this->get_channel_field($field_id, $select);\n\t}", "function get_field( $selector, $post_id = false, $format_value = true ) {\n\n\t// filter post_id\n\t$post_id = acf_get_valid_post_id( $post_id );\n\n\t// get field\n\t$field = acf_maybe_get_field( $selector, $post_id );\n\n\t// create dummy field\n\tif ( ! $field ) {\n\n\t\t$field = acf_get_valid_field(\n\t\t\tarray(\n\t\t\t\t'name' => $selector,\n\t\t\t\t'key' => '',\n\t\t\t\t'type' => '',\n\t\t\t)\n\t\t);\n\n\t\t// prevent formatting\n\t\t$format_value = false;\n\n\t}\n\n\t// get value for field\n\t$value = acf_get_value( $post_id, $field );\n\n\t// format value\n\tif ( $format_value ) {\n\n\t\t// get value for field\n\t\t$value = acf_format_value( $value, $post_id, $field );\n\n\t}\n\n\t// return\n\treturn $value;\n\n}" ]
[ "0.74934816", "0.7431236", "0.71397007", "0.6970374", "0.6797449", "0.6719804", "0.67017883", "0.66964436", "0.66862166", "0.66716063", "0.66363585", "0.66298866", "0.6603394", "0.65906376", "0.65255624", "0.6510859", "0.6484402", "0.6482147", "0.6475698", "0.6465632", "0.6431044", "0.6415295", "0.6405713", "0.6400722", "0.6331851", "0.6331851", "0.63196886", "0.63147396", "0.63069254", "0.6297349" ]
0.7582943
0
Get the category posts by an entry id.
public function get_category_post($entry_id, $select = array('*')) { return $this->get_category_posts($select, array('entry_id' => $entry_id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostsWithCategory($id = 1)\n {\n $columns = [\n 'title', 'id', 'user_id', 'published_at'\n ];\n\n $result = $this\n ->startConditions()\n ->select($columns)\n ->where('category_id', $id)\n ->whereNotNull('published_at')\n ->with('category', 'user')\n ->paginate(15);\n\n return $result;\n }", "public function getPostsFromCategory($id, $per_page = null, $page = null){\n // $query = $this->getEntityManager()->createQuery(\"\n // SELECT p FROM cms\\models\\Posts p\n // JOIN cms\\models\\Categories c WHERE (c.id = p.categories)\n // LEFT JOIN cms\\models\\Categories cp WHERE (cp.id = c.subCategory)\n // WHERE (c.id = :id or cp.id = :id)\n // \");\n // $query->setParameters(array(\n // 'id' => $id,\n // ));\n // $query->setMaxResults($per_page);\n // $query->setFirstResult($page);\n //\n // $result = $query->getResult();\n\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb -> select('p')\n -> from('cms\\models\\Posts', 'p')\n -> leftjoin('cms\\models\\Categories', 'c', 'WITH', 'c.id = p.categories')\n -> leftJoin('cms\\models\\Categories', 'cp', 'WITH', 'cp.id = c.subCategory')\n -> where($qb->expr()->orX('c.id = :id', 'cp.id = :id') )\n -> setFirstResult($page)\n -> setMaxResults($per_page)\n // -> where('c.id = :id')\n -> setParameter('id', $id);\n\n // echo $qb->getQuery()->getSQL();\n\n $result = $qb->getQuery()->getResult();\n return $result;\n }", "public function getAllPosts() {\r\n $stmt = $this->_db->prepare(\"SELECT `id` FROM `posts` WHERE `topic`= ? ORDER BY `id` ASC;\");\r\n $stmt->execute(array($this->_id));\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n $this->categoryIds = array();\r\n foreach($results as $i => $dataArr) {\r\n foreach($dataArr as $id) {\r\n $post = new Post($this->_db);\r\n $post->getById($id);\r\n array_push($this->_posts,$post);\r\n }\r\n }\r\n return $this->_posts;\r\n }", "public function get_posts_by_category($category_id){\n\t\t\t$this->db->order_by('posts.id', 'DESC');\n\n\t\t\t//Realiza una consulta Join(Union) de los Id de la tabla de categoria, y los id de categoria de los posts\n\t\t\t//para agrupar los posts por categorias.\n\t\t\t$this->db->join('categories','categories.id = posts.category_id');\n\n\t\t\t//Obtiene los datos que fueron ordenados \"Descendentemente\" arriba, pero solo en los que coinciden el valor de \"category_id\"\n\t\t\t$query = $this->db->get_where('posts', array('category_id' => $category_id));\n\t\t\treturn $query->result_array();\n\t\t}", "public function postByCategory($id)\n {\n $maincategories = main_waste_category::with(['sub_waste_category'])->get();\n\n $posts = DB::table('post')\n ->select('post.id as id', 'post.title as title', 'post.content', 'post.attachment', 'sub_waste_category.category as category', 'post.updated_at as updated_at', 'post.created_at as created_at', 'post.deleted_at as deleted_at', 'post.view_count as view_count', 'post.publisher_id as publisher_id', 'post.like_dislike as like_dislike')\n ->rightjoin('sub_waste_category', 'sub_waste_category.id', \"=\", \"post.sub_waste_category_id\")\n ->where('sub_waste_category_id', '=', $id)\n ->where('publisher_id', '!=', auth()->user()->id)\n ->orderby('post.created_at', 'desc')\n ->paginate(10);\n//\n return view('posts.index', ['posts' => $posts, 'maincategories' => $maincategories, 'view_title' =>'Portal', 'resultsForCat' => sub_waste_category::find($id)->category]);\n }", "public function get_post_by_category_id($id)\n {\n $postByCatId = $this->blogPost->with('category', 'user')\n ->where('cat_id', $id)\n ->get();\n\n return response()->json([\n \"postByCatId\" => $postByCatId\n ], 200);\n }", "function getPosts($cat_id)\n\t{\n\t\t$this->db->where(\"cat_id\",$cat_id);\n\t\t$this->db->order_by(\"datetime\",\"DESC\");\n\t\t$query=$this->db->get(\"posts\");\n\t\treturn $query->result();\n\t}", "function cfcpt_get_posts($type,$cat_id=null) {\n\t\tglobal $cfcpt_parent_cat,$blog_id;\n\t\t$posts = '';\n\t\t$args = '';\n\t\t$types = cfcpt_get_types();\n\t\t\n\t\tif (is_array($cat_id) && !empty($cat_id)) {\n\t\t\tforeach ($cat_id as $cat) {\n\t\t\t\t// attempt to fetch cached item\n\t\t\t\t$key = 'cfcpt_posts_'.$type.'_'.$cat.'_'.$blog_id;\n\t\t\t\t$cache_post = maybe_unserialize(wp_cache_get($key));\n\t\t\t\tif (is_array($cache_post)) {\n\t\t\t\t\t$posts[$cat] = $cache_post;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'showposts' => -1,\n\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t'cat' => $cat\n\t\t\t\t);\n\t\t\t\tif ($type !== false && array_key_exists($type, $types)) {\n\t\t\t\t\t$args['post_type'] = $type;\n\t\t\t\t\t$posts[$cat][sanitize_title($type)] = get_posts($args);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tforeach ($types as $post_type) {\n\t\t\t\t\t\t$args['post_type'] = 'post-'.sanitize_title($post_type);\n\t\t\t\t\t\t$posts[$cat]['post-'.sanitize_title($post_type)] = get_posts($args);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twp_cache_add($key,$posts[$cat]);\n\t\t\t}\n\t\t}\n\t\telseif (!is_null($cat_id)) {\n\t\t\t// attempt to fetch cached item\n\t\t\t$key = 'cfcpt_posts_'.$type.'_'.$cat_id.'_'.$blog_id;\n\t\t\t$cache_post = maybe_unserialize(wp_cache_get($key));\n\t\t\tif (is_array($cache_post)) {\n\t\t\t\t$posts[$cat_id] = $cache_post;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$args = array(\n\t\t\t\t\t'showposts' => -1,\n\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t'cat' => $cat_id\n\t\t\t\t);\n\t\t\t\tif ($type !== false && array_key_exists($type, $types)) {\n\t\t\t\t\t$args['post_type'] = $type;\n\t\t\t\t\t$posts[$cat_id][sanitize_title($type)] = get_posts($args);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tforeach ($types as $post_type) {\n\t\t\t\t\t\t$args['post_type'] = 'post-'.sanitize_title($post_type);\n\t\t\t\t\t\t$posts[$cat_id]['post-'.sanitize_title($post_type)] = get_posts($args);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twp_cache_add($key,$posts[$cat_id]);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// attempt to fetch cached item\n\t\t\t$key = 'cfcpt_posts_'.$type.'_'.$cat_id.'_'.$blog_id;\n\t\t\t$posts = maybe_unserialize(wp_cache_get($key));\n\t\t\tif(is_array($posts)) { return $posts; }\n\n\t\t\t$cats = implode(',',$cfcpt_parent_cat);\n\t\t\t// base args\n\t\t\t$args = array(\n\t\t\t\t'showposts' => -1,\n\t\t\t\t'post_status' => 'publish',\t\t\t\n\t\t\t\t'cat' => $cats\n\t\t\t);\n\n\t\t\t// add post-type filter\n\t\t\t$types = cfcpt_get_types();\n\t\t\tif($type !== false && array_key_exists($type, $types)) {\n\t\t\t\t$args['post_type'] = $type;\n\t\t\t}\n\t\t\t// else {\n\t\t\t// \t$args['post_type'] = array_keys($types);\n\t\t\t// } -->\n\t\t\t$posts = get_posts($args);\n\t\t\twp_cache_add($key,$posts);\n\t\t\t// // attempt to fetch cached item\n\t\t\t// $key = 'cfcpt_posts_'.$type.'_'.sanitize_title($cats).'_'.$blog_id;\n\t\t\t// $cache_post = maybe_unserialize(wp_cache_get($key));\n\t\t\t// if (is_array($cache_post)) {\n\t\t\t// \t$posts = $cache_post;\n\t\t\t// \tcontinue;\n\t\t\t// }\n\t\t\t// \n\t\t\t// $args = array(\n\t\t\t// \t'showposts' => -1,\n\t\t\t// \t'post_status' => 'publish',\n\t\t\t// \t'cat' => $cats\n\t\t\t// );\n\t\t\t// if ($type !== false && array_key_exists($type, $types)) {\n\t\t\t// \t$args['post_type'] = 'post-'.sanitize_title($type);\n\t\t\t// }\n\t\t\t// $posts = get_posts($args);\n\t\t\t// wp_cache_add($key,$posts);\n\t\t}\n\t\t// \n\t\t// \n\t\t// // base args\n\t\t// $args = array(\n\t\t// \t'showposts' => -1,\n\t\t// \t'post_status' => 'publish'\n\t\t// );\n\t\t// \n\t\t// // add category filter, maybe do this a bit differently to accommodate comma separated values?\n\t\t// if(!is_null($cat_id)) {\n\t\t// \tif (is_array($cat_id)) {\n\t\t// \t\t\n\t\t// \t}\n\t\t// \t$args['cat'] = $cat_id;\n\t\t// }\n\t\t// else {\n\t\t// \t$args['cat'] = implode(',',$cfcpt_parent_cat);\n\t\t// }\n\t\t// \n\t\t// // add post-type filter\n\t\t// $types = cfcpt_get_types();\n\t\t// if($type !== false && array_key_exists($type, $types)) {\n\t\t// \t$args['post_type'] = $type;\n\t\t// }\n\t\t// // else {\n\t\t// // \t$args['post_type'] = array_keys($types);\n\t\t// // } -->\n\t\t// $posts = get_posts($args);\n\t\t// wp_cache_add($key,$posts);\n\t\treturn $posts;\n\t}", "public function posts($id){\n // set the title of this to the title of the category. we want only the name of the category\n $data['title'] = $this->category_model->get_category($id)->name;\n // now, set the posts into the data array from the post model\n $data['posts'] = $this->post_model->get_posts_by_category($id);\n // reload page with header and footer templates if the validation fails\n $this->load->view('templates/header');\n // load the index view in posts folder, and pass in data array to the page. this will render the post index with just the psots related to a selected category. this means a new view doesnt have to be created when selecting posts of a certain category\n $this->load->view('posts/index', $data);\n $this->load->view('templates/footer');\n }", "public function show($id)\n {\n// $posts = Post::where('category_id', $id)->orderBy('created_at', 'desc')->paginate(config('classifieds.posts_per_page'));\n\n if ($id == 0) {\n $posts = Post::whereNull('deleted_at')->orderBy('created_at', 'desc')->paginate(config('classifieds.posts_per_page'));\n $category = null;\n } else {\n $category = Category::find($id);\n $posts = Post::whereIn('category_id', function($query) use ($id) {\n //$query->orWhere('category_id', $id);\n $query->select('id')\n ->from(with(new Category())->getTable())\n ->where('parent_id', $id);\n })->orWhere('category_id', $id)\n ->whereNull('deleted_at')\n\n// use for selecting posts with images only\n// ->join('post_images', 'posts.id', '=', 'post_images.post_id')\n// ->select('posts.*')\n\n ->orderBy('created_at', 'desc')\n ->paginate(config('classifieds.posts_per_page'));\n }\n\n return view('home.category.show', ['posts' => $posts, 'category' => $category]);\n }", "public static function retreiveById($id)\n {\n $query = \"\n SELECT category.*\n FROM category\n WHERE id = ?\n \";\n $resultset = db::query($query, array($id)); \n\n $objects = static::fetchObject($resultset);\n\n return $objects;\n }", "public function getPost($id = null)\n {\n $columns = [\n 'title' ,'published_at' , 'user_id', 'category_id', 'id', 'updated_at', 'content_row'\n ];\n\n $result = $this\n ->startConditions()\n ->select($columns)\n ->with('category', 'user')\n ->where('id', $id)\n ->get()\n ->first();\n\n return $result;\n }", "function get_all_posts( $data, $post, $context ) {\n return [\n 'id' => $data->data['id'],\n 'date' => $data->data['date'],\n 'date_gmt' => $data->data['date_gmt'],\n 'modified' => $data->data['modified'],\n 'title' => $data->data['title']['rendered'],\n 'content' => $data->data['content']['rendered'],\n 'excerpt' => $data->data['excerpt']['rendered'],\n 'category' => get_the_category_by_ID( $data->data['categories'][0] ), //Category endpoint returns directly the name of the post category\n 'link' => $data->data['link'],\n\n\n ];\n}", "public function related_category_entries()\n\t{\n\t\t$current_entry = ee()->TMPL->fetch_param('url_title', ee()->TMPL->fetch_param('entry_id'));\n\n\t\t// try to divine one if no parameter was given\n\t\tif ( ! $current_entry)\n\t\t{\n\t\t\t$current_entry = $this->query_string;\n\n\t\t\t/** --------------------------------------\n\t\t\t/** Remove page number\n\t\t\t/** --------------------------------------*/\n\n\t\t\tif (preg_match(\"#/P\\d+#\", $current_entry, $match))\n\t\t\t{\n\t\t\t\t$current_entry = reduce_double_slashes(str_replace($match[0], '', $current_entry));\n\t\t\t}\n\n\t\t\t/** --------------------------------------\n\t\t\t/** Remove \"N\"\n\t\t\t/** --------------------------------------*/\n\t\t\tif (preg_match(\"#/N(\\d+)#\", $current_entry, $match))\n\t\t\t{\n\t\t\t\t$current_entry = reduce_double_slashes(str_replace($match[0], '', $current_entry));\n\t\t\t}\n\n\t\t\t/** --------------------------------------\n\t\t\t/** Make sure to only get one segment\n\t\t\t/** --------------------------------------*/\n\n\t\t\tif (strpos($current_entry, '/') !== FALSE)\n\t\t\t{\n\t\t\t\t$current_entry = substr($current_entry, 0, strpos($current_entry, '/'));\n\t\t\t}\n\t\t}\n\n\t\t/** ----------------------------------\n\t\t/** Find Categories for Entry\n\t\t/** ----------------------------------*/\n\n\t\t$query = ee()->db->select('c.cat_id, c.cat_name')\n\t\t\t->from('channel_titles t')\n\t\t\t->join('category_posts p', 'p.entry_id = t.entry_id', 'INNER')\n\t\t\t->join('categories c', 'p.cat_id = c.cat_id', 'INNER')\n\t\t\t->where('c.cat_id IS NOT NULL')\n\t\t\t->where_in('t.site_id', ee()->TMPL->site_ids);\n\n\t\tif (is_numeric($current_entry))\n\t\t{\n\t\t\t$query->where('t.entry_id', $current_entry);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query->where('t.url_title', $current_entry);\n\t\t}\n\n\t\t$query = ee()->db->get();\n\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\treturn ee()->TMPL->no_results();\n\t\t}\n\n\t\t/** ----------------------------------\n\t\t/** Build category array\n\t\t/** ----------------------------------*/\n\n\t\t$cat_array = array();\n\n\t\t// We allow the option of adding or subtracting cat_id's\n\t\t$categories = ( ! ee()->TMPL->fetch_param('category')) ? '' : ee()->TMPL->fetch_param('category');\n\n\t\tif (strncmp($categories, 'not ', 4) == 0)\n\t\t{\n\t\t\t$categories = substr($categories, 4);\n\t\t\t$not_categories = explode('|',$categories);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$add_categories = explode('|',$categories);\n\t\t}\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\t\t\tif ( ! isset($not_categories) OR array_search($row['cat_id'], $not_categories) === FALSE)\n\t\t\t{\n\t\t\t\t$cat_array[] = $row['cat_id'];\n\t\t\t}\n\t\t}\n\n\t\t// User wants some categories added, so we add these cat_id's\n\n\t\tif (isset($add_categories) && count($add_categories) > 0)\n\t\t{\n\t\t\tforeach($add_categories as $cat_id)\n\t\t\t{\n\t\t\t\t$cat_array[] = $cat_id;\n\t\t\t}\n\t\t}\n\n\t\t// Just in case\n\t\t$cat_array = array_unique($cat_array);\n\n\t\tif (count($cat_array) == 0)\n\t\t{\n\t\t\treturn ee()->TMPL->no_results();\n\t\t}\n\n\t\t/** ----------------------------------\n\t\t/** Build category string\n\t\t/** ----------------------------------*/\n\n\t\t$cats = '';\n\n\t\tforeach($cat_array as $cat_id)\n\t\t{\n\t\t\tif ($cat_id != '')\n\t\t\t{\n\t\t\t\t$cats .= $cat_id.'|';\n\t\t\t}\n\t\t}\n\t\t$cats = substr($cats, 0, -1);\n\n\t\t/** ----------------------------------\n\t\t/** Manually set parameters\n\t\t/** ----------------------------------*/\n\n\t\tunset(ee()->TMPL->tagparams['entry_id']);\n\t\tunset(ee()->TMPL->tagparams['url_title']);\n\t\tee()->TMPL->tagparams['category']\t\t= $cats;\n\t\tee()->TMPL->tagparams['dynamic']\t\t= 'off';\n\t\tee()->TMPL->tagparams['not_entry_id']\t= $current_entry; // Exclude the current entry\n\n\t\t// Set user submitted parameters\n\n\t\t$params = array('channel', 'username', 'status', 'orderby', 'sort');\n\n\t\tforeach ($params as $val)\n\t\t{\n\t\t\tif (ee()->TMPL->fetch_param($val) != FALSE)\n\t\t\t{\n\t\t\t\tee()->TMPL->tagparams[$val] = ee()->TMPL->fetch_param($val);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! is_numeric(ee()->TMPL->fetch_param('limit')))\n\t\t{\n\t\t\tee()->TMPL->tagparams['limit'] = 10;\n\t\t}\n\n\t\t/** ----------------------------------\n\t\t/** Run the channel parser\n\t\t/** ----------------------------------*/\n\n\t\t$this->initialize();\n\t\t$this->entry_id \t= '';\n\t\t$qstring \t\t\t= '';\n\n\t\tif (ee()->TMPL->fetch_param('custom_fields') != 'yes')\n\t\t{\n\t\t\t$this->enable['custom_fields'] = FALSE;\n\t\t}\n\n\t\tif ($this->enable['custom_fields'])\n\t\t{\n\t\t\t$this->fetch_custom_channel_fields();\n\t\t}\n\n\t\t$this->build_sql_query();\n\n\t\tif ($this->sql == '')\n\t\t{\n\t\t\treturn ee()->TMPL->no_results();\n\t\t}\n\n\t\t$this->query = ee()->db->query($this->sql);\n\n\t\tif (ee()->TMPL->fetch_param('member_data') !== FALSE && ee()->TMPL->fetch_param('member_data') == 'yes')\n\t\t{\n\t\t\t$this->fetch_custom_member_fields();\n\t\t}\n\n\t\t$this->parse_channel_entries();\n\n\t\treturn $this->return_data;\n\t}", "public function GetEntryById($entryID)\n\t\t{\n\t\t\t// php is fucking unreadable\n\t\t\treturn $this->Entries->posts[ $this->GetEntryIndexById($entryID) ];\n\t\t}", "public function getPosts()\n {\n return $this->hasMany(Post::className(), ['category_id' => 'id']);\n }", "public function getPosts()\n {\n return $this->hasMany(Post::className(), ['category_id' => 'id']);\n }", "public function entries()\n {\n return $this->belongsToMany('\\\\rsanchez\\\\Deep\\\\Model\\\\Title', 'category_posts', 'entry_id', 'cat_id');\n }", "public function get_list_category(){\n $this->set_list(true);\n $initialfetch = (($this->page - 1) * $this->itemsforpage);\n $posts = $this->fetch(\"SELECT id, title, picture, category,url, meta date FROM posts WHERE category = $this->category ORDER BY id DESC LIMIT $initialfetch, $this->itemsforpage \");\n return $posts;\n }", "public function EntriesByCategory($limit = null) {\n \n if($limit == null) $limit = BlogTree::$default_entries_limit;\n \n if($this->owner->request->latestParam('Action') == 'topic') {\n $BlogTopic = BlogCategory::get()->filter(\n 'Title', urldecode($this->owner->request->latestParam('ID'))\n )->First();\n \n if(!$BlogTopic) {\n $entries = $this->owner->BlogEntries($limit);\n } else {\n $filter = array();\n $filter['CategoryID'] = $BlogTopic->ID;\n if($this->owner->ownerID) {\n $filter['ParentID'] = $this->owner->ID;\n }\n \n $entries = BlogEntry::get()->filter($filter);\n }\n } else {\n $entries = $this->owner->BlogEntries($limit);\n }\n \n return $entries;\n }", "public function posts($category_id = null) \n {\n $view_title = '';\n $view_description = '';\n $this->load->model('post');\n $this->load->model('categoria');\n // Check if is a categoryzed list.\n if ($category_id == null) {\n $this->data_content['posts'] = $this->post->get_by_field(\n array('page' => '0', 'status' => '1'), \n null, \n array('field' => 'created', 'order' => 'desc'), \n null, \n 'id, title, description, content, link, image, created'\n )->result();\n $view_title = 'Todas as postagens';\n } else {\n $qry_category = $this->categoria->get_by_id($category_id, null, null, 'title, description, view')->row();\n $this->data_content['posts'] = $this->post->get_by_category($category_id, 'desc')->result();\n $this->data_content['view_title'] = $qry_category->title;\n $this->data_content['view_description'] = $qry_category->description;\n $view_title = $qry_category->title;\n $this->wpn_posts_view = strtolower($qry_category->view);\n }\n // Send $max_cols if the view is mosaic type.\n if($this->wpn_posts_view == 'mosaic')\n $this->data_content['max_cols'] = $this->wpn_cols_mosaic;\n $this->wpanel->set_meta_title($view_title);\n $this->render('posts_' . $this->wpn_posts_view);\n }", "public function queryEachPost($id)\n\t{\n\t\t$sql = \"SELECT p.id, p.topic, p.word, p.date, p.category_id, p.picture_name, p.document_name, p.media, s.name from post as p inner join section as s on p.category_id = s.id where p.id = '$id'\";\n\t\t$result = $this->conn->query($sql);\n\t\tif($result->num_rows == 1){\n\t\t\t\n\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t$id = $row['id'];\n\t\t\t\t$category = $row['name'];\n\t\t\t\t$title = $row['topic'];\n\t\t\t\t$word = $row['word'];\n\t\t\t\t$date = $row['date'];\n\t\t\t\t$category_id = $row['category_id'];\n\t\t\t\t$media = $row['media'];\n\t\t\t\t// $audio_name = $row['audio_name'];\n\t\t\t\t$picture_name = $row['picture_name'];\n\t\t\t\t// $video_name = $row['video_name'];\n\t\t\t\t$document_name = $row['document_name'];\n\t\t\t\t$document = 'document/'.$document_name;\n\t\t\t\t// $video = 'video/'. $video_name;\n\t\t\t\t// $audio = 'audio/'.$audio_name;\n\t\t\t\t$picture = 'picture/'. $picture_name;\n\t\t\t\t$details_array = array('name'=>$category, 'category_id'=>$category_id, 'id'=> $id, 'title'=>$title, 'word'=>$word, 'date'=>$date, 'document'=>$document, 'picture'=>$picture, 'picture_name'=>$picture_name, 'document_name'=>$document_name, 'media'=>$media);\n\t\t\t}\n\t\t\treturn is_array($details_array) ? $details_array : false;\n\t\t}\n\t\telse{\n\t\t\t// return \"<p class=''>No post made yet in this category</p>\";\n\t\t}\n\n\t}", "public static function getAccountPosts($id)\n {\n $db = DB::getInstance();\n\n $sql = 'posts.*, accounts.nick_name, accounts.first_name, accounts.last_name, accounts.picture, accounts.gender\n FROM\n posts\n INNER JOIN\n accounts\n ON\n posts.account_id = accounts.id\n WHERE\n accounts.id = :account_id\n ORDER BY\n created_at DESC';\n\n $db->select($sql, [\n ':account_id' => $id\n ]);\n\n return $db->results();\n }", "public function getById($id) {\r\n // Create DB connection using parameters in config.php\r\n $connection = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\r\n\r\n // Check DB connection\r\n if ($connection->connect_error) {\r\n die(\"Connection failed: \" . $connection->connect_error);\r\n }\r\n\r\n $sql = \"SELECT *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM posts WHERE id = \" . $id;\r\n $result = $connection->query($sql) or die($connection->error);\r\n $row = $result->fetch_array(MYSQLI_BOTH);\r\n $connection->close();\r\n\r\n if ($row) {\r\n return new Post($row);\r\n }\r\n\r\n }", "public function findByCategoryId($id)\n {\n return $this->model->where('category_id', $id)->orderBy('created_at', 'desc')->get();\n }", "public function findByCategoryId($id)\n {\n return $this->model->where('category_id', $id)->orderBy('created_at', 'desc')->get();\n }", "public function getCategory($id);", "public function getById($id)\n {\n return array(\n 'entries' => $this->getEntityManager()->find('Entry\\Entity\\Entry', $id)\n );\n }", "private function getCategory($id) {\r\n\t\t$condition = array('online' => 1,'category_id' => $id); \r\n\t\t$d['totalcategory'] = $this->Post->findCount($condition);\r\n\t\treturn $d;\r\n\t}", "public function getEntry($id);" ]
[ "0.7057401", "0.6673313", "0.65506536", "0.64361703", "0.6421807", "0.640612", "0.62959695", "0.62478334", "0.6239073", "0.6227477", "0.6169059", "0.6168411", "0.6126492", "0.6115203", "0.61114144", "0.6111102", "0.6111102", "0.60649014", "0.60425353", "0.6026455", "0.60123265", "0.60083103", "0.5878445", "0.58777875", "0.58755976", "0.58755976", "0.58634067", "0.58479947", "0.5839927", "0.58269215" ]
0.74206746
0
Gets a channel by passing a channel_id
public function get_channel($channel_id, $select = array('*')) { return $this->get_channels($select, array('channel_id' => $channel_id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChannel($username = false,$id = false) {\n\t\t\t$params = array(\"part\" => \"id,snippet,statistics\");\n\t\t\tif ($id) {\n\t\t\t\t$params[\"id\"] = $id;\n\t\t\t} elseif ($username) {\n\t\t\t\t$params[\"forUsername\"] = $username; \n\t\t\t} else {\n\t\t\t\t$params[\"mine\"] = \"true\";\n\t\t\t}\n\t\t\t$response = $this->call(\"channels\",$params);\n\t\t\tif (!isset($response->items[0])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn new BigTreeYouTubeChannel($response->items[0],$this);\n\t\t}", "public function get($id) {\n\t\tglobal $wpdb;\n\n\t\t$table = WiseChatInstaller::getChannelsTable();\n\t\t$sql = sprintf('SELECT * FROM %s WHERE id = %d;', $table, intval($id));\n\t\t$results = $wpdb->get_results($sql);\n\t\tif (is_array($results) && count($results) > 0) {\n\t\t\treturn $this->populateChannelData($results[0]);\n\t\t}\n\n\t\treturn null;\n\t}", "public function getChannel($name);", "public function getChannel();", "function getchannel($clinic_id){\r\n $sql=\"SELECT clinic_channel FROM clinic where clinic_id=\".$clinic_id;\r\n $res=mysql_query($sql);\r\n $row=mysql_fetch_array($res); \r\n return $row['clinic_channel']; \r\n }", "public function getChannel()\n\t\t{\n\t\t\treturn $this->getAttribute(\"channel_id\");\n\t\t}", "public function getChannelId()\n {\n return $this->channel_id;\n }", "public function getChannelId()\n {\n return $this->channel_id;\n }", "public function getChannel()\n {\n return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;\n }", "public function getChannelId()\n {\n return $this->_channelId;\n }", "public function getChannel(\n $id = 'for_you',\n $maxId = null)\n {\n if (!in_array($id, ['for_you', 'chrono_following', 'popular', 'continue_watching'])\n && !preg_match('/^user_[1-9]\\d*$/', $id)) {\n throw new \\InvalidArgumentException('Invalid ID type.');\n }\n\n $request = $this->ig->request('igtv/channel/')\n ->addPost('id', $id)\n ->addPost('_uuid', $this->ig->uuid)\n ->addPost('_uid', $this->ig->account_id)\n ->addPost('_csrftoken', $this->ig->client->getToken());\n\n if ($maxId !== null) {\n $request->addPost('max_id', $maxId);\n }\n\n return $request->getResponse(new Response\\TVChannelsResponse());\n }", "public function getChannelID()\n {\n return $this->channelID;\n }", "public function getChannel()\n {\n $this->createChannel();\n\n return $this->channel;\n }", "function getChannelID() {\n\t\treturn $this->_ChannelID;\n\t}", "public function getChannelId()\n {\n return $this->get(self::CHANNEL_ID);\n }", "public function setChannelId($var)\n {\n GPBUtil::checkString($var, True);\n $this->channel_id = $var;\n\n return $this;\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 static function channel() \r\n {\r\n return self::requestHttp('GET', self::CHANNEL);\r\n }", "public function getChannelId()\n {\n return $this->post['snippet']['channelId'];\n }", "public function getChannel()\n {\n return $this->getRelationValue('channel');\n }", "public function channel()\n {\n return $this->belongsTo(Channel::class, 'channel_id', 'id');\n }", "public function getChannel()\n {\n return $this->fields['channel'];\n }", "public function getChannel()\n {\n return $this->hasMany('App\\Channel', 'user_id', 'id');\n }", "function pmprosla_get_slack_channel_name($channel_id){\r\n\t$response = file_get_contents('https://slack.com/api/channels.info?channel='.$channel_id.'&token='.pmprosla_get_oauth());\r\n\t$response_arr = json_decode($response, true);\r\n\tif($response_arr['ok']) {\r\n\t\treturn $response_arr['channel']['name'];\r\n\t}\r\n\techo \"Something went wrong: \".$response;\r\n}", "public function get_channel_member_group($group_id = FALSE, $channel_id = FALSE)\n\t{\n\t\t$params = array();\n\t\t\n\t\tif($group_id !== FALSE)\n\t\t\t$params['where']['group_id'] = $group_id;\n\t\t\n\t\tif($channel_id !== FALSE)\n\t\t\t$params['where']['channel_id'] = $channel_id;\n\t\t\n\t\t$this->convert_params($params);\n\t\t\n\t\treturn $this->EE->db->get('channel_member_groups');\n\t}", "public function show($id)\n {\n $channel = Channels::where('id', $id)->first();\n if(count($channel) > 0)\n {\n return response()->json(['status' => 200, 'data' => ['id' => $id, 'name' => $channel->name, 'created_at' => $channel->created_at]]);\n }else{\n return response()->json(['status' => 201, 'msg' => 'not found']);\n }\n }", "public function getChannelId()\n {\n return $this->getResource()->getChannelId();\n }", "public function show($id)\n {\n $channel = $this->channelRepository->findWithoutFail($id);\n\n if (empty($channel)) {\n Flash::error('Канал не найден');\n\n return redirect(route('backend.channels.index'));\n }\n\n return view('backend.channels.show')->with('channel', $channel);\n }" ]
[ "0.7364124", "0.7353758", "0.68643326", "0.6860038", "0.6848132", "0.6842613", "0.6803928", "0.6803928", "0.6777378", "0.67120695", "0.66332316", "0.66028666", "0.6532749", "0.65320224", "0.64604473", "0.64075774", "0.637635", "0.637635", "0.637635", "0.63456", "0.62897515", "0.6256871", "0.625065", "0.62324256", "0.6222446", "0.62141806", "0.6196645", "0.6179508", "0.61769044", "0.615858" ]
0.7992174
0
Get channel member groups by either a group_id or channel_id
public function get_channel_member_group($group_id = FALSE, $channel_id = FALSE) { $params = array(); if($group_id !== FALSE) $params['where']['group_id'] = $group_id; if($channel_id !== FALSE) $params['where']['channel_id'] = $channel_id; $this->convert_params($params); return $this->EE->db->get('channel_member_groups'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_memeber_groups( $member_id ) {\r\n global $wpdb;\r\n $results = $wpdb->get_results( $wpdb->prepare( \"SELECT group_id FROM {$this->tb_prefix}enewsletter_member_group WHERE member_id = %d\", $member_id ), \"ARRAY_A\");\r\n foreach( $results as $group ){\r\n $groups[] = $group['group_id'];\r\n }\r\n return $groups;\r\n }", "public function get_channel_member_groups($select = array(), $where = array(), $order_by = 'channel_id', $sort = 'DESC', $limit = FALSE, $offset = 0)\n\t{\t\t\t\n\t\t$this->convert_params($select, $where, $order_by, $sort, $limit, $offset);\n\t\t\n\t\t\n\t\treturn $this->EE->db->get('channel_member_groups');\n\t}", "function get_members_of_group( $group_id ) {\r\n global $wpdb;\r\n $results = $wpdb->get_results( $wpdb->prepare( \"SELECT member_id FROM {$this->tb_prefix}enewsletter_member_group WHERE group_id = %d\", $group_id ), \"ARRAY_A\" );\r\n foreach( $results as $member ){\r\n $members[] = $member['member_id'];\r\n }\r\n return $members;\r\n }", "public function getMembers($group_id);", "public function getGroups($uid){\n // get all group ids where the user is member\n $sqlGroupids = 'SELECT groupid FROM `'.$this->tableMember.'`\n WHERE `userid` = ?';\n $uidPara = array($uid);\n $result = $this->execute($sqlGroupids,$uidPara);\n \n $selectedGroupids=array();\n // extract groupid from the db query and save it\n while($row = $result->fetchRow()){\n if(!in_array($row['groupid'],$selectedGroupids)){\n array_push($selectedGroupids,$row['groupid']);\n }\n }\n // prepare sql state to get every group information\n $sql = 'SELECT * FROM `'.$this->tableGroup.'` \n WHERE `groupid` = ?';\n $group = array();\n // get each group with the extracted groupid\n foreach($selectedGroupids as $groupid){\n $params = array($groupid);\n $result = $this->execute($sql,$params);\n $resultRow = $result->fetchRow();\n //check if there is a group with this id\n //if there is one than great a group and add it to the group array\n if($resultRow['groupid']==$groupid){\n $entity = new Group($resultRow);\n $entity = $this->addMembersToGroup($entity); \n array_push($group,$entity);\n }\n }\n return $group;\n }", "public function getGroupMembers($group_id){\n $members = array();\n $db = HelperController::getConnection();\n $sql = \"SELECT user_has_group.user_id FROM mydb.user_has_group WHERE user_has_group.group_id = :group_id\";\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':group_id', $group_id);\n $stmt->execute();\n $result = $stmt->fetchAll();\n \n foreach ($result as $user){\n $group_member = HelperController::getUser($user[\"user_id\"]);\n $members[][\"username\"] = $group_member[\"username\"];\n $lastKey = end(array_keys($members));\n $members[$lastKey][\"id\"] = $user[\"user_id\"];\n }\n return $members;\n }", "function get_group($user_id, $group_id) {\r\n\r\n\t// Check to see if the user is a member in the group, if not then ask to join.\r\n\tif (!is_member($user_id, $group_id)) {\r\n\t\t// We will need better error coverage in later releases\r\n\t\techo USER_IS_NOT_MEMBER;\r\n\t\t\r\n\t\t\t// Prepare a join link for the group.\r\n\t\t\t$str1 = '<a href=\"?change_group=' . $group_id . ' \">';\r\n\t\t\t$str2 = '</a>';\r\n\t\t\t$error = USER_ASK_TO_JOIN_GROUP;\r\n\t\t\t\r\n\t\t$msg = str_replace('%1', $str1, $error);\r\n\t\t$msg = str_replace('%2', $str2, $msg);\r\n\t\t\r\n\t\tdie($msg);\r\n\t\t\r\n\t// We don't really need this here, but it will catch any really strange quirks with the script.\r\n\t} else {\r\n\r\n\t\t// Get the base data\r\n\t\tData::set('base-data', 'SELECT * FROM `' . Data::get('db') . '`.`groups` WHERE `group_id` = \"' . MySQL::clean($group_id) . '\" LIMIT 1', true);\r\n\t\t\r\n\t\t\t$base = MySQL::search(Data::get('base-data'));\r\n\t\t\r\n\t\t// Get a few of the members\r\n\t\tData::set('members', 'SELECT `user_id` FROM `' . Data::get('db') . '`.`group_members` WHERE `group_id` = \"' . MySQL::clean($group_id) . '\" LIMIT 10', true);\r\n\t\t\t\r\n\t\t\t$members = MySQL::search(Data::get('members'));\r\n\t\t\r\n\t\t// Get a few of the latest conversations\r\n\t\tData::set('conversations', 'SELECT * FROM `' . Data::get('db') . '`.`group_conversations` WHERE `group_id` = \"' . MySQL::clean($group_id) . '\" ORDER BY `timestamp` DESC LIMIT 10', true);\r\n\t\t\r\n\t\t\t$conversations = MySQL::search(Data::get('conversations'));\r\n\t\t\r\n\t\t// Send the data back in an array.\r\n\t\treturn array (\r\n\t\t\t'base' => $base[0],\r\n\t\t\t'members' => $members,\r\n\t\t\t'conversations' => $conversations\r\n\t\t);\r\n\t}\r\n}", "function bbp_get_group_forum_ids($group_id = 0)\n{\n}", "function bbp_get_forum_group_ids($forum_id = 0)\n{\n}", "protected function _get_members_groups($member)\n {\n if ($member == $this->get_guest_id()) {\n return array($this->get_member_row_field($member, 'groupid'));\n }\n\n $groups = $this->connection->query_select('user2groups', array('groupid'), array('userid' => $member));\n $out = array();\n foreach ($groups as $group) {\n $out[] = $group['groupid'];\n }\n $p = $this->get_member_row_field($member, 'groupid');\n if (!in_array($p, $out)) {\n $out[] = $p;\n }\n\n return $out;\n }", "public function getMemberFeedsForGroupOfIds($member) {\n $streamTable = Engine_Api::_()->getDbtable('stream', 'activity');\n $groupids = $streamTable->select()\n ->from($streamTable->info('name'), \"target_id\")\n ->where('subject_id = ?', $member->getIdentity())\n ->where('subject_type = ?', $member->getType())\n ->where('target_type = ?', 'sitegroup_group')\n ->group('target_id')\n ->query()\n ->fetchAll(Zend_Db::FETCH_COLUMN);\n $ids = array();\n foreach ($groupids as $id) {\n $group = Engine_Api::_()->getItem('sitegroup_group', $id);\n if (empty($group) || !$group->isViewableByNetwork())\n continue;\n $ids[] = $id;\n }\n return $ids;\n }", "function get_group_members($group_id)\n {\n $return_array = array();\n\n $query_string = \"SELECT user_joined_id FROM group_relationships WHERE\n group_id = ? AND user_joined_id <> 'NULL'\";\n $query = $this->db->query($query_string, array($group_id));\n\n foreach ($query->result() as $row)\n {\n $return_array[] = $row->user_joined_id;\n }\n\n return $return_array;\n }", "public function groups_getMembers($gid) {\n return $this->call_method('facebook.groups.getMembers',\n array('gid' => $gid));\n }", "protected function _get_moderator_groups()\n {\n return collapse_1d_complexity('groupid', $this->connection->query('groups', array('groupid'), array('securitylevel' => 3)));\n }", "public function getGroups(){\n\t\t\n\t\t$findParams = \\GO\\Base\\Db\\FindParams::newInstance()\n\t\t\t\t\t\t->select('t.*,a.level as permission_level')\n\t\t\t\t\t\t->joinModel(array(\n\t\t\t\t\t\t\t\t'model'=>\"GO\\Base\\Model\\AclUsersGroups\",\n\t\t\t\t\t\t\t\t'foreignField'=>'groupId',\n\t\t\t\t\t\t\t\t'tableAlias'=>'a'\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t));\n\t\t\n\t\t$findParams->getCriteria()->addCondition('aclId', $this->id, '=','a');\n\t\t\n\t\treturn Group::model()->find($findParams);\n\t}", "function get_group_by_id( $group_id ) {\r\n global $wpdb;\r\n $result = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$this->tb_prefix}enewsletter_groups WHERE group_id = %d\", $group_id ), \"ARRAY_A\" );\r\n return $result;\r\n }", "function get_group($group_id)\n {\n return $this->db->get_where('groups',array('group_id'=>$group_id))->row_array();\n }", "public function member_group_query($groups, $max = null, $start = 0) // Doesn't support multi usergroups currently. I don't think it's needed\n {\n $_groups = '';\n foreach ($groups as $group) {\n if ($_groups != '') {\n $_groups .= ' OR ';\n }\n $_groups .= 'ID_GROUP=' . strval($group);\n }\n return $this->connection->query('SELECT * FROM ' . $this->connection->get_table_prefix() . 'members WHERE ' . $_groups . ' ORDER BY ID_GROUP,ID_MEMBER ASC', $max, $start);\n }", "public function getGroupMemberById( $group_id ){\n\t\tforeach ( $this->groupMembers as $group ){\n\t\t\tif ( $group->getId() === $group_id ){\n\t\t\t\treturn $group;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "function group_members($groups) {\n if(!is_array($groups))\n $groups=explode(\";\", $groups);\n\n if(sizeof($groups)>1) {\n $ret=array();\n\n foreach($groups as $group) {\n\t$list = $this->group_members($group);\n\n\tif(is_array($list))\n\t $ret = array_merge($ret, $list);\n }\n\n return $ret;\n }\n\n $group = $groups[0];\n if(isset($this->config['groups']) &&\n isset($this->config['groups'][$group])) {\n $conf_group=$this->config['groups'][$group];\n\n if(is_string($conf_group)) {\n\treturn $this->group_members($conf_group);\n }\n\n if(is_array($conf_group)) {\n\t$ret=array();\n\tforeach($conf_group as $g)\n\t $ret=array_merge($ret, $this->group_members($g));\n\n\treturn $ret;\n }\n\n return array();\n }\n\n if(preg_match(\"/^&(.*)@(.*)$/\", $group, $m)) {\n foreach($this->domains() as $d=>$domain_object) {\n\tif(($m[2] === null) || ($d == $m[2])) {\n\t $members=$domain_object->group_members($m[1]);\n\n\t if(!$members)\n\t return array();\n\n\t foreach($members as $i=>$m)\n\t $members[$i]=\"{$m}@{$d}\";\n\n return $members;\n\t}\n }\n }\n\n if(preg_match(\"/^(.*)@(.*)$/\", $group, $m)) {\n if($m[1] == \"*\") {\n\tif(!array_key_exists($m[2], $this->domains))\n\t return array();\n\n\t$members = $this->domains[$m[2]]->users();\n\n\tif(!$members)\n\t return array();\n\n\tforeach($members as $i=>$member)\n\t $members[$i]=\"{$member}@{$m[2]}\";\n\n\treturn $members;\n }\n else\n\treturn array($group);\n }\n\n return array();\n }", "function get_groups_for_user( $user_id, $args = array() ) {\n\t\tif ( empty($args['status']) )\n\t\t\t$status = 'active';\n\t\telseif ( 'any' == $args['status'] ) {\n\t\t\t$args['no_cache'] = true;\n\t\t\t$status = '';\n\t\t} else {\n\t\t\t$args['no_cache'] = true;\n\t\t\t$status = $args['status'];\n\t\t}\n\t\n\t\tif ( empty($args['no_cache']) ) {\n\t\t\t$cache = wpp_cache_get($user_id, 'group_membership_for_user');\n\t\t\t\n\t\t\tif ( is_array($cache) )\n\t\t\t\treturn $cache;\n\t\t}\n\n\t\tglobal $wpdb;\n\t\t\n\t\tif ( ! $wpdb->user2group_rs )\n\t\t\treturn array();\n\n\t\t$status_clause = ( $status ) ? \"AND status = '$status'\" : '';\t\n\n\t\t$query = \"SELECT $wpdb->user2group_gid_col FROM $wpdb->user2group_rs WHERE $wpdb->user2group_uid_col = '$user_id' $status_clause ORDER BY $wpdb->user2group_gid_col\";\n\t\tif ( ! $user_groups = scoper_get_col($query) )\n\t\t\t$user_groups = array();\n\n\t\t// include WP metagroup(s) for WP blogrole(s)\n\t\t$metagroup_ids = array();\n\t\tif ( ! empty($args['metagroup_roles']) ) {\n\t\t\tforeach ( array_keys($args['metagroup_roles']) as $role_handle )\n\t\t\t\t$metagroup_ids []= 'wp_role_' . str_replace( 'wp_', '', $role_handle );\n\t\t}\n\n\t\tif ( $metagroup_ids ) {\n\t\t\t$meta_id_in = \"'\" . implode(\"', '\", $metagroup_ids) . \"'\";\n\n\t\t\t$query = \"SELECT $wpdb->groups_id_col FROM $wpdb->groups_rs\"\n\t\t\t. \" WHERE {$wpdb->groups_rs}.{$wpdb->groups_meta_id_col} IN ($meta_id_in)\"\n\t\t\t. \" ORDER BY $wpdb->groups_id_col\";\n\t\t\n\t\t\tif ( $meta_groups = scoper_get_col($query) )\n\t\t\t\t$user_groups = array_merge( $user_groups, $meta_groups );\n\t\t}\n\t\n\t\tif ( $user_groups && empty($args['no_cache']) ) { // users should always be in at least a metagroup. Problem with caching empty result on user creation beginning with WP 2.8\n\t\t\t$user_groups = array_fill_keys($user_groups, 1);\n\n\t\t\twpp_cache_set($user_id, $user_groups, 'group_membership_for_user');\n\t\t}\n\n\t\treturn $user_groups;\n\t}", "public function groups_get_group_members() {\n $this->init('groups');\n\n $oReturn = new stdClass();\n\n $mGroupExists = $this->get_group_from_params();\n\n if ($mGroupExists === false)\n return $this->error('base', 0);\n else if (is_int($mGroupExists) && $mGroupExists !== true)\n return $this->error('groups', $mGroupExists);\n\n $aMembers = groups_get_group_members($this->groupid, $this->limit);\n if ($aMembers === false) {\n $oReturn->group_members = array();\n $oReturn->count = 0;\n return $oReturn;\n }\n\n foreach ($aMembers['members'] as $aMember) {\n $oReturn->group_members[(int) $aMember->user_id]->username = $aMember->user_login;\n $oReturn->group_members[(int) $aMember->user_id]->mail = $aMember->user_email;\n $oReturn->group_members[(int) $aMember->user_id]->display_name = $aMember->display_name;\n }\n $oReturn->count = $aMembers['count'];\n\n return $oReturn;\n }", "protected function get_group_member_ids() {\n\t\tglobal $wpdb;\n\n\t\tif ( is_array( $this->group_member_ids ) ) {\n\t\t\treturn $this->group_member_ids;\n\t\t}\n\n\t\t$bp = buddypress();\n\t\t$sql = array(\n\t\t\t'select' => \"SELECT user_id FROM {$bp->groups->table_name_members}\",\n\t\t\t'where' => array(),\n\t\t\t'orderby' => '',\n\t\t\t'order' => '',\n\t\t\t'limit' => '',\n\t\t);\n\n\t\t/** WHERE clauses *****************************************************/\n\n\t\t// Group id\n\t\t$sql['where'][] = $wpdb->prepare( \"group_id = %d\", $this->query_vars['group_id'] );\n\n\t\tif ( false === $this->query_vars['is_confirmed'] ) {\n\t\t\t$sql['where'][] = $wpdb->prepare( \"is_confirmed = %d\", (int) $this->query_vars['is_confirmed'] );\n\t\t}\n\n\t\t// Join the query part\n\t\t$sql['where'] = ! empty( $sql['where'] ) ? 'WHERE ' . implode( ' AND ', $sql['where'] ) : '';\n\n\t\t/** ORDER BY clause ***************************************************/\n\t\t$sql['orderby'] = \"ORDER BY date_modified\";\n\t\t$sql['order'] = \"DESC\";\n\n\t\t/** LIMIT clause ******************************************************/\n\t\t$this->group_member_ids = $wpdb->get_col( \"{$sql['select']} {$sql['where']} {$sql['orderby']} {$sql['order']} {$sql['limit']}\" );\n\n\t\treturn $this->group_member_ids;\n\t}", "public function groups_get($uid, $gids) {\n return $this->call_method('facebook.groups.get',\n array(\n 'uid' => $uid,\n 'gids' => $gids));\n }", "private function find_group_members($gid){\n global $conn;\n $query = \"SELECT uid FROM group_member WHERE gid ='$gid'\";\n $result = mysqli_query($conn, $query);\n while($row= mysqli_fetch_array($result)){\n $this->user_groups[] = $row['uid'];\n }\n }", "function groups_db_m_get_group($groupid) {\n}", "public function groups_get_groups() {\n $this->init('groups');\n $oReturn = new stdClass();\n\n if ($this->username !== false || username_exists($this->username)) {\n $oUser = get_user_by('login', $this->username);\n $aParams ['user_id'] = $oUser->data->ID;\n }\n\n $aParams ['show_hidden'] = $this->show_hidden;\n $aParams ['type'] = $this->type;\n $aParams ['page'] = $this->page;\n $aParams ['per_page'] = $this->per_page;\n\n $aGroups = groups_get_groups($aParams);\n\n if ($aGroups['total'] == \"0\")\n return $this->error('groups', 0);\n\n foreach ($aGroups['groups'] as $aGroup) {\n $oReturn->groups[(int) $aGroup->id]->name = $aGroup->name;\n $oReturn->groups[(int) $aGroup->id]->description = $aGroup->description;\n $oReturn->groups[(int) $aGroup->id]->status = $aGroup->status;\n if ($aGroup->status == \"private\" && !is_user_logged_in() && !$aGroup->is_member === true)\n continue;\n $oUser = get_user_by('id', $aGroup->creator_id);\n $oReturn->groups[(int) $aGroup->id]->creator[(int) $aGroup->creator_id]->username = $oUser->data->user_login;\n $oReturn->groups[(int) $aGroup->id]->creator[(int) $aGroup->creator_id]->mail = $oUser->data->user_email;\n $oReturn->groups[(int) $aGroup->id]->creator[(int) $aGroup->creator_id]->display_name = $oUser->data->display_name;\n $oReturn->groups[(int) $aGroup->id]->slug = $aGroup->slug;\n $oReturn->groups[(int) $aGroup->id]->is_forum_enabled = $aGroup->enable_forum == \"1\" ? true : false;\n $oReturn->groups[(int) $aGroup->id]->date_created = $aGroup->date_created;\n $oReturn->groups[(int) $aGroup->id]->count_member = $aGroup->total_member_count;\n }\n\n $oReturn->count = count($aGroups['groups']);\n\n return $oReturn;\n }", "public static function& findById($id) {\n\t\t$userGroupsCache = &UserGroup::getUserGroupsCache();\n\t\treturn $userGroupsCache[$id];\n\t}", "public function groups_getMembers($gid) {\n return $this->execute('groups.getMembers',\n array('gid' => $gid));\n }", "public function get_members_by_grpid($group_id) {\n\n $sql = \"SELECT u.id as post_owner_user_id,\n\t\t\t\t\t\t\t CONCAT(u.s_first_name,' ', u.s_last_name) s_profile_name,\n\t\t\t\t\t \t\t u.s_profile_photo,\n\t\t\t\t\t\t\t u.e_gender,\n\t\t\t\t\t\t\t u.dt_created_on as member_since,\n\t\t\t\t\t\t\t pg.*,\n\t\t\t\t\t\t\t pg_mem.*,\n\t\t\t\t\t\t\t (SELECT COUNT(*) FROM cg_prayer_group_post gp \n\t\t\t\t\t\t\t \t\tWHERE gp.i_prayer_group_id = {$group_id} AND gp.i_user_id = u.id) as total_post\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\tFROM cg_prayer_group_members pg_mem\n\t\t\t\t\t\tLEFT JOIN cg_prayer_group pg ON pg.id = pg_mem.i_prayer_group_id\n\t\t\t\t\t\tLEFT JOIN cg_users u ON u.id= pg_mem.i_user_id\n\t\t\t\t\t\twhere pg.i_isenabled= 1 AND pg.id = {$group_id} AND pg_mem.s_status = 'accepted' \";\n #echo $sql; exit;\n\n $query = $this->db->query($sql);\n $result_arr = $query->result_array();\n $res_arr = check_friend_netpal_status($result_arr);\n return $res_arr;\n }" ]
[ "0.70419216", "0.6932772", "0.6511608", "0.6467706", "0.6349666", "0.62630403", "0.6165017", "0.61060876", "0.60888505", "0.6018243", "0.5992458", "0.59125334", "0.590601", "0.5898547", "0.5897332", "0.5875257", "0.5872247", "0.5854489", "0.5854214", "0.5809294", "0.5752279", "0.5714414", "0.5706518", "0.56901175", "0.56873035", "0.5681187", "0.5672296", "0.56610817", "0.5657463", "0.56572855" ]
0.770482
0
Get the channel member group using on a series of polymorphic parameters that returns an active record object.
public function get_channel_member_groups($select = array(), $where = array(), $order_by = 'channel_id', $sort = 'DESC', $limit = FALSE, $offset = 0) { $this->convert_params($select, $where, $order_by, $sort, $limit, $offset); return $this->EE->db->get('channel_member_groups'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSalesChannelGroup();", "function drush_conduit_group($title = '', $properties = '', $parent = NULL, $owner = 1) {\n $group = new stdClass();\n $group->uid = $owner;\n $group->type = 'conduit_group';\n $group->language = LANGUAGE_NONE;\n $group->title = $title;\n if ($parent) {\n $group->conduit_parent[LANGUAGE_NONE][0]['target_id'] = $parent;\n }\n $group->conduit_properties[LANGUAGE_NONE][0]['value'] = $properties;\n node_save($group);\n echo \"Created group #{$group->nid}.\\n\";\n return $group;\n}", "public function get_channel_member_group($group_id = FALSE, $channel_id = FALSE)\n\t{\n\t\t$params = array();\n\t\t\n\t\tif($group_id !== FALSE)\n\t\t\t$params['where']['group_id'] = $group_id;\n\t\t\n\t\tif($channel_id !== FALSE)\n\t\t\t$params['where']['channel_id'] = $channel_id;\n\t\t\n\t\t$this->convert_params($params);\n\t\t\n\t\treturn $this->EE->db->get('channel_member_groups');\n\t}", "public function create()\n {\n return GroupMember::All();\n }", "public function channel()\n {\n return $this->belongsTo(ChannelProxy::modelClass());\n }", "function getGroupMembership() {\n\n return $this->principalBackend->getGroupMemberShip($this->principalProperties['uri']);\n\n }", "public function channel()\n {\n return $this->morphTo();\n }", "public function getChannel()\n {\n return $this->hasMany('App\\Channel', 'user_id', 'id');\n }", "abstract protected function _buildGroupBy( $group );", "abstract public function getGroups();", "public function group() {\n return entity_load($this->group_type, $this->gid);\n }", "public function getChannel();", "function get_group() {\n\n\t\t// Setup args\n\t\t$args = array(\n\t\t\t'type' => 'active',\n\t\t\t'max' => 5,\n\t\t 'populate_extras' => false,\n\t\t);\n\n\t\t// Retrieve groups\n\t\tif ( bp_has_groups( $args ) ) :\n\n\t\t\t// Re-shuffle the array to draw a random group\n\t\t\tglobal $groups_template;\n\t\t\tshuffle( $groups_template->groups );\n\n\n\t\t\t// Only load the first group\n\t\t\tbp_the_group();\n\n\t\t\t// Build the HTML\n\t\t\t$this->html = $this->build_html();\t\n\t\t\n\t\tendif;\n\t}", "protected function _getGroup()\n\t{ \n\t $group = $this->_mixer->getIdentifier();\n\t return $group;\n\t}", "public function getGroup()\n {\n \tglobal $_mConfig;\n\n \tif(empty($_SESSION['AMADIS']['Admin']['group'])) {\n $g = new CMGroup;\n $g->codeGroup = $_SESSION['config']['admin']['codeGroup'];\n $g->load();\n $_SESSION['AMADIS']['Admin']['group'] = $g;\n } else {\n $g = $_SESSION['AMADIS']['Admin']['group'];\n }\n return $g;\n }", "public function getGroup();", "public function getGroup();", "public function getGroup();", "function get_group($user_id, $group_id) {\r\n\r\n\t// Check to see if the user is a member in the group, if not then ask to join.\r\n\tif (!is_member($user_id, $group_id)) {\r\n\t\t// We will need better error coverage in later releases\r\n\t\techo USER_IS_NOT_MEMBER;\r\n\t\t\r\n\t\t\t// Prepare a join link for the group.\r\n\t\t\t$str1 = '<a href=\"?change_group=' . $group_id . ' \">';\r\n\t\t\t$str2 = '</a>';\r\n\t\t\t$error = USER_ASK_TO_JOIN_GROUP;\r\n\t\t\t\r\n\t\t$msg = str_replace('%1', $str1, $error);\r\n\t\t$msg = str_replace('%2', $str2, $msg);\r\n\t\t\r\n\t\tdie($msg);\r\n\t\t\r\n\t// We don't really need this here, but it will catch any really strange quirks with the script.\r\n\t} else {\r\n\r\n\t\t// Get the base data\r\n\t\tData::set('base-data', 'SELECT * FROM `' . Data::get('db') . '`.`groups` WHERE `group_id` = \"' . MySQL::clean($group_id) . '\" LIMIT 1', true);\r\n\t\t\r\n\t\t\t$base = MySQL::search(Data::get('base-data'));\r\n\t\t\r\n\t\t// Get a few of the members\r\n\t\tData::set('members', 'SELECT `user_id` FROM `' . Data::get('db') . '`.`group_members` WHERE `group_id` = \"' . MySQL::clean($group_id) . '\" LIMIT 10', true);\r\n\t\t\t\r\n\t\t\t$members = MySQL::search(Data::get('members'));\r\n\t\t\r\n\t\t// Get a few of the latest conversations\r\n\t\tData::set('conversations', 'SELECT * FROM `' . Data::get('db') . '`.`group_conversations` WHERE `group_id` = \"' . MySQL::clean($group_id) . '\" ORDER BY `timestamp` DESC LIMIT 10', true);\r\n\t\t\r\n\t\t\t$conversations = MySQL::search(Data::get('conversations'));\r\n\t\t\r\n\t\t// Send the data back in an array.\r\n\t\treturn array (\r\n\t\t\t'base' => $base[0],\r\n\t\t\t'members' => $members,\r\n\t\t\t'conversations' => $conversations\r\n\t\t);\r\n\t}\r\n}", "function get_memeber_groups( $member_id ) {\r\n global $wpdb;\r\n $results = $wpdb->get_results( $wpdb->prepare( \"SELECT group_id FROM {$this->tb_prefix}enewsletter_member_group WHERE member_id = %d\", $member_id ), \"ARRAY_A\");\r\n foreach( $results as $group ){\r\n $groups[] = $group['group_id'];\r\n }\r\n return $groups;\r\n }", "function categorized_mychannel_media($channel ) {\n\t$query = \"SELECT * from Media WHERE `owner_username` = '$channel' GROUP BY `Category` ; \" ;\n\t$result = mysqli_query( $GLOBALS['con'], $query );\n\tif (!$result){\n\t die (\"Could not query the media table in the database: <br />\". mysql_error());\n\t }\n\t$_SESSION['categories'] = true ;\n\treturn $result ;\n}", "function get_member()\n {\n $member = array('all' => array(), 'mail' => array());\n $ldap = $this->config->get_ldap_link();\n $ldap->cd($this->config->current['BASE']);\n if(isset($this->parent->by_object['group'])){\n foreach($this->parent->by_object['group']->memberUid as $uid){\n if(!isset($this->parent->by_object['group']->dnMapping[$uid])) continue;\n $dn = $this->parent->by_object['group']->dnMapping[$uid];\n $member['all'][$uid] = $uid;\n if($ldap->object_match_filter($dn,\"(&(objectClass=gosaMailAccount)(\".$this->mailMethod->getUAttrib().\"=*))\")){\n $ldap->cat($dn);\n $attrs = $ldap->fetch();\n $member['mail'][$uid] = $attrs[$this->mailMethod->getUAttrib()][0]; \n }\n }\n }else{\n if(!isset($this->attrs['memberUid'])) return($member);\n $uattrib = $this->mailMethod->getUAttrib();\n $users = get_list(\"(&(objectClass=person)(objectClass=gosaAccount)(uid=*))\",\n \"users\",$this->config->current['BASE'],\n array(\"uid\",\"objectClass\",$uattrib),GL_SUBSEARCH | GL_NO_ACL_CHECK);\n foreach($users as $user){\n $member['all'][$user['uid'][0]] = $user['dn'];\n if(isset($user[$uattrib]) \n && in_array_strict(\"gosaMailAccount\",$user['objectClass']) \n && (in_array_strict($user['uid'][0], $this->attrs['memberUid']))){\n $member['mail'][$user['uid'][0]] = $user[$uattrib][0];\n }\n }\n }\n return($member);\n }", "public function channel()\n {\n return $this->belongsTo(Channel::class, 'channel_id', 'id');\n }", "public function channel()\n {\n return $this->belongsTo(Channel::class);\n }", "public function channel()\n {\n return $this->belongsTo(Channel::class);\n }", "public function channel()\n {\n return $this->belongsTo(Channel::class);\n }", "private function createModelGroup()\n {\n return new $this->modelGroup;\n }", "public function groups()\n {\n return $this->hasOne(Social::class);\n }", "public function getBaseModel($params = [])\n {\n if (class_exists($this->class)) {\n $params['source'] = $this->getPolymorphicRelation();\n $params['originator'] = $this->originator;\n $params['groupCount'] = $this->group_user_count;\n if ($this->group_count > 1) {\n // Make sure we're loaded the latest notification record\n $params['record'] = self::find()\n ->orderBy(['seen' => SORT_ASC, 'created_at' => SORT_DESC])\n ->andWhere(['class' => $this->class, 'user_id' => $this->user_id, 'group_key' => $this->group_key])\n ->one();\n $params['originator'] = $params['record']->originator;\n\n } else {\n $params['record'] = $this;\n }\n\n $object = new $this->class;\n Yii::configure($object, $params);\n return $object;\n }\n return null;\n }", "public function getGroup() {}" ]
[ "0.58507186", "0.54942036", "0.5424101", "0.5399082", "0.5353559", "0.5275389", "0.5250253", "0.5222436", "0.520953", "0.5140375", "0.5111176", "0.50795275", "0.5076468", "0.5066952", "0.5060879", "0.50291306", "0.50291306", "0.50291306", "0.50274056", "0.5004024", "0.49735403", "0.4965257", "0.4960224", "0.49599558", "0.49599558", "0.49599558", "0.49541295", "0.49498317", "0.4948515", "0.49362954" ]
0.5971688
0
Get channel title using an entry id
public function get_channel_title($entry_id, $select = array('*')) { return $this->get_channel_titles($select, array('entry_id' => $entry_id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChannelTitle()\n {\n return $this->post['snippet']['channelTitle'];\n }", "public function getCategoryTitle($id){\n $sql = \"SELECT title FROM category WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $title = mysqli_fetch_all($res)[0][0];\n return $title;\n }", "public function getTopicTitle($id){\n $sql = \"SELECT title FROM topic WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $title = mysqli_fetch_all($res)[0][0];\n return $title;\n }", "function gu_get_theTitle($id)\n{\n\t$page = get_post($id);\n\treturn $page->post_title;\n}", "function gettitlefromid ($id) {\n $dosql = \"SELECT title FROM \".$GLOBALS['prefix'].\"lb_postings\n WHERE id='\" . $id . \"';\";\n $row = $GLOBALS['lbdata']->GetArray($dosql);\n return $row[0]['title'];\n}", "public function getTitle(string $id): string;", "public function getObjectTitle( $id ) {\r\n\t\t$db\t\t= JFactory::getDBO();\r\n\t\t$query = $db->getQuery(true);\r\n\t\t$query->select('name');\r\n\t\t$query->from('`#__tracker_torrents`');\r\n\t\t$query->where('fid = '.(int) $id);\r\n\t\t$db->setQuery($query);\r\n\t\treturn $db->loadResult();\r\n\t}", "public function getThemeTitle($id){\n $sql = \"SELECT title FROM theme WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $title = mysqli_fetch_all($res)[0][0];\n return $title;\n }", "function _get_campaign_name($id) \n {\n $sql = \"SELECT title FROM $this->campaign_table WHERE id=?\";\n\t $query = $this->db->query($sql,array($id)); \n if($query->num_rows() > 0)\n {\n foreach($query->result_array() as $r)\n\t {\n\t $name = ucfirst($r['title']);\n\t }\n\t return $name; \n }\n }", "function bbp_get_forum_title($forum_id = 0)\n{\n}", "public function getTitle(string $ticketId);", "function bbp_get_topic_forum_title($topic_id = 0)\n{\n}", "function bbp_get_topic_title($topic_id = 0)\n{\n}", "function category_name($id) {\n\n global $course_id;\n\n $r = Database::get()->querySingle(\"SELECT cat_title FROM forum_category\n WHERE id = ?d\n AND course_id = ?d\", $id, $course_id);\n if ($r) {\n return $r->cat_title;\n } else {\n return FALSE;\n }\n}", "public function showTitelId($id)\n {\n $sql = \"SELECT id, title FROM content WHERE id = ?;\";\n $res = $this->contentDB->executeFetch($sql, [$id]);\n return $res;\n }", "public function getCategoryName($id) {\n $value = ContentCategory::model()->findByAttributes(array('id' => $id));\n if (empty($value->title)) {\n return null;\n } else {\n return $value->title;\n }\n }", "public function channelName()\n {\n return \"acp_\".$this->id;\n }", "public function get_entry($entry_id, $select = array('channel_data.entry_id', 'channel_data.channel_id', 'channel_titles.title', 'channel_titles.url_title', 'channel_titles.entry_date', 'channel_titles.expiration_date', 'status'))\n\t{\n\t\t$entry = $this->get_channel_title($entry_id)->row();\n\t\t\t\t\n\t\treturn $this->get_entries($entry->channel_id, $select, array('channel_data.entry_id' => $entry_id));\n\t}", "public function title()\n {\n return $this->entry->title;\n }", "public final function getChannelName()\n {\n return $this->extractData(\"channel_name\");\n }", "function ui_the_title($id){\n\tglobal $wpdb;\n\t$mylink = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID = $id \");\n\tforeach($mylink as $row){ \n\t\techo $row->post_title_tmt;\n\t}\n}", "function pageTitle() {\n\n $title = \"Memory Atlas\";\n\n if ($_SERVER['SCRIPT_NAME'] == '/entry.php') {\n $entry = get_entry($_GET['entry_id']);\n $title = title($entry);\n }\n\n return $title;\n}", "private function current_title()\n\t\t\t {\n\t\t\t \t \n\t\t\t \t $sel = array(\n\t\t\t \t \t\t\t'channel_titles.title',\n\t\t\t \t \t\t\t'channel_titles.url_title',\n\t\t\t \t \t\t\t'channel_titles.site_id',\n\t\t\t \t \t\t\t'channel_titles.channel_id',\n\t\t\t \t \t\t\t'channels.channel_name',\n\t\t\t \t \t\t\t'channels.channel_title',\n\t\t\t \t \t\t\t);\n\t\t\t \t \t\t\t\n\t\t\t \t // Map field ids to human-friendly field names.\t\t\n\t\t\t \t foreach($this->field_names as $id=>$name)\n\t\t\t \t {\n\t\t\t\t \t $sel[]\t= 'channel_data.' . $id . ' AS ' . $name;\n\t\t\t \t }\n\t\t\t \n\t\t\t\t \n\t\t\t\t $query = ee()->db\n\t\t\t\t \t\t\t->select($sel)\n\t\t\t\t \t\t\t->join('channels','channels.channel_id = channel_titles.channel_id')\n\t\t\t\t \t\t\t->join('channel_data','channel_data.entry_id = channel_titles.entry_id')\n\t\t\t\t \t\t\t->where('channel_titles.entry_id',$this->entry_id)\n\t\t\t\t \t\t\t->where_in('channel_titles.status',$this->status_array)\n\t\t\t\t \t\t\t->limit(1)\n\t\t\t\t \t\t\t->get('channel_titles');\n\n\t\t\t\t if($query->num_rows()==1)\n\t\t\t\t {\n\t\t\t\t \treturn $query->row();\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }", "function get_subject_name($link, $id){\r\n\t\t$query = \"SELECT menu_name FROM subjects\";\r\n\t\t$query .= \" WHERE id = {$id}\";\r\n\t\t$query .= \" LIMIT 1\";\r\n\r\n\t\t$result = mysqli_query($link, $query);\r\n\r\n\t\tconfirm_connection($result, \"Failed to get the name of the subject\");\r\n\r\n\t\t$item = mysqli_fetch_assoc($result);\r\n\t\treturn $item[\"menu_name\"];\r\n\t}", "public function getJobTitle($id) { //expecting job id\n\n $job = Job::findOne($id);\n return $job->title;\n\n }", "private function getAssignmentName($id){\n return $this->database->get(\n \"assignments\",\n \"title\",\n [\"id\" => $id]\n );\n }", "public function getTitle(){\n\t\t\n\t\treturn $this->id;\n\t}", "public function getChannelId()\n {\n return $this->post['snippet']['channelId'];\n }", "function get_content_title( $content_id )\n\t{\n\t\t$q = \"SELECT content_title FROM title_dev_contents WHERE content_id = \".$content_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r != false )\n\t\t\treturn $r['content_title'];\n\t\telse\n\t\t\treturn false;\n\t}", "function campaign_name_from_id($campaign_id) \n {\n $query = $this->db->select('title')\n\t ->from($this->campaign_table)\n\t\t\t\t\t ->where('id',$campaign_id)\n\t\t\t\t\t ->get();\n\tif($query->num_rows() > 0) \n {\n foreach($query->result_array() as $r)\n\t { \n $data = $r['title']; \n }\n return $data; \t \n }\t\t\t\t \n }" ]
[ "0.69064564", "0.6718451", "0.66053784", "0.6393574", "0.6393142", "0.63328475", "0.6277142", "0.62201333", "0.6219537", "0.61590976", "0.6143579", "0.6136468", "0.6111554", "0.60768414", "0.6074639", "0.6049132", "0.59934145", "0.5987425", "0.59832126", "0.5979184", "0.59697026", "0.5961643", "0.5948252", "0.5863308", "0.5843017", "0.5837342", "0.58202386", "0.58174366", "0.5803757", "0.5802114" ]
0.800996
0
Get channel titles using on a series of polymorphic parameters that returns an active record object.
public function get_channel_titles($select = array(), $where = array(), $order_by = 'channel_id', $sort = 'DESC', $limit = FALSE, $offset = 0) { $this->convert_params($select, $where, $order_by, $sort, $limit, $offset); return $this->EE->db->get('channel_titles'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_title_by_type($id, $type, $subtype = '') {\r\n\t\t$title = '';\r\n\r\n\t\tif ($type === 'post') {\r\n\t\t\t$title = get_the_title($id);\r\n\t\t} elseif($type === 'term') {\r\n\t\t\t$term = get_term_by('id', $id, $subtype);\r\n\t\t\t$title = $term->name;\r\n\t\t} elseif($type === 'user') {\r\n\t\t\t$title = get_the_author_meta('user_login', $id);\r\n\t\t} elseif($type === 'comment') {\r\n\t\t\t$title = get_comment_text($id);\r\n\t\t\t$max = apply_filters('carbon_relationship_comment_length', 30, $this->get_name());\r\n\t\t\tif (strlen($title) > $max) {\r\n\t\t\t\t$title = substr($title, 0, $max) . '...';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!$title) {\r\n\t\t\t$title = '(no title) - ID: ' . $id;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Filter the title of the relationship item.\r\n\t\t *\r\n\t\t * @param string $title The unfiltered item title.\r\n\t\t * @param string $name Name of the relationship field.\r\n\t\t * @param int $id The database ID of the item.\r\n\t\t * @param string $type Item type (post, term, user, comment, or a custom one).\r\n\t\t * @param string $subtype Subtype - \"page\", \"post\", \"category\", etc.\r\n\t\t */\r\n\t\treturn apply_filters('carbon_relationship_title', $title, $this->get_name(), $id, $type, $subtype);\r\n\t}", "function get_title_by_type($id, $type, $subtype = '') {\r\n\t\t$title = get_the_title($id);\r\n\t\tif (!$title) {\r\n\t\t\t$title = '(no title) - ID: ' . $id;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Filter the title of the relationship item.\r\n\t\t *\r\n\t\t * @param string $title The unfiltered item title.\r\n\t\t * @param string $name Name of the relationship field.\r\n\t\t * @param int $id The database ID of the item.\r\n\t\t * @param string $type Item type (post, term, user, comment, or a custom one).\r\n\t\t * @param string $subtype Subtype - \"page\", \"post\", \"category\", etc.\r\n\t\t */\r\n\t\treturn apply_filters('carbon_relationship_title', $title, $this->get_name(), $id, $type, $subtype);\r\n\t}", "protected function channels()\n {\n Channel::truncate();\n\n collect([\n [\n 'name' => 'PHP',\n 'description' => 'A channel for general PHP questions. Use this channel if you can\\'t find a more specific channel for your question.',\n 'colour' => '#008000'\n ],\n [\n 'name' => 'Vue',\n 'description' => 'A channel for general Vue questions. Use this channel if you can\\'t find a more specific channel for your question.',\n 'colour' => '#cccccc'\n ],\n [\n 'name' => 'JavaScript',\n 'description' => 'This channel is for all JavaScript related questions.',\n 'colour' => '#43DDF5'\n ],\n [\n 'name' => 'Node',\n 'description' => 'This channel is for all Node related questions.',\n 'colour' => '#a01212'\n ],\n [\n 'name' => 'Ruby',\n 'description' => 'This channel is for all Ruby related questions.',\n 'colour' => '#ff8822'\n ],\n [\n 'name' => 'Go',\n 'description' => 'This channel is for all Go related questions.',\n 'colour' => '#ea4e28'\n ],\n [\n 'name' => 'Laravel',\n 'description' => 'This channel is for all Laravel related questions.',\n 'colour' => '#113a62'\n ],\n [\n 'name' => 'Elixir',\n 'description' => 'This channel is for all Elixir related questions.',\n 'colour' => '#4a245d'\n ],\n [\n 'name' => 'Webpack',\n 'description' => 'This channel is for all Webpack related questions.',\n 'colour' => '#B3CBE6'\n ],\n [\n 'name' => 'Symfony',\n 'description' => 'This channel is for all Symfony related questions.',\n 'colour' => '#091b47'\n ],\n [\n 'name' => 'React',\n 'description' => 'This channel is for all React related questions.',\n 'colour' => '#1E38BB'\n ],\n [\n 'name' => 'Java',\n 'description' => 'This channel is for all Java related questions.',\n 'colour' => '#01476e'\n ],\n [\n 'name' => 'AWS',\n 'description' => 'This channel is for all AWS related questions.',\n 'colour' => '#444444'\n ],\n\n ])->each(function ($channel) {\n factory(Channel::class)->create([\n 'name' => $channel['name'],\n 'description' => $channel['description'],\n 'colour' => $channel['colour']\n ]);\n });\n\n return $this;\n }", "function getTitle($params)\n\t { \n\t $county_detail=$this->getCountyDetails($params['pass'][1]);\n\t $state_detail=$this->getStateDetails($params['pass'][0]);\n\t if(count($params['pass'])=='2')\n\t {\n\t $title=$county_detail=$this->getCountyDetails($params['pass'][1]);\n\t }\n\t elseif(count($params['pass'])=='4')\n\t {\n\t\t $category_detail=$this->getCategoryDetails($params['pass'][2]);\n\t\t $subcategory_detail=$this->getSubcategoryDetails($params['pass'][3]);\n\t\t \n\t\t App::import('Model','Meta');\n\t\t $this->meta=new Meta();\n\t\t $meta_details= $this->meta->find('first',array('conditions'=>array('Meta.county_id'=>$county_detail['County']['id'],'Meta.subcategory_id'=>$subcategory_detail['Subcategory']['id'])));\n\t\n\t if($meta_details['Meta']['meta_title']!='')\n\t\t {\n\t\t $title=$meta_details['Meta']['meta_title'].' - '.$category_detail['Category']['categoryname'].' - '.$county_detail['County']['meta_title'].' - '.$state_detail['State']['statename'];\n\t\t }\n\t\t else\n\t\t {\n\t\t $title=$subcategory_detail['Subcategory']['meta_title'].' - '.$category_detail['Category']['categoryname'].' - '.$county_detail['County']['meta_title'].' - '.$state_detail['State']['statename'];\n\t\t }\n\t\t\t \n\t }\n\t\t elseif(count($params['pass'])=='5')\n\t\t\t {\n\t\t\t\t $city_detail=$this->getCityDetails($params['pass'][2]);\n\t\t\t\t $category_detail=$this->getCategoryDetails($params['pass'][3]);\n\t\t\t\t// pr($category_detail);die;\n\t\t\t\t $subcategory_detail=$this->getSubcategoryDetails($params['pass'][4]);\n\t\t\t\t App::import('Model','Meta');\n\t\t\t\t $this->meta=new Meta();\n\t\t\t\t$meta_details= $this->meta->find('first',array('conditions'=>array('Meta.city_id'=>$city_detail['City']['id'],'Meta.subcategory_id'=>$subcategory_detail['Subcategory']['id'])));\n\t\t\t\t\t\t\t\t \n\t\t\t\t if($meta_details['Meta']['meta_title']!='')\n\t\t\t\t {\n\t\t\t\t $title=$meta_details['Meta']['meta_title'].' - '.$category_detail['Category']['categoryname'].' - '.$subcategory_detail['Subcategory']['categoryname'].' - '.$county_detail['County']['meta_title'].' - '.$state_detail['State']['statename'];\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t $title=$city_detail['City']['meta_title'].' - '.$category_detail['Category']['categoryname'].' - '.$subcategory_detail['Subcategory']['categoryname'].' - '.$county_detail['County']['meta_title'].' - '.$state_detail['State']['statename'];\t\t\t\t \n\t\t\t\t }\t\t\t \n\t\t\t }\n\t\t\telseif(count($params['pass'])=='6')\n\t\t\t\t {\n\t\t\t\t App::import('model','AdvertiserProfile');\n\t\t $this->ad_pro=new AdvertiserProfile();\n\t\t\t\t\t\n\t\t\t\t\t $city_detail=$this->getCityDetails($params['pass'][2]);\n\t\t\t\t\t $category_detail=$this->getCategoryDetails($params['pass'][3]);\n\t\t\t\t\t // pr($category_detail);die;\n\t\t\t\t\t $subcategory_detail=$this->getSubcategoryDetails($params['pass'][4]);\n\t\t\t\t\t $com_url=$params['pass'][5];\n\t\t\t\t\t $comp_name=$this->ad_pro->query(\"select company_name from advertiser_profiles where page_url='$com_url'\");\n\t\t $title=$comp_name[0]['advertiser_profiles']['company_name'].' - '.$subcategory_detail['Subcategory']['categoryname'].' - '.$category_detail['Category']['categoryname'].' - '.$city_detail['City']['cityname'].' - '.$county_detail['County']['countyname'].' - '.$state_detail['State']['statename'];\n\t\t\t\t }\n\t\t\t\t elseif(count($params['pass'])=='7')\n\t\t\t\t {\n\t\t\t\t App::import('model','AdvertiserProfile');\n\t\t $this->ad_pro=new AdvertiserProfile();\n\t\t\t\t\t\n\t\t\t\t\t $city_detail=$this->getCityDetails($params['pass'][2]);\n\t\t\t\t\t $category_detail=$this->getCategoryDetails($params['pass'][3]);\n\t\t\t\t\t // pr($category_detail);die;\n\t\t\t\t\t $subcategory_detail=$this->getSubcategoryDetails($params['pass'][4]);\n\t\t\t\t\t $com_url=$params['pass'][5];\n\t\t\t\t\t $comp_name=$this->ad_pro->query(\"select company_name from advertiser_profiles where page_url='$com_url'\");\n\t\t $title=$comp_name[0]['advertiser_profiles']['company_name'].' - '.$subcategory_detail['Subcategory']['categoryname'].' - '.$category_detail['Category']['categoryname'].' - '.$city_detail['City']['cityname'].' - '.$county_detail['County']['countyname'].' - '.$state_detail['State']['statename'];\n\t\t\t\t }\n\t\t return $title;\n\t\t}", "public function getCategories($channels);", "function getPageTitle($data)\n{\n\t$str = \"\";\n\n\t# we should always have a channel\n\tif(isset($data['channel']))\n\t{\n\t\t$str .= $data['channel']['name'];\n\t}\n\n\t# maybe a subchannel\n\tif(isset($data['channel']['subChannels'][0]))\n\t{\n\t\t$str .= ' | '. $data['channel']['subChannels'][0]['name'];\t\n\t}\n\n\t# or a category\n\tif(isset($data['channel']['subChannels'][0]['categories']))\n\t{\n\t\t$str .= ' | '. $data['channel']['subChannels'][0]['categories'][0]['name'];\t\n\t}\n\n\t# and finally an article\n\tif(isset($data['article']))\n\t{\n\t\t$str .= ' | '. $data['article']['title'];\n\t}\n\n\t# send it back\n\treturn $str;\n}", "public function get_channel_title($entry_id, $select = array('*'))\n\t{\n\t\treturn $this->get_channel_titles($select, array('entry_id' => $entry_id));\n\t}", "public function getChannelTitle()\n {\n return $this->post['snippet']['channelTitle'];\n }", "public function index()\n\t{\n\t\t$all_channels = $this->getAll();\n\t\treturn array_map(function($channel){\n\t\t\treturn array(\n\t\t\t\t'id' => $channel->id,\n\t\t\t\t'title' => $channel->title\n\t\t\t);\n\t\t}, $all_channels);\n\t}", "function humcore_get_facet_titles() {\n\t$facet_titles = array(\n\t\t\t'author_facet' => __( 'Author', 'humcore_domain' ),\n\t\t\t'group_facet' => __( 'Group', 'humcore_domain' ),\n\t\t\t'subject_facet' => __( 'Subject', 'humcore_domain' ),\n\t\t\t'genre_facet' => __( 'Item Type', 'humcore_domain' ),\n\t\t\t'pub_date_facet' => __( 'Date', 'humcore_domain' ),\n\t\t\t'type_of_resource_facet' => __( 'File Type', 'humcore_domain' ),\n\t\t);\n\n\treturn apply_filters( 'humcore_get_facet_titles', $facet_titles );\n}", "public static function getObjectTitle($type, $object_id) {\r\n $return_value = \"\";\r\n if($type == CMSConstants::$CMS_PAGE_POST) {\r\n $data = \\common\\modules\\cms\\models\\CmsPostContent::findOne($object_id);\r\n if(isset($data) && $data != NULL) {\r\n $return_value = $data->TITLE;\r\n } \r\n } else if($type == CMSConstants::$CMS_PAGE_POST_CATEGORY) {\r\n $data = \\common\\modules\\cms\\models\\CmsCategory::findOne($object_id);\r\n if(isset($data) && $data != NULL) {\r\n $return_value = $data->TITLE;\r\n }\r\n } /*else if($type == CMSConstants::$CMS_PAGE_COURSE_LIST) { \r\n $data = \\common\\modules\\lms\\models\\EcProgram::findOne($object_id);\r\n if(isset($data) && $data != NULL) {\r\n $return_value = $data->title;\r\n } \r\n }*/\r\n \r\n //print_r(\" return=\" . $return_value);\r\n \r\n return $return_value;\r\n \r\n }", "public function channelNames()\n {\n yield [\n 'http://www.twitch.tv/directory/following',\n ''\n ];\n\n yield [\n 'http://www.twitch.tv/directory',\n ''\n ];\n\n yield [\n 'http://www.twitch.tv/test_channel',\n 'test_channel'\n ];\n }", "public function getTitle()\n {\n return $this->name.' ('.implode(',',json_decode($this->categories)).' )';\n }", "public function getTitles($username);", "abstract protected function getTitle();", "abstract protected function getTitle();", "abstract protected function getOpenGraphTitle();", "protected function _getTitle($type)\n {\n if(!empty($this->titles[$type])) {\n return $this->titles[$type];\n }\n\n return $this->_getKey() . ': ' . $type;\n }", "private function get_all_channels() {\n\t\treturn get_terms( 'p2_channel', array( 'hide_empty' => false ) );\n\t}", "public function GetChannelInfo(){\n//\t\t$channelInfoJson = '{\"jsonrpc\": \"2.0\", \"method\": \"Player.GetItem\", \"params\": { \"properties\": [\"title\"], \"playerid\":1 }, \"id\": 1}';\n\t\t$channelInfoJson = '{\"jsonrpc\":\"2.0\",\"method\":\"Player.GetItem\",\"params\":{\"playerid\":1,\"properties\":[\"title\",\"artist\",\"albumartist\",\"genre\",\"year\",\"rating\",\"album\",\"track\",\"duration\",\"comment\",\"lyrics\",\"musicbrainztrackid\",\"musicbrainzartistid\",\"musicbrainzalbumid\",\"musicbrainzalbumartistid\",\"playcount\",\"fanart\",\"director\",\"trailer\",\"tagline\",\"plot\",\"plotoutline\",\"originaltitle\",\"lastplayed\",\"writer\",\"studio\",\"mpaa\",\"cast\",\"country\",\"imdbnumber\",\"premiered\",\"productioncode\",\"runtime\",\"set\",\"showlink\",\"streamdetails\",\"top250\",\"votes\",\"firstaired\",\"season\",\"episode\",\"showtitle\",\"thumbnail\",\"file\",\"resume\",\"artistid\",\"albumid\",\"tvshowid\",\"setid\",\"watchedepisodes\",\"disc\",\"tag\",\"art\",\"genreid\",\"displayartist\",\"albumartistid\",\"description\",\"theme\",\"mood\",\"style\",\"albumlabel\",\"sorttitle\",\"episodeguide\",\"uniqueid\",\"dateadded\",\"channel\",\"channeltype\",\"hidden\",\"locked\",\"channelnumber\",\"starttime\",\"endtime\"]},\"id\":1}';\n\t\t$this->Send($channelInfoJson);\n\t}", "abstract protected function getTitleFieldNames();", "public abstract function getItemTitle();", "public function getAll() {\n\t\tglobal $wpdb;\n\n\t\t$channels = array();\n\t\t$table = WiseChatInstaller::getChannelsTable();\n\t\t$sql = sprintf('SELECT * FROM %s ORDER BY name ASC;', $table);\n\t\t$results = $wpdb->get_results($sql);\n\t\tif (is_array($results)) {\n\t\t\tforeach ($results as $result) {\n\t\t\t\t$channels[] = $this->populateChannelData($result);\n\t\t\t}\n\t\t}\n\n\t\treturn $channels;\n\t}", "public abstract function GetTitle();", "public function get_product_titles()\n {\n $query = $this->ee->store->db->table('store_products')\n ->join('channel_titles', 'channel_titles.entry_id', '=', 'store_products.entry_id')\n ->select(array('channel_titles.entry_id', 'channel_titles.title'))\n ->where('site_id', config_item('site_id'))\n ->orderBy('channel_titles.title')\n ->get();\n\n $products = array();\n foreach ($query as $row) {\n $products[$row['entry_id']] = $row['title'];\n }\n\n return $products;\n }", "function channelsListByUsername($youtube, $part, $forUsername) {\n $response = $youtube->channels->listChannels(\n $part,\n array(\n 'forUsername' => $forUsername\n )\n );\n\n printResults($response);\n}", "private function current_title()\n\t\t\t {\n\t\t\t \t \n\t\t\t \t $sel = array(\n\t\t\t \t \t\t\t'channel_titles.title',\n\t\t\t \t \t\t\t'channel_titles.url_title',\n\t\t\t \t \t\t\t'channel_titles.site_id',\n\t\t\t \t \t\t\t'channel_titles.channel_id',\n\t\t\t \t \t\t\t'channels.channel_name',\n\t\t\t \t \t\t\t'channels.channel_title',\n\t\t\t \t \t\t\t);\n\t\t\t \t \t\t\t\n\t\t\t \t // Map field ids to human-friendly field names.\t\t\n\t\t\t \t foreach($this->field_names as $id=>$name)\n\t\t\t \t {\n\t\t\t\t \t $sel[]\t= 'channel_data.' . $id . ' AS ' . $name;\n\t\t\t \t }\n\t\t\t \n\t\t\t\t \n\t\t\t\t $query = ee()->db\n\t\t\t\t \t\t\t->select($sel)\n\t\t\t\t \t\t\t->join('channels','channels.channel_id = channel_titles.channel_id')\n\t\t\t\t \t\t\t->join('channel_data','channel_data.entry_id = channel_titles.entry_id')\n\t\t\t\t \t\t\t->where('channel_titles.entry_id',$this->entry_id)\n\t\t\t\t \t\t\t->where_in('channel_titles.status',$this->status_array)\n\t\t\t\t \t\t\t->limit(1)\n\t\t\t\t \t\t\t->get('channel_titles');\n\n\t\t\t\t if($query->num_rows()==1)\n\t\t\t\t {\n\t\t\t\t \treturn $query->row();\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }", "protected abstract function getObjectTitle();", "public function getTitle();", "public function getTitle();" ]
[ "0.5776149", "0.5442145", "0.54298294", "0.5314031", "0.52545744", "0.5234999", "0.5135041", "0.50940084", "0.5087509", "0.5076702", "0.5052548", "0.50107133", "0.49908876", "0.49662063", "0.4948116", "0.4948116", "0.49459893", "0.49365902", "0.49263436", "0.49057353", "0.4868234", "0.4847356", "0.4831572", "0.4829703", "0.4824433", "0.48144454", "0.48053417", "0.48026964", "0.47924122", "0.47924122" ]
0.599833
0
Get entries by specifying a channel id. Polymorphic paramerts are also accepted. The channel id is required.
public function get_entries($channel_id, $select = array('channel_data.entry_id', 'channel_data.channel_id', 'channel_titles.title', 'channel_titles.url_title', 'channel_titles.entry_date', 'channel_titles.expiration_date', 'status'), $where = array(), $order_by = 'channel_titles.channel_id', $sort = 'DESC', $limit = FALSE, $offset = 0) { if($channel_id !== FALSE) { $channel = $this->get_channel($channel_id)->row(); $fields = $this->get_channel_fields('*', array('group_id' => $channel->field_group))->result(); foreach($fields as $field) { $select[] = 'field_id_'.$field->field_id.' as \''.$field->field_name.'\''; foreach($where as $index => $value) { if($field->field_name == $index) { unset($where[$index]); $where['field_id_'.$field->field_id] = $value; } } } $this->EE->db->where($where); $this->EE->db->join('channel_data', 'channel_titles.entry_id = channel_data.entry_id'); } $this->convert_params($select, $where, $order_by, $sort, $limit, $offset); return $this->EE->db->get('channel_titles'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($id) {\n\t\tglobal $wpdb;\n\n\t\t$table = WiseChatInstaller::getChannelsTable();\n\t\t$sql = sprintf('SELECT * FROM %s WHERE id = %d;', $table, intval($id));\n\t\t$results = $wpdb->get_results($sql);\n\t\tif (is_array($results) && count($results) > 0) {\n\t\t\treturn $this->populateChannelData($results[0]);\n\t\t}\n\n\t\treturn null;\n\t}", "public function getEntry($id);", "public function get_entry($entry_id, $select = array('channel_data.entry_id', 'channel_data.channel_id', 'channel_titles.title', 'channel_titles.url_title', 'channel_titles.entry_date', 'channel_titles.expiration_date', 'status'))\n\t{\n\t\t$entry = $this->get_channel_title($entry_id)->row();\n\t\t\t\t\n\t\treturn $this->get_entries($entry->channel_id, $select, array('channel_data.entry_id' => $entry_id));\n\t}", "public function get_channel($channel_id, $select = array('*'))\n\t{\n\t\treturn $this->get_channels($select, array('channel_id' => $channel_id));\n\t}", "function channelsListById($youtube, $part, $id) {\n $response = $youtube->channels->listChannels(\n $part,\n array(\n 'id' => $id\n )\n );\n\n printResults($response);\n}", "function getChannel($username = false,$id = false) {\n\t\t\t$params = array(\"part\" => \"id,snippet,statistics\");\n\t\t\tif ($id) {\n\t\t\t\t$params[\"id\"] = $id;\n\t\t\t} elseif ($username) {\n\t\t\t\t$params[\"forUsername\"] = $username; \n\t\t\t} else {\n\t\t\t\t$params[\"mine\"] = \"true\";\n\t\t\t}\n\t\t\t$response = $this->call(\"channels\",$params);\n\t\t\tif (!isset($response->items[0])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn new BigTreeYouTubeChannel($response->items[0],$this);\n\t\t}", "public function getRSSItemsByRSSChannelId($id = 0) {\n $query = \"SELECT * FROM rss_item WHERE rss_channel_id = \" . $id;\n\n $this->setSql($query);\n return $this->getRows(null, PDO::FETCH_ASSOC);\n }", "public function getBy($id);", "public function FetchContentFromChannel($channel) {\n //get the type of the channel\n $channelType = $channel->GetType();\n\n //Get a Parser from the ParserFactory based on the channel type\n $factory = ParserFactory::GetParser($channelType);\n\n //Extract the parameters from the channel object\n $parameters = $channel->GetParameters();\n\n //Get and parse all avaliable content items from the parser\n $contentItems = $factory->GetAndParse($parameters);\n\n //Return the content items\n return $contentItems;\n }", "public function show($id)\n {\n $channel = Channels::where('id', $id)->first();\n if(count($channel) > 0)\n {\n return response()->json(['status' => 200, 'data' => ['id' => $id, 'name' => $channel->name, 'created_at' => $channel->created_at]]);\n }else{\n return response()->json(['status' => 201, 'msg' => 'not found']);\n }\n }", "public function getGenresForChannel($channel_id)\n {\n\t\t$sql = 'SELECT `tbl_genre`.`genre_id`, \n\t\t\t\t\t\t`tbl_genre`.`genre_title` \n\t\t\t\tFROM\n\t\t\t\t `tbl_genre_channels`\n\t\t\t\tINNER JOIN `tbl_genre` \n\t\t\t\t\tON (`tbl_genre_channels`.`genre_id` = `tbl_genre`.`genre_id`)\n\t\t\t\t\tWHERE `tbl_genre_channels`.`channel_id` = ?';\n $params = array($channel_id);\n $resulsChannel = $this->db->rawQuery($sql, $params);\n return $resulsChannel;\n }", "public function getById($id)\n {\n return array(\n 'entries' => $this->getEntityManager()->find('Entry\\Entity\\Entry', $id)\n );\n }", "public function getUsers(Channel $channel): array;", "function local_mediaserver_channel_listing($channelid, $timebegin, $timeend) {\n global $DB, $USER;\n\n // Alias the time arguments so we don't need to add them multiple times to $params.\n $fields = local_mediaserver_program_fields() . ', :timebegin AS testbegin, :timeend AS testend';\n\n // We need to select all channel programs that exist between $timebegin and $timeend.\n $select = 'p.channel = :channel\n HAVING p.timebegin BETWEEN testbegin AND testend\n OR p.timeend BETWEEN testbegin + 1 AND testend\n OR testbegin BETWEEN p.timebegin AND p.timeend - 1';\n\n $sql = local_mediaserver_program_select_sql($fields, $select);\n $params = array('channel' => $channelid, 'timebegin' => $timebegin, 'timeend' => $timeend, 'userid' => $USER->id);\n\n return $DB->get_records_sql($sql, $params);\n}", "public function getLinks($channel) { \r\n return $this->makeRequest('get', \"/chat/{$channel}\");\r\n }", "function subscriptionsListByChannelId($youtube, $part, $channelId) {\n $response = $youtube->subscriptions->listSubscriptions(\n $part,\n array(\n 'channelId' => $channelId\n )\n );\n\n printResults($response);\n}", "public function getLastContentsByChannel($id,$qty=5){\n\t\t\n\t\tFacebookSession::setDefaultApplication( $this->appid, $this->appsecret );\n\t\t$sessionFacebook = FacebookSession::newAppSession();\n \t\t\n\t\t$request = new FacebookRequest(\n\t\t\t\t $sessionFacebook,\n\t\t\t\t 'GET',\n\t\t\t\t '/'.$id.'/feed?limit='.$qty , array(\"access_token\" => $this->access_token));\n\t\t$response = $request->execute();\n\n\t\t$post = $response->getGraphObject()->asArray();\t\t\t\t\t\t\n\n\t\treturn $post[\"data\"];\n \t\t\n\t}", "public function getCategories($channels);", "public function get_children($entry_id)\n {\n $this->EE->db->select('c.channel_title, c.channel_id, ct.title, ct.entry_id');\n $this->EE->db->from('playa_relationships AS pr');\n $this->EE->db->join('channel_titles AS ct', 'ct.entry_id = pr.child_entry_id');\n $this->EE->db->join('channels AS c', 'c.channel_id = ct.channel_id');\n $this->EE->db->where('pr.parent_entry_id', $entry_id);\n $this->EE->db->where('ct.site_id', $this->site_id);\n $this->EE->db->order_by('pr.rel_order', 'asc');\n $this->EE->db->order_by('c.channel_title', 'asc');\n $this->EE->db->order_by('ct.title', 'asc');\n\n return $this->EE->db->get();\n }", "public static function getEntryById($id){\n\t\t$results = array();\n\n\t\t$servername = 'localhost\\sqlexpress;Initial';\n\t\t$connection_options = array('Database'=>'database', 'UID'=>'uid', 'PWD'=>'pwd');\n\t\t\n\t\t$conn = sqlsrv_connect($hostname, $connection_options);\n\n\t\tif ($conn){\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM entries WHERE id = $id\";\n\t\t\t$query = sqlsrv_query($conn, $sql);\n\n\t\t\tif( $query === false ) {\n \tdie( print_r( sqlsrv_errors(), true));\n \t}\n\n \twhile ($row = sqlsrv_fetch_object($query)){\n \t\t$entry = new Entry($row);\n \t\t$results['entry'][] = $entry;\n \t}\n \t\t\n \t\tif (!count($results) == 1)\n \t\t\t$results['error'] = \"There is no entry here...\";\n \t}\n\n \tsqlsrv_free_stmt($query);\n \tsqlsrv_close($conn);\n\n \treturn $results;\n\t}", "public static function get()\n\t{\n\t\tlist($ticket_id, $id) = func_get_args();\n\t\treturn parent::get(array($ticket_id, $id));\n\t}", "public function GetChannelInfo(){\n//\t\t$channelInfoJson = '{\"jsonrpc\": \"2.0\", \"method\": \"Player.GetItem\", \"params\": { \"properties\": [\"title\"], \"playerid\":1 }, \"id\": 1}';\n\t\t$channelInfoJson = '{\"jsonrpc\":\"2.0\",\"method\":\"Player.GetItem\",\"params\":{\"playerid\":1,\"properties\":[\"title\",\"artist\",\"albumartist\",\"genre\",\"year\",\"rating\",\"album\",\"track\",\"duration\",\"comment\",\"lyrics\",\"musicbrainztrackid\",\"musicbrainzartistid\",\"musicbrainzalbumid\",\"musicbrainzalbumartistid\",\"playcount\",\"fanart\",\"director\",\"trailer\",\"tagline\",\"plot\",\"plotoutline\",\"originaltitle\",\"lastplayed\",\"writer\",\"studio\",\"mpaa\",\"cast\",\"country\",\"imdbnumber\",\"premiered\",\"productioncode\",\"runtime\",\"set\",\"showlink\",\"streamdetails\",\"top250\",\"votes\",\"firstaired\",\"season\",\"episode\",\"showtitle\",\"thumbnail\",\"file\",\"resume\",\"artistid\",\"albumid\",\"tvshowid\",\"setid\",\"watchedepisodes\",\"disc\",\"tag\",\"art\",\"genreid\",\"displayartist\",\"albumartistid\",\"description\",\"theme\",\"mood\",\"style\",\"albumlabel\",\"sorttitle\",\"episodeguide\",\"uniqueid\",\"dateadded\",\"channel\",\"channeltype\",\"hidden\",\"locked\",\"channelnumber\",\"starttime\",\"endtime\"]},\"id\":1}';\n\t\t$this->Send($channelInfoJson);\n\t}", "public function get(string $id);", "public function get(string $id);", "public function get(string $id);", "public function get(string $id);", "public function retrieveChannels(){\n return Channel::all();\n }", "function channelSectionsListById($youtube, $part, $channelId) {\n $response = $youtube->channelSections->listChannelSections(\n $part,\n array(\n 'channelId' => $channelId\n )\n );\n\n printResults($response);\n}", "function method_read($id )\n\t{\n\t\tif ( ! is_numeric( $id ) )\n\t\t{\n\t\t\tthrow new InvalidJsonRpcArgumentException(\"Invalid id\");\n\t\t}\n\n\t\t$data = array();\n\n\t\t/*\n\t\t * load record\n\t\t */\n\t\t$entryModel = $this->getEntryModel();\n\t\ttry\n\t\t{\n\t\t\t$entryModel->load( $id );\n\t\t}\n\t\tcatch( qcl_data_model_RecordNotFoundException $e )\n\t\t{\n\t\t\tthrow new InvalidJsonRpcArgumentException(\"Der Datensatz existiert nicht (mehr).\");\n\t\t}\n\n\t\treturn $this->_getEntryData($entryModel);\n\t}", "public function actionGetChannelInfo()\n {\n $params = $this->getQuery();\n if (empty($params['channelId'])) {\n throw new BadRequestHttpException('missing params');\n }\n return Yii::$app->weConnect->getAccounts($params['channelId']);\n }" ]
[ "0.652925", "0.62969035", "0.6269566", "0.6110862", "0.59344614", "0.57779974", "0.56914324", "0.5666278", "0.5590501", "0.5589049", "0.558682", "0.558536", "0.5534062", "0.55260044", "0.54695296", "0.544007", "0.5396519", "0.5360365", "0.5355638", "0.5354082", "0.534717", "0.5345302", "0.5335549", "0.5335549", "0.5335549", "0.5335549", "0.5327202", "0.53211623", "0.53116804", "0.5309357" ]
0.69376075
0
Get unique key for this group Use wp_cache_get_last_changed() if on WP 4.7+
public function get_cache_group() { $key = ''; if( function_exists( 'wp_cache_get_last_changed' ) ){ $key = wp_cache_get_last_changed( self::CACHE_GROUP . ':' . ADVANCED_SIDEBAR_BASIC_VERSION ); } return self::CACHE_GROUP . ':' . ADVANCED_SIDEBAR_BASIC_VERSION . ':' . $key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_cache_key() {\n\t\t$user = Member::currentUser();\n\t\t$groups = $user->Groups();\n\t\t$groupsKey = '';\n\n\t\t// groups come sorted by ID, so order will remain the same\n\t\tforeach($groups as $group) {\n\t\t\t$groupsKey .= $group->ID;\n\t\t}\n\n\t\treturn md5(sprintf('SiteTree_%s', $groupsKey));\n\t}", "protected function getCacheKey(string $groupKey = null)\n {\n $key = config('gsuite.cache.groups.key');\n\n if ($groupKey) {\n $key = $key . \":{$groupKey}\";\n }\n \n return $key;\n }", "public function getKey(){\r\n\t\t$key=uniqid();\r\n\t\t$code=substr(md5($key.rand(1, 1000)),7,$this->length);\r\n\t\t$code=strtoupper($code);\r\n\t\tif($this->cache->set($key,$code,600)){\r\n\t\t\treturn $key;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function get_cache_id() {\n\t\treturn wponion_hash_string( $this->get_id() . '_' . $this->module() . '_' . $this->unique() );\n\t}", "public function cacheKey() {\n if ($this->token) {\n return parent::cacheKey();\n } \n \n return null;\n }", "public static function getCacheKey()\n {\n return self::CACHE_KEY. date('yW', time());\n }", "public function key() {\n\t\tif ($this->_key !== null) {\n\t\t\treturn $this->_key;\n\t\t}\n\t\t$this->_key = sha1(microtime());\n\t\treturn $this->_key;\n\t}", "public function getGroupHash() : string {\n $groupName = $this->getChannelName();\n if($this->isGrouped()){\n $groupName .= '_' . implode('_', $this->getHandlerGroups());\n }\n\n return $this->f3->hash($groupName);\n }", "abstract function getUniqueKey();", "public function getUniqueKey()\n {\n return $this->uniqueKey;\n }", "protected function _getRedisKey()\n\t{\n\t\tif ( !$this->_redisKey )\n\t\t{\n\t\t\t/* Last access ensures that the data is not stale if we fail back to MySQL and then go back to Redis later */\n\t\t\tif ( !( $this->_redisKey = \\IPS\\Redis::i()->get( 'redisKey_store' ) ) OR ! \\IPS\\Redis::i()->get( 'redisStore_lastAccess' ) )\n\t\t\t{\n\t\t\t\t$this->_redisKey = md5( mt_rand() );\n\t\t\t\t\\IPS\\Redis::i()->setex( 'redisKey_store', 604800, $this->_redisKey );\n\t\t\t\t\\IPS\\Redis::i()->setex( 'redisStore_lastAccess', ( 3 * 3600 ), time() );\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_redisKey . '_str_';\n\t}", "public function getCacheKey()\n {\n //user-is-online-user1681987\n return sprintf('%s-%s', \"user-is-online\", $this->slug);\n }", "public static function get_key();", "private function cacheKey()\r\n {\r\n return 'server-' . $this->id;\r\n }", "protected function getCacheKey() {\n return md5($this->getLastModification() . '|' . get_class($this));\n }", "function sbx_get_cache_prefix( $group ) {\n\t// Get cache key - uses cache key sbx_orders_cache_prefix to invalidate when needed.\n\t$prefix = wp_cache_get( 'sbx_' . $group . '_cache_prefix', $group );\n\n\tif ( false === $prefix ) {\n\t\t$prefix = microtime();\n\t\twp_cache_set( 'sbx_' . $group . '_cache_prefix', $prefix, $group );\n\t}\n\n\treturn 'sbx_cache_' . $prefix . '_';\n}", "public function getCacheKey()\n {\n return null;\n }", "protected function key()\n {\n if (null == $this->key) {\n $this->key = md5(microtime());\n }\n\n return $this->key;\n }", "private function _cache_group( $group ) {\n\t\treturn $this->_config->get_string( array( 'genesis.theme', $group ) );\n\t}", "public static function getPrefix()\n\t{\n\t $prefixKey = Yii::app()->cmsCache->get(self::getPrefixKey());\n\t if ($prefixKey === false) {\n\t $prefixKey = uniqid(mt_rand(), true);\n\t Yii::app()->cmsCache->set(self::getPrefixKey(), $prefixKey);\n\t }\n\n\t return $prefixKey;\n\t}", "protected function getCacheKey()\n {\n return dechex(crc32(json_encode($this->config)));\n }", "public function getRegistryKey()\n {\n return spl_object_hash($this);\n }", "public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }", "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "public function getUniqueRegisterKey(): string\n {\n return $this->uniqueRegisterKey;\n }", "public function getCacheKey()\n {\n return md5($this->getURL());\n }", "public function getCacheKey()\n {\n if( ! $this->_cacheKey) {\n $this->_cacheKey = implode('_', array(\n 'DIEHARD',\n $this->_name,\n // Mage::app()->getStore()->getId(), // Can't be used before init\n Mage::app()->getRequest()->getScheme(),\n Mage::app()->getRequest()->getHttpHost(FALSE),\n Mage::app()->getRequest()->getRequestUri(),\n Mage::app()->getRequest()->getCookie(Cm_Diehard_Helper_Data::COOKIE_CACHE_KEY_DATA, '')\n // Design?\n ));\n }\n return $this->_cacheKey;\n }", "protected function get_random_group_id() {\n\t\tglobal $wpdb, $bp;\n\t\treturn $wpdb->get_var( \"SELECT id FROM {$bp->groups->table_name} ORDER BY RAND() LIMIT 1\" );\n\t}" ]
[ "0.74192774", "0.6781838", "0.6506793", "0.64884573", "0.64593375", "0.6450125", "0.64155126", "0.6409733", "0.63756937", "0.63470316", "0.63349557", "0.63280725", "0.63086927", "0.6260179", "0.62204885", "0.6207891", "0.6196467", "0.61790466", "0.6178239", "0.61628115", "0.6152107", "0.61197305", "0.6111394", "0.6106202", "0.6106202", "0.6106202", "0.6099561", "0.6078712", "0.605743", "0.6043668" ]
0.7237703
1
Getter for tier price type
public function getTierPriceType() { $this->loadManyToOne('tierpricetype'); return $this->tierpricetype; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPriceType()\n {\n return $this->priceType;\n }", "private function tierPriceTypeValue(array $tierPriceData): string\n {\n return $tierPriceData[ImportAdvancedPricing::COL_TIER_PRICE_PERCENTAGE_VALUE]\n ? ImportAdvancedPricing::TIER_PRICE_TYPE_PERCENT\n : ImportAdvancedPricing::TIER_PRICE_TYPE_FIXED;\n }", "public function getTier()\n {\n if (!$this->isPropertyAvailable(\"Tier\")) {\n return null;\n }\n return $this->getProperty(\"Tier\");\n }", "public function loadTierPrices();", "public function price_for_tier($tier)\n\t{\n\t\t$tiered_price = $this->get('tiered_prices')->where('price_tier_id', '=', $tier->id)->load();\n\t\tif ($tiered_price->loaded() AND $tiered_price->price > 0)\n\t\t{\n\t\t\treturn $tiered_price->retail_price();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->retail_price(TRUE);\n\t\t}\n\t}", "public function net_price_for_tier($tier)\n\t{\n\t\t$tiered_price = $this->get('tiered_prices')->where('price_tier_id', '=', $tier->id)->load();\n\t\tif ($tiered_price->loaded() AND $tiered_price->price > 0)\n\t\t{\n\t\t\treturn $tiered_price->price;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->price;\n\t\t}\n\t}", "public function getTierPriceRepository();", "public function getTierPriceAction();", "public function getTierLevel()\r\n {\r\n \t$this->loadManyToOne('tierLevel');\r\n \treturn $this->tierLevel;\r\n }", "public function getNetworkTier()\n {\n return isset($this->network_tier) ? $this->network_tier : '';\n }", "public function getLoyaltyTier()\n {\n return isset($this->loyalty_tier) ? $this->loyalty_tier : '';\n }", "public function tier() {\n return array_key_exists($this->envKeyName, $this->env) ? $this->env[$this->envKeyName] : $this->defaultTier;\n }", "public function getDiscountType(): string;", "public function getTierPrices(): array\n {\n return $this->tierPrices->toArray();\n }", "public function getPricingType(): ?string\n {\n return $this->pricingType;\n }", "public static function get_tier_from_request($tier = 'stable') {\n if (isset($_REQUEST['tier'])) {\n $t = $_REQUEST['tier'];\n if (in_array($t, array('alpha', 'beta', 'stable'))) {\n $tier = $t;\n }\n }\n return $tier;\n }", "function decideTier($rating){\n $tier = round($rating / 50);\n $maxTier = 2; //Ändra på för att hantera antalet tiers\n if ($tier > $maxTier) {\n $tier = $maxTier;\n }\n else if ($tier < 0) {\n $tier = 0;\n }\n return \"status\".$tier;\n}", "public function getPriceType()\n {\n if (array_key_exists(\"priceType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"priceType\"], \"\\Microsoft\\Graph\\Model\\BookingPriceType\") || is_null($this->_propDict[\"priceType\"])) {\n return $this->_propDict[\"priceType\"];\n } else {\n $this->_propDict[\"priceType\"] = new BookingPriceType($this->_propDict[\"priceType\"]);\n return $this->_propDict[\"priceType\"];\n }\n }\n return null;\n }", "public function getPrice($price_type, $currency_code) {\n if ($price_type)\n return $this->getTradePrice($price_type);\n else {\n if (Yii::app()->params['mcurrency'])\n switch ($currency_code) {\n case 'KZT':\n return $this->price_tenge;\n break;\n default :\n return $this->price;\n }\n else\n return $this->price;\n }\n }", "public function getRequiredSpendType();", "public function toString()\n {\n return 'Tier price is displayed on the product page for specific customer.';\n }", "public function getAmountType()\n {\n return $this->amountType;\n }", "public function getAmountType()\n {\n return $this->amountType;\n }", "public static function types() {\n\t\treturn apply_filters( 'vsp/price_calculation/types', array(\n\t\t\t'fixed' => esc_html__( 'Fixed', 'vsp-framework' ),\n\t\t\t'percentage' => esc_html__( 'Percentage (%)', 'vsp-framework' ),\n\t\t) );\n\t}", "public function getRateType(): string\n {\n return $this->rateType;\n }", "public function getUnitPrice();", "public function getUnitPrice();", "public function testPropertyTierDataProvider()\n {\n $testData = [];\n\n $testModelKeys = ClientSubscriptionTier::getAllowableEnumValues();\n\n foreach ($testModelKeys as $testModelKey) {\n $testData[] = ['tier', $testModelKey, $testModelKey];\n\n }\n\n $testData[] = ['tier', null, null];\n\n return $testData;\n }", "public function getPriceCurrency();", "public function loadCollectionTierPrice($collection)\n {\n if ($collection->getFlag('tier_price_added')) {\n return $this;\n }\n $prices = array();\n $productIds = array();\n foreach ($collection as $product) {\n array_push($productIds, $product->getId());\n $prices[$product->getId()] = array();\n }\n if (!count($productIds)) {\n return $this;\n }\n $coreHelper = $this->getCoreHelper();\n $currentStoreId = $collection->getStoreId();\n $websiteId = $coreHelper->getWebsiteIdByStoreId($currentStoreId);\n $storeId = $currentStoreId;\n if ($this->isGlobalScope()) {\n $websiteId = 0;\n }\n if (!$this->isStoreScope()) {\n $storeId = 0;\n }\n $currencyCode = $coreHelper\n ->getStoreById($currentStoreId)\n ->getCurrentCurrencyCode();\n $adapter = $collection->getConnection();\n $select = $adapter->select()\n ->from(\n $coreHelper->getTable('catalog/product_attribute_tier_price'), \n array(\n 'price_id' => 'value_id', \n 'website_id' => 'website_id', \n 'store_id' => 'store_id', \n 'all_groups' => 'all_groups', \n 'cust_group' => 'customer_group_id', \n 'price_qty' => 'qty', \n 'price' => 'value', \n 'product_id' => 'entity_id', \n 'currency' => 'currency', \n )\n )\n ->where('entity_id IN(?)', $productIds)\n ->order(array('entity_id','qty'));\n if ($websiteId == '0') {\n $select->where('website_id = ?', $websiteId);\n } else {\n $select->where('website_id IN(?)', array('0', $websiteId));\n }\n if ($storeId == '0') {\n $select->where('store_id = ?', $storeId);\n } else {\n $select->where('store_id IN(?)', array('0', $storeId));\n }\n $select->where(\"(currency = ?) OR (currency IS NULL) OR (currency = '')\", $currencyCode);\n $customerGroupAllId = Mage_Customer_Model_Group::CUST_GROUP_ALL;\n foreach ($adapter->fetchAll($select) as $item) {\n $prices[$item['product_id']][] = array(\n 'website_id' => $item['website_id'], \n 'store_id' => $item['store_id'], \n 'cust_group' => $item['all_groups'] ? $customerGroupAllId : $item['cust_group'], \n 'price_qty' => $item['price_qty'], \n 'price' => $item['price'], \n 'website_price' => $item['price'], \n 'currency' => ($item['currency']) ? $item['currency'] : null, \n );\n }\n foreach ($collection as $product) {\n $product->setTierPrices($prices[$product->getId()]);\n $this->setTierPrice($product);\n }\n $collection->setFlag('tier_price_added', true);\n return $this;\n }" ]
[ "0.74050164", "0.7260668", "0.71071064", "0.7054747", "0.69608694", "0.68969256", "0.68322307", "0.6768232", "0.66656035", "0.65411603", "0.6532071", "0.6505529", "0.644638", "0.62666154", "0.6257035", "0.61949927", "0.6185919", "0.6129316", "0.61173075", "0.6101611", "0.60832375", "0.60636157", "0.60636157", "0.60149634", "0.6007116", "0.598992", "0.598992", "0.59806013", "0.5906995", "0.59023166" ]
0.8603136
0
Getter for tier level
public function getTierLevel() { $this->loadManyToOne('tierLevel'); return $this->tierLevel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tier() {\n return array_key_exists($this->envKeyName, $this->env) ? $this->env[$this->envKeyName] : $this->defaultTier;\n }", "public function getTier()\n {\n if (!$this->isPropertyAvailable(\"Tier\")) {\n return null;\n }\n return $this->getProperty(\"Tier\");\n }", "public function getAccessTier()\n {\n return $this->accessTier;\n }", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel(): int;", "static public function get_level () {\n\t\treturn self::$level;\n\t}", "public function getNetworkTier()\n {\n return isset($this->network_tier) ? $this->network_tier : '';\n }", "static function getLevel(): int\n {\n return self::$group['level'];\n }", "function getLevel()\r\n {\r\n return $this->level;\r\n }", "public function getLevel()\r\n {\r\n return $this->get(self::_LEVEL);\r\n }", "public function getLevel()\r\n {\r\n return $this->get(self::_LEVEL);\r\n }", "public function getLevel()\r\n {\r\n return $this->get(self::_LEVEL);\r\n }", "public function getLevel()\r\n {\r\n return $this->get(self::_LEVEL);\r\n }", "public function getLevel()\r\n {\r\n return $this->get(self::_LEVEL);\r\n }", "public function getTierPriceType()\r\n {\r\n \t$this->loadManyToOne('tierpricetype');\r\n \treturn $this->tierpricetype;\r\n }", "public function getLevel(){\n\t\treturn $this->level;\n\t}", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }" ]
[ "0.7471203", "0.74117446", "0.69563544", "0.68883145", "0.68883145", "0.68883145", "0.68883145", "0.68883145", "0.68605256", "0.684785", "0.6818862", "0.6792819", "0.6788557", "0.6768461", "0.6768461", "0.6768461", "0.6768461", "0.6768461", "0.6761522", "0.6660935", "0.665001", "0.665001", "0.665001", "0.665001", "0.665001", "0.665001", "0.665001", "0.665001", "0.665001", "0.665001" ]
0.8404968
0
function pageLoads This function Will be called on each page load and will check for any form submission. Database Tables used in this function are : None Use Instruction : $objPage>pageLoad();
public function pageLoad() { $objCore = new Core(); $objInvoice = new Invoice(); global $objGeneral; $varPortalFilter = $objGeneral->countryPortalFilter($_SESSION['sessAdminWholesalerIDs']); if (isset($_GET['iid']) && $_GET['iid'] != '' && ($_GET['type'] == 'view')) { $varID = $_GET['iid']; $this->arrRow = $objInvoice->viewInvoice($varID,$varPortalFilter); //pre($this->arrRow); } else if (isset($_POST['Export']) && $_POST['Export'] == 'Export') { $this->exportInvoice($_POST); } else { $this->getList(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function on_load_page() {\n\n\t}", "public function pageLoad() { \n $objContactUs = new ContactUs();\n $objCore = new Core();\n $this->arrSupportList = $objContactUs->supportList();\n //pre($_POST);\n if(isset($_POST['frmHidenSend']) && $_POST['frmHidenSend'] == 'Send') \n {\n //pre(\"gfdfasd\"); \n $objContactUs->sendContactUs($_POST);\n $objContactUs->submitEnquiryToDatabase($_POST);\n $objCore->setSuccessMsg(CONTACT_SUCCUSS_MSG);\n header('location: ' . SITE_ROOT_URL.'contact.php');\n die;\n }\n }", "public function loadPage() {\n\t\tself::loadPageScript();\n\n\t\t$urlinfo = parse_url($_SERVER['REQUEST_URI']);\n\n\t\t$this->DOC->set('page.urlinfo', $urlinfo);\n\n\t\t$_lock\t\t= args::get('_lock', 'string');\n\t\t$ajaxAuth\t= args::get('ajaxAuth', 'string');\n\n\t\tif ($ajaxAuth!='') {\n\n\t\t\t$ajaxUrl = $urlinfo['path'];\n\n\t\t\t$_vals = array();\n\n\t\t\tif ($_lock!='') {\n\t\t\t\t$_fields = explode(',', $_lock);\n\t\t\t\tforeach ($_fields as $f) {\n\t\t\t\t\t$_vals[$f] = args::get($f, 'nothing');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (in_array('_pageMode', explode(',', $_lock)))\n\t\t\t\t$_pageMode = args::get('_pageMode', 'string');\n\n\n\t\t\tif ( lib::ajaxAuth( $ajaxUrl, $_vals ) != $ajaxAuth ) {\n\n\t\t\t\tif (__DEBUG__) {\n\t\t\t\t\tprint_r( array( 'ajaxAuth' => $ajaxAuth,\n\t\t\t\t\t\t\t\t\t'_url' => $ajaxUrl,\n\t\t\t\t\t\t\t\t\t'_lock' => $_lock,\n\t\t\t\t\t\t\t\t\t'fields' => $_fields,\n\t\t\t\t\t\t\t\t\t'vals' => $_vals,\n\t\t\t\t\t\t\t\t\t'server-computing-auth' => lib::ajaxAuth( $ajaxUrl, $_vals )));\n\n\t\t\t\t\techo \"{\\\"err\\\": \\\"wrong ajaxAuth! (app.php)\\\"}\";\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo json_encode(array( 'ret' => array( 'status' => 'false', 'msg'\t=> _T('logoutRefreshPS'))));\n\t\t\t\t}\n\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\n\n\t\tif ($_pageMode != '') {\n\t\t\t$this->DOC->set('page.mode', $_pageMode);\n\n\t\t\t/////////////////\n\t\t\t// if form submitted\n\t\t\t$fmSubmit = args::get('_fmSubmit', 'string');\n\t\t\tif ($fmSubmit == 'yes') {\n\t\t\t\t$this->DOC->set('page.fmSubmit', $fmSubmit);\n\n\t\t\t}\n\t\t}\n\n\n\t\t$args = $this->DOC->get('app.args');\n\t $this->page = $page = $args['page'];\n\n\t\t$csspath[] = PAGE_PATH . \"/{$this->page}/style.css\";\n\n\t\tforeach ($csspath as $path) {\n\t\t\tif (file_exists($path)) {\n\t\t\t\tcss::addFile($path);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$action = basename($args['action']);\n\n $this->pObj = &prog::get($page, $action, 0, TRUE);\n\t\t$pageId = $this->pObj->getPageId();\n\n\t\tlayoutMgr::setPageId($pageId);\n\n\t\t$this->pObj->_blockId = '0';\n\t\t$this->pObj->_action = '';\n\n\t\t$action = ($this->pObj->priv($args['param'], $action));\n\n\t\t$this->pObj->exec($args['param'], $action);\n\n\t\t$tpl = prog::get('mod_template');\n\t\t$tpl->prepare();\n\n\t\t$tpl->prepareTpl($pageId);\n\n\t}", "public function on_page_load() {\n\t\treturn false;\n\t}", "public function loadPage(){\n $this->_strPage = isset($_REQUEST['page']) ? $_REQUEST['page'] : 'index';\n $this->_strType = 'Page';\n \n // check if state name is set and contains only letters\n if(isset($_REQUEST['state']) && ctype_alpha($_REQUEST['state'])){\n $this->_strPage = isset($_REQUEST['state']) ? $_REQUEST['state'] : false;\n $this->_strType = 'State';\n }\n \n // check if page name contains only letters\n if(ctype_alpha($this->_strPage)){\n $strClass = \"Controllers\\\\\".$this->_strType.\"\\\\\".ucfirst($this->_strPage);\n if(class_exists($strClass)){\n $objPage = new $strClass;\n $objPage->loadComponent();\n echo $objPage->loadTemplate();\n } else {\n throw new AppException($this->_strPage.'\\\\'.$this->_strType, 'Page Not Found');\n }\n }\n \n }", "public function load() {\n\t\tif ($result = $this->_db->select(\"SELECT pag_name, pag_title, pag_order FROM page WHERE pag_id = :id\", array(\":id\" => $this->_id ))) {\n\t\t\t$this->_name = $result['pag_name'];\n\t\t\t$this->_title = $result['pag_title'];\n\t\t\t$this->_order = $result['pag_order'];\n\n\t\t\t$this->_loadLayouts();\n\t\t} else {\n\t\t\tthrow new \\Exception(\"Failed to load page\", 01);\n\t\t}\n\t}", "protected function postLoad(){\n\t\t\t\n\t\t}", "public function load()\n {\n // URLS\n $this->createTableURL();\n $this->loadUrls();\n }", "function _load() {\n $this->load->helper('flexigrid');\n\n // NOTE: this order has to match the records in ajax_load_page()\n //\n $colModel['id'] = array('id',40,TRUE,'center',2);\n $colModel[''] = array('Edit',40,false,'center',0);\n $colModel['menu'] = array('Page Type',80,TRUE,'left',2);\n $colModel['title'] = array('Title',200,TRUE,'left',2);\n $colModel['status'] = array('Status',40,TRUE,'left',2);\n $colModel['content'] = array('Content',478,TRUE,'left',2);\n $colModel['name'] = array('Name',140,TRUE,'left',2);\n\t\t\n $num_rows = $this->page_model->get_num_rows('fs_page');\n\n $gridParams = array(\n 'width' => 'auto',\n 'height' => 650,\n 'rp' => 50,\n 'rpOptions' => \"[$num_rows / 2, $num_rows]\",\n 'pagestat' => 'Displaying: {from} to {to} of {total} items.',\n 'blockOpacity' => 0.5,\n 'title' => 'Content',\n 'showTableToggleBtn' => false\n );\n\t\t\n $buttons[] = array('Select All','select all','grid_functions');\n $buttons[] = array('DeSelect All','deselect all','grid_functions');\n $buttons[] = array('Delete','delete','grid_functions');\n $buttons[] = array('Export','export','grid_functions');\n $grid_js = build_grid_js('Grid',site_url(\"cms/pages/ajax_load_pages\"),$colModel,'id','desc',$gridParams, $buttons);\n \n return $grid_js;\n }", "function preloadPage(){\n\t\ttry{\n\t\t\t$this->sql = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD);\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\tlogError(\"page.admin.tickets.list.php\",__LINE__,\"Error connecting to database!\",$e->getMessage(),time(),false);\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\tif(!$this->has_input_at(0)){\n\t\t\techo \"no input\";\n\t\t\t//header(\"Location: /home\");\n\t\t\treturn false;\n\t\t}\n\t\t$requestedShow = substr(strtolower($this->get_input_at(0)),0,10);\n\t\tif($requestedShow == null || $requestedShow == \"\" || preg_match(\"/[^\\d{1,10}]/\",$requestedShow)){\n\t\t\theader(\"Location: /shows\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->usr->get_info();\n\t\tif(!$this->usr->is_logged_in() || $this->usr->get_user_info(\"permissions\") == false || (int)$this->usr->get_user_info(\"permissions\") < 1){\n\t\t\tif(!$this->has_input_at(1)){\n\t\t\t\theader(\"Location: /home\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$ticketlistKey = substr($this->get_input_at(1),0,16);\n\t\t\tif($ticketlistKey == null || $ticketlistKey == \"\" || preg_match(\"/[^a-f0-9]/\",$ticketlistKey)){\n\t\t\t\theader(\"Location: /home\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\t$keyCheck = $this->sql->prepare('SELECT aid FROM ticketlist_access WHERE access_key=:key AND event_id=:eid LIMIT 1');\n\t\t\t\t$keyCheck->bindParam(':key',$ticketlistKey,PDO::PARAM_STR);\n\t\t\t\t$keyCheck->bindParam(':eid',$requestedShow,PDO::PARAM_INT);\n\t\t\t\t$keyCheck->execute();\n\t\t\t\t$result = $keyCheck->fetch(PDO::FETCH_ASSOC);\n\t\t\t\tif(!isset($result) || !$result || !isset($result['aid'])){\n\t\t\t\t\theader(\"Location: /home\");\n\t\t\t\t\tprint_r($result);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(PDOException $e){\n\t\t\t\tlogError(\"page.admin.tickets.list.php\",__LINE__,\"Error checking if ticketlist key is valid!\",$e->getMessage(),time(),false);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t$infoStmt = $this->sql->prepare('SELECT e.event_id, s.show_name, e.event_date FROM events AS e INNER JOIN shows AS s ON e.show_id=s.show_id WHERE e.event_id=:eid');\n\t\t\t$infoStmt->execute(array(':eid'=>$requestedShow));\n\t\t\t\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\tlogError(\"page.admin.tickets.list.php\",__LINE__,\"Error retrieving available events!\",$e->getMessage(),time(),false);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($infoStmt->rowCount() === 1){\n\t\t\t$this->eventData = $infoStmt->fetch();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t$reservationsStmt = $this->sql->prepare('SELECT r.reservation_id, CASE WHEN r.email_address IS NULL THEN u.email ELSE r.email_address END AS email, CASE WHEN r.first_name IS NULL THEN u.first_name ELSE r.first_name END AS fname, CASE WHEN r.last_name IS NULL THEN u.last_name ELSE r.last_name END AS lname, sum(r.ticket_quantity) AS quantity, sum(r.ticket_quantity * r.vip) AS vip, r.checked_in FROM reservations AS r LEFT JOIN users AS u ON r.user_id=u.uid WHERE r.event_id=:eid GROUP BY r.email_address,u.email ORDER BY lname,fname');\n\t\t\t$reservationsStmt->execute(array(':eid'=>$requestedShow));\n\t\t\t$this->reservationStmt = $reservationsStmt;\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\tlogError(\"page.admin.tickets.list.php\",__LINE__,\"Error retrieving reservations list!\",$e->getMessage(),time(),false);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true; \n\t}", "public function onPageLoad($sender, $args)\n\t\t{\n\t\t\tif(isset(\\System\\Web\\HTTPRequest::$request[\"q\"]))\n\t\t\t{\n\t\t\t\t$website = \\SEOWerx\\Models\\Websites::find(array('url'=>\\System\\Web\\HTTPRequest::$request[\"q\"]));\n\n\t\t\t\tif($website)\n\t\t\t\t{\n\t\t\t\t\t$this->page->assign('website', $website);\n\t\t\t\t\t$this->page->assign('pages', $website->getAllWebpages());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\\Rum::sendHTTPError(404);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\Rum::sendHTTPError(400);\n\t\t\t}\n\t\t}", "function Page_Loading() {\n\n\t//echo \"Page Loading\";\n}", "public function onLoad(){}", "function Page_Loading() {\n\n\t//echo \"Page Loading\";\n\t// variabel global tahunajaran_id\n\n\t$q = \"select * from t0101_tahunajaran where Aktif = 'Y'\";\n\t$r = ExecuteRow($q);\n\t$_SESSION[\"tahunajaran_id\"] = $r[\"id\"];\n}", "protected function _postLoad()\n {}", "public function loadPage() {\n \n $this->state = RedView::STATE_PRELOAD;\n\n if (!isset($_REQUEST['_rv:page'])) $_REQUEST['_rv:page']=\"\";\n \n $this->requestUrl = $_REQUEST['_rv:page'];\n \n $this->sendEvent('onRequest');\n\n $defaultPage=$this->defaultPage.'/';\n $pagePath=$this->pagePath;\n $viewPath=$this->viewPath;\n\n if (trim($this->requestUrl,'/').'/' == $defaultPage) $this->redirect('', true);\n\n if (!$this->requestUrl) $this->requestUrl=$defaultPage;\n\n // make sure the URL ends in a slash, otherwise form posts won't work right\n if ($this->requestUrl{strlen($this->requestUrl)-1}!='/') {\n $this->redirect($this->requestUrl.'/', true);\n }\n\n // the entire URL after site root (where index.php lives) is in $_REQUEST['page']\n $page = trim($this->requestUrl,'/');\n\n $path;\n\n // look for a file \"./pages/$page.html\", or use \"./pages/home.html\"\n $lastPage = '';\n $path = '';\n $page .= '/';\n while ($page && $lastPage != $page) {\n $lastPage = $page;\n if (strpos($page,'..')===false && file_exists(\"$viewPath/$pagePath/$page.html\")) {\n $path = \"$pagePath/$page.html\";\n $view = \"$pagePath/$page\";\n break;\n }\n $a = explode('/', $page);\n array_splice($a, -1);\n $page = implode('/', $a);\n }\n\n // requested a non-existing top level path; redirect to front page\n if (!$path || !file_exists(\"$viewPath/$path\")) $this->redirect($defaultPage, true);\n\n // make argv\n $args=explode('/', trim(substr($this->requestUrl, strlen($page)), '/'));\n $args[0] ? array_unshift($args, $page) : $args[0]=$page;\n\n $this->args = $args;\n\n $this->sendEvent('onPageLoad');\n \n $this->state = RedView::STATE_LOAD;\n\n // Load the cached view/controller\n ob_start();\n echo $this->tools->cache->load($view);\n $out=ob_get_clean();\n\n $this->output = &$out;\n \n $this->sendEvent('onFilter');\n \n echo $out;\n }", "protected function LoadData()\n\t{\n\t}", "protected function onLoad() {}", "protected function onLoad() {}", "public static function onLoad()\n {\n }", "public function get_edit_student_page_init_call()\n {\n //this depends on the number of tables shown\n }", "function LoadPage($strPageName, $intContext=HTML_CONTEXT_DEFAULT)\n\t{\n\t\tif ($this->_intTemplateMode == AJAX_MODE)\n\t\t{\n\t\t\t// load AJAX template\n\t\t\trequire_once(TEMPLATE_BASE_DIR.\"ajax_template/\" . strtolower($strPageName) . \".php\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// create new page object\n\t\t\t$this->Page = new Page;\n\t\t\t\n\t\t\t// Pass on modality\n\t\t\tif ($this->IsModal())\n\t\t\t{\n\t\t\t\t$this->Page->SetModal(TRUE);\n\t\t\t}\n\t\t\t\n\t\t\t// load required page\n\t\t\trequire_once(TEMPLATE_BASE_DIR.\"page_template/\" . strtolower($strPageName) . \".php\");\n\t\t}\n\t}", "public function onLoad() : void {\r\n }", "protected function loaded()\r\n\t{\r\n\t}", "public function onPageLoaded($page);", "public function loadPage()\n { \n $defaultPage=$this->defaultPage.'/';\n $pageDir=$this->pageDir;\n $viewDir=$this->viewDir;\n\n if (trim($_REQUEST['_rv:page'],'/').'/' == $defaultPage) RedView::redirect('', true);\n\n if (!$_REQUEST['_rv:page']) $_REQUEST['_rv:page']=$defaultPage;\n \n if ($_REQUEST['_rv:page'] && $_REQUEST['_rv:page']{strlen($_REQUEST['_rv:page'])-1} != '/') {\n RedView::redirect($_REQUEST['_rv:page'].'/', true);\n }\n\n // the entire URL after site root (where index.php lives) is in $_REQUEST['page']\n $page = trim($_REQUEST['_rv:page'],'/');\n \n $path;\n\n // look for a file \"./pages/$page.html\", or use \"./pages/home.html\"\n $lastPage = ''; \n $path = '';\n $page .= '/';\n while ($page && $lastPage != $page) {\n $lastPage = $page;\n if (strpos($page,'..')===false && file_exists(\"$viewDir/$pageDir/$page.html\")) {\n $path = \"$pageDir/$page.html\";\n break;\n }\n $a = explode('/', $page);\n array_splice($a, -1);\n $page = implode('/', $a);\n }\n\n // parse the file with RedView\n // requested a non-existing top level path; redirect to front page\n if (!$path || !file_exists(\"$viewDir/$path\")) $this->redirect('', true);\n\n // normal page\n echo RedView::parse($path);\n }", "function paging_configpageload() {\n\tglobal $currentcomponent;\n\n\t// Init vars from $_REQUEST[]\n\t$action = isset($_REQUEST['action']) ? $_REQUEST['action']:null;\n\t$extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay']:null;\n\t$tech_hardware = isset($_REQUEST['tech_hardware']) ? $_REQUEST['tech_hardware']:'';\n\t\n\t// Don't display this stuff it it's on a 'This xtn has been deleted' page.\n\tif ($action != 'del' && $tech_hardware != 'virtual') {\n\n\t\t$default_group = sql(\"SELECT value FROM `admin` WHERE variable = 'default_page_grp'\", \"getOne\");\n\t\t$section = _(\"Default Group Inclusion\");\n\t\tif ($default_group != \"\") {\n\t\t\t$in_default_page_grp = paging_check_default($extdisplay);\n\t\t\t$currentcomponent->addguielem($section, new gui_selectbox('in_default_page_grp', $currentcomponent->getoptlist('page_group'), $in_default_page_grp, _('Default Page Group'), _('You can include or exclude this extension/device from being part of the default page group when creating or editing.'), false));\n\t\t} \n\t}\n}", "function loadFromDB() {\n\n\t}", "protected function onLoad(){\n $this->PageData->parent = \"administrator/Admin\";\n $this->PageData->header = (session()->has(\"level\") ? NULL : ucfirst(str_replace(\"_\", '', session(\"level\"))) . \" :: \") . 'Admin';\n $this->PageData->access = [\"administrator\"];\n // check access level\n if (! $this->access_allowed()) {\n session()->setFlashdata(\"ci_login_flash_message\", 'Login session outdate. Please re-Login !');\n session()->setFlashdata(\"ci_login_flash_message_type\", \"text-danger\");\n throw new \\CodeIgniter\\Router\\Exceptions\\RedirectException();\n };\n \n }", "function showPlatformPage($functionname=\"\")\n {\n global $_POST;\n\n // Stage 1::construct the items\n $this->constructItems();\n\n // Stage 2::check the items postvars against the validation rules\n // $valid = $this->_formValidator();\n $this->_formValidator();\n\n // check whether inputs were correct.\n if(count($this->m_validdata)>0&&is_array($this->m_validdata))\n {\n // first we check whether it must go to another page\n if($this->m_sessionManager->getValue(\"previouspage\")!=\"\")\n {\n $prev = $this->m_sessionManager->getValue(\"previouspage_id\");\n\n $ses_id = $this->m_sessionManager->getCurrentSessionID();\n $client_ip = $this->m_sessionManager->getClientIP();\n $previouspage = $this->m_sessionManager->getValue(\"previouspage\");\n \n $keypage = md5($ses_id.$client_ip.$previouspage);\n\n // we're one the second page\n if($prev==$keypage)\n { \n $this->dataManipulation($functionname);\n //reset the previouspage\n $this->m_sessionManager->setValue(\"previouspage\",\"\");\n $this->forwardTo($this->m_forwardpage);\n exit();\n }\n // we're one the first page\n else\n {\n $this->dataManipulation($functionname);\n $this->forwardTo($this->m_forwardpage);\n exit();\n }\n }\n else if($this->m_forwardpage!=\"\")\n { \n $this->dataManipulation($functionname);\n $this->forwardTo($this->m_forwardpage);\n exit();\n }\n // second, we checkt whether page must reload itself but now with a different tpl file\n else if($this->m_secondpage)\n {\n $pagetogo = $this->m_secondpage;\n }\n }\n else if($this->m_novalidation==\"true\")\n {\n $this->dataManipulation($functionname);\n\n if($this->m_forwardpage!=\"\")\n { \n $this->forwardTo($this->m_forwardpage);\n exit();\n }\n else\n {\n $pagetogo = $this->m_themedir.$this->m_defaultpage;\n }\n }\n else\n {\n // if there are prefilled inputfields. construct here.\n $pagetogo = $this->m_themedir.$this->m_defaultpage;\n }\n // still not set? fuck it, just set it to the defaultpage\n if($pagetogo==NULL) $pagetogo = $this->m_themedir.$this->m_defaultpage;\n\n $this->dataManipulation($functionname);\n $this->m_smarty->display($pagetogo);\n debug(__CLASS__.\"::\".__FUNCTION__.\" : exposing smarty compiled page\");\n }" ]
[ "0.67933965", "0.6687303", "0.6356369", "0.6326346", "0.62868845", "0.62262386", "0.62192345", "0.6174009", "0.6001662", "0.5993268", "0.5933672", "0.5883197", "0.58634245", "0.5831569", "0.5828657", "0.5799847", "0.578805", "0.5768636", "0.5768636", "0.57568866", "0.57506037", "0.57310575", "0.5720564", "0.57198703", "0.5717102", "0.5702713", "0.56972784", "0.5689567", "0.5675135", "0.56600827" ]
0.7110159
0
Creates a class for viewing software metrics.
public function __construct(SoftwareMetrics $metrics) { $this->metrics = $metrics; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function metrics()\n {\n return app(Manager::class);\n }", "public function getMetric()\n {\n $this->setPageHeader('Inventory', 'Metrics List');\n $metrics = Metric::all();\n return view('admin.inventory.metric')\n ->with('metrics', $metrics);\n }", "protected function model()\n {\n return new Insights($this->response(), ['fr']);\n }", "public static function inst()\n {\n\n if (!self::$instance) {\n self::$instance = new ModuleMetrics();\n }\n return self::$instance;\n }", "public function __construct() {\n\t\t$this->usage_metrics = array();\n\t\tforeach (self::$metric_names as $metric) {\n\t\t\t$getter = \"get_\" . str_replace('.','_',$metric) . \"_usage\";\n\t\t\ttry {\n\t\t\t\tif (method_exists($this, $getter)) {\n\t\t\t\t\t$this->usage_metrics[$metric] = $this->$getter();\n\t\t\t\t}\n\t\t\t} catch (op5LivestatusException $e) {\n\t\t\t\tthrow new ORMDriverException($e->getMessage(), false, false, $e);\n\t\t\t} catch (ORMDriverException $e) {\n\t\t\t\tthrow $e;\n\t\t\t} catch (Exception $e) {\n\t\t\t\t/* Something went wrong... skip this metric */\n\t\t\t}\n\t\t}\n\t}", "public function displayMetrics()\n {\n return view('nebula::dashboards.default-metrics', [\n 'dashboard' => $this,\n ]);\n }", "function __construct()\n {\n $this->name = \"sqlmeter\";\n $this->title = \"SQLmeter\";\n $this->module_category = \"<#LANG_SECTION_SYSTEM#>\";\n $this->checkInstalled();\n }", "public function get_metrics() {\n\t\t\t\n\t\t\t// Get Metric Data\n\t\t\t\n\t\t}", "public function create()\n {\n return view('pages-admin.performance.create');\n }", "public function __construct() {\n \t\t$widget_ops = array(\n \t\t\t'classname' => 'vam_widget_stats',\n \t\t\t'description' => 'VAM Statistics',\n \t\t);\n \t\tparent::__construct( 'vam_widget_stats', 'VAM Statistics', $widget_ops );\n \t\t$this->vam = new VAMWP_VAM();\n \t\t$this->va_data = $this->get_va_data();\n \t}", "abstract public function metric();", "public function view()\n {\n $url = new Url;\n $user = new User;\n\n return view('backend.statistics', [\n 'capacity' => $url->url_key_capacity(),\n 'remaining' => $url->url_key_remaining(),\n 'totalShortUrl' => $url->totalShortUrl(),\n 'totalShortUrlByGuest' => $url->totalShortUrlById(),\n 'totalClicks' => $url->totalClicks(),\n 'totalClicksByGuest' => $url->totalClicksById(),\n 'totalUser' => $user->totalUser(),\n 'totalGuest' => $user->totalGuest(),\n ]);\n }", "public function stats()\n\t{\n\t\t$this->_monitoringManager = new StatManager;\n\t\t$stats = $this->_monitoringManager->getStats();\n\t\t$nbT = $this->_monitoringManager->getTotalAttacks();\n\t\t$nbD = $this->_monitoringManager->getTotalAttacksByDay();\n\t\t$nbM = $this->_monitoringManager->getTotalAttacksByMonth();\n\t\t$nbY = $this->_monitoringManager->getTotalAttacksByYear();\n\t\t$stats2 = $this->_monitoringManager->getAttacksBySections();\n\t\t\n\t\t\n\t\t$this->_view = new View('Stats');\n\t\t$this->_view->generate(array('stats' => $stats, 'stats2' => $stats2, 'nbT' => $nbT, 'nbD' => $nbD, 'nbM' => $nbM, 'nbY' => $nbY));\n\t}", "public function metrics(): Response\n {\n if ($this->metricsService->isExtensionOpcacheEnabled()) {\n $this->opcacheMetrics();\n }\n\n if ($this->metricsService->isExtensionApcuEnabled()) {\n $this->apcuMetrics();\n }\n\n return new Response($this->metricsService->render(), Response::HTTP_OK, ['content-type' => 'text/plain']);\n }", "public function create()\n {\n return view('backend.statistics');\n }", "function __construct() {\n parent::__construct( 'hw_widget', 'Hardware Info Widget' );\n }", "public function AB_Site_Stats() {\n\t\tparent::__construct( false, '(AnswerBox) Site stats' );\n\t}", "public function __construct()\n {\n $this->performanceRating = 1500;\n\n $now = new \\DateTime();\n $this->created = $now;\n $this->modified = $now;\n }", "public static function sendReportMetrics()\n {\n $uc_settings = Settings::instance()->getValues('Upgrade_center');\n $license_number = $uc_settings['license_number'];\n\n if ($license_number) {\n $metrics = fn_get_schema('reporting', 'metrics');\n\n foreach ($metrics as &$value) {\n if (is_callable($value)) {\n $value = call_user_func($value);\n }\n }\n unset($value);\n\n $logging = Http::$logging;\n Http::$logging = false;\n\n Http::post(\n Registry::get('config.resources.updates_server') . '/index.php?dispatch=license_tracking.report',\n array(\n 'metrics' => $metrics,\n 'license_number' => $license_number\n ),\n array(\n 'timeout' => 10\n )\n );\n\n Http::$logging = $logging;\n }\n }", "public function __construct () {\n\n\t\t$ls = Livestatus::instance();\n\t\t$set = StatusPool_Model::all();\n\n\t\t$it = $set->it(false, array(), 1, 0);\n\t\t$status = $it->current();\n\n\t\t$this->program = $status;\n\t\t$this->service = $ls->getServicePerformance($status->get_program_start());\n\t\t$this->host = $ls->getHostPerformance($status->get_program_start());\n\n\t}", "static public function newReportManager()\n {\n return new MazelabStorage_Model_ReportManager();\n }", "protected function createCoverageReporter()\n {\n return new Text(50, 90, true, false);\n }", "public static function instance() {\n\t\tif ( self::$__instance == NULL ) {\n\t\t\tself::$__instance = new Editorial_Statistics;\n\t\t}\n\t\t\n\t\treturn self::$__instance;\n\t}", "public function create()\n {\n return view('pa.addTrackPerformance');\n }", "function getMetricListHome()\n{\n\tglobal $adb,$current_user;\n\t$ssql = \"select ec_customview.* from ec_customview inner join ec_tab on ec_tab.name = ec_customview.entitytype\";\n\t$ssql .= \" where ec_customview.setmetrics = 1 order by ec_customview.entitytype\";\n\t$result = $adb->query($ssql);\n\t$num_rows = $adb->num_rows($result);\n\t$metricslist = array();\n\tfor($i=0; $i<$num_rows; $i++)\n\t{\n\t\t$metricslist['id'] = $adb->query_result($result,$i,'cvid');\n\t\t$metricslist['name'] = $adb->query_result($result,$i,'viewname');\n\t\t$metricslist['module'] = $adb->query_result($result,$i,'entitytype');\n\t\t$metricslist['count'] = '';\n\t\t$metriclists[] = $metricslist;\n\t}\n\treturn $metriclists;\n}", "function createGraphView()\n\t{\n\t\treturn new mxGraphView($this);\n\t}", "public function __construct()\n {\n $this->name = 'kiyohcustomerreview';\n $this->tab = 'advertising_marketing';\n $this->version = '1.3.13';\n $this->author = 'Interactivated.me';\n $this->need_instance = 0;\n $this->module_key = '5f10179e3d17156a29ba692b6dd640da';\n\n parent::__construct();\n\n $this->getPsVersion();\n\n $this->displayName = $this->l('KiyOh Customer Review');\n $this->description = $this->l('KiyOh.nl users can use this plug-in automatically collect customer reviews');\n $this->ps_versions_compliancy = ['min' => '1.4.0.0', 'max' => _PS_VERSION_];\n $configs = unserialize(Configuration::get('KIYOH_SETTINGS'));\n if (!is_array($configs)) {\n $configs = [];\n }\n $this->config = array_merge($this->config, $configs);\n\n if (!extension_loaded('curl')) {\n $this->warning = $this->l('cURL extension must be enabled on your server to use this module.');\n }\n\n if (isset($this->config['WARNING']) && $this->config['WARNING']) {\n $this->warning = $this->config['WARNING'];\n }\n $this->initCache();\n }", "function buildTestPlanMetrics($statistics,$platform_id = 0)\r\n{\r\n static $lbl;\r\n if(!$lbl)\r\n {\r\n $lbl = lang_get('execution_time_metrics');\r\n } \r\n\r\n $output ='';\r\n $dummy = renderTestDuration($statistics,$platform_id);\r\n if($dummy != '')\r\n { \r\n $output = '<h1 class=\"doclevel\">' . $lbl . \"</h1>\\n\" . $dummy;\r\n }\r\n return $output; \r\n}", "function epi_report() {\n //\n // do not forget to update version\n //\n $this->author = 'Herman Tolentino MD';\n $this->version = \"0.2-\".date(\"Y-m-d\");\n $this->module = \"epi_report\";\n $this->description = \"CHITS Module - EPI Weekly Report\";\n\n }", "public static function init(): self\n {\n return new self(new MeasurementUnit());\n }" ]
[ "0.5843969", "0.5825428", "0.57377774", "0.5692751", "0.5581177", "0.552781", "0.54423326", "0.54369825", "0.5436197", "0.53949803", "0.5358423", "0.5340307", "0.52855027", "0.52077955", "0.5199121", "0.5141705", "0.51286983", "0.5097368", "0.50832725", "0.5072903", "0.505629", "0.5028669", "0.5010637", "0.49991888", "0.49952692", "0.49909914", "0.49785003", "0.4974042", "0.49688536", "0.49568388" ]
0.6244769
0
Gets the accountEnabled property value. true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter (eq, ne, not, and in).
public function getAccountEnabled(): ?bool { $val = $this->getBackingStore()->get('accountEnabled'); if (is_null($val) || is_bool($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'accountEnabled'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccountStatus()\n\t{\n\t\treturn $this->account_status;\n\t}", "function getEnabled() {\n\t\t$journal =& Request::getJournal();\n\t\tif (!$journal) return false;\n\t\treturn $this->getSetting($journal->getJournalId(), 'enabled');\n\t}", "public function enabled()\n {\n return $this->getByEnabled(true);\n }", "public function isActive()\r\n {\r\n // If LDAP data is present, check if the account is disabled\r\n if ($this->ldapData && isset($this->ldapData['useraccountcontrol'])) {\r\n if ($this->ldapData['useraccountcontrol'][0] == '514') {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return (bool) $this->active;\r\n }", "public function getEnabled()\n {\n return $this->enabled;\n }", "public function getEnabled()\n {\n return $this->enabled;\n }", "public function getEnabled()\n {\n return $this->enabled;\n }", "public function getEnabled()\n {\n return $this->enabled;\n }", "public function getEnabled()\n {\n return $this->enabled;\n }", "public function getEnabled() {\n\t\treturn $this->enabled;\n\t}", "function user_access($account) {\n return (bool)$this->get_object();\n }", "function getEnabled() {\n\t\t$journal =& Request::getJournal();\n\t\t$journalId = $journal?$journal->getJournalId():0;\n\t\treturn $this->getSetting($journalId, 'enabled');\n\t}", "public function getEnabledValue()\n {\n return $this->readWrapperValue(\"enabled\");\n }", "public function getEnabled()\r\n {\r\n return $this->enabled;\r\n }", "public function getEnabled()\n {\n return $this->_enabled;\n }", "public function enabled()\n {\n return $this->active();\n }", "public function hasAccountId()\n {\n return $this->account_id !== null;\n }", "public function isEnabled() {\n return $this->enabled;\n }", "public function isEnabled()\n {\n if(!$this->deleted){\n return $this->active;\n }\n\n return false;\n }", "public function isEnabled() {\n return $this->enabled;\n }", "public function getEnabled()\n {\n return $this->enabledIds;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function enabled()\n {\n return $this->_enabled;\n }", "public function isEnabled()\n {\n return $this->isActive;\n }" ]
[ "0.60944736", "0.60334766", "0.6003543", "0.59757316", "0.5950595", "0.5950595", "0.5950595", "0.5950595", "0.5950595", "0.5944213", "0.59371805", "0.59077615", "0.59061664", "0.59044033", "0.5810252", "0.5783952", "0.5744684", "0.56931925", "0.5647019", "0.5644239", "0.5638783", "0.5635431", "0.5635431", "0.5635431", "0.5635431", "0.5635431", "0.5635431", "0.5635431", "0.5629268", "0.56176114" ]
0.6035504
1
Gets the activities property value. The user's activities across devices. Readonly. Nullable.
public function getActivities(): ?array { $val = $this->getBackingStore()->get('activities'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, UserActivity::class); /** @var array<UserActivity>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'activities'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function activity_user()\n\t{\n\t\treturn $this->_get_activity();\n\n\t}", "public function getActivity()\n {\n if (array_key_exists(\"activity\", $this->_propDict)) {\n return $this->_propDict[\"activity\"];\n } else {\n return null;\n }\n }", "public function activity()\n {\n return $this->session['last_activity'];\n }", "public function getActivity()\n {\n return $this->activity;\n }", "public function getActivity()\n {\n return $this->activity;\n }", "public static function getCurrentActivities()\n {\n $activity = Activity::where('created_at', '>=', \\Carbon\\Carbon::today())->get();\n\n foreach($activity as $thisActivity) {\n # Create a \"display friendly\" version of the date_from and date_to date to be used in the view\n $thisActivity->date_from_display = \\Carbon\\Carbon::createFromFormat('Y-m-d H:i:s', $thisActivity->date_from)->format('l, m/d/Y H:i');\n $thisActivity->date_to_display = \\Carbon\\Carbon::createFromFormat('Y-m-d H:i:s', $thisActivity->date_to)->format('l, m/d/Y H:i');\n }\n return $activity;\n }", "public function activities()\n {\n return $this->morphMany(UserActivity::class, 'observable');\n }", "public function getVehicleActivity()\n {\n return $this->vehicleActivity;\n }", "public function activity_get_activities() {\n $oReturn = new stdClass();\n $this->init('activity', 'see_activity');\n\n if (!bp_has_activities())\n return $this->error('activity');\n if ($this->pages !== 1) {\n $aParams ['max'] = true;\n $aParams ['per_page'] = $this->offset;\n $iPages = $this->pages;\n }\n\n $aParams ['display_comments'] = $this->comments;\n $aParams ['sort'] = $this->sort;\n\n $aParams ['filter'] ['user_id'] = $this->userid;\n $aParams ['filter'] ['object'] = $this->component;\n $aParams ['filter'] ['action'] = $this->type;\n $aParams ['filter'] ['primary_id'] = $this->itemid;\n $aParams ['filter'] ['secondary_id'] = $this->secondaryitemid;\n $iLimit = $this->limit;\n\n if ($this->pages === 1) {\n $aParams ['page'] = 1;\n if ($iLimit != 0)\n $aParams['per_page'] = $iLimit;\n $aTempActivities = bp_activity_get($aParams);\n\n\n if (!empty($aTempActivities['activities'])) {\n foreach ($aTempActivities['activities'] as $oActivity) {\n $oReturn->activities[(int) $oActivity->id]->component = $oActivity->component;\n $oReturn->activities[(int) $oActivity->id]->user[(int) $oActivity->user_id]->username = $oActivity->user_login;\n $oReturn->activities[(int) $oActivity->id]->user[(int) $oActivity->user_id]->mail = $oActivity->user_email;\n $oReturn->activities[(int) $oActivity->id]->user[(int) $oActivity->user_id]->display_name = $oActivity->display_name;\n $oReturn->activities[(int) $oActivity->id]->type = $oActivity->type;\n $oReturn->activities[(int) $oActivity->id]->time = $oActivity->date_recorded;\n $oReturn->activities[(int) $oActivity->id]->is_hidden = $oActivity->hide_sitewide === \"0\" ? false : true;\n $oReturn->activities[(int) $oActivity->id]->is_spam = $oActivity->is_spam === \"0\" ? false : true;\n }\n $oReturn->count = count($aTempActivities['activities']);\n } else {\n return $this->error('activity');\n }\n return $oReturn;\n }\n\n for ($i = 1; $i <= $iPages; $i++) {\n if ($iLimit != 0 && ($i * $aParams['per_page']) > $iLimit) {\n $aParams['per_page'] = $aParams['per_page'] - (($i * $aParams['per_page']) - $iLimit);\n $bLastRun = true;\n }\n $aParams ['page'] = $i;\n $aTempActivities = bp_activity_get($aParams);\n if (empty($aTempActivities['activities'])) {\n if ($i == 1)\n return $this->error('activity');\n else\n break;\n }\n else {\n foreach ($aTempActivities['activities'] as $oActivity) {\n $oReturn->activities[(int) $oActivity->id]->component = $oActivity->component;\n $oReturn->activities[(int) $oActivity->id]->user[(int) $oActivity->user_id]->username = $oActivity->user_login;\n $oReturn->activities[(int) $oActivity->id]->user[(int) $oActivity->user_id]->mail = $oActivity->user_email;\n $oReturn->activities[(int) $oActivity->id]->user[(int) $oActivity->user_id]->display_name = $oActivity->display_name;\n $oReturn->activities[(int) $oActivity->id]->type = $oActivity->type;\n $oReturn->activities[(int) $oActivity->id]->time = $oActivity->date_recorded;\n $oReturn->activities[(int) $oActivity->id]->is_hidden = $oActivity->hide_sitewide === \"0\" ? false : true;\n $oReturn->activities[(int) $oActivity->id]->is_spam = $oActivity->is_spam === \"0\" ? false : true;\n }\n $oReturn->count = count($aTempActivities['activities']);\n if ($bLastRun)\n break;\n }\n }\n\n return $oReturn;\n }", "public function getActivityID()\n {\n return $this->activityID;\n }", "public function userActivity()\n\t{\n\t\treturn $this->hasMany(config('core.acl.user_activity'));\n\t}", "public function getEventActivityList() {\n return($this->eventActivityList);\n }", "public function activities() {\n return $this->hasMany(Activity::class, 'causer_id', 'id');\n }", "public function getActivity() : ?string\n {\n return $this->get('activity', 'companies');\n }", "public function activity()\n {\n return $this->morphMany(Activity::class, 'subject')->latest();\n }", "public function activity_own()\n\t{\n\t\treturn $this->_get_activity('activity_own', $this->current_user->id);\n\n\t}", "public function getActivityStatus(): string\n {\n return $this->activityStatus;\n }", "public function getActivite()\n {\n return $this->activite;\n }", "function _time_tracker_get_active_activities_options() {\n $activities = array();\n\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', 'time_tracker_activity')\n ->propertyCondition('status', 1);\n $result = $query->execute();\n\n if (isset($result['time_tracker_activity'])) {\n $activity_ids = array_keys($result['time_tracker_activity']);\n $active_activities = entity_load('time_tracker_activity', $activity_ids);\n\n foreach ($active_activities as $activity) {\n $activities[$activity->taid] = $activity->name;\n }\n }\n\n return $activities;\n}", "public function getActivityTime()\n {\n return $this->activity_time;\n }", "public function activities()\n {\n return $this->morphMany('BT\\Modules\\Activity\\Models\\Activity', 'audit');\n }", "public function getAllActivity()\t{\n\t\t$activities = DB::table('smarthome')->distinct()->select('activity')->get();\n\t\t$array_activities =array();\n\t\tforeach($activities as $activity)\t{ \n\t\t\t$array_activities[] = $activity->activity; \n\t\t}\n\t\treturn $array_activities;\n\t}", "public function getCurrentActivityId(): ?string;", "public function getActivityId() : string\r\n {\r\n return $this->activity_id;\r\n }", "public function activities()\n {\n return $this->hasMany('App\\Activity');\n }", "public function activity()\n {\n return $this->belongsTo('CityBoard\\Entities\\Activity');\n }", "public function getActive()\n {\n $value = $this->get(self::ACTIVE);\n return $value === null ? (integer)$value : $value;\n }", "public static function getInfo(): ActivityInfo\n {\n /** @var ActivityContextInterface $context */\n $context = self::getCurrentContext();\n\n return $context->getInfo();\n }", "public function activities(){\n\n $response = Http::withHeaders(self::headers())\n ->get(self::endpoint() . config('alpaca.activities_uri'))\n ->collect();\n\n return $response;\n }", "public function activity() {\n return $this->hasMany('Modules\\Admin\\Models\\memberActivityLog', 'activity_type_id', 'id');\n }" ]
[ "0.6279298", "0.61109614", "0.60922825", "0.59055704", "0.59055704", "0.577385", "0.5761677", "0.57564396", "0.56940335", "0.5621184", "0.562074", "0.5608026", "0.5607261", "0.5559675", "0.5544057", "0.55000293", "0.54880816", "0.54758495", "0.5447201", "0.5437045", "0.5381449", "0.5367384", "0.53488255", "0.5343237", "0.53282", "0.5258895", "0.5249268", "0.52338034", "0.52292466", "0.5214422" ]
0.6276139
1
Gets the agreementAcceptances property value. The user's terms of use acceptance statuses. Readonly. Nullable.
public function getAgreementAcceptances(): ?array { $val = $this->getBackingStore()->get('agreementAcceptances'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, AgreementAcceptance::class); /** @var array<AgreementAcceptance>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'agreementAcceptances'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApprovalStatusAllowableValues()\n {\n return [\n self::APPROVAL_STATUS__NEW,\n self::APPROVAL_STATUS_CANCELED,\n self::APPROVAL_STATUS_SENT_TO_APPROVAL,\n self::APPROVAL_STATUS_RECEIVED_BY_APPROVAL,\n self::APPROVAL_STATUS_IN_PROGRESS_APPROVAL,\n self::APPROVAL_STATUS_REJECTED_IN_APPROVAL,\n self::APPROVAL_STATUS_APPROVED_IN_APPROVAL,\n self::APPROVAL_STATUS_ACTIVE_WORKFLOW_APPROVAL,\n ];\n }", "public function get_terms_acceptance()\n {\n $tagdata = $this->EE->TMPL->tagdata;\n $codigo = $_COOKIE[$this->services->get_fuzzy_name(\"Codigo\")];\n\n $terminos = '';\n // var_dump($codigo);\n ee()->db->select('TipoUser, Token');\n ee()->db->select(' terminos_condiciones');\n ee()->db->where('codigo',$codigo);\n $query_modelo_result = ee()->db->get('exp_user_upc_data');\n\n foreach($query_modelo_result->result() as $row)\n {\n $terminos = $row->terminos_condiciones;\n // var_dump($terminos);\n } \n if(is_null($terminos) || $terminos === 'null' || $terminos === 'no'){\n $tagdata = $this->_replace_subtag_data('terminos', $tagdata, 'no');\n return $tagdata;\n }else if($terminos == 'si'){\n return $this->consultar_alumno();\n }else{\n return $terminos;\n }\n }", "public function setAgreementAcceptances(?array $value): void {\n $this->getBackingStore()->set('agreementAcceptances', $value);\n }", "public function getAllowanceInsurance() {\n return $this->_allowanceInsurance;\n }", "public function getFinanceBudgetApproval() {\n return $this->financeBudgetApproval;\n }", "public function getAgence()\n {\n return $this->agence;\n }", "public function getAccepted()\n {\n return $this->accepted;\n }", "public function getOutstandingAccepted(): float\n {\n return $this->outstandingAccepted;\n }", "public function getAcceptedPayments()\n {\n return $this->acceptedPayments;\n }", "public function getAvailabilities()\n {\n return $this->availabilities;\n }", "public function getAccepted()\n\t{\n\t\treturn $this->accepted;\n\t}", "public function forUpLinesApproval()\n {\n if(auth()->user()->hasRole(['Finance Admin']))\n {\n return CommissionRequest::where('status','for review')->get();\n }\n\n return collect($this->getCommissionRequests())->filter(function($value, $key){\n\n if(collect($value->approval)->where('id',auth()->user()->id)->whereNull('approval')->count() > 0)\n return $value->approval;\n });\n }", "public function markTermsAsAccepted()\n {\n return $this->forceFill([\n 'terms_accepted_at' => $this->freshTimestamp(),\n ])->save();\n }", "public function getApprovalsRequired()\n {\n return $this->approvalsRequired;\n }", "public function getApproved()\n {\n return $this->approved;\n }", "public function getApproved()\n {\n return $this->approved;\n }", "public function getApproved()\n {\n return $this->approved;\n }", "public function getStatusAllowableValues()\n {\n return [\n self::STATUS_ACCEPTED,\n self::STATUS_AWAITING_FUNDS,\n self::STATUS_FUNDED,\n self::STATUS_UNFUNDED,\n self::STATUS_BANK_PAYMENT_REQUESTED,\n self::STATUS_REJECTED,\n self::STATUS_ACCEPTED_BY_RAILS,\n self::STATUS_CONFIRMED,\n self::STATUS_RETURNED,\n self::STATUS_WITHDRAWN,\n ];\n }", "public function getAllowance() {\n\t\treturn $this->_allowance;\n\t}", "public function approvalStatus()\n {\n $approval_statuses = ApprovelStatus::get();\n\n return ApprovelStatusResource::collection($approval_statuses);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::APPROVED,\n self::AVAILABLE_WITHOUT_REVIEW,\n self::DECLINED,\n self::EXPIRED,\n self::PENDING_REVIEW,\n self::NONE\n ];\n }", "public function getAccepteDepuisQBureau() {\n return $this->accepteDepuisQBureau;\n }", "public function getApproval() {\n return $this->_getField(\"approval\", 0, 2);\n }", "public function hasAcceptedTerms()\n {\n return ! is_null($this->terms_accepted_at);\n }", "public function getOutcomeAllowableValues()\n {\n return [\n self::OUTCOME_UNSPECIFIED,\n self::OUTCOME_NONE,\n self::OUTCOME_PASSED,\n self::OUTCOME_FAILED,\n self::OUTCOME_INCONCLUSIVE,\n self::OUTCOME_TIMEOUT,\n self::OUTCOME_ABORTED,\n self::OUTCOME_BLOCKED,\n self::OUTCOME_NOT_EXECUTED,\n self::OUTCOME_WARNING,\n self::OUTCOME_ERROR,\n self::OUTCOME_NOT_APPLICABLE,\n self::OUTCOME_PAUSED,\n self::OUTCOME_IN_PROGRESS,\n self::OUTCOME_NOT_IMPACTED,\n self::OUTCOME_MAX_VALUE,\n ];\n }", "public function getCanalVentas()\n {\n return $this->canalVentas;\n }", "public function getAgences()\n {\n return $this->agences;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PENDING,\n self::APPROVED,\n self::DECLINED,\n ];\n }", "public function hasConsent()\r\n {\r\n return $this->value() == 'accept';\r\n }", "public function getApprovals(): ?array {\n $val = $this->getBackingStore()->get('approvals');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, Approval::class);\n /** @var array<Approval>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'approvals'\");\n }" ]
[ "0.5580199", "0.5517246", "0.5401042", "0.52725106", "0.5185365", "0.5163961", "0.5128639", "0.5107381", "0.510196", "0.5090332", "0.5053751", "0.5037647", "0.4952054", "0.49481365", "0.4935141", "0.4935141", "0.4935141", "0.49134317", "0.490067", "0.48867956", "0.48784423", "0.48779976", "0.48762572", "0.48716268", "0.48627198", "0.48302564", "0.47759837", "0.47662905", "0.47622326", "0.47537756" ]
0.6920073
0
Gets the appConsentRequestsForApproval property value. The appConsentRequestsForApproval property
public function getAppConsentRequestsForApproval(): ?array { $val = $this->getBackingStore()->get('appConsentRequestsForApproval'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, AppConsentRequest::class); /** @var array<AppConsentRequest>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'appConsentRequestsForApproval'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAppConsentRequestsForApproval(?array $value): void {\n $this->getBackingStore()->set('appConsentRequestsForApproval', $value);\n }", "public function getUserApprovalRequests()\n {\n return Leave::where('approval_id', auth()->id())->orderBy('id', 'desc')->paginate(20);\n }", "public function getApproval() {\n return $this->_getField(\"approval\", 0, 2);\n }", "public function forUpLinesApproval()\n {\n if(auth()->user()->hasRole(['Finance Admin']))\n {\n return CommissionRequest::where('status','for review')->get();\n }\n\n return collect($this->getCommissionRequests())->filter(function($value, $key){\n\n if(collect($value->approval)->where('id',auth()->user()->id)->whereNull('approval')->count() > 0)\n return $value->approval;\n });\n }", "public function getViewApprovalRequests()\n {\n return Leave::where(['approval_id' => auth()->id(), 'status' => 1])->orderBy('id', 'desc')->paginate(20);\n }", "function getApps_req()\n {\n if (!isset($this->sapps_req) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sapps_req;\n }", "public function getApprovalsRequired()\n {\n return $this->approvalsRequired;\n }", "public function getApprovalStatusAllowableValues()\n {\n return [\n self::APPROVAL_STATUS__NEW,\n self::APPROVAL_STATUS_CANCELED,\n self::APPROVAL_STATUS_SENT_TO_APPROVAL,\n self::APPROVAL_STATUS_RECEIVED_BY_APPROVAL,\n self::APPROVAL_STATUS_IN_PROGRESS_APPROVAL,\n self::APPROVAL_STATUS_REJECTED_IN_APPROVAL,\n self::APPROVAL_STATUS_APPROVED_IN_APPROVAL,\n self::APPROVAL_STATUS_ACTIVE_WORKFLOW_APPROVAL,\n ];\n }", "public function getActiveAccessReq() {\n if( !$this->isGranted('ROLE_VACREQ_ADMIN') ) {\n return null;\n }\n $userSecUtil = $this->container->get('user_security_utility');\n $accessreqs = $userSecUtil->getUserAccessRequestsByStatus($this->getParameter('vacreq.sitename'),AccessRequest::STATUS_ACTIVE);\n return $accessreqs;\n }", "public function getRequests()\n {\n return $this->requests;\n }", "public function getFinanceBudgetApproval() {\n return $this->financeBudgetApproval;\n }", "public static function commissionRequest()\n {\n return collect(CommissionRequest::where('status','pending')->get())->filter(function($value, $key){\n\n if(collect($value->approval)->where('id',auth()->user()->id)->whereNull('approval')->count() > 0)\n return $value->approval;\n });\n }", "public function getInitiallyApproved();", "public function getFinanceJobApproval() {\n return $this->financeJobApproval;\n }", "function approvals_required() {\n $res = array();\n if (isset($this->approvals_required)) {\n $res = $this->approvals_required;\n }\n elseif (isset($this->qa_step_id)) {\n $this->get_approvals_required();\n $res = $this->approvals_required;\n }\n return $res;\n }", "public function getScopesApproved()\n {\n $scopesApproved = [];\n\n foreach ($this->getModuleResults()->toArray() as $moduleResult) {\n $scopesApproved += $moduleResult->scopesApproved ?? [];\n }\n \n return $scopesApproved + $this->defaultScopes;\n }", "public function getRequests(): array\n {\n return $this->_aRequests;\n }", "public function getRecoupmentPolicyConsent()\n {\n return $this->recoupmentPolicyConsent;\n }", "public function getRequests()\n\t{\n\t\treturn $this->requests();\n\t}", "public function getRequests() : array\n {\n return $this->requests;\n }", "public function getApproved()\n {\n return $this->approved;\n }", "public function getApproved()\n {\n return $this->approved;\n }", "public function getApproved()\n {\n return $this->approved;\n }", "function approvals() {\n $res = array();\n if (isset($this->approvals)) {\n $res = $this->approvals;\n }\n elseif (isset($this->qa_step_id)) {\n $this->get_approvals();\n $res = $this->approvals;\n }\n return $res;\n }", "public function getApprovedApprovals(){\n return 0;\n $service = Yii::$app->params['ServiceName']['RequeststoApprove'];\n $filter = [\n 'Sender_ID' => Yii::$app->user->identity->getId(),\n 'Status' => 'Approved'\n ];\n $result = Yii::$app->navhelper->getData($service,$filter);\n\n //Yii::$app->recruitment->printrr($result);\n if(is_object($result) || is_string($result)){//RETURNS AN EMPTY object if the filter result to false\n return 0;\n }\n return count($result);\n }", "public function awaitingApproval()\n {\n return $this->friends()->where('status', Status::AWAITING_APPROVAL);\n }", "public function getIrhpPermitApplications()\n {\n return $this->irhpPermitApplications;\n }", "public function getIntentDetectionConfidence()\n {\n return $this->intent_detection_confidence;\n }", "public function getApprovalStatusAttribute()\n\t{\n\t\tif ( $this->isPendingApproval() )\n\t\t\treturn 'pending';\n\n\t\treturn $this->isApproved() ? 'approved' : 'rejected';\n\t}", "public static function kdg_fablab_rs_get_message_on_approval() {\n if (empty(self::$_message_on_approval)) {\n self::$_message_on_approval = \"Hey USERNAME\\r\\n\\n\"\n .\"Jouw reservatie werd goedgekeurd!\\r\\n\"\n .\"Bekijk het overzicht van je reservaties via volgende link:\\r\\n\\n\"\n .\"MY_RESERVATIONS_URL\\r\\n\\n\"\n .\"Met vriendelijke groeten\\r\\n\"\n .\"Het KdG Fablab team\";\n }\n\n return self::$_message_on_approval;\n }" ]
[ "0.64410937", "0.60296434", "0.5992924", "0.5868699", "0.56695557", "0.56529325", "0.5640496", "0.5521032", "0.5455866", "0.54259694", "0.5422494", "0.5382761", "0.53650004", "0.5364299", "0.5266466", "0.5229726", "0.52164245", "0.5196582", "0.5196416", "0.51779896", "0.51714367", "0.51714367", "0.51714367", "0.5168422", "0.51201177", "0.5095836", "0.50866836", "0.50776696", "0.5042513", "0.50368536" ]
0.7273838
0
Gets the appRoleAssignedResources property value. The appRoleAssignedResources property
public function getAppRoleAssignedResources(): ?array { $val = $this->getBackingStore()->get('appRoleAssignedResources'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, ServicePrincipal::class); /** @var array<ServicePrincipal>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'appRoleAssignedResources'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoleAssignments()\n {\n if (array_key_exists(\"roleAssignments\", $this->_propDict)) {\n return $this->_propDict[\"roleAssignments\"];\n } else {\n return null;\n }\n }", "public function getResources()\n\t{\n\t return $this->resources;\n\t}", "public function getAclResources()\n {\n return $this->aclResources;\n }", "public function getAllowedRoles()\n {\n return $this->allowedRoles()->get();\n }", "public function getLinkedEligibleRoleAssignmentId()\n {\n if (array_key_exists(\"linkedEligibleRoleAssignmentId\", $this->_propDict)) {\n return $this->_propDict[\"linkedEligibleRoleAssignmentId\"];\n } else {\n return null;\n }\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->resources;\n }", "public function getResources()\n {\n return $this->_resources;\n }", "public function resources()\n {\n return $this->_resources;\n }", "public function getAppRoleAssignments(): ?array {\n $val = $this->getBackingStore()->get('appRoleAssignments');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, AppRoleAssignment::class);\n /** @var array<AppRoleAssignment>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'appRoleAssignments'\");\n }", "public function role_resource_ids(array $role_ids = null) {\n // Collect all resources these roles have access to\n if (! isset($this->_vars['role_resource_ids'])) {\n\n if ($role_ids === null) {\n $role_ids = $this->role_ids();\n }\n\n $role_resource_ids = [];\n foreach (entity::dao('acl\\role\\resource')->by_acl_role_multi($role_ids) as $ids) {\n if ($ids) {\n foreach ($ids as $role_resource_id) {\n $role_resource_ids[] = (int) $role_resource_id;\n }\n }\n }\n\n $this->_vars['role_resource_ids'] = array_unique($role_resource_ids);\n }\n\n return $this->_vars['role_resource_ids'];\n }", "protected function resourcePermissionMap(): array\n {\n if (property_exists($this, 'customPermissionMap') && is_array($this->customPermissionMap)) {\n return array_merge($this->resourcePermissionMap, $this->customPermissionMap);\n }\n\n return $this->resourcePermissionMap;\n }", "public function getLinkedEligibleRoleAssignment()\n {\n if (array_key_exists(\"linkedEligibleRoleAssignment\", $this->_propDict)) {\n if (is_a($this->_propDict[\"linkedEligibleRoleAssignment\"], \"\\Beta\\Microsoft\\Graph\\Model\\GovernanceRoleAssignment\") || is_null($this->_propDict[\"linkedEligibleRoleAssignment\"])) {\n return $this->_propDict[\"linkedEligibleRoleAssignment\"];\n } else {\n $this->_propDict[\"linkedEligibleRoleAssignment\"] = new GovernanceRoleAssignment($this->_propDict[\"linkedEligibleRoleAssignment\"]);\n return $this->_propDict[\"linkedEligibleRoleAssignment\"];\n }\n }\n return null;\n }", "public function getAvailableRoles(): array;", "public function getResourceListAttribute()\n {\n return $this->resources->lists('id')->all();\n }", "public function setAppRoleAssignedResources(?array $value): void {\n $this->getBackingStore()->set('appRoleAssignedResources', $value);\n }", "public function getAssignable() {\n\t\treturn (($this->role != self::ROLE_ADMINISTRATOR) && Controller::isAdmin());\n\t}", "public function getRoleAssignmentSchedules()\n {\n if (array_key_exists(\"roleAssignmentSchedules\", $this->_propDict)) {\n return $this->_propDict[\"roleAssignmentSchedules\"];\n } else {\n return null;\n }\n }", "public function getRoleAssignmentScheduleRequests()\n {\n if (array_key_exists(\"roleAssignmentScheduleRequests\", $this->_propDict)) {\n return $this->_propDict[\"roleAssignmentScheduleRequests\"];\n } else {\n return null;\n }\n }", "public function getResources()\r\n {\r\n return $this->privateResources;\r\n }", "public function getDefinedRoles()\n {\n $roles = $this->app['config']->get('permissions/roles');\n $roles[self::ROLE_ROOT] = [\n 'label' => 'Root',\n 'description' => Trans::__('permissions.roles.description.root'),\n 'builtin' => true,\n ];\n\n return $roles;\n }", "abstract protected function _getRoleResources($role);", "public function getResourceLabels()\n {\n return $this->resource_labels;\n }", "public function getResourcesToCopy()\n {\n return $this->resourcesToCopy;\n }", "public function hasUniqueRoleAssignments()\n {\n return $this->getProperty('HasUniqueRoleAssignments');\n }", "public function getRole()\n {\n return $this->_getData('role');\n }", "public function getAllowedRoles();" ]
[ "0.6652097", "0.5609713", "0.5563375", "0.55544436", "0.5521238", "0.5509447", "0.5509447", "0.5509447", "0.5509447", "0.5509447", "0.5479051", "0.5450167", "0.5408722", "0.53996253", "0.5361923", "0.53608185", "0.53115356", "0.53110665", "0.5307176", "0.5271488", "0.5218815", "0.52054375", "0.51899326", "0.51855356", "0.5180207", "0.51633793", "0.5153955", "0.5112286", "0.5109989", "0.50794023" ]
0.6675654
0
Gets the appRoleAssignments property value. Represents the app roles a user has been granted for an application. Supports $expand.
public function getAppRoleAssignments(): ?array { $val = $this->getBackingStore()->get('appRoleAssignments'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, AppRoleAssignment::class); /** @var array<AppRoleAssignment>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'appRoleAssignments'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoleAssignments()\n {\n if (array_key_exists(\"roleAssignments\", $this->_propDict)) {\n return $this->_propDict[\"roleAssignments\"];\n } else {\n return null;\n }\n }", "public function getAssignments()\n\t{\n\t\tif( $this->_assignments!==null )\n\t\t{\n\t\t\treturn $this->_assignments;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$authorizer = Rights::getAuthorizer();\n\t\t\t$authAssignments = $authorizer->authManager->getAuthAssignments($this->getId());\n\t\t\t$nestedItems = $authorizer->authManager->getAuthItemsByNames(array_keys($authAssignments), true);\n\n\t\t\t$assignments = array();\n\t\t\tforeach( $nestedItems as $type=>$items )\n\t\t\t{\n\t\t\t\t$items = $authorizer->attachAuthItemBehavior($items);\n\t\t\t\t$assignments[ $type ] = array();\n\t\t\t\tforeach( $items as $itemName=>$item ){\n $assignments[ $type ][ $itemName ] = $item;\n \n \n }\n\t\t\t}\n \n \n \n\t\t\treturn $this->_assignments = $assignments;\n\t\t}\n\t}", "public function getRelatedRoles()\n {\n return $this->hasMany(AuthAssignment::className(), ['user_id' => 'id']);\n }", "public function getAssignments() {\n return $this->assignments;\n }", "public function getAllowedRoles()\n {\n return $this->allowedRoles()->get();\n }", "public function getAgentAssignments()\n {\n return $this->hasMany(AgentAssignment::className(), ['user_id' => 'user_id']);\n }", "public function getAssignments()\n {\n if (array_key_exists(\"assignments\", $this->_propDict)) {\n return $this->_propDict[\"assignments\"];\n } else {\n return null;\n }\n }", "public function getUserRoles()\n {\n return $this->userRoles;\n }", "public function getUserRoles()\n {\n return $this->userRoles;\n }", "public function getUserRoles()\n {\n return $this->user_roles;\n }", "function getRoles() {\n return $this->getValues('roles');\n }", "public function getRoleAssignments(): ?array {\n $val = $this->getBackingStore()->get('roleAssignments');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, GovernanceRoleAssignment::class);\n /** @var array<GovernanceRoleAssignment>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'roleAssignments'\");\n }", "public function getRolesCollection()\n {\n return $this->user_roles;\n }", "public function getRoles()\n {\n return $this->getProperty(\"Roles\");\n }", "public function setRoleAssignments($val)\n {\n $this->_propDict[\"roleAssignments\"] = $val;\n return $this;\n }", "public function roles()\n {\n return $this->roles;\n }", "public function getRoles() {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles() {\n return $this->roles;\n }", "public function getRoles()\n {\n Yii::trace('getRoles()', 'application.components.RinkfinderWebUser');\n\treturn $this->getState('__roles');\n }", "function getUserRoles()\n {\n return $this->userRoles;\n }", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "public function getRoles()\n {\n return $this->getUserRoles()->toArray();\n }", "public function getRolesProperty()\n {\n return collect(Jetstream::$roles)->transform(function ($role) {\n return with($role->jsonSerialize(), function ($data) {\n return (new Role(\n $data['key'],\n $data['name'],\n $data['permissions']\n ))->description($data['description']);\n });\n })->values()->all();\n }", "public function getRoles() {\n return $this->_roles;\n }" ]
[ "0.72074485", "0.59948665", "0.5954564", "0.5943059", "0.58537173", "0.58094376", "0.5762654", "0.5753946", "0.5753946", "0.5700504", "0.56867725", "0.5681233", "0.566777", "0.56290966", "0.56167614", "0.56019825", "0.5517097", "0.5496141", "0.5496141", "0.5496141", "0.5496141", "0.5496141", "0.5496141", "0.5495976", "0.5478984", "0.5478218", "0.5468476", "0.5427887", "0.54250187", "0.5423379" ]
0.6483528
1
Gets the assignedLicenses property value. The licenses that are assigned to the user, including inherited (groupbased) licenses. This property doesn't differentiate directlyassigned and inherited licenses. Use the licenseAssignmentStates property to identify the directlyassigned and inherited licenses. Not nullable. Supports $filter (eq, not, /$count eq 0, /$count ne 0).
public function getAssignedLicenses(): ?array { $val = $this->getBackingStore()->get('assignedLicenses'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, AssignedLicense::class); /** @var array<AssignedLicense>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'assignedLicenses'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLicenses()\n {\n return $this->licenses;\n }", "public function getLicenses()\n {\n $return = array();\n $licenses = $this->getRelationship('licenses', $this);\n\n switch(count($licenses)) {\n case 0:\n return null;\n case 1:\n return new License($licenses[0]);\n default:\n foreach($licenses as $license) {\n $return[] = new License($license);\n }\n return $return;\n }\n }", "public function setAllowedLicenses($allowedLicenses)\n {\n $this->allowedLicenses = $allowedLicenses;\n return $this;\n }", "public function getAppliedLicense()\n {\n return $this->applied_license;\n }", "public function setLicenses($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->licenses = $arr;\n\n return $this;\n }", "public function getAdditionalLicenses()\n {\n return $this->additional_licenses;\n }", "public function setUsedLicenses($usedLicenses)\n {\n $this->usedLicenses = $usedLicenses;\n return $this;\n }", "public function actionGetLicenses(): Response\n {\n $user = Craft::$app->getUser()->getIdentity();\n\n try {\n $licenses = Module::getInstance()->getCmsLicenseManager()->getLicensesArrayByOwner($user);\n\n return $this->asJson($licenses);\n } catch (Throwable $e) {\n return $this->asErrorJson($e->getMessage());\n }\n }", "public function getLicenseCodes()\n {\n return $this->license_codes;\n }", "public function getLicenses($email, $active_only = true)\n {\n return $this->apiRequest(\n 'customer/listlicencebyemail',\n ['email' => $email, 'activeLicenseOnly' => ($active_only ? 'true' : 'false')],\n 'GET'\n );\n }", "public function license()\n {\n return $this->_license;\n }", "public function getLicense()\n {\n return $this->license;\n }", "public function licenseStatus()\n {\n return $this->belongsTo('CityBoard\\Entities\\LicenseStatus');\n }", "public function setAssignedLicenses(?array $value): void {\n $this->getBackingStore()->set('assignedLicenses', $value);\n }", "public function getLicence()\n {\n return new LicenceDTO($this->data);\n }", "public function setAdditionalLicenses($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->additional_licenses = $arr;\n\n return $this;\n }", "function getLicensesWithLevel($licenses)\n\t{\n\t\tif(count($licenses) > 0)\n\t\t{\n\t\t\t$lics = implode(\", \", $licenses);\n\t\t\t$query = \"SELECT license_id, level FROM #__payperdownloadplus_licenses WHERE \n\t\t\t\tlicense_id IN ($lics)\";\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$db->setQuery($query);\n\t\t\treturn $db->loadObjectList();\n\t\t}\n\t\telse\n\t\t\treturn array();\n\t}", "public function getLicenseAssignmentStates(): ?array {\n $val = $this->getBackingStore()->get('licenseAssignmentStates');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, LicenseAssignmentState::class);\n /** @var array<LicenseAssignmentState>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'licenseAssignmentStates'\");\n }", "public function getAssignable()\n {\n return $this->assignable;\n }", "public function getLicense();", "public function getLicense();", "public function get_license() {\n\n\t\tcheck_ajax_referer( 'mi-admin-nonce', 'nonce' );\n\n\t\tif ( ! current_user_can( 'monsterinsights_view_dashboard' ) || ! monsterinsights_is_pro_version() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$site_license = array(\n\t\t\t'key' => MonsterInsights()->license->get_site_license_key(),\n\t\t\t'type' => MonsterInsights()->license->get_site_license_type(),\n\t\t\t'is_disabled' => MonsterInsights()->license->site_license_disabled(),\n\t\t\t'is_expired' => MonsterInsights()->license->site_license_expired(),\n\t\t\t'is_invalid' => MonsterInsights()->license->site_license_invalid(),\n\t\t);\n\t\t$network_license = array(\n\t\t\t'key' => MonsterInsights()->license->get_network_license_key(),\n\t\t\t'type' => MonsterInsights()->license->get_network_license_type(),\n\t\t\t'is_disabled' => MonsterInsights()->license->network_license_disabled(),\n\t\t\t'is_expired' => MonsterInsights()->license->network_license_expired(),\n\t\t\t'is_invalid' => MonsterInsights()->license->network_license_disabled(),\n\t\t);\n\n\t\twp_send_json( array(\n\t\t\t'site' => $site_license,\n\t\t\t'network' => $network_license,\n\t\t) );\n\n\t}", "public function lstlicenses(){\r\n\t\t$Sql = \"SELECT\r\n\t\t\t\t\tlicenses_id,\r\n\t\t\t\t\tposotion_id,\r\n\t\t\t\t\tlicenses_name,\r\n\t\t\t\t\tis_active\r\n\t\t\t\tFROM\r\n\t\t\t\t\trs_tbl_licenses\r\n\t\t\t\tWHERE\r\n\t\t\t\t\t1=1\";\r\n\t\tif($this->isPropertySet(\"licenses_id\", \"V\"))\r\n\t\t\t$Sql .= \" AND licenses_id=\" . $this->getProperty(\"licenses_id\");\r\n\t\t\r\n\t\tif($this->isPropertySet(\"posotion_id\", \"V\"))\r\n\t\t\t$Sql .= \" AND posotion_id=\" . $this->getProperty(\"posotion_id\");\r\n\t\t\t\r\n\t\tif($this->isPropertySet(\"is_active\", \"V\"))\r\n\t\t\t$Sql .= \" AND is_active=\" . $this->getProperty(\"is_active\");\r\n\t\t\r\n\t\tif($this->isPropertySet(\"GROUPBY\", \"V\"))\r\n\t\t\t$Sql .= \" GROUP BY \" . $this->getProperty(\"GROUPBY\");\r\n\t\t\t\r\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\"))\r\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\r\n\t\t\r\n\t\tif($this->isPropertySet(\"limit\", \"V\"))\r\n\t\t\t$Sql .= $this->appendLimit($this->getProperty(\"limit\"));\r\n\r\n\t\treturn $this->dbQuery($Sql);\r\n\t}", "public function license()\n {\n return $this->belongsTo('CityBoard\\Entities\\License');\n }", "public function requiresValidLicense()\n {\n if (is_null(static::$requiresLicense)) {\n if ($countMemberWithCPAccess = ee()->cache->get('cp_member_count')) {\n static::$requiresLicense = ($countMemberWithCPAccess > 1);\n\n return static::$requiresLicense;\n }\n\n $cpRoleIds = ee('db')->distinct()->select('role_id')->from('permissions')->where('permission', 'can_access_cp')->get();\n $cpRoles = [1];\n foreach ($cpRoleIds->result_array() as $row) {\n $cpRoles[] = $row['role_id'];\n }\n $cpRolesList = implode(', ', array_unique($cpRoles));\n $countMemberWithCPAccessQuery = \"SELECT COUNT(DISTINCT(exp_members.member_id)) AS count\n FROM exp_members\n LEFT JOIN exp_members_roles ON (exp_members.member_id = exp_members_roles.member_id)\n LEFT JOIN exp_members_role_groups ON (exp_members.member_id = exp_members_role_groups.member_id)\n LEFT JOIN exp_roles_role_groups ON (exp_members_role_groups.group_id = exp_roles_role_groups.group_id)\n WHERE exp_members.role_id IN ({$cpRolesList})\n OR exp_members_roles.role_id IN ({$cpRolesList})\n OR exp_roles_role_groups.role_id IN ({$cpRolesList})\";\n $countMemberWithCPAccess = ee()->db->query($countMemberWithCPAccessQuery)->row('count');\n ee()->cache->save('cp_member_count', $countMemberWithCPAccess, 60);\n\n static::$requiresLicense = ($countMemberWithCPAccess > 1);\n }\n\n return static::$requiresLicense;\n }", "static function countForLicense($softwarelicenses_id) {\n global $DB;\n\n $query = \"SELECT COUNT(`glpi_users_softwarelicenses`.`id`)\n FROM `glpi_users_softwarelicenses`\n INNER JOIN `glpi_users`\n ON (`glpi_users_softwarelicenses`.`users_id` = `glpi_users`.`id`)\n WHERE `glpi_users_softwarelicenses`.`softwarelicenses_id` = '$softwarelicenses_id'\";\n\n $result = $DB->query($query);\n\n if ($DB->numrows($result) != 0) {\n return $DB->result($result, 0, 0);\n }\n return 0;\n }", "public function licence()\n {\n return $this->belongsTo('App\\Models\\Subscriptions\\Licence');\n }", "public function licenseCurrentStages()\n {\n return $this->hasMany('CityBoard\\Entities\\LicenseCurrentStage');\n }", "public function assignFreeLicenses()\n {\n //Se selecciona cualquier licencia activa del producto\n $licenses = License::select('*')\n ->where('licenses.state', 'Active')\n ->where('licenses.duration', -1)\n ->get();\n\n foreach ($licenses as $license) {\n //De acuerdo al producto se restablece el max_amount en la configiración del producto\n if($license->product->name == 'TrSoft/Copy Binary'){\n $product_setting = $this->getProductSetting($license->product_id);\n\n if(!$product_setting){\n $product_setting = new ProductSetting();\n $product_setting->amount = 1;//$license->max_amount;\n $product_setting->user_id = $this->id;\n $product_setting->product_id = $license->product_id;\n }\n\n $product_setting->max_amount = $license->max_amount;\n $product_setting->save();\n }\n\n $this->save();\n\n //Ultimos datos de comisión registrados\n $commission = $license->lastCommission();\n //Ultimos datos de precios registrados\n $price = $license->lastPrice();\n\n if($commission && $price && $price->price == 0){\n $user_license = new UserLicense();\n $user_license->user_id = $this->id;\n $user_license->commission_id = $commission->id;\n $user_license->license_price_id = $price->id;\n $user_license->state = 'Active';\n $user_license->activation_date = date('Y-m-d H:i:s');\n $user_license->save();\n }\n }\n }", "public function getDrivingLicence()\n {\n return $this->drivingLicence;\n }" ]
[ "0.6448867", "0.6146707", "0.60981494", "0.5878013", "0.5875173", "0.58597565", "0.55883485", "0.5510907", "0.5410647", "0.51856524", "0.51609147", "0.51535964", "0.5120451", "0.50349313", "0.50255126", "0.49789906", "0.4923522", "0.48741806", "0.48203406", "0.48199826", "0.48199826", "0.48079976", "0.47872785", "0.47830236", "0.47807628", "0.4764207", "0.47599974", "0.4756583", "0.47503412", "0.47476548" ]
0.67863446
0
Gets the assignedPlans property value. The plans that are assigned to the user. Readonly. Not nullable.Supports $filter (eq and not).
public function getAssignedPlans(): ?array { $val = $this->getBackingStore()->get('assignedPlans'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, AssignedPlan::class); /** @var array<AssignedPlan>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'assignedPlans'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDisabledPlans()\n {\n if (array_key_exists(\"disabledPlans\", $this->_propDict)) {\n return $this->_propDict[\"disabledPlans\"];\n } else {\n return null;\n }\n }", "public function getPlans(): Collection\n {\n return $this->plans;\n }", "public function getBillingPlans()\n {\n # GET /billing_plans\n }", "public static function plans(): Collection\n {\n return collect(static::$plans);\n }", "public function getProvisionedPlans(): ?array {\n $val = $this->getBackingStore()->get('provisionedPlans');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ProvisionedPlan::class);\n /** @var array<ProvisionedPlan>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'provisionedPlans'\");\n }", "public function getProvisionedPlans(): ?array {\n $val = $this->getBackingStore()->get('provisionedPlans');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ProvisionedPlan::class);\n /** @var array<ProvisionedPlan>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'provisionedPlans'\");\n }", "public function getPlans()\n {\n $FinanceApi = new FinanceApi();\n $plans = $FinanceApi->getPlans();\n\n return $plans;\n }", "public function plans()\n {\n return $this->morphedByMany('App\\Models\\Plan', 'cartable');\n }", "public function allPlans()\n {\n return $this->action->all();\n }", "public function getPlans(){\n \n $response = array();\n \n //Select record\n $this->db->select('*');\n $query = $this->db->get('plan');\n $response = $query->result_array();\n \n return $response;\n \n }", "function getActivePlansForPricingPage()\r\n {\r\n $this->db->select(\"id, name, is_featured, tagline,price, outlets, employees, clients, treatments, products, stations, suppliers, emails_per_month AS 'Email Campaigns', \r\n texts_per_month AS 'Included Texts', texts_cost_each AS 'Extra Text Cost', has_stock_control AS '*Stock Control', has_reports AS '*Reports', \r\n has_pos AS '*POS', has_online_booking AS '*Online Booking', has_rewards AS '*Rewards Scheme', has_gift_cards AS '*Gift Cards'\");\r\n $this->db->where('is_active', 1);\r\n $this->db->where('is_visible', 1);\r\n $this->db->order_by('price', 'ASC');\r\n $q = $this->db->get('plans');\r\n return $q->result_array();\r\n }", "public function setAssignedPlans(?array $value): void {\n $this->getBackingStore()->set('assignedPlans', $value);\n }", "public function setAssignedPlans(?array $value): void {\n $this->getBackingStore()->set('assignedPlans', $value);\n }", "public function getAllPlans($options)\n {\n $url = $this->createUrl('plan', '', $options);\n $data = $this->getResponseAsArray($url);\n if (false === isset($data['plans'])) {\n return null;\n }\n\n return $data['plans'];\n }", "private function _getSubscriptionPlans() {\n $subscriptionDetailsModel = new SubscriptionDetailsModel();\n $this->_subscriptionPlans = $subscriptionDetailsModel->getSubscriptionPlans();\n }", "public function findActivePlan(): array;", "public static function getPlanSlugs() {\n\n\t\tif (!count(self::$plans)) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$slugs = array();\n\t\tforeach (self::$plans as $p) {\n\t\t\t$slugs[] = $p->slug;\n\t\t}\n\n\t\treturn $slugs;\n\t}", "public function setDisabledPlans($val)\n {\n $this->_propDict[\"disabledPlans\"] = $val;\n return $this;\n }", "public function getPlan()\n {\n return $this->getParam(self::PLAN);\n }", "public function deploymentPlans()\n {\n return $this->hasMany('App\\Models\\DeploymentPlan');\n }", "public function get_assigned_users() {\n\t\t$users = $this->get_post_meta( self::$meta_keys['assigned_users'], false );\n\t\tif ( ! is_array( $users ) ) {\n\t\t\t$users = array();\n\t\t}\n\t\treturn array_filter( $users );\n\t}", "public function listPlans($planID = null)\n {\n return $this->api->request('POST', '/2.0/subscription/plans', [\n 'plan' => (is_null($planID)) ? $planID : (int) $planID\n ]);\n }", "private function filterResponsibleAssigned()\r\n {\r\n $responsible = $this->getTaskResponsibleUsers()->select(['id']);\r\n\r\n $filteredAssigned = $this->getTaskAssignedUsers()\r\n ->where(['not in', 'id', $responsible])\r\n ->all();\r\n return $filteredAssigned;\r\n }", "public function query(StripeSubscriptionsPlans $plan)\n {\n /* only for Package */\n /*$users = DB::Table('users')->select('users.id as id', 'users.first_name', 'users.last_name','users.email','users.country_code','users.mobile_number', 'users.status','companies.name as company_name','users.created_at',DB::raw('CONCAT(\"+\",users.country_code,\" \",users.mobile_number) AS mobile'))\n ->leftJoin('companies', function($join) {\n $join->on('users.company_id', '=', 'companies.id');\n })->where('user_type','Driver')->groupBy('id');*/\n\n $plans = $plan->get();\n\n return $plans;\n }", "public function assignedProjects()\n {\n if (auth()->user()->isTester()) {\n return $this->fetchTestersProjects();\n }\n\n if (auth()->user()->isDeveloper()) {\n return $this->fetchDevelopersProjects();\n }\n }", "public function membershipPlansAction() {\n \n $PlansModel = Admin_Model_Plans::getInstance();\n $subResult = $PlansModel->getPlanDetails();\n $this->view->subResult = $subResult;\n }", "public function getPlan() {\n\t\treturn Omelette::getAccountPlan();\n\t}", "public function getSubscriptionPlanVariations(): ?array\n {\n if (count($this->subscriptionPlanVariations) == 0) {\n return null;\n }\n return $this->subscriptionPlanVariations['value'];\n }", "public function getOngoingPublicAssignments()\n {\n return Assignment::query()\n ->whereIn('course_id', $this->courseIDs())\n ->leftJoin('assignment_finish_records',\n function (JoinClause $join) {\n $join->on(\n 'assignments.id',\n '=', 'assignment_finish_records.assignment_id'\n )->where(\n 'assignment_finish_records.user_id',\n '=', $this->id\n )->whereNull('assignment_finish_records.deleted_at');\n })\n ->select(\n [\n 'assignments.*',\n 'assignment_finish_records.created_at as finished_at',\n ]\n )\n ->get();\n }", "public function getLessonPlans()\n {\n return $this->hasMany(LessonPlan::className(), ['subject_id' => 'subject_id']);\n }" ]
[ "0.6544192", "0.6463631", "0.5812294", "0.5722346", "0.5689372", "0.5689372", "0.5630619", "0.55642515", "0.54814047", "0.5476085", "0.5295491", "0.5292044", "0.5292044", "0.5266956", "0.5256738", "0.52506036", "0.52101356", "0.52009994", "0.51796305", "0.51578355", "0.5153421", "0.5140304", "0.51363254", "0.5129039", "0.5124023", "0.5084331", "0.50557727", "0.50553465", "0.505291", "0.5046016" ]
0.68005836
1
Gets the authorizationInfo property value. Identifiers that can be used to identify and authenticate a user in nonAzure AD environments. This property can be used to store identifiers for smartcardbased certificates that a user uses for access to onpremises Active Directory deployments or for federated access. It can also be used to store the Subject Alternate Name (SAN) that's associated with a Common Access Card (CAC). Nullable.Supports $filter (eq and startsWith).
public function getAuthorizationInfo(): ?AuthorizationInfo { $val = $this->getBackingStore()->get('authorizationInfo'); if (is_null($val) || $val instanceof AuthorizationInfo) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'authorizationInfo'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getUserInfo ()\n {\n $authHeader = isset($this->headers['Authorization']) ? $this->headers['Authorization'] : false;\n if ($authHeader)\n {\n return $this->model_user->checkAuth($authHeader);\n }\n return false;\n \n }", "public function getAuthorization(){\n\t\treturn $this->authorization;\n\t}", "private function getUserInfo(){\n $authenticationHeader = $this->request->getServer('HTTP_AUTHORIZATION');\n helper('jwt');\n $encodedToken = getJWTFromRequest($authenticationHeader);\n $key = Services::getSecretKey();\n $decodedToken = JWT::decode($encodedToken, $key, ['HS256']);\n return $this->service->findUserByEmailAddress($decodedToken->email);\n }", "public function getAuthData()\n {\n return $this->isGuest ? $this->getGuestAuthData() : $this->getAuthorizedAuthData();\n }", "public function getAuthData() {\n return $this->getData(array(\n 'amount',\n 'tax',\n 'shipping',\n 'duty',\n 'lineItems',\n 'customerProfileId',\n 'customerPaymentProfileId',\n 'customerShippingAddressId',\n 'order',\n 'taxExempt',\n 'recurringBilling',\n 'cardCode',\n 'splitTenderId',\n ), true);\n }", "public function getUserInfo()\n\t{\n\t\treturn $this->getAuthService()->getStorage()->read();\n\t}", "public function getUserInfo()\n\t{\n\t\treturn $this->getAuthService()->getStorage()->read();\n\t}", "public function getAuthenticationNameAttribute(): ?string;", "public function getAuthenticated() {\n return (string) $this->authenticated;\n }", "public function getAuthorizationCode()\n {\n return $this->authorizationCode;\n }", "public function getAuthorizationHeaderName();", "public function getAuthorizationCode()\n {\n return $this->getParameter('authorizationCode');\n }", "public function get_authorization_header() {\n\t\tif ( ! empty( $_SERVER['HTTP_AUTHORIZATION'] ) ) {\n\t\t\treturn wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] );\n\t\t}\n\n\t\t// When Apache speaks via FastCGI with PHP, then the authorization header is often available as REDIRECT_HTTP_AUTHORIZATION.\n\t\tif ( ! empty( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) ) {\n\t\t\treturn wp_unslash( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] );\n\t\t}\n\t\t$headers = getallheaders();\n\t\t// Check for the authorization header case-insensitively\n\t\tforeach ( $headers as $key => $value ) {\n\t\t\tif ( strtolower( $key ) === 'authorization' ) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function getUserInfo()\r\n {\r\n return $this->userInfo;\r\n }", "public static function get_authorization_header() {\n\t\tif ( ! empty( $_SERVER['HTTP_AUTHORIZATION'] ) ) {\n\t\t\treturn wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] );\n\t\t}\n\t\t// When Apache speaks via FastCGI with PHP, then the authorization header is often available as REDIRECT_HTTP_AUTHORIZATION.\n\t\tif ( ! empty( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] ) ) {\n\t\t\treturn wp_unslash( $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] );\n\t\t}\n\t\t$headers = getallheaders();\n\t\t// Check for the authorization header case-insensitively\n\t\tforeach ( $headers as $key => $value ) {\n\t\t\tif ( strtolower( $key ) === 'authorization' ) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function getAuthIdentityFields();", "public function isAuthorized()\n {\n return $this->authorized;\n }", "public function details()\n {\n return auth('api')->user();\n\n }", "public function getJurisdictionalAuthorization()\n {\n return $this->jurisdictionalAuthorization;\n }", "public function getUserInfo($bearer) {return $this->getInfo($bearer, \"v2/my/info\");}", "public function getAuthorizationState()\n {\n return $this->authorizationState;\n }", "public function isAuth()\n {\n if (array_key_exists('x-auth-token', $this->headers) && !empty(trim($this->headers['x-auth-token']))) {\n\n $this->token = trim($this->headers['x-auth-token']);\n\n // Check if is not empty\n if (isset($this->token) && !empty(trim($this->token))) {\n\n $data = $this->_jwt_decode_data($this->token);\n\n // Check for data after decoding and if everything ok return userId\n if (isset($data['auth']) && isset($data['data']->user_id) && $data['auth']) {\n $user = $data['data']->user_id;\n return $user;\n }\n // return unauthorized when something goes wrong \n else {\n echo json_encode([\"msg\" => \"unauthorized\"]);\n http_response_code(401);\n return null;\n }\n } else {\n echo json_encode([\"msg\" => \"unauthorized\"]);\n http_response_code(401);\n return null;\n }\n } else {\n echo json_encode([\"msg\" => \"unauthorized\"]);\n http_response_code(401);\n return null;\n }\n }", "public function authorize()\n {\n return $this->user('api');\n }", "public function authorize()\n {\n return $this->user('api');\n }", "public function getAuthentication();", "public function getAuthenticated()\n {\n return $this->isAuthenticated;\n }", "public function user() {\n \t$userInfo = $this->bitcasaClientApi->getBitcasaAccountDataApi()->requestUserInfo();\n \treturn $userInfo;\n }", "public function getAuthIdentifierName();", "public function getAuthorization()\n {\n if (array_key_exists(\"authorization\", $this->_propDict)) {\n if (is_a($this->_propDict[\"authorization\"], \"\\Beta\\Microsoft\\Graph\\Model\\TeamsAppAuthorization\") || is_null($this->_propDict[\"authorization\"])) {\n return $this->_propDict[\"authorization\"];\n } else {\n $this->_propDict[\"authorization\"] = new TeamsAppAuthorization($this->_propDict[\"authorization\"]);\n return $this->_propDict[\"authorization\"];\n }\n }\n return null;\n }", "public function authorize()\n {\n return $this->user();\n }" ]
[ "0.5702085", "0.5583017", "0.5261261", "0.52361643", "0.5233827", "0.5193823", "0.5193823", "0.5079902", "0.5016754", "0.4964896", "0.49374524", "0.49246773", "0.49241483", "0.49235427", "0.49199247", "0.4917567", "0.49153462", "0.49133703", "0.49032888", "0.4884609", "0.4877588", "0.4870863", "0.48688084", "0.48688084", "0.4859452", "0.48586226", "0.48515892", "0.48480368", "0.484576", "0.48368415" ]
0.5709768
0
Gets the businessPhones property value. The telephone numbers for the user. Only one number can be set for this property. Readonly for users synced from onpremises directory. Supports $filter (eq, not, ge, le, startsWith).
public function getBusinessPhones(): ?array { $val = $this->getBackingStore()->get('businessPhones'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, 'string'); /** @var array<string>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'businessPhones'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBusinessPhone(): ?string\n {\n return $this->businessPhone;\n }", "public function getPhones()\n {\n if (array_key_exists(\"phones\", $this->_propDict)) {\n if (is_a($this->_propDict[\"phones\"], \"\\Beta\\Microsoft\\Graph\\Model\\Phone\") || is_null($this->_propDict[\"phones\"])) {\n return $this->_propDict[\"phones\"];\n } else {\n $this->_propDict[\"phones\"] = new Phone($this->_propDict[\"phones\"]);\n return $this->_propDict[\"phones\"];\n }\n }\n return null;\n }", "public function getPhonenumber() {\n return $this->phonenumber;\n }", "public function getPhones() {\n return $this->phones;\n }", "public function getPropertyOwnerPhone()\n\t{\n\t\t$powner=User::model()->findByAttributes(array('id'=>$this->fk_owner));\n\t\treturn $powner->phone;\n\t}", "public function getPhoneNumber()\n {\n return $this->data['phone']['number'];\n }", "public function getPhoneNumber(){\n return $this->customerPhone;\n }", "public function getUserTelephone()\n {\n return !empty( $this->oxuser__oxmobfon->value )\n ? $this->getUserPaymorrowMobilePhone()\n : $this->getUserPaymorrowPhone();\n }", "public function getPhone()\n {\n Yii::trace('getPhone()', 'application.components.RinkfinderWebUser');\n\treturn $this->getState('__phone');\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber() {\n return $this->phone_number;\n }", "public static function phonenumbersget()\r\n {\r\n $params = array(\r\n 'method' => 'phonenumbersget',\r\n 'api_token' => self::$api_token,\r\n 'form_token' => self::$form_token\r\n );\r\n $response = self::api_curl($params);\r\n $response = json_decode($response, true);\r\n return $response;\r\n }", "public function getPhoneNumber()\n {\n return $this->get(self::PHONE_NUMBER);\n }", "public function getCustomerPhoneNumber()\n {\n return $this->phone;\n }", "public function getBillingPhone()\n {\n return $this->data['billing']['x_phone'];\n }", "public function getPhoneNumberForVerification()\n {\n return $this->mobile_phone_number;\n }", "public function getPhoneNumber()\n {\n return $this->_fields['PhoneNumber']['FieldValue'];\n }", "public function getPhone()\n {\n return $this->getData(self::PHONE);\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : null;\n }", "public function getCustomerPhone(){\n $attributeCustomer = JSON::decode($this->attribute1);\n return isset($attributeCustomer['phone_number']) ? $attributeCustomer['phone_number'] : '';\n }", "public function getPhoneNumber()\n {\n return $this->PhoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->PhoneNumber;\n }" ]
[ "0.65459585", "0.6413324", "0.63169235", "0.62448186", "0.6029441", "0.60205036", "0.5974504", "0.5972135", "0.5971209", "0.59478533", "0.59478533", "0.59478533", "0.59478533", "0.59478533", "0.59478533", "0.59138244", "0.59121037", "0.5863582", "0.5861848", "0.5859628", "0.58512527", "0.5850322", "0.58429796", "0.58244", "0.58244", "0.58244", "0.58206815", "0.5804772", "0.5774341", "0.5774341" ]
0.6701507
1
Gets the calendarGroups property value. The user's calendar groups. Readonly. Nullable.
public function getCalendarGroups(): ?array { $val = $this->getBackingStore()->get('calendarGroups'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, CalendarGroup::class); /** @var array<CalendarGroup>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'calendarGroups'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserGroups()\n {\n return $this->xoops()->isUser() ? $this->xoops()->user->getGroups() : XOOPS_GROUP_ANONYMOUS;\n }", "protected static function getFeUserGroups()\n {\n /** @var Context $context */\n $context = GeneralUtility::makeInstance(Context::class);\n if (!$context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {\n return false;\n }\n return $context->getPropertyFromAspect('frontend.user', 'groupIds');\n }", "protected function getUserGroups()\n {\n global $xoopsUser;\n\n $groups = $xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;\n\n return $groups;\n }", "public function getGroups()\n {\n // if the groups havent loaded we do so now\n if ($this->groups === null) {\n $this->groups = Group::byUser($this);\n $this->groupCount = count($this->groups);\n }\n\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->data[self::GROUPS];\n }", "public function getGroups() {\n return $this->groups;\n }", "public function getGroupsList()\n {\n return $this->getProperty(\"GroupsList\");\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->getObjectArray('groups');\n }", "public function getCustomerGroupsProperty()\n {\n return CustomerGroup::get();\n }", "public function getCustomerGroupsProperty()\n {\n return CustomerGroup::get();\n }", "public function getGroupUsers() {\n\t\tif($this->role == \"group\") {\n\t\t\tif($this->_groupUsers !== null) {\n\t\t\t\treturn $this->_groupUsers;\n\t\t\t}\n\t\t\t$ug = new User\\Group;\n\t\t\t$users = $ug->find(array(\"group_id = ?\", $this->id));\n\t\t\t$user_ids = array();\n\t\t\tforeach($users as $user) {\n\t\t\t\t$user_ids[] = $user->user_id;\n\t\t\t}\n\t\t\treturn $this->_groupUsers = $user_ids ? $this->find(\"id IN (\" . implode(\",\", $user_ids) . \") AND deleted_date IS NULL\") : array();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function get_groups()\n {\n\n return $this->groups;\n }", "public static function getGroups()\n {\n return static::$groups;\n }", "public function getAllGroups(){\n return $this->securityDAO->getAllGroupsDAO();\n }", "protected function getCustomerGroups()\n {\n if ($user = app('auth')->user()) {\n return $user->groups->pluck('id')->toArray();\n } else {\n $defaultGroup = FetchDefaultCustomerGroup::run();\n\n return [$defaultGroup->id];\n }\n }", "public function getUserGroups()\r\n {\r\n if (!$this->_groups) {\r\n if (!isset($this->ldapData['memberof'])) {\r\n $cleanData = array();\r\n } else {\r\n $rawData = $this->ldapData['memberof'];\r\n $cleanData = array();\r\n foreach ($rawData as $value) {\r\n $array = explode(',', $value);\r\n $cleanData[] = array(\r\n 'group' => str_replace('CN=', '', $array[0])\r\n );\r\n }\r\n }\r\n $this->_groups = new WrsGroup_Model_RecordSet(\r\n $cleanData,\r\n 'WrsGroup_Model_Group'\r\n );\r\n }\r\n return $this->_groups;\r\n }", "public function getUsergroups()\n {\n $configs = $this->getAllConfigs();\n\n $group_ids = array();\n foreach($configs as $config)\n {\n $group_ids[] = $config->group_id;\n }\n\n\t\t$query = $this->_db->getQuery(true)\n ->select('a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level')\n ->from('#__usergroups AS a')\n ->leftJoin('#__usergroups AS b ON a.lft > b.lft AND a.rgt < b.rgt')\n ->where('a.id NOT IN ('.implode(',', $group_ids).')')\n ->group('a.id')\n ->order('a.lft ASC');\n\t\t$this->_db->setQuery($query);\n\n try\n {\n $options = $this->_db->loadObjectList();\n }\n catch(DatabaseException $e)\n {\n $this->setError($this->_db->getErrorMsg());\n\n return array();\n }\n\n foreach($options as $key => $option)\n {\n\t\t\t$option->text = str_repeat('- ', $option->level).$option->text;\n\t\t}\n\n return $options;\n }", "public function listUserGroups()\n {\n return $this->service->call(array(\n 'method' => 'glpi.listGroups',\n 'session' => $this->getSessionHash(),\n 'mine' => true\n ));\n }", "public function getGroupsAttribute()\n {\n if (! isset($this->attributes['groups'])) {\n $this->attributes['groups'] = $this->relations['groups'] = Group::query()->where('id', Group::GUEST_ID)->get();\n }\n\n return $this->attributes['groups'];\n }", "public function getGroups()\n {\n \tif ($this->databaseConnection()) {\n \t\t// database query, getting all the info of the selected user\n \t\t$query_groups = $this->db_connection->prepare('SELECT * FROM igi_groups');\n \t\t$query_groups->execute();\n \t\t// get result row (as an object)\n \t\treturn $query_groups->fetchAll(PDO::FETCH_ASSOC);\n \t} else {\n \t\treturn false;\n \t}\n }", "public function getGroups()\n {\n return craft()->categories->getEditableGroups();\n \n }", "public function getGroups(): ?array {\n\t\t$gt = ServiceManager::generalServiceManager()->get(UserGroupTool::SERVICE_NAME);\n\t\tif($gt instanceof UserGroupTool) {\n\t\t\tif($user = $this->getUser()) {\n\t\t\t\tif(method_exists($user, 'getId')) {\n\t\t\t\t\t$uid = $user->getId();\n\t\t\t\t\tfetch:\n\t\t\t\t\t$groups = [];\n\n\t\t\t\t\tforeach($this->PDO->select(\"SELECT groupid FROM SKY_USER_GROUP WHERE user = $uid\") as $record) {\n\t\t\t\t\t\tif($g = $gt->getGroup( $record['groupid'] ))\n\t\t\t\t\t\t\t$groups[$g->getId()] = $g;\n\t\t\t\t\t}\n\t\t\t\t\treturn $groups;\n\t\t\t\t} else {\n\t\t\t\t\t$uid = $this->PDO->selectFieldValue(\"SELECT id FROM SKY_USER WHERE username = ?\", 'id', [$user->getUsername()]) * 1;\n\t\t\t\t\tif($uid)\n\t\t\t\t\t\tgoto fetch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}", "public function getJoinedGroups(): ?array {\n $val = $this->getBackingStore()->get('joinedGroups');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, Group::class);\n /** @var array<Group>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'joinedGroups'\");\n }", "function groups() {\n\t\treturn (is_array($this->profil['groups'])) ? $this->profil['groups'] : false;\n\t}", "function getAdminGroups()\r\n\t{\r\n\t\t// Lets load the data if it doesn't already exist\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t\r\n\t\t$query = ' SELECT * '\r\n\t\t. ' FROM #__jevent_admin_usergroup ';\r\n\t\t\r\n\t\t$db->setQuery($query);\r\n\t\t$_data = $db->loadRowList();\r\n\t\treturn $_data;\t\r\n\t}", "function xarGetGroups() { return xarRoles::getgroups(); }" ]
[ "0.6234618", "0.6107756", "0.6000513", "0.5935096", "0.59174186", "0.5830103", "0.582348", "0.5807176", "0.5807176", "0.5807176", "0.5807176", "0.572316", "0.5700133", "0.5700133", "0.56615406", "0.5658625", "0.55399424", "0.5507448", "0.550178", "0.54795474", "0.54307437", "0.5429604", "0.5381406", "0.5381072", "0.5373886", "0.5365762", "0.5352391", "0.53482246", "0.5317573", "0.52979046" ]
0.68399864
0
Gets the calendars property value. The user's calendars. Readonly. Nullable.
public function getCalendars(): ?array { $val = $this->getBackingStore()->get('calendars'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Calendar::class); /** @var array<Calendar>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'calendars'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCalendars()\n\t{\n\t\tif (!$this->User->isAdmin && !is_array($this->User->calendars))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$arrForms = array();\n\t\t$objForms = $this->Database->execute(\"SELECT id, title FROM tl_calendar ORDER BY title\");\n\n\t\twhile ($objForms->next())\n\t\t{\n\t\t\tif ($this->User->isAdmin || in_array($objForms->id, $this->User->calendars))\n\t\t\t{\n\t\t\t\t$arrForms[$objForms->id] = $objForms->title;\n\t\t\t}\n\t\t}\n\t\treturn $arrForms;\n\t}", "public function listCalendars()\n {\n return $this->getCalendarService()->calendarList->listCalendarList();\n }", "public static function list() {\n $calendars = [];\n\n try {\n $service = CalendarService::instance();\n $results = $service->calendarList->listCalendarList();\n foreach ($results->getItems() as $item) {\n $calendars[base64_encode($item->getId())] = $item->getSummary();\n }\n }\n catch (\\Exception $e) {\n \\Drupal::messenger()->addWarning($e->getMessage());\n return FALSE;\n }\n\n return $calendars;\n }", "function list_cals()\n\t{\n\t\treturn self::list_calendars($GLOBALS['egw_info']['user']['account_id'], $this->grants);\n\t}", "public function getCalendarEvents(){\n $events = [];\n foreach($this->events as $event){\n $events[] = $event->getCalendarData();\n }\n return $events;\n }", "public function getCalendar() {\n $userID = Auth::id();\n $calendars = Calendar::where('userID', $userID)->get();\n\n $events = array();\n foreach ($calendars as $key => $calendar) {\n $eventID = $calendar->eventID;\n $event = Event::find($eventID);\n if(!empty($event)) {\n array_push($events, $event);\n }\n }\n if (count($events) == 0) {\n return Response::json([ 'error' => 'No events scheduled' ]);\n }\n return Response::json([ 'success' => $events ]);\n }", "public function hasCalendar() {\n \t$val = $this->cacheGetPlain('has_calendar');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('has_calendar', $this->getOffering()->hasCalendar());\n \telse\n \t\treturn $val;\n\t}", "public static function listSynced() {\n $config = \\Drupal::config(CalendarSettings::CONFIGNAME);\n\n $calendars = [];\n foreach ($config->get('synced_calendars') as $id => $data) {\n // Only use \"checked\" items.\n if ($id === $data) {\n $calendars[] = base64_decode($id);\n }\n }\n\n return $calendars;\n }", "public function get_google_calendars()\r\n {\r\n $calendarList = $this->service->calendarList->listCalendarList();\r\n $calendars = [];\r\n foreach ($calendarList->items as $google_calendar)\r\n {\r\n if ($google_calendar->getAccessRole() === 'reader')\r\n {\r\n continue;\r\n }\r\n\r\n $calendars[] = [\r\n 'id' => $google_calendar->id,\r\n 'summary' => $google_calendar->summary\r\n ];\r\n }\r\n return $calendars;\r\n }", "public function getCalendar()\n {\n $userID = Auth::id();\n // $userID = 1;\n $calendars = Calendar::where('userID', $userID)->get();\n\n $events = array();\n foreach ($calendars as $key => $calendar) {\n $eventID = $calendar->eventID;\n $event = Event::find($eventID);\n\n if (!empty($event)) {\n array_push($events, $event);\n }\n }\n\n if (count($events) == 0) {\n return Response::json(['error' => 'No events scheduled']);\n }\n return Response::json($events);\n }", "public function calendars()\n {\n return $this->hasMany('Calendar','school_id','id');\n }", "public function getCalendar() {\n \tif (!$this->hasCalendar())\n \t\tthrow new osid_IllegalStateException('hasCalendar() is false.');\n \t\n \treturn $this->getOffering()->getCalendar();\n\t}", "function getCalendar() {\n\n if (isset($this->fields['slas_ttr_id']) && $this->fields['slas_ttr_id'] > 0) {\n $slm = new SLM();\n if ($slm->getFromDB($this->fields['slas_ttr_id'])) {\n // not -1: calendar of the entity\n if ($slm->getField('calendars_id') >= 0) {\n return $slm->getField('calendars_id');\n }\n }\n }\n return parent::getCalendar();\n }", "public function getCalendarView(): ?array {\n $val = $this->getBackingStore()->get('calendarView');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, Event::class);\n /** @var array<Event>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'calendarView'\");\n }", "public function getCalendar(): ?Calendar {\n $val = $this->getBackingStore()->get('calendar');\n if (is_null($val) || $val instanceof Calendar) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'calendar'\");\n }", "public function getCalendar()\n\t{\n\t\treturn $this->findInfo('calendar/default');\n\t}", "public function getCalendarWorkDays ()\n {\n\n return $this->calendar_work_days;\n }", "public function index()\n {\n return auth()->user()->googleCalendars;\n }", "public function getCalendar()\n{\nreturn $this->calendar;\n}", "public function listCalendars($options = array(), $maxpages = 1)\n\t{\n\t\tif ($this->isAuthenticated())\n\t\t{\n\t\t\t$next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null;\n\t\t\tunset($options['nextPageToken']);\n\t\t\t$url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList?' . http_build_query($options);\n\n\t\t\treturn $this->listGetData($url, $maxpages, $next);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getCalendarId() {\n\t\treturn $this->calendarId; \n\t}", "protected function getCalList(Google_Service_Calendar $cal)\n {\n // Get list of owned calendars.\n $calList = $cal->calendarList->listCalendarList();\n $ownCals = array();\n foreach ($calList['items'] as $item) {\n if (trim($item['accessRole']) == 'owner') {\n $ownCals[] = $item['id'];\n }\n }\n // For now, just use the primary calendar.\n $ownCals = array('primary');\n\n return $ownCals;\n }", "public function setCalendars(?array $value): void {\n $this->getBackingStore()->set('calendars', $value);\n }", "public function getCalendarStatus ()\n {\n\n return $this->calendar_status;\n }", "private function getCalendars() {\n // connect to database\n $idcon = $this->getConnection();\n if ($this->error <> '') {\n return $this->error;\n }\n\n // execute query\n $sql = 'select * from '.$this->conf->dbprefix.'calendaris order by nom';\n $res = $idcon->query( $sql );\n \n // prepare result to return\n $ret = array();\n while($row = $res->fetch_assoc()) {\n $ret[] = $row;\n }\n\n // save query if debud mode is active\n if ($this->conf->debugMode) {\n $sql = \"insert into \".$this->conf->dbprefix.\"test (datea, dir, test) values ('\".date(\"Y-m-d H:i:s\").\"', 'out', '\".str_replace(\"'\", \"´\", json_encode($ret, JSON_UNESCAPED_UNICODE)).\"')\";\n $idcon->query( $sql );\n }\n \n // close connection\n $idcon->close(); \n \n return $ret;\n }", "public function calendar()\n\t{\n\t\treturn $this->belongsToOne(__NAMESPACE__ . '\\Calendar', 'calendar_id');\n\t}", "public function getCalendarGroups(): ?array {\n $val = $this->getBackingStore()->get('calendarGroups');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, CalendarGroup::class);\n /** @var array<CalendarGroup>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'calendarGroups'\");\n }", "public function calendariosEspe()\n {\n\t\treturn \\DB::table('calendars')\n ->join('tb_users', 'calendars.userid', '=', 'tb_users.id')\n ->select('tb_users.first_name', 'tb_users.id')\n ->get();\n }", "public function getSyncCalendar(): ?bool {\n $val = $this->getBackingStore()->get('syncCalendar');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'syncCalendar'\");\n }", "public function getCalendarSyncEnabled()\n {\n if (array_key_exists(\"calendarSyncEnabled\", $this->_propDict)) {\n return $this->_propDict[\"calendarSyncEnabled\"];\n } else {\n return null;\n }\n }" ]
[ "0.6471271", "0.6286332", "0.61500734", "0.6085926", "0.5879104", "0.5789726", "0.5767148", "0.5716303", "0.5677698", "0.565196", "0.56465393", "0.56194687", "0.5602547", "0.55590683", "0.55538815", "0.55343574", "0.5531208", "0.5528451", "0.55141604", "0.5486081", "0.5423293", "0.53964466", "0.53696513", "0.5350157", "0.53308064", "0.5304952", "0.5299197", "0.5256316", "0.5249547", "0.5220667" ]
0.7011929
0
Gets the calendarView property value. The calendar view for the calendar. Readonly. Nullable.
public function getCalendarView(): ?array { $val = $this->getBackingStore()->get('calendarView'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Event::class); /** @var array<Event>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'calendarView'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCalendarId() {\n\t\treturn $this->calendarId; \n\t}", "public function getCalendar() {\n \tif (!$this->hasCalendar())\n \t\tthrow new osid_IllegalStateException('hasCalendar() is false.');\n \t\n \treturn $this->getOffering()->getCalendar();\n\t}", "public function getCalendar()\n{\nreturn $this->calendar;\n}", "public function getCalendar(){\n return view('fullcalendar');\n }", "public function getCalendar()\n\t{\n\t\treturn $this->findInfo('calendar/default');\n\t}", "public function getCalendarId() {\n \tif (!$this->hasCalendar())\n \t\tthrow new osid_IllegalStateException('hasCalendar() is false.');\n \t\n \t$val = $this->cacheGetObj('schedule_info');\n \tif (is_null($val))\n \t\treturn $this->cacheSetObj('schedule_info', $this->getOffering()->getScheduleInfo());\n \telse\n \t\treturn $val;\n\t}", "public function printCalendar() {\n return $this->calendar;\n }", "public function getCalendarName ()\n {\n\n return $this->calendar_name;\n }", "public function calendar()\n\t{\n\t\treturn $this->belongsToOne(__NAMESPACE__ . '\\Calendar', 'calendar_id');\n\t}", "public function hasCalendar() {\n \t$val = $this->cacheGetPlain('has_calendar');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('has_calendar', $this->getOffering()->hasCalendar());\n \telse\n \t\treturn $val;\n\t}", "public function get_calendar_name()\n {\n return $this->calendar_name;\n }", "public function getCalendarStatus ()\n {\n\n return $this->calendar_status;\n }", "public function getViewId()\n {\n if (!$this->isPropertyAvailable(\"ViewId\")) {\n return null;\n }\n return $this->getProperty(\"ViewId\");\n }", "public function getCalendarDescription ()\n {\n\n return $this->calendar_description;\n }", "public function getCalendarUid ()\n {\n\n return $this->calendar_uid;\n }", "public function getCalendarEventId()\n {\n return $this->calendar_event_id;\n }", "public function getCalendar(): ?Calendar {\n $val = $this->getBackingStore()->get('calendar');\n if (is_null($val) || $val instanceof Calendar) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'calendar'\");\n }", "public function get_view(){\n\t\treturn $this->view;\n\t}", "protected function getViewMode() {\n if ($this->useDisplay()) {\n return $this->traitGetViewMode();\n }\n return $this->getFieldDefinition()->getAdditionalValue('view_mode');\n }", "function getViewVar() {\n return $this->viewVar;\n }", "public function getByPosition ($pos)\n {\n switch ($pos) {\n case 0:\n return $this->getCalendarUid ();\n break;\n case 1:\n return $this->getCalendarName ();\n break;\n case 2:\n return $this->getCalendarCreateDate ();\n break;\n case 3:\n return $this->getCalendarUpdateDate ();\n break;\n case 4:\n return $this->getCalendarWorkDays ();\n break;\n case 5:\n return $this->getCalendarDescription ();\n break;\n case 6:\n return $this->getCalendarStatus ();\n break;\n default:\n return null;\n break;\n } // switch()\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "protected function getView()\n {\n return $this->view;\n }", "protected function setCalendarDefaultView($view)\n {\n $allowed = ['day','week', 'month'];\n\n if(!in_array($view, $allowed)){\n $this->errors = ['tipo' => $this->typeError[6], 'bad' => $view, 'permitidos' => $allowed];\n }\n\n $this->defaultCalendarView = $view;\n }", "public function getView() {\n return $this->view;\n }", "public function getView()\n {\n if ($this->view === null) {\n $this->setView(self::getDefaultView());\n }\n\n return $this->view;\n }", "public function getView() {\n\t\treturn $this->_view;\n\t}", "function hook_date_ical_feed_ical_vcalendar_render_alter(&$vcalendar, $view) {\n\n}", "public function getView()\n {\n if ($this->_view === null) {\n $this->setView();\n }\n\n return $this->_view;\n }" ]
[ "0.5734966", "0.56155354", "0.5557739", "0.5505606", "0.5502398", "0.5397787", "0.5356723", "0.53537846", "0.5348357", "0.5317057", "0.5308565", "0.5289419", "0.52087533", "0.52073836", "0.5178807", "0.51769066", "0.5171425", "0.5113397", "0.506336", "0.50417733", "0.5015632", "0.5008513", "0.5008513", "0.49986088", "0.49978256", "0.49908304", "0.4985002", "0.49809337", "0.49760857", "0.49569574" ]
0.6179571
0
Gets the chats property value. The chats property
public function getChats(): ?array { $val = $this->getBackingStore()->get('chats'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Chat::class); /** @var array<Chat>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'chats'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChat()\n {\n return $this->chat;\n }", "public static function getChats() {\n $em = dbconnection::getInstance()->getEntityManager() ;\n $chatRepository = $em->getRepository('chat');\n $chats = $chatRepository->findAll();\n\n return $chats;\n\n }", "public function chats()\n {\n return $this->hasMany(Chat::class);\n }", "public function getChatId(){\n return $this->chatID;\n }", "public function getThreats()\n {\n if (!$this->isPropertyAvailable(\"Threats\")) {\n return null;\n }\n return $this->getProperty(\"Threats\");\n }", "public function chats(): object\n {\n $params = array(\n 'request' => '/chat',\n 'payload' => '',\n 'method' => 'GET'\n );\n\n return $this->request($params);\n }", "public static function getChatsWith()\n\t{\n return SQL::exec('SELECT sender_id,receiver_id FROM chat WHERE sender_id=? OR receiver_id=? ORDER BY id DESC', [session::isAuthorized(),session::isAuthorized()], SQL::FETCHALL);\n\t}", "public function getChatId()\n {\n return $this->chatId;\n }", "public function getChanInfo()\n {\n return $this->chan_info;\n }", "public function getUsers()\n\t{\n\t\treturn $this->chatUsers;\n\t}", "public function getChassi()\n {\n return $this->chassi;\n }", "public function getChatId()\n\t{\n\t\treturn $this->chatId;\n\t}", "public function getChatUrl() {\n\t\treturn $this->chat_url ?: $this->channel->getChatUrl($this);\n\t}", "public function getChannelsUpdate()\n {\n return $this->channels_update;\n }", "public function getChatForUser() {\n $currentUser = $this->getAuthenticatedUser();\n $chats = Chat::getFromUser($currentUser);\n return parent::response([\n 'success' => true,\n 'chats' => $chats\n ]);\n }", "public function getInChat(): bool {\r\n return $this->inChat;\r\n }", "function get_chats($chatlength=null) {\n\t$chatlength = positive_int($chatlength); // Prevent negatives.\n\t$limit = ($chatlength ? 'LIMIT :limit' : '');\n\t$bindings = array();\n\tif ($limit) {\n\t $bindings[':limit'] = $chatlength;\n\t}\n\n\t$chats = query_resultset(\"SELECT sender_id, uname, message, date, age(now(), date) AS ago FROM chat\n JOIN players ON chat.sender_id = player_id ORDER BY chat_id DESC \".$limit, $bindings);\n\n\treturn $chats;\n}", "public function getChat()\n {\n return $this->hasOne(Chat::className(), ['id' => 'chat_id'])\n ->viaTable(ChatMember::tableName(), ['id' => 'member_id']);\n }", "public function getChannels()\n {\n return $this->channels;\n }", "function get_chat_count() {\n\treturn query_item(\"SELECT count(*) FROM chat\");\n}", "public function getTeamChatMessages()\n {\n if (array_key_exists(\"teamChatMessages\", $this->_propDict)) {\n return $this->_propDict[\"teamChatMessages\"];\n } else {\n return null;\n }\n }", "public function getChannel()\n {\n return $this->getRelationValue('channel');\n }", "public function getCounterChatMember()\n {\n return $this->hasOne(ChatMember::className(), ['id' => 'member_id']);\n }", "public function isAvailableToChat()\n\t{\n\t \treturn $this->chatstatus;\n\t}", "public function getChannel()\n {\n $value = $this->get(self::CHANNEL);\n return $value === null ? (integer)$value : $value;\n }", "public function getChannel()\n\t\t{\n\t\t\treturn $this->getAttribute(\"channel_id\");\n\t\t}", "function get_channel_info() {\n\t\treturn $this->feed->channel;\n\t}", "public function getChat($name)\n {\n return $this->getElement(\"Chat\", $name);\n }", "public function setChats(?array $value): void {\n $this->getBackingStore()->set('chats', $value);\n }", "public function getChair()\n\t{\n\t return $this->chair;\n\t}" ]
[ "0.69292885", "0.6588425", "0.63116634", "0.6117602", "0.6065907", "0.6024697", "0.5992841", "0.5905433", "0.5897997", "0.5880583", "0.5864118", "0.5781298", "0.56595963", "0.5634693", "0.55946225", "0.5594327", "0.5553829", "0.55425006", "0.5502935", "0.54410785", "0.5430834", "0.53699243", "0.53559816", "0.53267074", "0.5284859", "0.5268685", "0.525536", "0.5222161", "0.52136356", "0.51897246" ]
0.6600258
1
Gets the cloudPCs property value. The cloudPCs property
public function getCloudPCs(): ?array { $val = $this->getBackingStore()->get('cloudPCs'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, CloudPC::class); /** @var array<CloudPC>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'cloudPCs'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCloudiness()\n {\n return $this->cloudiness;\n }", "public function getSkCpns()\n {\n return $this->sk_cpns;\n }", "public function getCloudProvisioningScore()\n {\n if (array_key_exists(\"cloudProvisioningScore\", $this->_propDict)) {\n return $this->_propDict[\"cloudProvisioningScore\"];\n } else {\n return null;\n }\n }", "public function getPcDifusion(){\n\t\treturn $this->pc_difusion;\n\t}", "function getCloud()\n {\n $cloud = $this->model->getElementsByTagName('cloud');\n if ($cloud->length == 0) {\n return false;\n }\n $cloudData = array();\n foreach ($cloud->item(0)->attributes as $attribute) {\n $cloudData[$attribute->name] = $attribute->value;\n }\n return $cloudData;\n }", "public function getCtps()\n {\n return $this->ctps;\n }", "public function setCloudPCs(?array $value): void {\n $this->getBackingStore()->set('cloudPCs', $value);\n }", "public function getCp()\n {\n return $this->cp;\n }", "public function getCloudManagementScore()\n {\n if (array_key_exists(\"cloudManagementScore\", $this->_propDict)) {\n return $this->_propDict[\"cloudManagementScore\"];\n } else {\n return null;\n }\n }", "public function getCPF()\n {\n return $this->cPF;\n }", "public function getCPF()\n {\n return $this->cPF;\n }", "public function getPrecioCat()\n {\n return $this->precioCat;\n }", "public function getIgnoredPCCs()\n {\n return isset($this->IgnoredPCCs) ? $this->IgnoredPCCs : null;\n }", "public function getIpiCNPJProd()\n {\n return $this->ipi_CNPJProd;\n }", "public function getCve()\n {\n if (array_key_exists(\"cve\", $this->_propDict)) {\n return $this->_propDict[\"cve\"];\n } else {\n return null;\n }\n }", "public function getCloudIdentityScore()\n {\n if (array_key_exists(\"cloudIdentityScore\", $this->_propDict)) {\n return $this->_propDict[\"cloudIdentityScore\"];\n } else {\n return null;\n }\n }", "public function getCofinsPCOFINS()\n {\n return $this->cofins_pCOFINS;\n }", "public function cnrps()\n{\nreturn $this->cnrps;\n}", "public function getPricedEquips()\n {\n return $this->pricedEquips;\n }", "public function getSC(){\n\t\treturn $this->sc;\n\t}", "public function getCstPIS()\n {\n return $this->cstPIS;\n }", "public function getCIPBankAccountStored()\n {\n return $this->cIPBankAccountStored;\n }", "public function getEnhancedCpc()\n {\n return $this->readOneof(7);\n }", "public function valuesC()\n {\n return $this->valuesComp;\n }", "public function getCumProvCp(): ?float {\n return $this->cumProvCp;\n }", "public function getAverageCpcMicros()\n {\n return isset($this->average_cpc_micros) ? $this->average_cpc_micros : 0;\n }", "public function getCpf()\r\n {\r\n return $this->cpf;\r\n }", "public function getCpf()\n {\n return $this->cpf;\n }", "public function getCpf()\n {\n return $this->cpf;\n }", "public function getCpf()\n {\n return $this->cpf;\n }" ]
[ "0.6228458", "0.6063653", "0.58498657", "0.57381195", "0.5723649", "0.57153094", "0.569361", "0.5660943", "0.5652504", "0.5497851", "0.5497851", "0.54963106", "0.54778916", "0.5450838", "0.5447744", "0.5416301", "0.534009", "0.5307472", "0.529442", "0.5288088", "0.52646077", "0.5261266", "0.52589786", "0.52445436", "0.5213156", "0.5187896", "0.51802516", "0.51799965", "0.51799965", "0.51799965" ]
0.69639856
0
Gets the cloudRealtimeCommunicationInfo property value. Microsoft realtime communication information related to the user. Supports $filter (eq, ne,not).
public function getCloudRealtimeCommunicationInfo(): ?CloudRealtimeCommunicationInfo { $val = $this->getBackingStore()->get('cloudRealtimeCommunicationInfo'); if (is_null($val) || $val instanceof CloudRealtimeCommunicationInfo) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'cloudRealtimeCommunicationInfo'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCloudRealtimeCommunicationInfo(?CloudRealtimeCommunicationInfo $value): void {\n $this->getBackingStore()->set('cloudRealtimeCommunicationInfo', $value);\n }", "public function communications()\n {\n return $this->hasMany(UserCommunication::class);\n }", "public function getContact() {\n\t\t$rule = new Intra_Filter();\n\t\t$rule->whereIn('c_id', $this->get('c_id'));\n\t\t$rule->whereRecordlist('p_class', 'Contact');\n\t\treturn Person::load($rule)->current();\n\t}", "public function getContact() {\n $sql = \"SELECT\tuser.username, user.userID, user.userOnlineGroupID, wcf\".WCF_N.\"_group.userOnlineMarking\n FROM\t\twcf\".WCF_N.\"_user user\n LEFT JOIN wcf\".WCF_N.\"_group\n ON (wcf\".WCF_N.\"_group.groupID=user.userOnlineGroupID)\n WHERE user.userID=\".$this->event['contacts'];\n $this->contact = WCF::getDB()->getFirstRow($sql, Database::SQL_ASSOC);\n }", "public function routeNotificationForFcm()\n {\n return $this->devices()->where('is_login', '1')->pluck('reg_id')->toArray() ?: 'user123';\n }", "public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }", "public static function get_user_connections(){\n\n\t\t$user = wp_get_current_user();\n\t\t$res = get_user_meta(\n\t\t\t$user->ID, \n\t\t\tAPI_Con_Model::$meta_keys['user_connections'],\n\t\t\ttrue\n\t\t);\n\n\t\tif ( !$res )\n\t\t\treturn array();\n\t\treturn $res;\n\t}", "public function getNotificationChannels()\n {\n return $this->notification_channels;\n }", "public function getOtherChannelsVisible();", "public function getContactInformation();", "public function getOtherChannels();", "public function getMembershipReceiving()\n {\n return $this->membershipReceiving;\n }", "public function getContactInfo() {\n $sql = \"SELECT * FROM contact_info, users where users.uid=contact_info.userid ORDER BY date_create DESC limit 1\";\n \n return $this->query($sql);\n }", "public function getCorreo(){\n\t\treturn $this->correo;\n\t}", "private function active_telecom_api() {\n $this->CI->load->model('cm_model');\n return $this->CI->cm_model->get_active_telecom_api();\n }", "public function npCommunicationId() : string\n {\n return $this->npCommuncationId;\n\t}", "public function communicationId() : string\n {\n return $this->trophyInfo()->npCommunicationId ?? '';\n }", "public function getCorreo()\n {\n return $this->correo;\n }", "public function getCorreo()\n {\n return $this->correo;\n }", "public function getCorreo()\n {\n return $this->correo;\n }", "public function getCorreo()\n {\n return $this->correo;\n }", "public function getCorreo()\r\n {\r\n return $this->correo;\r\n }", "public function getConfessionMessage()\n {\n return [\n 'data'=>$this->RedisService->getRedislpushMessage('DynamicConfession')\n ];\n }", "public function getLiveSyncableData()\n\t{\n\t\treturn $this->filterSyncableData($this->getLiveSyncableRows());\n\t}", "public function getConNotification() {\n\t\tif ($this->_conNotification == NULL) {\n\t\t\t$this->setConNotification();\n\t\t}\n\t\treturn $this->_conNotification;\n\t}", "public function getNotificationDetails()\n {\n $whereArray = [];\n\n $notificationId = $this->request->input(\"notification_id\");\n if ($notificationId) {\n $whereArray[] = [\"notification_id\", '=', $notificationId];\n }\n\n $this->notificationModel->setWhere($whereArray);\n $details = $this->notificationModel->getOrderByData(\"notification_id\");\n\n return $details;\n }", "public function getChat()\n {\n return $this->chat;\n }", "function userNotification()\n {\n // notifications Details\n $notification = DB::table('user_notifications')->where('user_id',auth()->user()->id)->where('is_read',0)->get();\n if (!empty($notification)) {\n return $notification;\n }\n }", "function getNotificationInfo()\n {\n return $this->_notificationInfo; \n }", "public function getUserInfo()\r\n {\r\n return $this->userInfo;\r\n }" ]
[ "0.5253621", "0.48092902", "0.45978993", "0.45554575", "0.45522842", "0.45411047", "0.4509326", "0.4502265", "0.44977817", "0.44830576", "0.44792727", "0.44790328", "0.44703668", "0.44658238", "0.44608206", "0.4454471", "0.44450134", "0.44324294", "0.44324294", "0.44324294", "0.44324294", "0.4422988", "0.44220376", "0.4420734", "0.44167313", "0.44108838", "0.44008684", "0.4372768", "0.43617418", "0.4357135" ]
0.6280453
0
Gets the consentProvidedForMinor property value. Sets whether consent has been obtained for minors. Allowed values: null, Granted, Denied and NotRequired. Refer to the legal age group property definitions for further information. Supports $filter (eq, ne, not, and in).
public function getConsentProvidedForMinor(): ?string { $val = $this->getBackingStore()->get('consentProvidedForMinor'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'consentProvidedForMinor'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConsentProvidedForMinor(?string $value): void {\n $this->getBackingStore()->set('consentProvidedForMinor', $value);\n }", "public function getShouldCaptureMinorVersion()\n {\n if (array_key_exists(\"shouldCaptureMinorVersion\", $this->_propDict)) {\n return $this->_propDict[\"shouldCaptureMinorVersion\"];\n } else {\n return null;\n }\n }", "public function getMinor()\n {\n return $this->get(self::MINOR);\n }", "function GetMinor() {\n\treturn $this->minor_step;\n }", "public function setShouldCaptureMinorVersion($val)\n {\n $this->_propDict[\"shouldCaptureMinorVersion\"] = boolval($val);\n return $this;\n }", "public function getLimitedWarrantyEligible()\n {\n return $this->limitedWarrantyEligible;\n }", "public function getProvided()\n {\n return $this->provided;\n }", "public function getDisableBuyerRequirements()\n {\n return $this->disableBuyerRequirements;\n }", "public function getFeatureEligibility()\n {\n return $this->featureEligibility;\n }", "public function setMinor($value)\n {\n return $this->set(self::MINOR, $value);\n }", "public function getMinorVersion()\n {\n return (int)(string)$this['MinorVersion'];\n }", "public function getGradeable() {\n return $this->gradeable;\n }", "public function getGradeable() {\n return $this->gradeable;\n }", "private function get_garment_criteria_reason($garment_id, $field_id, $user_specs_str, $score, $is_admin = FALSE){\n\t\t$this->db->select($user_specs_str);\n\t\t$query = $this->db->get_where('garment_specs', array('garment_id' => $garment_id, 'field_id' => $field_id));\n\t\t$result = $query->row_array();\n\t\t$min = array();\n\t\tforeach ($result as $key => $value) {\n\t\t\tif ($value == $score) {\n\t\t\t\t$min[] = $key;\n\t\t\t}\n\t\t}\n\t\t$this->db->select('Desc, Column')->from('taiccol_w08')->where_in('Column', $min);\n\t\t$query = $this->db->get();\n\t\t$reasons = array();\n\t\tforeach ($query->result() as $row){\n\t\t\tif ($is_admin){\n\t\t\t\t$reasons[] = $row->Desc.'('.$row->Column.')';\n\t\t\t} else {\n\t\t\t\t$reasons[] = $row->Desc;\n\t\t\t}\n\t\t}\n\t\t$result = implode(', ', $reasons);\n\t\treturn $result;\n\t}", "public function setProvided($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->provided = $arr;\n\n return $this;\n }", "public function getQuantityRestrictionPerBuyer()\n {\n return $this->quantityRestrictionPerBuyer;\n }", "public function getEBayPlusEligible()\n {\n return $this->eBayPlusEligible;\n }", "public function getContributor()\n {\n return $this->contributor;\n }", "public function getContributor()\n {\n return $this->contributor;\n }", "public function getSellereBayPaymentProcessConsent()\n {\n return $this->sellereBayPaymentProcessConsent;\n }", "public function getQualifiesForB2BVAT()\n {\n return $this->qualifiesForB2BVAT;\n }", "public function getBuyerAssignable()\n {\n if (is_null($this->buyerAssignable)) {\n /** @psalm-var ?bool $data */\n $data = $this->raw(self::FIELD_BUYER_ASSIGNABLE);\n if (is_null($data)) {\n return null;\n }\n $this->buyerAssignable = (bool) $data;\n }\n\n return $this->buyerAssignable;\n }", "public function getContributor() {\n return $this->contributor;\n }", "public function suggestedMaxAge($suggestedMaxAge)\n {\n return $this->setProperty('suggestedMaxAge', $suggestedMaxAge);\n }", "public function getMinorVersion();", "public function getSponsorEligibility($coId) {\n return $this->lookupValue($coId, 'sponsor_eligibility');\n }", "public function areClientsLimitedToGrants()\r\n {\r\n return $this->limitClientsToGrants;\r\n }", "public function getApiVersionMinor()\r\n {\r\n $version = explode('.', $this->getApiVersion(), 4);\r\n\r\n return $version[1];\r\n }", "public function has_final_grade()\n {\n return true;\n }", "public function getBuyerRequirementDetails()\n {\n return $this->buyerRequirementDetails;\n }" ]
[ "0.6005068", "0.554978", "0.4776029", "0.4522242", "0.44726667", "0.43916395", "0.4327734", "0.4284107", "0.42361787", "0.4217634", "0.42131332", "0.4198163", "0.4198163", "0.41774505", "0.41470373", "0.414163", "0.4124565", "0.40963224", "0.40963224", "0.4094286", "0.40922776", "0.40734893", "0.40626755", "0.40610942", "0.4059844", "0.40460315", "0.40216887", "0.40206498", "0.40178126", "0.4015959" ]
0.5890766
1
Gets the contactFolders property value. The user's contacts folders. Readonly. Nullable.
public function getContactFolders(): ?array { $val = $this->getBackingStore()->get('contactFolders'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, ContactFolder::class); /** @var array<ContactFolder>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'contactFolders'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMailFolders(): ?array {\n $val = $this->getBackingStore()->get('mailFolders');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, MailFolder::class);\n /** @var array<MailFolder>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mailFolders'\");\n }", "public function GetFolderList() {\n\t\t$folders = array();\n\t\t$folder = $this->StatFolder(BackendGoConfig::CONTACTBACKENDFOLDER);\n\t\t$folders[] = $folder;\n\n\t\treturn $folders;\n\t}", "public static function getFolders() {\n\t\t$folders = self::getDefaultFolders();\n\t\t$folders += self::getUserFolders();\n\t\t\n\t\treturn $folders;\n\t}", "public function setContactFolders(?array $value): void {\n $this->getBackingStore()->set('contactFolders', $value);\n }", "public static function getUserFolders() {\n\t\t$folders = array();\n\t\t\n\t\t// user folders\n\t\t$sql = \"SELECT\t\t*\n\t\t\tFROM \t\twcf\".WCF_N.\"_pm_folder\n\t\t\tWHERE \t\tuserID = \".WCF::getUser()->userID.\"\n\t\t\tORDER BY \tfolderName\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$row['icon'] = 'pmFolder'.ucfirst($row['color']).'M.png';\n\t\t\t$row['iconLarge'] = 'pmFolder'.ucfirst($row['color']).'L.png';\n\t\t\t$row['messages'] = 0;\n\t\t\t$row['unreadMessages'] = 0;\n\t\t\t\n\t\t\t$folders[$row['folderID']] = $row;\n\t\t}\n\t\t\n\t\treturn $folders;\n\t}", "public function getFolders() \n {\n return $this->folders;\n }", "public function getUserContacts()\n {\n return [];\n }", "public function getContacts(): ?Model\\Contact\n {\n return $this->contacts;\n }", "public function getUserContacts();", "public function getContacts() {\n\t\treturn $this->contacts;\n\t}", "public function getContacts() {\n return $this->contacts;\n }", "public function getContacts(): ?array {\n $val = $this->getBackingStore()->get('contacts');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, Contact::class);\n /** @var array<Contact>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'contacts'\");\n }", "public function getContacts()\n {\n return $this->contacts;\n }", "public function GetSearchFolders(){\r\n\t\treturn $this->_searchFolders;\r\n\t}", "public function getContacts (){\n\t \t$this->CreateWLLConfig();\n \tif (!empty($this->Contacts)) {\n \t\treturn $this->Contacts;\n \t} else {\n\t \tif ($this->checkGMail()) $this->fetchGMailContacts();\n\t\t\tif ($this->checkWLL()) $this->fetchWLContacts();\n \t\tif ($this->checkYahoo()) $this->fetchYahooContacts();\n \t}\n \treturn $this->Contacts;\n \t}", "public function getContacts() \n {\n return $this->contacts;\n }", "public function getFolders() {\n return $this->folderItemList;\n }", "public function GetFolderList()\n\t{\n\t\tif (!isset($this->calendar)) $this->calendar = new calendar_boupdate();\n\n\t\t$cals = $GLOBALS['egw_info']['user']['preferences']['activesync']['calendar-cals'];\n\t\t$cals = $cals ? explode(',',$cals) : array('P');\t// implicit default of 'P'\n\t\t$folderlist = array();\n\n\t\tforeach ($this->calendar->list_cals() as $entry)\n\t\t{\n\t\t\t$account_id = $entry['grantor'];\n\t\t\t$label = $entry['name'];\n\t\t\tif (in_array('A',$cals) || in_array($account_id,$cals) ||\n\t\t\t\t$account_id == $GLOBALS['egw_info']['user']['account_id'] ||\t// always incl. own calendar!\n\t\t\t\t$account_id == $GLOBALS['egw_info']['user']['account_primary_group'] && in_array('G',$cals))\n\t\t\t{\n\t\t\t\t$folderlist[] = $f = array(\n\t\t\t\t\t'id'\t=>\t$this->backend->createID('calendar',$account_id),\n\t\t\t\t\t'mod'\t=>\t$GLOBALS['egw']->accounts->id2name($account_id,'account_fullname'),\n\t\t\t\t\t'parent'=>\t'0',\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t\t//error_log(__METHOD__.\"() returning \".array2string($folderlist));\n\t\tdebugLog(__METHOD__.\"() returning \".array2string($folderlist));\n\t\treturn $folderlist;\n\t}", "public function getContactList()\n {\n return $this->contactList;\n }", "public function folders()\n {\n return $this->belongsToMany('App\\Models\\Folder', 'user_folder');\n }", "function getUserContacts() {\n\t\t$params = array(\n\t\t 'fields' => implode(',', $this->fields),\n\t\t);\n\n\t\t$response = $this->api->api('friends.get', 'GET', $params);\n\n\t\tif (empty($response) || empty($response->response)) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$contacts = array();\n\t\tforeach ($response->response as $item) {\n\t\t\t$contacts[] = $this->getUserByResponse($item);\n\t\t}\n\n\t\treturn $contacts;\n\t}", "function getUserContacts()\n\t{ \n\t\t// refresh tokens if needed \n\t\t$this->refreshToken(); \n\n\t\tif( ! isset( $this->config['contacts_param'] ) ){\n\t\t\t$this->config['contacts_param'] = array( \"max-results\" => 500 );\n\t\t}\n\n\t\t$response = $this->api->api( \"https://www.google.com/m8/feeds/contacts/default/full?\" \n\t\t\t\t\t\t\t. http_build_query( array_merge( array('alt' => 'json'), $this->config['contacts_param'] ) ) ); \n\n\t\tif( ! $response ){\n\t\t\treturn ARRAY();\n\t\t}\n \n\t\t$contacts = ARRAY(); \n\n\t\tforeach( $response->feed->entry as $idx => $entry ){\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->email = isset($entry->{'gd$email'}[0]->address) ? (string) $entry->{'gd$email'}[0]->address : ''; \n\t\t\t$uc->displayName = isset($entry->title->{'$t'}) ? (string) $entry->title->{'$t'} : ''; \n\t\t\t$uc->identifier = $uc->email;\n\n\t\t\t$contacts[] = $uc;\n\t\t} \n\n\t\treturn $contacts;\n \t}", "function getUserContacts()\n\t{\n\t\t$response = $this->api->get('statuses/friends.json');\n\t\t\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( 'User contacts request failed! ' . $this->providerId . ' returned an error: ' . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t}\n\n\t\tif ( !$response ) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$contacts = array();\n\t\t\n\t\tforeach( $response as $item ) {\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->identifier = @ $item->id;\n\t\t\t$uc->displayName = @ $item->name;\n\t\t\t$uc->profileURL = 'http://murmur.tw/' . $response->screen_name;\n\t\t\t$uc->photoURL = @ $item->profile_image_url;\n\n\t\t\t$contacts[] = $uc;\n\t\t}\n\t\t\n\t\treturn $contacts;\n\t}", "public function getSyncContacts(): ?bool {\n $val = $this->getBackingStore()->get('syncContacts');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'syncContacts'\");\n }", "public function getFoldersFirst()\n {\n return $this->foldersFirst;\n }", "public function getSettingsUserCategories()\n {\n if (isset($this->_settingsUserCategories))\n {\n return $this->_settingsUserCategories;\n }\n\n return false;\n }", "public static function get_user_contacts_count($userobject = null) {\n global $USER, $DB, $CFG;\n if (!$userobject) {\n $userobject = $USER;\n }\n\n $userblogcount = count($DB->get_records('message_contacts', array('userid' => $userobject->id)));\n\n return $userblogcount;\n }", "public static function get_user_contacts_count($userobject = null)\n {\n global $USER, $DB, $CFG;\n if (!$userobject) {\n $userobject = $USER;\n }\n\n $userblogcount = count($DB->get_records('message_contacts', array('userid'=>$userobject->id)));\n\n return $userblogcount;\n }", "private function getContactsFromFolder($store, $folderEntryid, $email) {\n $folder = mapi_msgstore_openentry($store, $folderEntryid);\n $folderContent = mapi_folder_getcontentstable($folder);\n mapi_table_restrict($folderContent, MAPIUtils::GetEmailAddressRestriction($store, $email));\n // TODO max limit\n if (mapi_table_getrowcount($folderContent) > 0) {\n return mapi_table_queryallrows($folderContent, array(PR_DISPLAY_NAME, PR_USER_X509_CERTIFICATE, PR_ENTRYID));\n }\n return false;\n }", "public function getFolders() {\n\t\treturn $this->getChildren(false, true);\n\t}" ]
[ "0.58334696", "0.563415", "0.5616905", "0.5504393", "0.5481255", "0.54381", "0.53444284", "0.5322325", "0.53037745", "0.526944", "0.5237589", "0.5226355", "0.5212109", "0.5197393", "0.51823854", "0.51587987", "0.51221883", "0.50617754", "0.5041739", "0.49772334", "0.4961175", "0.4957302", "0.49382326", "0.483257", "0.48281795", "0.47749722", "0.47715512", "0.4766349", "0.4760148", "0.47574025" ]
0.7235486
0
Gets the createdObjects property value. Directory objects that were created by the user. Readonly. Nullable.
public function getCreatedObjects(): ?array { $val = $this->getBackingStore()->get('createdObjects'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, DirectoryObject::class); /** @var array<DirectoryObject>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'createdObjects'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilesCreated()\n {\n return $this->filesCreated;\n }", "public function getOwnedObjects(): ?array {\n $val = $this->getBackingStore()->get('ownedObjects');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DirectoryObject::class);\n /** @var array<DirectoryObject>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'ownedObjects'\");\n }", "public function getObjects(): ?array\n {\n return $this->objects;\n }", "function getObjects()\n {\n return $this->_storage->getObjects();\n }", "public static function getObjects() {\n return self::$myObjects;\n }", "function listObjects()\n {\n return $this->_storage->listObjects();\n }", "public function getObjectsWritten()\r\n\t{\r\n\t\treturn $this->_qb_objects;\r\n\t}", "public function getLdapObjects(): ?LdapRecordCollection\n {\n return $this->objects;\n }", "public function getOwnedDevices(): ?array {\n $val = $this->getBackingStore()->get('ownedDevices');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DirectoryObject::class);\n /** @var array<DirectoryObject>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'ownedDevices'\");\n }", "public function getObjectsIds(): array\n {\n return $this->objectsIds;\n }", "public function getUserCreated()\n {\n return $this->user_created;\n }", "public function getCreated()\n {\n return $this->object()->getCreated();\n }", "public function get_objects()\n {\n return $this->_objects;\n }", "public function getTimestampedObjects()\n {\n return $this->timestamped_objects;\n }", "public function getConnectedUsers()\n {\n return [];\n }", "function getCreateDirectories() {\n\t\t$directories = parent::getCreateDirectories();\n\t\t$directories[] = 'journals';\n\t\treturn $directories;\n\t}", "public function getOwnerTokens() : ?array\n {\n return $this->ownerTokens;\n }", "public function getDirectories()\n {\n return $this->dirs;\n }", "function getDistinctUsers() {\n $users = array();\n $repository_users = db_execute(\"SELECT DISTINCT created_by_name FROM \".TABLE_PREFIX.\"project_objects WHERE parent_id = \".$this->getId().\" ORDER BY created_by_name ASC\");\n if (is_foreachable($repository_users)) {\n foreach ($repository_users as $repository_user) {\n \t$users[] = $repository_user['created_by_name'];\n } // foreach\n } // if\n \n return $users;\n }", "public function getObjectsIndex()\n {\n return $this->objects;\n }", "public function finals() {\n return $this->dirArray;\n }", "function allowedUsers(): object\n {\n //Get current subscription\n $website = app(Environment::class)->tenant();\n $subscription = latestCustomerSubscription($website, ['plan.feature']);\n\n //Users number\n $allowed = $subscription->additional_users + $subscription->plan->feature->users;\n $used = User::all()->count();\n\n return (object) [\n 'allowed' => $allowed,\n 'used' => $used,\n 'left' => $allowed - $used\n ];\n }", "function user_name_array() {\n\t$user_dirs = @scandir(LIBRESIGNAGE_ROOT.USER_DATA_DIR);\n\tif ($user_dirs === FALSE) {\n\t\tthrow new IntException('scandir() on users dir failed.');\n\t}\n\t$user_dirs = array_diff($user_dirs, ['.', '..']);\n\tforeach ($user_dirs as $k => $d) {\n\t\tif (!user_exists($d)) { $user_dirs[$k] = NULL; }\n\t}\n\treturn array_values(array_diff($user_dirs, array(NULL)));\n}", "public static function getAdminUsers()\n\t{\n\t\treturn \\App\\Fields\\Owner::getInstance()->getUsers(false, 'Active', false, false, true);\n\t}", "public function getUsers() {\n\t\tif (is_array($this->deletedUsers)) {\n\t\t\treturn $this->deletedUsers;\n\t\t}\n\t\treturn $this->fetchDeletedUsers();\n\t}", "public function getRegisteredDevices(): ?array {\n $val = $this->getBackingStore()->get('registeredDevices');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DirectoryObject::class);\n /** @var array<DirectoryObject>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'registeredDevices'\");\n }", "public function getDirectories()\n {\n return $this->directories;\n }", "public function getRelatedObjectsToPersist(&$objects = []) \n {\n return [];\n }", "public function getRelatedObjectsToPersist(&$objects = []) \n {\n return [];\n }", "public function getCreated() {\n\t\treturn $this->created;\n\t}" ]
[ "0.5953334", "0.5825028", "0.5740845", "0.5394223", "0.5366432", "0.53638744", "0.5239296", "0.52381927", "0.5208504", "0.51824534", "0.50986975", "0.5067914", "0.50614524", "0.50499374", "0.50277114", "0.5003788", "0.49390435", "0.49037", "0.4860484", "0.4846205", "0.48360536", "0.48313624", "0.48309848", "0.48173466", "0.48172152", "0.47979474", "0.47928208", "0.4790169", "0.4790169", "0.47799817" ]
0.7005731
0
Gets the customSecurityAttributes property value. An open complex type that holds the value of a custom security attribute that is assigned to a directory object. Nullable. Returned only on $select. Supports $filter (eq, ne, not, startsWith). Filter value is case sensitive.
public function getCustomSecurityAttributes(): ?CustomSecurityAttributeValue { $val = $this->getBackingStore()->get('customSecurityAttributes'); if (is_null($val) || $val instanceof CustomSecurityAttributeValue) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'customSecurityAttributes'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSecurityAttributes() {\n\t\treturn $this->_attributes;\n\t}", "public function getCustomAttributes()\n {\n return $this->custom_attributes;\n }", "public function getCustomAttributesValueAttribute()\n {\n $typeValue = ucfirst($this->type_value);\n $methodAttribute = \"productValue{$typeValue}Attribute\";\n switch ($this->type_value) {\n case CustomAttributeConfig::REFERENCE_CUSTOM_ATTRIBUTE_TYPE_VALUE_STRING:\n return (!empty($this->$methodAttribute()) ? $this->$methodAttribute() : null);\n break;\n case CustomAttributeConfig::REFERENCE_CUSTOM_ATTRIBUTE_TYPE_VALUE_NUMBER:\n return null;\n break;\n case CustomAttributeConfig::REFERENCE_CUSTOM_ATTRIBUTE_TYPE_VALUE_DATE:\n return null;\n break;\n case CustomAttributeConfig::REFERENCE_CUSTOM_ATTRIBUTE_TYPE_VALUE_OPTION:\n return null;\n break;\n }\n }", "public function getCustom() {\n return $this->_custom;\n }", "public function getCustom()\n {\n return $this->custom;\n }", "public function getCustom()\n {\n return $this->custom;\n }", "public function getCustom()\n {\n return $this->custom;\n }", "public function getSecuritySettings()\n {\n return $this->security_settings;\n }", "public function setCustomSecurityAttributes(?CustomSecurityAttributeValue $value): void {\n $this->getBackingStore()->set('customSecurityAttributes', $value);\n }", "public function getAllCustomAttributes()\n {\n return $this->customAttributes;\n }", "public function getSecurity() {\n return $this->security;\n }", "public function getUserAttributeValues()\n {\n if (array_key_exists(\"userAttributeValues\", $this->_propDict)) {\n return $this->_propDict[\"userAttributeValues\"];\n } else {\n return null;\n }\n }", "public function getSecurity()\n {\n return $this->security;\n }", "public function getSecurity()\n {\n return $this->security;\n }", "public function getCustomCustomerAttributes()\n {\n $attributes['prefered_language'] = array(\n 'label' => 'Prefered Language',\n 'type' => 'varchar',\n 'input' => 'select',\n 'source' => 'clever_language/customer_attribute_source_stores',\n 'required' => 0,\n 'used_in_forms' => array(\n 'customer_account_edit',\n 'adminhtml_customer'\n ),\n );\n\n return $attributes;\n }", "public static function allowedAttributes()\r\n\t{\r\n\t\tif (!is_array(self::$attributes))\r\n\t\t{\r\n\t\t\t$attributes = array_merge(Config::get('attributes.event.standard', []), Config::get('attributes.standard', []));\r\n\r\n\t\t\tif (isset(self::$localAttributes))\r\n\t\t\t{\r\n\t\t\t\tforeach (self::$localAttributes as $attr)\r\n\t\t\t\t{\r\n\t\t\t\t\t$attributes = array_merge($attributes, Config::get(\"attributes.$attr\", []));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tself::$attributes = $attributes;\r\n\t\t}\r\n\r\n\t\treturn self::$attributes;\t\t\r\n\t}", "public function getCustom(): mixed\n {\n return $this->config->getCustom();\n }", "public function getCustom20(){\n return $this->_dataArray[ProspectProps::CUSTOM_20];\n }", "public function get_custom_values()\n\t{\n\t\treturn $this->_custom_types;\n\t}", "public function getConfigurableAttributes();", "public function getJWTCustomClaims()\n {\n $this->claims['series'] = $this->series;\n return $this->claims;\n }", "public function getDisplayableAttributes();", "public function getCustomCategory()\n {\n return $this->customCategory;\n }", "public function getSecurityInformation();", "protected function _getFilterableAttributes()\n {\n \t$res = Mage::registry('ea_result');\n \tif ($res != null){\n\t $attributes = $this->getData('_filterable_attributes');\n\t if (is_null($attributes)) {\n\t $attributes = $this->getLayer()->getFilterableAttributes();\n\t $this->setData('_filterable_attributes', $attributes);\n\t }\n\t\n\t return $attributes;\n \t} else {\n \t\treturn parent::_getFilterableAttributes();\n \t}\n }", "public function getCustomAttributeValue($attribute)\n {\n if (! $attribute) {\n return;\n }\n\n $attributeValue = $this->attribute_values()->where('tutor_agreement_attribute_id', $attribute->id)->first();\n\n\n return $attributeValue[TutorAgreementAttributeValue::$attributeTypeFields[$attribute->type]] ?? null;\n }", "public static function getFilterableAttributes(): array;", "public function getJWTCustomClaims()\n\t{\n\t\treturn [];\n\t}", "public function getJWTCustomClaims()\n {\n\n return [\n 'is_setup' => $this->company_id != null,\n ];\n }", "public function getAttributesWithFriendlyName()\n {\n return $this->auth->getAttributesWithFriendlyName();\n }" ]
[ "0.59229743", "0.56192917", "0.53624976", "0.5352673", "0.52978754", "0.52978754", "0.52978754", "0.5248199", "0.5236389", "0.5166082", "0.5143982", "0.5123748", "0.5104152", "0.5104152", "0.5081217", "0.4889777", "0.48850977", "0.48839018", "0.4868843", "0.48004514", "0.47988942", "0.47960576", "0.4792243", "0.476168", "0.4740838", "0.47354677", "0.47212607", "0.47210735", "0.469191", "0.46616504" ]
0.6736237
0
Gets the deviceEnrollmentConfigurations property value. Get enrollment configurations targeted to the user
public function getDeviceEnrollmentConfigurations(): ?array { $val = $this->getBackingStore()->get('deviceEnrollmentConfigurations'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, DeviceEnrollmentConfiguration::class); /** @var array<DeviceEnrollmentConfiguration>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'deviceEnrollmentConfigurations'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deviceEnrollmentConfigurations(): DeviceEnrollmentConfigurationsRequestBuilder {\n return new DeviceEnrollmentConfigurationsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function getConfigurations()\n {\n return $this->configurations;\n }", "public function listManagedconfigurationsforuser($enterpriseId, $userId, $optParams = [])\n {\n $params = ['enterpriseId' => $enterpriseId, 'userId' => $userId];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ManagedConfigurationsForUserListResponse::class);\n }", "public function getConfigurations()\n {\n return $this->searchConfigurations;\n }", "public function getMobileAppConfigurations(): ?array {\n $val = $this->getBackingStore()->get('mobileAppConfigurations');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedDeviceMobileAppConfiguration::class);\n /** @var array<ManagedDeviceMobileAppConfiguration>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mobileAppConfigurations'\");\n }", "public function getConfiguration() {\n if ($this->configuration == null) {\n $this->configuration = $this->_processConfigurationArray();\n }\n\n return $this->configuration;\n }", "public function getConfigArray()\n\t{\n\t\t\n\t\tif ( $this->isSuperUser() )\n\t\t\treturn $this->configuration->getConfig();\n\t\tthrow new DBWRAPPERINIT(\"Only administrator are allowed to do this operation\", 152);\n\t\t\n\t}", "public function getConfigValues() {\n\t\treturn $this->config_values;\n\t}", "public function setDeviceEnrollmentConfigurations(?array $value): void {\n $this->getBackingStore()->set('deviceEnrollmentConfigurations', $value);\n }", "public static function getEducationOptions()\n {\n return self::$educationOptions;\n }", "public function getTargetedManagedAppConfigurations(): ?array {\n $val = $this->getBackingStore()->get('targetedManagedAppConfigurations');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, TargetedManagedAppConfiguration::class);\n /** @var array<TargetedManagedAppConfiguration>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'targetedManagedAppConfigurations'\");\n }", "private function loadConfig()\n {\n return $this->getContext()->invokeApiGet('SHOW_USER_CONFIG', ['user' => $this->getUsername()]);\n }", "public function getManagedDevices()\n {\n if (array_key_exists(\"managedDevices\", $this->_propDict)) {\n return $this->_propDict[\"managedDevices\"];\n } else {\n return null;\n }\n }", "public function getEmailUserConfig() \n {\n return $this->emailConfig;\n }", "public function deviceConfigurations(): DeviceConfigurationsRequestBuilder {\n return new DeviceConfigurationsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function getConfig()\n\t{\n\t\tif( isset( $this->values['product.config'] ) ) {\n\t\t\treturn (array) $this->values['product.config'];\n\t\t}\n\n\t\treturn [];\n\t}", "public function listInspectorConfigurations()\n {\n return [];\n }", "public function getConfigs() {\r\n return $this->configs;\r\n }", "public function getConfigs()\n {\n return $this->_configs;\n }", "protected function load_configuration()\n {\n $l_data = [];\n\n $l_result = end($this->m_dao->get_configuration(null, ['id' => $this->m_entity]));\n if ($l_result === false)\n {\n return null;\n } //if\n\n $l_data[isys_jdisc_dao::C__CONFIGURATION] = $l_result;\n\n return $l_data;\n }", "public function getConfiguration()\r\n\t{\r\n\t\treturn $this->registerers;\r\n\t}", "public function sections()\n\t{\n\t\treturn $this->_config;\n\t}", "public function getDeviceProperties() {\n if ($this->deviceProp == null) {\n $this->deviceProp = DeviceProperties::load($this->deviceId);\n }\n return $this->deviceProp;\n }", "public function getConfiguration()\n {\n return $this->delegate->getConfiguration();\n }", "protected function getConfig()\n {\n return $this->app['config']->all();\n }", "public function appConfigurationAction()\n {\n // try to get logged in user\n $communityUser = $this->communityUserService->getCommunityUser();\n $appConfiguration = array();\n $appConfiguration['results']['PushChannels'] = array();\n foreach ($this->settings['pushChannels'] as $key => $pushChannel) {\n $appConfiguration['results']['PushChannels']['Channel' . $key] = $pushChannel;\n }\n if ($communityUser instanceof CommunityUser) {\n $appConfiguration['results']['token'] = $communityUser->getAuthToken();\n $appConfiguration['results']['PushChannels']['Channel0'] = 'userid_' . $communityUser->getUid();\n }\n return json_encode($appConfiguration);\n }", "public function getEventsConfig()\n {\n return $this->eventsConfig;\n }", "public function getConfiguration(): array\n {\n $configMap = [];\n\n if ($this->getOAuthCredentials()->getOAuthClientId() !== null) {\n $configMap['oAuthClientId'] = $this->getOAuthCredentials()->getOAuthClientId();\n }\n if ($this->getOAuthCredentials()->getOAuthClientSecret() !== null) {\n $configMap['oAuthClientSecret'] = $this->getOAuthCredentials()->getOAuthClientSecret();\n }\n if ($this->getOAuthCredentials()->getOAuthToken() !== null) {\n $configMap['oAuthToken'] = clone $this->getOAuthCredentials()->getOAuthToken();\n }\n if (isset($this->timeout)) {\n $configMap['timeout'] = $this->timeout;\n }\n if (isset($this->environment)) {\n $configMap['environment'] = $this->environment;\n }\n\n return $configMap;\n }", "public function getAllProfiles()\n {\n if (!empty($this->configuration)) {\n if (is_array($this->configuration)) {\n return $this->configuration;\n }\n try {\n $profiles = unserialize($this->configuration);\n return $profiles;\n } catch (Exception $e) {\n }\n }\n return $this->defaultProfiles();\n }", "public function getAppConfiguration() {\n return CoreFunctions::getInstance()->getAppConfiguration();\n }" ]
[ "0.6108437", "0.57580125", "0.5262348", "0.51564485", "0.5081908", "0.49438316", "0.4889117", "0.48801976", "0.48655736", "0.48449028", "0.48231488", "0.48220402", "0.47781232", "0.47770336", "0.475374", "0.47458205", "0.47128528", "0.4693852", "0.4681173", "0.4668188", "0.4660663", "0.4644845", "0.4638855", "0.46339542", "0.463368", "0.46306247", "0.46281376", "0.46246698", "0.462308", "0.4619535" ]
0.6544835
0
Gets the deviceEnrollmentLimit property value. The limit on the maximum number of devices that the user is permitted to enroll. Allowed values are 5 or 1000.
public function getDeviceEnrollmentLimit(): ?int { $val = $this->getBackingStore()->get('deviceEnrollmentLimit'); if (is_null($val) || is_int($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'deviceEnrollmentLimit'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDeviceEnrollmentLimit(?int $value): void {\n $this->getBackingStore()->set('deviceEnrollmentLimit', $value);\n }", "public function getCustomerUsageLimit();", "public function getMaximumAttendeeCapacity(): ?int;", "public function getAccountLimit()\n {\n return $this->accountLimit;\n }", "public function getUsageLimit();", "public function getDataLimit()\n {\n return $this->data_limit;\n }", "public function getMaximumAllowedDeviceThreatLevel()\n {\n if (array_key_exists(\"maximumAllowedDeviceThreatLevel\", $this->_propDict)) {\n if (is_a($this->_propDict[\"maximumAllowedDeviceThreatLevel\"], \"\\Beta\\Microsoft\\Graph\\Model\\ManagedAppDeviceThreatLevel\") || is_null($this->_propDict[\"maximumAllowedDeviceThreatLevel\"])) {\n return $this->_propDict[\"maximumAllowedDeviceThreatLevel\"];\n } else {\n $this->_propDict[\"maximumAllowedDeviceThreatLevel\"] = new ManagedAppDeviceThreatLevel($this->_propDict[\"maximumAllowedDeviceThreatLevel\"]);\n return $this->_propDict[\"maximumAllowedDeviceThreatLevel\"];\n }\n }\n return null;\n }", "public function getLimit() {\r\n\t\treturn $this->limit;\r\n\t}", "public function getLimit() {\n return $this->limit;\n }", "public function getLimit() {\n return $this->limit;\n }", "public function getLimit() {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->config()->get('limit');\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function get_job_listing_limit() {\n\t\treturn $this->get_product_meta( 'job_listing_limit' );\n\t}", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n\t{\n\t\treturn $this->limit;\n\t}", "public function getLimit()\n\t{\n\t return $this->limit;\n\t}", "public function getLimitProduct()\n {\n return (int)$this->getConfigData(self::LIMIT_PRODUCT);\n }", "public function getMaxRoomCount()\n {\n return $this->maxRoomCount;\n }" ]
[ "0.63286465", "0.56970197", "0.55687046", "0.5553812", "0.55110776", "0.50939786", "0.5057572", "0.50515974", "0.50469625", "0.50469625", "0.50469625", "0.50363106", "0.5022542", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.50055647", "0.49806982", "0.49723375", "0.496817", "0.4959236", "0.49569225", "0.49345523" ]
0.6478761
0
Gets the deviceManagementTroubleshootingEvents property value. The list of troubleshooting events for this user.
public function getDeviceManagementTroubleshootingEvents(): ?array { $val = $this->getBackingStore()->get('deviceManagementTroubleshootingEvents'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, DeviceManagementTroubleshootingEvent::class); /** @var array<DeviceManagementTroubleshootingEvent>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'deviceManagementTroubleshootingEvents'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMobileAppTroubleshootingEvents(): ?array {\n $val = $this->getBackingStore()->get('mobileAppTroubleshootingEvents');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, MobileAppTroubleshootingEvent::class);\n /** @var array<MobileAppTroubleshootingEvent>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mobileAppTroubleshootingEvents'\");\n }", "public function setDeviceManagementTroubleshootingEvents(?array $value): void {\n $this->getBackingStore()->set('deviceManagementTroubleshootingEvents', $value);\n }", "public function get_events() {\n if ( empty( self::$instance->events ) && isset ( self::$instance->eb_sdk->client ) ) {\n self::$instance->events = self::$instance->eb_sdk->client->get('/users/me/events');\n self::$instance->events = self::$instance->events[ 'events' ];\n }\n\n return self::$instance->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents() {\n return $this->events;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getEventTypeAllowableValues();\n if (!is_null($this->container['event_type']) && !in_array($this->container['event_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'event_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "public function inErrors()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_IN_ERRORS );\n }", "public function events()\n {\n return $this->events;\n }", "public function events()\n {\n return $this->events;\n }", "public function events() {\n if (empty($this->info)) {\n $this->refreshInfo();\n }\n return !empty($this->info['events']) ? $this->info['events'] : array();\n }", "public function events()\n\t{\n\t\treturn $this->events;\n\t}", "public function events()\n\t{\n\t\treturn $this->events;\n\t}", "public function setMobileAppTroubleshootingEvents(?array $value): void {\n $this->getBackingStore()->set('mobileAppTroubleshootingEvents', $value);\n }", "public function outErrors()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_OUT_ERRORS );\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getEventTypeAllowableValues();\n if (!is_null($this->container['eventType']) && !in_array($this->container['eventType'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'eventType', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] > 20000)) {\n $invalidProperties[] = \"invalid value for 'pageSize', must be smaller than or equal to 20000.\";\n }\n\n if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] < 1)) {\n $invalidProperties[] = \"invalid value for 'pageSize', must be bigger than or equal to 1.\";\n }\n\n if (!is_null($this->container['pageNr']) && ($this->container['pageNr'] > 2147483647)) {\n $invalidProperties[] = \"invalid value for 'pageNr', must be smaller than or equal to 2147483647.\";\n }\n\n if (!is_null($this->container['pageNr']) && ($this->container['pageNr'] < 1)) {\n $invalidProperties[] = \"invalid value for 'pageNr', must be bigger than or equal to 1.\";\n }\n\n return $invalidProperties;\n }", "public function getEvents()\n {\n return array_merge(\n $this->helper->getSessionEvents(),\n $this->dataModel->getEvents()\n );\n }", "public function events()\n {\n return $this->morphedByMany(Event::class, 'notificationable');\n }", "public function getEvents() {\n\t\tif( ! $this->token ) {\n\t\t\tthrow new Exception( \"No token\" );\n\t\t}\n\t\ttry {\n\t\t\t$result = $this->callGet( rocksOauth::URL_EVENTS );\n\t\t\tif( $result->{'status'} === \"unauthorized\" ) {\n\t\t\t\tthrow new Exception( $result->{'message'} );\n\t\t\t} else {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getDebtRecoveryEventList()\n {\n if ($this->_fields['DebtRecoveryEventList']['FieldValue'] == null)\n {\n $this->_fields['DebtRecoveryEventList']['FieldValue'] = array();\n }\n return $this->_fields['DebtRecoveryEventList']['FieldValue'];\n }", "public function getEvents()\r\n\t\t{\r\n\t\t\t$events = array();\r\n\t\t\tforeach ($this->days as $day)\r\n\t\t\t\t$events[] = $day->getEvent();\r\n\t\t\treturn $events;\r\n\t\t}", "function events() { return $this->get('events'); }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n $allowedValues = $this->getAlarmTypeAllowableValues();\r\n if (!is_null($this->container['alarmType']) && !in_array($this->container['alarmType'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'alarmType', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n return $invalidProperties;\r\n }", "public function getErrorMessages(){\r\n\t\treturn implode('|', $this->_errorMessages);\r\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['lifecycleHookName']) && (mb_strlen($this->container['lifecycleHookName']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'lifecycleHookName', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['lifecycleHookName']) && (mb_strlen($this->container['lifecycleHookName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'lifecycleHookName', the character length must be bigger than or equal to 1.\";\r\n }\r\n $allowedValues = $this->getLifecycleHookTypeAllowableValues();\r\n if (!is_null($this->container['lifecycleHookType']) && !in_array($this->container['lifecycleHookType'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'lifecycleHookType', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n $allowedValues = $this->getDefaultResultAllowableValues();\r\n if (!is_null($this->container['defaultResult']) && !in_array($this->container['defaultResult'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'defaultResult', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['defaultTimeout']) && ($this->container['defaultTimeout'] > 86400)) {\r\n $invalidProperties[] = \"invalid value for 'defaultTimeout', must be smaller than or equal to 86400.\";\r\n }\r\n if (!is_null($this->container['defaultTimeout']) && ($this->container['defaultTimeout'] < 60)) {\r\n $invalidProperties[] = \"invalid value for 'defaultTimeout', must be bigger than or equal to 60.\";\r\n }\r\n if (!is_null($this->container['notificationTopicName']) && (mb_strlen($this->container['notificationTopicName']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'notificationTopicName', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['notificationTopicName']) && (mb_strlen($this->container['notificationTopicName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'notificationTopicName', the character length must be bigger than or equal to 1.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function getExceptions()\n {\n return $this->exceptions;\n }", "public function check()\r\n {\r\n return $this->getScheduledEvents();\r\n }", "public static function getEventIdList()\n\t{\n\t\treturn array(\n\t\t\tself::EVENT_ID_WIKI\n\t\t);\n\t}", "public function events()\n {\n return $this->hasMany(\\App\\Models\\Event::class, 'user_id');\n }" ]
[ "0.633609", "0.5415556", "0.5135238", "0.505129", "0.505129", "0.505129", "0.5051154", "0.50270295", "0.5011735", "0.500161", "0.500161", "0.49713075", "0.49034727", "0.49034727", "0.48783928", "0.48761338", "0.48611903", "0.4728193", "0.47161707", "0.47011462", "0.46666083", "0.46299312", "0.46203142", "0.46097866", "0.46068993", "0.4595299", "0.45816386", "0.4581205", "0.45796886", "0.45770246" ]
0.66641283
0
Gets the directReports property value. The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Readonly. Nullable. Supports $expand.
public function getDirectReports(): ?array { $val = $this->getBackingStore()->get('directReports'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, DirectoryObject::class); /** @var array<DirectoryObject>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'directReports'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIncidentReportsFiled()\r\n {\r\n return $this->_incidentReportsFiled;\r\n }", "public function reports()\n {\n return $this->hasMany(Report::class, 'user_id');\n }", "public function getReports()\n {\n return $this->hasMany(Report::className(), ['doctor_id' => 'doctor_id']);\n }", "public function getReports()\n {\n return $this->reportRepo->getReport();\n }", "public function getReports()\r\n {\r\n if( empty($this->loginTokens) )\r\n {\r\n trigger_error( \"BlackBerryStats::getReports(): Login tokens are empty. Login first!\" );\r\n return;\r\n }\r\n\r\n $response = $this->reqReports();\r\n $result = $this->reqReportsResult($response);\r\n\r\n return $result;\r\n }", "public function view_reports(User $user){\n $is_report_owner = is_null(WorkshopReport::where('owner_user_id',$user->id)->select('id')->first())?false:true;\n// $has_report_perm = is_null(ModulePermission::where('user_id',$user->id)->where('permission','report')->select('id')->first())?false:true;\n $has_permission = is_null(WorkshopReport::whereJsonContains('permissions',$user->id)->select('id')->first())?false:true;\n if(in_array('run_workshop_reports',$user->user_permissions)\n || in_array('manage_workshop_reports',$user->user_permissions)\n || $is_report_owner\n || $has_permission\n// || $has_report_perm\n ){\n return true;\n }\n }", "public function downloadReport()\n {\n return $this->userRepository->makeReport();\n }", "public function getReports();", "protected function getReportData() {\n \t//We extract just the login types from the central list in Reports::Logic\n\t\t// Note that those login types do not currently include Airpass, which is v1 only\n \t$validLoginTypes = array_keys(Reports::loginTypes);\n\n\t\t// We want all logins within the reporting period where the user is active\n\t\t$loginTypes = User::select('site', \\DB::raw('COUNT(distinct user.id) as typeCount'), 'user_attribute.name AS type')\n\t\t\t->join('user_attribute', 'user_attribute.ids', '=', 'user.id')\n\t\t\t->whereIn('user.site', $this->childrenIds)\n\t\t\t->whereBetween('user.created', $this->fromTo)\n\t\t\t->where('user.status', '=', self::USER_STATUS_ACTIVE)\n\t\t\t->whereIn('user_attribute.name', $validLoginTypes)\n\t\t\t->groupBy('site')\n\t\t\t->orderBy('user_attribute.name', 'desc')\n\t\t\t->get()\n\t\t\t->toArray();\n\n\t\tif(!empty($loginTypes))\n\t\t\treturn $this->setAirpassToEmail($loginTypes);\n\t\telse\n\t\t\treturn [];\n }", "public function getAllReports()\n {\n return $this->console['reports'];\n }", "public function getRelatedReports()\n {\n return array();\n }", "function admin_userReports()\n\t{\n\t\t$this->User->recursive = 0;\n\t\t$rol = $this->data['User']['role_id'];\t\n\t\tforeach($this->data['User'] as $indice =>$valor)\n\t\t{\n\t\t\tif($valor==1)\n\t\t\t{\n\t\t\t\t$array[] = $indice;\n\t\t\t}\n\t\t}\n\t\t$reporte = $this->User->find('all', array('fields'=>$array,'conditions'=>array('User.role_id'=>$rol)));\n\t\t$this->set(compact('reporte'));\n\t}", "public function reports()\n {\n $reports = Reports::join('users', 'users.id', '=', 'reports.assigned_doctor_id')->orderBy('reports.id', 'DESC')->paginate(5);\n\n $data =\n [\n 'reports' => $reports\n ];\n\n return view('frontend.management.all-reports', $data);\n }", "public function reports()\n\t{\n\t\treturn $this->hasMany('App\\Report');\n\t}", "public function getReport()\n {\n return $this->report;\n }", "public function getReport()\n {\n return $this->report;\n }", "public function reports()\n {\n return $this->morphMany(Report::class, 'reported');\n }", "public function ScriptReports()\n\t{\n\t\treturn $this->hasOne('App\\Models\\ScriptReport','user_id','id');\n\t}", "public function getReport(): ActiveQuery {\n\t\treturn $this->hasOne(LeadReport::class, ['id' => 'report_id']);\n\t}", "public function getConsultantData()\n {\n return $this->consultant_data;\n }", "public function getUserReport($report_id, $user_id){\n\t\t$sql = \"SELECT t1.*, t2.firstname, t2.surname, t2.email\n\t\t\t\tFROM user_reports t1\n\t\t\t\t\tLEFT JOIN users t2 ON t1.user_id = t2.id\n\t\t\t\tWHERE t1.report_id = :report_id AND t1.user_id = :user_id\n\t\t\t\tGROUP BY t1.user_id\n\t\t\t\t\";\n\t\treturn $this->_db->select($sql, array(':report_id' => $report_id, ':user_id' => $user_id));\n\t}", "public function getFieldReport()\n {\n return $this->fieldReport;\n }", "public function referral_reports()\n {\n return $this->hasMany(config('inventory.aircon'));\n }", "function get_myreports($userid = 0)\n{\n $myreports_s = get_user_meta($userid, 'myreports');\n\n if ($myreports_s == null) {\n $myreports = array();\n } else {\n $myreports = unserialize($myreports_s);\n }\n\n return $myreports;\n}", "public function hasCurrentUserReportsPermission() {\t\t$arr_orgus_perm_empl = ilObjOrgUnitTree::_getInstance()->getOrgusWhereUserHasPermissionForOperation('view_learning_progress');\n\t\tif (count($arr_orgus_perm_empl) > 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\t//Reporting Access Rec?\n\t\t$arr_orgus_perm_sup = ilObjOrgUnitTree::_getInstance()->getOrgusWhereUserHasPermissionForOperation('view_learning_progress_rec');\n\t\tif (count($arr_orgus_perm_sup) > 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$global_roles = $this->rbacreview->assignedGlobalRoles($this->usr->getId());\n\t\t//Administrator\n\t\tif (in_array(2, $global_roles)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getDirectReferrals()\n {\n return $this->getObject('com://site/rewardlabs.model.accounts')->sponsor_id($this->id)->fetch();\n }", "public function getTransitiveReports(): ?array {\n $val = $this->getBackingStore()->get('transitiveReports');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DirectoryObject::class);\n /** @var array<DirectoryObject>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'transitiveReports'\");\n }", "public function report():Array {\n\n\t\treturn $this->report;\n\n\t}", "public function getAllReports()\n {\n return $this->getEntityManager()->createQuery('SELECT r FROM addventure\\Report r')->getResult();\n }", "public function getReport()\n {\n return $this->hasOne(Report::className(), ['reportId' => 'reportId']);\n }" ]
[ "0.6094618", "0.5905663", "0.5838814", "0.5629922", "0.5445938", "0.5438547", "0.5428859", "0.54147667", "0.54081887", "0.53613615", "0.53598344", "0.5294666", "0.52581626", "0.5236042", "0.52215207", "0.52215207", "0.5218337", "0.52074313", "0.5198543", "0.51873285", "0.51668584", "0.5156508", "0.51202744", "0.51004416", "0.5097336", "0.5077179", "0.5069434", "0.5047701", "0.5047591", "0.5044167" ]
0.64879954
0
Gets the drive property value. The user's OneDrive. Readonly.
public function getDrive(): ?Drive { $val = $this->getBackingStore()->get('drive'); if (is_null($val) || $val instanceof Drive) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'drive'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDriveWheelConfiguration() {\n\t\treturn $this->driveWheelConfiguration;\n\t}", "public function getPref()\n {\n return $this->pref;\n }", "public function getDirectivo( ){\n\t\treturn $this->directivo;\n\t}", "public function personal()\n {\n return $this->getClient()->getPersonal();\n }", "public function getDrivingLicence()\n {\n return $this->drivingLicence;\n }", "public function getMaxWarpDrive(): int\n {\n if (!$this->ship->hasShipSystem(ShipSystemTypeEnum::SYSTEM_WARPDRIVE)) {\n return $this->maxwd;\n }\n\n return (int) (ceil($this->maxwd\n * $this->ship->getShipSystem(ShipSystemTypeEnum::SYSTEM_WARPDRIVE)->getStatus() / 100));\n }", "public function getFieldPref()\n\t{\n\t\treturn $this->fieldpref;\n\t}", "public function getPerfil() {\r\n return $this->global->Perfil;\r\n }", "final public function get_wd()\n {\n return $this->wd;\n }", "public function getWd() {\n return $this->get(self::WD);\n }", "public function getWd() {\n return $this->get(self::WD);\n }", "public function setDrive(?Drive $value): void {\n $this->getBackingStore()->set('drive', $value);\n }", "public function getPersonal()\n {\n return $this->personal;\n }", "public function getPersonal()\n\t{\n\t\treturn $this->personal;\n\t}", "public function getDevice()\n {\n $value = $this->get(self::DEVICE);\n return $value === null ? (string)$value : $value;\n }", "public function get_folder()\n {\n return $this->folder;\n }", "function getPerfil() {\n return $this->perfil;\n }", "public function getProperty();", "public function getProperty();", "public function getDrive($params, $context)\n {\n $this->validateMethodContext($context, [\"role\" => OMV_ROLE_ADMINISTRATOR]);\n // Validate the parameters of the RPC service method.\n $this->validateMethodParams($params, \"rpc.common.objectuuid\");\n // Get the configuration object.\n $db = \\OMV\\Config\\Database::getInstance();\n return $db->getAssoc(\"conf.service.snapraid.drive\", $params['uuid']);\n }", "protected function getDisk()\n {\n return $this->disk;\n }", "public function getUserProperty()\n {\n return Auth::user();\n }", "public function getDevice() : string\n {\n return $this->device;\n }", "public function getValue()\n\t{\n\t\t$session = One_Repository::getSession();\n\t\tif($session->varExists('usedSearchOptions', 'one_search')) {\n\t\t\t$cx = new One_Context($session->get('usedSearchOptions', 'one_search'));\n\t\t}\n\t\telse {\n\t\t\t$cx = new One_Context();\n\t\t}\n\t\t$name = $this->getName();\n\t\t$value = $cx->get( $name );\n\n\t\tif( !is_null( $value ) )\n\t\t{\n\t\t\treturn trim( $value );\n\t\t}\n\t\telse\n\t\t\treturn NULL;\n\t}", "public function getPlatform() \n {\n return $this->_fields['Platform']['FieldValue'];\n }", "public function getPerfil(){\n\n\t\treturn $this->perfil;\n\n }", "function get_user_setting()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER_SETTING);\r\n }", "public function getClePortable() {\n return $this->clePortable;\n }", "public function getAccessToken()\n {\n return $this->getProperty('access_token');\n }", "public function disk()\n {\n return $this->getDisk();\n }" ]
[ "0.5284514", "0.5243188", "0.52208644", "0.5126436", "0.50936335", "0.5018632", "0.50147396", "0.50102574", "0.50029105", "0.4982411", "0.4982411", "0.49693385", "0.49150178", "0.48987544", "0.48917222", "0.48639748", "0.48593736", "0.48518482", "0.48518482", "0.48468336", "0.48436588", "0.48355824", "0.48113617", "0.48071656", "0.48045835", "0.48031875", "0.47727826", "0.47667712", "0.47656122", "0.47655746" ]
0.631565
0
Gets the drives property value. A collection of drives available for this user. Readonly.
public function getDrives(): ?array { $val = $this->getBackingStore()->get('drives'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Drive::class); /** @var array<Drive>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'drives'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDisks()\n {\n return $this->disks;\n }", "public function getVolumes()\n {\n return $this->volumes;\n }", "public function getDirectories()\n {\n return $this->dirs;\n }", "public function getBackupVolumes(): array {\n return $this->backupVolumes;\n }", "public function getDirectories()\n {\n return $this->directories;\n }", "public function getDirectories()\n\t{\n\t\treturn $this->_directories;\n\t}", "function system_drives()\n{\n\t$drives = array();\n\tfor ($ii = 66; $ii < 92; $ii++) \n\t{\n\t\t$char = chr($ii);\n\t\tif (is_dir($char.\":/\"))\n\t\t\t$drives[] = strtolower($char) .':';\n\t}\n\t\n\treturn $drives;\n}", "public static function getDirectories()\n {\n return static::$directories;\n }", "function gmirror_get_disks() {\n\t$disklist = \"\";\n\t/* Get a list of disks in a scriptable way, exclude optical drives */\n\texec(\"/sbin/geom disk status -s | /usr/bin/grep -v '[[:blank:]]*cd[[:digit:]]*' | /usr/bin/awk '{print $1;}'\", $disklist);\n\treturn $disklist;\n}", "public function getDrivingLicence()\n {\n return $this->drivingLicence;\n }", "public function setDrives(?array $value): void {\n $this->getBackingStore()->set('drives', $value);\n }", "public function getFolders() \n {\n return $this->folders;\n }", "public function getDiskFiles(): int\n {\n return $this->diskFiles;\n }", "public function getDriveWheelConfiguration() {\n\t\treturn $this->driveWheelConfiguration;\n\t}", "public function listVolumesUseruploaded($optParams = array())\n {\n $params = array();\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Books_Volumes\");\n }", "public function getDrive(): ?Drive {\n $val = $this->getBackingStore()->get('drive');\n if (is_null($val) || $val instanceof Drive) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'drive'\");\n }", "public function getDirectories(){\n\t\t$sql = \"select * from st_directories\";\n\t\t$data = $this->runRequest ( $sql );\n\t\treturn $data->fetchAll();\n\t}", "public function isDrivingLicence()\n {\n return $this->drivingLicence;\n }", "public function getOwnedDevices(): ?array {\n $val = $this->getBackingStore()->get('ownedDevices');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DirectoryObject::class);\n /** @var array<DirectoryObject>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'ownedDevices'\");\n }", "public function getDiskInfo(): array;", "public function getMounts();", "public function getDataDisk()\n {\n return $this->data_disk;\n }", "public function getSecrets()\n {\n return $this->secrets;\n }", "public function getDirectoryList() : array\n {\n return $this->directoryList;\n }", "public function getResGuests()\n {\n return $this->resGuests;\n }", "public function getDriveList($params, $context)\n {\n $this->validateMethodContext($context, [\"role\" => OMV_ROLE_ADMINISTRATOR]);\n // Validate the parameters of the RPC service method.\n $this->validateMethodParams($params, \"rpc.common.getlist\");\n // Get the configuration object.\n $db = \\OMV\\Config\\Database::getInstance();\n $objects = $db->get(\"conf.service.snapraid.drive\");\n // Add additional share informations.\n $objectsAssoc = [];\n foreach ($objects as $objectk => &$objectv) {\n // Add the new property 'sharedfoldername'.\n $objectv->add(\"arrayname\", \"string\", gettext(\"n/a\"));\n // Get the shared folder configuration object.\n $array = $db->get(\"conf.service.snapraid.array\", $objectv->get(\"arrayref\"));\n // Update the 'arrayname' property.\n $objectv->set(\"arrayname\", $array->get(\"name\"));\n $objectsAssoc[] = $objectv->getAssoc();\n }\n // Filter the result.\n return $this->applyFilter($objectsAssoc, $params['start'], $params['limit'],\n $params['sortfield'], $params['sortdir']);\n }", "public function getDevices()\n {\n return $this->devices;\n }", "public function getDrivers()\n {\n return $this->drivers;\n }", "public function getDrivers()\n {\n return $this->drivers;\n }", "public function findUsersCanDrive(string $carName, array $orderBy = null, bool $desc = false, int $limit = null, int $offset = null): array;" ]
[ "0.6314961", "0.59489477", "0.57808197", "0.5671705", "0.5639208", "0.554853", "0.5521554", "0.5456158", "0.5396531", "0.5332757", "0.533196", "0.53014123", "0.5279487", "0.5173263", "0.5159755", "0.513164", "0.50975585", "0.50919926", "0.50464445", "0.502841", "0.5026911", "0.4995439", "0.49860978", "0.4965277", "0.49587175", "0.49502322", "0.49391446", "0.49385244", "0.49385244", "0.49356878" ]
0.6928568
0
Gets the employeeHireDate property value. The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, not , ge, le, in).
public function getEmployeeHireDate(): ?DateTime { $val = $this->getBackingStore()->get('employeeHireDate'); if (is_null($val) || $val instanceof DateTime) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'employeeHireDate'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployee()\n {\n return $this->employee;\n }", "public function getDateEcheance() {\n return $this->dateEcheance;\n }", "public function getEmployeeName() { return $this->employeeName; }", "public function getHireDate(): ?DateTime {\n $val = $this->getBackingStore()->get('hireDate');\n if (is_null($val) || $val instanceof DateTime) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'hireDate'\");\n }", "public function get_user_birthdate($employee_id)\n\t{\n\t\t/* $user_data = $erp_employee->find()->where(['employee_id'=>$employee_id]); */\n\t\t\n\t\t$erp_employee = TableRegistry::get('erp_users'); \n\t\t$user_data = $erp_employee->find()->where(['user_id'=>$employee_id,'employee_no !='=>'']);\n\t\t$birth_date = \"\";\n\t\tforeach($user_data as $retrive_data)\n\t\t{\n\t\t\t$birth_date = $retrive_data['date_of_birth'];\t\t\t\n\t\t}\n\t\treturn $birth_date;\t\t\n\t}", "public function getEmployee()\n {\n return $this->get(self::EMPLOYEE);\n }", "public function setEmployeeHireDate(?DateTime $value): void {\n $this->getBackingStore()->set('employeeHireDate', $value);\n }", "public function get_user_joindate($employee_id)\n\t{\n\t\t/* $user_data = $erp_employee->find()->where(['employee_id'=>$employee_id]); */\n\t\t\n\t\t$erp_employee = TableRegistry::get('erp_users'); \n\t\t$user_data = $erp_employee->find()->where(['user_id'=>$employee_id,'employee_no !='=>'']);\n\t\t$join_date = \"\";\n\t\tforeach($user_data as $retrive_data)\n\t\t{\n\t\t\t$join_date = $retrive_data['date_of_joining'];\t\t\t\n\t\t}\n\t\treturn $join_date;\t\t\n\t}", "public function getEmployeeEmail() { return $this->employeeEmail; }", "public function getDateReception()\n {\n return $this->date_reception;\n }", "function getAgeCutoffDay()\n {\n return ($this->__ageCutoffDay) ;\n }", "public function getDateReception()\n {\n return $this->dateReception;\n }", "public function getEmployeeID() { return $this->employeeID; }", "function getDateReminded() {\n\t\treturn $this->getData('dateReminded');\n\t}", "public function employee(){\n\t\treturn parent::employee();\n\t}", "public function getEmployer() {\r\n return $this->employer;\r\n }", "public function getDateFourni()\n {\n return $this->dateFourni;\n }", "public function getemployee()\n {\n return $emp=Employee::find(1)->user;\n }", "public function getDate() {\n return $this->getEvalAttribute('date');\n }", "public function getUserBirthday(){\n return $this->userBirthday;\n\t}", "public function getEmployer()\n {\n return $this->employer;\n }", "public function getEmployee();", "public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }", "protected function getChiefEmployee() {\n\t\t\tif(!($this->_ChiefEmployee instanceof Employee)) {\n\t\t\t\t$this->_ChiefEmployee = Employee::GetById($this->_ChiefEmployee);\n\t\t\t}\n\t\t\treturn $this->_ChiefEmployee;\n\t\t}", "public function getDateIn()\n {\n return $this->DateIn;\n }", "public function getEmployer()\n\t{\n\t\treturn $this->employer;\n\t}", "public function getThisYearEmpRes()\n {\n return $this->thisYearEmpRes;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }" ]
[ "0.5603303", "0.5438058", "0.53759795", "0.5299119", "0.5291137", "0.5263632", "0.5141821", "0.5092073", "0.50542253", "0.5043373", "0.50428593", "0.5010956", "0.50044245", "0.5003955", "0.49698755", "0.49358523", "0.48768136", "0.4871241", "0.48633513", "0.48469242", "0.48341838", "0.4818458", "0.48085797", "0.47899014", "0.47816083", "0.4777689", "0.4755785", "0.47524872", "0.47524872", "0.47524872" ]
0.5675649
0
Gets the employeeLeaveDateTime property value. The date and time when the user left or will leave the organization. To read this property, the calling app must be assigned the UserLifeCycleInfo.Read.All permission. To write this property, the calling app must be assigned the User.Read.All and UserLifeCycleInfo.ReadWrite.All permissions. To read this property in delegated scenarios, the admin needs one of the following Azure AD roles: Lifecycle Workflows Administrator, Global Reader, or Global Administrator. To write this property in delegated scenarios, the admin needs the Global Administrator role. Supports $filter (eq, ne, not , ge, le, in). For more information, see Configure the employeeLeaveDateTime property for a user.
public function getEmployeeLeaveDateTime(): ?DateTime { $val = $this->getBackingStore()->get('employeeLeaveDateTime'); if (is_null($val) || $val instanceof DateTime) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'employeeLeaveDateTime'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_leave_date()\n {\n return $this->get_default_property(self::PROPERTY_LEAVE_DATE);\n }", "public function getLeaveDateTime(): ?DateTime {\n $val = $this->getBackingStore()->get('leaveDateTime');\n if (is_null($val) || $val instanceof DateTime) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'leaveDateTime'\");\n }", "public function applyForLeave()\n {\n $employee = User::role('Employee')->get();\n \n return view('admin.employeeLeave.applyForLeave',compact('employee'));\n }", "public function setEmployeeLeaveDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('employeeLeaveDateTime', $value);\n }", "protected function getLeaveAssignDateLimit() {\n // If no leave period, don't allow apply/assign beyond next calender year\n $todayNextYear = new DateTime();\n $todayNextYear->add(new DateInterval('P1Y'));\n \n if ($this->getConfigService()->isLeavePeriodDefined()) {\n $period = $this->getLeavePeriodService()->getCurrentLeavePeriodByDate($todayNextYear->format('Y-m-d'));\n $maxDate = $period[1];\n } else {\n $nextYear = $todayNextYear->format('Y');\n $maxDate = $nextYear . '-12-31';\n } \n \n return $maxDate;\n }", "public function leaveDetails(Request $request)\n {\n\n $validator = $request->validate([\n 'title' => 'required|max:30',\n 'start_end_date' => 'required',\n 'reason' => 'required',\n \n ]);\n\n $date = explode('-', $request->start_end_date);\n $leaveDetails = new EmployeeLeave;\n /*// if(Auth::user()->hasRole(['Admin'])){\n \n // }\n else{\n $leaveDetails->employee_id = Auth::user()->id;\n }*/\n $leaveDetails->employee_id = Auth::user()->id; \n $leaveDetails->title = $request->title;\n $leaveDetails->from = date('Y-m-d',strtotime($date[0]));\n $leaveDetails->to = date('Y-m-d',strtotime($date[1]));\n $leaveDetails->type = $request->type;\n $leaveDetails->slot = $request->slot;\n $date1 = date_create($date[0]);\n $date2 = date_create($date[1]);\n $diff = date_diff($date1,$date2);\n $total_days = $diff->format(\"%a\");\n\n if($request->type == \"1\" && $total_days == 0){\n $leaveDetails->total_days = 1;\n }\n else if($request->type == \"0\" && $total_days == 0){\n $leaveDetails->total_days = 0.5;\n }\n else if($request->type == \"0\" && $total_days > 0){\n $count = ($total_days*0.5);\n $leaveDetails->total_days = $count+0.5;\n }\n else{\n $leaveDetails->total_days = $total_days+1;\n }\n\n $leaveDetails->reason = $request->reason;\n $leaveDetails->status = 2;\n $leaveDetails->save();\n\n $employee = User::where('id',$request->employee_id)->first();\n $admin = User::role('Admin')->get();\n $employee = User::where('id',Auth::user()->id)->first();\n $data = array();\n $data['title'] = $request->title;\n $data['from'] = date('Y-m-d',strtotime($date[0]));\n $data['to'] = date('Y-m-d',strtotime($date[1]));\n $data['total_days'] = $leaveDetails->total_days;\n $data['reason'] = $request->reason;\n $data['email'] = $employee->email;\n $data['name'] = $employee->name;\n $data['id'] = $this->encrypt($leaveDetails->id);\n foreach($admin as $val){\n\n $data['adminName'] = $val->name;\n $receiver = $val->email;\n Mail::to($receiver)->send(new ApplyLeave($data));\n }\n \n // Mail::send('emails.sendLeave', array('data'=>$data), function ($message) use ($data) {\n // $message->to($data['email'])->subject('Leave Details');\n // });\n\n return Redirect::to('admin/employee/leaves')\n ->with('success', 'Employee Leave has been Added Successfully.');\n }", "public function getLeaveInfo() {\n if ($this->leave_info) {\n return $this->leave_info;\n }\n \n if (!$this->left_to || (!$this->left_holiday_id && !$this->left_reason_id)) {\n return [];\n }\n \n $this->leave_info['left_to'] = short_date($this->left_to); \n \n if (!$this->left_reason_id) {\n $this->leave_info['reason_title'] = trans('employee.lbl_holiday');\n \n $hol = DB::table('dx_holidays as h')\n ->select('h.title as holiday_title', 'c.title as country_title')\n ->leftJoin('dx_countries as c', 'h.country_id', '=', 'c.id')\n ->where('h.id', '=', $this->left_holiday_id)\n ->first();\n \n $this->leave_info['reason_details'] = (($hol->country_title) ? $hol->country_title . \" - \" : \"\") . $hol->holiday_title;\n }\n else {\n $this->leave_info['reason_title'] = DB::table('dx_timeoff_types')->select('title')->where('id', '=', $this->left_reason_id)->first()->title;\n $this->leave_info['reason_details'] = '';\n }\n \n if (!$this->substit_empl_id) {\n $this->leave_info['substitute_name'] = '';\n $this->leave_info['substitute_id'] = 0;\n }\n else {\n $this->leave_info['substitute_name'] = DB::table('dx_users')->select('display_name')->where('id', '=', $this->substit_empl_id)->first()->display_name;\n $this->leave_info['substitute_id'] = $this->substit_empl_id;\n }\n \n return $this->leave_info;\n }", "public function edit(Leave $leave)\n {\n $leave_branch_id = $leave->branch_id;\n if(!auth()->user()->hasRole('superadmin')){\n $branch_id = auth()->user()->getBranchIdsAttribute();\n $branches = Branch::whereIn('id',$branch_id)->get();\n $approvers = User::whereHas(\"roles\", function($q){ $q->where(\"name\", \"superadmin\")->orWhere(\"name\", \"admin\"); })->get();\n $users = User::select('id', 'name')->whereHas('branches', function($q) use ($leave_branch_id) { $q->where('branch_id', $leave_branch_id); })->get();\n }else{\n $branches = Branch::all();\n $approvers = User::whereHas(\"roles\", function($q){ $q->where(\"name\", \"superadmin\")->orWhere(\"name\", \"admin\"); })->get();\n $users = User::select('id', 'name')->whereHas('branches', function($q) use ($leave_branch_id) { $q->where('branch_id', $leave_branch_id); })->get();\n }\n\n $leave_types = ['Annual', 'Sick', 'Hospitalisation', 'Maternity', 'Paternity', 'LOP'];\n $half_day = ['Full Day', 'Half Day'];\n $status = ['New', 'Approved', 'Declined'];\n return view('admin.leave.edit', compact(\"leave\", \"branches\", \"approvers\", \"users\", \"leave_types\", \"half_day\", \"status\"));\n }", "public function addLeaveDay() {\n try {\n if (!($this->leaveDay instanceof Base_Model_ObtorLib_App_Core_Employee_Entity_LeaveDay)) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception(\" LeaveDay Entity not initialized\");\n } else {\n $objLeaveDay = new Base_Model_ObtorLib_App_Core_Employee_Dao_LeaveDay();\n $objLeaveDay->leaveDay = $this->leaveDay;\n return $objLeaveDay->addLeaveDay();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Employee_Exception($ex);\n }\n }", "public function set_leave_date($value)\n {\n $this->set_default_property(self::PROPERTY_LEAVE_DATE, $value);\n }", "public function prev_employee_leave_balance($company_id, $leave_id)\n {\n return $balace = ErpEmployeeLeave::where('company_id', $company_id)->where('user_id', Auth::user()->id)->where('leave_id', $leave_id)->first();\n }", "public function get_user_joindate($employee_id)\n\t{\n\t\t/* $user_data = $erp_employee->find()->where(['employee_id'=>$employee_id]); */\n\t\t\n\t\t$erp_employee = TableRegistry::get('erp_users'); \n\t\t$user_data = $erp_employee->find()->where(['user_id'=>$employee_id,'employee_no !='=>'']);\n\t\t$join_date = \"\";\n\t\tforeach($user_data as $retrive_data)\n\t\t{\n\t\t\t$join_date = $retrive_data['date_of_joining'];\t\t\t\n\t\t}\n\t\treturn $join_date;\t\t\n\t}", "public function leaveStatus()\n {\n \n $portal=Portal::select('id')->where('user_id',Auth::id())->first(); \n $leave_data = EmployeeLeaveStatus::where('portal_id',$portal->id)->get();\n return view('portal.leaveType.leavestatus',compact('EmpData','leave_data'));\n \n }", "public function get_leave_under_employees() {\n $employee_ids = array();\n $empids = $this->get_under_forwader_employees();\n foreach ($empids as $empid) {\n $employee_ids[] = $empid->emp_id;\n }\n if ($employee_ids) {\n $employee_leave = EMPLOYEE_LEAVE;\n $employee = EMPLOYEES;\n $this->db->select($employee . '.emp_id,emp_unique_id,emp_full_name,emp_full_name_hi, emp_email,emp_mobile_number,cl_leave,ol_leave,el_leave,hpl_leave,role_id');\n $this->db->from($employee);\n $this->db->where_in($employee_leave . '.emp_id', $employee_ids);\n $this->db->join($employee_leave, $employee_leave . '.emp_id=' . $employee . '.emp_id', 'left');\t\t\t\n $query = $this->db->get();\n // echo $this->db->last_query();\n return $rows = $query->result();\n } else {\n return false;\n }\n }", "public function getEmployee()\n {\n return $this->employee;\n }", "public function show_attend_leave_time(){\n\t\ttry {\n\n\t\t\t$stmt = $this->con->prepare(\"SELECT *, employees.employee_id AS empid, attendance.id AS attid FROM attendance LEFT JOIN employees ON employees.id=attendance.employee_id ORDER BY attendance.date DESC, attendance.time_in DESC\");\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \".$e-getMessage().\"<br>\";\n\t\t\tdie();\n\t\t}\n\t}", "public function setLeaveDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('leaveDateTime', $value);\n }", "public function getEngagementEndDateAttribute()\n {\n if($value = data_get($this->engagement, 'end_date')){\n return Carbon::parse($value)->format($this->dateFormat);\n }\n }", "public function leave()\n\t{\n\t\treturn $this->belongsTo('Leave');\n\t}", "public function check_leave(){\n\t\tif(!empty($this->data['HrAttChange']['att_date'])){\n\t\t\t$id = $this->data['HrAttChange']['user_id'];\n\t\t\t$att_date = $this->format_date_save($this->data['HrAttChange']['att_date']);\n\t\t\t$count = $this->get_leave_day($att_date, $id);\n\t\t\tif($count){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\t\t\n\t\treturn true;\n\t}", "public function getEndDate();", "public function getEndDate();", "private function updateEmployee() {\n\t\tif ($this->ltype->data[0]['isAnnual'] == 1){\n\t\t\t$sql = \"UPDATE annual_leave a, business_years b SET a.leave_left = a.leave_left - 0.5 \";\n\t\t\t$sql .= \" WHERE a.emp_id =\".$this->page->ctrl['subrecord'].\" AND a.year_id = b.business_year_id AND b.year_start<='\".$this->data[0]['half_date'].\"'\";\n\t\t\t$sql .= \" AND b.year_end >= '\".$this->data[0]['half_date'].\"'\";\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function actionLeave() {\n $model = new StaffLeave();\n $searchModel = new StaffLeaveSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n if (Yii::$app->session['post']['id'] != 1) {\n $dataProvider->query->andWhere(['employee_id' => Yii::$app->user->identity->id]);\n }\n $dataProvider->query->orderBy(['id' => SORT_DESC]);\n $dataProvider->pagination = ['pagesize' => 10];\n\n\n if ($model->load(Yii::$app->request->post()) && Yii::$app->SetValues->Attributes($model)) {\n\n\n //$model->info_table_id = Yii::$app->user->identity->staff_info_id;\n $model->commencing_date = date('Y-m-d', strtotime(Yii::$app->request->post()['StaffLeave']['commencing_date']));\n $model->ending_date = date('Y-m-d', strtotime(Yii::$app->request->post()['StaffLeave']['ending_date']));\n $model->no_of_days = (date(\"j\", strtotime($model->ending_date)) - date(\"j\", strtotime($model->commencing_date))) + 1;\n $check = StaffLeave::findOne(['employee_id' => Yii::$app->user->identity->id, 'commencing_date' => $model->commencing_date]);\nif (!isset($model->status)) {\n $model->status = 1;\n }\n if (empty($check)) {\n if ($model->validate() && $model->save()) {\n return $this->redirect('index');\n }\n } else {\n Yii::$app->getSession()->setFlash('error', \"<strong>Error! </strong>Leave alreday applied in this date range\");\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function submitLeave(LeaveRequest $request)\n {\n $fromDate = new Carbon($request->from_date);\n $toDate = new Carbon($request->to_date);\n $value = $toDate->diffInDays($fromDate);\n\n /*\n * Leave request save to request table.\n */\n $leave = new \\App\\Request;\n $userId = Auth::user()->id;\n\n $leave->user_id = $userId;\n $leave->leave_type = $request->leave_type;\n $leave->txn_type = 'DEBIT';\n $leave->from_date = $request->from_date;\n $leave->to_date = $request->to_date;\n $leave->value = $value;\n $leave->status = 'REQUESTED';\n $leave->user_comments = $request->user_comments;\n\n $leave->save();\n\n return redirect('home');\n }", "public function sendLeaveApprovelEmail($leave)\n {\n $email_template = EmailTemplate::where('type', 'approve_leave')->first();\n\n if (!empty($email_template)) {\n\n $user = Auth::user();\n $req_user = User::find($leave->user_id);\n $req_user_name = $req_user->firstname.\" \".$req_user->lastname;\n\n $message = $email_template->template_body;\n $name = str_replace(\"{NAME}\", $req_user_name, $message);\n $leave_type = str_replace(\"{LEAVE_TYPE}\", $leave->leaveType->leave_type, $name);\n $leave_date = str_replace(\"{DATE}\", $leave->leave_date, $leave_type);\n $message = str_replace(\"{APPROVED_BY}\", $user->firstname.\" \".$user->lastname, $leave_date);\n\n $this->_sendEmailsInQueue(\n $req_user->email,\n $req_user_name, \n $email_template->template_subject, \n $message\n );\n }\n }" ]
[ "0.6865493", "0.57391405", "0.5629134", "0.55900055", "0.551575", "0.547825", "0.5432647", "0.5365414", "0.53204316", "0.52846414", "0.52470285", "0.5206183", "0.51647377", "0.5038174", "0.49624258", "0.49259984", "0.48870033", "0.4877902", "0.48461744", "0.48141932", "0.48024502", "0.48024502", "0.4797683", "0.4789758", "0.47883475", "0.47883475", "0.47883475", "0.47883475", "0.47759074", "0.47687995" ]
0.6197667
1
Gets the employeeOrgData property value. Represents organization data (e.g. division and costCenter) associated with a user. Supports $filter (eq, ne, not , ge, le, in).
public function getEmployeeOrgData(): ?EmployeeOrgData { $val = $this->getBackingStore()->get('employeeOrgData'); if (is_null($val) || $val instanceof EmployeeOrgData) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'employeeOrgData'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEmployeeOrgData(?EmployeeOrgData $value): void {\n $this->getBackingStore()->set('employeeOrgData', $value);\n }", "public function getOrganizationData($orgId)\n {\n return $this->totalExpenditureRepo->getOrganizationData($orgId);\n }", "public function getorg($data) {\t\n\t\n\t\t$collection = $this->db->orgMaster;\n\t\tif($data == 'addUser'){\n\t\t\t//get or name only\n\t\t\t$readings = $collection->find();\n\t\t\t$result = Array();\t\t\n\t\t\tforeach ( $readings as $id => $value )\n\t\t\t{\n\t\t\t\tunset($value[_id]);\n\t\t\t\tunset($value[device]);\n\t\t\t\tunset($value[cperson]);\n\t\t\t\tunset($value[email]);\n\n\n\n\t\t\t\tarray_push($result, $value);\t\t\t\n\n\t\t\t}\t\n\t\t}\n\t\telse{\n\t\t\t//getting all properties of org\n\t\t\t$readings = $collection->find();\n\t\t\t$result = Array();\t\t\n\t\t\tforeach ( $readings as $id => $value )\n\t\t\t{\n\t\t\t\tunset($value[_id]);\n\t\t\t\tarray_push($result, $value);\t\t\t\n\t\n\t\t\t}\t\n\t\t\t}\t\t\t\n\t\n\theader('Content-Type: application/json');\n\techo json_encode($result,JSON_PRETTY_PRINT);\n\t}", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getCodOrg() {\n return $this->codOrg;\n }", "public function getOrganization()\n {\n return $this->Organization;\n }", "public function getOrganization(): ?string\n {\n return $this->data['organization'] ?? null;\n }", "public function getAuthOrgId(): Attribute\\Id\\OrganizationId\n {\n return $this->getForteEnvironment()->getAuthenticatingOrganizationId();\n }", "public function personalOrganization()\n {\n return $this->ownedOrganizations->where('personal_organization', true)->first();\n }", "public function get_user_org_details( $id ) {\n\t\t\treturn $this->build_request( \"user/organizations/$id\" )->fetch();\n\t\t}", "public function getOrganisation(): OrganisationModel\n {\n return $this->organisation;\n }", "public function getorg($data){\n\t\t$reqBearer = $this->bearer;\t\n\t\t$this->model->getorg($reqBearer,$data);\n\t\t\n\t}", "public function getOrganizationName()\n {\n return $this->organizationName;\n }", "public function getOrgchartDatasource($node = null)\n\t{\n\t\t$top = $node ? false : true;\n\t\t\n\t\t// first pass - determine top element\n\t\tif(!$node)\n\t\t{\n\t\t\t// employee id isn't specified - draw whole tree from the root\n\t\t\tif($this->rootId == 0)\n\t\t\t{\n\t\t\t\t// there is only one top-level employee in hierarchy (without manager)\n\t\t\t\tif(count($this->treeIndex[0]) == 1)\n\t\t\t\t{\n\t\t\t\t\t$node = $this->treeIndex[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// more than one employees without manager - need to generate fake 'company' root element\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$node = [0 => $this->treeIndex[0]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// employee with requested id doesn't exist - emit 404\n\t\t\telseif(!isset($this->employees[$this->rootId]))\n\t\t\t{\n\t\t\t\tabort(404);\n\t\t\t}\n\t\t\t\n\t\t\t// employee doesn't have any subordinates\n\t\t\telseif(!isset($this->treeIndex[$this->rootId]))\n\t\t\t{\n\t\t\t\t$node = [$this->rootId => []];\n\t\t\t}\n\t\t\t\n\t\t\t// employee exists - draw corresponding subtree\n\t\t\telse\n\t\t\t{\n\t\t\t\t$node = [$this->rootId => $this->treeIndex[$this->rootId]];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$result = [];\n\t\t\n\t\tforeach($node as $id => $subnode)\n\t\t{\n\t\t\t// id is not null - the root element is person\n\t\t\tif($id)\n\t\t\t{\n\t\t\t\t$hasSiblings = count($node) > 1 ? '1' : '0';\n\t\t\t\t$hasChildren = empty($subnode) ? '0' : '1';\n\t\t\t\t$hasParent = ($id == $this->index[0][0]) ? '0' : '1';\n\t\t\t\t\n\t\t\t\t$employee = $this->employees[$id];\n\t\t\t\t\n\t\t\t\t$tmp = [\n\t\t\t\t\t'id' => $employee->id,\n\t\t\t\t\t'name' => $employee->display_name,\n\t\t\t\t\t'title' => $employee->position_title ?: '',\n\t\t\t\t\t//'avatar' => $employee->getAvatar(),\n\t\t\t\t\t'subordinates' => count($subnode),\n\t\t\t\t\t'href' => route('profile', $employee->id),\n\t\t\t\t\t'relationship' => $hasParent . $hasSiblings . $hasChildren,\n\t\t\t\t\t'hasParent' => $hasParent == '1',\n\t\t\t\t\t'top' => $top,\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\t// add url of a parent node\n\t\t\t\tif($top)\n\t\t\t\t{\n\t\t\t\t\tif($parent = $this->parentsIndex[$id])\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp['parentUrl'] = route('organization_chart', $parent);\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$tmp['parentUrl'] = route('organization_chart');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// id is null - there are more than one top managers, generate a fake \"Company\" top-level element\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tmp = [\n\t\t\t\t\t'id' => 0,\n\t\t\t\t\t'name' => config('dx.company.short_title'),\n\t\t\t\t\t'title' => trans('organization.company'),\n\t\t\t\t\t//'avatar' => url(config('dx.company.logo')),\n\t\t\t\t\t'subordinates' => count($subnode),\n\t\t\t\t\t'href' => route('organization_departments'),\n\t\t\t\t\t'relationship' => '001',\n\t\t\t\t\t'hasParent' => false,\n\t\t\t\t\t'top' => true,\n\t\t\t\t];\n\t\t\t}\n\t\t\t\n\t\t\t// recurse deeper to the next level of hierarchy\n\t\t\tif(!empty($subnode))\n\t\t\t{\n\t\t\t\t$tmp['children'] = $this->getOrgchartDatasource($subnode);\n\t\t\t}\n\t\t\t// even if employee doesn't have any subordinates, we must provide an empty array of children,\n\t\t\t// for OrgChart plugin to work correctly\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tmp['children'] = [];\n\t\t\t}\n\t\t\t\n\t\t\t$result[] = $tmp;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function getOrganization() {\n return $this->hasOne(Organization::className(), ['id' => 'organization_id']);\n }", "public function getOrganization() : string\n {\n return $this->organization;\n }", "public function getOrganizationId(): Attribute\\Id\\OrganizationId\n {\n return $this->organizationId;\n }", "public function getExchangeOrganization()\n {\n if (array_key_exists(\"exchangeOrganization\", $this->_propDict)) {\n return $this->_propDict[\"exchangeOrganization\"];\n } else {\n return null;\n }\n }", "public function organisation()\n {\n return $this->hasOne('App\\Models\\Organisation', 'id', 'org_id');\n }", "function get_statusorganization_people() {\n $the_data = &drupal_static(__FUNCTION__);\n if(empty($the_data)) {\n if($the_data = CMSContactsCacheHelper::cache_get('statusorganization_people')) {\n } else {\n $the_data = $this->ldap_get_statusorganization_people();\n CMSContactsCacheHelper::cache_set('statusorganization_people', $the_data);\n }\n }\n return $the_data;\n }", "public function getOrganisation(): string|null\n {\n if (!$this->hasOrganisation()) {\n $this->setOrganisation($this->getDefaultOrganisation());\n }\n return $this->organisation;\n }", "public function getUser($orgId);", "public function getEmployeeList() {\n $userid = Session::get('LAD_user_id');\n $users = UsersModel::where('id',$userid)\n ->first();\n $organization = $users->organization;\n return DB::table('users')\n ->where('employee_of','=',$userid)\n ->join('user_occupations','users.occupation','=','user_occupations.id')\n ->orderBy('users.name','asc')\n ->select('users.*','user_occupations.name as occuname')\n ->get();\n }", "public function getEmployee()\n {\n return $this->get(self::EMPLOYEE);\n }", "public function getOrgFields() {\n\t\t$orgfields = array(\t\n\t\t\t\t\t'accountname',\n\t\t\t\t\t'accounttype', //set to 'Customer'\n\t\t\t\t\t'phone',\n\t\t\t\t\t'otherphone',\n\t\t\t\t\t'fax',\n\t\t\t\t\t'email1',\n\t\t\t\t\t'bill_street',\n\t\t\t\t\t'bill_pobox',\n\t\t\t\t\t'bill_city',\n\t\t\t\t\t'bill_state',\n\t\t\t\t\t'bill_code',\n\t\t\t\t\t'bill_country',\n\t\t\t\t\t'ship_street',\n\t\t\t\t\t'ship_pobox',\n\t\t\t\t\t'ship_city',\n\t\t\t\t\t'ship_state',\n\t\t\t\t\t'ship_code',\n\t\t\t\t\t'ship_country',\n\t\t\t);\t//TO-DO: to handle vatid\n\t\treturn $orgfields;\n\t}", "private function _getOrganisation() {\n\t\tif (!isset($this->_organisation)) {\n\t\t\t$Organisation =& $this->XeroOrganisation->Organisation;\n\t\t\t$Organisation->contain(array());\n\t\t\t$this->_organisation = $Organisation->findById($this->params['organisation']);\n\n\t\t\tif ($this->_organisation === false) {\n\t\t\t\tthrow new CakeException(__(\"Unable to find organisation with id: %s\", $this->params['organisation']));\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_organisation;\n\t}" ]
[ "0.5666731", "0.5619869", "0.5589066", "0.5538624", "0.5538624", "0.5538624", "0.5538624", "0.5538624", "0.54275966", "0.5379668", "0.53078485", "0.5237179", "0.5172291", "0.5112303", "0.5107306", "0.5091504", "0.5061418", "0.5025135", "0.5010266", "0.50021756", "0.4997621", "0.4962745", "0.49437934", "0.49234486", "0.48881656", "0.48658046", "0.4865772", "0.4849947", "0.48344928", "0.48247105" ]
0.6304328
0
Gets the employeeType property value. Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Supports $filter (eq, ne, not , ge, le, in, startsWith).
public function getEmployeeType(): ?string { $val = $this->getBackingStore()->get('employeeType'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'employeeType'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployeeType()\n\t{\n\t\t$__aEmployeeType = array('Management','Staff','Worker');\n\t\treturn $__aEmployeeType;\n\t}", "public function getEmploymentType()\n {\n return $this->employmentType;\n }", "public function getEntityType(){\n\t\tif (empty($this->_type)){\n\t\t\t$this->setType(\\Foggyline\\Office\\Model \\Employee::ENTITY);\n\t\t}\n\t\treturn parent::getEntityType();:\n\t}", "public function getEntityType()\n {\n if (empty($this->_type)) {\n $this->setType(\\Hans\\Office\\Model\\Employee::ENTITY);\n }\n return parent::getEntityType();\n }", "public function getExpressionType()\n {\n return $this->expressionType;\n }", "public function getEcrType() {\n return $this->ecrType;\n }", "public function getWorkerType();", "public function setEmploymentType($value)\n {\n $this->employmentType = $value;\n }", "public function type()\n {\n return $this->property('type');\n }", "public function getType() \n {\n return $this->_fields['Type']['FieldValue'];\n }", "public function getTipo_empleado()\n {\n return $this->tipo_empleado;\n }", "public function getType()\n {\n return $this->getValueObject('type');\n }", "public function getEntryType()\n {\n if (array_key_exists(\"entryType\", $this->_propDict)) {\n return $this->_propDict[\"entryType\"];\n } else {\n return null;\n }\n }", "public function getExpressionType(O\\Expression $expression);", "public function getPropertyType(): string\n\t{\n\t\treturn $this->propertyType;\n\t}", "public function type() {\n\t\tif (isset($this->_options['type'])) {\n\t\t\treturn $this->_options['type'] ;\n\t\t}\n\n\t\tif (isset($this->_data['in']) && is_string($this->_data['in']) && isset($this->_data['value'])) {\n\t\t\tif (is_string($this->_data['in']) && is_array($this->_data['value'])) {\n\t\t\t\treturn 'terms' ;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_defaultType ;\n\t}", "public function getEntityType()\n {\n return $this->getRequest()->getFromUrl(\n \\Chamilo\\Core\\Repository\\ContentObject\\Assignment\\Display\\Manager::PARAM_ENTITY_TYPE,\n Entry::ENTITY_TYPE_USER\n );\n }", "public function emloyee_type($EID){\n\t\t\t$type=substr($EID, 0,3);\n\t\t\treturn $type;\n\t\t}", "protected function getEntityType() {\n return $this->getFieldDefinition()->getAdditionalValue('entity_type') ?: $this->entityType;\n }", "function get_filter_type(){\n return $this->get_mapped_property('filter_type');\n }", "public function actionGetEmployeeTypeDropdown()\n {\n try\n {\n //set db target\n $headers = getallheaders();\n EmployeeType::setClient(BaseActiveController::urlPrefix());\n\n\t\t\t// RBAC permission check\n\t\t\tPermissionsController::requirePermission('employeeTypeGetDropdown');\n\n $types = EmployeeType::find()\n ->all();\n $namePairs = [];\n $typesSize = count($types);\n\n for($i=0; $i < $typesSize; $i++)\n {\n $namePairs[$types[$i]->EmployeeTypeType]= $types[$i]->EmployeeTypeType;\n }\n\n\n $response = Yii::$app ->response;\n $response -> format = Response::FORMAT_JSON;\n $response -> data = $namePairs;\n\n return $response;\n }\n catch(\\Exception $e)\n {\n throw new \\yii\\web\\HttpException(400);\n }\n }", "public function getEnrolmentType()\n\t{\n\t return $this->enrolmentType;\n\t}", "public function getType()\n {\n return $this->get('type');\n }", "public function getEligibleCustomerType();", "public function type() {\n return $this->get('type')->value;\n }", "public function getType() {\n\t\treturn $this->get('type');\n\t}", "public function getEmployee()\n {\n return $this->get(self::EMPLOYEE);\n }", "public function getType()\n {\n return $this->get(self::TYPE);\n }", "public function getType()\n {\n return $this->get(self::TYPE);\n }", "public function getType()\n {\n return $this->get(self::TYPE);\n }" ]
[ "0.74105346", "0.6280047", "0.58624613", "0.5839873", "0.56320983", "0.55210984", "0.535907", "0.53515035", "0.52167076", "0.5162627", "0.5076504", "0.50620866", "0.5047258", "0.5043693", "0.5032636", "0.50127685", "0.500976", "0.5008966", "0.50057524", "0.49852127", "0.49766743", "0.49719724", "0.49388707", "0.49356762", "0.4935388", "0.49235478", "0.48967138", "0.48858368", "0.48858368", "0.48858368" ]
0.63139766
1
Gets the externalUserStateChangeDateTime property value. Shows the timestamp for the latest change to the externalUserState property. Supports $filter (eq, ne, not , in).
public function getExternalUserStateChangeDateTime(): ?string { $val = $this->getBackingStore()->get('externalUserStateChangeDateTime'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'externalUserStateChangeDateTime'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setExternalUserStateChangeDateTime(?string $value): void {\n $this->getBackingStore()->set('externalUserStateChangeDateTime', $value);\n }", "public function getChangedTime() {\n return $this->get('changed')->value;\n }", "public static function state_changes($stateid) {\n global $DB;\n $sql = 'SELECT changes.*, ' . $DB->sql_fullname('u.firstname', 'u.lastname') . ' AS username\n FROM {block_workflow_state_changes} changes\n INNER JOIN {user} u ON u.id = changes.userid\n WHERE changes.stepstateid = ?\n ORDER BY changes.timestamp DESC';\n return $DB->get_records_sql($sql, array($stateid));\n }", "public function getLastStatusChange()\n {\n \treturn $this->statusChanges[(count($this->statusChanges) -1)];\n }", "public function getChangedDate() {\n return $this->changed;\n }", "public function getInactiveTime()\n {\n return $this->inactiveTime;\n }", "protected function get_pw_changed_time($user_ID) {\n\t\treturn (int) get_user_meta($user_ID, $this->umk_changed, true);\n\t}", "public function getUserUpdated()\n {\n return $this->user_updated;\n }", "public function getExternalUserState(): ?string {\n $val = $this->getBackingStore()->get('externalUserState');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'externalUserState'\");\n }", "public function getChanges() {\n $bis = $this->gameday - 1;\n if($bis > 0) $bisSql = \"|| bis =\".$bis;\n else $bisSql = '';\n \n $sql = \"SELECT\tuser_ID, ab, bis\n FROM events_user\n WHERE event_id=\".$this->eventID.\"\n AND (ab=\".$this->gameday.$bisSql.\")\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n $row['username'] = self::getUserOnlineMarking($row['user_ID']);\n \n if(!empty($row['ab'])) {\n $this->changeNew[] = $row;\n }\n if(!empty($row['bis'])) {\n $this->changeOld[] = $row;\n }\n\t\t}\n }", "function islandora_workflow_get_object_state_time_stamp($object_id) {\n\n module_load_include('inc', 'fedora_repository', 'api/fedora_item');\n\n $item = new Fedora_Item($object_id);\n if (!$item->exists()) {\n return FALSE;\n }\n $iw = $item->get_datastream_dissemination('islandora_workflow');\n if (!$iw) {\n return FALSE;\n }\n $times = array();\n $dom = new DOMDocument();\n $dom->loadXML($iw);\n $modified_times = $dom->getElementsByTagName('when_last_modified');\n foreach ($modified_times as $modified_time) {\n $times['islandora_workflow_modified'] = format_date(strtotime($modified_time->nodeValue), 'small');\n }\n return $times;\n}", "public function makeUnActive()\n {\n \n $command = Yii::app()->db->createCommand('\n UPDATE user_login \n SET last_action_time= :oldTime\n WHERE (user_id= :userId)\n ');\n return $command->execute(array(\n 'userId' => $this->id,\n 'oldTime' => 1,\n ));\n }", "public function getUserStatus()\n {\n return $this->user_status;\n }", "public function getStatusChanged()\n {\n return $this->statusChanged;\n }", "function getLastvisit() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->staff_update_date;\n }", "public function getUserStatus()\n\t{\n\t\treturn $this->user_status;\n\t}", "public static function getUserStates()\n {\n return [\n self::STATUS_ACTIVE,\n self::STATUS_REJECTED,\n self::STATUS_WAITING_REQUEST_CONFIRM\n ];\n }", "public function getUsersState()\n\t{\n\t\t$channel_info = Push::get('/channels/' . $this->global . '/users');\n\t\t$online_users = $channel_info['result']['users'];\n\n\t\t$online_ids = [];\n\t\tforeach ($online_users as $online_user) {\n\t\t\t$online_ids[] = $online_user['id'];\n\t\t}\n\n\t\t$users = User::ignoreMe()->get();\n\t\t$online = $users->filter(function($user) use ($online_ids) {\n\t\t\treturn in_array($user->id, $online_ids);\n\t\t});\n\t\t$offline = $users->filter(function($user) use ($online_ids) {\n\t\t\treturn ! in_array($user->id, $online_ids);\n\t\t});\n\n\t\treturn ['online' => $online, 'offline' => $offline];\n\t}", "public function lastChanges( $asUnixTimestamp = false )\n {\n $lc = $this->getSNMP()->walk1d( self::OID_IF_LAST_CHANGE );\n\n if( $asUnixTimestamp )\n {\n $sysUptime = $this->getSNMP()->useSystem()->uptime() / 100;\n\n foreach( $lc as $i => $t )\n if( $t )\n $lc[$i] = intval( floor( time() - $sysUptime + ( $t / 100 ) ) );\n }\n\n return $lc;\n }", "public function getLastStateChangeDateTime(): ?DateTime {\n $val = $this->getBackingStore()->get('lastStateChangeDateTime');\n if (is_null($val) || $val instanceof DateTime) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'lastStateChangeDateTime'\");\n }", "function filter_user() {\n\n\t\treturn $this->web_config_lib->get_creator('log_activity', 'log_activity.user_id');\n\n\t}", "public function getEventEnrolledUserPast(User $user,$paginator){\n\t\n\t\t$events = $this->getEventEnrolledUser($user,$paginator,\"<=\");\n\t\n\t\treturn $events;\n\t}", "public function onExternalUserUpdate(ExternalUserWasUpdated $event) {\n\n logger('user updated');\n \n if($event->user->profile[0]->notifica_spedita == 0 && $event->user->active == 1 ){\n $this->mailer->sendMailForAccountActivation($event->user);\n $event->user->profile[0]->update(['notifica_spedita' => 1]);\n }\n\n }", "function getChangeTime()\n {\n return time();\n }", "public function getClientUserTime()\n {\n return $this->client_user_time;\n }", "public function changesSince(State $previous): TellsWhatChanged;", "public function getUpdatedOn(): \\DateTime\n {\n return $this->updated_on;\n }", "public function getUpdated_on()\n {\n return isset($this->updated_on) ? $this->updated_on : null;\n }", "public static function retrieveTodayUpdatedEntityByUser (Model_User $user) {\n return self::retrieve(false)\n ->join ('saved', 'saved.entity = entity.id', array())\n ->join ('alert', 'alert.entity = saved.entity', array())\n ->where('alert.added > ?', new Zend_Db_Expr('CURRENT_DATE()'))\n ->where(\"alert.added < ?\", new Zend_Db_Expr(\"CURRENT_DATE() + INTERVAL 1 DAY\"))\n ->where('saved.user = ?', $user)\n ->setRowClass('Model_Entity')\n ->fetchAll();\n }", "public function getUpdatedOn()\n {\n return $this->activeCollection->getUpdatedOn();\n }" ]
[ "0.5639914", "0.5332978", "0.5081247", "0.4949079", "0.48609942", "0.48594096", "0.48217976", "0.4775585", "0.47522947", "0.4724667", "0.46644607", "0.462819", "0.46044776", "0.4588845", "0.4568759", "0.45465705", "0.45404795", "0.45129466", "0.44538733", "0.44397458", "0.44395393", "0.4426543", "0.44225368", "0.44011918", "0.43960744", "0.4387166", "0.4358552", "0.43442798", "0.43377623", "0.43256372" ]
0.61716676
0
Gets the followedSites property value. The followedSites property
public function getFollowedSites(): ?array { $val = $this->getBackingStore()->get('followedSites'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Site::class); /** @var array<Site>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'followedSites'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function user_followedSites(\n\t\t\t$params = array ()) {\n\t\t\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t\t\treturn $this->getObjetO365Wsclient ()\n\t\t\t\t->getMethod ( $this->user_id_uri () . '/followedSites', $params );\n\t}", "public function getSite()\n {\n return $this->site;\n }", "public function getSite()\n {\n return $this->site;\n }", "public function getSite()\n {\n return $this->site;\n }", "public function getSiteList() {\n return $this->siteList;\n }", "public function getFollowRedirects()\n\t{\n\t\treturn $this->followRedirects;\n\t}", "public function get_Site() {\n return $this->site;\n }", "public function getSite() {\n\t\treturn $this->site;\n\t}", "public function getFollowLocation()\n {\n return $this->followLocation;\n }", "public function getFollowed()\n {\n return $this->followed;\n }", "public function getSite()\n {\n return isset($this->site) ? $this->site : null;\n }", "public function getSite(): string {\n return $this->site;\n }", "public function getSiteUnwrapped()\n {\n return $this->readWrapperValue(\"site\");\n }", "public function siteUrl()\n {\n return $this->entry->site_url;\n }", "public function getSite()\n {\n return $this->getSection()->getSite();\n }", "public function setFollowedSites(?array $value): void {\n $this->getBackingStore()->set('followedSites', $value);\n }", "public function public_get_site() {\n return $this->get_site();\n }", "public function getUseWebsite()\n\t{\n\t\treturn $this->use_website;\n\t}", "function getSiteUrl() \n {\n $filterData = array();\n $cnt = 0;\n $filterData[$cnt] = \"SiteURL\";\n \n $getSiteUrl = $this->db->fetchSQL(\"SELECT VariableValue FROM tbl_UserVars WHERE VariableName = :filter0\", $filterData, \"1\");\n \n return $getSiteUrl;\n }", "public function getUserWebsiteUrl()\n\t{\n\t\treturn $this->user_website_url;\n\t}", "public function userFollowing ()\n\t{\n\t\t\t\n\t\t$url = $this->UrlStatus;\n\t\t$url .= 'friends.xml';\n\t\t$statuses = $this->myUserParse($url, 'following');\n\t\t\t\n\t\treturn $statuses;\n\t\t\t\n\t}", "public function getWebsite() {\r\n return $this->website;\r\n }", "public function getPrefixSite()\n {\n return $this->prefixSite;\n }", "public function getWebsiteURL()\n {\n return $this->website_url;\n }", "public function getSite()\n {\n return Site::getByID($this->sites_id);\n }", "public function getWebsite(){\n\t\t\treturn $this->website;\n\t\t}", "public function getWebsite()\n {\n return $this->website;\n }", "public function getWebsite()\n {\n return $this->website;\n }", "public function getWebsite()\n {\n return $this->website;\n }", "function pogo_get_social_sites() {\n\n\t// Store social site names in array\n\t$social_sites = array(\n\t\t'facebook',\n\t\t'twitter',\n\t\t'instagram',\n\t\t'linkedin',\n\t\t'youtube',\n\t);\n\n\treturn $social_sites;\n}" ]
[ "0.65639585", "0.59375376", "0.59375376", "0.59375376", "0.5866978", "0.58571136", "0.5856257", "0.58441687", "0.57844853", "0.5770633", "0.5766845", "0.5751402", "0.5749008", "0.57275844", "0.5694743", "0.5676101", "0.55415994", "0.54947126", "0.5491958", "0.5471364", "0.5463181", "0.54562205", "0.54523325", "0.53859067", "0.5383212", "0.53618413", "0.53426504", "0.53426504", "0.53426504", "0.5299624" ]
0.6705236
0
Gets the hireDate property value. The hire date of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z. Returned only on $select. Note: This property is specific to SharePoint Online. We recommend using the native employeeHireDate property to set and update hire date values using Microsoft Graph APIs.
public function getHireDate(): ?DateTime { $val = $this->getBackingStore()->get('hireDate'); if (is_null($val) || $val instanceof DateTime) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'hireDate'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployeeHireDate(): ?DateTime {\n $val = $this->getBackingStore()->get('employeeHireDate');\n if (is_null($val) || $val instanceof DateTime) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'employeeHireDate'\");\n }", "public function getDate()\n {\n return isset($this->date) ? $this->date : null;\n }", "public function getDate()\n {\n $date = $this->date ? clone $this->date : null;\n\n return $date;\n }", "public function getDate()\n {\n return $this->data->date;\n }", "public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDateOfBirth()\n {\n return $this->_dateOfBirth;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->Date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }" ]
[ "0.6235212", "0.5960689", "0.58786935", "0.585748", "0.5822755", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5779717", "0.5765219", "0.5765219", "0.5765219", "0.5765219", "0.57644606", "0.5754486", "0.57514066", "0.5728115", "0.5728115", "0.5728115" ]
0.6124102
1
Gets the identities property value. Represents the identities that can be used to sign in to this user account. An identity can be provided by Microsoft (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and tied to a user account. May contain multiple items with the same signInType value. Supports $filter (eq) including on null values, only where the signInType is not userPrincipalName.
public function getIdentities(): ?array { $val = $this->getBackingStore()->get('identities'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, ObjectIdentity::class); /** @var array<ObjectIdentity>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'identities'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdentifications() {\n return $this->identifications;\n }", "public function getIdentityType()\n {\n return $this->identityType;\n }", "public function getIdentities()\n {\n $identities = [];\n if ($this->getId()) {\n $identities = [self::CACHE_TAG . '_' . $this->getId()];\n }\n return $identities;\n }", "public function getUserIdsIn()\r\n {\r\n \treturn $this->_userIdsIn;\r\n }", "public function get_all_identity()\n {\n $sentence = new SentenceUtil();\n $sentence->fromCommand(\"/system/identity/getall\");\n $this->talker->send($sentence);\n $rs = $this->talker->getResult();\n return $rs->getResultArray();\n }", "public function getIdentity()\n {\n return $this->identity;\n }", "public function getIdentity()\n {\n return $this->identity;\n }", "public function getIdentity()\n {\n return $this->identity;\n }", "public function getIdentity()\n {\n if ($this->_identity === null) {\n $this->_identity = $this->_getCookies()->get($this->_identityKey);\n }\n return $this->_identity;\n }", "public function getIdentityRoles();", "public function list(IdentityListRequest $request = null): OxxaResult\n {\n $xml = $this\n ->client\n ->request(array_merge(\n ['command' => 'identity_list'],\n $request?->toArray() ?? []\n ));\n\n $statusDescription = $this->getStatusDescription($xml);\n if ($this->getStatusCode($xml) !== StatusCode::STATUS_IDENTITIES_RETRIEVED) {\n return new OxxaResult(\n success: false,\n message: $statusDescription\n );\n }\n\n $identities = [];\n $xml\n ->filter('channel > order > details > identity')\n ->each(function (Crawler $identityNode) use (&$identities) {\n $identities[] = new Identity(\n handle: $identityNode->filter('handle')->text(),\n alias: $identityNode->filter('alias')->text(),\n companyName: $identityNode->filter('company_name')->text(),\n name: $identityNode->filter('name')->text(),\n );\n });\n\n return new OxxaResult(\n success: true,\n message: $statusDescription,\n data: [\n 'identities' => $identities,\n ]\n );\n }", "protected function getIdentifiers($identity)\n {\n $userClass = array();\n\n if ($identity instanceof UserInterface) {\n $roles = $identity->getRoles();\n $userClass[] = '\"' . str_replace('\\\\', '\\\\\\\\', get_class($identity)) . '-' . $identity->getUserName() . '\"';\n } elseif (is_string($identity)) {\n $roles = array($identity);\n } else {\n return array();\n }\n\n $resolvedRoles = array();\n\n foreach ($roles as $role) {\n $resolvedRoles[] = '\"' . $role . '\"';\n $resolvedRoles = array_merge($resolvedRoles, $this->resolveRoles($role));\n }\n\n $identifiers = array_merge($userClass, array_unique($resolvedRoles));\n\n return $identifiers;\n }", "public function getIdentity() {\n return $this->session->get('auth-identity');\n }", "public function getUniqueIdentification(array $exclude = [])\n {\n $model = $this->model->where('isActive', 1);\n\n if ((bool) count($exclude)) {\n $model->whereNotIn('identification', $exclude);\n }\n\n $response = $model->groupBy('identification')\n ->get(['identification'])->toArray();\n\n return $response;\n }", "static public function getIdentity()\r\n\t{\r\n\t\tif (!self::isLogged())\r\n\t\t\treturn null;\r\n\t\treturn self::getUser()->identity;\r\n\t}", "static public function getIdentity()\r\n\t{\r\n\t\tif (!self::isLogged())\r\n\t\t\treturn null;\r\n\t\treturn self::getUser()->identity;\r\n\t}", "public function getIdentity()\n {\n return $this->session->get('auth-identity');\n }", "public function getIdentity()\n {\n\n return $this->session->get('auth-identity');\n }", "public function getIdentity();", "public function getIdentity();", "public function getIdentity();", "public function getIdentity();", "public function getIdentityId()\n {\n return $this->identity_id;\n }", "public function getIdentity()\n {\n $auth = new AuthenticationService();\n\n if ($auth->hasIdentity()) {\n return $auth->getIdentity();\n }\n\n return false;\n }", "public function getInsuredPeople()\n {\n return isset($this->insuredPeople) ? $this->insuredPeople : null;\n }", "public function getIn()\n {\n return $this->get('in');\n }", "public function getIdentityResult() {\n return $this->identityResult;\n }", "public function getIdentity()\n {\n return $this->session->get('auth');\n }", "public function getIdentity() {\n return variable_get('salesforce_identity', FALSE);\n }", "function get($identity = null)\n {\n if (!isset($identity) || !isset($this->_identities[$identity])) {\n $identity = $this->_default;\n }\n return $this->_identities[$identity];\n }" ]
[ "0.5441574", "0.5315915", "0.5196306", "0.5159419", "0.50858766", "0.49559256", "0.49559256", "0.49559256", "0.49530903", "0.49386787", "0.4938043", "0.49106482", "0.48901185", "0.48867774", "0.48811767", "0.48811767", "0.48754227", "0.48635012", "0.4859764", "0.4859764", "0.4859764", "0.4859764", "0.48587987", "0.48368675", "0.48298958", "0.48279896", "0.48205724", "0.48029876", "0.48019093", "0.47906196" ]
0.5873633
0
Gets the imAddresses property value. The instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user. Readonly. Supports $filter (eq, not, ge, le, startsWith).
public function getImAddresses(): ?array { $val = $this->getBackingStore()->get('imAddresses'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, 'string'); /** @var array<string>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'imAddresses'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIpAddresses()\n {\n return $this->ip_addresses;\n }", "public function getAddresses() {\n\t\treturn $this->addresses;\n\t}", "public function getIpsArray()\n\t{\n\n\t\tif ($this->ips) {\n\t\t\t$ips = explode(',', trim($this->ips));\n\t\t\t\n\t\t\tforeach ($ips as $ip) {\n\t\t\t\t$allowedIps []= $ip;\n\t\t\t}\n\n\t\t\treturn $allowedIps;\n\t\t}\n\t}", "public function setIpAddresses($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->ip_addresses = $arr;\n\n return $this;\n }", "public function getAddresses() {\n return $this->addresses;\n }", "public function ips()\n {\n return $this->getClientIps();\n }", "public function ips()\n\t{\n\t\treturn $this->ip();\n\t}", "public function getAddresses()\n\t{\n\t\treturn $this->addresses;\n\t}", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function get_ips() {\n\t\tif ( ! defined( 'DOING_AJAX' ) || ! current_user_can( $this->plugin->admin->settings_cap ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcheck_ajax_referer( 'stream_get_ips', 'nonce' );\n\n\t\t$ips = $this->plugin->db->existing_records( 'ip' );\n\t\t$find = wp_stream_filter_input( INPUT_POST, 'find' );\n\n\t\tif ( isset( $find['term'] ) && '' !== $find['term'] ) {\n\t\t\t$ips = array_filter(\n\t\t\t\t$ips,\n\t\t\t\tfunction ( $ip ) use ( $find ) {\n\t\t\t\t\treturn 0 === strpos( $ip, $find['term'] );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif ( $ips ) {\n\t\t\twp_send_json_success( $ips );\n\t\t} else {\n\t\t\twp_send_json_error();\n\t\t}\n\t}", "public function inRangeIPs()\n {\n return array(\n array('12.34.56.78', '12.34.56.78', 32),\n array('0.0.0.1', '255.255.255.254', 0),\n array('12.34.143.96', '12.34.201.26', 16),\n array('12.34.255.252', '12.34.255.255', 30),\n array('::cff:103', '12.255.255.255', 5),\n );\n }", "public function getIPs()\n {\n return BaseObject::toRichObjectArray($this->invokeApiGet('IP_MANAGER'), Ip::class, $this );\n }", "public static function validIps(): array\n {\n $ips = self::find()\n ->select('ip')\n ->asArray()\n ->all();\n $valid_ips = ['127.0.0.1', '::1'];\n if (!empty($ips)) {\n foreach($ips as $key => $value) {\n //$valid_ips[] = inet_ntop($value['ip']);\n $valid_ips[] = $value['ip'];\n }\n }\n return $valid_ips;\n }", "public function get_ip_address_filter() {\n\t\treturn $this->client->GetIPAddressFilter();\n\t}", "function getIPRanges() {\n\t\treturn explode(SUBSCRIPTION_IP_RANGE_SEPERATOR, $this->getData('ipRange'));\n\t}", "public function multiCastIpAddresses()\n {\n return array(\n array('223.255.255.255', false),\n array('224.0.0.0', true),\n array('239.255.255.255', true),\n array('240.0.0.0', false),\n array('feff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', false),\n array('ff00::', true),\n array('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', true),\n );\n }", "public function getEmailAddresses()\n {\n return $this->email_addresses;\n }", "public function unspecifiedIpAddresses()\n {\n return array(\n array('0.0.0.0'),\n array('::0'),\n );\n }", "public function toArray()\n {\n $result = array();\n foreach ($this->addresses as $ip) {\n $result[] = long2ip($ip);\n }\n return $result;\n }", "public function getInvitations()\n {\n return $this->getValue('invitations');\n }", "public function getEmailAddresses()\n {\n return $this->emailAddresses;\n }", "public function ip()\n {\n $parameters = [];\n $parameters['name-only'] = true;\n\n return $this->call('list-shared-addresses', $parameters);\n }", "public function getSourceIpRanges()\n {\n return $this->source_ip_ranges;\n }", "public function privateUseIpAddresses()\n {\n return array(\n array('9.255.255.255', false),\n array('10.0.0.0', true),\n array('10.255.255.255', true),\n array('11.0.0.0', false),\n array('172.15.255.255', false),\n array('172.16.0.0', true),\n array('172.31.255.255', true),\n array('172.32.0.0', false),\n array('192.167.255.255', false),\n array('192.168.0.0', true),\n array('192.168.255.255', true),\n array('192.169.0.0', false),\n array('fcff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', false),\n array('fd00::', true),\n array('fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', true),\n array('fe00::', false),\n );\n }", "public function notInRangeIPs()\n {\n return array(\n array('0.0.0.1', '255.255.255.254', 1),\n array('12.34.143.96', '12.34.201.26', 18),\n array('12.34.255.230', '12.34.255.255', 31),\n array('::a8f2:103', '12.255.255.255', 5),\n );\n }", "public function getInsuredPeople()\n {\n return isset($this->insuredPeople) ? $this->insuredPeople : null;\n }", "function getIPRange() {\n\t\treturn $this->getData('ipRange');\n\t}", "public function ipAddresses()\n {\n return array_merge($this->ipAddressesVersion4(), $this->ipAddressesVersion6());\n }", "private function getServiceBindIps(): array\n {\n return [\n // You can customize the serviceable IPs\n ];\n }" ]
[ "0.6064924", "0.5642762", "0.56201637", "0.56081754", "0.560035", "0.55946356", "0.5585582", "0.5551839", "0.5547707", "0.5547707", "0.54618156", "0.5441839", "0.53629535", "0.53542745", "0.5310682", "0.52059686", "0.5202511", "0.51935273", "0.5185439", "0.5169561", "0.5168168", "0.51616746", "0.51606053", "0.5154718", "0.511175", "0.50538546", "0.50492066", "0.5020699", "0.50182945", "0.49411666" ]
0.582365
1
Gets the inferenceClassification property value. Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
public function getInferenceClassification(): ?InferenceClassification { $val = $this->getBackingStore()->get('inferenceClassification'); if (is_null($val) || $val instanceof InferenceClassification) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'inferenceClassification'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassification()\n {\n return $this->classification;\n }", "public function getDetectionConfidence()\n {\n return $this->detection_confidence;\n }", "public function setInferenceClassification(?InferenceClassification $value): void {\n $this->getBackingStore()->set('inferenceClassification', $value);\n }", "public function getIntentDetectionConfidence()\n {\n return $this->intent_detection_confidence;\n }", "public function getClassification(): ?string {\n $val = $this->getBackingStore()->get('classification');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'classification'\");\n }", "public function getConfidence()\r\n {\r\n return $this->confidence;\r\n }", "public function getConfidence()\n {\n return $this->confidence;\n }", "public function getConfidence()\n {\n return $this->confidence;\n }", "public function getConfidence() {\n return $this->confidence;\n }", "public function getConfidence() {\n return $this->confidence;\n }", "public function getDecisionType() {\n return $this->decisionType;\n }", "public function getClassification()\n{\nreturn $this->classification;\n}", "public function getClassificationEvaluationMetrics()\n {\n return $this->readOneof(8);\n }", "public function getClassifications() {\n\n\t\tif (self::CLASSIFICATION_MODE_OFF == $this->classificationMode)\n\t\t\treturn $this->classifications;\n\t\tif ($this->classificationMode == self::CLASSIFICATION_MODE_GLOBAL) {\n\t\t\trequire_once (SLS_DIR . 'lib/data/classification/ClassificationList.class.php');\n\t\t\t$this->classificationList = new ClassificationList();\n\t\t}\n\t\tif ($this->classificationMode == self::CLASSIFICATION_MODE_LIBRARY) {\n\t\t\trequire_once (SLS_DIR . 'lib/data/classification/LibraryClassificationList.class.php');\n\t\t\t$this->classificationList = new LibraryClassificationList($this->libraryID);\n\t\t}\n\t\t$this->classificationList->readClassifications();\n\t\t$this->classifications = $this->classificationList->classification;\n\t\treturn $this->classifications;\n\t}", "public function getClassificationId()\n {\n return $this->classification_id;\n }", "public function getClassificationMessageAttribute()\n {\n if ($this->classification_id !== null && $this->classification_level !== null) {\n return $this->classification->key . '-0' . $this->classification_level;\n }\n return null;\n }", "public function setDetectionConfidence($var)\n {\n GPBUtil::checkFloat($var);\n $this->detection_confidence = $var;\n\n return $this;\n }", "public function getSpeechRecognitionConfidence()\n {\n return $this->speech_recognition_confidence;\n }", "public function setClassificationEvaluationMetrics($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AutoMl\\V1beta1\\ClassificationEvaluationMetrics::class);\n $this->writeOneof(8, $var);\n\n return $this;\n }", "public function getDecision(): ?string\n {\n return $this->_decision;\n }", "function get_decision()\n {\n return $this->get_default_property(self::PROPERTY_DECISION);\n }", "public function getHumanReviewStatus()\n {\n return $this->human_review_status;\n }", "public function getClassificationCodeAttribute()\n {\n if ($this->classification_id !== null) {\n return $this->classification->key;\n }\n return null;\n }", "public function getInfluenceScore(){\n\t\treturn $this->influenceScore;\n\t}", "public function getNeutered()\n {\n return $this->neutered;\n }", "public function getInterpretation() {\n return $this->interpretation;\n }", "public function getStatus()\n {\n if (array_key_exists(\"status\", $this->_propDict)) {\n if (is_a($this->_propDict[\"status\"], \"\\Beta\\Microsoft\\Graph\\Model\\RecommendationStatus\") || is_null($this->_propDict[\"status\"])) {\n return $this->_propDict[\"status\"];\n } else {\n $this->_propDict[\"status\"] = new RecommendationStatus($this->_propDict[\"status\"]);\n return $this->_propDict[\"status\"];\n }\n }\n return null;\n }", "public function getDispensaryAttention() {\n\t\treturn ($this->dispensaryAttention);\n\t}", "public function getUserImpact()\n {\n if (!$this->isPropertyAvailable(\"UserImpact\")) {\n return null;\n }\n return $this->getProperty(\"UserImpact\");\n }", "public function getArticleSuggestion()\n {\n return $this->readOneof(6);\n }" ]
[ "0.6066184", "0.5671566", "0.5582196", "0.53872484", "0.52379364", "0.51897997", "0.5157347", "0.5157347", "0.5143819", "0.5143819", "0.51179194", "0.51167256", "0.5079367", "0.506996", "0.50455534", "0.50016975", "0.49740136", "0.49009982", "0.48734334", "0.47882235", "0.4775983", "0.47598875", "0.46252155", "0.4616158", "0.46066722", "0.45845908", "0.45815393", "0.4567248", "0.4552092", "0.45374906" ]
0.63639724
0
Gets the informationProtection property value. The informationProtection property
public function getInformationProtection(): ?InformationProtection { $val = $this->getBackingStore()->get('informationProtection'); if (is_null($val) || $val instanceof InformationProtection) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'informationProtection'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProtectionCode()\n {\n return trim($this->getParameter('protectionCode'));\n }", "public function getProtection()\n {\n if (array_key_exists(\"protection\", $this->_propDict)) {\n if (is_a($this->_propDict[\"protection\"], \"\\Beta\\Microsoft\\Graph\\Model\\WorkbookWorksheetProtection\") || is_null($this->_propDict[\"protection\"])) {\n return $this->_propDict[\"protection\"];\n } else {\n $this->_propDict[\"protection\"] = new WorkbookWorksheetProtection($this->_propDict[\"protection\"]);\n return $this->_propDict[\"protection\"];\n }\n }\n return null;\n }", "public function getPurchaseProtection()\n {\n return $this->purchaseProtection;\n }", "public function getDeletionProtection()\n {\n return isset($this->deletion_protection) ? $this->deletion_protection : false;\n }", "public function getInformation() {\r\n return $this->information->getValue();\r\n }", "public static function getProtected()\n {\n return self::$visibility['protected'];\n }", "public function getBuyerProtection()\n {\n return $this->buyerProtection;\n }", "public function getConfidentiality()\n {\n return $this->confidentiality;\n }", "public function getConfidentiality() {\n return $this->confidentiality;\n }", "public function getInformationUsage()\n {\n return $this->informationUsage;\n }", "public function setInformationProtection(?InformationProtection $value): void {\n $this->getBackingStore()->set('informationProtection', $value);\n }", "public function getInformation()\n {\n return $this->information;\n }", "public function getProtectionPeriod()\n {\n return (int)$this->getParameter('protectionPeriod');\n }", "public function getProtectedValue()\n\t\t{\n\t\t\t//returning value from protected method\n\t\t\treturn $this->getValue();\n\t\t}", "public function getSecurityInformation();", "public function getApplyBuyerProtection()\n {\n return $this->applyBuyerProtection;\n }", "public function getIdentificationSecret()\n {\n return $this->secretKey;\n }", "public function getPropertyInsurancePolicyInfo()\n {\n return isset($this->PropertyInsurancePolicyInfo) ? $this->PropertyInsurancePolicyInfo : null;\n }", "public function getBuyerProtectionStatus()\n {\n return $this->buyerProtectionStatus;\n }", "public function getAdditionalInformation()\n {\n return 'StoragePid='.$this->storagePid ;\n }", "public static function getInfo(){\n return self::$info;\n }", "public function getInformationStatus()\n {\n return $this->informationStatus;\n }", "public function getSecret()\n {\n return $this->getProperty(self::SECRET);\n }", "public function getStorageRequireEncryption()\n {\n if (array_key_exists(\"storageRequireEncryption\", $this->_propDict)) {\n return $this->_propDict[\"storageRequireEncryption\"];\n } else {\n return null;\n }\n }", "function getPrivacyPolicy()\n {\n return $this->privacyPolicy;\n }", "public function getDigitalGoodInfo()\n {\n return $this->digitalGoodInfo;\n }", "public function getAdditionalInformation()\n {\n if (array_key_exists(\"additionalInformation\", $this->_propDict)) {\n return $this->_propDict[\"additionalInformation\"];\n } else {\n return null;\n }\n }", "public function getAdditionalInformation()\n {\n if (array_key_exists(\"additionalInformation\", $this->_propDict)) {\n return $this->_propDict[\"additionalInformation\"];\n } else {\n return null;\n }\n }", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getSafety() {\n return $this->safety;\n }" ]
[ "0.6641999", "0.6583854", "0.6554769", "0.63057446", "0.62483084", "0.62424856", "0.6117742", "0.60625654", "0.60451096", "0.59897554", "0.59493136", "0.5840139", "0.57681936", "0.57231456", "0.5695297", "0.5668424", "0.5649848", "0.5606508", "0.5596686", "0.5546754", "0.5509108", "0.5474004", "0.54270256", "0.54137313", "0.54037595", "0.539024", "0.5372124", "0.5369579", "0.5363942", "0.53481954" ]
0.7053142
0
Gets the isLicenseReconciliationNeeded property value. Indicates whether the user is pending an exchange mailbox license assignment. Readonly. Supports $filter (eq where true only).
public function getIsLicenseReconciliationNeeded(): ?bool { $val = $this->getBackingStore()->get('isLicenseReconciliationNeeded'); if (is_null($val) || is_bool($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'isLicenseReconciliationNeeded'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkLicense()\n {\n $result = true;\n if (\\XLite::isFreeLicense()\n && 'license_restriction' == \\XLite\\Core\\Request::getInstance()->page\n ) {\n $result = false;\n }\n\n return $result;\n }", "public function isLicenseValid()\n {\n return array_get($this->response, 'license_valid');\n }", "public function needSubscription()\n {\n return $this->need_subscription;\n }", "public function getAppliedLicense()\n {\n return $this->applied_license;\n }", "public function getRepriceRequired()\n {\n return $this->repriceRequired;\n }", "public function getRepriceRequired()\n {\n return $this->repriceRequired;\n }", "public function requiresValidLicense()\n {\n if (is_null(static::$requiresLicense)) {\n if ($countMemberWithCPAccess = ee()->cache->get('cp_member_count')) {\n static::$requiresLicense = ($countMemberWithCPAccess > 1);\n\n return static::$requiresLicense;\n }\n\n $cpRoleIds = ee('db')->distinct()->select('role_id')->from('permissions')->where('permission', 'can_access_cp')->get();\n $cpRoles = [1];\n foreach ($cpRoleIds->result_array() as $row) {\n $cpRoles[] = $row['role_id'];\n }\n $cpRolesList = implode(', ', array_unique($cpRoles));\n $countMemberWithCPAccessQuery = \"SELECT COUNT(DISTINCT(exp_members.member_id)) AS count\n FROM exp_members\n LEFT JOIN exp_members_roles ON (exp_members.member_id = exp_members_roles.member_id)\n LEFT JOIN exp_members_role_groups ON (exp_members.member_id = exp_members_role_groups.member_id)\n LEFT JOIN exp_roles_role_groups ON (exp_members_role_groups.group_id = exp_roles_role_groups.group_id)\n WHERE exp_members.role_id IN ({$cpRolesList})\n OR exp_members_roles.role_id IN ({$cpRolesList})\n OR exp_roles_role_groups.role_id IN ({$cpRolesList})\";\n $countMemberWithCPAccess = ee()->db->query($countMemberWithCPAccessQuery)->row('count');\n ee()->cache->save('cp_member_count', $countMemberWithCPAccess, 60);\n\n static::$requiresLicense = ($countMemberWithCPAccess > 1);\n }\n\n return static::$requiresLicense;\n }", "public function authorize()\n {\n return $this->user() && config('currency.recharge.status', true);\n }", "public function isItemsRequiredInDebitRequest()\n {\n return $this->blIsItemsRequiredInDebitRequest;\n }", "public function getIsProprietary();", "public function getAutoRenewStatus(): bool\n {\n return $this->auto_renew_status;\n }", "public function hasLicenseFile()\n {\n return $this->license_file !== null;\n }", "function is_license_active() {\r\n\r\n\t\t$current_options = get_option( $this->licence_key_option );\r\n\r\n\t\tif ( isset( $current_options[\"license_key\"] ) && isset( $current_options['license_status'] ) && $current_options['license_status'] == 'valid' ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public function getCambiarRequisitoLegal()\n\t{\n\t\tif($this->criterio_requisito_legal==0)\n\t\t{\n\t\t\treturn \"no\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"si\";\n\t\t}\n\t}", "public function hasRenewPending()\n {\n return ($this->hasError() && in_array($this->getError()[\"type\"], ['renew']));\n }", "public function getCanToggleRenew() : bool\n {\n return $this->canToggleRenew;\n }", "public function isDrivingLicence()\n {\n return $this->drivingLicence;\n }", "function edd_check_license() {\r\n\r\n\t\tglobal $wp_version;\r\n\r\n\t\t// retrieve the license from the database\r\n\t\t$license = $this->get_license();\r\n\r\n\t\t$api_params = array(\r\n\t\t\t'edd_action' => 'check_license',\r\n\t\t\t'license' => $license,\r\n\t\t\t'item_name' => urlencode( $this->item_name )\r\n\t\t);\r\n\r\n\t\t// Call the custom API.\r\n\t\t$response = wp_remote_get( add_query_arg( $api_params, $this->store_url ), array(\r\n\t\t\t'timeout' => 15,\r\n\t\t\t'sslverify' => false\r\n\t\t) );\r\n\r\n\r\n\t\tif ( is_wp_error( $response ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\r\n\r\n\t\tif ( $license_data->license == 'valid' ) {\r\n\t\t\treturn 'valid';\r\n\t\t\t// this license is still valid\r\n\t\t} else {\r\n\t\t\t// this license is no longer valid\r\n\t\t\t$_POST['option_page'] = $this->licence_key_setting;\r\n\t\t\t$this->edd_wordimpress_deactivate_license( $plugin_deactivate = true );\r\n\r\n\t\t\treturn 'invalid';\r\n\t\t}\r\n\t}", "public function getIsResidential()\n {\n $is_residential = $this->attributes->mayHave('is_residential')->value();\n if ($is_residential === null) {\n return null;\n }\n\n return (bool)$is_residential;\n }", "public function getRenewAuto() : bool\n {\n return $this->renewAuto;\n }", "function is_reserved(){\n\t $result = false;\n\t if( $this->booking_status == 0 && get_option('dbem_bookings_approval_reserved') ){\n\t $result = true;\n\t }elseif( $this->booking_status == 0 && !get_option('dbem_bookings_approval') ){\n\t $result = true;\n\t }elseif( $this->booking_status == 1 ){\n\t $result = true;\n\t }\n\t return apply_filters('em_booking_is_reserved', $result, $this);\n\t}", "public function setIsLicenseReconciliationNeeded(?bool $value): void {\n $this->getBackingStore()->set('isLicenseReconciliationNeeded', $value);\n }", "public function checkEnabled()\n {\n return Mage::getStoreConfigFlag('iparcel/international_customer/enable');\n }", "public function getHasSubscribedToPremium(): bool {\r\n return $this->hasSubscribedToPremium;\r\n }", "public function getIsCustomerAgreement(): ?bool\n {\n return $this->isCustomerAgreement;\n }", "public function getAdditionalLicenses()\n {\n return $this->additional_licenses;\n }", "public static function activate_license() {\n\t\t$license_data = self::api( 'activate_license' );\n\n\t\tif ( is_object( $license_data ) ) {\n\t\t\t// $license_data->license will be either \"deactivated\" or \"failed\"\n\t\t\tif ( $license_data->license == 'valid' ) {\n\t\t\t\tupdate_option( self::LICENSE_STATUS, $license_data->license );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function LicenseStatus($module) {\n\t\t\tglobal $WishListMemberInstance;\n\t\t\t$LicenseStatusOption = $module . 'LicenseStatus';\n\t\t\t$LicenseKeyOption = $module . 'LicenseKey';\n\t\t\t$LicenseEmailOption = $module . 'LicenseEmail';\n\t\t\t$WPWLKey = $WishListMemberInstance->GetOption($LicenseKeyOption);\n\t\t\t$WPWLEmail = $WishListMemberInstance->GetOption($LicenseEmailOption);\n\t\t\t\n\t\t\tif(empty($WPWLKey) || empty($WPWLEmail)) {\n\t\t\t\treturn 0;\n\t\t\t}else{\n\t\t\t\treturn $WishListMemberInstance->GetOption($LicenseStatusOption);\n\t\t\t}\n\t\t}", "public function reviewer_has_purchased_download() {\n\t\tglobal $post;\n\n\t\t$current_user = wp_get_current_user();\n\n\t\tif ( edd_has_user_purchased( $current_user->user_email, $post->ID ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getOptsIntoDonationReceipt(): bool {\n\t\treturn $this->donor->wantsReceipt();\n\t}" ]
[ "0.6119588", "0.60301465", "0.5916219", "0.580678", "0.57957286", "0.57957286", "0.5687081", "0.5646635", "0.56182516", "0.5607016", "0.5604242", "0.5532138", "0.5525492", "0.5505358", "0.5452848", "0.5441672", "0.5436275", "0.53992414", "0.5397606", "0.53916204", "0.53825057", "0.5353946", "0.53439367", "0.5339301", "0.53310347", "0.5313971", "0.5282917", "0.5282204", "0.528125", "0.5259736" ]
0.62602985
0
Gets the joinedGroups property value. The joinedGroups property
public function getJoinedGroups(): ?array { $val = $this->getBackingStore()->get('joinedGroups'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Group::class); /** @var array<Group>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'joinedGroups'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupsList()\n {\n return $this->getProperty(\"GroupsList\");\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->groups;\n }", "public function getGroups() {\n return $this->groups;\n }", "public function getGroups()\n {\n return $this->data[self::GROUPS];\n }", "public function get_joined_groups()\n {\n $user = $this->ion_auth->get_user();\n\n $query_string = \"SELECT group_id FROM group_relationships \" .\n \"WHERE user_joined_id = ?\";\n $query = $this->db->query($query_string, array($user->id));\n\n $return_array = array();\n foreach ($query->result() as $row)\n {\n $return_array[] = $row->group_id;\n }\n\n return $return_array;\n }", "public function getActiveGroups() {\n\t\treturn $this->active_groups; \n\t}", "public function get_groups()\n {\n\n return $this->groups;\n }", "public function getGroupsAttribute()\n {\n if (! isset($this->attributes['groups'])) {\n $this->attributes['groups'] = $this->relations['groups'] = Group::query()->where('id', Group::GUEST_ID)->get();\n }\n\n return $this->attributes['groups'];\n }", "public function getGroups();", "public function getGroups();", "public static function getGroups()\n {\n return static::$groups;\n }", "private function getActiveGroups()\n\t{\n\t\t$set = $this->getActiveSet();\n\t\t\n\t\tif (is_array($set))\n\t\t\treturn($set['groups']);\n\t\telse\n\t\t\treturn(false);\n\t}", "public function getCustomerGroupsProperty()\n {\n return CustomerGroup::get();\n }", "public function getCustomerGroupsProperty()\n {\n return CustomerGroup::get();\n }", "public function getGroup() {\n if(!isset($this->group)) \n {\n $mapper = new Application_Model_GroupsMapper();\n $this->group = $mapper->findWherePriKeyEquals($this->groups_id);\n }\n return $this->group;\n }", "function groups() {\n\t\treturn (is_array($this->profil['groups'])) ? $this->profil['groups'] : false;\n\t}", "public function getBaseGroups()\n\t{\n\t\treturn $this->baseGroups;\n\t}", "public function getGroups()\n {\n return $this->getObjectArray('groups');\n }", "public function getGroup()\n {\n return $this->getProperty(\"Group\");\n }", "public function groups()\n {\n // return $this->hasManyThrough(Group::class, UserGroup::class, 'user_id', 'group_id', 'id');\n $groups = Group::join('user_group', 'groups.id', '=', 'user_group.group_id')\n ->whereRaw('user_group.user_id = ? and user_group.active = 1 and groups.active = 1', [$this->id])\n ->get(['groups.*']);\n return $groups;\n }", "public function get_groups() \n\t{\n\t\treturn $this->db->get('navigation_groups')->result();\n\t}", "function getGroups()\n {\n $query = 'SELECT DISTINCT group_uid FROM ' . $this->_params['table'];\n\n Horde::logMessage('SQL Query by Horde_DataTree_Sql::getGroups(): ' . $query, 'DEBUG');\n\n return $this->_db->getCol($query);\n }", "public function groups()\n\t{\n\t\treturn $this->has_many_and_belongs_to('Group', 'users_groups');\n\t}", "public function get_group_name()\r\n {\r\n return $this->_group_name;\r\n }", "public function getGroupId()\n {\n return $this->groupId;\n }", "public function getGroupId()\n {\n return $this->group_id;\n }", "public function getGroupId()\n {\n return $this->group_id;\n }" ]
[ "0.6870439", "0.6651722", "0.6651722", "0.6651722", "0.6651722", "0.66437435", "0.65938675", "0.6591751", "0.65631884", "0.6500798", "0.637289", "0.6351296", "0.6351296", "0.6306183", "0.6290631", "0.62402326", "0.62402326", "0.61740655", "0.6170628", "0.6154384", "0.61535805", "0.6134502", "0.61153644", "0.60848755", "0.6067651", "0.6018788", "0.59631526", "0.5959937", "0.5943996", "0.5943996" ]
0.66929287
1
Gets the joinedTeams property value. The Microsoft Teams teams that the user is a member of. Readonly. Nullable.
public function getJoinedTeams(): ?array { $val = $this->getBackingStore()->get('joinedTeams'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, Team::class); /** @var array<Team>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'joinedTeams'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTeamMembers()\n {\n return $this->team_members;\n }", "public static function usesTeams()\n {\n return in_array(CanJoinTeams::class, class_uses_recursive(static::userModel()));\n }", "public static function getLoggedInTeam() {\n return SessionUtil::isLoggedIn() ?\n TeamDao::getTeamById($_SESSION[SessionUtil::TEAM_KEY]) : null;\n }", "public function getTeams()\n {\n return Team::get();\n }", "public function getTeamMemberIds(): ?array\n {\n if (count($this->teamMemberIds) == 0) {\n return null;\n }\n return $this->teamMemberIds['value'];\n }", "public function getHasTeam ()\r\n {\r\n return $this->hasTeam;\r\n }", "public function getTeams()\r\n\t{\r\n\t\tif (!isset($this->teams))\r\n\t\t{\r\n\t\t\t$this->teams = $this->getClubManager()->getTeams(true);\r\n\t\t}\r\n\t\treturn $this->teams;\r\n\t}", "public function team_members()\n\t{\n\t\treturn $this->hasMany('App\\User', 'team_id', 'team_id');\n\t}", "function team()\n {\n $teams = Auth::user()->teams();\n return $teams[0];\n }", "public function getTeam()\n {\n return $this->team;\n }", "public function setJoinedTeams(?array $value): void {\n $this->getBackingStore()->set('joinedTeams', $value);\n }", "public function getTeam()\n {\n return Wrapper\\Team\\Senior::team($this->getTeamId());\n }", "public function getTeam() {\n return $this->teamId;\n }", "public static function get_current_streamer_team(){\n if (is_user_logged_in()):\n $teams = get_posts(array(\n 'post_type' => 'teams',\n 'post_status' => 'any',\n 'author' => get_current_user_id()\n ));\n if (!empty($teams)):\n return $teams;\n else:\n return;\n endif;\n else: \n return;\n endif; \n }", "public function dept_team_members()\n {\n return $this->hasMany(User::class, 'team_lead');\n }", "public function getLocalUsersOrGroups()\n {\n if (array_key_exists(\"localUsersOrGroups\", $this->_propDict)) {\n if (is_a($this->_propDict[\"localUsersOrGroups\"], \"\\Beta\\Microsoft\\Graph\\Model\\DeviceManagementUserRightsLocalUserOrGroup\") || is_null($this->_propDict[\"localUsersOrGroups\"])) {\n return $this->_propDict[\"localUsersOrGroups\"];\n } else {\n $this->_propDict[\"localUsersOrGroups\"] = new DeviceManagementUserRightsLocalUserOrGroup($this->_propDict[\"localUsersOrGroups\"]);\n return $this->_propDict[\"localUsersOrGroups\"];\n }\n }\n return null;\n }", "public function getCurrentTeamAttribute()\n {\n return $this->currentTeam();\n }", "public function getJoiningValue()\n {\n if (array_key_exists(\"joiningValue\", $this->_propDict)) {\n return $this->_propDict[\"joiningValue\"];\n } else {\n return null;\n }\n }", "public function getTeamsAppId()\n {\n if (array_key_exists(\"teamsAppId\", $this->_propDict)) {\n return $this->_propDict[\"teamsAppId\"];\n } else {\n return null;\n }\n }", "public function get_team_id()\n {\n return $this->team_id;\n }", "function GetJoinedTeamLadderByTeamId( $team_id )\n\t{\n\t\t$sql_query \t= \t\" SELECT ladder_parts.*, ladder_parts.participant_id AS team_id, ladder_parts.id AS part_id, ladders.*, game_pool.name AS game_name, game_pool.id AS game_id, game_pool.token AS game_token \".\n\t\t\t\t\t\t\" FROM `{$GLOBALS['g_egltb_ladder_participants']}` AS ladder_parts \".\n\t\t\t\t\t\t\" LEFT JOIN `{$GLOBALS['g_egltb_ladders']}` AS ladders \".\n\t\t\t\t\t\t\" ON ladder_parts.ladder_id=ladders.id \".\n\t\t\t\t\t\t//\" LEFT JOIN `{$GLOBALS['g_egltb_teams']}` AS teams \".\n\t\t\t\t\t\t//\" ON teams.id=ladder_parts.participant_id \".\n\t\t\t\t\t\t\" LEFT JOIN `{$GLOBALS['g_egltb_game_pool']}` AS game_pool \".\n\t\t\t\t\t\t\" ON game_pool.id=ladders.game_id \".\n\t\t\t\t\t\t\" WHERE ladder_parts.participant_id=\".(int)$team_id.\" && ladders.participant_type=\".PARTTYPE_TEAM.\" \";\n\t\treturn $this->pDBInterfaceCon->FetchArrayObject( $this->pDBInterfaceCon->Query( $sql_query ) );\n\t}", "public function getTeamChatMessages()\n {\n if (array_key_exists(\"teamChatMessages\", $this->_propDict)) {\n return $this->_propDict[\"teamChatMessages\"];\n } else {\n return null;\n }\n }", "public function team()\n {\n $team = request()->user()->team;\n\n if($team) {\n return $team->team_name;\n }\n else {\n return \"no_team\";\n }\n }", "public static function getUserTeams($id)\n {\n $teams_member = \\frontend\\models\\TeamMember::find()->where(['user_id' => $id])->all();\n // for each relation...\n foreach ($teams_member as $team_member) {\n // ...store team name in an array\n $user_team[] = \\frontend\\models\\Team::find()->where(['id' => $team_member['team_id']])->one();\n }\n\n return $user_team;\n }", "public function getCurrentTeamRoleAttribute()\n {\n return $this->teamRoles()->wherePivot('team_id', $this->currentTeam->id)->first();\n }", "public function getMemberOf ()\n {\n return $this->memberOf;\n }", "public function setTeamMembers($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->team_members = $arr;\n\n return $this;\n }", "function get_team_leaders() {\n return get_users(\"super\");\n}", "public function getTeamId()\n {\n return $this->team_id;\n }", "public function getTeamId()\n {\n return $this->teamId;\n }" ]
[ "0.5778081", "0.5678824", "0.5595688", "0.55476344", "0.5539586", "0.5402153", "0.53924775", "0.5289023", "0.5285871", "0.52738696", "0.5251755", "0.5244796", "0.5191351", "0.5083835", "0.50813776", "0.5064653", "0.5059295", "0.5051345", "0.5045198", "0.503272", "0.5023715", "0.5022925", "0.50189894", "0.50138515", "0.5010579", "0.5009665", "0.500964", "0.49981698", "0.4996469", "0.4992471" ]
0.6461467
0
Gets the legalAgeGroupClassification property value. Used by enterprise applications to determine the legal age group of the user. This property is readonly and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, MinorWithOutParentalConsent, MinorWithParentalConsent, MinorNoParentalConsentRequired, NotAdult and Adult. Refer to the legal age group property definitions for further information. Returned only on $select.
public function getLegalAgeGroupClassification(): ?string { $val = $this->getBackingStore()->get('legalAgeGroupClassification'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'legalAgeGroupClassification'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAge()\n {\n return $this->ageGroup;\n }", "public function setLegalAgeGroupClassification(?string $value): void {\n $this->getBackingStore()->set('legalAgeGroupClassification', $value);\n }", "public function getAgeGroup(): ?string {\n $val = $this->getBackingStore()->get('ageGroup');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'ageGroup'\");\n }", "public function getAgeRange()\n {\n return $this->readOneof(1);\n }", "public function getAgeRange()\n {\n return $this->readOneof(1);\n }", "public function getLvlAgility()\n {\n return $this->lvlAgility;\n }", "public function getGestationalAge(): ?FHIRRange\n\t{\n\t\treturn $this->gestationalAge;\n\t}", "public function getAgeMax() {\n\t\t$ageMaxResults = $this->getInt('age_range_maximum');\n\t\treturn $ageMaxResults;\n\t}", "public function getMedicalAllergyGroup()\n {\n return $this->hasOne(MedicalAllergyGroup::className(), ['allergyCategoryId' => 'id']);\n }", "public function getGroup() {\n\t\treturn $this->_groupClass;\n\t}", "public function getAgeRange()\n {\n return $this->age_range;\n }", "public function getAge(): ?FHIRRange\n\t{\n\t\treturn $this->age;\n\t}", "public function getGroup()\n {\n return $this->readOneof(14);\n }", "public function getEffectiveGroup() {\n return $this->system->groupByID(posix_getegid());\n }", "public function getYearGroups()\n\t{\n\t\treturn $this->yearGroup;\n\t}", "public function getTypicalAgeRange() {\n\t\treturn $this->typicalAgeRange;\n\t}", "public function getGroup()\n {\n return $this->getProperty(\"Group\");\n }", "public function getGroup() {\n if(!isset($this->group)) \n {\n $mapper = new Application_Model_GroupsMapper();\n $this->group = $mapper->findWherePriKeyEquals($this->groups_id);\n }\n return $this->group;\n }", "public function getGroup()\n {\n return 91;\n }", "public function group() {\n return entity_load($this->group_type, $this->gid);\n }", "public function get_group_representative() {\n return $this->group_representative;\n }", "public function getOldCustomerGroup()\n {\n if (is_null($this->oldCustomerGroup)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_OLD_CUSTOMER_GROUP);\n if (is_null($data)) {\n return null;\n }\n\n $this->oldCustomerGroup = CustomerGroupReferenceModel::of($data);\n }\n\n return $this->oldCustomerGroup;\n }", "public function getSponsorEligibilityCoGroup($coId) {\n // First check the mode\n $mode = $this->getSponsorEligibility($coId);\n \n if($mode != SponsorEligibilityEnum::CoGroupMember) {\n throw new InvalidArgumentException(_txt('er.setting'));\n }\n \n return $this->lookupValue($coId, 'sponsor_co_group_id');\n }", "public function group() {\n\t\treturn ( $role = $this->getRoles()->sortBy( 'group' )->first() ) ? $role->group : 'default';\n\t}", "function isAgeGroup($user, $ageGroup, $isDefault = false)\n{\n\t# if there is a profile, the age group has been set by the user and the ageGroup ID is the one passed through\n\tif(isset($user['profile']) && isset($user['profile']['ageGroup']) and $user['profile']['ageGroup'] == $ageGroup)\n\t{\n\t\t# set the radio button to checked\n\t\treturn 'checked=\"checked\"';\n\t}\n\t# if there is a profile but the age group hasn't been set by the user AND this is the default option\n\telse if(isset($user['profile']) && ! isset($user['profile']['ageGroup']) && $isDefault())\n\t{\n\t\t# set the radio button to checked\n\t\treturn 'checked=\"checked\"';\n\t}\n\t# anything else, return an empty string\n\telse\n\t{\n\t\treturn '';\n\t}\n}", "public function getGroup()\n {\n return $this->readOneof(3);\n }", "public function getGroupClass()\n {\n if (isset($this->groupList[$this->group]))\n return $this->groupList[$this->group];\n return NULL;\n }", "public function getGroupCategoryID()\n {\n return $this->groupCategoryID;\n }", "public function getGroupSkill(){\n return($this->groupSkill);\n }", "public function garage(): string\n {\n if (intval($this->garage_impound) === 1) {\n return 'Impound Lot';\n } else if (intval($this->garage_state) === 0) {\n return 'Out';\n }\n\n $this->garage_identifier = trim($this->garage_identifier);\n\n if (is_numeric($this->garage_identifier)) {\n if (intval($this->emergency_type) === 1) {\n return 'PD Garage';\n } else if (intval($this->emergency_type) === 2) {\n return 'EMS Garage';\n }\n\n switch (intval($this->garage_identifier)) {\n case 1:\n case 2:\n case 3:\n return 'Impound Lot';\n case 4:\n return 'Garage A (near court house)';\n case 5:\n return 'Garage B (near exclusive dealership)';\n case 6:\n return 'Garage C (the big red building)';\n case 7:\n return 'Garage D (southside garage)';\n case 8:\n return 'Garage E (mirror park garage)';\n case 9:\n return 'Garage F (vinewood garage)';\n case 10:\n return 'Garage G (near great ocean highway)';\n case 11:\n return 'Garage H (sandy shores garage)';\n case 12:\n return 'Garage I (paleto garage)';\n case 14:\n return 'Garage J (cayo compound)';\n case 15:\n return 'Garage K (cayo airfield)';\n case 17:\n return 'LSIA';\n case 18:\n return 'MRPD';\n case 19:\n return 'Mount Zonah Medical Center';\n case 21:\n return 'Luxury Autos';\n }\n }\n\n return $this->garage_identifier;\n }" ]
[ "0.5801663", "0.53332967", "0.50921047", "0.50419706", "0.50419706", "0.49413082", "0.48764277", "0.48599297", "0.4846753", "0.4814494", "0.47753662", "0.47667828", "0.47657412", "0.47471178", "0.4718345", "0.4638361", "0.46313852", "0.459858", "0.45938006", "0.45701587", "0.45600268", "0.45473614", "0.4539999", "0.4533845", "0.45337617", "0.45316133", "0.45134938", "0.45016015", "0.44739646", "0.4448978" ]
0.6342718
0
Gets the licenseAssignmentStates property value. State of license assignments for this user. Also indicates licenses that are directlyassigned and those that the user has inherited through group memberships. Readonly. Returned only on $select.
public function getLicenseAssignmentStates(): ?array { $val = $this->getBackingStore()->get('licenseAssignmentStates'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, LicenseAssignmentState::class); /** @var array<LicenseAssignmentState>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'licenseAssignmentStates'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function licenseCurrentStages()\n {\n return $this->hasMany('CityBoard\\Entities\\LicenseCurrentStage');\n }", "public function getLicenseCodes()\n {\n return $this->license_codes;\n }", "public function getAssignmentState()\n {\n if (array_key_exists(\"assignmentState\", $this->_propDict)) {\n return $this->_propDict[\"assignmentState\"];\n } else {\n return null;\n }\n }", "public function getAssignedLicenses(): ?array {\n $val = $this->getBackingStore()->get('assignedLicenses');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, AssignedLicense::class);\n /** @var array<AssignedLicense>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'assignedLicenses'\");\n }", "public function getLicenses()\n {\n return $this->licenses;\n }", "public function getStates() {\r\n\t\treturn $this->states;\r\n\t}", "public function licenseStatus()\n {\n return $this->belongsTo('CityBoard\\Entities\\LicenseStatus');\n }", "protected function get_network_license_state_string() {\n\t\t\t$states = array(\n\t\t\t\t'licensed' => esc_html__( 'A valid license has been entered by your network administrator.', 'tribe-common' ),\n\t\t\t\t'not-licensed' => esc_html__( 'No license entered. Consult your network administrator.', 'tribe-common' ),\n\t\t\t\t'expired' => esc_html__( 'Expired license. Consult your network administrator.', 'tribe-common' ),\n\t\t\t);\n\n\t\t\t$response = $this->validate_key( $this->get_key( 'network' ), true );\n\n\t\t\tif ( isset( $response['status'] ) && 1 === (int) $response['status'] ) {\n\t\t\t\t$state = 'licensed';\n\t\t\t} elseif ( isset( $response['api_expired'] ) && true === (boolean) $response['api_expired'] ) {\n\t\t\t\t$state = 'expired';\n\t\t\t} else {\n\t\t\t\t$state = 'not-licensed';\n\t\t\t}\n\n\t\t\treturn $states[ $state ];\n\t\t}", "public function states()\n\t{\n\t\treturn $this->states;\n\t}", "public function statesProvider() {\n return [\n [OgMembershipInterface::STATE_ACTIVE, 'isActive'],\n [OgMembershipInterface::STATE_PENDING, 'isPending'],\n [OgMembershipInterface::STATE_BLOCKED, 'isBlocked'],\n ];\n }", "public function getAssignments() {\n return $this->assignments;\n }", "public static function getStates() {\n try\n {\n $states = User::where('user_type','=',User::IS_BEAUTICIAN)->groupBy('state')->orderBy('state')->select('state','commission_percent')->get();\n static::$data['states'] = $states;\n\n } catch (\\Exception $e) {\n static::setExceptionError($e);\n }\n\n return static::$data;\n }", "public function getStateSelections() {\n\t\t$this->loadStates();\n\n\t\t$ret = NULL;\n\n\t\tif(!empty($this->selectedState)) {\n\t\t\t$ret = $this->selectedState;\n\t\t} else if(!empty($this->selectedSet)) {\n\t\t\t$ret = reset($this->selectedSet)->set;\n\t\t}\n\n\t\treturn $ret;\n\t}", "public static function getStates()\n {\n return array('ACTIVE', 'DISABLED', 'DELETED');\n }", "public function getAccessLevels()\n {\n return $this->access_levels;\n }", "public static function getUserStates()\n {\n return [\n self::STATUS_ACTIVE,\n self::STATUS_REJECTED,\n self::STATUS_WAITING_REQUEST_CONFIRM\n ];\n }", "public function getLicenses()\n {\n $return = array();\n $licenses = $this->getRelationship('licenses', $this);\n\n switch(count($licenses)) {\n case 0:\n return null;\n case 1:\n return new License($licenses[0]);\n default:\n foreach($licenses as $license) {\n $return[] = new License($license);\n }\n return $return;\n }\n }", "function allowedAssignStateIDList(eZUser $user = null)\n {\n if (!$user instanceof eZUser) {\n $user = eZUser::currentUser();\n }\n\n $access = $user->hasAccessTo('state', 'assign');\n\n $db = eZDB::instance();\n $sql = 'SELECT ezcobj_state.id\n FROM ezcobj_state, ezcobj_state_group\n WHERE ezcobj_state.group_id = ezcobj_state_group.id\n AND ezcobj_state_group.identifier NOT LIKE \\'ez%\\'';\n if ($access['accessWord'] == 'yes') {\n $allowedStateIDList = $db->arrayQuery($sql, array('column' => 'id'));\n } else {\n if ($access['accessWord'] == 'limited') {\n $userID = $user->attribute('contentobject_id');\n $classID = $this->attribute('contentclass_id');\n $ownerID = $this->attribute('owner_id');\n $sectionID = $this->attribute('section_id');\n $stateIDArray = $this->attribute('state_id_array');\n\n $allowedStateIDList = array();\n foreach ($access['policies'] as $policy) {\n foreach ($policy as $ident => $values) {\n $allowed = true;\n\n switch ($ident) {\n case 'Class': {\n $allowed = in_array($classID, $values);\n }\n break;\n\n case 'Owner': {\n $allowed = in_array(1, $values) and $userID != $ownerID;\n }\n break;\n\n case 'Group': {\n $allowed = $this->checkGroupLimitationAccess($values, $userID) === 'allowed';\n }\n break;\n\n case 'Section':\n case 'User_Section': {\n $allowed = in_array($sectionID, $values);\n }\n break;\n\n default: {\n if (strncmp($ident, 'StateGroup_', 11) === 0) {\n $allowed = count(array_intersect($values, $stateIDArray)) > 0;\n }\n }\n }\n\n if (!$allowed) {\n continue 2;\n }\n }\n\n if (isset($policy['NewState']) and count($policy['NewState']) > 0) {\n $allowedStateIDList = array_merge($allowedStateIDList, $policy['NewState']);\n } else {\n $allowedStateIDList = $db->arrayQuery($sql, array('column' => 'id'));\n break;\n }\n }\n\n $allowedStateIDList = array_merge($allowedStateIDList, $stateIDArray);\n } else {\n $stateIDArray = $this->attribute('state_id_array');\n $allowedStateIDList = $stateIDArray;\n }\n }\n\n $allowedStateIDList = array_unique($allowedStateIDList);\n\n return $allowedStateIDList;\n }", "public function getAgentAssignments()\n {\n return $this->hasMany(AgentAssignment::className(), ['user_id' => 'user_id']);\n }", "public function getStates()\n {\n if (self::$_states === null) {\n self::$_states = [\n self::STATE_OPEN => __('Pending'),\n self::STATE_PAID => __('Paid'),\n self::STATE_CANCELED => __('Canceled'),\n self::STATE_REFUND => __('Refund'),\n self::STATE_REFUNDED => __('Refunded'),\n ];\n }\n return self::$_states;\n }", "public function approvalStatus()\n {\n $approval_statuses = ApprovelStatus::get();\n\n return ApprovelStatusResource::collection($approval_statuses);\n }", "public function getStatesAndSets() {\n\t\t$ret = array();\n\n\t\tif(count($this->states) > 1) {\n\t\t\t$s = array('' => '(Any State)');\n\t\t\tforeach($this->states as $set => $state) {\n\t\t\t\t$s[$set] = $set;\n\t\t\t}\n\t\t\t$ret['sets'] = $s;\n\t\t}\n\n\t\tif(!empty($this->selectedSet) && count($this->selectedSet) > 1) {\n\t\t\t$g = array('' => '(Any Group)');\n\t\t\t/* @var $state User_State */\n\t\t\tforeach($this->selectedSet as $id => $state) {\n\t\t\t\t$g[$id] = $state->group;\n\t\t\t}\n\t\t\t$ret['groups'] = $g;\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function getRoleAssignments()\n {\n if (array_key_exists(\"roleAssignments\", $this->_propDict)) {\n return $this->_propDict[\"roleAssignments\"];\n } else {\n return null;\n }\n }", "public function getAccessLevel() {\n\t\treturn $this->accessLevel;\n\t}", "public function getAssignList()\n {\n $this->db->select('sa.class_id,sa.section_id,sa.branch_id,b.name as branch_name,c.name as class_name,s.name as section_name');\n $this->db->from('subject_assign as sa');\n $this->db->join('branch as b', 'b.id = sa.branch_id', 'left');\n $this->db->join('class as c', 'c.id = sa.class_id', 'left');\n $this->db->join('section as s', 's.id = sa.section_id', 'left');\n $this->db->group_by(array('sa.class_id', 'sa.section_id', 'sa.branch_id'));\n if (!is_superadmin_loggedin()) {\n $this->db->where('sa.branch_id', get_loggedin_branch_id());\n }\n $result = $this->db->get()->result_array();\n return $result;\n }", "public function getStates();", "function getAccessLevel()\r\n {\r\n return $this->_accessLevel;\r\n }", "public function getStates(){\r\n return $this->currentState;\r\n }", "public function getAvailabilities()\n {\n return $this->availabilities;\n }", "public function getAppliedLicense()\n {\n return $this->applied_license;\n }" ]
[ "0.546477", "0.54449815", "0.53911346", "0.5389159", "0.52864665", "0.5230756", "0.51828396", "0.5154353", "0.5119935", "0.5085779", "0.5080991", "0.5020587", "0.49464405", "0.48891404", "0.4837478", "0.48238975", "0.4806997", "0.47905797", "0.47902918", "0.47792053", "0.47780687", "0.4767751", "0.4739825", "0.47292703", "0.472607", "0.47231755", "0.47149324", "0.47081345", "0.4683438", "0.46352738" ]
0.59673434
0
Gets the mailFolders property value. The user's mail folders. Readonly. Nullable.
public function getMailFolders(): ?array { $val = $this->getBackingStore()->get('mailFolders'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, MailFolder::class); /** @var array<MailFolder>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'mailFolders'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getFolders() {\n\t\t$folders = self::getDefaultFolders();\n\t\t$folders += self::getUserFolders();\n\t\t\n\t\treturn $folders;\n\t}", "public static function getUserFolders() {\n\t\t$folders = array();\n\t\t\n\t\t// user folders\n\t\t$sql = \"SELECT\t\t*\n\t\t\tFROM \t\twcf\".WCF_N.\"_pm_folder\n\t\t\tWHERE \t\tuserID = \".WCF::getUser()->userID.\"\n\t\t\tORDER BY \tfolderName\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$row['icon'] = 'pmFolder'.ucfirst($row['color']).'M.png';\n\t\t\t$row['iconLarge'] = 'pmFolder'.ucfirst($row['color']).'L.png';\n\t\t\t$row['messages'] = 0;\n\t\t\t$row['unreadMessages'] = 0;\n\t\t\t\n\t\t\t$folders[$row['folderID']] = $row;\n\t\t}\n\t\t\n\t\treturn $folders;\n\t}", "public function getContactFolders(): ?array {\n $val = $this->getBackingStore()->get('contactFolders');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ContactFolder::class);\n /** @var array<ContactFolder>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'contactFolders'\");\n }", "public function getFolders() \n {\n return $this->folders;\n }", "public function get_folders()\n\t{\n\t\t$folders = imap_list($this->stream, $this->mailbox, '*');\n\t\t$folders = $this->get_subfolders(str_replace($this->mailbox, '', $folders));\n\n\t\tsort($folders);\n\n\t\treturn $folders;\n\t}", "public function GetFolderList() {\n\t\t$folders = array();\n\t\t$folder = $this->StatFolder(BackendGoConfig::CONTACTBACKENDFOLDER);\n\t\t$folders[] = $folder;\n\n\t\treturn $folders;\n\t}", "public function getMailboxes()\r\n {\r\n return array(\"Inbox\");\r\n }", "public static function getDefaultFolders() {\n\t\t$folders = array();\n\t\t\n\t\t// default folders\n\t\t$folders[self::FOLDER_INBOX] = array('folderID' => self::FOLDER_INBOX, 'folderName' => WCF::getLanguage()->get('wcf.pm.inbox'), 'icon' => 'pmInboxM.png', 'iconLarge' => 'pmInboxL.png', 'messages' => 0, 'unreadMessages' => 0);\n\t\t$folders[self::FOLDER_OUTBOX] = array('folderID' => self::FOLDER_OUTBOX, 'folderName' => WCF::getLanguage()->get('wcf.pm.outbox'), 'icon' => 'pmOutboxM.png', 'iconLarge' => 'pmOutboxL.png', 'messages' => 0, 'unreadMessages' => 0);\n\t\t$folders[self::FOLDER_DRAFTS] = array('folderID' => self::FOLDER_DRAFTS, 'folderName' => WCF::getLanguage()->get('wcf.pm.drafts'), 'icon' => 'pmDraftsM.png', 'iconLarge' => 'pmDraftsL.png', 'messages' => 0, 'unreadMessages' => 0);\n\t\t$folders[self::FOLDER_TRASH] = array('folderID' => self::FOLDER_TRASH, 'folderName' => WCF::getLanguage()->get('wcf.pm.trash'), 'icon' => 'pmTrashM.png', 'iconLarge' => 'pmTrashL.png', 'messages' => 0, 'unreadMessages' => 0);\n\n\t\treturn $folders;\n\t}", "public function folders()\n {\n return $this->belongsToMany('App\\Models\\Folder', 'user_folder');\n }", "public static function getMailFolder() {\n return Yii::$aliases['@runtime'] . '/mail';\n }", "public function getAttachmentDirs()\n\t{\n\t\tif ($this->smf_attach_folders === null)\n\t\t{\n\t\t\t$from_prefix = $this->config->from_prefix;\n\n\t\t\t$request = $this->db->query(\"\n\t\t\t\tSELECT value\n\t\t\t\tFROM {$from_prefix}settings\n\t\t\t\tWHERE variable='attachmentUploadDir';\");\n\t\t\tlist ($smf_attachments_dir) = $this->db->fetch_row($request);\n\n\t\t\t$this->smf_attach_folders = @unserialize($smf_attachments_dir);\n\n\t\t\tif (!is_array($this->smf_attach_folders))\n\t\t\t{\n\t\t\t\t$this->smf_attach_folders = array(1 => $smf_attachments_dir);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->smf_attach_folders;\n\t}", "public function getFolders() {\n return $this->folderItemList;\n }", "public function setMailFolders(?array $value): void {\n $this->getBackingStore()->set('mailFolders', $value);\n }", "public function getPageFolders()\n {\n return $this->page_folders;\n }", "public static function ADMIN_CLASSIFY_GET_USER_FOLDERS(){\n\t $SQL_String = \"SELECT * FROM user_folder WHERE owner=:user AND ftype='folder' AND _keep=1 ORDER BY createtime DESC;\";\n\t return $SQL_String;\n\t}", "public function getEmailsDir()\n {\n return __DIR__ . DIRECTORY_SEPARATOR . 'data/emails';\n }", "public function getAllowedFolderStructure()\n {\n if (!$this->getAllowedFolders()) {\n return [];\n }\n\n return Folder::getStructure($this->getAllowedFolders());\n }", "public function GetSearchFolders(){\r\n\t\treturn $this->_searchFolders;\r\n\t}", "public function get_folders ($search = '%')\n {\n $mailboxes = $this->_run_imap_command(null, 'imap_getmailboxes', [$this->_imap_connection, $this->_configuration, $search]);\n if ( ! is_array($mailboxes) ) {\n // TODO: Better error/alert handling. Look up and parse the last\n // relevant error or alert.\n throw new \\RuntimeException(\"Error when retrieving mailboxes\");\n }\n // A StrictArray object is used here because imap mailbox names may be\n // numeric, and PHP implicitly recasts numeric strings in array keys to\n // integers and eventually they get all screwed up.\n $folders = new \\Asinius\\StrictArray();\n foreach ($mailboxes as $mailbox) {\n $folder_path = substr(imap_utf7_decode($mailbox->name), strlen($this->_configuration));\n $folder = new \\Asinius\\Imap\\Folder($this, $folder_path, $mailbox->delimiter, $mailbox->attributes);\n // Nested folders are now lazy-loaded and don't need to be traversed.\n $folders[$folder->name] = $folder;\n }\n if ( ! $this->_property_exists('folders') ) {\n $this->folders = $folders;\n $this->_lock_property('folders');\n }\n return $folders;\n }", "function list_unsubscribed($root='')\n {\n static $a_folders;\n \n if (is_array($a_folders))\n return $a_folders;\n \n // retrieve list of folders from IMAP server\n $a_mboxes = $this->conn->listMailboxes($this->mod_mailbox($root), '*');\n\n // modify names with root dir\n foreach ($a_mboxes as $mbox_name) {\n if ($name = $this->mod_mailbox($mbox_name, 'out'))\n $a_folders[] = $name;\n }\n\n // filter folders and sort them\n $a_folders = $this->_sort_mailbox_list($a_folders);\n return $a_folders;\n }", "public function folders()\n {\n return $this->content('folders');\n }", "public static function listEmails() {\n return scandir(self::getMailFolder());\n }", "public function getMaildirFolder(){\n\t\treturn new \\GO\\Base\\Fs\\Folder('/home/vmail/'.$this->maildir);\n\t}", "public function GetFolderList()\n\t{\n\t\tif (!isset($this->calendar)) $this->calendar = new calendar_boupdate();\n\n\t\t$cals = $GLOBALS['egw_info']['user']['preferences']['activesync']['calendar-cals'];\n\t\t$cals = $cals ? explode(',',$cals) : array('P');\t// implicit default of 'P'\n\t\t$folderlist = array();\n\n\t\tforeach ($this->calendar->list_cals() as $entry)\n\t\t{\n\t\t\t$account_id = $entry['grantor'];\n\t\t\t$label = $entry['name'];\n\t\t\tif (in_array('A',$cals) || in_array($account_id,$cals) ||\n\t\t\t\t$account_id == $GLOBALS['egw_info']['user']['account_id'] ||\t// always incl. own calendar!\n\t\t\t\t$account_id == $GLOBALS['egw_info']['user']['account_primary_group'] && in_array('G',$cals))\n\t\t\t{\n\t\t\t\t$folderlist[] = $f = array(\n\t\t\t\t\t'id'\t=>\t$this->backend->createID('calendar',$account_id),\n\t\t\t\t\t'mod'\t=>\t$GLOBALS['egw']->accounts->id2name($account_id,'account_fullname'),\n\t\t\t\t\t'parent'=>\t'0',\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t\t//error_log(__METHOD__.\"() returning \".array2string($folderlist));\n\t\tdebugLog(__METHOD__.\"() returning \".array2string($folderlist));\n\t\treturn $folderlist;\n\t}", "public function getFolders() {\n\t\treturn $this->getChildren(false, true);\n\t}", "public function mails()\n\t{\n\t\treturn $this->hasMany(config('core.acl.mailbox'));\n\t}", "private function _list_mailboxes($root='', $filter='*')\n {\n $a_defaults = $a_out = array();\n \n // get cached folder list \n $a_mboxes = $this->get_cache('mailboxes');\n if (is_array($a_mboxes))\n return $a_mboxes;\n\n // Give plugins a chance to provide a list of mailboxes\n $data = cmail::get_instance()->plugins->exec_hook('list_mailboxes',\n array('root'=>$root,'filter'=>$filter));\n \n if (isset($data['folders'])) {\n $a_folders = $data['folders'];\n }\n else {\n // retrieve list of folders from IMAP server\n $a_folders = $this->conn->listSubscribed($this->mod_mailbox($root), $filter);\n }\n \n if (!is_array($a_folders) || !sizeof($a_folders))\n $a_folders = array();\n\n // write mailboxlist to cache\n $this->update_cache('mailboxes', $a_folders);\n \n return $a_folders;\n }", "public function getMaillists() {\r\n throw new Warecorp_Exception('OBSOLETE USE METOD.');\r\n $select = $this->_db->select()\r\n ->from('zanby_users__maillists', 'id')\r\n ->where('user_id = ?', $this->id);\r\n\r\n $maillists = $this->_db->fetchCol($select);\r\n\r\n foreach ($maillists as &$maillist) {\r\n $maillist = new Warecorp_User_Maillist($maillist);\r\n }\r\n\r\n return $maillists;\r\n }", "public function getSubFolders($bCreateIfNull = false)\n\t{\n\t\tif ($bCreateIfNull && !$this->oSubFolders)\n\t\t{\n\t\t\t$this->oSubFolders = \\Aurora\\Modules\\Mail\\Classes\\FolderCollection::createInstance();\n\t\t}\n\n\t\treturn $this->oSubFolders;\n\t}", "public function getMailDomains()\n {\n $domains = array();\n $ldap = $this->config->get_ldap_link();\n $ldap->cd($this->config->current['BASE']);\n $ldap->search(\"(&(objectClass=kolab)(k=kolab)(postfix-mydestination=*))\",array(\"postfix-mydestination\"));\n\n if($ldap->count() == 1){\n $attrs = $ldap->fetch();\n for($i=0; $i <$attrs['postfix-mydestination']['count']; $i ++ ){\n $domains[] = $attrs['postfix-mydestination'][$i];\n }\n @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, \"<b>Found: \".trim(implode($domains,\", \"),\", \").\"</b>\",\n \"Revceiving 'Mail domains for kolab22'.\");\n }elseif($ldap->count() == 0){\n @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, \"<b>No domains found. Check k=kolab and postfix-mydestination</b>\",\n \"Revceiving 'Mail domains for kolab22'.\");\n }else{\n @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, \"<b>Found more than one kolab configuration object. Giving up.</b>\",\n \"Revceiving 'Mail domains for kolab22'.\");\n }\n\n return($domains);\n }" ]
[ "0.63923186", "0.6344674", "0.6132919", "0.6045817", "0.58566576", "0.57344764", "0.56948763", "0.56875", "0.56729555", "0.56307864", "0.5532078", "0.55216527", "0.5471758", "0.54530376", "0.5402558", "0.5401673", "0.538622", "0.53450537", "0.5288011", "0.52603096", "0.5225058", "0.51998454", "0.51815104", "0.5120416", "0.5078792", "0.5066127", "0.49507314", "0.49328086", "0.4922686", "0.4918189" ]
0.73682773
0
Gets the managedAppRegistrations property value. Zero or more managed app registrations that belong to the user.
public function getManagedAppRegistrations(): ?array { $val = $this->getBackingStore()->get('managedAppRegistrations'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, ManagedAppRegistration::class); /** @var array<ManagedAppRegistration>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'managedAppRegistrations'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getManagedApps()\n {\n if (array_key_exists(\"managedApps\", $this->_propDict)) {\n if (is_a($this->_propDict[\"managedApps\"], \"\\Microsoft\\Graph\\Model\\AppListItem\") || is_null($this->_propDict[\"managedApps\"])) {\n return $this->_propDict[\"managedApps\"];\n } else {\n $this->_propDict[\"managedApps\"] = new AppListItem($this->_propDict[\"managedApps\"]);\n return $this->_propDict[\"managedApps\"];\n }\n }\n return null;\n }", "public function setManagedAppRegistrations(?array $value): void {\n $this->getBackingStore()->set('managedAppRegistrations', $value);\n }", "public function setManagedAppRegistrations(?array $value): void {\n $this->getBackingStore()->set('managedAppRegistrations', $value);\n }", "public function getServiceDirectoryRegistrations()\n {\n return $this->service_directory_registrations;\n }", "public function getManagedDevices()\n {\n if (array_key_exists(\"managedDevices\", $this->_propDict)) {\n return $this->_propDict[\"managedDevices\"];\n } else {\n return null;\n }\n }", "public function getManagedAppPolicies(): ?array {\n $val = $this->getBackingStore()->get('managedAppPolicies');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedAppPolicy::class);\n /** @var array<ManagedAppPolicy>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'managedAppPolicies'\");\n }", "public function getWindowsInformationProtectionDeviceRegistrations(): ?array {\n $val = $this->getBackingStore()->get('windowsInformationProtectionDeviceRegistrations');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, WindowsInformationProtectionDeviceRegistration::class);\n /** @var array<WindowsInformationProtectionDeviceRegistration>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'windowsInformationProtectionDeviceRegistrations'\");\n }", "public function getWindowsInformationProtectionDeviceRegistrations(): ?array {\n $val = $this->getBackingStore()->get('windowsInformationProtectionDeviceRegistrations');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, WindowsInformationProtectionDeviceRegistration::class);\n /** @var array<WindowsInformationProtectionDeviceRegistration>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'windowsInformationProtectionDeviceRegistrations'\");\n }", "public function getApps(): ?array {\n $val = $this->getBackingStore()->get('apps');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedMobileApp::class);\n /** @var array<ManagedMobileApp>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'apps'\");\n }", "public function getConnectedUsers()\n {\n return [];\n }", "public function getManagedDevices(): ?array {\n $val = $this->getBackingStore()->get('managedDevices');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedDevice::class);\n /** @var array<ManagedDevice>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'managedDevices'\");\n }", "public function getManagedDevices(): ?array {\n $val = $this->getBackingStore()->get('managedDevices');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedDevice::class);\n /** @var array<ManagedDevice>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'managedDevices'\");\n }", "public function getUserRegistered()\n {\n return $this->user_registered;\n }", "public function setManagedApps($val)\n {\n $this->_propDict[\"managedApps\"] = $val;\n return $this;\n }", "public function registrations() {\n return $this->hasMany('App\\Registered');\n }", "public function getRegisters()\n {\n return $this->registers;\n }", "private function registerUsers()\n {\n $reg_users = User::all()->pluck('id');\n return $reg_users;\n }", "public function getManagedAppStatuses(): ?array {\n $val = $this->getBackingStore()->get('managedAppStatuses');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedAppStatus::class);\n /** @var array<ManagedAppStatus>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'managedAppStatuses'\");\n }", "public function getIosManagedAppProtections(): ?array {\n $val = $this->getBackingStore()->get('iosManagedAppProtections');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, IosManagedAppProtection::class);\n /** @var array<IosManagedAppProtection>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'iosManagedAppProtections'\");\n }", "function getUsers() {\n return $this->getValues('users');\n }", "public function registrations()\n {\n return $this->hasMany(Registration::class);\n }", "public function getMobileAppConfigurations(): ?array {\n $val = $this->getBackingStore()->get('mobileAppConfigurations');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ManagedDeviceMobileAppConfiguration::class);\n /** @var array<ManagedDeviceMobileAppConfiguration>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mobileAppConfigurations'\");\n }", "public function getInsuredPeople()\n {\n return isset($this->insuredPeople) ? $this->insuredPeople : null;\n }", "public function get_user_signups_list() {\r\n\t\tif(!is_object($this->public)) return '';\r\n\t\treturn $this->public->get_user_signups_list();\r\n\t}", "public function friends_getAppUsers() {\n return $this->execute('friends.getAppUsers', array());\n }", "public function getUsersToNotifyOfTokenGiven() {\n return array(\n $this->getOwnerPHID(),\n );\n }", "public function getTargetedManagedAppConfigurations(): ?array {\n $val = $this->getBackingStore()->get('targetedManagedAppConfigurations');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, TargetedManagedAppConfiguration::class);\n /** @var array<TargetedManagedAppConfiguration>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'targetedManagedAppConfigurations'\");\n }", "public function friends_getAppUsers() {\n return $this->call_method('facebook.friends.getAppUsers', array());\n }", "public function getInstalledAppsIds(){\n $command = new Command($this->host, self::APPS_INSTALLED_IDS,\"GET\", $this->enableCache, $this->cacheLifetime, $this->cacheFolder);\n $command->execute();\n return $command->getData(\"ids\");\n }", "public static function getAdminUsers()\n\t{\n\t\treturn \\App\\Fields\\Owner::getInstance()->getUsers(false, 'Active', false, false, true);\n\t}" ]
[ "0.6141457", "0.5642722", "0.5642722", "0.5631199", "0.5489288", "0.54354155", "0.5367671", "0.5367671", "0.5323422", "0.52790236", "0.5208496", "0.5208496", "0.5198795", "0.5160647", "0.5147048", "0.514008", "0.5132906", "0.5131581", "0.50486064", "0.5044015", "0.5007563", "0.49824345", "0.4980367", "0.49712962", "0.49071637", "0.4896424", "0.48953527", "0.48830083", "0.4880702", "0.48796272" ]
0.7178543
1
Gets the mobileAppIntentAndStates property value. The list of troubleshooting events for this user.
public function getMobileAppIntentAndStates(): ?array { $val = $this->getBackingStore()->get('mobileAppIntentAndStates'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, MobileAppIntentAndState::class); /** @var array<MobileAppIntentAndState>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'mobileAppIntentAndStates'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMobileAppTroubleshootingEvents(): ?array {\n $val = $this->getBackingStore()->get('mobileAppTroubleshootingEvents');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, MobileAppTroubleshootingEvent::class);\n /** @var array<MobileAppTroubleshootingEvent>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mobileAppTroubleshootingEvents'\");\n }", "public function getEventActivityList() {\n return($this->eventActivityList);\n }", "public function getDeviceManagementTroubleshootingEvents(): ?array {\n $val = $this->getBackingStore()->get('deviceManagementTroubleshootingEvents');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DeviceManagementTroubleshootingEvent::class);\n /** @var array<DeviceManagementTroubleshootingEvent>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'deviceManagementTroubleshootingEvents'\");\n }", "function get_notification_states(){\n\t\treturn array(\n\t\t\t'read' => 'Read',\n\t\t\t'unread' => 'Unread',\n\t\t);\n\t}", "public static function getUserStates()\n {\n return [\n self::STATUS_ACTIVE,\n self::STATUS_REJECTED,\n self::STATUS_WAITING_REQUEST_CONFIRM\n ];\n }", "public function getApplicationStatus()\n\t{\n\t\t$emails = OphCoTherapyapplication_Email::model()->forEvent($this->event);\n\t\tif (!$emails->exists()) {\n\t\t\treturn self::STATUS_PENDING;\n\t\t}\n\n\t\t$diag = $this->getElement('Element_OphCoTherapyapplication_Therapydiagnosis');\n\n\t\tif ($diag->hasLeft() && !$emails->leftEye()->unarchived()->exists() ||\n\t\t $diag->hasRight() && !$emails->rightEye()->unarchived()->exists()) {\n\t\t\treturn self::STATUS_REOPENED;\n\t\t} else {\n\t\t\treturn self::STATUS_SENT;\n\t\t}\n\t}", "public function get_mobile_user_agents() {\n\t\t// Default list compiled from the user agents listed in `wp_is_mobile()`.\n\t\t$default_user_agents = [\n\t\t\t'Mobile',\n\t\t\t'Android',\n\t\t\t'Silk/',\n\t\t\t'Kindle',\n\t\t\t'BlackBerry',\n\t\t\t'Opera Mini',\n\t\t\t'Opera Mobi',\n\t\t];\n\n\t\t/**\n\t\t * Filters the list of user agents used to determine if the user agent from the current request is a mobile one.\n\t\t *\n\t\t * @since 2.0\n\t\t *\n\t\t * @param string[] $user_agents List of mobile user agent search strings (and regex patterns).\n\t\t */\n\t\treturn apply_filters( 'amp_mobile_user_agents', $default_user_agents );\n\t}", "public function get_events() {\n if ( empty( self::$instance->events ) && isset ( self::$instance->eb_sdk->client ) ) {\n self::$instance->events = self::$instance->eb_sdk->client->get('/users/me/events');\n self::$instance->events = self::$instance->events[ 'events' ];\n }\n\n return self::$instance->events;\n }", "public function getEventState() {\n return($this->eventState);\n }", "public function getReminders()\n {\n if (array_key_exists(\"reminders\", $this->_propDict)) {\n return $this->_propDict[\"reminders\"];\n } else {\n return null;\n }\n }", "public function setMobileAppTroubleshootingEvents(?array $value): void {\n $this->getBackingStore()->set('mobileAppTroubleshootingEvents', $value);\n }", "public static function getEventIdList()\n\t{\n\t\treturn array(\n\t\t\tself::EVENT_ID_WIKI\n\t\t);\n\t}", "public function getAlertTypes()\n {\n return $this->alert_data->getAlertTypes();\n }", "public function getEvents() {\n return $this->events;\n }", "public function events() {\n if (empty($this->info)) {\n $this->refreshInfo();\n }\n return !empty($this->info['events']) ? $this->info['events'] : array();\n }", "public function getUserStateOptions(){\n\t\t$stAr=array();\n\t\tfor($i=CRUGEUSERSTATE_NOTACTIVATED;$i<=CRUGEUSERSTATE_SUSPENDED;$i++)\n\t\t $stAr[$i] = $this->getStateName($i);\n\t\treturn $stAr;\n\t}", "public function getMonitorEvents()\n {\n return array(\n \"REQUEST\" => array('handleRequestEvent',0)\n );\n }", "public function getEvents()\n {\n \treturn $this->_mock->events;\n }", "public function mobileAppTroubleshootingEvents(): MobileAppTroubleshootingEventsRequestBuilder {\n return new MobileAppTroubleshootingEventsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "protected static function getRecordActivityEvents()\n {\n if (isset(static::$recordEvents)) {\n return static::$recordEvents;\n }\n\n return [\n 'created',\n 'updated',\n 'deleted',\n//\t\t\t'inserted',\n ];\n }", "public function getEnableVoiceActivityEvents()\n {\n return $this->enable_voice_activity_events;\n }", "protected function getWebUserStates() {\n\t\t$states = array();\n\t\t$webUser = $this->getOwner();\n\t\t$stateNamePrefix = $webUser->getStateKeyPrefix();\n\t\tif (is_array($_SESSION)) {\n\t\t\tforeach ($_SESSION as $name => $value) {\n\t\t\t\tif (strpos($value, $stateNamePrefix)===0) {\n\t\t\t\t\t$states[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $states;\n\t}", "public function getErrorStatuses() {\n\t\t$errorstatuses = array(\n\t\t\t'' => 'None/Unknown',\n\t\t\t'New' => 'New',\n\t\t\t'Updt' => 'Updated by user',\n\t\t\t'Wait' => 'Waiting for user',\n\t\t\t'Escl' => 'Escalated',\n\t\t\t'Rslv' => 'Resolved',\n\t\t\t'Clsd' => 'Closed',\n\t\t);\n\t\treturn $errorstatuses;\n\t}", "public function getEvents()\n {\n return array_merge(\n $this->helper->getSessionEvents(),\n $this->dataModel->getEvents()\n );\n }", "public function inErrors()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_IN_ERRORS );\n }", "public function getActivityErrors() : array\r\n {\r\n return $this->activity_errors;\r\n }", "public static function getAllDismissedNotifications() {\n\t\treturn array_values( json_decode( wp_json_encode( self::getDismissedNotifications() ), true ) );\n\t}" ]
[ "0.58718365", "0.51352537", "0.5045152", "0.49878645", "0.4936612", "0.474942", "0.47413242", "0.47274134", "0.46803755", "0.46435145", "0.4615601", "0.45922467", "0.45877093", "0.45686054", "0.4567687", "0.45624706", "0.45545527", "0.4545501", "0.45229328", "0.44974926", "0.44974926", "0.44974926", "0.44882092", "0.4485849", "0.4480147", "0.4478191", "0.44641283", "0.445254", "0.4449253", "0.44367936" ]
0.56927
1
Gets the mobileAppTroubleshootingEvents property value. The list of mobile app troubleshooting events for this user.
public function getMobileAppTroubleshootingEvents(): ?array { $val = $this->getBackingStore()->get('mobileAppTroubleshootingEvents'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, MobileAppTroubleshootingEvent::class); /** @var array<MobileAppTroubleshootingEvent>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'mobileAppTroubleshootingEvents'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeviceManagementTroubleshootingEvents(): ?array {\n $val = $this->getBackingStore()->get('deviceManagementTroubleshootingEvents');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, DeviceManagementTroubleshootingEvent::class);\n /** @var array<DeviceManagementTroubleshootingEvent>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'deviceManagementTroubleshootingEvents'\");\n }", "public function get_events() {\n if ( empty( self::$instance->events ) && isset ( self::$instance->eb_sdk->client ) ) {\n self::$instance->events = self::$instance->eb_sdk->client->get('/users/me/events');\n self::$instance->events = self::$instance->events[ 'events' ];\n }\n\n return self::$instance->events;\n }", "public function mobileAppTroubleshootingEvents(): MobileAppTroubleshootingEventsRequestBuilder {\n return new MobileAppTroubleshootingEventsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function setMobileAppTroubleshootingEvents(?array $value): void {\n $this->getBackingStore()->set('mobileAppTroubleshootingEvents', $value);\n }", "public function events() {\n if (empty($this->info)) {\n $this->refreshInfo();\n }\n return !empty($this->info['events']) ? $this->info['events'] : array();\n }", "public function getEvents() {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return array_merge(\n $this->helper->getSessionEvents(),\n $this->dataModel->getEvents()\n );\n }", "public function events()\n {\n return $this->events;\n }", "public function events()\n {\n return $this->events;\n }", "public function events()\n\t{\n\t\treturn $this->events;\n\t}", "public function events()\n\t{\n\t\treturn $this->events;\n\t}", "public static function getEventIdList()\n\t{\n\t\treturn array(\n\t\t\tself::EVENT_ID_WIKI\n\t\t);\n\t}", "public function getEvents()\n {\n \treturn $this->_mock->events;\n }", "public function getEvents()\r\n\t\t{\r\n\t\t\t$events = array();\r\n\t\t\tforeach ($this->days as $day)\r\n\t\t\t\t$events[] = $day->getEvent();\r\n\t\t\treturn $events;\r\n\t\t}", "public function getSessionEvents()\n {\n $events = [];\n if ($this->session->getData(self::DATA_TAG)) {\n $events = $this->session->getData(self::DATA_TAG, true);\n }\n return $events;\n }", "function events() { return $this->get('events'); }", "public function getEvents() {\n\t\tif( ! $this->token ) {\n\t\t\tthrow new Exception( \"No token\" );\n\t\t}\n\t\ttry {\n\t\t\t$result = $this->callGet( rocksOauth::URL_EVENTS );\n\t\t\tif( $result->{'status'} === \"unauthorized\" ) {\n\t\t\t\tthrow new Exception( $result->{'message'} );\n\t\t\t} else {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getEventActivityList() {\n return($this->eventActivityList);\n }", "public function getDebtRecoveryEventList()\n {\n if ($this->_fields['DebtRecoveryEventList']['FieldValue'] == null)\n {\n $this->_fields['DebtRecoveryEventList']['FieldValue'] = array();\n }\n return $this->_fields['DebtRecoveryEventList']['FieldValue'];\n }", "public function getEvents()\n {\n $this->validate();\n $this->url = $this->apiUrl.'events?';\n return $this->fire();\n }", "public function getMonitorEvents()\n {\n return array(\n \"REQUEST\" => array('handleRequestEvent',0)\n );\n }", "public function get_events() { \n\t\treturn $this->default_events();\n\t}", "public function inErrors()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_IN_ERRORS );\n }", "public function setDeviceManagementTroubleshootingEvents(?array $value): void {\n $this->getBackingStore()->set('deviceManagementTroubleshootingEvents', $value);\n }", "public function events()\n {\n return $this->morphedByMany(Event::class, 'notificationable');\n }", "public function getFBALiquidationEventList()\n {\n if ($this->_fields['FBALiquidationEventList']['FieldValue'] == null)\n {\n $this->_fields['FBALiquidationEventList']['FieldValue'] = array();\n }\n return $this->_fields['FBALiquidationEventList']['FieldValue'];\n }", "public function getRawEventData()\n\t{\n\t\treturn [\n \t\t'title' \t=> 'Test event',\n \t\t'type'\t\t=> 'practice',\n \t\t'start' \t=> Carbon::now()->timestamp,\n \t\t'end' \t\t=> Carbon::now()->addHours(2)->timestamp,\n \t\t'details' \t=> 'Yo these tests are sweet!',\n \t\t'_token'\t=> csrf_token()\n \t];\t\n\t}" ]
[ "0.63059163", "0.5583932", "0.55658627", "0.5531262", "0.53751194", "0.53386945", "0.5313966", "0.5313966", "0.5313966", "0.5223478", "0.5189867", "0.5189867", "0.51091206", "0.51091206", "0.50106734", "0.5007705", "0.4996716", "0.4991565", "0.4973145", "0.4948212", "0.4944543", "0.49377972", "0.48795655", "0.48702502", "0.48681098", "0.4827251", "0.48251027", "0.48112917", "0.48094833", "0.47975436" ]
0.7043822
0
Gets the oauth2PermissionGrants property value. The oauth2PermissionGrants property
public function getOauth2PermissionGrants(): ?array { $val = $this->getBackingStore()->get('oauth2PermissionGrants'); if (is_array($val) || is_null($val)) { TypeUtils::validateCollectionValues($val, OAuth2PermissionGrant::class); /** @var array<OAuth2PermissionGrant>|null $val */ return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'oauth2PermissionGrants'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthorizationGrants()\n {\n return $this->authorizationGrants;\n }", "public function getGrants(): array\n {\n return $this->grants;\n }", "public function getPermissionGrants(): ?array {\n $val = $this->getBackingStore()->get('permissionGrants');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ResourceSpecificPermissionGrant::class);\n /** @var array<ResourceSpecificPermissionGrant>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'permissionGrants'\");\n }", "public function getPermissionGrants(): ?array {\n $val = $this->getBackingStore()->get('permissionGrants');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, ResourceSpecificPermissionGrant::class);\n /** @var array<ResourceSpecificPermissionGrant>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'permissionGrants'\");\n }", "private function getPermissions()\n {\n return $this->manager->getManagerPermissions();\n }", "public function get_grants()\n\t{\n\t\t$grants = $this->bo->get_grants($this->bo->user);\n\n\t\t// remove add and delete grants for accounts (for admins too)\n\t\t// as accounts can not be created as contacts, they eg. need further data\n\t\t// and admins might not recognice they delete an account incl. its data\n\t\tif (isset($grants[0])) $grants[0] &= ~(EGW_ACL_ADD|EGW_ACL_DELETE);\n\n\t\treturn $grants;\n\t}", "public function getPermissions()\n {\n return $this->getConfiguration();\n }", "public function permissions()\n {\n return $this->permissions;\n }", "function permissions()\n {\n return $this->Permissions;\n }", "public function permissions()\n {\n return $this->roles->pluck('permissions')->collapse();\n }", "public function getPerm()\n {\n return $this->perm;\n }", "public function getGlobalRoles()\n {\n return $this->app['config']->get('permissions/global');\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->_permissions;\n }", "public function getPermissions() : string\n {\n return $this->permissions;\n }", "public final function getPermissions() {\n return $this->permissions;\n }", "function get_enforce_group_permissions()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $option = $this->_get_global_parameter('FlexshareSecurityPermissions');\n } catch (Flexshare_Parameter_Not_Found_Exception $e) {\n // Ignore\n } catch (Engine_Exception $e) {\n // Ignore\n }\n\n if (empty($option))\n $option = 'on';\n\n return $option;\n }", "protected static function getPermissions()\n {\n return app(AuthorisationRegistrar::class)->getPermissions();\n }", "function getPermissions(){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( $user and $user->val('Role') != 'ADMIN' ){\n return Dataface_PermissionsTool::READ_ONLY();\n }\n }", "public function getPermissionIds() {\n return $this->permissionIds;\n }", "public function getAllowedPermissionsValues()\n {\n return static::$allowedPermissionsValues;\n }", "public function getRights()\n {\n return $this->getProperty(\"Rights\", new BasePermissions());\n }", "public function getPermissionMap() {\n return $this->permissionMap;\n }", "public function registerPermissions()\n {\n $configuration = $this->getConfigurationFromYaml();\n if (array_key_exists('permissions', $configuration)) {\n return $configuration['permissions'];\n }\n }", "public function getOauth2()\n {\n return $this->readOneof(20);\n }", "public function areClientsLimitedToGrants()\r\n {\r\n return $this->limitClientsToGrants;\r\n }", "public function permissionList(): array {\n return $this->info()['Permission'];\n }", "public function getGrantTypes()\n {\n return $this->grant_types;\n }" ]
[ "0.6904838", "0.67810136", "0.63784456", "0.63784456", "0.6077774", "0.60672337", "0.6066804", "0.6026589", "0.5934447", "0.5886593", "0.5859173", "0.5855527", "0.57957435", "0.57957435", "0.57957435", "0.57723576", "0.5759049", "0.573814", "0.57115877", "0.570218", "0.5640619", "0.5626768", "0.5620705", "0.56061965", "0.5581733", "0.5541998", "0.5536383", "0.5534313", "0.5521551", "0.55011326" ]
0.7134266
0
Gets the officeLocation property value. The office location in the user's place of business. Maximum length is 128 characters. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values).
public function getOfficeLocation(): ?string { $val = $this->getBackingStore()->get('officeLocation'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'officeLocation'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_location()\n {\n return $this->get_default_property(self::PROPERTY_LOCATION);\n }", "public function getOfficePhone()\n {\n return $this->formatPhone($this->office_phone);\n }", "public function getCurrentLocation() {\n\t\tif ($this->currentLocation === null) {\n\t\t\t$this->currentLocation = '';\n\t\t\t$this->currentLocation = UserOnlineLocationHandler::getInstance()->getLocation(new UserOnline(new User(null, array(\n\t\t\t\t'controller' => $this->controller,\n\t\t\t\t'objectID' => $this->locationObjectID\n\t\t\t))));\n\t\t}\n\t\t\n\t\treturn $this->currentLocation;\n\t}", "public function get_location()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->getProperty(\"Location\");\n }", "public function testReturnsLocationSearchingIpInRange()\n {\n $longIp = 12345678;\n\n $this->assertEquals(\n $this->expected('location')->getData()[0],\n $this->_collection->getLocationInIpRange($longIp)->getData()[0]\n );\n }", "public function getLocation()\n {\n return isset($this->location) ? $this->location : null;\n }", "function getLocation(){\n\t\tif($this->validUser){\n\t\t\t$position = strpos($this->urlCont, LOCATION_POSITION);\n\t\t\t$subStr = substr($this->urlCont, $position, MAX_STRING_LENGTH);\n\t\t\t$subStr = preg_replace( \"/\\r|\\n/\", \"\", $subStr); // remove new line chars (for preg_match)\n\t\t\tpreg_match(LOCATION_REGEX, $subStr, $match);\n\t\t\t$this->location = trim($match[1]); // remove spaces from the end and the beginning\n\t\t\treturn $this->location;\n\t\t}\n\t\telse\n\t\t\treturn ERROR_INVALID_USER; // the user is not valid\n\t}", "public function getNiceLocation() {\n\t\treturn ($this->Location) ? Geoip::countryCode2name($this->Location) : \"Anywhere\";\n\t}", "public function getLocation(){\n if(!isset($_POST['location'])){$location=$this->geoCoder->getLocationFromIP($_SERVER['REMOTE_ADDR']);}\n else{$location=$this->geoCoder->getLocation($_POST['location']);}\n return $location;\n }", "private function get_ip_location() {\n\t\t$ip_location = edd_fm_ipinfo_io_get_geo_data( $this->ip_address );\n\t\treturn ! empty( $ip_location ) ? $ip_location : false;\n\t}", "public function getLocationFilter(): ?LoyaltyEventLocationFilter\n {\n return $this->locationFilter;\n }", "private static function _office_location( $room_id ) {\n\n // If we've gotten this far, we've definitely instantiated the FSQLib object.\n $sql = self::$query_lib->get_query_str( FSQEnum::USER_OFFICE, $room_id );\n\n // If we find stuff, we only care about the first row (there should only be one anyway).\n if( $result = self::_run_query( $sql ) ) {\n $row = mysqli_fetch_assoc( $result );\n mysqli_free_result( $result );\n\n return $row;\n }\n }", "public function getGeo()\n {\n // Get saved year\n if (\\yii::app()->user->isGuest) {\n $defaultGeo = \\yii::app()->user->getState('geo');\n } else {\n $defaultGeo = \\yii::app()->user->getInstance()->settings->geo;\n }\n\n // Get params\n $geo = $this->request->getParam('geo', $defaultGeo);\n\n // Get default value\n if (empty($geo)) {\n $geo = \\common\\models\\School::model()->country;\n }\n\n // Save the geo to the user's settings\n if (\\yii::app()->user->isGuest) {\n \\yii::app()->user->setState('geo', $geo);\n } else {\n $settings = \\yii::app()->user->getInstance()->settings;\n $settings->geo = $geo;\n $settings->save();\n }\n\n return $geo;\n }", "public function getOffice()\n {\n return $this->hasOne(Offices::className(),['IdOffice' => 'IdOffice']);\n }", "public function getLocation() {\r\n return $this->location;\r\n }", "public function hasLocation() {\n \t$val = $this->cacheGetPlain('has_location');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('has_location', $this->getOffering()->hasLocation());\n \telse\n \t\treturn $val;\n\t}", "public function getGeoLocation()\n {\n return isset($this->source['geo']) ? new GeoCoordinates($this->source['geo']) : null;\n }", "public function getLocation() {\n return $this->location;\n }", "public function getLocation() {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }", "public function getLocation()\n {\n return $this->location;\n }" ]
[ "0.541942", "0.53848636", "0.5252773", "0.51942456", "0.5185701", "0.5150253", "0.5118339", "0.511144", "0.5097278", "0.5086996", "0.5083561", "0.50774276", "0.50560087", "0.5033725", "0.50333726", "0.5019733", "0.50142896", "0.50013065", "0.4991726", "0.4991726", "0.4985096", "0.4985096", "0.4985096", "0.4985096", "0.4985096", "0.4985096", "0.4985096", "0.4985096", "0.4985096", "0.4985096" ]
0.5976333
0
Gets the onenote property value. The onenote property
public function getOnenote(): ?Onenote { $val = $this->getBackingStore()->get('onenote'); if (is_null($val) || $val instanceof Onenote) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'onenote'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAnnote()\n {\n return $this->annote;\n }", "public function getLote() {\n return $this->sLote;\n }", "public function getInapta(): string\n {\n return $this->inapta;\n }", "public function getNote() {\n return $this->note;\n }", "function getNote() {\n return $this->getFieldValue('note');\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function setOnenote(?Onenote $value): void {\n $this->getBackingStore()->set('onenote', $value);\n }", "public function getNote() \n\t{\n\t\treturn $this->note;\n\t}", "public function getCodigoLote() {\n return $this->iCodigoLote;\n }", "public function getOff()\n {\n return $this->off;\n }", "public function getOff()\n {\n return $this->off;\n }", "public function getOff()\n {\n return $this->off;\n }", "public function getNoteText()\n {\n return $this->noteText;\n }", "public function getAncho()\n\t{\n\t\treturn $this->_ancho;\n\t}", "public function getOfimatica(){\n return $this->ofimatica;\n }", "function get_value()\n {\n return $this->get_default_property(self :: PROPERTY_VALUE);\n }", "protected function getNoteAtAttribute()\n {\n if($date = data_get($this->note, 'created_at')){\n return $date->format( config('betta.short_date') );\n }\n\n return null;\n }", "function get_value()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_VALUE);\r\n }", "public function getEnLitige() {\n return $this->enLitige;\n }", "function get_property()\n\t{\n\t\treturn $this->_sProperty;\n\t}", "public function getPostnote() {\n\t\treturn $this->postnote;\n\t}", "public function getPref()\n {\n return $this->pref;\n }" ]
[ "0.6512639", "0.614605", "0.6003086", "0.5866371", "0.58623606", "0.58455205", "0.58455205", "0.58455205", "0.58455205", "0.58455205", "0.58455205", "0.58455205", "0.58455205", "0.58455205", "0.5821659", "0.5795298", "0.5635118", "0.55972975", "0.55972975", "0.55972975", "0.5589819", "0.5549986", "0.55394405", "0.5530421", "0.55253744", "0.55207473", "0.55184925", "0.55151385", "0.5506611", "0.5497452" ]
0.6500317
1