Package dk.i2m.drupal.field

Examples of dk.i2m.drupal.field.Image


        this.name = name;
    }

    public ImageWrapper(String name, String fid, String alt, String title) {
        this(name);
        images.add(new Image(fid, alt, title));
    }
View Full Code Here


    @Override
    public Set<NameValuePair> setup(String language,
            Set<NameValuePair> nvps) {
        for (int i = 0; i < images.size(); i++) {
            Image image = images.get(i);

            if (image.getFid() == null) {
                throw new IllegalArgumentException("fid cannot be null");
            }

            nvps.add(new BasicNameValuePair(name + "[" + language + "]" + "["
                    + i + "][fid]", image.getFid()));

            nvps.add(new BasicNameValuePair(name + "[" + language + "]" + "["
                    + i + "][display]", "1"));

            if (image.getAlt() != null) {
                nvps.add(new BasicNameValuePair(name + "[" + language + "]"
                        + "[" + i + "][alt]", image.getAlt()));
            }

            if (image.getTitle() != null) {
                nvps.add(new BasicNameValuePair(name + "[" + language + "]"
                        + "[" + i + "][title]", image.getTitle()));
            }
        }

        return nvps;
    }
View Full Code Here

TOP

Related Classes of dk.i2m.drupal.field.Image

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.