All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ninja.NinjaExtension Maven / Gradle / Ivy

The newest version!
/*
 * Made with all the love in the world
 * by scireum in Remshalden, Germany
 *
 * Copyright by scireum GmbH
 * http://www.scireum.de - [email protected]
 */

package ninja;

import sirius.kernel.Sirius;
import sirius.kernel.commons.Tuple;
import sirius.kernel.di.std.Register;
import sirius.web.templates.rythm.RythmExtension;

import java.util.function.Consumer;

/**
 * Provides additional variables to the Rythm-Context.
 */
@Register
public class NinjaExtension implements RythmExtension {
    @Override
    public void collectExtensionNames(Consumer>> names) {
        names.accept(Tuple.create("tagLine", String.class));
        names.accept(Tuple.create("claim", String.class));
    }

    @Override
    public void collectExtensionValues(Consumer> values) {
        values.accept(Tuple.create("tagLine", Sirius.getConfig().getString("product.tagLine")));
        values.accept(Tuple.create("claim", Sirius.getConfig().getString("product.claim")));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy