PHPackages                             nligo/material-bundle - 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. nligo/material-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

nligo/material-bundle
=====================

appcoachs ad material package

026PHP

Since Mar 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nligo/MaterialBundle)[ Packagist](https://packagist.org/packages/nligo/material-bundle)[ RSS](/packages/nligo-material-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

MaterialBundle
==============

[](#materialbundle)

Use [MaterialBundle](https://github.com/nligo/MaterialBundle) instead
---------------------------------------------------------------------

[](#use-materialbundle-instead)

MaterialBundle, an material for Appcoachs
=========================================

[](#materialbundle-an-material-for-appcoachs)

Requirements
------------

[](#requirements)

- Symfony (*2.1 (master branch) or later*)

Installation
------------

[](#installation)

composer require the project:

```
    composer require nligo/material-bundle "dev-master"

```

Register the bundles in your `AppKernel`:

```
$bundles = array(
        new Appcoachs\Bundle\MaterialBundle\AppcoachsMaterialBundle(),
        ...
);

```

Using the `MaterialBundle` i only need a little configuration in your `app/config/sonata.yml`. Join the following configuration can be:

```
sonata_admin:
    dashboard:
        groups:
        sonata.admin.group.,material:
            label: Video Private Auction
            item_adds:
                - appcoachs.admin.material.creative
            roles: [ ROLE_ADMIN, ROLE_ADVERTISER, ROLE_OPERATOR ]

        sonata.admin.group.,admin:
            label: Admin Setting
            item_adds:
                - appcoachs.admin.material.mediamanagement
            roles: [ ROLE_ADMIN]

```

In `app/config/routing.yml` introduced in the routing file:

```
appcoachs_material:
    resource: "@AppcoachsMaterialBundle/Resources/config/routing.yml"
    prefix:   /

```

In `Appcoachs/Bundle/ManageBundle/Document/Creative.php` New fields and generates get set method:

```
/**
 * Creative Campaign
 *
 * @MongoDB\ReferenceOne(targetDocument="Appcoachs\Bundle\ManageBundle\Document\Campaign")
 */
protected $campaign;

/**
 * Get campaign
 *
 * @return Appcoachs\Bundle\ManageBundle\Document\Campaign $campaign
 */
public function getCampaign()
{
    return $this->campaign;
}

/**
     * Creative ReviewStatus
     *
     * @MongoDB\String
     */
    protected $reviewStatus;

    /**
     * Creative Adid
     *
     * @MongoDB\String
     */
    protected $adid;

/**
 * Set campaign
 * @param Appcoachs\Bundle\ManageBundle\Document\Campaign $campaign
 * @return self
 */
public function setCampaign($campaign)
{
    $this->campaign = $campaign;
}

public function __construct()
{
    $this->setReviewStatus('Ready');
}

/**
 * Set reviewStatus
 *
 * @param string $reviewStatus
 * @return self
 */
public function setReviewStatus($reviewStatus)
{
    $this->reviewStatus = $reviewStatus;
    return $this;
}

/**
 * Get reviewStatus
 *
 * @return string $reviewStatus
 */
public function getReviewStatus()
{
    return $this->reviewStatus;
}

/**
 * Set mediaManagement
 *
 * @param \Appcoachs\Bundle\MaterialBundle\Document\MediaMangement $mediaManagement
 * @return self
 */
public function setMediaManagement($mediaManagement)
{
    $this->mediaManagement = $mediaManagement;
}

/**
 * Get MediaManagement
 *
 * @return \Appcoachs\Bundle\MaterialBundle\Document\MediaMangement $mediaManagement
 */
public function getMediaManagement()
{
    return $this->mediaManagement;
}

```

Using the `MaterialBundle` i only need a little configuration in your `Appcoachs/Bundle/ManageBundle/Admin/AdgroupAdmin.php`. Replace the following method:

```
public function preUpdate($object)
    {
        if ($object->getReview() == 'approved') {
            $object->setWeight(1);
        }
        if ($object->getReview() == 'rejected') {
            $object->setWeight(2);
        }
        $owner = $this->getConfigurationPool()->getContainer()->get('security.token_storage')->getToken()->getUser();
        $object->setOwner($owner);
        if ($object->getCreatives()) {
            foreach ($object->getCreatives() as $creative) {
                if ($creative->getName() && $creative->getMedia()) {
                    $creative->setOwner($owner);
                    $creative->setCampaign($object->getCampaign());
                    $creative->setAdgroup($object);
                } else {
                    $object->removeCreative($creative);
                }
            }
        }

        if ($object->getVideos()) {
            foreach ($object->getVideos() as $videoad) {
                if ($videoad->getStart() && $videoad->getComplete() && $videoad->getVideo()) {
                    $videoad->setAdgroup($object);
                } else {
                    $object->removeVideo($videoad);
                }
            }
        }

        parent::preUpdate($object);
    }

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25634187?v=4)[nligo](/maintainers/nligo)[@nligo](https://github.com/nligo)

### Embed Badge

![Health badge](/badges/nligo-material-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nligo-material-bundle/health.svg)](https://phpackages.com/packages/nligo-material-bundle)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M290](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
