PHP code example of c975l / gallery-bundle

1. Go to this page and download the library: Download c975l/gallery-bundle 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/ */

    

c975l / gallery-bundle example snippets


class GalleryCustomizationProvider implements GalleryCustomizationProviderInterface
{
    public function getCategoryDataFormType(): ?string
    {
        return null;
    }

    public function getMediaDataFormType(): ?string
    {
        return MediaDataType::class;
    }
}

'@c975l/ui-bundle/pointer-sort.js' => ['path' => './vendor/c975l/core-bundle/UiBundle/assets/js/pointer-sort.js'],
bash
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
bash
php bin/console assets:install --symlink
bash
php bin/console c975l:scaffold:install
text
Cailloux couleur 3   →   /photos/mineraux/cailloux-couleur-a1b2c3
bash
php bin/console c975l:gallery:rebuild-thumbnails
bash
php bin/console c975l:sitemaps:create
bash
php bin/console c975l:health-check:run --kind=urls-gallery
bash
php bin/console c975l:health-check:run --kind=files-gallery
twig
{% set printAvailable = gallery_print_available(media) %}
{% set contentFile = media.video ? media.videoFilename : media.filename %}
{% set thumbnailFile = media.video ? media.filename : media.thumbnailFilename %}
{% set jsonLd = gallery_media_json_ld(
    media,
    contentFile ? absolute_url(asset(contentFile)) : null,
    thumbnailFile ? absolute_url(asset(thumbnailFile)) : null,
    url('gallery_media', {category: category.slug, slug: media.slug}),
    printAvailable,
    media.embedUrl
) %}
{% if jsonLd %}
    <script type="application/ld+json">{{ jsonLd|raw }}</script>
{% endif %}
text
vendor/c975l/gallery-bundle/skills/