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


PHP AdminHelper::getConnectionName方法代码示例

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


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

示例1: trim

             $key = $variant_keys[$index];
             $value = trim(str_replace('+', ' ', $variant_values[$index]));
             $variant_descriptions[] = "{$key}: {$value}";
         }
         $item['variant'] = implode(', ', $variant_descriptions);
     }
 }
 error_log(print_r($order_details, true));
 $order_details['padded_id'] = str_pad($order_details['id'], 6, 0, STR_PAD_LEFT);
 $order_details['order_date'] = date("M j, Y, g:i A", $order_details['creation_date']);
 $order_details['formatted_gross_price'] = sprintf("%01.2f", $order_details['gross_price']);
 if ($order_details['gross_price'] - $item_price) {
     $order_details['formatted_shipping'] = number_format($order_details['gross_price'] - $item_price, 2);
 }
 $order_details['formatted_net_price'] = sprintf("%01.2f", $order_details['gross_price'] - $order_details['service_fee']);
 $order_details['order_connection_details'] = AdminHelper::getConnectionName($order_details['connection_id']) . ' (' . $order_details['connection_type'] . ')';
 //if ($order_details['fulfilled']) { $order_details['order_fulfilled'] = 'yes'; } else { $order_details['order_fulfilled'] = 'no'; }
 $cash_admin->page_data = array_merge($cash_admin->page_data, $order_details);
 $cash_admin->page_data['order_contents'] = new ArrayIterator($order_contents);
 $cash_admin->page_data['customer_display_name'] = $order_details['customer_details']['display_name'];
 $cash_admin->page_data['customer_email_address'] = $order_details['customer_details']['email_address'];
 $cash_admin->page_data['customer_address_country'] = $order_details['customer_details']['address_country'];
 $cash_admin->page_data['shipping_name'] = $order_details['customer_shipping_name'];
 $cash_admin->page_data['shipping_email'] = $order_details['customer_email'];
 $cash_admin->page_data['shipping_address1'] = $order_details['customer_address1'];
 $cash_admin->page_data['shipping_address2'] = $order_details['customer_address2'];
 $cash_admin->page_data['shipping_city'] = $order_details['customer_city'];
 $cash_admin->page_data['shipping_region'] = $order_details['customer_region'];
 $cash_admin->page_data['shipping_postalcode'] = $order_details['customer_postalcode'];
 $cash_admin->page_data['shipping_country'] = $order_details['customer_country'];
 $cash_admin->page_data['notes'] = $order_details['notes'];
开发者ID:hubub,项目名称:platform,代码行数:31,代码来源:commerce_orders_view.php

示例2: str_replace

    } else {
        echo str_replace('"', '"', basename($current_asset['title']));
    }
    ?>
	</h3>
	<?php 
    if ($page_message) {
        echo '<p><span class="highlightcopy">' . $page_message . '</span></p>';
    }
    ?>
	<p class="smalltext fadedtext">
		size: <?php 
    echo AdminHelper::bytesToSize($current_asset['size']);
    ?>
, &nbsp; stored on: <?php 
    echo AdminHelper::getConnectionName($current_asset['connection_id']);
    ?>
<br />
		location: <?php 
    echo $current_asset['location'];
    ?>
		<?php 
    if ($cash_admin->getStoredData('is_favorite')) {
        echo '<br /><br /><span class="icon heart_fill"></span> this asset is a favorite<br />';
    }
    ?>
	</p><p>
		<?php 
    if (!$cash_admin->getStoredData('is_favorite')) {
        ?>
			<a href="?togglefavorite=true" class="actionlink"><span class="icon heart_fill"></span> favorite this asset</a> 
开发者ID:blacktire,项目名称:DIY,代码行数:31,代码来源:assets_edit_file.php

示例3: array

 if (!$browse_path) {
     // no browse path at all means we're on the main browse page
     // list connections and categories instead of assets
     $list_connections = array();
     foreach ($applicable_connections as $connection) {
         $assets_reponse = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getassetsforconnection', 'connection_id' => $connection['id']), 'allassets');
         if (is_array($assets_reponse['payload'])) {
             $filecount = count($assets_reponse['payload']);
             $list_connections[] = array('id' => $connection['id'], 'name' => $connection['name'], 'type' => $connection['type'], 'filecount' => $filecount);
         }
     }
 } else {
     // this means connection has been set, so grab it from the request
     $assets_reponse = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getassetsforconnection', 'connection_id' => $connection_id), 'allassets');
     $connection_name = 'root';
     $update_connection_name = AdminHelper::getConnectionName($connection_id);
     if ($update_connection_name) {
         $connection_name = $update_connection_name;
     }
     if (is_array($assets_reponse['payload'])) {
         $list_assets = array('assets' => array(), 'directories' => array());
         foreach ($assets_reponse['payload'] as $asset) {
             // grab the dirname for the asset
             $tmpdir = dirname($asset['location']);
             if ($tmpdir == $browse_path) {
                 // if it matches the browse path then we're working with a file
                 $list_assets['assets'][basename($asset['location'])] = $asset;
             } elseif (strpos($tmpdir, $browse_path) !== false || $browse_path == '.') {
                 // not an exact match, but we're at root or under the current directory
                 $exploded_dir = explode('/', $tmpdir);
                 if (!in_array($exploded_dir[$browse_depth], $list_assets['directories'])) {
开发者ID:blacktire,项目名称:DIY,代码行数:31,代码来源:assets_browse.php


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