PHP Classes

D3 PHP Activity Log: Track of changes in objects of given model objects

Recommend this page to a friend!
  Info   View files Documentation   View files View files (39)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-08 (8 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 27 All time: 10,640 This week: 192Up
Version License PHP version Categories
d3activity 1.0Freeware5PHP 5, Logging, Design Patterns
Description Author

This package can track of changes in objects of given model objects.

It can wrap around given model and model detail classes, so the changes made to the specified model class objects are recorded by this activity class.

Applications can also retrieve the activity of changes in the model class objects to allow users to examine what happened.

Picture of Uldis Nelsons
Name: Uldis Nelsons <contact>
Classes: 17 packages by
Country: Latvia Latvia
Age: 53
All time rank: 20817 in Latvia Latvia
Week rank: 177 Up2 in Latvia Latvia Up
Innovation award
Innovation award
Nominee: 11x

Winner: 2x

Details

Activity registry"

Registre models activities and get activity lists

Features

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require d3yii2/d3activity "*"

or add

"d3yii2/d3activity": "*"

to the require section of your composer.json file.

defining components

    'components' => [
        'activityList' => [
            'class' => 'd3yii2\d3activity\components\D3ActivityList',
            'sysCompanyId' => static function () {
                return \Yii::$app->SysCmp->getActiveCompanyId();
            },
            'models' => [
                [
                    'class' => 'd3modules\d3invoices\models\InvInvoice',
                    'detailClass' => 'd3modules\d3invoices\components\InvInvoiceD3Activity'
                ]
            ],
        ],
        'activityRegistar' => [
            'class' => 'd3yii2\d3activity\components\DbActivityRegistar',
            'sysCompanyId' => static function () {
                return \Yii::$app->SysCmp->getActiveCompanyId();
            },
            'userId' => static function () {
                return \Yii::$app->user->id;
            }            
            
        ],
    ]

Usage

Registr eactivity

    Yii::$app
        ->activityRegistar
        ->registerModel(
            $model,
            $this->route,
            ArrayHelper::filter($deliveryModel->attributes,[
                'recipient_person'
            ])
        );

Get activity record list

        $sysModelIdA = SysModelsDictionary::getIdByClassName(TestModel::class);
        $sysModelIdB = SysModelsDictionary::getIdByClassName(self::TEST_CLASS_NAME);
        Yii::$app->activityList->filter = [ActivityConfig::PARTNER_ID => 44];
        $list = Yii::$app
            ->activityList
            ->getDescList([$sysModelIdA,$sysModelIdB]);

Examples

  Files folder image Files  
File Role Description
Files folder imageactions (2 files)
Files folder imagecomponents (6 files)
Files folder imagedictionaries (2 files)
Files folder imagedoc (2 files)
Files folder imagegii (3 files)
Files folder imagelogic (2 files)
Files folder imagemessages (1 directory)
Files folder imagemigrations (6 files)
Files folder imagemodels (5 files, 1 directory)
Files folder imagetests (1 directory)
Files folder imageviews (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Plain text file Module.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  actions  
File Role Description
  Plain text file D3EditableAction.php Class Class source
  Plain text file D3IndexAction.php Class Class source

  Files folder image Files  /  components  
File Role Description
  Plain text file ActivityRecord.php Class Class source
  Plain text file ActivityRegistar.php Class Class source
  Plain text file D3ActivityList.php Class Class source
  Plain text file DbActivityRegistar.php Class Class source
  Plain text file DummyActivityRegistar.php Class Class source
  Plain text file ModelActivityInterface.php Class Class source

  Files folder image Files  /  dictionaries  
File Role Description
  Plain text file D3aActionDictionary.php Class Class source
  Plain text file D3aActionLabelDictionary.php Class Class source

  Files folder image Files  /  doc  
File Role Description
  Accessible without login Image file DB.png Data Auxiliary data
  Accessible without login Plain text file db_schema.schemaxml Data Auxiliary data

  Files folder image Files  /  gii  
File Role Description
  Accessible without login Plain text file D3ActivityGiiantNModule.json Data Auxiliary data
  Accessible without login Plain text file d3a_actionGiiantModel.json Data Auxiliary data
  Accessible without login Plain text file d3a_activityGiiantModel.json Data Auxiliary data

  Files folder image Files  /  logic  
File Role Description
  Plain text file BrowserDataHelper.php Class Class source
  Plain text file RegActivity.php Class Class source

  Files folder image Files  /  messages  
File Role Description
Files folder imagelv (1 file)

  Files folder image Files  /  messages  /  lv  
File Role Description
  Accessible without login Plain text file d3activity.php Aux. Auxiliary script

  Files folder image Files  /  migrations  
File Role Description
  Plain text file m210309_140707_init.php Class Class source
  Plain text file m210329_173818_cha...ActivityDataCol.php Class Class source
  Plain text file m210408_215836_createD3DactionLabel.php Class Class source
  Plain text file m210408_223207_fillD3DActionLabel.php Class Class source
  Plain text file m210413_090707_act...panyIdcanbeNull.php Class Class source
  Plain text file m211202_121335_d3y...ion_name_to_256.php Class Class source

  Files folder image Files  /  models  
File Role Description
Files folder imagebase (3 files)
  Plain text file D3aAction.php Class Class source
  Plain text file D3aActivity.php Class Class source
  Plain text file D3aActivityQuery.php Class Class source
  Plain text file D3DActionLabel.php Class Class source
  Plain text file SysModels.php Class Class source

  Files folder image Files  /  models  /  base  
File Role Description
  Plain text file D3aAction.php Class Class source
  Plain text file D3aActivity.php Class Class source
  Plain text file D3DActionLabel.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imagecomponents (3 files)

  Files folder image Files  /  tests  /  components  
File Role Description
  Plain text file D3ActivityListTest.php Class Class source
  Plain text file TestModel.php Class Class source
  Plain text file TestModelD3Activity.php Class Class source

  Files folder image Files  /  views  
File Role Description
Files folder imageactions (1 file)

  Files folder image Files  /  views  /  actions  
File Role Description
  Accessible without login Plain text file index.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:27
This week:0
All time:10,640
This week:192Up
For more information send a message to info at phpclasses dot org.