1. Go to this page and download the library: Download afzalroq/yii2-cms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
class CController extends CMSController {
public function actionCollection(string $c)
{
}
public function actionOption(string $c, string $o)
{
}
public function actionEntity(string $e)
{
}
public function actionItem(string $e, int $i)
{
}
}
Unit::get('slug'); // will return data using cache
\afzalroq\cms\entities\front\OaI::getItemIdsByCollection($slug) : array // of item Ids
\afzalroq\cms\entities\front\OaI::getItemIdsByOption($slug) : array // of item Ids
$item->getText1(); // for get Text 1
$item->getText2(); // for get Text 2
$item->getText3(); // for get Text 3
$item->getText4(); // for get Text 4
$item->getText5(); // for get Text 5
$item->getText6(); // for get Text 6
$item->getText7(); // for get Text 7
//for to get meta description and meta keywords just use this command below:
$item-registerMetaTags(); //it generates meta tags in your view page
$item->getFile1(); // for get File 1
$item->getFile2(); // for get File 2
$item->getFile3(); // for get File 3
$item->getDate($format); // for get date with format like "d.m.Y H:i:s"
// get gallery main photo URI
$item->getGalleryPhoto(width, height, operation, background, xPos, yPos)
// get gallery photos URI
$items->getPhotos() // and use with "foreach(){}"
// item photos URI
$item->getPhoto1(width, height, operation, background, xPos, yPos); // for get Photo 1
$item->getPhoto2(width, height, operation, background, xPos, yPos); // for get Photo 2
$item->getPhoto3(width, height, operation, background, xPos, yPos); // for get Photo 3
$option->getName(); // for get Name
$option->getContent(); // for get Content
$option->getPhoto1(); // for get Photo 1
$option->getPhoto2(); // for get Photo 2
$option->getFile1(); // for get File 1
$option->getFile2(); // for get File 2
//for to get meta description and meta keywords just use this command below:
$option-registerMetaTags(); //it generates meta tags in your view page
\afzalroq\cms\entities\front\Items::getEntityItemSearchResults((array) $entitySlugs, $search); // get search results with entity and items
\afzalroq\cms\entities\front\Items::getOptionItemSearchResults((array) $optionSlugs, $search); // get search results with option and items
\afzalroq\cms\entities\front\Options::getOptionSearchResults((array) $optionSlugs, $search); // get search results with options