Changeset View
Changeset View
Standalone View
Standalone View
core/units/skins/skin_eh.php
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Line(s) | |||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function OnBeforeClone(kEvent $event) | protected function OnBeforeClone(kEvent $event) | ||||
{ | { | ||||
parent::OnBeforeClone($event); | parent::OnBeforeClone($event); | ||||
/** @var kDBItem $object */ | |||||
$object = $event->getObject(); | $object = $event->getObject(); | ||||
/* @var $object kDBItem */ | |||||
$object->SetDBField('IsPrimary', 0); | $object->SetDBField('IsPrimary', 0); | ||||
} | } | ||||
/** | /** | ||||
* Re-compile skin, after it's changed (live table only) | * Re-compile skin, after it's changed (live table only) | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function OnAfterItemUpdate(kEvent $event) | protected function OnAfterItemUpdate(kEvent $event) | ||||
{ | { | ||||
parent::OnAfterItemUpdate($event); | parent::OnAfterItemUpdate($event); | ||||
/** @var kDBItem $object */ | |||||
$object = $event->getObject(); | $object = $event->getObject(); | ||||
/* @var $object kDBItem */ | |||||
if ( !$object->IsTempTable() ) { | if ( !$object->IsTempTable() ) { | ||||
Lint: Generic.WhiteSpace.ScopeIndent.IncorrectExact: Line indented incorrectly; expected 2 tabs, found 3 | |||||
/** @var SkinHelper $skin_helper */ | |||||
$skin_helper = $this->Application->recallObject('SkinHelper'); | $skin_helper = $this->Application->recallObject('SkinHelper'); | ||||
/* @var $skin_helper SkinHelper */ | |||||
$skin_helper->compile($object); | $skin_helper->compile($object); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* [HOOK] Compile stylesheet file based on theme definitions | * [HOOK] Compile stylesheet file based on theme definitions | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function OnCompileStylesheet($event) | protected function OnCompileStylesheet($event) | ||||
{ | { | ||||
/** @var kDBItem $object */ | |||||
$object = $event->getObject( Array ('skip_autoload' => true) ); | $object = $event->getObject( Array ('skip_autoload' => true) ); | ||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
Space after opening parenthesis of function call prohibited Lint: CodingStandard.Functions.FunctionCallSignature.SpaceAfterOpenBracket: Space after opening parenthesis of function call prohibited | |||||
Expected 0 spaces before closing bracket; 1 found Lint: CodingStandard.Functions.FunctionCallSignature.SpaceBeforeCloseBracket: Expected 0 spaces before closing bracket; 1 found | |||||
Expected 0 spaces before closing bracket; 1 found Lint: PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket: Expected 0 spaces before closing bracket; 1 found | |||||
Space after opening parenthesis of function call prohibited Lint: PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket: Space after opening parenthesis of function call prohibited | |||||
/* @var $object kDBItem */ | |||||
$object->SwitchToLive(); | $object->SwitchToLive(); | ||||
$ids = $event->MasterEvent->getEventParam('ids'); | $ids = $event->MasterEvent->getEventParam('ids'); | ||||
if ( !is_array($ids) ) { | if ( !is_array($ids) ) { | ||||
$ids = explode(',', $ids); | $ids = explode(',', $ids); | ||||
} | } | ||||
if ( !$ids ) { | if ( !$ids ) { | ||||
return ; | return ; | ||||
} | } | ||||
/** @var SkinHelper $skin_helper */ | |||||
$skin_helper = $this->Application->recallObject('SkinHelper'); | $skin_helper = $this->Application->recallObject('SkinHelper'); | ||||
/* @var $skin_helper SkinHelper */ | |||||
foreach ($ids as $id) { | foreach ($ids as $id) { | ||||
$object->Load($id); | $object->Load($id); | ||||
$skin_helper->compile($object); | $skin_helper->compile($object); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
Line indented incorrectly; expected 2 tabs, found 3