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

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

kitpages/activity-bundle
========================

Manages activities

v3.0.1(7y ago)42.6k1MITPHPPHP &gt;=7.1

Since Dec 18Pushed 7y ago4 watchersCompare

[ Source](https://github.com/kitpages/KitpagesActivityBundle)[ Packagist](https://packagist.org/packages/kitpages/activity-bundle)[ Docs](https://github.com/Kitpages/KitpagesActivityBundle)[ RSS](/packages/kitpages-activity-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (12)Versions (6)Used By (0)

KitpagesActivityBundle
======================

[](#kitpagesactivitybundle)

[![Build Status](https://camo.githubusercontent.com/62926d924622a199d384024eb91f648d9157e9a4f6f7cc020de26ccec9965772/68747470733a2f2f7472617669732d63692e6f72672f6b697470616765732f4b69747061676573416374697669747942756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kitpages/KitpagesActivityBundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/e10276184a4a8acbddb3d8ddc0a6306ae1704281e393a4d188b831a6fd6bc2e2/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f64363363633038372d613033332d343238612d626466392d3938373062666266346464372f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/d63cc087-a033-428a-bdf9-9870bfbf4dd7)

Records activity of a website and display notifications on some pages.

Mostly used for rapid prototyping.

Quick Start
-----------

[](#quick-start)

Create an activity

```
$this->get("kitpages_activity.activity_manager")->createActivity(
    "my_category",
    "my title",
    "my message content",
    "my url", //optionnal
    "my reference", //optionnal
    array("key1" => "val1", ), //optionnal
);
```

Display a list of activities in a twig template

```
{{ render(controller('KitpagesActivityBundle:Activity:list', {
    'request': app.request, // mandatory
    'filterList': { "category": "my_category" }, // optionnal
} ) ) }}
```

get activities in PHP

```
$activityManager = $this->get("kitpages_activity.activity_manager");
$activityList = $activityManager->getActivityList( array(
    "category" => "my category"
) );
```

Features :
----------

[](#features-)

- record activities
- attach activities to an object using reference
- attach activities to categories
- easy to display activities with a paginator and a full text filter
- filter activities by category, title, message, reference
- you can sort activities

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

[](#installation)

Using [Composer](http://getcomposer.org/), just `$ composer require kitpages/activity-bundle` package or:

```
{
  "require": {
    "kitpages/activity-bundle": "~1.0"
  }
}
```

Then add the bundle in AppKernel :

```
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Kitpages\ActivityBundle\KitpagesActivityBundle(),
            new Kitpages\DataGridBundle\KitpagesDataGridBundle(),
        );
    }
```

Display a list of activities in a twig template
-----------------------------------------------

[](#display-a-list-of-activities-in-a-twig-template)

```
{{ render(controller('KitpagesActivityBundle:Activity:list', {
    'request': app.request, // mandatory
    'filterList': { "category": "my_category" }, // optionnal
    'orderBy': 'id ASC' // optionnal, default to "createdAt DESC"
} ) ) }}
```

get activity list in PHP
------------------------

[](#get-activity-list-in-php)

### get all activities

[](#get-all-activities)

```
$activityManager = $this->get("kitpages_activity.activity_manager");
$activityList = $activityManager->getActivityList();
```

### get activities for a given category

[](#get-activities-for-a-given-category)

```
$activityManager = $this->get("kitpages_activity.activity_manager");
$activityList = $activityManager->getActivityList( array(
    "category" => "my category"
) );
```

### get activities for all categories beginning by "payments."

[](#get-activities-for-all-categories-beginning-by-payments)

```
$activityManager = $this->get("kitpages_activity.activity_manager");
$activityList = $activityManager->getActivityList( array(
    "category" => "payment*"
) );
```

### principle of filter

[](#principle-of-filter)

- You can filter the fields category, title, message, url or reference.
- You can use "\*" at the beginning or the end of your filter as a wildcard (everything with category beginning by "xxx" or ending by "xxx").
- You can escape the wildcard by using '\*'

### ordering results

[](#ordering-results)

By default activity list is ordered by createdAt DESC. You can specify the order :

```
$activityManager = $this->get("kitpages_activity.activity_manager");
$activityList = $activityManager->getActivityList(
    array("category" => "payment.*"),
    "id DESC", // sort field : id, reference, category, createdAt
);
```

Best practices
--------------

[](#best-practices)

- the category field is used for filtering activities by category
- the reference field is used to represent the object linked to this activity (if there is an object). I imagine references like "company.15.user.23". We can then retrieve activities for the company or this user using wildcard in filters.
- The data field is used to add every information you would need linked to this activity

note : category is not mandatory in filter list.

### Versions

[](#versions)

2013-12-18 : v1.0.0

- first version

2014-11-07 : v2.0.0

- upgrade to KitpagesDataGrid 2.x
- filters on activities
- added reference, and custom data
- ordering of activity list
- better unit tests

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~434 days

Total

5

Last Release

2839d ago

Major Versions

v1.0.0 → v2.0.02014-11-07

v2.0.1 → v3.0.02018-08-16

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v3.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/95c1423b83010cc8afd1fc966d26cc6fc5d7fb5d000e5d7582adcd8392bd239c?d=identicon)[kitpages](/maintainers/kitpages)

---

Top Contributors

[![philippe-levan](https://avatars.githubusercontent.com/u/393066?v=4)](https://github.com/philippe-levan "philippe-levan (22 commits)")[![eliecharra](https://avatars.githubusercontent.com/u/6154987?v=4)](https://github.com/eliecharra "eliecharra (2 commits)")

---

Tags

historyactivitiy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kitpages-activity-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)[metamodels/core

MetaModels core

9956.1k68](/packages/metamodels-core)

PHPackages © 2026

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