TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ColorpickerController Class Reference
Inheritance diagram for ColorpickerController:
AbstractWizardController AbstractModule

Public Member Functions

 __construct ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 main ()
 
 printContent ()
 
 frameSet ()
 
 colorMatrix ()
 
 colorList ()
 
 getIndex ($im, $x, $y)
 

Public Attributes

 $wizardParameters
 
 $colorValue
 
 $fieldChangeFunc
 
 $fieldName
 
 $formName
 
 $md5ID
 
 $showPicker
 
 $HTMLcolorList = 'aqua,black,blue,fuchsia,gray,green,lime,maroon,navy,olive,purple,red,silver,teal,yellow,white'
 
 $pickerImage = ''
 
 $imageError = ''
 
 $doc
 
 $content
 

Protected Member Functions

 init ()
 
 areFieldChangeFunctionsValid ()
 
 getPageRenderer ()
 
- Protected Member Functions inherited from AbstractWizardController
 checkEditAccess ($table, $uid)
 
 getBackendUserAuthentication ()
 
 getLanguageService ()
 
 getDocumentTemplate ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $fieldChangeFuncHash
 
 $exampleImg
 

Detailed Description

Script Class for colorpicker wizard

Definition at line 27 of file ColorpickerController.php.

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

areFieldChangeFunctionsValid ( )
protected

Determines whether submitted field change functions are valid and are coming from the system and not from an external abuse.

Returns
bool Whether the submitted field change functions are valid

Definition at line 424 of file ColorpickerController.php.

References GeneralUtility\hmac().

Referenced by ColorpickerController\init().

colorList ( )

Creates a selector box with all HTML color names.

Returns
string

Definition at line 345 of file ColorpickerController.php.

References AbstractWizardController\getLanguageService().

Referenced by ColorpickerController\main().

colorMatrix ( )

Creates a color matrix table

Returns
string

Definition at line 312 of file ColorpickerController.php.

References AbstractWizardController\getLanguageService().

Referenced by ColorpickerController\main().

frameSet ( )

Returns a frameset so our JavaScript Reference isn't lost Took some brains to figure this one out ;-) If Peter wouldn't have been I would've gone insane...

Returns
void

Definition at line 270 of file ColorpickerController.php.

References $url, AbstractWizardController\getDocumentTemplate(), AbstractWizardController\getLanguageService(), ColorpickerController\getPageRenderer(), and PageRenderer\PART_HEADER.

Referenced by ColorpickerController\main().

getIndex (   $im,
  $x,
  $y 
)

Gets the HTML (Hex) Color Code for the selected pixel of an image This method handles the correct imageResource no matter what format

Parameters
resource$imValid ImageResource returned by ::imageCreateFromFile
int$xX-Coordinate of the pixel that should be checked
int$yY-Coordinate of the pixel that should be checked
Returns
string HEX RGB value for color
See Also
colorImage()

Definition at line 399 of file ColorpickerController.php.

getPageRenderer ( )
protected
Returns
PageRenderer

Definition at line 432 of file ColorpickerController.php.

References GeneralUtility\makeInstance().

Referenced by ColorpickerController\frameSet(), and ColorpickerController\init().

init ( )
protected
main ( )
mainAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now

Parameters
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Definition at line 189 of file ColorpickerController.php.

References $response, MessageInterface\getBody(), and ColorpickerController\main().

printContent ( )

Returns the sourcecode to the browser

Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use mainAction() instead

Definition at line 255 of file ColorpickerController.php.

References ColorpickerController\$content, and GeneralUtility\logDeprecatedFunction().

Member Data Documentation

$colorValue

Definition at line 41 of file ColorpickerController.php.

$content
$doc

Definition at line 107 of file ColorpickerController.php.

$exampleImg
protected

Definition at line 117 of file ColorpickerController.php.

$fieldChangeFunc

Definition at line 50 of file ColorpickerController.php.

$fieldChangeFuncHash
protected

Definition at line 55 of file ColorpickerController.php.

$fieldName

Definition at line 62 of file ColorpickerController.php.

$formName

Definition at line 69 of file ColorpickerController.php.

$HTMLcolorList = 'aqua,black,blue,fuchsia,gray,green,lime,maroon,navy,olive,purple,red,silver,teal,yellow,white'

Definition at line 88 of file ColorpickerController.php.

$imageError = ''

Definition at line 100 of file ColorpickerController.php.

$md5ID

Definition at line 76 of file ColorpickerController.php.

$pickerImage = ''

Definition at line 93 of file ColorpickerController.php.

$showPicker

Definition at line 83 of file ColorpickerController.php.

$wizardParameters

Definition at line 34 of file ColorpickerController.php.