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

Conversation

Projects
None yet
3 participants
@tomneedham
Member

tomneedham commented Apr 12, 2017

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');

This comment has been minimized.

@tomneedham

tomneedham Apr 12, 2017

Member

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

@tomneedham

tomneedham Apr 12, 2017

Member

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

@PVince81 PVince81 modified the milestones: 10.0.1, 10.0 Apr 26, 2017

@DeepDiver1975 DeepDiver1975 self-requested a review May 3, 2017

@DeepDiver1975

This comment has been minimized.

Show comment
Hide comment
@DeepDiver1975

DeepDiver1975 May 4, 2017

Member

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

Member

DeepDiver1975 commented May 4, 2017

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

@DeepDiver1975 DeepDiver1975 merged commit 46bc5f1 into master May 4, 2017

4 checks passed

Scrutinizer 1 new issues, 3 updated code elements
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@DeepDiver1975 DeepDiver1975 deleted the sections-registration branch May 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment