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


PHP Util::imagePath方法代码示例

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


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

示例1: transform

 /**
  * @param array $attr
  * @param HTMLPurifier_Config $config
  * @param HTMLPurifier_Context $context
  * @return array
  */
 public function transform($attr, $config, $context)
 {
     if (!isset($attr['style']) || strpos($attr['style'], 'background') === false) {
         return $attr;
     }
     // Check if there is a background image given
     $cssAttributes = explode(';', $attr['style']);
     $func = function ($cssAttribute) {
         if (preg_match('/\\S/', $cssAttribute) === 0) {
             // empty or whitespace
             return '';
         }
         list($name, $value) = explode(':', $cssAttribute, 2);
         if (strpos($name, 'background') !== false && strpos($value, 'url(') !== false) {
             // Replace image URL
             $value = preg_replace('/url\\("?http.*\\)/i', 'url(' . Util::imagePath('mail', 'blocked-image.png') . ')', $value);
             return $name . ':' . $value;
         } else {
             return $cssAttribute;
         }
     };
     // Reassemble style
     $cssAttributes = array_map($func, $cssAttributes);
     $newStyle = implode(';', $cssAttributes);
     // Replace style if required
     if ($newStyle !== $attr['style']) {
         $attr['data-original-style'] = $attr['style'];
         $attr['style'] = $newStyle;
     }
     return $attr;
 }
开发者ID:matiasdelellis,项目名称:mail,代码行数:37,代码来源:transformcssbackground.php

示例2: transform

 /**
  * @param array $attr
  * @param HTMLPurifier_Config $config
  * @param HTMLPurifier_Context $context
  * @return array
  */
 public function transform($attr, $config, $context)
 {
     if ($context->get('CurrentToken')->name !== 'img' || !isset($attr['src'])) {
         return $attr;
     }
     $attr['data-original-src'] = $attr['src'];
     $attr['src'] = Util::imagePath('mail', 'blocked-image.png');
     return $attr;
 }
开发者ID:jakobsack,项目名称:mail,代码行数:15,代码来源:transformimagesrc.php

示例3: transform

 /**
  * @param array $attr
  * @param HTMLPurifier_Config $config
  * @param HTMLPurifier_Context $context
  * @return array
  */
 public function transform($attr, $config, $context)
 {
     if ($context->get('CurrentToken')->name !== 'img' || !isset($attr['src'])) {
         return $attr;
     }
     // Block tracking pixels
     if (isset($attr['width']) && isset($attr['height']) && (int) $attr['width'] < 5 && (int) $attr['height'] < 5) {
         // Replace with a transparent png in case it's important for the layout
         $attr['src'] = Util::imagePath('mail', 'blocked-image.png');
         $attr = $this->setDisplayNone($attr);
         return $attr;
     }
     // Do not block images attached to the email
     $url = $this->parser->parse($attr['src']);
     if ($url->host === Util::getServerHostName() && $url->path === $this->urlGenerator->linkToRoute('mail.proxy.proxy')) {
         $attr['data-original-src'] = $attr['src'];
         $attr['src'] = Util::imagePath('mail', 'blocked-image.png');
         $attr = $this->setDisplayNone($attr);
     }
     return $attr;
 }
开发者ID:matiasdelellis,项目名称:mail,代码行数:27,代码来源:transformimagesrc.php

示例4: p

		3)
		<?php 
p($l->t('Enter your newly created TrustedSpace backup user name'));
?>
</div>
<span class="easybackup_label"> <?php 
p($l->t('TrustedSpace user'));
?>
:</span>
&nbsp;
<span id="easybackup_userNameEdit"> <span id="easybackup_userName">
			<?php 
p($_['userName']);
?>
		</span> <a class="action" href="#">&nbsp;<img src="<?php 
print_unescaped(\OCP\Util::imagePath('core', 'actions/rename.svg'));
?>
" />
</a>
</span>
<div class="easybackup_explanation easybackup_bullet">
		4)
		<?php 
p($l->t('Start backing up your data manually or on regular basis'));
?>
</div>
<form action="<?php 
print_unescaped($_['backupUrl']);
?>
">
	<button id="easybackup_goToBackup" type="submit" <?php 
开发者ID:ArcherSys,项目名称:ArcherSysOSCloud7,代码行数:31,代码来源:configuration.inc.php

示例5: array

<?php

\OCP\App::registerAdmin('files', 'admin');
\OC::$server->getNavigationManager()->add(function () {
    $l = \OC::$server->getL10N('files');
    return ['id' => 'files_index', 'order' => 0, 'href' => \OCP\Util::linkTo('files', 'index.php'), 'icon' => \OCP\Util::imagePath('core', 'places/files.svg'), 'name' => $l->t('Files')];
});
\OC::$server->getSearch()->registerProvider('OC\\Search\\Provider\\File', array('apps' => array('files')));
$templateManager = \OC_Helper::getFileTemplateManager();
$templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
\OCA\Files\App::getNavigationManager()->add(function () {
    $l = \OC::$server->getL10N('files');
    return ['id' => 'files', 'appname' => 'files', 'script' => 'list.php', 'order' => 0, 'name' => $l->t('All files')];
});
\OC::$server->getActivityManager()->registerExtension(function () {
    return new \OCA\Files\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator(), \OC::$server->getActivityManager(), new \OCA\Files\ActivityHelper(\OC::$server->getTagManager()), \OC::$server->getConfig());
});
开发者ID:Kevin-ZK,项目名称:vaneDisk,代码行数:20,代码来源:app.php

示例6: p

?>

<script type="text/javascript" src="<?php p(\OCP\Util::linkToAbsolute('secure_container', 'js/3rdparty/jswrapper.php', array('app'=> 'sjcl'))); ?>"></script>
<div id="app-navigation">
	<ul class="level-0 path-childs" id="path-childs-0">
		<?php foreach ($_['navigation'] as $k => $path): ?>
		<?php print_unescaped($this->inc('pathentry', array('path' => $path, 'level'=> 1))); ?>
		<?php endforeach; ?>
	</ul>
</div>

<main id="app-content">
	<div id="controls">
		<nav class="breadcrumb">
			<div class="crumb home svg last" data-dir="0">
				<a><img class="svg" src="<?php print(\OCP\Util::imagePath('core', 'places/home.svg')); ?>"></a>
			</div>
		</nav>
		
		<section class="actions creatable">
			<div id="new" class="button">
				<a>Neu</a>
				<ul>
					<li class="icon-filetype-folder svg" data-new-value="<?php p($l->t('New Folder')); ?>" data-type="folder">
						<p><?php p($l->t('New Folder')); ?></p>
					</li>
					<li class="icon-filetype-text svg" data-new-value="<?php p($l->t('New Crypto-Entry')); ?>" data-type="container">
						<p><?php p($l->t('New Crypto-Entry')); ?></p>
					</li>
				</ul>
			</div>
开发者ID:ArcherSys,项目名称:ArcherSysOSCloud7,代码行数:31,代码来源:main.php

示例7: p

<?php 
/**
 * @file templates/tmpl_settings.php
 * Dialog to change app settings, to be included in the clouds settings page.
 * @access public
 * @author Christian Reiner
 */
?>

<!-- settings of app 'imprint' -->
<div class="section" id="imprint">
	<h2>
		<span id="title" class="title">
			<img class="" src="<?php 
p(\OCP\Util::imagePath("imprint", "imprint-dusky.svg"));
?>
 ">
			<?php 
p($l->t("Imprint"));
?>
		</span>
	</h2>
	<div id="imprint-options" class="imprint-option">
		<label for="imprint-option-position-user" class="imprint-option"><?php 
