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


PHP eZIEImagePreAction::getImagePath方法代碼示例

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


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

示例1: json_encode

<?php

/**
 * File containing the ezie no save & quit menu item handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version //autogentag//
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();
// @todo Use the cluster handler code
// delete all the images in working directory
// delete working directory
$working_folder = eZDir::dirpath($prepare_action->getImagePath());
// deletes the working folder recursively
eZDir::recursiveDelete($working_folder);
// @todo delete the user directory if empty
echo json_encode(new StdClass());
eZExecution::cleanExit();
開發者ID:ezsystemstraining,項目名稱:ez54training,代碼行數:20,代碼來源:no_save_and_quit.php

示例2: eZIEImagePreAction

<?php

/**
 * File containing the pixelate tool handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version //autogentag//
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
$region = null;
if ($prepare_action->hasRegion()) {
    $region = $prepare_action->getRegion();
}
// retrieve image dimensions
$analyzer = new eZIEImageAnalyzer($prepare_action->getImagePath());
$imageconverter = new eZIEezcImageConverter(eZIEImageToolPixelate::filter($analyzer->data->width, $analyzer->data->height, $region));
$imageconverter->perform($prepare_action->getImagePath(), $prepare_action->getNewImagePath());
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
開發者ID:ezsystemstraining,項目名稱:ez54training,代碼行數:23,代碼來源:tool_pixelate.php

示例3: eZIEImagePreAction

<?php

/**
 * File containing the rotation tool handler
 *
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 * @version 1.4.0
 * @package kernel
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
// @todo change hasvariable to haspostvariable
$angle = $http->hasVariable('angle') ? $http->variable('angle') : 0;
$color = $http->hasVariable('color') ? $http->variable('color') : 'FFFFFF';
// @todo change hasvariable to haspostvariable
if ($http->hasVariable('clockwise') && $http->variable('clockwise') == 'yes') {
    $angle = 360 - intval($angle);
}
$imageconverter = new eZIEezcImageConverter(eZIEImageToolRotation::filter($angle, $color));
$imageconverter->perform($prepare_action->getImagePath(), $prepare_action->getNewImagePath());
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
開發者ID:legende91,項目名稱:ez,代碼行數:24,代碼來源:tool_rotation.php

示例4: eZIEImagePreAction

<?php
/**
 * File containing the brightness filter handler
 *
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://ez.no/Resources/Software/Licenses/eZ-Business-Use-License-Agreement-eZ-BUL-Version-2.1 eZ Business Use License Agreement eZ BUL Version 2.1
 * @version 1.4.0
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();

$http = eZHTTPTool::instance();
$value  = $http->hasPostVariable( 'value' ) ? $http->variable( 'value' ) : 0;
$region = $prepare_action->hasRegion() ? $prepare_action->getRegion() : null;

$imageconverter = new eZIEezcImageConverter( eZIEImageFilterBrightness::filter( $value, $region ) );

$imageconverter->perform(
    $prepare_action->getImagePath(),
    $prepare_action->getNewImagePath()
);

eZIEImageToolResize::doThumb(
    $prepare_action->getNewImagePath(),
    $prepare_action->getNewThumbnailPath()
);

echo (string)$prepare_action;
eZExecution::cleanExit();
?>
開發者ID:sushilbshinde,項目名稱:ezpublish-study,代碼行數:30,代碼來源:filter_brightness.php

示例5: eZIEImagePreAction

<?php

/**
 * File containing the saturation tool handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version 2014.07.0
 * @package kernel
 * @todo Check if this is actually used/implemented
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
if ($http->hasPostVariable("saturation")) {
    $saturation = $http->variable("saturation");
}
eZIEImageToolSaturation::toolSaturation($prepare_action->getImagePath(), $prepare_action->getNewImagePath(), $saturation);
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:20,代碼來源:tool_saturation.php

示例6: eZIEImagePreAction

 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version 2014.11.1
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();

$http = eZHTTPTool::instance();

$region = null;
if ( $prepare_action->hasRegion() )
{
    $region = $prepare_action->getRegion();
}

// retrieve image dimensions
$analyzer = new eZIEImageAnalyzer( $prepare_action->getImagePath() );

$imageconverter = new eZIEezcImageConverter(
    eZIEImageToolPixelate::filter(
        $analyzer->data->width,
        $analyzer->data->height,
        $region
    )
);

$imageconverter->perform(
    $prepare_action->getImagePath(),
    $prepare_action->getNewImagePath()
);

eZIEImageToolResize::doThumb(
開發者ID:ataxel,項目名稱:tp,代碼行數:31,代碼來源:tool_pixelate.php

示例7: eZIEImagePreAction

/**
 * File containing the ezie no save & quit menu item handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version //autogentag//
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();
$imageId = $prepare_action->getImageId();
$imageVersion = $prepare_action->getImageVersion();
$imageAttribute = eZContentObjectAttribute::fetch($imageId, $imageVersion);
// Save the class attribute
$imageHandler = $prepare_action->getImageHandler();
$imageHandler->initializeFromFile($prepare_action->getImagePath(), $imageHandler->attribute('alternative_text'), $imageHandler->attribute('original_filename'));
// TODO: what's $contentobjectattribute (ask jerome) ?
$imageHandler->store($imageAttribute);
// remove view cache if needed
eZContentCacheManager::clearObjectViewCacheIfNeeded($imageAttribute->attribute('contentobject_id'));
// delete all the images in working directory
// delete working directory
$working_folder = eZDir::dirpath($prepare_action->getImagePath());
// deletes the working folder recursively
eZDir::recursiveDelete($working_folder);
// new attribute
$imageAttribute = eZContentObjectAttribute::fetch($imageId, $imageVersion);
// @todo Use proper JSON, but this will do for now.
$tpl = eZTemplate::factory();
$tpl->setVariable('ezie_ajax_response', true);
$tpl->setVariable('attribute', $imageAttribute);
開發者ID:ezsystemstraining,項目名稱:ez54training,代碼行數:30,代碼來源:save_and_quit.php


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