当前位置: 首页>>代码示例>>PHP>>正文


PHP DSC::getClass方法代码示例

本文整理汇总了PHP中DSC::getClass方法的典型用法代码示例。如果您正苦于以下问题:PHP DSC::getClass方法的具体用法?PHP DSC::getClass怎么用?PHP DSC::getClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DSC的用法示例。


在下文中一共展示了DSC::getClass方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: popup

 /**
  * Displays a url in a lightbox
  *
  * @param $url
  * @param $text
  * @param array options(
  * 				'width',
  *				'height',
  * 				'top',
  * 				'left',
  * 				'class',
  * 				'update',
  * 				'img'
  * 				)
  * @return popup html
  */
 public static function popup($url, $text, $options = array())
 {
     $html = "";
     if (!empty($options['update'])) {
         JHTML::_('behavior.modal', 'a.modal', array('onClose' => '\\function(){Dsc.update();}'));
     } else {
         JHTML::_('behavior.modal');
     }
     // set the $handler_string based on the user's browser
     $handler_string = "{handler:'iframe',size:{x: window.innerWidth-80, y: window.innerHeight-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     $browser = DSC::getClass('DSCBrowser', 'library.browser');
     if ($browser->getBrowser() == DSCBrowser::BROWSER_IE) {
         // if IE, use
         $handler_string = "{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     }
     $handler = !empty($options['img']) ? "{handler:'image'}" : $handler_string;
     if (!empty($options['width'])) {
         if (empty($options['height'])) {
             $options['height'] = 480;
         }
         $handler = "{handler: 'iframe', size: {x: " . $options['width'] . ", y: " . $options['height'] . "}}";
     }
     $id = !empty($options['id']) ? $options['id'] : '';
     $class = !empty($options['class']) ? $options['class'] : '';
     $linkclass = !empty($options['linkclass']) ? $options['linkclass'] : '';
     $linkclass = $linkclass . ' modal';
     $html = "<a class=\"" . $linkclass . "\" href=\"{$url}\" rel=\"{$handler}\" >\n";
     $html .= "<span class=\"" . $class . "\" id=\"" . $id . "\" >\n";
     $html .= "{$text}\n";
     $html .= "</span>\n";
     $html .= "</a>\n";
     return $html;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:49,代码来源:url.php

示例2: getEmailRecipients

 /**
  * Returns an array of user objects
  * of all users who should receive this email
  *
  * @param $data Object
  * @return array
  */
 private function getEmailRecipients($id, $type = 'order')
 {
     $recipients = array();
     switch ($type) {
         case "new_order":
             $system_recipients = $this->getSystemEmailRecipients();
             foreach ($system_recipients as $r) {
                 if (!in_array($r->email, $recipients)) {
                     $recipients[] = $r->email;
                 }
             }
         case 'order':
         default:
             $model = DSC::getClass('DSCModelOrders', 'models.orders');
             $model->setId($id);
             $order = $model->getItem();
             $user = JFactory::getUser($order->user_id);
             //$user = JUser::getInstance( $order->user_id );
             // is the email one of our guest emails?
             $pos = strpos($user->email, "guest");
             if ($pos === false) {
                 // string needle NOT found in haystack
                 if (!in_array($user->email, $recipients)) {
                     $recipients[] = $user->email;
                 }
             } else {
                 // add the userinfo email to the list of recipients
                 if (!in_array($order->userinfo_email, $recipients)) {
                     $recipients[] = $order->userinfo_email;
                 }
             }
             // add the order user_email to the list of recipients
             if (!in_array($order->user_email, $recipients)) {
                 $recipients[] = $order->user_email;
             }
             break;
     }
     // allow plugins to modify the order email recipient list
     JFactory::getApplication()->triggerEvent('onGetEmailRecipients', array($id, $type, &$recipients));
     return $recipients;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:48,代码来源:email.php

示例3: popup

 public static function popup($url, $text, $options = array())
 {
     if (!empty($options['bootstrap'])) {
         return self::popupbootstrap($url, $text, $options);
     }
     $html = "";
     JHTML::_('stylesheet', 'colorbox.css', 'media/com_tienda/colorbox/');
     JHTML::_('script', 'colorbox.js', 'media/com_tienda/colorbox/');
     $document = JFactory::getDocument();
     $js = "tiendaJQ(document).ready(function() { tiendaJQ('.tienda-modal').colorbox({current: '', iframe: true, opacity: '0.6', width: '80%', height: '80%'}); });";
     $document->addScriptDeclaration($js);
     if (!empty($options['update'])) {
         $onclose = 'onClose: function(){ Dsc.update(); },';
     } else {
         $onclose = '';
     }
     // set the $handler_string based on the user's browser
     $handler_string = "{handler:'iframe', " . $onclose . " size:{x: window.innerWidth-80, y: window.innerHeight-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     $browser = DSC::getClass('DSCBrowser', 'library.browser');
     if ($browser->getBrowser() == DSCBrowser::BROWSER_IE) {
         // if IE, use
         $handler_string = "{handler:'iframe', " . $onclose . " size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     }
     $handler = !empty($options['img']) ? "{handler:'image'}" : $handler_string;
     if (!empty($options['width'])) {
         if (empty($options['height'])) {
             $options['height'] = 480;
         }
         $handler = "{handler: 'iframe', " . $onclose . " size: {x: " . $options['width'] . ", y: " . $options['height'] . "}}";
     }
     $id = !empty($options['id']) ? $options['id'] : '';
     $class = !empty($options['class']) ? $options['class'] : '';
     $html = "<a class=\"tienda-modal\" href=\"{$url}\" rel=\"{$handler}\" >\n";
     $html .= "<span class=\"" . $class . "\" id=\"" . $id . "\" >\n";
     $html .= "{$text}\n";
     $html .= "</span>\n";
     $html .= "</a>\n";
     return $html;
 }
开发者ID:annggeel,项目名称:tienda,代码行数:39,代码来源:url.php

示例4: popupImage

 public static function popupImage($url, $text, $options = array())
 {
     if (!empty($options['bootstrap'])) {
         return self::popupbootstrap($url, $text, $options);
     }
     $html = "";
     $doc = JFactory::getDocument();
     $doc->addStyleSheet(JUri::root() . 'media/citruscart/colorbox/colorbox.css');
     $doc->addScript(JUri::root() . 'media/citruscart/colorbox/colorbox.js');
     $document = JFactory::getDocument();
     $js = "citruscartJQ(document).ready(function() { citruscartJQ('.citruscart-modal').colorbox({current: '', iframe: true, opacity: '0.6', width: '80%', height: '80%'}); });";
     $document->addScriptDeclaration($js);
     if (!empty($options['update'])) {
         $onclose = 'onClose: function(){ Dsc.update(); },';
     } else {
         $onclose = '';
     }
     // set the $handler_string based on the user's browser
     $handler_string = "{handler:'iframe', " . $onclose . " size:{x: window.innerWidth-80, y: window.innerHeight-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     require_once JPATH_SITE . '/libraries/dioscouri/dioscouri.php';
     $browser = DSC::getClass('DSCBrowser', 'library.browser');
     if ($browser->getBrowser() == DSCBrowser::BROWSER_IE) {
         // if IE, use
         $handler_string = "{handler:'iframe', " . $onclose . " size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:\$('sbox-window').setStyles({'padding': 0})}";
     }
     $handler = !empty($options['img']) ? "{handler:'image'}" : $handler_string;
     if (!empty($options['width'])) {
         if (empty($options['height'])) {
             $options['height'] = 480;
         }
         $handler = "{handler: 'iframe', " . $onclose . " size: {x: " . $options['width'] . ", y: " . $options['height'] . "}}";
     }
     $id = "main_image";
     $class = "zoom";
     $html = "<a>\n";
     $html .= "<span class=\"" . $class . "\" id=\"" . $id . "\" >\n";
     $html .= "{$text}\n";
     $html .= "</span>\n";
     $html .= "</a>\n";
     return $html;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:41,代码来源:url.php

示例5: getClass

 /**
  * Intelligently loads instances of classes in framework
  *
  * Usage: $object = Mysite::getClass( 'MysiteHelperCarts', 'helpers.carts' );
  * Usage: $suffix = Mysite::getClass( 'MysiteHelperCarts', 'helpers.carts' )->getSuffix();
  * Usage: $categories = Mysite::getClass( 'MysiteSelect', 'select' )->category( $selected );
  *
  * @param string $classname   The class name
  * @param string $filepath    The filepath ( dot notation )
  * @param array  $options
  * @return object of requested class (if possible), else a new JObject
  */
 public static function getClass($classname, $filepath = 'controller', $options = array('site' => 'admin', 'type' => 'components', 'ext' => 'com_mysite'))
 {
     return parent::getClass($classname, $filepath, $options);
 }
开发者ID:beingsane,项目名称:mysite,代码行数:16,代码来源:defines.php


注:本文中的DSC::getClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。