atm/pointsbundle

Points management bundle

Maintainers

👁 ALTUMA

Package info

bitbucket.org/ALTUMA/atm_points

Type:symfony-bundle

pkg:composer/atm/pointsbundle

Statistics

Installs: 50

Dependents: 0

Suggesters: 0

1.0.4 2018-03-27 14:57 UTC

Requires

  • php: >=5.3.9

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 730edd49f54c9b75196152e4bd5859bd0ab012c5

  • Alberto Tuzon <atuzon1986.woop@gmail.com>

atm points bundle

This package is auto-updated.

Last update: 2026-06-28 10:27:35 UTC


README

A Points Manager System

Installation

Install through composer:

php -d memory_limit=-1 composer.phar require atm/pointsbundle

In your AppKernel

public function registerbundles()
{
 return [
 	...
 	...
 	new ATM\PointsBundle\ATMPointsBundle(),
 ];
}

Routing

Append to main routing file:

# app/config/routing.yml
 
atm_points:
 resource: "@ATMPointsBundle/Resources/config/routing.yml"
 prefix: /

Configuration sample

Default values are shown below:

# app/config/config.yml
 
atm_points:
 class:
 model:
 point: Your Points class Namespace
 user: Your User class Namespace
 image_gallery: Your ImageGallery class Namespace 
 video: Your Video class Namespace 
 user_point_role: User role that is going to have points for example: 'ROLE_USER'
 gallery_points: Amount of points
 video_points: Amount of points
 description_points: Amount of points
 profile_image_points: Amount of points
 header_image_points: Amount of points

Inheritance of classes

In order to use the ATMPointsBundle classes you will have to create your own Points class that will extend from the ATMPointsBundle's Points classes as shown bellow:

namespace CoreBundle\Entity;
use ATM\PointsBundle\Entity\Point as BasePoint;

class Point extends BasePoint{

 public function __construct(){
 parent::__construct();
 }
}

Twig Extension

You can use the following twig extension to know how many points a user has:

{{ getAtmUserPoints(user.id) }}