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


PHP ExtensionManager::create方法代码示例

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


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

示例1: ExtensionManager

 function __construct(&$parent)
 {
     parent::__construct($parent);
     $this->setTitle('Symphony – Member Roles – Untitled');
     $ExtensionManager = new ExtensionManager($parent);
     $this->_driver = $ExtensionManager->create('members');
 }
开发者ID:bauhouse,项目名称:sym-spectrum-members,代码行数:7,代码来源:content.new.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->_context[0]) {
         $this->formatter = TextformatterManager::create($this->_context[0]);
     }
     $this->_driver = ExtensionManager::create('templatedtextformatters');
 }
开发者ID:ahwayakchih,项目名称:templatedtextformatters,代码行数:8,代码来源:content.edit.php

示例3: ExtensionManager

 function __construct(&$parent)
 {
     parent::__construct($parent);
     $this->_name = 'Member: Role';
     // Set default
     $this->set('show_column', 'no');
     $ExtensionManager = new ExtensionManager($this->_engine);
     $this->_driver = $ExtensionManager->create('members');
 }
开发者ID:bauhouse,项目名称:sym-spectrum-members,代码行数:9,代码来源:field.memberrole.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_name = 'Entry URL';
     $this->_driver = ExtensionManager::create('entry_url_field');
     // Set defaults:
     $this->set('show_column', 'no');
     $this->set('new_window', 'no');
     $this->set('hide', 'no');
 }
开发者ID:symphonists,项目名称:entry_url_field,代码行数:10,代码来源:field.entry_url.php

示例5: __trigger

 protected function __trigger()
 {
     $ExtensionManager = new ExtensionManager($this->_Parent);
     $driver = $ExtensionManager->create('members');
     $email = $_POST['member-email-address'];
     if ($members = $driver->findMemberIDFromEmail($email)) {
         foreach ($members as $member_id) {
             $driver->sendForgotPasswordEmail($member_id);
         }
     }
     return new XMLElement('forgot-password', 'Email sent', array('sent' => 'true'));
 }
开发者ID:bauhouse,项目名称:sym-spectrum-members,代码行数:12,代码来源:event.forgot_password.php

示例6: fetchMemberFromUsername

 public function fetchMemberFromUsername($username)
 {
     $ExtensionManager = new ExtensionManager($this->_Parent);
     $driver =& $ExtensionManager->create('members');
     $member_id = $this->Database->fetchVar('entry_id', 0, "SELECT `entry_id` FROM `tbl_entries_data_" . $driver->usernameAndPasswordField() . "` WHERE `username` = '" . $username . "' LIMIT 1");
     return $member_id ? $this->fetchMemberFromID($member_id) : NULL;
 }
开发者ID:bauhouse,项目名称:sym-spectrum-members,代码行数:7,代码来源:field.memberlink.php

示例7: PaymentExecution

<?php

require_once TOOLKIT . '/class.administrationpage.php';
$paypalExtension = ExtensionManager::create('paypal');
use PayPal\Api\Amount;
use PayPal\Api\Details;
use PayPal\Api\ExecutePayment;
use PayPal\Api\Payment;
use PayPal\Api\PaymentExecution;
use PayPal\Api\Transaction;
//login a member if available for authentication purposes
$this->_context['member-login'] = 'yes';
if (isset($_GET['success']) && $_GET['success'] == 'true') {
    $paymentId = $_GET['paymentId'];
    $payment = Payment::get($paymentId, $paypalExtension->getApiContext());
    $execution = new PaymentExecution();
    $execution->setPayerId($_GET['PayerID']);
    try {
        $result = $payment->execute($execution, $paypalExtension->getApiContext());
        try {
            $payment = Payment::get($paymentId, $paypalExtension->getApiContext());
            $state = $payment->getState();
            $transaction = current($payment->getTransactions());
            $invoiceID = $transaction->getInvoiceNumber();
            $invoice = current(EntryManager::fetch($invoiceID));
            $sectionID = $invoice->get('section_id');
            $fieldID = FieldManager::fetchFieldIDFromElementName('status', $sectionID);
            $invoice->setData($fieldID, array('value' => $state, 'handle' => General::createHandle($state)));
            $invoice->commit();
            $itemFieldID = FieldManager::fetchFieldIDFromElementName('item', $sectionID);
            if (in_array("JCI Malta Membership", $invoice->getData($itemFieldID)['description'])) {
开发者ID:mazedigital,项目名称:paypal,代码行数:31,代码来源:content.payment.php

示例8: ExtensionManager

 function __construct(&$parent)
 {
     parent::__construct($parent);
     $ExtensionManager = new ExtensionManager($parent);
     $this->_driver = $ExtensionManager->create('members');
 }
开发者ID:bauhouse,项目名称:sym-forum-ensemble,代码行数:6,代码来源:content.edit.php

示例9: __actionIndex

 public function __actionIndex()
 {
     $settings = @$_POST['settings'];
     if (empty($this->driver)) {
         $this->driver = ExtensionManager::create('globalresourceloader');
     }
     if (@isset($_POST['action']['save'])) {
         $this->driver->setEventNames($settings['event-names']);
         $this->driver->setEventPages($settings['event-pages']);
         $this->driver->setDSNames($settings['ds-names']);
         $this->driver->setDSPages($settings['ds-pages']);
         // "Trick" symphony to use context. RE: #9
         redirect(SYMPHONY_URL . '/extension/globalresourceloader/preferences/index/saved/');
     }
 }
开发者ID:symphonists,项目名称:globalresourceloader,代码行数:15,代码来源:content.preferences.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('Templated Text Formatters'))));
     $this->_driver = ExtensionManager::create('templatedtextformatters');
 }
开发者ID:ahwayakchih,项目名称:templatedtextformatters,代码行数:6,代码来源:content.index.php

示例11: getOrderValue

 private function getOrderValue($data)
 {
     $filterableFields = $this->get('filtered_fields');
     //there are no filters to apply so should just be a single value
     if (empty($filterableFields)) {
         return $data['value'];
     }
     $filterableFields = explode(',', $filterableFields);
     $section_id = $this->get('parent_section');
     $orderEntriesExtension = ExtensionManager::create('order_entries');
     $filters = $orderEntriesExtension->getFilters($filterableFields, $section_id);
     // if there are no filter, bail out
     if (empty($filterableFields)) {
         return $data['value'];
     }
     if (!is_array($data['value'])) {
         foreach ($data as $key => $value) {
             $data[$key] = array(strtolower(General::sanitize($value)));
         }
     }
     if (is_array($data['value'])) {
         $keys = array_keys($data['value']);
         foreach ($filterableFields as $filtered_field_id) {
             $filter = $filters[$filtered_field_id];
             if (isset($data['field_' . $filtered_field_id])) {
                 $matchingKeys = array_search($filter, $data['field_' . $filtered_field_id]);
             } else {
                 $matchingKeys = array();
             }
             if (empty($matchingKeys) && !is_int($matchingKeys)) {
                 $matchingKeys = array();
             } else {
                 if (!is_array($matchingKeys)) {
                     $matchingKeys = array($matchingKeys);
                 }
             }
             //intersect the original keys with the filtered ones which match the search - should leave one or no items
             $keys = array_intersect($keys, $matchingKeys);
         }
         if (empty($keys)) {
             //this view is not sorted
             return current($data['value']);
         } else {
             return $data['value'][current($keys)];
         }
     } else {
         return 0;
     }
 }
开发者ID:hotdoy,项目名称:EDclock,代码行数:49,代码来源:field.order_entries.php


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