public function __construct() { $this->number_of_items = 25; $this->tagId = db_parameter('CORNERS_TAG_EXCERPTS'); $this->createListOfPages(); $this->data['items'] = $this->data['items']->getDictionary(); }
public function __construct() { $this->category = db_parameter('CATEGORY_HOME'); $this->itemsPerPage = db_parameter('CORNERS_HOME_ITEMS_NUMBER', $this->itemsPerPage); if (starts_with(\Route::currentRouteName(), "index")) { $this->createListOfPages(); } }
public function loadComments($object, $type = 'page') { if (db_parameter('COMMENTS_SYSTEM') == "disqus") { app('veer')->loadedComponents['comments_disqus'] = viewx('components.disqus', array("identifier" => $type . $object->id)); } else { $object->load('comments'); app('veer')->loadedComponents['comments_own'] = $object->comments->toArray(); } }
public function __construct() { $id = db_parameter('HERO_ON_HOME'); if (!empty($id)) { $this->data = (new ShowPage())->getPage($id, app('veer')->siteId); $this->data->load(array('images' => function ($q) { return $q->orderBy('pivot_id', 'asc'); })); } }
public function __construct() { $this->remoteLink = db_parameter($this->remoteLinkDb); if (!empty($this->remoteLink)) { $this->remoteFile = app('router')->current()->lnk; $this->increment(); app('veer')->forceEarlyResponse = true; app('veer')->earlyResponseContainer = redirect($this->remoteLink . "/" . $this->remoteFile); } }
/** * Use shop or product currencies * itemCurrency > shopCurrency > price * * @todo later get sites_id and get specific db parameter for specific site * * @params $price, $itemCurrency * @return $price */ public function currency($price, $itemCurrency, $custom = null) { if ($itemCurrency > 0 && $itemCurrency != 1) { return $price * $itemCurrency; } $shopCurrency = array_get($custom, 'forced_currency', db_parameter('SHOP_CURRENCY', 1)); if ($shopCurrency > 0 && $shopCurrency != 1) { return $price * $shopCurrency; } return $price; }
public function __construct() { $this->data = $this->getHomeEntities('\\Veer\\Models\\Product', app('veer')->siteId, db_parameter('CATEGORY_HOME'))->get(); }
public function __construct() { if (\Input::has($this->urlTrigger) && strpos(db_parameter($this->dbTokensName), \Input::get($this->urlTrigger)) !== false) { app('veer')->siteConfig[$this->dbRenderFlag] = true; } }
/** * Get 'From' field values for specific site */ protected function getEmailFrom($siteId = null) { return array("address" => db_parameter("EMAIL_ADDRESS", config("mail.from.address"), $siteId), "name" => db_parameter("EMAIL_NAME", config("mail.from.name"), $siteId)); }
public function __construct() { $c = json_decode('[' . db_parameter('SIDEBAR_CATEGORIES') . ']'); app('veer')->cachingQueries->make(\Veer\Models\Category::where('sites_id', '=', app('veer')->siteId)->where('id', '!=', db_parameter('CATEGORY_HOME', 0))->whereIn('id', $c)->orderBy('manual_sort', 'asc')); $this->data['categories'] = app('veer')->cachingQueries->lists('title', 'id', 5, 'categoriesSidebar' . app('veer')->siteId); }
/** * register Post */ public function registerPost() { \Event::fire('router.filter: csrf'); $fill = \Input::get('fill'); $fill['sites_id'] = app('veer')->siteId; if (array_has($fill, 'password') && empty($fill['password'])) { array_forget($fill, 'password'); } $rules = array('email' => 'required|email|unique:users,email,NULL,id,deleted_at,NULL,sites_id,' . app('veer')->siteId, 'password' => 'required|min:6'); $validator = \Validator::make($fill, $rules); if ($validator->fails()) { return \Redirect::route('user.register')->withErrors($validator); } \Eloquent::unguard(); $user = new \Veer\Models\User(); $fill['restrict_orders'] = db_parameter('ECOMMERCE_RESTRICT_ORDERS', config('veer.restrict_orders', false)); $fill['newsletter'] = isset($fill['newsletter']) ? true : false; $fill['birth'] = parse_form_date(array_get($fill, 'birth')); $user->fill($fill); $user->save(); \Auth::login($user); return \Redirect::intended(); }
/** * Get category. * * */ public function getCategoryAdvanced($category, $options = array()) { $items = $this->getCategory($category, null); if (is_object($items)) { $items->load('communications'); $this->loadImagesWithElements($items, array_get($options, 'skipWith', false)); $items->load(array('pages' => function ($q) { $q->with('user', 'subpages', 'categories', 'comments', 'images')->orderBy('manual_order', 'asc'); }, 'products' => function ($q) { $q->with('categories', 'images'); })); $items->site_title = db_parameter('SITE_TITLE', null, $items->sites_id); } return $items; }
public function __construct() { $this->tagId = db_parameter('CORNERS_TAG_DIGEST'); $this->createListOfPages(); }