2017 © Pedro Peláez
 

library tmcms-module-gallery

Module Gallery for TMCms

image

devp-eu/tmcms-module-gallery

Module Gallery for TMCms

  • Tuesday, May 29, 2018
  • by devp.eu
  • Repository
  • 3 Watchers
  • 2 Stars
  • 402 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

tmcms-module-gallery

Module Gallery for TMCms, (*1)

Module adds image gallery functionality as separate module AND as possibility to auto-create internal galleries for every Entity presented in any other module, e.g. Products, Articles, etc., (*2)

Usage for Entities

Create Gallery column, (*3)

// Data for table
...
$product = new ProductEntity();
$entity_class = strtolower(Converter::classWithNamespaceToUnqualifiedShort($product));

$images = new ImageEntityRepository();
$images->setWhereItemType($entity_class);
...
// Table Helper
...
'columns' => [
  ...,
  'gallery'    => [
    'type'   => 'gallery',
    'images' => $images,
  ],
  ...,
],
...

And add method for managing gallery images in CmsClass, (*4)

...
public function images()
{
  $product_id = ... // whatever you need
  $product = new ProductEntity($product_id);
  echo ModuleGallery::getViewForCmsModules(product);
}

The Versions

29/05 2018

dev-master

9999999-dev http://devp.eu/

Module Gallery for TMCms

  Sources   Download

proprietary

The Requires

 

module gallery tmcms