PHP Classes

File: engine/modules/contrib/ecommerce/ecommerce.wiki.inc

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/contrib/ecommerce/ecommerce.wiki.inc   Download  
File: engine/modules/contrib/ecommerce/ecommerce.wiki.inc
Role: Example script
Content type: text/plain
Description: Example script
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 6 years ago
Size: 1,396 bytes
 

Contents

Class file image Download
<?php

/**
 * Detect content JUMPER and eventually create HTML.
 * @param $attributes
 * @param $value
 * @param $string
 * @param $env
 * @return bool|mixed|string
 */
function qtag_PRODUCTS($attributes, $value, $string, $env) {

 
$dirlist = new ProductList($env, $value, 'products', array('sortbytime' => 'asc') + $attributes);
  return
$dirlist->render();
}

/**
 * Detect content JUMPER and eventually create HTML.
 * @param $attributes
 * @param $value
 * @param $string
 * @param $env
 * @return bool|mixed|string
 */
function qtag_PRODUCTSLIST($attributes, $value, $string, $env) {

 
$dirlist = new ProductList($env, $value, 'products_list', array('sortbytime' => 'asc') + $attributes);
  return
$dirlist->render();
}

/**
 * @param $env
 * @param $target
 * @param $attributes
 * @return string
 */
function qtag_PRODUCTADD($env, $target, $attributes) {
 
$attributes['class'] = 'product-add-link';
 
$attributes['tooltip'] = isset($attributes['tooltip']) ? $attributes['tooltip'] : 'Add product...';
  return
qtag_ADD($env, $target, $attributes);
}

/**
 * @param $env
 * @param $target
 * @param $attributes
 * @return string
 */
function qtag_PRODUCTEDIT($env, $target, $attributes) {
 
$attributes['class'] = 'product-edit-link';
 
$attributes['tooltip'] = isset($attributes['tooltip']) ? $attributes['tooltip'] : 'Edit product...';
  return
qtag_EDIT($env, $target, $attributes);
}