PHPackages                             lispa/amos-cwh - 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. lispa/amos-cwh

ActiveComponent

lispa/amos-cwh
==============

Gestione CWH - plugin

2.13.0(3mo ago)02561PHPPHP &gt;=5.4.0

Since Feb 22Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/regionelombardia-open20/open2-cwh)[ Packagist](https://packagist.org/packages/lispa/amos-cwh)[ Docs](http://www.open20.it/)[ RSS](/packages/lispa-amos-cwh/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (51)Used By (1)

Amos CWH
========

[](#amos-cwh)

The module Collaboration Web House defines the rules for collaboration between project plugins and its network.
The purpose of cwh is to enable publication of contents using rules, based on user interests or network membership.

#### Content Models

[](#content-models)

For content model we mean a model containing information that can be published to all users, shared in a network or marked as belonging to specif interest areas (tags).
The interface that must be implemented to activate the model with cwh is (from amos core) **open20\\amos\\core\\interfaces\\ContentModelInterface** (see section **Configuration Wizard**)
Content model configurations are stored in table **cwh\_config\_contents**.

##### Publication

[](#publication)

Once created, the content publication is stored in table **cwh\_pubblicazioni**The News model in AmosNews is an example of content model.

#### Cwh nodes

[](#cwh-nodes)

Cwh nodes are domains for publication, as validation scope or as recipients (publication scope) - see validators and recipients section .
Domain configurations are stored in table **cwh\_config**, from this configuration the view **'cwh\_nodi\_view'** is created, to map information about all the networks present in the project (see section Cwh Nodi View).

##### Network Models

[](#network-models)

A network is a model that allows creation of membership groups (user-network association) and information sharing between users belonging to the same group.
The interface that a model must implement to be suitable as a cwh publication network is (in amos cwh) **open20\\amos\\cwh\\base\\ModelNetworkInterface** (see section **Configuration Wizard**)
In my profile, it is possible to view user networks.

##### User Domain

[](#user-domain)

In addition to networks models, in **cwh\_config** table we can find configuration for single user, that is not to be considered properly as a network but has its own configurations and takes part to cwh processes as a node (a content can be published for a single user). In amos admin my profile in network section, UserContact map is displayed as network (if user contacts are enabled) but it does not depend on cwh configuration: user contacts can be enabled even if cwh module is not enabled. User nodes can be set as Validator (Publishing for fields in content form) but not as publication scope (recipient) as by now it not possible to publish a content visible just to another user.

#### Publication Rules

[](#publication-rules)

Default publication rules are:

1. **PUBLIC** To All - public for all users
2. **TAG** All users in the interest areas
    - in tab 'own interest' the content is visible only if user interest matches content tags
    - visible in tab 'all'
3. **NETWORK** All users in specific scopes: it means the content has been published within one or more networks
    - in tab 'own interest' the content is visible only to user who are member of the specified networks
    - in tab 'all' the content is visible if the network is public (eg. community open), if the network has no visibility rules or if the user is member of the network
4. **NETWORK AND TAGS** All users in specified networks and matching the content tags.
    - Same as 3. with addinitional condition of matching areas of interest to view the content in 'own interest' tab

In in content model with **CwhNetworkBehaviors**

- the attribute specifying the publication rule is **$model-&gt;regola\_pubblicazione**
- in model form the field to set publication rule is shown by **widget open20\\amos\\cwh\\widgets\\RegolaPubblicazione**.

See section **Content publication** for more information.

##### Publication rule Customization

[](#publication-rule-customization)

Rule 2 and 4, based on tags are disabled if the tag module is not active (not present in project configuration).
It is possible to allow publishing with role 1 (to all users) only users having a specific role (rbac); to do so add to Cwh module configurations:

```
'modules' => [
    ....
    'cwh' => [
            'class' => 'open20\amos\cwh\AmosCwh',
            'regolaPubblicazioneFilter' => true,
            'regolaPubblicazioneFilterRole' => 'MY_ROLE'
        ],
    ....
]
```

By default the publication rules filtering by role is disabled (all users can publish contents with rule 1. If publication rule filtering is enabled but role is not specified, the default role allowing publishing rule 1 is 'VALIDATOR\_PLUS'

To disable publication rules, add to cwh configurations regolaPubblicazioneEnabled set to false:

```
'modules' => [
    ....
    'cwh' => [
            'class' => 'open20\amos\cwh\AmosCwh',
            'regolaPubblicazioneEnabled' => false
        ],
    ....
]
```

#### Validators - 'Publishing for'

[](#validators---publishing-for)

If content model workflow is not bypassed, it is mandatory to set a validation scope when publishing a content.
Therefore in form/wizard the cwh node must be specified independently from publication rule.

In in content model with **CwhNetworkBehaviors**

- the attribute specifying the validators is **$model-&gt;validatori** (an array in case in future more validators will needed).
- in model form the field to set validators is shown by **widget open20\\amos\\cwh\\widgets\\Validatori**.

If 'My own' (Mio conto) is selected, the user is personally publishing a content (no specific network is selected) so validation may be done by users with 'VALIDATOR' role or by the user facilitator (if it is enabled in the platform). If a network validation scope is set, the validation will be done by users having permission to validate the content under the network: **domains permission to create and validate contents in a network** are stored in table **cwh\_auth\_assignment**.

Examples:

a. Jhon Doe, user\_id = 5 is publishing a News with Personal Validation scope (My own) and he is falicilitated by user with id 3. News can be validated by :

- Jhon himself if he has VALIDATOR role.
- a VALIDATOR user.
- user 3 (not needed to be a VALIDATOR too) because he has cwh\_auth\_assignment permission to validate news in user domain for user with id= 3.

b. Jhon Doe wants to create a news in community with id = 6.

- he must be a participant of community 6 and have cwh\_auth\_assignment permission to create news for community with id = 6 (PARTICIPANT role in community\_user\_mm gives the permission)
- the news can be validated by users having validate permission for community 6 - usually the community managers of the community.
- a VALIDATOR user can't validate the news if he is not member of community 6. network (eg. in a community any user of the community with PARTICIPANT role in the COMMUNITY\_USER\_MM table).

##### Validators Customization

[](#validators-customization)

It is possible to hide validator section from form/wizard (needed for example in case workflow is not active), setting option validatoriEnabled to false:

```
'modules' => [
    ....
    'cwh' => [
            'class' => 'open20\amos\cwh\AmosCwh',
            'validatoriEnabled' => false
        ],
    ....
]
```

#### Recipients - 'Publication scope'

[](#recipients---publication-scope)

If a publication rule that involve networks has been choosed, it is mandatory to select a network for for content publicatio (eg. a community).

In in content model with **CwhNetworkBehaviors**

- the attribute specifying the publication scope is **$model-&gt;destinatari** (an array containing cwh\_nodi\_id of the selected networks).
- in model form the field to set recipients is shown by **widget open20\\amos\\cwh\\widgets\\Destinatari**.

##### Recipients Customization

[](#recipients-customization)

It is possible to hide recipients section from form/wizard (needed for example in case workflow is not active), setting option destinatariEnabled to false:

```
'modules' => [
    ....
    'cwh' => [
            'class' => 'open20\amos\cwh\AmosCwh',
            'destinatariEnabled' => false
        ],
    ....
]
```

#### Recipients Check

[](#recipients-check)

Cwh module also provides a widget to get the 'Recipients check' utility inside the content publication form. Recipients check **widget open20\\amos\\cwh\\widgets\\RecipientsCheck** draws a button opening a modal showing the list of user for whose the content will be of 'own interest'.

#### Configuration Wizard

[](#configuration-wizard)

To use the configuration wizard, check that php extensions soap and intl are enabled.

##### Networks

[](#networks)

##### Contents

[](#contents)

It is possible to configure a content model if it is suitable to be used with cwh content management ( implements **open20\\amos\\core\\interfaces\\ContentModelInterface** ). To do so:

- Activate cwh plugin
- Open cwh configuration wizard (admin privilege is required) url: /cwh/configuration/wizard
- search for the model in content configuration section
- edit configuration of the model and save **//TODO specify how fields are used**

Documentation
-------------

[](#documentation)

[Read the Documentation](docs/guide-it/README.md)

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

[](#installation)

```
'modules' => [
    ....
    'cwh' => [
            'class' => 'open20\amos\cwh\AmosCwh',
        ],
    ....
]
```

#### Module Parameters

[](#module-parameters)

**regolaPubblicazioneFilter** - see section Publication rule customization
**regolaPubblicazioneFilterRole** - see section Publication rule customization
**regolaPubblicazioneEnabled** - see section Publication rule customization
**validatoriEnabled** - see section Validators customization
**destinatariEnabled** - see section Recispients customization
**cached** - bool default = false - if enable cwh query caching when finding contents
**cacheDuration** int default = 86400 - if query caching is active (cached = true) the cache duration (by default 24 hours).
**enableDestinatariFatherChildren** : if is true you can publish a content from a community to the community father and the community children. **tagsMatchEachTree** : bool - default = false.
Set to true if a content is to be considered of user interest when there is tag-match of each tag tree
Default is false: at least one content tag matching user interest (any tree)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~97 days

Recently: every ~246 days

Total

27

Last Release

102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6eb97765ff9c2a6c83df362376ac9fe8f21e4ac4c3b65fd1e2380233178fe500?d=identicon)[open2.0](/maintainers/open2.0)

---

Top Contributors

[![StefanoCavazzini](https://avatars.githubusercontent.com/u/27275250?v=4)](https://github.com/StefanoCavazzini "StefanoCavazzini (1 commits)")[![waltermazza](https://avatars.githubusercontent.com/u/46817459?v=4)](https://github.com/waltermazza "waltermazza (1 commits)")

---

Tags

yii2amoscwh

### Embed Badge

![Health badge](/badges/lispa-amos-cwh/health.svg)

```
[![Health](https://phpackages.com/badges/lispa-amos-cwh/health.svg)](https://phpackages.com/packages/lispa-amos-cwh)
```

PHPackages © 2026

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