parametersosclass

get parameter in OSClass


In OSClass, I need to get parameter from item-post.php to ItemActions.php. I know 2 ways, one is like, $aItem['catId'] and another is Params::getParam('catId').

But second is won't work for file type. Any other way to get file type?

Because of, I using following code,

$this->uploadItemResources( $aItem['photos'] , $itemId );

$this->uploadItemResources( $aItem['layout'] , $itemId );

Here photos are inserted correctly. But I didn't get layout value. In item-post.php my code is correct.


Solution

  • This should work:

    $someFiles = Params::getFiles('param_name');
    

    In your case

    $someFiles = Params::getFiles('photos');
    
    $otherFiles = Params::getFiles('layout');