Dotclear


Ignore:
Timestamp:
03/08/18 17:58:39 (8 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Code formatting (PSR-2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/simpleMenu/_widgets.php

    r2928 r3730  
    1010# 
    1111# -- END LICENSE BLOCK ----------------------------------------- 
    12 if (!defined('DC_RC_PATH')) { return; } 
     12if (!defined('DC_RC_PATH')) {return;} 
    1313 
    14 $core->addBehavior('initWidgets',array('simpleMenuWidgets','initWidgets')); 
     14$core->addBehavior('initWidgets', array('simpleMenuWidgets', 'initWidgets')); 
    1515 
    1616class simpleMenuWidgets 
    1717{ 
    18      public static function initWidgets($w) 
    19      { 
    20           $w->create('simplemenu',__('Simple menu'),array('tplSimpleMenu','simpleMenuWidget'),null,'List of simple menu items'); 
    21           $w->simplemenu->setting('title',__('Title (optional)').' :',__('Menu')); 
    22           $w->simplemenu->setting('description',__('Item description'),0,'combo', 
    23                array( 
    24                     __('Displayed in link') => 0,                     // span 
    25                     __('Used as link title') => 1,                         // title 
    26                     __('Displayed in link and used as title') => 2,   // both 
    27                     __('Not displayed nor used') => 3                 // none 
    28                     ) 
    29                ); 
    30           $w->simplemenu->setting('homeonly',__('Display on:'),0,'combo', 
    31                array( 
    32                     __('All pages') => 0, 
    33                     __('Home page only') => 1, 
    34                     __('Except on home page') => 2 
    35                     ) 
    36                ); 
    37           $w->simplemenu->setting('content_only',__('Content only'),0,'check'); 
    38           $w->simplemenu->setting('class',__('CSS class:'),''); 
    39           $w->simplemenu->setting('offline',__('Offline'),0,'check'); 
    40      } 
     18    public static function initWidgets($w) 
     19    { 
     20        $w->create('simplemenu', __('Simple menu'), array('tplSimpleMenu', 'simpleMenuWidget'), null, 'List of simple menu items'); 
     21        $w->simplemenu->setting('title', __('Title (optional)') . ' :', __('Menu')); 
     22        $w->simplemenu->setting('description', __('Item description'), 0, 'combo', 
     23            array( 
     24                __('Displayed in link')                   => 0, // span 
     25                __('Used as link title')                  => 1, // title 
     26                __('Displayed in link and used as title') => 2, // both 
     27                __('Not displayed nor used')              => 3 // none 
     28            ) 
     29        ); 
     30        $w->simplemenu->setting('homeonly', __('Display on:'), 0, 'combo', 
     31            array( 
     32                __('All pages')          => 0, 
     33                __('Home page only')      => 1, 
     34                __('Except on home page') => 2 
     35            ) 
     36        ); 
     37        $w->simplemenu->setting('content_only', __('Content only'), 0, 'check'); 
     38        $w->simplemenu->setting('class', __('CSS class:'), ''); 
     39        $w->simplemenu->setting('offline', __('Offline'), 0, 'check'); 
     40    } 
    4141} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map