PHPackages                             unl/wdn-symfony-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. unl/wdn-symfony-framework

ActiveLibrary[Framework](/categories/framework)

unl/wdn-symfony-framework
=========================

A symfony framework for UNL WDN based applications

0281Twig

Since Mar 10Pushed 5d ago5 watchersCompare

[ Source](https://github.com/unl/wdn-symfony-framework)[ Packagist](https://packagist.org/packages/unl/wdn-symfony-framework)[ RSS](/packages/unl-wdn-symfony-framework/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

WDN Symfony Framework
=====================

[](#wdn-symfony-framework)

***Notice: This framework is currently a prototype and a WIP.***

Uses the [Symfony Bundle System](https://symfony.com/doc/current/bundles.html)to provide WDN PHP twig templates to be used for application layout. The twig templates use `include` to pull in current WDN template includes and `block` to assign markup/content to WDN template editable areas.

This framework bundle is dependent on the [DCF Symfony Framework](https://github.com/digitalcampusframework/dcf-symfony-framework)to provide common DCF base controller and partial templates. Other DCF may be available later.

Version Syncing
---------------

[](#version-syncing)

The WDN layout templates should be maintained in the [WDN Repo](https://github.com/unl/wdntemplates) and not in this repo. When updates are made to WDN you the maintainers of this repo should use the `sync-version.php` script to update the layout templates for a specific WDN major version (i.e. 5.3).

Example: `php sync-version.php 5.3` to sync `5.3`.

Any updates can then be committed to this branch.

Implementation
--------------

[](#implementation)

### composer.json

[](#composerjson)

Add to `require` section:

```
"digitalcampusframework/dcf-symfony-framework": "dev-main",
"unl/wdn-symfony-framework": "dev-main"

```

run `composer install`

### Config

[](#config)

Add the following to `config/bundles.php` return array:

```
DCF\Bundle\FrameworkBundle\DCFFrameworkBundle::class => ['all' => true],
WDN\Bundle\FrameworkBundle\WDNFrameworkBundle::class => ['all' => true],

```

This tells the application which bundles to use.

### WDN Files

[](#wdn-files)

Add symlink to WDN in symphony project's `templates` and `public` directories so application can read in WDN includes, css, and javascript. You can achieve this in other ways if desired.

### Create Base Application Template

[](#create-base-application-template)

Add `wdnbase.html.twig` (or whatever name) file to project's `templates` directory.

Use this file to set application's default template block values. These can be overwritten in each template file if necessary.

Sample file:

```
{# templates/wdnbase.html.twig #}
{% extends '@WDNFramework/5.3/php.app_local.dwt.twig' %}

{% block head %}

{% endblock %}

{% block highlighted %}
{{ include('@DCFFramework/partials/flash-notices.html.twig') }}
{% endblock %}

{% block jsbody %}

    WDN.setPluginParam("idm", "logout", "/logout/");
    WDN.initializePlugin("notice");

{% endblock %}

{# Default Block Values #}
{% block doctitle %}Test App{% endblock %}
{% block titlegraphic %}Test App{% endblock %}
{% block affiliation %}University Communication{% endblock %}
{% block breadcrumbs %}

        Nebraska
        Chat Administration

{% endblock %}
{% block navlinks %}

        Home
        Lucky
        Help

{% endblock %}
{% block appcontrols %}

    Home
    Lucky
    Help

{% endblock %}
{% block contactinfo %}

    About the Directory
