panels_required_context Class Reference

Inheritance diagram for panels_required_context:
[legend]

List of all members.


Detailed Description

This is used to explain to Panels what context is required.

Definition at line 67 of file plugins.inc.


Public Member Functions

 filter ($contexts)
 panels_required_context ()
 select ($contexts, $context)

Public Attributes

 $keywords = ''

Member Function Documentation

panels_required_context::filter ( contexts  ) 

Reimplemented in panels_optional_context.

Definition at line 79 of file plugins.inc.

00079                              {
00080     $result = array();
00081 
00082     // See which of these contexts are valid
00083     foreach ($contexts as $cid => $context) {
00084       if ($context->is_type($this->keywords)) {
00085         $result[$cid] = $context;
00086       }
00087     }
00088 
00089     return $result;
00090   }

panels_required_context::panels_required_context (  ) 

Definition at line 70 of file plugins.inc.

00070                                      {
00071     $args = func_get_args();
00072     $this->title = array_shift($args);
00073     if (count($args) == 1) {
00074       $args = array_shift($args);
00075     }
00076     $this->keywords = $args;
00077   }

panels_required_context::select ( contexts,
context 
)

Reimplemented in panels_optional_context.

Definition at line 92 of file plugins.inc.

00092                                        {
00093     if (empty($context) || empty($contexts[$context])) {
00094       return FALSE;
00095     }
00096     return $contexts[$context];
00097   }


Member Data Documentation

panels_required_context::$keywords = ''

Definition at line 68 of file plugins.inc.


The documentation for this class was generated from the following file:

Generated on Tue Mar 9 05:00:25 2010 for Panels 2 by  doxygen 1.5.6