ihor-drevetskyi/seo-bundle

This package is abandoned and no longer maintained. The author suggests using the ihor-drevetskyi/seo-common package instead.

Seo component [Symfony]

v1.0.3 2021-09-02 22:07 UTC

This package is auto-updated.

Last update: 2021-09-02 22:07:40 UTC


README

This is a Flex pack designed to easily create/edit seo elements.

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Documentation

Installation instructions and configuration:

The easiest way to install is by using Composer, run

composer require ihor-drevetskyi/seo-common

Add SeoCommonBundle to your application kernel

If you don't use flex (you should), you need to manually enable bundle:

PHP:

// config/bundles.php
return [
    // ...
    SeoCommonBundle\SeoCommonBundle::class => ['all' => true],
    // ...
];

Basic description

This package contains useful Traits for Doctrine ORM and Dto objects.

Your attention is also presented some entity classes, which will be useful for create/edit seo fields for different elements.

Examples of using

Include twig template to your base template in head section. To do this, add the line:

{% include '@SeoCommon/_head_meta.html.twig' %}

Basic template example:

{% apply spaceless %}
    <!DOCTYPE html>
    <html lang="{% if app.request.locale == 'ru' %}ru_RU{% elseif app.request.locale == 'en' %}en_US{% elseif app.request.locale == 'uk' %}ua_UA{% endif %}">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        {% include '@SeoCommon/_head_meta.html.twig' %}
        <!-- Stylesheets -->
        {% block stylesheets %}{% endblock %}
    </head>
    <body>
    {% block body %}{% endblock %}
    <!-- JavaScripts -->
    {% block javascripts %}{% endblock %}
    </body>
    </html>
{% endapply %}

To add a relation for element table with a seo table, use the trait SeoTrait and SeoTraitInterface.

Add namespace to your entity;

use SeoCommonBundle\Entity\Traits\SeoTrait;

Add trait to your entity;

use SeoTrait;

Basic example:

<?php

namespace SomeBundle\Entity;

use SeoCommonBundle\Entity\Traits\SeoTrait;
use SeoCommonBundle\Entity\Traits\SeoTraitInterface;

class SomeEntity implements SeoTraitInterface
{
    use SeoTrait;
}

Latest updates

For notes about latest changes please read CHANGELOG, for required changes in your code please read UPGRADE chapter of documentation.

Requirements:

  • Compatible with PHP >=7.4 versions.
  • Compatible with Symfony >=5.3 versions.

License

This package is available under the MIT License (MIT). Please see License File for more information.

Authors

The component was originally created by Ihor Drevetskyi.

I am engaged in the development of packages in my free time. I would be grateful for a little financial assistance (sponsorship) to my bank account:

UAH: 4441114452235219 | https://send.monobank.ua/EipFYXFSC

USD:
Beneficiary
IBAN UA933220010000026205312221935
Account No 5375418805868072
Receiver DREVETSKYI IHOR
Account with Institution
Bank: JSC UNIVERSAL BANK
City: KYIV, UKRAINE
Swift code: UNJSUAUKXXX
Intermediary
Bank: DEUTSCHE BANK TRUST CO. AMERICAS
City: NEW YORK, USA
Account number: 4452477
Swift code: BKTRUS33XXX
Details of payment: - private transfer | - transfer to own account | - help to relative | - honorarium | - compensation for …

Contact information

LinkedIn | Telegram | Facebook | EMAIL