Download the PHP package lch/seo-bundle without Composer

On this page you can find all versions of the php package lch/seo-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package seo-bundle

SEOBundle

This bundle add SEO capabilities for entities in any SF3 project. So far it handles:

Installation using composer

$ composer require lch/seo-bundle

Configuration and usage

  1. Configuration
  2. Entities preparations
  3. Form type usage
  4. Front rendering

Configuration

SeoBundle allows to generate minimal SEO requirements for specific pages (like homepage) or 'entity' pages (like news page). SEO for 'entity' pages is automatically generated. For specifics pages, follow these steps:

Entities preparation

To automatically generate SEO for 'entity' pages, follow theses 2 steps:

Seoable trait

Add Seoable to any entity you want to have SEO settings on. This include

SeoInterface implementation

Implements SeoInterface and fill 5 methods

  1. getSluggableFields for getting fields name needed to build slug

  2. getRouteFields for getting fields name needed to build route

    An array is expected here, each key based on following pattern : routeParameter => entityParameter

  3. getRouteName for allowing URL generation in SEO area (canonical URL, OpenGraph...)

  4. getSeoTitleDefaultValue for pointing a field to use in case of SEO title empty (to generate default one)

  5. getOpenGraphData should return an array with OpenGraph data, such as : So far, SeoInterface declares following OG constants :

    Array returned example :

We assume that a unique constraint/index is set on slug field, or slug fields collection if more than one.

In addition, ton ensure proper form validation, be sure to add @UniqueEntity constraint, at least on slug field :

Form type usage

SeoType

The bundle provides an SeoType, you can add to entities implementing SeoInterface types

Note: attr used are detailled with AdminBundle

Then, in the form twigs, add SEO form theme : {{ form_row(form.seo) }} to ensure fields rendering and logic.

Front rendering

Simply add a seo block in your base.html.twig in <head> section

Then, override this block on each page you want to display SEO information, with a custom Twig function:

Note: app.request needs to be setting up here to generate SEO according to current route defined in config.yml

Persistence

So far, add call to $this->get('lch.seo.tools')->seoFilling() on controller before persist to ensure data will be set. Will be replaced with doctrine event later


All versions of seo-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
symfony/framework-bundle Version ^4.2
symfony/twig-bundle Version ^4.2
twig/extensions Version 1.5.*
symfony/form Version ^4.2
symfony/orm-pack Version ^1.0
symfony/validator Version ^4.2
knplabs/doctrine-behaviors Version ^2.0
doctrine/annotations Version ^1.8
lch/components-bundle Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lch/seo-bundle contains the following files

Loading the files please wait ....