energine
[ class tree: energine ] [ index: energine ] [ all elements ]

Source for file Link.class.php

Documentation is available at Link.class.php

  1. <?php
  2. /**
  3.  * Содержит класс Link
  4.  *
  5.  * @package energine
  6.  * @subpackage share
  7.  * @author 1m.dm
  8.  * @copyright Energine 2006
  9.  * @version $Id$
  10.  */
  11.  
  12.  
  13. /**
  14.  * Ссылка для панели инструментов
  15.  *
  16.  * @package energine
  17.  * @subpackage share
  18.  * @author 1m.dm
  19.  */
  20. class Link extends Control {
  21.  
  22.     /**
  23.      * Конструктор
  24.      *
  25.      * @return type 
  26.      * @access public
  27.      */
  28.     public function __construct($id$action false$title false$tooltip false{
  29.         parent::__construct($id);
  30.         $this->type = 'link';
  31.         if ($action)  $this->setAttribute('action',  $action);
  32.         if ($title)   $this->setAttribute('title',   $title);
  33.         if ($tooltip$this->setAttribute('tooltip'$tooltip);
  34.     }
  35.  
  36.     /**
  37.      * Устанавливает название кнопки
  38.      *
  39.      * @return void 
  40.      * @access public
  41.      */
  42.     public function setTitle($title{
  43.         $this->setAttribute('title'$title);
  44.     }
  45.  
  46.     /**
  47.      * Возвращает название кнопки
  48.      *
  49.      * @return string 
  50.      * @access public
  51.      */
  52.     public function getTitle({
  53.         return $this->getAttribute('title');
  54.     }
  55.  
  56.     /**
  57.      * Возвращает имя действия
  58.      *
  59.      * @return string 
  60.      * @access public
  61.      */
  62.     public function getAction({
  63.         return $this->getAttribute('action');
  64.     }
  65.  
  66.     /**
  67.      * Устанавливает всплывающую подсказку
  68.      *
  69.      * @param string 
  70.      * @return string 
  71.      * @access public
  72.      */
  73.     public function setTooltip($tooltip{
  74.          $this->setAttribute('tooltip'$tooltip);
  75.     }
  76.  
  77.     /**
  78.      * Возвращает всплывающую подсказку
  79.      *
  80.      * @return string 
  81.      * @access public
  82.      */
  83.     public function getTooltip({
  84.         return $this->getAttribute('tooltip');
  85.     }
  86. }
В создании документации нам помог: phpDocumentor