Monday, December 9, 2013

Jquery : Useful Selectors

Hi,

Jquery Useful Selectors are: 

1. How to set checked attribute in CheckBox.

$("."+cssClass).attr('checked', True);


2. How to select element on the basis of disable attribute:

$("."+cssClass+":not[disabled]").attr('checked', true);







Note: Above selector solution will be increased ASAP.

ZF2 : Custom config file inside module(s)

Hi,

ZF2 has the feature to create custom config file inside module(s).

Its provide help to declared variable those will used inside the particular module.

It is independent of main ZF2 config file.

Below are step to create/Use the custom config file inside the module:

Step 1: Create Module as Report

Step 2: Create custom config file in module's config directory i.e. module.customconfig.php, 

Step 3: Sample content inside module.customconfig.php

return array(
         'report' => array(
              'header' => array(
                    'name' => 'Name'
               )
         ),
);


Step 4: In controller of Report Module, Ex: ReportController.php

In Action: 

$config = $this->getServiceLocator ()->get ( 'config' );
//Take custom-config data from config file
$data = $config['report'];
print_r($data);