コード例 #1
0
ファイル: html.php プロジェクト: lautarodragan/ideary
 /**
  * Returns html to display a main control panel icon
  *
  * @param string $function name of function performed by icon
  */
 public static function getCPImage($function)
 {
     switch ($function) {
         case 'config_base':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-cpanel.png\'/>';
             $linkData = array('c' => 'config', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG') . '</span>');
             $modalOptions = array('size' => array('x' => '\\window.getScrollSize().x*.9', 'y' => '\\window.getSize().y*.9'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'config_ext':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-ext.png\'/>';
             $linkData = array('c' => 'config', 'layout' => 'ext', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_EXT_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG_EXT') . '</span>');
             $modalOptions = array('size' => array('x' => '\\window.getScrollSize().x*.9', 'y' => '\\window.getSize().y*.9'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'config_error_page':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-errorpage.png\'/>';
             $linkData = array('c' => 'config', 'layout' => 'errordocs', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_ERROR_PAGE_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG_ERROR_PAGE') . '</span>');
             $modalOptions = array('size' => array('x' => '\\window.getScrollSize().x*.9', 'y' => '\\window.getSize().y*.9'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'config_seo':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-seo.png\'/>';
             $linkData = array('c' => 'config', 'layout' => 'seo', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_SEO_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG_SEO') . '</span>');
             $modalOptions = array('size' => array('x' => 700, 'y' => '\\window.getSize().y*.7'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'config_social_seo':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-facebook.png\'/>';
             $linkData = array('c' => 'config', 'layout' => 'social_seo', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_SOCIAL_SEO_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG_SOCIAL_SEO') . '</span>');
             $modalOptions = array('size' => array('x' => 700, 'y' => '\\window.getSize().y*.7'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'config_sec':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-sec.png\'/>';
             $linkData = array('c' => 'config', 'layout' => 'sec', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_SEC_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG_SEC') . '</span>');
             $modalOptions = array('size' => array('x' => 700, 'y' => '\\window.getSize().y*.9'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'config_analytics':
             $img = ' <img src=\'components/com_sh404sef/assets/images/icon-48-analytics.png\'/>';
             $linkData = array('c' => 'config', 'layout' => 'analytics', 'tmpl' => 'component');
             $urlData = array('title' => JText::_('COM_SH404SEF_CONFIG_ANALYTICS_DESC'), 'class' => 'modalediturl', 'anchor' => $img . '<span>' . JText::_('COM_SH404SEF_CONFIG_ANALYTICS') . '</span>');
             $modalOptions = array('size' => array('x' => 700, 'y' => '\\window.getSize().y*.9'));
             $link = Sh404sefHelperHtml::makeLink(null, $linkData, $urlData, $modal = true, $modalOptions, $hasTip = false, $extra = '');
             break;
         case 'urlmanager':
             $img = 'icon-48-sefmanager.png';
             $title = JText::_('COM_SH404SEF_VIEWURLDESC');
             $anchor = JText::_('COM_SH404SEF_VIEWURL');
             $link = 'index.php?option=com_sh404sef&c=urls&layout=default&view=urls';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
         case '404manager':
             $img = 'icon-48-404log.png';
             $title = JText::_('COM_SH404SEF_VIEW404DESC');
             $anchor = JText::_('COM_SH404SEF_404_MANAGER');
             $link = 'index.php?option=com_sh404sef&c=urls&layout=view404&view=urls';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
         case 'aliasesmanager':
             $img = 'icon-48-aliases.png';
             $title = JText::_('COM_SH404SEF_ALIASES_HELP');
             $anchor = JText::_('COM_SH404SEF_ALIASES_MANAGER');
             $link = 'index.php?option=com_sh404sef&c=aliases&layout=default&view=aliases';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
         case 'pageidmanager':
             $img = 'icon-48-pageid.png';
             $title = JText::_('COM_SH404SEF_CP_PAGEID_HELP');
             $anchor = JText::_('COM_SH404SEF_PAGEID_MANAGER');
             $link = 'index.php?option=com_sh404sef&c=pageids&layout=default&view=pageids';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
         case 'metamanager':
             $img = 'icon-48-metas.png';
             $title = JText::_('COM_SH404SEF_META_TAGS_DESC');
             $anchor = JText::_('COM_SH404SEF_META_TAGS');
             $link = 'index.php?option=com_sh404sef&c=metas&layout=default&view=metas';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
         case 'analytics':
             $img = 'icon-48-analytics.png';
             $title = JText::_('COM_SH404SEF_ANALYTICSDESC');
             $anchor = JText::_('COM_SH404SEF_ANALYTICS_MANAGER');
             $link = 'index.php?option=com_sh404sef&c=analytics&layout=default&view=analytics';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
         case 'doc':
             $img = 'icon-48-doc.png';
             $title = JText::_('COM_SH404SEF_INFODESC');
             $anchor = JText::_('COM_SH404SEF_INFO');
             $link = 'index.php?option=com_sh404sef&layout=info&view=default&task=info';
             $link = Sh404sefHelperHtml::_doLinkCPImage($img, $title, $anchor, $link);
             break;
     }
     return $link;
 }