當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Avatar::getMemberPath方法代碼示例

本文整理匯總了PHP中Avatar::getMemberPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Avatar::getMemberPath方法的具體用法?PHP Avatar::getMemberPath怎麽用?PHP Avatar::getMemberPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Avatar的用法示例。


在下文中一共展示了Avatar::getMemberPath方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getUploadPath

 /**
  * {@inheritdoc}
  * @return string
  */
 protected function getUploadPath()
 {
     return \Avatar::getMemberPath();
 }
開發者ID:revision6,項目名稱:contao-avatar,代碼行數:8,代碼來源:FormAvatar.php

示例2: foreach

<?php

/**
 * avatar extension for Contao Open Source CMS
 *
 * @copyright  Copyright (c) 2008-2014, terminal42 gmbh
 * @author     terminal42 gmbh <info@terminal42.ch>
 * @license    http://opensource.org/licenses/lgpl-3.0.html LGPL
 * @link       http://github.com/terminal42/contao-avatar
 */
/**
 * Extend the tl_member palettes
 */
foreach ($GLOBALS['TL_DCA']['tl_member']['palettes'] as $k => $v) {
    $GLOBALS['TL_DCA']['tl_member']['palettes'][$k] = str_replace('language;', 'language;{avatar_legend},avatar,avatar_gravatar;', $v);
}
/**
 * Add fields to tl_member
 */
$GLOBALS['TL_DCA']['tl_member']['fields']['avatar'] = array('label' => &$GLOBALS['TL_LANG']['tl_member']['avatar'], 'exclude' => true, 'inputType' => 'avatar', 'eval' => array('uploadPath' => \Avatar::getMemberPath(), 'avatarSize' => \Avatar::getMemberSize(), 'thumbnailSize' => \Config::get('avatar_user_thumb'), 'extensions' => \Config::get('avatar_user_extensions'), 'maxlength' => \Config::get('avatar_user_maxlength'), 'feEditable' => true, 'feViewable' => true, 'feGroup' => 'personal'));
$GLOBALS['TL_DCA']['tl_member']['fields']['avatar_gravatar'] = array('label' => &$GLOBALS['TL_LANG']['tl_member']['avatar_gravatar'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('feEditable' => true, 'feViewable' => true, 'feGroup' => 'personal'), 'sql' => "char(1) NOT NULL default ''");
開發者ID:terminal42,項目名稱:contao-avatar,代碼行數:21,代碼來源:tl_member.php


注:本文中的Avatar::getMemberPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。