Hello. how to use plugin "action.skeleton" add pydio.getUserSelection()?


#1

hello.

I modify action.skeleton.

I want to make a list user selected files or directory on screen.

I want to viewing from “my_skeleton_button_frame” (PluginSkeleton.php)

it doesn’t work.
PluginSkeleton.php
public function receiveAction(\Psr\Http\Message\ServerRequestInterface $requestInterface, \Psr\Http\Message\ResponseInterface $responseInterface )
{
$httpVars = $requestInterface->getParsedBody();
$ctx = $requestInterface->getAttribute(“ctx”);
$userSelection = UserSelection::fromContext($ctx, $httpVars);
$selectedNode = $userSelection->getUniqueNode();
$realFile = $selectedNode->getRealFile();
echo " AA : ". $selectedNode;
echo " BB : ". $realFile;

}

SkeletonActions.js
var Callbacks = (function () {
function Callbacks() {
_classCallCheck(this, Callbacks);
}

/**
 * Sample Dialog class used for reference only, ready to be
 * copy/pasted :-)
 */

_createClass(Callbacks, null, [{
    key: 'frameButton',
    value: function frameButton() {
        pydio.UI.openComponentInModal('SkeletonActions', 'Dialog', { userSelection: pydio.getUserSelection() });
    }
}]);

return Callbacks;

})();

manifest.xml
add this
<context selection="true" dir="true" recycle="false" actionBar="true" actionBarGroup="change_main"/>
<selectionContext dir="true" file="true" recycle="false" />

    <dependencies>
        <activePlugin pluginName="access.fs"/>
    </dependencies>

Please help me