PHPackages                             snapget/yii2-news - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. snapget/yii2-news

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

snapget/yii2-news
=================

News module for Yii2 advanced template.

0.0.6(8y ago)0522MITPHP

Since Mar 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/vasyl-dmytruk/yii2-news)[ Packagist](https://packagist.org/packages/snapget/yii2-news)[ RSS](/packages/snapget-yii2-news/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (7)Used By (0)

News module for Yii2
====================

[](#news-module-for-yii2)

News module for Yii2 advanced template.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist snapget/yii2-news "*"

```

or add

```
"snapget/yii2-news": "*"

```

to the require section of your `composer.json` file.

Migrations
----------

[](#migrations)

To apply module migrations run command

```
./yii migrate --migrationPath=@snapget/news/migrations

```

Configure application
---------------------

[](#configure-application)

Let's start with defining module in `@common/config/main.php`:

```
......
    'modules' => [
        'treemanager' =>  [
            'class' => '\kartik\tree\Module',
            // other module settings, refer detailed documentation
        ],
        'news' => [
            'class' => 'snapget\news\Module',
        ],
    ],
......
```

> Note: Module requires `\kartik\tree\Module`, so your configuration should looks like above.

Restrict access to admin controller from frontend. Open `@frontend/config/main.php` and add following:

```
'modules' => [
    'news' => [
        // following line will restrict access to `admin-news-category` and `admin-news` controllers from frontend application
        'as frontend' => 'snapget\news\filters\FrontendFilter',
        'baseImageUrl' => 'http://news/upload/news',    // needs here absolute url
    ],
],
```

Restrict access to `news` controller from backend. Open `@backend/config/main.php` and add the following:

```
'modules' => [
    'news' => [
        // following line will restrict access to `news` controller from frontend application
        'as backend' => 'snapget\news\filters\BackendFilter',
        'baseImageUrl' => 'http://news/upload/news',    // needs here absolute url
    ],
],
```

Usage
-----

[](#usage)

Go to `/admin-news-category` route to manage news categories.

Go to `/admin-news` route to manage news.

Go to `/news/news` route to view frontend news view.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

2990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa64a5a69e5bb98a97d87721987c93722b7f21a260ec41b2553d2271ccd61d89?d=identicon)[snapget](/maintainers/snapget)

---

Top Contributors

[![vasyl-dmytruk](https://avatars.githubusercontent.com/u/15068767?v=4)](https://github.com/vasyl-dmytruk "vasyl-dmytruk (9 commits)")[![VasylDmytruk](https://avatars.githubusercontent.com/u/32508794?v=4)](https://github.com/VasylDmytruk "VasylDmytruk (1 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/snapget-yii2-news/health.svg)

```
[![Health](https://phpackages.com/badges/snapget-yii2-news/health.svg)](https://phpackages.com/packages/snapget-yii2-news)
```

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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