p($l->t("Reference") . ": ");
?>
</label>
		<select id="imprint-option-position-user" class="imprint-option" type="select" name="position-user">
			<option value=""></option>
			<option value="header-left"><?php 
开发者ID:AdamWill,项目名称:apps,代码行数:30,代码来源:tmpl_settings.php

示例8: getMiddlePart

 private function getMiddlePart($data)
 {
     if (!isset($data['weatherData']['list'])) {
         return '<td></td>';
     }
     $html = '';
     $html .= '<td>';
     $html .= '<div class="h1">' . $data['city'] . '</div>';
     $html .= '<div class="align-center">';
     $html .= '<img class="weatherIcon" src="' . Util::imagePath('dashboard', $this->getIconMapping($this->p($data['weatherData']['list'][0]['weather'][0]['icon']))) . '" alt="weather icon" />';
     $html .= '&nbsp;&nbsp;&nbsp;';
     $html .= '<img class="weatherIcon" src="' . Util::imagePath('dashboard', $this->getIconMapping($this->p($data['weatherData']['list'][1]['weather'][0]['icon']))) . '" alt="weather icon" />';
     $html .= '</div>';
     $html .= '</td>';
     return $html;
 }
开发者ID:arnovr,项目名称:dashboard,代码行数:16,代码来源:weathertemplate.php

示例9: API

