2017 © Pedro Peláez
 

library gallery

Gallery for Nette Framework

image

nattreid/gallery

Gallery for Nette Framework

  • Tuesday, April 3, 2018
  • by attreid
  • Repository
  • 1 Watchers
  • 0 Stars
  • 170 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 33 Versions
  • 2 % Grown

The README.md

Galerie pro Nette Framework

Nastavení v config.neon, (*1)

extensions:
    gallery: NAttreid\Gallery\DI\GalleryExtension

gallery:
    maxFileSize: 5 #MB
    maxFiles: 50

Načtení továrny

/** @var \NAttreid\Gallery\Control\IGalleryFactory @inject */
public $galleryFactory;

Použítí s databází

function createComponentGalleryDB() {
    $model = $this->db->table('example');

    $gallery = $this->galleryFactory->create();
    $gallery->setStorage($model);
    $gallery->setNamespace('example/class');
    $gallery->setForeignKey('foreignKey', 5);
    return $gallery;
}

Použití se session

function createComponentGallerySession() {
    $session = $this->getSession('example/class');

    $gallery = $this->galleryFactory->create();
    $gallery->setStorage($session, 'nameOfVariableInSession');
    $gallery->setNamespace('example/class');
    return $gallery;
}

Použití s cms konfigurátorem

/** @var \NAttreid\Cms\Configurator\Configurator @inject */
public $configurator;

function createComponentGalleryConfigurator() {
    $gallery = $this->galleryFactory->create();
    $gallery->setStorage($this->configurator, 'nameOfVariableInSession');
    $gallery->setNamespace('example/class');
    return $gallery;
}

Použití ve formuláři

protected function createComponentGallery() {
    $session = $this->getSession('example/class');
    $session->setExpiration('1 hour');

    $gallery = $this->galleryFactory->create();
    $gallery->setStorage($session, 'example');
    return $gallery;
}

function onSuccessForm(Form $form, $values) {
    $createGallery = empty($values->id);
    $id = $this->model->save($values->id, $values)->getPrimary();  

    if ($createGallery) {
        /* @var $gallery \NAttreid\Gallery\Gallery */
        $gallery=$this['gallery'];

        $gallery->changeNamespace('item/' . $values->url);
        $this->imageModel->add($id, $gallery->getImages());
        $gallery->clearTemp();
    }
}

The Versions

25/02 2017
23/02 2017
11/11 2016

2.0.6

2.0.6.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

27/10 2016

2.0.5

2.0.5.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

04/10 2016

2.0.4

2.0.4.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

03/10 2016

2.0.3

2.0.3.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

19/09 2016

2.0.2

2.0.2.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

16/09 2016

2.0.1

2.0.1.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

16/09 2016

2.0.0

2.0.0.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

06/09 2016

1.0.8

1.0.8.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

06/09 2016

1.0.7

1.0.7.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

24/08 2016

1.0.6

1.0.6.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

24/08 2016

1.0.5.2

1.0.5.2

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

24/08 2016

1.0.5.1

1.0.5.1

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

03/08 2016

1.0.5

1.0.5.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

01/08 2016

1.0.4

1.0.4.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

22/07 2016

1.0.3

1.0.3.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

20/07 2016

1.0.2

1.0.2.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

30/06 2016

1.0.1

1.0.1.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid

27/06 2016

1.0.0

1.0.0.0

Gallery for Nette Framework

  Sources   Download

Unlicense

The Requires

 

The Development Requires

by Avatar attreid