public function folderDataAccess($params, &$smarty)
    {
        $folderId = $this->getRequest()->get('folder_id');

        if ($folderId === null) {
            $contentId = $this->getRequest()->get('content_id');

            if ($contentId !== null) {
                if (null !== $content = ContentQuery::create()->findPk($contentId)) {
                    $folderId = $content->getDefaultFolderId();
                }
            }
        }

        if ($folderId !== null) {
            return $this->dataAccessWithI18n(
                "Folder",
                $params,
                FolderQuery::create()->filterByPrimaryKey($folderId)
            );
        }

        return '';
    }
public function folderDataAccess($params, &$smarty)
    {
        $folderId = $this->getRequest()->get('folder_id');

        if ($folderId === null) {
            $contentId = $this->getRequest()->get('content_id');

            if ($contentId !== null) {
                if (null !== $content = ContentQuery::create()->findPk($contentId)) {
                    $folderId = $content->getDefaultFolderId();
                }
            }
        }

        if ($folderId !== null) {
            return $this->dataAccessWithI18n(
                "Folder",
                $params,
                FolderQuery::create()->filterByPrimaryKey($folderId)
            );
        }

        return '';
    }
public function folderDataAccess ( $ params , & $ smarty ) { $ folderId = $ this -> getRequest ( ) -> get ( 'folder_id' ) ; if ( $ folderId === null ) { $ contentId = $ this -> getRequest ( ) -> get ( 'content_id' ) ; if ( $ contentId !== null ) { if ( null !== $ content = ContentQuery :: create ( ) -> findPk ( $ contentId ) ) { $ folderId = $ content -> getDefaultFolderId ( ) ; } } } if ( $ folderId !== null ) { return $ this -> dataAccessWithI18n ( "Folder" , $ params , FolderQuery :: create ( ) -> filterByPrimaryKey ( $ folderId ) ) ; } return '' ; }
Provides access to an attribute of the current folder

@param  array $params
@param  \Smarty $smarty
@return string the value of the requested attribute
Provides access to an attribute of the current folder