\Sabre\VObject\Property::$classMap['FN'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['TITLE'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['ROLE'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['NOTE'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['NICKNAME'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['EMAIL'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['TEL'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['IMPP'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['URL'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['LABEL'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['X-EVOLUTION-FILE-AS'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['N'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['ADR'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['GEO'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['ORG'] = '\\OC\\VObject\\CompoundProperty';
\OC::$server->getNavigationManager()->add(array('id' => 'contacts', 'order' => 10, 'href' => \OCP\Util::linkToRoute('contacts_index'), 'icon' => \OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => \OCP\Util::getL10N('contacts')->t('Contacts')));
$api = new API('contacts');
$api->connectHook('OC_User', 'post_createUser', '\\OCA\\Contacts\\Hooks', 'userCreated');
$api->connectHook('OC_User', 'post_deleteUser', '\\OCA\\Contacts\\Hooks', 'userDeleted');
$api->connectHook('OCA\\Contacts', 'pre_deleteAddressBook', '\\OCA\\Contacts\\Hooks', 'addressBookDeletion');
$api->connectHook('OCA\\Contacts', 'pre_deleteContact', '\\OCA\\Contacts\\Hooks', 'contactDeletion');
$api->connectHook('OCA\\Contacts', 'post_createContact', 'OCA\\Contacts\\Hooks', 'contactAdded');
$api->connectHook('OCA\\Contacts', 'post_updateContact', '\\OCA\\Contacts\\Hooks', 'contactUpdated');
$api->connectHook('OCA\\Contacts', 'scanCategories', '\\OCA\\Contacts\\Hooks', 'scanCategories');
$api->connectHook('OCA\\Contacts', 'indexProperties', '\\OCA\\Contacts\\Hooks', 'indexProperties');
$api->connectHook('OC_Calendar', 'getEvents', 'OCA\\Contacts\\Hooks', 'getBirthdayEvents');
$api->connectHook('OC_Calendar', 'getSources', 'OCA\\Contacts\\Hooks', 'getCalenderSources');
\OCP\Util::addscript('contacts', 'loader');
\OCP\Util::addscript('contacts', 'admin');
\OC_Search::registerProvider('OCA\\Contacts\\Search\\Provider');
//\OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
开发者ID:WYSAC,项目名称:oregon-owncloud,代码行数:31,代码来源:app.php

示例10: foreach

			</div>
		<?php endif; ?>
		<?php foreach($_['messages'] as $message): ?>
			<div class="warning">
				<?php p($message); ?><br>
			</div>
		<?php endforeach; ?>
		<?php if (isset($_['internalexception']) && ($_['internalexception'])): ?>
			<div class="warning">
				<?php p($l->t('An internal error occured.')); ?><br>
				<small><?php p($l->t('Please try again or contact your administrator.')); ?></small>
			</div>
		<?php endif; ?>
		<div id="message" class="hidden">
			<img class="float-spinner" alt=""
				src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>">
			<span id="messageText"></span>
			<!-- the following div ensures that the spinner is always inside the #message div -->
			<div style="clear: both;"></div>
		</div>
		<p class="grouptop">
			<input type="text" name="user" id="user"
				placeholder="<?php p($l->t('Username')); ?>"
				value="<?php p($_['username']); ?>"
				<?php p($_['user_autofocus'] ? 'autofocus' : ''); ?>
				autocomplete="on" autocapitalize="off" autocorrect="off" required>
			<label for="user" class="infield"><?php p($l->t('Username')); ?></label>
			<img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
		</p>

		<p class="groupbottom">
开发者ID:ninjasilicon,项目名称:core,代码行数:31,代码来源:login.php

示例11: array

<?php

/**
 * ownCloud - bookmarks
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 * @author Marvin Thomas Rabe <mrabe@marvinrabe.de>
 * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
 * @author Stefan Klemm <mail@stefan-klemm.de>
 * @copyright (c) 2011, Marvin Thomas Rabe
 * @copyright (c) 2011, Arthur Schiwon
 * @copyright (c) 2014, Stefan Klemm
 */
namespace OCA\Bookmarks\AppInfo;

\OCP\App::addNavigationEntry(array('id' => 'bookmarks', 'order' => 10, 'href' => \OCP\Util::linkToRoute('bookmarks.web_view.index'), 'icon' => \OCP\Util::imagePath('bookmarks', 'bookmarks.svg'), 'name' => \OC_L10N::get('bookmarks')->t('Bookmarks')));
\OC::$server->getSearch()->registerProvider('OCA\\Bookmarks\\Controller\\Lib\\Search', array('apps' => array('bookmarks')));
开发者ID:naruto-natsu,项目名称:bookmarks,代码行数:18,代码来源:app.php

示例12:

<?php

/**
 * ownCloud - ownboard
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Loic Blot <loic.blot@unix-experience.fr>
 * @copyright Loic Blot 2015
 */
namespace OCA\OwnBoard\AppInfo;

if (class_exists('\\OCP\\AppFramework\\App')) {
    \OCP\App::addNavigationEntry(array('id' => 'ownboard', 'order' => 10, 'href' => \OCP\Util::linkToRoute('ownboard.board.index'), 'icon' => \OCP\Util::imagePath('ownboard', 'app.svg'), 'name' => \OCP\Util::getL10N('ownboard')->t('ownBoard')));
} else {
    $msg = 'Can not enable the OwnBoard app because the App Framework App is disabled';
    \OCP\Util::writeLog('ownboard', $msg, \OCP\Util::ERROR);
}
开发者ID:nerzhul,项目名称:ownBoard,代码行数:19,代码来源:app.php

示例13: OC_l10n

<?php

/**
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
$l = new OC_l10n('collaboration');
OC::$CLASSPATH['OC_Collaboration_Project'] = 'collaboration/lib/projects.php';
OC::$CLASSPATH['OC_Collaboration_Post'] = 'collaboration/lib/posts.php';
OC::$CLASSPATH['OC_Collaboration_Time'] = 'collaboration/lib/time.php';
OC::$CLASSPATH['OC_Collaboration_Comment'] = 'collaboration/lib/comments.php';
OC::$CLASSPATH['OC_Collaboration_Task'] = 'collaboration/lib/tasks.php';
OC::$CLASSPATH['OC_Collaboration_Mail'] = 'collaboration/lib/mail_templates.php';
OC::$CLASSPATH['OC_Collaboration_Hooks'] = 'collaboration/lib/hooks.php';
OC::$CLASSPATH['OC_Collaboration_Skillset'] = 'collaboration/lib/skillset.php';
OC::$CLASSPATH['OC_Collaboration_Report'] = 'collaboration/lib/reports.php';
OC::$CLASSPATH['OC_Collaboration_Calendar'] = 'collaboration/lib/calendar_support.php';
OC_Hook::connect('OC_User', 'post_deleteUser', 'OC_Collaboration_Hooks', 'notifyUserDeletion');
OC_Hook::connect('OCP\\Share', 'post_shared', 'OC_Collaboration_Hooks', 'notifyFileShare');
$gid = "Collaboration Admin";
if (!OC_Group::groupExists($gid)) {
    OC_Group::createGroup($gid);
}
\OCP\App::addNavigationEntry(array('id' => 'collaboration', 'order' => 0, 'href' => \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => '')), 'icon' => \OCP\Util::imagePath('collaboration', 'collaboration.svg'), 'name' => $l->t('Collaboration')));
开发者ID:TheAgentK,项目名称:owncloud-collaboration,代码行数:25,代码来源:app.php

示例14: Container

<?php

/**
 * Copyright (c) 2014, Tobia De Koninck hey--at--ledfan.be
 * This file is licensed under the AGPL version 3 or later.
 * See the COPYING file.
 */
namespace OCA\Chat;

use OCA\Chat\App\Chat;
use OCA\Chat\App\Container;
use OCP\Util;
use OCP\App;
$container = new Container();
$container->query('OCP\\INavigationManager')->add(function () {
    return array('id' => 'chat', 'order' => 10, 'href' => Util::linkToRoute('chat.app.index'), 'icon' => Util::imagePath('chat', 'chat.png'), 'name' => Util::getL10n('chat')->t('Chat'));
});
$container->query('Chat')->registerBackend($container->query('OCH'));
$container->query('Chat')->registerBackend($container->query('XMPP'));
App::registerAdmin('chat', 'lib/admin');
// When the "Integrated View" is loaded, include the CSS and JS code:
if ($container->query('Chat')->viewType === Chat::INTEGRATED) {
    if (\OCP\User::isLoggedIn()) {
        Util::addStyle('chat', '../vendor/emojione/assets/sprites/emojione.sprites');
        Util::addStyle('chat', '../vendor/emojione/assets/css/emojione.min');
        Util::addScript('chat', '../vendor/all.min');
        Util::addScript('chat', 'integrated.min');
        Util::addStyle('chat', 'integrated.min');
        if (defined('DEBUG') && DEBUG) {
            Util::addScript('chat', '../vendor/angular-mocks/angular-mocks');
        }
开发者ID:arun-TK,项目名称:chat,代码行数:31,代码来源:app.php

示例15: getHeadHtml

 /**
  *
  * return the html of the head
  * included
  *  - name (title)
  *  - reload icon
  *  - settings icon
  *  - icon
  *
  * @param $data array with basic values from widgetController super class
  * @return string
  */
 private function getHeadHtml($data)
 {
     $html = '<h1 class="hoverInfo" data-opacitynormal="0.5">';
     if (isset($data['link']) != null && $data['link'] != '') {
         $html .= '<a href="' . $data['link'] . '">' . $data['name'] . '</a>';
     } else {
         $html .= $data['name'];
     }
     if (isset($data['refresh']) && $data['refresh'] != 0) {
         $html .= '<span class="hoverInfo icon-play iconReload" data-wiid="' . $data['wIId'] . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
     }
     $html .= '<span class="hoverInfo icon-settings iconSettings">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
     $html .= '</h1>';
     if (isset($data['icon']) && $data['icon'] != '') {
         $html .= '<div class="icon"><img src="' . Util::imagePath('dashboard', $data['icon']) . '" alt="' . $data['wIId'] . ' icon" /></div>';
     }
     return $html;
 }
开发者ID:arnovr,项目名称:dashboard,代码行数:30,代码来源:widgettemplate.php


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