本文整理汇总了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');
}
示例2: __construct
public function __construct()
{
parent::__construct();
if ($this->_context[0]) {
$this->formatter = TextformatterManager::create($this->_context[0]);
}
$this->_driver = ExtensionManager::create('templatedtextformatters');
}
示例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');
}
示例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');
}
示例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'));
}
示例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;
}
示例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'])) {
示例8: ExtensionManager
function __construct(&$parent)
{
parent::__construct($parent);
$ExtensionManager = new ExtensionManager($parent);
$this->_driver = $ExtensionManager->create('members');
}
示例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/');
}
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->setTitle(__('%1$s – %2$s', array(__('Symphony'), __('Templated Text Formatters'))));
$this->_driver = ExtensionManager::create('templatedtextformatters');
}
示例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;
}
}