docs.inc

Go to the documentation of this file.
00001 <?php
00002 // $Id: docs.inc,v 1.1.2.5 2008/07/29 08:57:22 sdboyer Exp $
00003 
00004 /**
00005 @file
00006 This file contains no working PHP code; it exists to provide additional
00007 documentation for doxygen as well as to document hooks and API functions in
00008 the standard Drupal manner.
00009  */
00010 
00011 /**
00012 @addtogroup MainAPI Panels Main API Functions
00013 
00014 These functions comprise the main Panels API. Module developers interested in providing data to Panels, or using Panels as the organization/presentation layer for their module, should familiarize themselves with these functions first and foremost.
00015  */
00016 
00017 /**
00018 @addtogroup HookInvokers Hook Invokers
00019 
00020 Functions in this list invoke one of Panels' numerous hooks. This includes hooks provided by the Panels API itself, as well the client modules that are packaged with Panels.
00021  */
00022 
00023 /**
00024 @addtogroup PanelsAjax Panels Ajax Handlers
00025 
00026 These functions comprise Panels' ajax handling on the php end. They're pretty much only used for admin/editing at the moment.
00027  */
00028 
00029 /**
00030 @mainpage Panels 2 Documentation
00031 
00032 The Panels 2 API Documentation is intended as a guide to the innerworkings of Panels, and will primarily be of interest to Drupal themers and developers. \n\n Panels is a complex and abstract system, which necessitates the use of a lot of specialized terms. If you are new to Panels, we strongly recommend you consult the @ref panels_glossary "Panels Glossary" to familiarize yourself with the jargon.\n\n
00033 
00034 @section panels_api_top Developer API Reference
00035 \li @subpage panels_api_plugins "Plugins API"
00036 
00037 Please note that this documentation is generated directly from the Panels project source code. Consequently, if you find errors or have improvements, you can file a patch in the Panels issue queue at http://drupal.org/project/issues/panels like any other patch. Documentation that is not specific to a file, function, or class is contained in the .inc files in /panels/docs.
00038  */
00039 
00040 /**
00041 @page panels_glossary Panels Glossary
00042 
00043 \par
00044 <em>"Hey - you know that box thing in Panels? It's that...ugh, y'know, it's that rectangular, light-colored box. And it's in the Panels editor. It's right there on the editing form, with its name at the top. No, no! Not the name I gave it on the other form, I CAN read - I mean the name of the boxy THING! What in tarnation do I call the thing itself!?!"<sup>*</sup></em>\n
00045 
00046 If you've ever tried to talk or write about - or, let's be honest, even <em>use</em> - Panels, then you probably know right where that sentence is coming from. Panels has all kinds of 'things' in it - things you click on, things you look at, things that contain other things, things that pop up, things that slide away, things that...well, the list goes on. It's enough of a challenge knowing what they are when we see them, but trying to communicate about Panels with real people, and not Panels itself? Fuhgettaboutit. So we're working on a little glossary that we're hoping might make that just a little better.
00047 
00048 <hr>
00049 
00050 @SECglossary{layout,Layout Terms}
00051 Panels' basic purpose is structure content for viewing, and it makes use of its own set of terms to describe this structure. There are three essential terms - @LGt{pane,Pane}, @LGt{panel,Panel}, and @LGt{display,Display}.
00052 @AG{pane,Pane} Panes are individual content items, and are the smallest/highest-level unit of content that the Panels API itself configures and renders. If you've used the Panels 2 content editor at all, then you're probably most familiar with panes via the 'Add Content' @LGt{modal} where you pick out the content you'd like to add. Each one of the items on that form is a @LGt{content_types,content type} (or subtype); once you select one and fill out the form, you'll see a graphical representation of the new pane appear.
00053 
00054 @AG{panel,Panel} Panels are the containers that hold @LGt{pane,Panes}. When you select a @LGt{layouts,layout}, what you're choosing is the number and arrangement of panels. The content editor represents panels quite well: panels are the blue (by default) boxes with their name at the top and the plus-shaped button that opens the 'Add content' @LGt{modal}. And yes the namespace ambiguity is awful - we're resolving it soon.
00055 
00056 @AG{display,Display} The Display unit is the most abstract of the three layout terms. Again, the Panels 2 content editor is a good way to think about it: there's no visual representation of a display in the editor because the display IS what you're editing: it's the object that contains the @LGt{panel,panels}, and it's settings in the display object that govern, for example, which content types are available on the 'Add Content' form. \n Displays are abstract and often the most difficult for newcomers to Panels to understand. They're also probably the most important thing that developers implementing the Panels API in a @LGt{clientmodule,client module} need to understand, as client modules work primarily with display objects. Displays are essentially the 'root' object of the API - this is functionally true in Panels 2, but it will be literally the case after Panels is rewritten in OO for Panels 3. \n In addition to @LGt{panel,panels}, displays hold almost all of Panels' plugins and are required in most of the @ref mainapi "main API functions"; this is why client modules interact with the Panels API primarily through display objects.
00057  
00058 
00059 @SECglossary{plugins,Panels Plugins}
00060 At its core, Panels is really just a structure for negotiating and handling its plugins. For a thorough introduction to plugins, see the introduction to the @LA{plugins,plugins API}.
00061 
00062 @SSECglossary{plugins,general,General Terms}
00063 The following terms are relevant to all plugin types:
00064 @AG{p-d-func,Plugin Declaration Function} All plugins begin with a declaration function. These declaration functions are what Panels searches for in compiling the list of available plugins, and as such are subject to strict naming conventions. The sole purpose of a plugin declaration function is to return a \pdarray populated with plugin \plugprops.
00065 
00066 @AG{p-d-array,Plugin Definition Array} Plugin definition arrays are returned from \pdfuncs. They are made up of two types of \plugprops: @LGt{p-p-setting,setting properties} and @LGt{p-p-callback,callback properties}. During each page request, Panels stores the information provided by these plugin definition arrays using the logic defined in panels_get_plugins(), allowing other parts of the Panels API to check settings and/or fire callbacks that have been defined in the definition array.
00067 
00068 @AG{plugprop,Plugin Properties} Every plugin definition array is an associative array, and we refer to each of the key/value pairs in that array as a 'property.' These properties govern all aspects of the plugin's behavior.
00069 
00070 @AG{p-p-setting,Setting Properties} Setting properties are values that Panels will use directly in various internal processes when deciding how to handle the plugin. Many setting properties are booleans that govern how Panels moves that plugin through various control statements; others are simple strings for administrative interface titles, or drupal 'weight' integers used to sort the plugin within lists.
00071 
00072 @AG{p-p-callback,Callback Properties} Callback properties are strings containing function names; Panels fires these callbacks at certain points in its internal processes.
00073 
00074 
00075 @SSECglossary{plugins,types,Plugin Types}
00076 Panels currently manages eight different types of plugins:
00077 @AG{arguments,Arguments}
00078 
00079 @AG{content_types,Content Types}
00080 
00081 @AG{context,Context}
00082 
00083 @AG{layouts,Layouts}
00084 
00085 @AG{styles,Styles}
00086 
00087 @AG{relationships,Relationships}
00088 
00089 @AG{cache,Cache}
00090 
00091 @AG{switchers,Switchers}
00092 
00093 @SECglossary{misc,Miscellaneous Terms}
00094 If we could find categories to put these in, we would. Just because we can't find a group to put them in, though, doesn't mean they're not important!
00095 @AG{modal,Javascript Modal Form}
00096 
00097 @AG{clientmodule,Client Module}
00098 
00099 \n\n
00100 <small><sup>*</sup> Yep, that's right - we were talking about a @LGt{panel,Panel}! Oh, the ambiguity...</small>
00101 
00102  */
00103 
00104 /**
00105 @page panels_api_plugins Plugins API Reference
00106 
00107 The Panels API uses a system of plugins to manage pretty much everything it
00108 does. Without the plugins, the API is an empty shell; plugins define the
00109 'what, where, and how' of Panels' behavior. Panels uses eight different
00110 types of plugins. Specific reference information for each plugin type is
00111 available on the corresponding page:
00112     - @Psubplug{content_types,Content Types}
00113 
00114 These correspond to the similarly-named subdirectories filled with .inc
00115 files - each of those .inc files declares at least one plugin.
00116 
00117 @section panels_api_plugins_top_structure Structure of a Plugin
00118 
00119 All panels plugins have the same basic structure. Each plugin begins with a
00120 \pdfunc, which Panels identifies either by function name alone or through a
00121 combination of function name and .inc file location depending on the method
00122 being used. Regardless of the method or plugin type, Panels expects the same
00123 thing to be returned from the plugin declaration function: a \pdarray. The
00124 available \plugprops depend entirely on the type of plugin, so to learn more,
00125 you'll have to consult the documentation for each individual plugin type.
00126 
00127 
00128 There are eight types of panels plugins at present: context, relationships,
00129 arguments, content_types, styles, layouts, cache, and switchers; Panels
00130 provides an API that allows any module to implement these, but there's a
00131 starter set that comes with Panels itself. They're found in the various
00132 subdirectories that live under the Panels directory.
00133 
00134  */

Generated on Thu Jul 29 05:00:14 2010 for Panels 2 by  doxygen 1.5.6