Download the PHP package bez/zfview-bundle without Composer

On this page you can find all versions of the php package bez/zfview-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 zfview-bundle

ZfViewBundle

Brings the Zend\View templating paradigm of composite views and view helpers within your Symfony2 project.

2014-01-22 update:

Installation

You can install this bundle via Composer:

php composer.phar require bez/zfview-bundle:v0.1.0

Register the bundle in app/AppKernel.php:

Add "zf_view" to the templating engines in your config.yml:

Defining Templates and Layouts

Define the template and the layout to use using the @Bez\ZfViewBundle\Configuration\Rendering annotation.

In src/FooBundle/Resources/views/Some/some.phtml:

Child views -- in this case, src/FooBundle/Resources/views/Some/some.phtml -- are evaluated before the parent layouts. The output is captured to the $this->content variable and thus can be injected into the layout as follows:

In src/FooBundle/Resources/layout.phtml

The fact that child views are evaluated first is very significant. This allows child views to modify elements (i.e., stylesheets, scripts, menus, etc.) in the parent layout by means of view helpers.

Overriding rendering options

Layouts can also be defined within the @Rendering annotation in a method and will take precedence:

You can also set layout to "none" to disable a layout if one is defined at the class level. This will simply render the template without wrapping it any layout:

Defining the layout within templates

This is certainly useful when you wish to substitute templates used by third-party bundles through your application configuration. Declaring layouts in this manner will override any rendering configuration on the controller that are set via annotations.

In your template file:

Template names

As you can see in the above examples, you can omit the format part in naming your phtml templates. That is, FooBundle:Controller:template.phtml is equivalent to FooBundle:Controller:template.html.phtml.

The bundle will look for bundle:controller:name.format.phtml or bundle:controller:name.phtml and will use whichever exists.

Explicit view composition

Returning a pre-configured ViewModel is also possible:

View Helpers

Learn more about view helpers here: View helpers documentation

Contributing

Contributions are very welcome!

No unit tests yet.


All versions of zfview-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/framework-bundle Version >=2.3
zendframework/zend-view Version 2.2.*
zendframework/zend-servicemanager Version 2.2.*
zendframework/zend-filter Version 2.2.*
zendframework/zend-escaper Version 2.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 bez/zfview-bundle contains the following files

Loading the files please wait ....