Download the PHP package perfectneeds/content-multi-lang-bundle without Composer

On this page you can find all versions of the php package perfectneeds/content-multi-lang-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 content-multi-lang-bundle

Getting Started With PNContentBundle for multi languages web apps

Prerequisites

  1. Symfony 3.4
  2. PNLocaleBundle
  3. PNMediaBundle
  4. PNServiceBundle

Installation

Installation is a quick (I promise!) 7 step process:

  1. Download PNContentBundle using composer
  2. Enable the Bundle in AppKernel
  3. Create your Post class
  4. Create your PostRepository class
  5. Configure the PNContentBundle
  6. Import PNContentBundle routing
  7. Update your database schema

    Step 1: Download PNContentBundle using composer

    Require the bundle with composer:

Step 2: Enable the Bundle in AppKernel

Require the bundle with composer:

Step 3: Create your Post class

The goal of this bundle is to persist some Post class to a database. Your first job, then, is to create the Post class for your application. This class can look and act however you want: add any properties or methods you find useful. This is your Post class.

The bundle provides base classes which are already mapped for most fields to make it easier to create your entity. Here is how you use it:

  1. Extend the base Post class (from the Entity folder if you are using any of the doctrine variants)
  2. Map the id field. It must be protected as it is inherited from the parent class.

Caution!

When you extend from the mapped superclass provided by the bundle, don't redefine the mapping for the other fields as it is provided by the bundle.

In the following sections, you'll see examples of how your Post class should look, depending on how you're storing your posts (Doctrine ORM).

Note

The doc uses a bundle named ContentBundle. However, you can of course place your post class in the bundle you want.

Caution!

If you override the construct() method in your Post class, be sure to call parent::construct(), as the base Post class depends on this to initialize some fields.

Doctrine ORM Post class

If you're persisting your post via the Doctrine ORM, then your Post class should live in the Entity namespace of your bundle and look like this to start:

*You can add all relations between other entities in this class

Step 4: Create your PostRepository class

You can use this Repository to add any custom methods

Step 5: Configure the PNContentBundle

Add the following configuration to your config.yml file according to which type of datastore you are using.

Step 6: Import PNContentBundle routing files

Step 7: Update your database schema

Now that the bundle is configured, the last thing you need to do is update your database schema because you have added a new entity, the Post class which you created in Step 3.


How to use PNContentBundle

  1. Use Post in Entity using Doctrine ORM
  2. Use Post in Form Type
  3. How to add a custom fields ex. brief, description, etc ...
  4. Use Post in controller
  5. Use Post in details page like show.html.twig

    1. Use Post in Entity using Doctrine ORM

First of all you need to add a relation between an Entity need to use Post with Post class in src/PN/Bundle/ContentBundle/Entity/Post.php ex. Blogger, Product, etc ... Example entities:
Post.php

DynamicPage.php

2. Use Post in Form Type

You need to add Post Type in any Form type to use this magical tool

DynamicPageType.php

3. How to add a custom fields

If you need to add a custom fields for any Form type

for example add a shortDescription field in DyncamicPageType.php

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

When reporting a bug, it may be a good idea to reproduce it in a basic project built using the Symfony Standard Edition to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.


All versions of content-multi-lang-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
symfony/framework-bundle Version ~4.0|~5.0|~6.0
perfectneeds/service-bundle Version ~2.0
perfectneeds/locale-bundle Version ~2.0
perfectneeds/media-bundle Version ~2.0
ext-json Version *
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 perfectneeds/content-multi-lang-bundle contains the following files

Loading the files please wait ....