2017 © Pedro Peláez
 

library kwc-notification-box

Notification Box package that displays information/news/agreements and stores the 'time of click' in a cookie

image

vivid-planet/kwc-notification-box

Notification Box package that displays information/news/agreements and stores the 'time of click' in a cookie

  • Wednesday, June 6, 2018
  • by Kaufi
  • Repository
  • 5 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

kwc-notification-box

Notification Box

Provides a Popup which ca be used to show changes for website users. Disappears when a user closes the box or after 30 days., (*1)

Has to be included as a box and made editable:, (*2)

$ret['generators']['notificationBox'] = array(
    'class' => 'Kwf_Component_Generator_Box_Static',
    'component' => 'KwcPolicy_Kwc_NotificationBox_Component',
    'inherit' => true,
    'unique' => true,
);
$ret['editComponents'][] = 'notificationBox';

Policy Text

Provides a component which can be used to assign a centralized text with a link to the policy page., (*3)

Has to be included in the Root-Component (no box!) and made editable:, (*4)

$ret['generators']['policyText'] = array(
    'class' => 'Kwf_Component_Generator_Static',
    'component' => 'KwcPolicy_Kwc_PolicyText_Component',
);
$ret['editComponents'][] = 'policyText';
  • Usage in a non-Frontend-Form-Component: In getTemplateVars() just call the following: $ret['policyText'] = KwcPolicy_Kwc_PolicyText_Component::getPolicyText($this->getData(), $renderer);
  • Usage in a Field of a Frontend-Form-Component:
    1. Add the field where the text should appear as usual when defining the frontend form but leave the text empty: $this->add(new Kwf_Form_Field_Checkbox('terms_and_conditions')) ->setAllowBlank(false) ->setHideLabel(true);
    2. In getTemplateVars() before calling parent you have to set the Text: $policyText = KwcPolicy_Kwc_PolicyText_Component::getPolicyText($this->getData(), $renderer); $this->getForm()->fields->getByName('terms_and_conditions') ->setBoxLabel($policyText);

The Versions

06/06 2018

1.0.x-dev

1.0.9999999.9999999-dev http://www.vivid-planet.com/

Notification Box package that displays information/news/agreements and stores the 'time of click' in a cookie

  Sources   Download

The Requires

 

30/05 2018

dev-update-logic

dev-update-logic http://www.vivid-planet.com/

Notification Box package that displays information/news/agreements and stores the 'time of click' in a cookie

  Sources   Download

The Requires

 

29/05 2018

dev-notification-box

dev-notification-box http://www.vivid-planet.com/

Notification Box package that displays information/news/agreements and stores the 'time of click' in a cookie

  Sources   Download

The Requires