Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow section registration in info.xml #27634

Merged
merged 1 commit into from
May 4, 2017
Merged

Conversation

tomneedham
Copy link
Member

Description

Section classes can be registered in info.xml by specifying the class name like so:

<settings-sections>
     <admin>OCA\Files_antivirus\AdminSection</admin>
</settings-sections>

This allows apps to register their own sections, with translatable titles, and specify an icon to be used (although this must be in core at the moment).

Related Issue

#27327

How Has This Been Tested?

Moved the files_antivirus app to its own section for testing.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. [Info provided in this PR]
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tomneedham tomneedham added this to the 10.0 milestone Apr 12, 2017
}
}

$this->logger->error('Section id not found: "'.$sectionID.'". Apps should register settings sections in info.xml');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will reintroduce the error message when unknown sections are referenced which I believe is the correct reaction, as we should encourage section registration to enable translation support

@DeepDiver1975
Copy link
Member

@tomneedham is there an app which can be used for testing? THX

@DeepDiver1975 DeepDiver1975 merged commit 46bc5f1 into master May 4, 2017
@DeepDiver1975 DeepDiver1975 deleted the sections-registration branch May 4, 2017 07:46
@settermjd settermjd assigned settermjd and unassigned settermjd Jan 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants