IssueDAO::_returnSectionFromRow

Estoy actualizando la revista de la versión 3.1 a la 3.4. Actualmente estoy trabajando en un plugin que genera Feed RSS, pero no crea ningún archivo que contenga el RSS.

En el método register se usa “IssueDAO::_returnSectionFromRow”, pero según la documentación ya es obsoleto para la nueva versión. Hay alguna alternativa para esto??

Mi función es asi:

function register($category, $path, $mainContextId = null)
    {
        if (parent::register($category, $path, $mainContextId = null)) {
            if (!parent::register($category, $path, $mainContextId)) return false;
            if ($this->getEnabled($mainContextId)) {
                /* Hook que se dispara justo después de actualizar un envío a producción */
                //HookRegistry::register('TemplateManager::display', array($this, 'feedRSS'));
                //HookRegistry::register('IssueDAO::_returnIssueFromRow', array($this, 'feedRSS'));

                Hook::add('IssueDAO::_returnSectionFromRow', array($this, 'feedRSS'));

                //Generación de certificados
                //$this->import('GenericMLSCertificate');
                //return new GenericMLSCertificate();
                //$GenericMLSCertificate = new GenericMLSCertificate();
                //$GenericMLSCertificate->register($category, $path, $mainContextId);
                //DAORegistry::registerDAO('GenericMLSCertificate', $GenericMLSCertificate);

                //TemplateManager::display
                // handle locales redirect
                //HookRegistry::register('LoadHandler', array($this, 'handleLocaleRequest'));
                // add info about locale urls for google inside head
                //HookRegistry::register('ArticleHandler::view', array(&$this, 'articleView'));
            }
            return true;
        }
        return false;
    }

Hola @Diego_Morales,

Yes, the IssueDAO::_returnSectionFromRow hook was removed starting with OJS 3.4.0. I’d suggest looking into Schema::get::issue – it’s implemented in PKPSchemaService. You can see it in use in e.g. the ORCID plugin:

In this case, it’s used to extend the schema describing author objects to add new elements related the to ORCiD integration.

Thanks,
Alec Smecher
Public Knowledge Project Team

2 Likes

thanks!! Will take a look at that

Where can I find this in the documentation?

Hola @Diego_Morales,

Have a look here:

https://docs.pkp.sfu.ca/dev/documentation/en/utilities-hooks#entities

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

This topic was automatically closed after 13 days. New replies are no longer allowed.